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 |
|---|---|---|---|---|---|---|
Retrieves information regarding the specified triggers or all existing triggers currently active.
|
public ShowTriggersResponse showTriggers(ShowTriggersRequest request) throws GPUdbException {
ShowTriggersResponse actualResponse_ = new ShowTriggersResponse();
submitRequest("/show/triggers", request, actualResponse_, false);
return actualResponse_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<Trigger> getActiveTriggers() {\n return activeTriggers;\n }",
"public List<Trigger> getTriggers();",
"public abstract Map<String, Trigger> getTriggers();",
"ETriggers getTriggers();",
"Collection<ITrigger> getTriggers();",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/triggers\")\n @Description(\"Returns all triggers for the given alert ID.\")\n public List<TriggerDto> getAllTriggers(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n PrincipalUser owner = validateAndGetOwner(req, null);\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert != null) {\n validateResourceAuthorization(req, alert.getOwner(), owner);\n return TriggerDto.transformToDto(alert.getTriggers());\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"public List<CronTrigger> getTriggers() {\n return triggers;\n }",
"Set getTriggers();",
"@Override\n public GetRepositoryTriggersResult getRepositoryTriggers(GetRepositoryTriggersRequest request) {\n request = beforeClientExecution(request);\n return executeGetRepositoryTriggers(request);\n }",
"@Transactional\n @GetMapping\n public ResponseEntity<CollectionModel<EntityModel<EventTriggerDto>>> getEventTriggers() {\n return new ResponseEntity<>(linkAssembler.toModel(service.getEventTriggers(), EventTriggerDto.class), HttpStatus.OK);\n }",
"public ShowTriggersResponse showTriggers(List<String> triggerIds, Map<String, String> options) throws GPUdbException {\n ShowTriggersRequest actualRequest_ = new ShowTriggersRequest(triggerIds, options);\n ShowTriggersResponse actualResponse_ = new ShowTriggersResponse();\n submitRequest(\"/show/triggers\", actualRequest_, actualResponse_, false);\n return actualResponse_;\n }",
"public List<Trigger> getActiveTriggers(String containedText, String triggerWhen) {\n return activeTriggers.stream().filter(trigger -> trigger.getWatch().equals(containedText) && trigger.getWhen().equals(triggerWhen)).collect(Collectors.toList());\n }",
"ITrigger getTrigger(String sTriggerName);",
"public int[] activateTrigger(int triggerId) {\n\n\t\tint[] triggerResults = {0,0,0,0,0,0,0,0,0,0};\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tMap<String, String> hm = db.selectTrigger(triggerId);\n\t\t\t\t\n\t\t\tint type = 0;\n\t\t\tint toTriggerId = 0;\t\n\t\t\t\t\t\n\t\t\ttype = Integer.parseInt(hm.get(\"type\"));\n\t\t\ttoTriggerId = Integer.parseInt(hm.get(\"to_trigger_id\"));\n\t\t\t\n\t\t\tswitch (type) {\n\t\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_ANIM:\t\t\t// an animation is launched\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[1] = toTriggerId;\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_ACTION:\t// OR a change on items (combination, action, take item on screen...)\n\n\t\t\t\t\ttriggerResults[5] = activateModifier(toTriggerId);\n\t\t\t\t break;\n\n\t\t\t\tcase DB_TRIGGER_TYPE_DOLL:\t// OR move/hide doll\t\n\t\t\t\t\t\n\t\t\t\t\tMap<String, String> hmDoll = db.selectDollTrigger(toTriggerId);\n\t\t\t\t\tif (hmDoll.get(\"to_x\") != null)\t\t\t\ttriggerResults[2] = Integer.parseInt(hmDoll.get(\"to_x\"));\n\t\t\t\t\tif (hmDoll.get(\"doll_is_hidden\") != null)\ttriggerResults[3] = Integer.parseInt(hmDoll.get(\"doll_is_hidden\"));\n\t\t\t\t\tif (hmDoll.get(\"y_velocity\") != null)\t\ttriggerResults[6] = Integer.parseInt(hmDoll.get(\"y_velocity\"));\n\t\t\t\t\t\n\t\t\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 2 \" + hmDoll.get(\"to_x\"));\n\t\t\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 3 \" + hmDoll.get(\"doll_is_hidden\"));\n\t\t\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 6 \" + hmDoll.get(\"y_velocity\"));\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_TEXT:\t// show a bubble\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[4] = toTriggerId;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_SV_ITEM:\t// hide/show item\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[7] = toTriggerId;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_SV_ANIM:\t// hide/show anim\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[8] = toTriggerId;\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 0 \" + hm.get(\"next_trigger_id\"));\n\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 5 \" + triggerResults[5]);\n\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 1, 4, 7 & 8: \" + toTriggerId);\n\t\t\t\n\t\t\tif (hm.get(\"next_trigger_id\") != null)\ttriggerResults[0] = Integer.parseInt(hm.get(\"next_trigger_id\"));\n\t\t\tif (hm.get(\"simultaneous_trigger_id\") != null)\ttriggerResults[9] = Integer.parseInt(hm.get(\"simultaneous_trigger_id\"));\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn triggerResults;\n\t}",
"public String list() throws Exception {\n\t\tString[] groupNames = scheduler.getTriggerGroupNames();\n\t\t\n\t\tif (groupNames != null) {\n\t\t\ttriggerMap = new HashMap(groupNames.length);\n\t\t\t\n\t\t\tfor (int i = 0; i < groupNames.length; i++) {\n\t\t\t\tString[] names = scheduler.getTriggerNames(groupNames[i]);\n\t\t\t\t\n\t\t\t\tif (names != null) {\n\t\t\t\t\tMap nameMap = new HashMap(names.length);\n\t\t\t\t\t\n\t\t\t\t\tfor (int j = 0; j < names.length; j++) {\n\t\t\t\t\t\tTrigger trigger = scheduler.getTrigger(names[j], groupNames[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnameMap.put(names[j], trigger);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttriggerMap.put(groupNames[i], nameMap);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\ttriggerMap = new HashMap(0);\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}",
"Collection<ITrigger> getTriggers(String sFolderName);",
"public List<TaskGenerateTrigger> loadTaskTriggers() {\n\t\treturn null;\r\n\t}",
"public Trigger getTrigger() {\n \t\treturn trigger;\n \t}",
"public TriggerAccess getTrigger () {\n return this.trigger;\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/triggers/{triggerId}\")\n @Description(\"Returns a trigger by its ID.\")\n public TriggerDto getTriggerById(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId,\n @PathParam(\"triggerId\") BigInteger triggerId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (triggerId == null || triggerId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Trigger Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n PrincipalUser owner = validateAndGetOwner(req, null);\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert != null) {\n validateResourceAuthorization(req, alert.getOwner(), owner);\n for (Trigger trigger : alert.getTriggers()) {\n if (trigger.getId().equals(triggerId)) {\n return TriggerDto.transformToDto(trigger);\n }\n }\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"@Override\n @Transactional(readOnly = true)\n public Page<Trigger> findAll(Pageable pageable) {\n log.debug(\"Request to get all Triggers\");\n return triggerRepository.findAll(pageable);\n }",
"public List<Gadget> getGadgetsToTrigger() {\n return gadgetsToTrigger;\n }",
"TriggeringStatement getTriggeringStatement();",
"private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}",
"boolean getUserChooseTrigger();",
"@Transactional\n @GetMapping(\"/{name}\")\n public ResponseEntity<EntityModel<EventTriggerDto>> getEventTrigger(@PathVariable String name) {\n return new ResponseEntity<>(linkAssembler.toModel(service.getEventTrigger(name), EventTriggerDto.class), HttpStatus.OK);\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/notifications/{notificationId}/triggers\")\n @Description(\"Returns all the triggers for the given notification ID.\")\n public List<TriggerDto> getTriggersByNotificationId(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId,\n @PathParam(\"notificationId\") BigInteger notificationId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (notificationId == null || notificationId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Notification Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n PrincipalUser owner = validateAndGetOwner(req, null);\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert != null) {\n validateResourceAuthorization(req, alert.getOwner(), owner);\n for (Notification notification : alert.getNotifications()) {\n if (notification.getId().equals(notificationId)) {\n return TriggerDto.transformToDto(notification.getTriggers());\n }\n }\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"public interface TriggerHandler {\n\n String handleTrigger(String stateJson, Collection<Subscription> subscriptions, String cfgJson);\n\n String getTriggerType();\n\n}",
"public static boolean getTrigger() {\n\t\treturn true;\r\n\t}",
"public TriggerInstanceElements getTriggerInstanceAccess() {\n\t\treturn pTriggerInstance;\n\t}",
"boolean containsTrigger(String sTriggerName);",
"protected TriggerFactory getTriggerFactory() {\n\t\treturn this.triggerFactory;\n\t}",
"TriggerPositionType getTriggerPositionType();",
"public abstract void setTriggers(Map<String, Trigger> triggers);",
"public final EObject ruleETriggers() throws RecognitionException {\n EObject current = null;\n\n EObject lv_triggers_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2093:2: ( ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* ) )\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n {\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n // InternalRMParser.g:2095:3: () ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n {\n // InternalRMParser.g:2095:3: ()\n // InternalRMParser.g:2096:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getETriggersAccess().getETriggersAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:2102:3: ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n loop18:\n do {\n int alt18=2;\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0==RULE_QUALIFIED_NAME) ) {\n alt18=1;\n }\n\n\n switch (alt18) {\n \tcase 1 :\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t {\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t // InternalRMParser.g:2104:5: lv_triggers_1_0= ruleETriggerDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggersAccess().getTriggersETriggerDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_16);\n \t lv_triggers_1_0=ruleETriggerDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggersRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"triggers\",\n \t \t\t\t\t\t\tlv_triggers_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop18;\n }\n } while (true);\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 }",
"@RequestMapping(value = FETCH_TRIGGERS_BY_JOB_KEY_AND_CURRENT_USER_GROUP, method = GET)\n @ResponseBody\n @ResponseStatus(ACCEPTED)\n public ResponseEntity<String> fetchTriggersByJobKeyNameAndJobGroupName(@RequestParam(\"jobKey\") final String jobKeyName, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {\n return quartzService.fetchTriggersByJobKeyNameAndJobGroupName(jobKeyName, getCookie(httpServletRequest, X_AUTH_TOKEN));\n }",
"public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"final public String[] getPartialTriggers()\n {\n return (String[])getProperty(PARTIAL_TRIGGERS_KEY);\n }",
"boolean hasTriggerFulfillment();",
"protected Trigger getContentAssistTrigger() {\n IBindingService service = (IBindingService) PlatformUI.getWorkbench()\n .getService(IBindingService.class);\n Trigger trigger = null;\n TriggerSequence[] sequences = service\n .getActiveBindingsFor(ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND);\n if (sequences.length > 0) {\n Trigger[] triggers = sequences[0].getTriggers();\n if (triggers.length > 0) {\n trigger = triggers[0];\n }\n }\n return trigger;\n }",
"public static ArrayList<TriggerElement> getTriggers (JSONArray jsonArray){\n ArrayList<TriggerElement> triggerElements = new ArrayList<TriggerElement>();\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject o = jsonArray.getJSONObject(i);\n JSONArray conditionArrayJson = o.getJSONArray(Utility.Conditions);\n JSONObject then = o.getJSONObject(Utility.Then);\n String type = then.getString(Utility.Type);\n\n TriggerElement te;\n\n if (type.matches(TriggerElement.COMMAND)) {\n if (then.has(Utility.Argument)) {\n te = new TriggerElement(then.getString(Utility.DeviceName), then.getString(Utility.ServiceName),\n then.getString(Utility.Command), then.getString(Utility.Argument), o.getInt(Utility.ID));\n }\n else {\n te = new TriggerElement(then.getString(Utility.DeviceName), then.getString(Utility.ServiceName),\n then.getString(Utility.Command), o.getInt(Utility.ID));\n }\n }\n\n else {\n te = new TriggerElement(o.getInt(Utility.ID), type);\n }\n\n for (int j = 0; j < conditionArrayJson.length(); j++) {\n JSONObject cJson = conditionArrayJson.getJSONObject(j);\n te.addCondition(new TriggerCondition(cJson.getString(Utility.DeviceName), cJson.getString(Utility.ServiceName),\n cJson.getString(Utility.Condition), cJson.getString(Utility.Value)));\n }\n\n triggerElements.add(te);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n return triggerElements;\n }",
"public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}",
"boolean isTriggerPersistent(String sTriggerName);",
"@Override\n\tprotected boolean on_trigger_activated(String trigger_name) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Trigger [id=\" + id + \", name=\" + name + \", schedulerType=\" + schedulerType + \", schedularAttrs=\"\r\n\t\t\t\t+ schedularAttributes + \", schedulerKey=\" + schedulerKey + \"]\";\r\n\t}",
"public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}",
"@Transactional\n @GetMapping(\"/{name}/quantum-applications\")\n public ResponseEntity<CollectionModel<EntityModel<QuantumApplicationDto>>> getEventTriggerApplications(@PathVariable String name) {\n return new ResponseEntity<>(quantumApplicationLinkAssembler.toModel(service.getEventTriggerApplications(name), QuantumApplicationDto.class), HttpStatus.OK);\n }",
"public String getEventTrigger(Long jenkinsID) {\n return getTable().get(jenkinsID);\n }",
"@Override\n @Transactional(readOnly = true)\n public Trigger findOne(Long id) {\n log.debug(\"Request to get Trigger : {}\", id);\n return triggerRepository.findOne(id);\n }",
"public static JSONArray getApexTriggerList(JSONObject loginObject, String startdate, String enddate) {\n\t\tJSONArray jsonArray = null;\n\t\tString ObjectRestURL = ToolingQueryList.getApexTriggers(startdate, enddate);\n\n\t\tHttpClient httpClient = HttpClientBuilder.create().build();\n\n\t\tString instanceURL = loginObject.getString(\"instance_url\");\n\t\tString AccessToken = loginObject.getString(\"access_token\");\n\n\t\tHeader oauthHeader = new BasicHeader(\"Authorization\", \"OAuth \" + AccessToken);\n\n\t\tString uri = instanceURL + RestResourceURL.getToolingQueryURL(ObjectRestURL);\n\n\t\tHttpResponse response = null;\n\t\tHttpGet httpget = new HttpGet(uri);\n\t\thttpget.addHeader(oauthHeader);\n\t\ttry {\n\t\t\tresponse = httpClient.execute(httpget);\n\t\t\tif (response.getStatusLine().getStatusCode() == 200) {\n\t\t\t\tString Result = EntityUtils.toString(response.getEntity());\n\t\t\t\tJSONObject jsonObject = new JSONObject(Result);\n\n\t\t\t\tjsonArray = jsonObject.getJSONArray(\"records\");\n\t\t\t\t/*\n\t\t\t\t * for(int i=0;i<jsonArray.length();i++) {\n\t\t\t\t * metadtalist.add(jsonArray.getJSONObject(i).getString(\"Id\")); }\n\t\t\t\t */\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn jsonArray;\n\n\t}",
"@Override\n public TestRepositoryTriggersResult testRepositoryTriggers(TestRepositoryTriggersRequest request) {\n request = beforeClientExecution(request);\n return executeTestRepositoryTriggers(request);\n }",
"@DELETE\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/triggers/{triggerId}\")\n @Description(\"Deletes a trigger having the given ID and removes any associations with the alert or notifications.\")\n public Response deleteTriggersById(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId,\n @PathParam(\"triggerId\") BigInteger triggerId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (triggerId == null || triggerId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Trigger Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert == null) {\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }\n validateResourceAuthorization(req, alert.getOwner(), getRemoteUser(req));\n\n List<Trigger> listTrigger = new ArrayList<Trigger>(alert.getTriggers());\n Iterator<Trigger> itTrigger = listTrigger.iterator();\n\n while (itTrigger.hasNext()) {\n Trigger trigger = itTrigger.next();\n\n if (triggerId.equals(trigger.getId())) {\n itTrigger.remove();\n alert.setTriggers(listTrigger);\n alertService.updateAlert(alert);\n return Response.status(Status.OK).build();\n }\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"public abstract void handleMatching(EventBean[] triggerEvents, EventBean[] matchingEvents);",
"public void getAlerts(TableQueryCallback<Alert> callback) {\n mAlertTable.where().field(\"active\").eq(true).execute(callback);\n }",
"public interface TriggerService {\n\n /**\n * 获取所有的问题触发器ids\n * @return\n * @throws ServiceException\n */\n List<String> getProblemTriggerIds() throws ServiceException;\n\n <T> List<T> listTrigger(TriggerGetRequest triggerGetRequest, Class<T> clazz);\n\n /**\n * 根据 request 获取触发器数量\n * @return\n * @throws ServiceException\n */\n int countTrigger(TriggerGetRequest request) throws ServiceException;\n/*\nzabbix 方法\n */\n /**\n *\n * @return\n * @throws ServiceException\n */\n List<DashboardProblemVO> listBriefProblems() throws ServiceException;\n\n /**\n * 根据 triggerIds 查询对应的 triggerDTOS selectHost\n * @param triggerIds\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> getTriggersByTriggerIds(List<String> triggerIds ) throws ServiceException;\n /**\n * 根据itemIds获取监控中的 trggierDTO list\n * @param itemIds\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> getTriggersByItemIds(List<String> itemIds) throws ServiceException;\n\n /**\n * 列出所有触发器 排除依赖 触发器 BriefTriggerDTOS\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> listTriggersSkipDependent() throws ServiceException;\n\n /**\n * 列出问题触发器 BriefTriggerDTOS\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> listProblemTriggers() throws ServiceException;\n\n /**\n * 问题管理 问题列表 ProblemListVO\n * @return\n * @throws ServiceException\n */\n List<ProblemListVO> listProblemListVO() throws ServiceException;\n\n /**\n * 问题管理 问题详情 基础静态信息 ProblemDetailVO\n * @return\n * @throws ServiceException\n */\n ProblemDetailVO getProblemDetailVOByTriggerId(String triggerId) throws ServiceException;\n\n}",
"private List<String> getGeofenceTransitionDetails(List<Geofence> triggeringGeofences) {\n List<String> geofenceRequestIds = new ArrayList<>();\n // Return the request ids of the triggered geofences\n for (Geofence geofence : triggeringGeofences) {\n geofenceRequestIds.add(geofence.getRequestId());\n }\n return geofenceRequestIds;\n }",
"List<AgentReference> getCurrentAgents();",
"public boolean isTriggeringToSource() {\n return getFlow().getSignificanceToSource() == Flow.Significance.Triggers;\n }",
"@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }",
"public boolean getTrigger(){\n \treturn !trigger.get();\n }",
"private String getGeofenceTrasitionDetails(int geoFenceTransition, List<Geofence> triggeringGeofences) {\n ArrayList<String> triggeringGeofencesList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesList.add(geofence.getRequestId());\n }\n\n String status = null;\n if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER)\n status = \"Entering Geofence\";\n else if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT)\n status = \"Exiting Geofence\";\n return status + TextUtils.join(\", \", triggeringGeofencesList);\n }",
"com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder();",
"@GET(\"trigger\")\n Call<Post> getPosts(@Query(\"shortid\") String shortid,\n @Query(\"pin\") String pin,\n @Query(\"app\") String app\n );",
"public void trigger() {\n\n\t\tfor (Gadget gadget : getGadgetsToTrigger()) {\n\n\t\t\tgadget.trigger();\n\n\t\t}\n\n\t}",
"public void setTriggers(List<CronTrigger> triggers) {\n this.triggers = triggers;\n\n CronExpression cronExpression;\n List<CronTrigger> schedulableTriggers = new ArrayList<CronTrigger>();\n\n for (CronTrigger cronTrigger : triggers) {\n try {\n cronExpression = new CronExpression(cronTrigger.getCronExpression());\n if (cronExpression.getNextValidTimeAfter(new Date()) == null) {\n // The cron expression is valid, but will never trigger.\n LOG.info(cronTrigger.getCronExpression() + \" not valid cronexpression. The job will not be scheduled.\");\n continue;\n }\n }\n catch (ParseException e) {\n LOG.info(cronTrigger.getCronExpression() + \" not valid cronexpression. The job will not be scheduled.\");\n continue;\n }\n schedulableTriggers.add(cronTrigger);\n }\n super.setTriggers(schedulableTriggers.toArray(new CronTrigger[0]));\n }",
"TriggerType createTriggerType();",
"public abstract void onTrigger();",
"private String getGeofenceTrasitionDetails(int geoFenceTransition, List<Geofence> triggeringGeofences) {\n ArrayList<String> triggeringGeofencesList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesList.add(geofence.getRequestId());\n }\n\n String status = null;\n if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER)\n status = \"Entering \";\n else if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT)\n status = \"Exiting \";\n return status + TextUtils.join(\", \", triggeringGeofencesList);\n }",
"public final EObject ruleTrigger() throws RecognitionException {\n EObject current = null;\n int ruleTrigger_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_6=null;\n Token otherlv_8=null;\n Token otherlv_9=null;\n Token otherlv_11=null;\n EObject lv_triggerRules_2_0 = null;\n\n EObject lv_triggerRules_4_0 = null;\n\n EObject lv_with_7_0 = null;\n\n EObject lv_when_10_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1350:28: ( (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1352:2: otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n {\n otherlv_0=(Token)match(input,KEYWORD_82,FOLLOW_KEYWORD_82_in_ruleTrigger2463); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getTriggerAccess().getTriggerKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2475); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1361:1: ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1363:3: lv_triggerRules_2_0= ruleQualifiedRuleReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2495);\n lv_triggerRules_2_0=ruleQualifiedRuleReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"triggerRules\",\n \t\tlv_triggerRules_2_0, \n \t\t\"QualifiedRuleReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1379:2: (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )*\n loop35:\n do {\n int alt35=2;\n int LA35_0 = input.LA(1);\n\n if ( (LA35_0==KEYWORD_8) ) {\n alt35=1;\n }\n\n\n switch (alt35) {\n \tcase 1 :\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1380:2: otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t {\n \t otherlv_3=(Token)match(input,KEYWORD_8,FOLLOW_KEYWORD_8_in_ruleTrigger2509); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_3, grammarAccess.getTriggerAccess().getCommaKeyword_3_0());\n \t \n \t }\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1384:1: ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1386:3: lv_triggerRules_4_0= ruleQualifiedRuleReference\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_3_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2529);\n \t lv_triggerRules_4_0=ruleQualifiedRuleReference();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"triggerRules\",\n \t \t\tlv_triggerRules_4_0, \n \t \t\t\"QualifiedRuleReference\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop35;\n }\n } while (true);\n\n otherlv_5=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2544); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_5, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_4());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1407:1: (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )?\n int alt36=2;\n int LA36_0 = input.LA(1);\n\n if ( (LA36_0==KEYWORD_58) ) {\n alt36=1;\n }\n switch (alt36) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1408:2: otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) )\n {\n otherlv_6=(Token)match(input,KEYWORD_58,FOLLOW_KEYWORD_58_in_ruleTrigger2557); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getTriggerAccess().getWithKeyword_5_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1412:1: ( (lv_with_7_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1414:3: lv_with_7_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWithBlockParserRuleCall_5_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleTrigger2577);\n lv_with_7_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"with\",\n \t\tlv_with_7_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1430:4: (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( (LA37_0==KEYWORD_57) ) {\n alt37=1;\n }\n switch (alt37) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1431:2: otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5\n {\n otherlv_8=(Token)match(input,KEYWORD_57,FOLLOW_KEYWORD_57_in_ruleTrigger2593); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_8, grammarAccess.getTriggerAccess().getWhenKeyword_6_0());\n \n }\n otherlv_9=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2605); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_9, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_6_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1440:1: ( (lv_when_10_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1442:3: lv_when_10_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWhenExpressionParserRuleCall_6_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleTrigger2625);\n lv_when_10_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"when\",\n \t\tlv_when_10_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_11=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2638); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_11, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_6_3());\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 20, ruleTrigger_StartIndex); }\n }\n return current;\n }",
"@Override\r\n\tpublic List<Map<String, Object>> agentActive() {\n\t\treturn agentMapper.agentActive();\r\n\t}",
"public static List<Resource> getResourceTrigger(Element element) {\n\t\tList<Resource> triggers = new ArrayList<Resource>();\n\t\tif(element instanceof Resource_Object) {\n\t\t\tResource_Object res = (Resource_Object)element;\n\t\t\ttriggers.add(res.getValue());\n\t\t} else if(element instanceof State_Object) {\n\t\t\t\n\t\t}\n\t\treturn null;//TODO function not used actually\n\t}",
"public QrtzSimpleTriggers() {\n this(DSL.name(\"qrtz_simple_triggers\"), null);\n }",
"boolean isSimpleTrigger();",
"public boolean trigger (String name) {\n final TriggerReference trigger = module.getTrigger(name);\n if (trigger == null) {\n Logger.missing(\"TriggerReference\", name);\n return false;\n } else {\n return trigger.get();\n }\n }",
"com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment();",
"int getUpdateTriggerTime();",
"protected void loadTrigger() {\n this.keyTrigger = getContentAssistTrigger();\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public abstract boolean isTrigger();",
"@Property(\"triggerAction\")\n String getTriggerAction();",
"public void setTriggeringToSource( boolean triggers ) {\n if ( triggers ) {\n setSignificanceToSource( Flow.Significance.Triggers );\n } else {\n setSignificanceToSource( Flow.Significance.None );\n }\n }",
"public JWSSignerOption getTriggeringOption() {\n\t\treturn option;\n\t}",
"public boolean hasUpdateTriggerTime() {\n return instance.hasUpdateTriggerTime();\n }",
"@DISPID(135)\r\n\t// = 0x87. The runtime will prefer the VTID if present\r\n\t@VTID(130)\r\n\tjava.lang.String triggerType();",
"public final EObject ruleReactionTrigger() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_2=null;\r\n Token otherlv_4=null;\r\n Token otherlv_6=null;\r\n Token otherlv_7=null;\r\n Token otherlv_9=null;\r\n EObject lv_triggers_1_0 = null;\r\n\r\n EObject lv_triggers_3_0 = null;\r\n\r\n EObject lv_guardExpression_5_0 = null;\r\n\r\n EObject lv_guardExpression_8_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1537:28: ( ( () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:1: ( () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:1: ( () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:2: () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1539:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getReactionTriggerAccess().getReactionTriggerAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:2: ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) )\r\n int alt29=2;\r\n int LA29_0 = input.LA(1);\r\n\r\n if ( (LA29_0==RULE_ID||(LA29_0>=39 && LA29_0<=44)||(LA29_0>=58 && LA29_0<=59)) ) {\r\n alt29=1;\r\n }\r\n else if ( (LA29_0==35) ) {\r\n alt29=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 29, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt29) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:3: ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:3: ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:4: ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )?\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:4: ( (lv_triggers_1_0= ruleEventSpec ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1545:1: (lv_triggers_1_0= ruleEventSpec )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1545:1: (lv_triggers_1_0= ruleEventSpec )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1546:3: lv_triggers_1_0= ruleEventSpec\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getTriggersEventSpecParserRuleCall_1_0_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleEventSpec_in_ruleReactionTrigger3338);\r\n lv_triggers_1_0=ruleEventSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t }\r\n \t\tadd(\r\n \t\t\tcurrent, \r\n \t\t\t\"triggers\",\r\n \t\tlv_triggers_1_0, \r\n \t\t\"EventSpec\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1562:2: (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )*\r\n loop27:\r\n do {\r\n int alt27=2;\r\n int LA27_0 = input.LA(1);\r\n\r\n if ( (LA27_0==28) ) {\r\n alt27=1;\r\n }\r\n\r\n\r\n switch (alt27) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1562:4: otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) )\r\n \t {\r\n \t otherlv_2=(Token)match(input,28,FOLLOW_28_in_ruleReactionTrigger3351); if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \tnewLeafNode(otherlv_2, grammarAccess.getReactionTriggerAccess().getCommaKeyword_1_0_1_0());\r\n \t \r\n \t }\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1566:1: ( (lv_triggers_3_0= ruleEventSpec ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1567:1: (lv_triggers_3_0= ruleEventSpec )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1567:1: (lv_triggers_3_0= ruleEventSpec )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1568:3: lv_triggers_3_0= ruleEventSpec\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getTriggersEventSpecParserRuleCall_1_0_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleEventSpec_in_ruleReactionTrigger3372);\r\n \t lv_triggers_3_0=ruleEventSpec();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"triggers\",\r\n \t \t\tlv_triggers_3_0, \r\n \t \t\t\"EventSpec\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop27;\r\n }\r\n } while (true);\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:4: ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )?\r\n int alt28=2;\r\n int LA28_0 = input.LA(1);\r\n\r\n if ( (LA28_0==35) && (synpred1_InternalSText())) {\r\n alt28=1;\r\n }\r\n switch (alt28) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:5: ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']'\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:5: ( ( '[' )=>otherlv_4= '[' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:6: ( '[' )=>otherlv_4= '['\r\n {\r\n otherlv_4=(Token)match(input,35,FOLLOW_35_in_ruleReactionTrigger3395); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_4, grammarAccess.getReactionTriggerAccess().getLeftSquareBracketKeyword_1_0_2_0());\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1589:2: ( (lv_guardExpression_5_0= ruleExpression ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1590:1: (lv_guardExpression_5_0= ruleExpression )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1590:1: (lv_guardExpression_5_0= ruleExpression )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1591:3: lv_guardExpression_5_0= ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getGuardExpressionExpressionParserRuleCall_1_0_2_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleExpression_in_ruleReactionTrigger3417);\r\n lv_guardExpression_5_0=ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"guardExpression\",\r\n \t\tlv_guardExpression_5_0, \r\n \t\t\"Expression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_6=(Token)match(input,36,FOLLOW_36_in_ruleReactionTrigger3429); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_6, grammarAccess.getReactionTriggerAccess().getRightSquareBracketKeyword_1_0_2_2());\r\n \r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1612:6: (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1612:6: (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1612:8: otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']'\r\n {\r\n otherlv_7=(Token)match(input,35,FOLLOW_35_in_ruleReactionTrigger3451); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_7, grammarAccess.getReactionTriggerAccess().getLeftSquareBracketKeyword_1_1_0());\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1616:1: ( (lv_guardExpression_8_0= ruleExpression ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1617:1: (lv_guardExpression_8_0= ruleExpression )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1617:1: (lv_guardExpression_8_0= ruleExpression )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1618:3: lv_guardExpression_8_0= ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getGuardExpressionExpressionParserRuleCall_1_1_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleExpression_in_ruleReactionTrigger3472);\r\n lv_guardExpression_8_0=ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"guardExpression\",\r\n \t\tlv_guardExpression_8_0, \r\n \t\t\"Expression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_9=(Token)match(input,36,FOLLOW_36_in_ruleReactionTrigger3484); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_9, grammarAccess.getReactionTriggerAccess().getRightSquareBracketKeyword_1_1_2());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"private String getGeofenceTransitionDetails(\n Context context,\n int geofenceTransition,\n List<Geofence> triggeringGeofences){\n\n String geofenceTransitionString = getTransitionString(geofenceTransition);\n\n ArrayList triggeringGeofecesIdList = new ArrayList();\n\n for (Geofence geofence : triggeringGeofences){\n triggeringGeofecesIdList.add(geofence.getRequestId());\n }\n\n String triggeringGeofencesIdsString = TextUtils.join(\", \", triggeringGeofecesIdList);\n\n Log.v(LOG_TAG, geofenceTransitionString + \": \" + triggeringGeofencesIdsString);\n return geofenceTransitionString + \": \" + triggeringGeofencesIdsString;\n }",
"@Override\n\tpublic List<JSONObject> getActions(JSONObject params) {\n\t\treturn this.selectList(\"getActions\", params);\n\t}",
"public void executeTrigger(Villager vil) {\n\t\tString s = vil.getStoredTriggers();\n\t\tif (s != null) {\n\t\t\tDatabase.storeTriggers(\"inn\", s);\n\t\t}\n\n\t\tdialog.resetDialog();\n\t}",
"public List<NacAlarm> getActiveAlarmsNow()\n\t{\n\t\tFuture<?> future = this.doGetActiveAlarmsNow();\n\n\t\treturn NacRepository.getAlarmListFromFuture(future);\n\t}",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoReplyTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"boolean hasUpdateTriggerTime();",
"public List<Invoke> getNotification() {\n return getInvoke();\n }",
"@Test\n public void shouldReturnNonEmptyTriggerEntries() throws Exception {\n //given\n when(resultMap.get(TRIGGERS_KEY + 0)).thenReturn(\"my entry value 0\");\n when(resultMap.get(TRIGGERS_KEY + 1)).thenReturn(\"my entry value 1\");\n givenNoHandleErrorMap(resultMap);\n when(resultMap2.get(TRIGGERS_KEY + 0)).thenReturn(\"my entry2 value 0\");\n when(resultMap2.get(TRIGGERS_KEY + 1)).thenReturn(\"my entry2 value 1\");\n when(resultMap2.get(TRIGGERS_KEY + 2)).thenReturn(\"my entry2 value 2\");\n givenNoHandleErrorMap(resultMap2);\n //when\n List<ITriggerEntry> triggerEntries = triggersDelegator.getTriggerEntries();\n //then\n assertThat(triggerEntries.size(), is(5));\n assertThat(triggerEntries.get(1).getOrder(), is(1));\n assertThat(triggerEntries.get(4).getOrder(), is(2));\n }",
"public UpdateUsersOutput associateTriggerWithUser(UsersEntity users,CreateTriggerInput trigger);",
"public List<DBObject> WhichWatch();",
"private void processCreateTrigger() throws HsqlException {\n\n Table t;\n boolean isForEach;\n boolean isNowait;\n int queueSize;\n String triggerName;\n boolean isQuoted;\n String sWhen;\n String sOper;\n String tableName;\n String token;\n String className;\n TriggerDef td;\n Trigger o;\n\n triggerName = tokenizer.getName();\n\n String schemaname = tokenizer.getLongNameFirst();\n\n database.schemaManager.checkTriggerExists(triggerName,\n session.getSchemaNameForWrite(schemaname), false);\n\n isQuoted = tokenizer.wasQuotedIdentifier();\n isForEach = false;\n isNowait = false;\n queueSize = TriggerDef.getDefaultQueueSize();\n sWhen = tokenizer.getSimpleToken();\n sOper = tokenizer.getSimpleToken();\n\n tokenizer.getThis(Token.T_ON);\n\n tableName = tokenizer.getName();\n\n if (schemaname == null) {\n schemaname =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n } else if (!schemaname.equals(\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst()))) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n\n t = database.schemaManager.getUserTable(session, tableName,\n schemaname);\n\n if (t.isView()) {\n throw Trace.error(Trace.NOT_A_TABLE);\n }\n\n session.setScripting(true);\n\n // \"FOR EACH ROW\" or \"CALL\"\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_FOR)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_EACH)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_ROW)) {\n isForEach = true;\n\n // should be 'NOWAIT' or 'QUEUE' or 'CALL'\n token = tokenizer.getSimpleToken();\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n }\n\n if (token.equals(Token.T_NOWAIT)) {\n isNowait = true;\n\n // should be 'CALL' or 'QUEUE'\n token = tokenizer.getSimpleToken();\n }\n\n if (token.equals(Token.T_QUEUE)) {\n queueSize = tokenizer.getInt();\n\n // should be 'CALL'\n token = tokenizer.getSimpleToken();\n }\n\n if (!token.equals(Token.T_CALL)) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n\n className = tokenizer.getSimpleName();\n\n if (!tokenizer.wasQuotedIdentifier()) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, className);\n }\n\n HsqlName name = database.nameManager.newHsqlName(triggerName,\n isQuoted);\n\n td = new TriggerDef(name, sWhen, sOper, isForEach, t, className,\n isNowait, queueSize, database.classLoader);\n\n t.addTrigger(td);\n\n if (td.isValid()) {\n try {\n\n // start the trigger thread\n td.start();\n } catch (Exception e) {\n throw Trace.error(Trace.UNKNOWN_FUNCTION, e.toString());\n }\n }\n\n database.schemaManager.registerTriggerName(triggerName, t.getName());\n\n// --\n }",
"public Alerts getAlerts() {\n return _alerts;\n }",
"public LiveData<List<NacAlarm>> getActiveAlarms()\n\t{\n\t\treturn this.getAlarmDao().getActiveAlarms();\n\t}",
"public BusinessConfig findBusiness(Connection conn, String trigger, String wechatId, QueueType queueType)\r\n/* 19: */ throws SQLException\r\n/* 20: */ {\r\n/* 21: 29 */ return this.dao.findBusiness(conn, trigger, wechatId, queueType);\r\n/* 22: */ }"
] |
[
"0.71706396",
"0.6991455",
"0.6917351",
"0.6761288",
"0.665414",
"0.6367226",
"0.63599354",
"0.6123053",
"0.5994576",
"0.59560907",
"0.59292597",
"0.5911691",
"0.55826235",
"0.55648404",
"0.5553865",
"0.55321944",
"0.5503092",
"0.5488091",
"0.54381496",
"0.5384357",
"0.53401",
"0.5332777",
"0.5283256",
"0.5244447",
"0.5152993",
"0.5121533",
"0.5080317",
"0.50615025",
"0.5056048",
"0.4966066",
"0.49565625",
"0.4843753",
"0.48396346",
"0.4832818",
"0.48296046",
"0.4779238",
"0.47393483",
"0.4720008",
"0.471493",
"0.47045824",
"0.46763155",
"0.46675995",
"0.4648853",
"0.4625378",
"0.46253526",
"0.46129367",
"0.45565525",
"0.4531539",
"0.45278466",
"0.4526838",
"0.45203236",
"0.4517159",
"0.4504521",
"0.4500439",
"0.44848147",
"0.44715324",
"0.44445837",
"0.4404458",
"0.43921074",
"0.43864295",
"0.43668362",
"0.43538144",
"0.43457395",
"0.43268946",
"0.4325731",
"0.42970726",
"0.4288706",
"0.4283425",
"0.4274688",
"0.42731676",
"0.42706198",
"0.42656618",
"0.42620724",
"0.4252538",
"0.4230028",
"0.4218527",
"0.42153245",
"0.42131156",
"0.42102724",
"0.42057848",
"0.4192779",
"0.417729",
"0.41667616",
"0.4164552",
"0.41608685",
"0.41580173",
"0.4154086",
"0.41309193",
"0.4128501",
"0.4116198",
"0.41158715",
"0.40887657",
"0.4084229",
"0.4081621",
"0.40805155",
"0.40760833",
"0.40677965",
"0.4064713",
"0.4062473",
"0.40566075"
] |
0.6285926
|
7
|
Retrieves information regarding the specified triggers or all existing triggers currently active.
|
public ShowTriggersResponse showTriggers(List<String> triggerIds, Map<String, String> options) throws GPUdbException {
ShowTriggersRequest actualRequest_ = new ShowTriggersRequest(triggerIds, options);
ShowTriggersResponse actualResponse_ = new ShowTriggersResponse();
submitRequest("/show/triggers", actualRequest_, actualResponse_, false);
return actualResponse_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<Trigger> getActiveTriggers() {\n return activeTriggers;\n }",
"public List<Trigger> getTriggers();",
"public abstract Map<String, Trigger> getTriggers();",
"ETriggers getTriggers();",
"Collection<ITrigger> getTriggers();",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/triggers\")\n @Description(\"Returns all triggers for the given alert ID.\")\n public List<TriggerDto> getAllTriggers(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n PrincipalUser owner = validateAndGetOwner(req, null);\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert != null) {\n validateResourceAuthorization(req, alert.getOwner(), owner);\n return TriggerDto.transformToDto(alert.getTriggers());\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"public List<CronTrigger> getTriggers() {\n return triggers;\n }",
"public ShowTriggersResponse showTriggers(ShowTriggersRequest request) throws GPUdbException {\n ShowTriggersResponse actualResponse_ = new ShowTriggersResponse();\n submitRequest(\"/show/triggers\", request, actualResponse_, false);\n return actualResponse_;\n }",
"Set getTriggers();",
"@Override\n public GetRepositoryTriggersResult getRepositoryTriggers(GetRepositoryTriggersRequest request) {\n request = beforeClientExecution(request);\n return executeGetRepositoryTriggers(request);\n }",
"@Transactional\n @GetMapping\n public ResponseEntity<CollectionModel<EntityModel<EventTriggerDto>>> getEventTriggers() {\n return new ResponseEntity<>(linkAssembler.toModel(service.getEventTriggers(), EventTriggerDto.class), HttpStatus.OK);\n }",
"public List<Trigger> getActiveTriggers(String containedText, String triggerWhen) {\n return activeTriggers.stream().filter(trigger -> trigger.getWatch().equals(containedText) && trigger.getWhen().equals(triggerWhen)).collect(Collectors.toList());\n }",
"ITrigger getTrigger(String sTriggerName);",
"public int[] activateTrigger(int triggerId) {\n\n\t\tint[] triggerResults = {0,0,0,0,0,0,0,0,0,0};\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tMap<String, String> hm = db.selectTrigger(triggerId);\n\t\t\t\t\n\t\t\tint type = 0;\n\t\t\tint toTriggerId = 0;\t\n\t\t\t\t\t\n\t\t\ttype = Integer.parseInt(hm.get(\"type\"));\n\t\t\ttoTriggerId = Integer.parseInt(hm.get(\"to_trigger_id\"));\n\t\t\t\n\t\t\tswitch (type) {\n\t\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_ANIM:\t\t\t// an animation is launched\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[1] = toTriggerId;\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_ACTION:\t// OR a change on items (combination, action, take item on screen...)\n\n\t\t\t\t\ttriggerResults[5] = activateModifier(toTriggerId);\n\t\t\t\t break;\n\n\t\t\t\tcase DB_TRIGGER_TYPE_DOLL:\t// OR move/hide doll\t\n\t\t\t\t\t\n\t\t\t\t\tMap<String, String> hmDoll = db.selectDollTrigger(toTriggerId);\n\t\t\t\t\tif (hmDoll.get(\"to_x\") != null)\t\t\t\ttriggerResults[2] = Integer.parseInt(hmDoll.get(\"to_x\"));\n\t\t\t\t\tif (hmDoll.get(\"doll_is_hidden\") != null)\ttriggerResults[3] = Integer.parseInt(hmDoll.get(\"doll_is_hidden\"));\n\t\t\t\t\tif (hmDoll.get(\"y_velocity\") != null)\t\ttriggerResults[6] = Integer.parseInt(hmDoll.get(\"y_velocity\"));\n\t\t\t\t\t\n\t\t\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 2 \" + hmDoll.get(\"to_x\"));\n\t\t\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 3 \" + hmDoll.get(\"doll_is_hidden\"));\n\t\t\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 6 \" + hmDoll.get(\"y_velocity\"));\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_TEXT:\t// show a bubble\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[4] = toTriggerId;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_SV_ITEM:\t// hide/show item\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[7] = toTriggerId;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase DB_TRIGGER_TYPE_SV_ANIM:\t// hide/show anim\n\t\t\t\t\t\n\t\t\t\t\ttriggerResults[8] = toTriggerId;\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 0 \" + hm.get(\"next_trigger_id\"));\n\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 5 \" + triggerResults[5]);\n\t\t\tif (LOG_ON) Log.d(\"Clementime\", className + \"/activateTrigger(): Trigger results 1, 4, 7 & 8: \" + toTriggerId);\n\t\t\t\n\t\t\tif (hm.get(\"next_trigger_id\") != null)\ttriggerResults[0] = Integer.parseInt(hm.get(\"next_trigger_id\"));\n\t\t\tif (hm.get(\"simultaneous_trigger_id\") != null)\ttriggerResults[9] = Integer.parseInt(hm.get(\"simultaneous_trigger_id\"));\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn triggerResults;\n\t}",
"public String list() throws Exception {\n\t\tString[] groupNames = scheduler.getTriggerGroupNames();\n\t\t\n\t\tif (groupNames != null) {\n\t\t\ttriggerMap = new HashMap(groupNames.length);\n\t\t\t\n\t\t\tfor (int i = 0; i < groupNames.length; i++) {\n\t\t\t\tString[] names = scheduler.getTriggerNames(groupNames[i]);\n\t\t\t\t\n\t\t\t\tif (names != null) {\n\t\t\t\t\tMap nameMap = new HashMap(names.length);\n\t\t\t\t\t\n\t\t\t\t\tfor (int j = 0; j < names.length; j++) {\n\t\t\t\t\t\tTrigger trigger = scheduler.getTrigger(names[j], groupNames[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnameMap.put(names[j], trigger);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttriggerMap.put(groupNames[i], nameMap);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\ttriggerMap = new HashMap(0);\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}",
"Collection<ITrigger> getTriggers(String sFolderName);",
"public List<TaskGenerateTrigger> loadTaskTriggers() {\n\t\treturn null;\r\n\t}",
"public Trigger getTrigger() {\n \t\treturn trigger;\n \t}",
"public TriggerAccess getTrigger () {\n return this.trigger;\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/triggers/{triggerId}\")\n @Description(\"Returns a trigger by its ID.\")\n public TriggerDto getTriggerById(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId,\n @PathParam(\"triggerId\") BigInteger triggerId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (triggerId == null || triggerId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Trigger Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n PrincipalUser owner = validateAndGetOwner(req, null);\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert != null) {\n validateResourceAuthorization(req, alert.getOwner(), owner);\n for (Trigger trigger : alert.getTriggers()) {\n if (trigger.getId().equals(triggerId)) {\n return TriggerDto.transformToDto(trigger);\n }\n }\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"@Override\n @Transactional(readOnly = true)\n public Page<Trigger> findAll(Pageable pageable) {\n log.debug(\"Request to get all Triggers\");\n return triggerRepository.findAll(pageable);\n }",
"public List<Gadget> getGadgetsToTrigger() {\n return gadgetsToTrigger;\n }",
"TriggeringStatement getTriggeringStatement();",
"private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}",
"boolean getUserChooseTrigger();",
"@Transactional\n @GetMapping(\"/{name}\")\n public ResponseEntity<EntityModel<EventTriggerDto>> getEventTrigger(@PathVariable String name) {\n return new ResponseEntity<>(linkAssembler.toModel(service.getEventTrigger(name), EventTriggerDto.class), HttpStatus.OK);\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/notifications/{notificationId}/triggers\")\n @Description(\"Returns all the triggers for the given notification ID.\")\n public List<TriggerDto> getTriggersByNotificationId(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId,\n @PathParam(\"notificationId\") BigInteger notificationId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (notificationId == null || notificationId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Notification Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n PrincipalUser owner = validateAndGetOwner(req, null);\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert != null) {\n validateResourceAuthorization(req, alert.getOwner(), owner);\n for (Notification notification : alert.getNotifications()) {\n if (notification.getId().equals(notificationId)) {\n return TriggerDto.transformToDto(notification.getTriggers());\n }\n }\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"public interface TriggerHandler {\n\n String handleTrigger(String stateJson, Collection<Subscription> subscriptions, String cfgJson);\n\n String getTriggerType();\n\n}",
"public static boolean getTrigger() {\n\t\treturn true;\r\n\t}",
"public TriggerInstanceElements getTriggerInstanceAccess() {\n\t\treturn pTriggerInstance;\n\t}",
"boolean containsTrigger(String sTriggerName);",
"protected TriggerFactory getTriggerFactory() {\n\t\treturn this.triggerFactory;\n\t}",
"TriggerPositionType getTriggerPositionType();",
"public abstract void setTriggers(Map<String, Trigger> triggers);",
"public final EObject ruleETriggers() throws RecognitionException {\n EObject current = null;\n\n EObject lv_triggers_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2093:2: ( ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* ) )\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n {\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n // InternalRMParser.g:2095:3: () ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n {\n // InternalRMParser.g:2095:3: ()\n // InternalRMParser.g:2096:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getETriggersAccess().getETriggersAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:2102:3: ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n loop18:\n do {\n int alt18=2;\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0==RULE_QUALIFIED_NAME) ) {\n alt18=1;\n }\n\n\n switch (alt18) {\n \tcase 1 :\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t {\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t // InternalRMParser.g:2104:5: lv_triggers_1_0= ruleETriggerDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggersAccess().getTriggersETriggerDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_16);\n \t lv_triggers_1_0=ruleETriggerDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggersRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"triggers\",\n \t \t\t\t\t\t\tlv_triggers_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop18;\n }\n } while (true);\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 }",
"@RequestMapping(value = FETCH_TRIGGERS_BY_JOB_KEY_AND_CURRENT_USER_GROUP, method = GET)\n @ResponseBody\n @ResponseStatus(ACCEPTED)\n public ResponseEntity<String> fetchTriggersByJobKeyNameAndJobGroupName(@RequestParam(\"jobKey\") final String jobKeyName, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {\n return quartzService.fetchTriggersByJobKeyNameAndJobGroupName(jobKeyName, getCookie(httpServletRequest, X_AUTH_TOKEN));\n }",
"public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"final public String[] getPartialTriggers()\n {\n return (String[])getProperty(PARTIAL_TRIGGERS_KEY);\n }",
"boolean hasTriggerFulfillment();",
"protected Trigger getContentAssistTrigger() {\n IBindingService service = (IBindingService) PlatformUI.getWorkbench()\n .getService(IBindingService.class);\n Trigger trigger = null;\n TriggerSequence[] sequences = service\n .getActiveBindingsFor(ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND);\n if (sequences.length > 0) {\n Trigger[] triggers = sequences[0].getTriggers();\n if (triggers.length > 0) {\n trigger = triggers[0];\n }\n }\n return trigger;\n }",
"public static ArrayList<TriggerElement> getTriggers (JSONArray jsonArray){\n ArrayList<TriggerElement> triggerElements = new ArrayList<TriggerElement>();\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject o = jsonArray.getJSONObject(i);\n JSONArray conditionArrayJson = o.getJSONArray(Utility.Conditions);\n JSONObject then = o.getJSONObject(Utility.Then);\n String type = then.getString(Utility.Type);\n\n TriggerElement te;\n\n if (type.matches(TriggerElement.COMMAND)) {\n if (then.has(Utility.Argument)) {\n te = new TriggerElement(then.getString(Utility.DeviceName), then.getString(Utility.ServiceName),\n then.getString(Utility.Command), then.getString(Utility.Argument), o.getInt(Utility.ID));\n }\n else {\n te = new TriggerElement(then.getString(Utility.DeviceName), then.getString(Utility.ServiceName),\n then.getString(Utility.Command), o.getInt(Utility.ID));\n }\n }\n\n else {\n te = new TriggerElement(o.getInt(Utility.ID), type);\n }\n\n for (int j = 0; j < conditionArrayJson.length(); j++) {\n JSONObject cJson = conditionArrayJson.getJSONObject(j);\n te.addCondition(new TriggerCondition(cJson.getString(Utility.DeviceName), cJson.getString(Utility.ServiceName),\n cJson.getString(Utility.Condition), cJson.getString(Utility.Value)));\n }\n\n triggerElements.add(te);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n return triggerElements;\n }",
"public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}",
"boolean isTriggerPersistent(String sTriggerName);",
"@Override\n\tprotected boolean on_trigger_activated(String trigger_name) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Trigger [id=\" + id + \", name=\" + name + \", schedulerType=\" + schedulerType + \", schedularAttrs=\"\r\n\t\t\t\t+ schedularAttributes + \", schedulerKey=\" + schedulerKey + \"]\";\r\n\t}",
"public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}",
"@Transactional\n @GetMapping(\"/{name}/quantum-applications\")\n public ResponseEntity<CollectionModel<EntityModel<QuantumApplicationDto>>> getEventTriggerApplications(@PathVariable String name) {\n return new ResponseEntity<>(quantumApplicationLinkAssembler.toModel(service.getEventTriggerApplications(name), QuantumApplicationDto.class), HttpStatus.OK);\n }",
"public String getEventTrigger(Long jenkinsID) {\n return getTable().get(jenkinsID);\n }",
"@Override\n @Transactional(readOnly = true)\n public Trigger findOne(Long id) {\n log.debug(\"Request to get Trigger : {}\", id);\n return triggerRepository.findOne(id);\n }",
"public static JSONArray getApexTriggerList(JSONObject loginObject, String startdate, String enddate) {\n\t\tJSONArray jsonArray = null;\n\t\tString ObjectRestURL = ToolingQueryList.getApexTriggers(startdate, enddate);\n\n\t\tHttpClient httpClient = HttpClientBuilder.create().build();\n\n\t\tString instanceURL = loginObject.getString(\"instance_url\");\n\t\tString AccessToken = loginObject.getString(\"access_token\");\n\n\t\tHeader oauthHeader = new BasicHeader(\"Authorization\", \"OAuth \" + AccessToken);\n\n\t\tString uri = instanceURL + RestResourceURL.getToolingQueryURL(ObjectRestURL);\n\n\t\tHttpResponse response = null;\n\t\tHttpGet httpget = new HttpGet(uri);\n\t\thttpget.addHeader(oauthHeader);\n\t\ttry {\n\t\t\tresponse = httpClient.execute(httpget);\n\t\t\tif (response.getStatusLine().getStatusCode() == 200) {\n\t\t\t\tString Result = EntityUtils.toString(response.getEntity());\n\t\t\t\tJSONObject jsonObject = new JSONObject(Result);\n\n\t\t\t\tjsonArray = jsonObject.getJSONArray(\"records\");\n\t\t\t\t/*\n\t\t\t\t * for(int i=0;i<jsonArray.length();i++) {\n\t\t\t\t * metadtalist.add(jsonArray.getJSONObject(i).getString(\"Id\")); }\n\t\t\t\t */\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn jsonArray;\n\n\t}",
"@Override\n public TestRepositoryTriggersResult testRepositoryTriggers(TestRepositoryTriggersRequest request) {\n request = beforeClientExecution(request);\n return executeTestRepositoryTriggers(request);\n }",
"@DELETE\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/triggers/{triggerId}\")\n @Description(\"Deletes a trigger having the given ID and removes any associations with the alert or notifications.\")\n public Response deleteTriggersById(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId,\n @PathParam(\"triggerId\") BigInteger triggerId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (triggerId == null || triggerId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Trigger Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert == null) {\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }\n validateResourceAuthorization(req, alert.getOwner(), getRemoteUser(req));\n\n List<Trigger> listTrigger = new ArrayList<Trigger>(alert.getTriggers());\n Iterator<Trigger> itTrigger = listTrigger.iterator();\n\n while (itTrigger.hasNext()) {\n Trigger trigger = itTrigger.next();\n\n if (triggerId.equals(trigger.getId())) {\n itTrigger.remove();\n alert.setTriggers(listTrigger);\n alertService.updateAlert(alert);\n return Response.status(Status.OK).build();\n }\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }",
"public abstract void handleMatching(EventBean[] triggerEvents, EventBean[] matchingEvents);",
"public void getAlerts(TableQueryCallback<Alert> callback) {\n mAlertTable.where().field(\"active\").eq(true).execute(callback);\n }",
"public interface TriggerService {\n\n /**\n * 获取所有的问题触发器ids\n * @return\n * @throws ServiceException\n */\n List<String> getProblemTriggerIds() throws ServiceException;\n\n <T> List<T> listTrigger(TriggerGetRequest triggerGetRequest, Class<T> clazz);\n\n /**\n * 根据 request 获取触发器数量\n * @return\n * @throws ServiceException\n */\n int countTrigger(TriggerGetRequest request) throws ServiceException;\n/*\nzabbix 方法\n */\n /**\n *\n * @return\n * @throws ServiceException\n */\n List<DashboardProblemVO> listBriefProblems() throws ServiceException;\n\n /**\n * 根据 triggerIds 查询对应的 triggerDTOS selectHost\n * @param triggerIds\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> getTriggersByTriggerIds(List<String> triggerIds ) throws ServiceException;\n /**\n * 根据itemIds获取监控中的 trggierDTO list\n * @param itemIds\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> getTriggersByItemIds(List<String> itemIds) throws ServiceException;\n\n /**\n * 列出所有触发器 排除依赖 触发器 BriefTriggerDTOS\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> listTriggersSkipDependent() throws ServiceException;\n\n /**\n * 列出问题触发器 BriefTriggerDTOS\n * @return\n * @throws ServiceException\n */\n List<BriefTriggerDTO> listProblemTriggers() throws ServiceException;\n\n /**\n * 问题管理 问题列表 ProblemListVO\n * @return\n * @throws ServiceException\n */\n List<ProblemListVO> listProblemListVO() throws ServiceException;\n\n /**\n * 问题管理 问题详情 基础静态信息 ProblemDetailVO\n * @return\n * @throws ServiceException\n */\n ProblemDetailVO getProblemDetailVOByTriggerId(String triggerId) throws ServiceException;\n\n}",
"private List<String> getGeofenceTransitionDetails(List<Geofence> triggeringGeofences) {\n List<String> geofenceRequestIds = new ArrayList<>();\n // Return the request ids of the triggered geofences\n for (Geofence geofence : triggeringGeofences) {\n geofenceRequestIds.add(geofence.getRequestId());\n }\n return geofenceRequestIds;\n }",
"List<AgentReference> getCurrentAgents();",
"public boolean isTriggeringToSource() {\n return getFlow().getSignificanceToSource() == Flow.Significance.Triggers;\n }",
"@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }",
"public boolean getTrigger(){\n \treturn !trigger.get();\n }",
"private String getGeofenceTrasitionDetails(int geoFenceTransition, List<Geofence> triggeringGeofences) {\n ArrayList<String> triggeringGeofencesList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesList.add(geofence.getRequestId());\n }\n\n String status = null;\n if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER)\n status = \"Entering Geofence\";\n else if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT)\n status = \"Exiting Geofence\";\n return status + TextUtils.join(\", \", triggeringGeofencesList);\n }",
"com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder();",
"@GET(\"trigger\")\n Call<Post> getPosts(@Query(\"shortid\") String shortid,\n @Query(\"pin\") String pin,\n @Query(\"app\") String app\n );",
"public void trigger() {\n\n\t\tfor (Gadget gadget : getGadgetsToTrigger()) {\n\n\t\t\tgadget.trigger();\n\n\t\t}\n\n\t}",
"public void setTriggers(List<CronTrigger> triggers) {\n this.triggers = triggers;\n\n CronExpression cronExpression;\n List<CronTrigger> schedulableTriggers = new ArrayList<CronTrigger>();\n\n for (CronTrigger cronTrigger : triggers) {\n try {\n cronExpression = new CronExpression(cronTrigger.getCronExpression());\n if (cronExpression.getNextValidTimeAfter(new Date()) == null) {\n // The cron expression is valid, but will never trigger.\n LOG.info(cronTrigger.getCronExpression() + \" not valid cronexpression. The job will not be scheduled.\");\n continue;\n }\n }\n catch (ParseException e) {\n LOG.info(cronTrigger.getCronExpression() + \" not valid cronexpression. The job will not be scheduled.\");\n continue;\n }\n schedulableTriggers.add(cronTrigger);\n }\n super.setTriggers(schedulableTriggers.toArray(new CronTrigger[0]));\n }",
"TriggerType createTriggerType();",
"public abstract void onTrigger();",
"private String getGeofenceTrasitionDetails(int geoFenceTransition, List<Geofence> triggeringGeofences) {\n ArrayList<String> triggeringGeofencesList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesList.add(geofence.getRequestId());\n }\n\n String status = null;\n if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER)\n status = \"Entering \";\n else if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT)\n status = \"Exiting \";\n return status + TextUtils.join(\", \", triggeringGeofencesList);\n }",
"public final EObject ruleTrigger() throws RecognitionException {\n EObject current = null;\n int ruleTrigger_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_6=null;\n Token otherlv_8=null;\n Token otherlv_9=null;\n Token otherlv_11=null;\n EObject lv_triggerRules_2_0 = null;\n\n EObject lv_triggerRules_4_0 = null;\n\n EObject lv_with_7_0 = null;\n\n EObject lv_when_10_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1350:28: ( (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1352:2: otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n {\n otherlv_0=(Token)match(input,KEYWORD_82,FOLLOW_KEYWORD_82_in_ruleTrigger2463); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getTriggerAccess().getTriggerKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2475); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1361:1: ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1363:3: lv_triggerRules_2_0= ruleQualifiedRuleReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2495);\n lv_triggerRules_2_0=ruleQualifiedRuleReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"triggerRules\",\n \t\tlv_triggerRules_2_0, \n \t\t\"QualifiedRuleReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1379:2: (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )*\n loop35:\n do {\n int alt35=2;\n int LA35_0 = input.LA(1);\n\n if ( (LA35_0==KEYWORD_8) ) {\n alt35=1;\n }\n\n\n switch (alt35) {\n \tcase 1 :\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1380:2: otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t {\n \t otherlv_3=(Token)match(input,KEYWORD_8,FOLLOW_KEYWORD_8_in_ruleTrigger2509); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_3, grammarAccess.getTriggerAccess().getCommaKeyword_3_0());\n \t \n \t }\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1384:1: ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1386:3: lv_triggerRules_4_0= ruleQualifiedRuleReference\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_3_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2529);\n \t lv_triggerRules_4_0=ruleQualifiedRuleReference();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"triggerRules\",\n \t \t\tlv_triggerRules_4_0, \n \t \t\t\"QualifiedRuleReference\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop35;\n }\n } while (true);\n\n otherlv_5=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2544); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_5, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_4());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1407:1: (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )?\n int alt36=2;\n int LA36_0 = input.LA(1);\n\n if ( (LA36_0==KEYWORD_58) ) {\n alt36=1;\n }\n switch (alt36) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1408:2: otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) )\n {\n otherlv_6=(Token)match(input,KEYWORD_58,FOLLOW_KEYWORD_58_in_ruleTrigger2557); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getTriggerAccess().getWithKeyword_5_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1412:1: ( (lv_with_7_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1414:3: lv_with_7_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWithBlockParserRuleCall_5_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleTrigger2577);\n lv_with_7_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"with\",\n \t\tlv_with_7_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1430:4: (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( (LA37_0==KEYWORD_57) ) {\n alt37=1;\n }\n switch (alt37) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1431:2: otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5\n {\n otherlv_8=(Token)match(input,KEYWORD_57,FOLLOW_KEYWORD_57_in_ruleTrigger2593); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_8, grammarAccess.getTriggerAccess().getWhenKeyword_6_0());\n \n }\n otherlv_9=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2605); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_9, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_6_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1440:1: ( (lv_when_10_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1442:3: lv_when_10_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWhenExpressionParserRuleCall_6_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleTrigger2625);\n lv_when_10_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"when\",\n \t\tlv_when_10_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_11=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2638); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_11, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_6_3());\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 20, ruleTrigger_StartIndex); }\n }\n return current;\n }",
"@Override\r\n\tpublic List<Map<String, Object>> agentActive() {\n\t\treturn agentMapper.agentActive();\r\n\t}",
"public static List<Resource> getResourceTrigger(Element element) {\n\t\tList<Resource> triggers = new ArrayList<Resource>();\n\t\tif(element instanceof Resource_Object) {\n\t\t\tResource_Object res = (Resource_Object)element;\n\t\t\ttriggers.add(res.getValue());\n\t\t} else if(element instanceof State_Object) {\n\t\t\t\n\t\t}\n\t\treturn null;//TODO function not used actually\n\t}",
"public QrtzSimpleTriggers() {\n this(DSL.name(\"qrtz_simple_triggers\"), null);\n }",
"boolean isSimpleTrigger();",
"public boolean trigger (String name) {\n final TriggerReference trigger = module.getTrigger(name);\n if (trigger == null) {\n Logger.missing(\"TriggerReference\", name);\n return false;\n } else {\n return trigger.get();\n }\n }",
"com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment();",
"int getUpdateTriggerTime();",
"protected void loadTrigger() {\n this.keyTrigger = getContentAssistTrigger();\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public abstract boolean isTrigger();",
"@Property(\"triggerAction\")\n String getTriggerAction();",
"public void setTriggeringToSource( boolean triggers ) {\n if ( triggers ) {\n setSignificanceToSource( Flow.Significance.Triggers );\n } else {\n setSignificanceToSource( Flow.Significance.None );\n }\n }",
"public JWSSignerOption getTriggeringOption() {\n\t\treturn option;\n\t}",
"public boolean hasUpdateTriggerTime() {\n return instance.hasUpdateTriggerTime();\n }",
"@DISPID(135)\r\n\t// = 0x87. The runtime will prefer the VTID if present\r\n\t@VTID(130)\r\n\tjava.lang.String triggerType();",
"public final EObject ruleReactionTrigger() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_2=null;\r\n Token otherlv_4=null;\r\n Token otherlv_6=null;\r\n Token otherlv_7=null;\r\n Token otherlv_9=null;\r\n EObject lv_triggers_1_0 = null;\r\n\r\n EObject lv_triggers_3_0 = null;\r\n\r\n EObject lv_guardExpression_5_0 = null;\r\n\r\n EObject lv_guardExpression_8_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1537:28: ( ( () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:1: ( () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:1: ( () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:2: () ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1538:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1539:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getReactionTriggerAccess().getReactionTriggerAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:2: ( ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? ) | (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' ) )\r\n int alt29=2;\r\n int LA29_0 = input.LA(1);\r\n\r\n if ( (LA29_0==RULE_ID||(LA29_0>=39 && LA29_0<=44)||(LA29_0>=58 && LA29_0<=59)) ) {\r\n alt29=1;\r\n }\r\n else if ( (LA29_0==35) ) {\r\n alt29=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 29, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt29) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:3: ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:3: ( ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )? )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:4: ( (lv_triggers_1_0= ruleEventSpec ) ) (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )* ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )?\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1544:4: ( (lv_triggers_1_0= ruleEventSpec ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1545:1: (lv_triggers_1_0= ruleEventSpec )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1545:1: (lv_triggers_1_0= ruleEventSpec )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1546:3: lv_triggers_1_0= ruleEventSpec\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getTriggersEventSpecParserRuleCall_1_0_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleEventSpec_in_ruleReactionTrigger3338);\r\n lv_triggers_1_0=ruleEventSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t }\r\n \t\tadd(\r\n \t\t\tcurrent, \r\n \t\t\t\"triggers\",\r\n \t\tlv_triggers_1_0, \r\n \t\t\"EventSpec\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1562:2: (otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) ) )*\r\n loop27:\r\n do {\r\n int alt27=2;\r\n int LA27_0 = input.LA(1);\r\n\r\n if ( (LA27_0==28) ) {\r\n alt27=1;\r\n }\r\n\r\n\r\n switch (alt27) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1562:4: otherlv_2= ',' ( (lv_triggers_3_0= ruleEventSpec ) )\r\n \t {\r\n \t otherlv_2=(Token)match(input,28,FOLLOW_28_in_ruleReactionTrigger3351); if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \tnewLeafNode(otherlv_2, grammarAccess.getReactionTriggerAccess().getCommaKeyword_1_0_1_0());\r\n \t \r\n \t }\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1566:1: ( (lv_triggers_3_0= ruleEventSpec ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1567:1: (lv_triggers_3_0= ruleEventSpec )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1567:1: (lv_triggers_3_0= ruleEventSpec )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1568:3: lv_triggers_3_0= ruleEventSpec\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getTriggersEventSpecParserRuleCall_1_0_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleEventSpec_in_ruleReactionTrigger3372);\r\n \t lv_triggers_3_0=ruleEventSpec();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"triggers\",\r\n \t \t\tlv_triggers_3_0, \r\n \t \t\t\"EventSpec\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop27;\r\n }\r\n } while (true);\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:4: ( ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']' )?\r\n int alt28=2;\r\n int LA28_0 = input.LA(1);\r\n\r\n if ( (LA28_0==35) && (synpred1_InternalSText())) {\r\n alt28=1;\r\n }\r\n switch (alt28) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:5: ( ( '[' )=>otherlv_4= '[' ) ( (lv_guardExpression_5_0= ruleExpression ) ) otherlv_6= ']'\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:5: ( ( '[' )=>otherlv_4= '[' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1584:6: ( '[' )=>otherlv_4= '['\r\n {\r\n otherlv_4=(Token)match(input,35,FOLLOW_35_in_ruleReactionTrigger3395); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_4, grammarAccess.getReactionTriggerAccess().getLeftSquareBracketKeyword_1_0_2_0());\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1589:2: ( (lv_guardExpression_5_0= ruleExpression ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1590:1: (lv_guardExpression_5_0= ruleExpression )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1590:1: (lv_guardExpression_5_0= ruleExpression )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1591:3: lv_guardExpression_5_0= ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getGuardExpressionExpressionParserRuleCall_1_0_2_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleExpression_in_ruleReactionTrigger3417);\r\n lv_guardExpression_5_0=ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"guardExpression\",\r\n \t\tlv_guardExpression_5_0, \r\n \t\t\"Expression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_6=(Token)match(input,36,FOLLOW_36_in_ruleReactionTrigger3429); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_6, grammarAccess.getReactionTriggerAccess().getRightSquareBracketKeyword_1_0_2_2());\r\n \r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1612:6: (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1612:6: (otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1612:8: otherlv_7= '[' ( (lv_guardExpression_8_0= ruleExpression ) ) otherlv_9= ']'\r\n {\r\n otherlv_7=(Token)match(input,35,FOLLOW_35_in_ruleReactionTrigger3451); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_7, grammarAccess.getReactionTriggerAccess().getLeftSquareBracketKeyword_1_1_0());\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1616:1: ( (lv_guardExpression_8_0= ruleExpression ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1617:1: (lv_guardExpression_8_0= ruleExpression )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1617:1: (lv_guardExpression_8_0= ruleExpression )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:1618:3: lv_guardExpression_8_0= ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getReactionTriggerAccess().getGuardExpressionExpressionParserRuleCall_1_1_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleExpression_in_ruleReactionTrigger3472);\r\n lv_guardExpression_8_0=ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getReactionTriggerRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"guardExpression\",\r\n \t\tlv_guardExpression_8_0, \r\n \t\t\"Expression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_9=(Token)match(input,36,FOLLOW_36_in_ruleReactionTrigger3484); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_9, grammarAccess.getReactionTriggerAccess().getRightSquareBracketKeyword_1_1_2());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"private String getGeofenceTransitionDetails(\n Context context,\n int geofenceTransition,\n List<Geofence> triggeringGeofences){\n\n String geofenceTransitionString = getTransitionString(geofenceTransition);\n\n ArrayList triggeringGeofecesIdList = new ArrayList();\n\n for (Geofence geofence : triggeringGeofences){\n triggeringGeofecesIdList.add(geofence.getRequestId());\n }\n\n String triggeringGeofencesIdsString = TextUtils.join(\", \", triggeringGeofecesIdList);\n\n Log.v(LOG_TAG, geofenceTransitionString + \": \" + triggeringGeofencesIdsString);\n return geofenceTransitionString + \": \" + triggeringGeofencesIdsString;\n }",
"@Override\n\tpublic List<JSONObject> getActions(JSONObject params) {\n\t\treturn this.selectList(\"getActions\", params);\n\t}",
"public void executeTrigger(Villager vil) {\n\t\tString s = vil.getStoredTriggers();\n\t\tif (s != null) {\n\t\t\tDatabase.storeTriggers(\"inn\", s);\n\t\t}\n\n\t\tdialog.resetDialog();\n\t}",
"public List<NacAlarm> getActiveAlarmsNow()\n\t{\n\t\tFuture<?> future = this.doGetActiveAlarmsNow();\n\n\t\treturn NacRepository.getAlarmListFromFuture(future);\n\t}",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoReplyTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"boolean hasUpdateTriggerTime();",
"public List<Invoke> getNotification() {\n return getInvoke();\n }",
"@Test\n public void shouldReturnNonEmptyTriggerEntries() throws Exception {\n //given\n when(resultMap.get(TRIGGERS_KEY + 0)).thenReturn(\"my entry value 0\");\n when(resultMap.get(TRIGGERS_KEY + 1)).thenReturn(\"my entry value 1\");\n givenNoHandleErrorMap(resultMap);\n when(resultMap2.get(TRIGGERS_KEY + 0)).thenReturn(\"my entry2 value 0\");\n when(resultMap2.get(TRIGGERS_KEY + 1)).thenReturn(\"my entry2 value 1\");\n when(resultMap2.get(TRIGGERS_KEY + 2)).thenReturn(\"my entry2 value 2\");\n givenNoHandleErrorMap(resultMap2);\n //when\n List<ITriggerEntry> triggerEntries = triggersDelegator.getTriggerEntries();\n //then\n assertThat(triggerEntries.size(), is(5));\n assertThat(triggerEntries.get(1).getOrder(), is(1));\n assertThat(triggerEntries.get(4).getOrder(), is(2));\n }",
"public UpdateUsersOutput associateTriggerWithUser(UsersEntity users,CreateTriggerInput trigger);",
"public List<DBObject> WhichWatch();",
"private void processCreateTrigger() throws HsqlException {\n\n Table t;\n boolean isForEach;\n boolean isNowait;\n int queueSize;\n String triggerName;\n boolean isQuoted;\n String sWhen;\n String sOper;\n String tableName;\n String token;\n String className;\n TriggerDef td;\n Trigger o;\n\n triggerName = tokenizer.getName();\n\n String schemaname = tokenizer.getLongNameFirst();\n\n database.schemaManager.checkTriggerExists(triggerName,\n session.getSchemaNameForWrite(schemaname), false);\n\n isQuoted = tokenizer.wasQuotedIdentifier();\n isForEach = false;\n isNowait = false;\n queueSize = TriggerDef.getDefaultQueueSize();\n sWhen = tokenizer.getSimpleToken();\n sOper = tokenizer.getSimpleToken();\n\n tokenizer.getThis(Token.T_ON);\n\n tableName = tokenizer.getName();\n\n if (schemaname == null) {\n schemaname =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n } else if (!schemaname.equals(\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst()))) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n\n t = database.schemaManager.getUserTable(session, tableName,\n schemaname);\n\n if (t.isView()) {\n throw Trace.error(Trace.NOT_A_TABLE);\n }\n\n session.setScripting(true);\n\n // \"FOR EACH ROW\" or \"CALL\"\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_FOR)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_EACH)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_ROW)) {\n isForEach = true;\n\n // should be 'NOWAIT' or 'QUEUE' or 'CALL'\n token = tokenizer.getSimpleToken();\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n }\n\n if (token.equals(Token.T_NOWAIT)) {\n isNowait = true;\n\n // should be 'CALL' or 'QUEUE'\n token = tokenizer.getSimpleToken();\n }\n\n if (token.equals(Token.T_QUEUE)) {\n queueSize = tokenizer.getInt();\n\n // should be 'CALL'\n token = tokenizer.getSimpleToken();\n }\n\n if (!token.equals(Token.T_CALL)) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n\n className = tokenizer.getSimpleName();\n\n if (!tokenizer.wasQuotedIdentifier()) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, className);\n }\n\n HsqlName name = database.nameManager.newHsqlName(triggerName,\n isQuoted);\n\n td = new TriggerDef(name, sWhen, sOper, isForEach, t, className,\n isNowait, queueSize, database.classLoader);\n\n t.addTrigger(td);\n\n if (td.isValid()) {\n try {\n\n // start the trigger thread\n td.start();\n } catch (Exception e) {\n throw Trace.error(Trace.UNKNOWN_FUNCTION, e.toString());\n }\n }\n\n database.schemaManager.registerTriggerName(triggerName, t.getName());\n\n// --\n }",
"public Alerts getAlerts() {\n return _alerts;\n }",
"public LiveData<List<NacAlarm>> getActiveAlarms()\n\t{\n\t\treturn this.getAlarmDao().getActiveAlarms();\n\t}",
"public BusinessConfig findBusiness(Connection conn, String trigger, String wechatId, QueueType queueType)\r\n/* 19: */ throws SQLException\r\n/* 20: */ {\r\n/* 21: 29 */ return this.dao.findBusiness(conn, trigger, wechatId, queueType);\r\n/* 22: */ }"
] |
[
"0.71706396",
"0.6991455",
"0.6917351",
"0.6761288",
"0.665414",
"0.6367226",
"0.63599354",
"0.6285926",
"0.6123053",
"0.5994576",
"0.59560907",
"0.5911691",
"0.55826235",
"0.55648404",
"0.5553865",
"0.55321944",
"0.5503092",
"0.5488091",
"0.54381496",
"0.5384357",
"0.53401",
"0.5332777",
"0.5283256",
"0.5244447",
"0.5152993",
"0.5121533",
"0.5080317",
"0.50615025",
"0.5056048",
"0.4966066",
"0.49565625",
"0.4843753",
"0.48396346",
"0.4832818",
"0.48296046",
"0.4779238",
"0.47393483",
"0.4720008",
"0.471493",
"0.47045824",
"0.46763155",
"0.46675995",
"0.4648853",
"0.4625378",
"0.46253526",
"0.46129367",
"0.45565525",
"0.4531539",
"0.45278466",
"0.4526838",
"0.45203236",
"0.4517159",
"0.4504521",
"0.4500439",
"0.44848147",
"0.44715324",
"0.44445837",
"0.4404458",
"0.43921074",
"0.43864295",
"0.43668362",
"0.43538144",
"0.43457395",
"0.43268946",
"0.4325731",
"0.42970726",
"0.4288706",
"0.4283425",
"0.4274688",
"0.42731676",
"0.42706198",
"0.42656618",
"0.42620724",
"0.4252538",
"0.4230028",
"0.4218527",
"0.42153245",
"0.42131156",
"0.42102724",
"0.42057848",
"0.4192779",
"0.417729",
"0.41667616",
"0.4164552",
"0.41608685",
"0.41580173",
"0.4154086",
"0.41309193",
"0.4128501",
"0.4116198",
"0.41158715",
"0.40887657",
"0.4084229",
"0.4081621",
"0.40805155",
"0.40760833",
"0.40677965",
"0.4064713",
"0.4062473",
"0.40566075"
] |
0.59292597
|
11
|
Retrieves information for the specified data type. Given a type ID, the database returns the data type schema, the label, and the semantic type along with the type ID. If the user provides any combination of label and semantic type, then the database returns the pertinent information for all data types that match the input criteria.
|
public ShowTypesResponse showTypes(ShowTypesRequest request) throws GPUdbException {
ShowTypesResponse actualResponse_ = new ShowTypesResponse();
submitRequest("/show/types", request, actualResponse_, false);
for (int i_ = 0; i_ < actualResponse_.getTypeIds().size(); i_++) {
setTypeDescriptorIfMissing(actualResponse_.getTypeIds().get(i_), actualResponse_.getLabels().get(i_), actualResponse_.getTypeSchemas().get(i_), actualResponse_.getProperties().get(i_));
}
return actualResponse_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.google.cloud.datacatalog.FieldTypeOrBuilder getTypeOrBuilder();",
"java.lang.String getDataType();",
"com.google.cloud.datacatalog.FieldType getType();",
"public static DataType get(String type)\n {\n return lookup.get(type);\n }",
"public BikeType getType(int typeId){\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);\n ResultSet rs = ps.executeQuery()){\n \n if(rs.next()){\n BikeType type = new BikeType(rs.getString(cTypeName),rs.getDouble(cRentalPrice));\n type.setTypeId(rs.getInt(cTypeId));\n return type;\n }\n\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return null;\n }",
"FieldType getFieldTypeById(String id) throws FieldTypeNotFoundException, TypeException, InterruptedException;",
"public TypeData getTypeData(MigrationType type);",
"public String getDataType() ;",
"public int getData_type_id() {\n return data_type_id;\n }",
"public String getSQLDataType(int displayType, String columnName, int fieldLength) {\n\t\treturn null;\n\t}",
"int getDataType();",
"@Override\n\tpublic Type getType(int typeID) {\n\t\treturn problemDAO.getType(typeID);\n\t}",
"public String getData_type_desc() {\n return data_type_desc;\n }",
"static DruidType getTypeFromMetaData(String type) {\n assert type != null;\n switch (type) {\n case \"LONG\":\n return LONG;\n case \"FLOAT\":\n return FLOAT;\n case \"DOUBLE\":\n return DOUBLE;\n case \"STRING\":\n return STRING;\n default:\n // Likely a sketch, or a type String from the aggregations field.\n return getTypeFromMetric(type);\n }\n }",
"public int getDataType();",
"public Class<? extends AttributeDescription> getDataType();",
"public MetadataType getType();",
"public synchronized <T> Optional<T> get(long id,Class<T> type) throws SQLException {\n IDatabaseClass annotationClass = type.getAnnotation(IDatabaseClass.class);\n checkIfIsAValidClass(annotationClass);\n\n String getQuery = \"SELECT * FROM \" + annotationClass.tableName() + \" WHERE \"+annotationClass.idName()+\" = ? LIMIT 1\";\n List<T> res = DatabaseManager.getInstance().makeQuery(getQuery, new HashMap<Integer,Object>(){{put(1,id);}},type);\n if(res.size()>0){\n return Optional.of(res.get(0));\n }else{\n return Optional.empty();\n }\n }",
"public String getDataType() \n {\n System.out.println(dataType.getValue().toString());\n return dataType.getValue().toString(); \n }",
"DType getType();",
"FieldType getFieldTypeById(byte[] id) throws FieldTypeNotFoundException, TypeException, InterruptedException;",
"GetRecordByIdType createGetRecordByIdType();",
"public java.util.List<DataEntry> findByDataTypeId(long dataTypeId);",
"public String getContactTypeByIdStatement() {\n\t\treturn \"SELECT * FROM CONTACTSTYPES WHERE ID = ?\";\n\t}",
"DatatypesType createDatatypesType();",
"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();",
"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();",
"public abstract DataTypeDescription<T> getDescription();",
"public DataType getType() {\n return type;\n }",
"io.dstore.values.IntegerValue getFieldTypeId();",
"<T> T get(String id, TypeReference<T> type);",
"public boolean findType(int typeId){ //Checks if the typeId is registered - true if it's found\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);\n ResultSet rs = ps.executeQuery()){\n \n if(rs.isBeforeFirst()){ //If the resultset has data\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n } \n return false;\n }",
"List<? extends HasListBox> getQDSDataTypeForCategory(String category);",
"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();",
"String provideType();",
"public data_types(int data_type_id, String data_type_desc) {\n this.data_type_id = data_type_id;\n this.data_type_desc = data_type_desc;\n }",
"private List<DataTypeHandler<K1>> loadDataType(String typeStr, Context context) {\n // Do not load the type twice\n if (!typeMap.containsKey(typeStr)) {\n\n typeMap.put(typeStr, new ArrayList<>());\n\n long myInterval = context.getConfiguration().getLong(typeStr + \".\" + DISCARD_INTERVAL, interval);\n\n dataTypeDiscardIntervalCache.put(typeStr, myInterval);\n\n log.info(\"Setting up type: \" + typeStr + \" with interval \" + myInterval);\n\n if (!TypeRegistry.getTypeNames().contains(typeStr)) {\n log.warn(\"Attempted to load configuration for a type that does not exist in the registry: \" + typeStr);\n } else {\n Type t = TypeRegistry.getType(typeStr);\n String fieldValidators = context.getConfiguration().get(typeStr + FieldValidator.FIELD_VALIDATOR_NAMES);\n\n if (fieldValidators != null) {\n String[] validatorClasses = StringUtils.split(fieldValidators, \",\");\n for (String validatorClass : validatorClasses) {\n try {\n Class<? extends FieldValidator> clazz = Class.forName(validatorClass).asSubclass(FieldValidator.class);\n FieldValidator validator = clazz.newInstance();\n validator.init(t, context.getConfiguration());\n validators.put(typeStr, validator);\n } catch (ClassNotFoundException e) {\n log.error(\"Error finding validator \" + validatorClass, e);\n } catch (InstantiationException | IllegalAccessException e) {\n log.error(\"Error creating validator \" + validatorClass, e);\n }\n }\n }\n\n String[] handlerClassNames = t.getDefaultDataTypeHandlers();\n\n if (handlerClassNames != null) {\n for (String handlerClassName : handlerClassNames) {\n log.info(\"Configuring handler: \" + handlerClassName);\n try {\n @SuppressWarnings(\"unchecked\")\n Class<? extends DataTypeHandler<K1>> clazz = (Class<? extends DataTypeHandler<K1>>) Class.forName(handlerClassName);\n DataTypeHandler<K1> h = clazz.getDeclaredConstructor().newInstance();\n // Create a counter initialized to zero for all handler types.\n getCounter(context, IngestOutput.ROWS_CREATED.name(), h.getClass().getSimpleName()).increment(0);\n // Trick here. Set the data.name parameter to type T, then call setup on the DataTypeHandler\n Configuration clone = new Configuration(context.getConfiguration());\n clone.set(DataTypeHelper.Properties.DATA_NAME, t.typeName());\n // Use the StandaloneReporter and StandaloneTaskAttemptContext for the Handlers. Because the StandaloneTaskAttemptContext\n // is a subclass of TaskInputOutputContext and TaskAttemptContext is not. We are using this to record the counters during\n // processing. We will need to add the counters in the StandaloneReporter to the Map.Context in the close call.\n // TaskAttemptContext newContext = new TaskAttemptContext(clone, context.getTaskAttemptID());\n StandaloneTaskAttemptContext<K1,V1,K2,V2> newContext = new StandaloneTaskAttemptContext<>(clone, context.getTaskAttemptID(),\n reporter);\n h.setup(newContext);\n typeMap.get(typeStr).add(h);\n } catch (ClassNotFoundException e) {\n log.error(\"Error finding DataTypeHandler \" + handlerClassName, e);\n } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n log.error(\"Error creating DataTypeHandler \" + handlerClassName, e);\n }\n }\n }\n }\n log.info(\"EventMapper configured with the following handlers for \" + typeStr + \": \" + typeMap.get(typeStr));\n }\n\n return typeMap.get(typeStr);\n }",
"public Data getData(HelperDataType type);",
"public <T> T getObject(String columnLabel, Class<T> type) throws SQLException\n\t{\n\t\treturn null;\n\t}",
"public GTData getDocument(String ID, Type type) throws Exception {\n Get request = new Get.Builder(INDEX_NAME, ID).build();\n\n JestResult result = client.execute(request);\n GTData data = null;\n if (type.equals(Bid.class)) {\n data = result.getSourceAsObject(Bid.class);\n } else if (type.equals(Task.class)) {\n data = result.getSourceAsObject(Task.class);\n } else if (type.equals(User.class)) {\n data = result.getSourceAsObject(User.class);\n } else if (type.equals(Photo.class)) {\n data = result.getSourceAsObject(Photo.class);\n }\n Log.i(\"checkget\",data.toString());\n return data;\n\n\n }",
"com.google.protobuf.ByteString getDataTypeBytes();",
"public Class getDataType() {\n return datatype;\n }",
"DataType getType_template();",
"public IInputType getInputTypeById(String id);",
"public static DataTypeDescriptor getBuiltInDataTypeDescriptor(int jdbcType, \r\n int length) {\r\n return getBuiltInDataTypeDescriptor(jdbcType, true, length);\r\n }",
"io.dstore.values.IntegerValueOrBuilder getFieldTypeIdOrBuilder();",
"Coding getType();",
"public String datatype() {\n\t\treturn datatype;\n\t}",
"public static String getCQLDataType(Schema.Type dataType) throws TimeSeriesException {\r\n\t\tswitch(dataType) {\r\n\t\t\tcase DOUBLE: \r\n\t\t\t\treturn \"double\";\r\n\t\t\tcase BOOLEAN: \r\n\t\t\t\treturn \"boolean\";\r\n\t\t\tcase FLOAT: \r\n\t\t\t\treturn \"float\";\r\n\t\t\tcase INT: \r\n\t\t\t\treturn \"int\";\r\n\t\t\tcase LONG: \r\n\t\t\t\treturn \"bigint\";\t\t\t\t\r\n\t\t\tcase STRING: \r\n\t\t\t\treturn \"varchar\";\r\n\t\t\tcase BYTES: \r\n\t\t\t\treturn \"blob\";\r\n\t\t\tdefault: \r\n\t\t\t\tthrow new TimeSeriesException(\"Requested data type is currently not supported \" + dataType);\r\n\t\t}\r\n\t}",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();"
] |
[
"0.5797944",
"0.57595515",
"0.5725118",
"0.5678109",
"0.5632479",
"0.5463933",
"0.5342219",
"0.52763885",
"0.5263938",
"0.52619433",
"0.52608615",
"0.52554715",
"0.52548313",
"0.5253123",
"0.52476436",
"0.5236058",
"0.52076817",
"0.5196217",
"0.51954305",
"0.51933205",
"0.5177202",
"0.51458454",
"0.5134002",
"0.5091915",
"0.50908816",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.50663567",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5044169",
"0.5024013",
"0.50216395",
"0.50212544",
"0.5009133",
"0.50070035",
"0.49777132",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49567455",
"0.49515894",
"0.494129",
"0.49364743",
"0.49268836",
"0.49251953",
"0.49130532",
"0.49093696",
"0.48861268",
"0.48727274",
"0.48646638",
"0.48643342",
"0.48533872",
"0.4850485",
"0.48496565",
"0.48440015",
"0.4840269",
"0.4840269",
"0.4840269",
"0.4840269"
] |
0.0
|
-1
|
When i use the "implements" keyword, I am saying i agree that i am responsible for implementing all the methods presenting in "bankingClient" interface. this class is responsible. it is an agreement. Hover over red line on developing and implement all the classes to this class. One class can implement more that one interface.
|
public static void main(String[] args) {
developing d = new developing();// The return type is developing, so i will get all the methods from developing.
BankingClient dr = new developing(); //I changed the return type to "BankingClient" So now "dr" is responsible for calling all the methods in "BankingClient". I will not get "MyExtraMethod" when
//I call methods with "dr" object. This is called Runtime polymorphisim.
DomainClient ds = new developing();//Client is only interested in DomainClient methods that were implemented in this class which has multiple interfaces implemented. Well
//changed the return type to DomainClient and client is able to access only methods dealing with DomainClient
// Polymorphisim - you can only call particular methods in a particular interface.
//DomainClient ds = d;
ds.investment();
ds.noninvesters();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"interface AccountInterface{\n\tabstract void deposit();\n\tvoid withdraw();\n\tvoid roi();\n}",
"public interface Service {\r\n\t\r\n\t public Customer createAccount(Customer c) \r\n\t\t\t throws InvalidInputException; \r\n\t public Customer getBalance(String mobile) \r\n\t\t\t throws AccountNotFoundException, InvalidInputException;\r\n\t public Customer FundTransfer\r\n\t (String fromMobile, String toMobile, double amount)\r\n throws AccountNotFoundException,InvalidInputException, InsufficientBalanceException;\r\n\t \r\n\t public Customer deposit (String mobile, double amount)\r\n\t throws AccountNotFoundException,InvalidInputException, InsufficientBalanceException;\r\n\r\n}",
"public interface Client {\n\n}",
"public interface MyAccountContract {\n\n /*\n View - this defines the methods that the pure views like Activity or Fragments etc will implement.\n */\n public interface View {\n void setupViews();\n void onClickMonth();\n void onClickYear();\n void onSuccess(RevenueModel body);\n void onSuccessWithdrawl(BaseResponse body);\n void onFailure();\n void onFailureWithdrawl();\n }\n\n /*\n Actions - this defines the methods the pure Presenter class will implement. Also known as user actions,\n this is where the app logic is defined.\n */\n public interface Actions {\n void initScreen();\n void getRevenues(String date, String accessToken);\n void requestWithdrawl(String accessToken, float amount);\n\n }\n\n /*\n this defines the methods that pure model or persistence class like database or server data will implement.\n */\n public interface Repository {\n\n }\n\n}",
"public interface Domainclient {\n public void investment();\n}",
"public interface BankServerOperations \n{\n boolean checkAcntNum (int acntNum);\n boolean checkAcntStatus (int acntNum);\n boolean verifyAcntPin (int acntNum, int acntPin);\n void lockAcnt (int acntNum);\n void makeDeposit (int acntNum, int amount);\n void makeWithdrawal (int acntNum, int amount);\n double checkBalance (int acntNum);\n boolean checkOverdraft (int acntNum, double amount);\n void getTransactions (int acntNum, String startDate, String endDate, String emailAddr);\n}",
"public interface IClient extends Remote, Serializable {\n /**\n * @param auction\n * @throws RemoteException\n */\n void newAuction(AuctionBean auction) throws RemoteException;\n\n /**\n * @param auction\n * @throws RemoteException\n */\n void submit(AuctionBean auction) throws RemoteException;\n\n /**\n * @param buyer\n * @throws RemoteException\n */\n void bidSold(IClient buyer) throws RemoteException;\n\n /**\n * @param auctionID\n * @param price\n * @throws RemoteException\n */\n void newPrice(UUID auctionID, int price) throws RemoteException;\n\n /**\n * @return\n * @throws RemoteException\n */\n String getName() throws RemoteException;\n\n ClientState getState() throws RemoteException;\n\n void setState(ClientState newState) throws RemoteException;\n}",
"public interface Cashier {\n\t\n\t// Sent from waiter to computer a bill for a customer\n\tpublic abstract void msgComputeBill(String choice, Customer c, Waiter w, int tableNumber, Map<String, Double> menu);\n\t\n\t// Sent from a customer when making a payment\n\tpublic abstract void msgPayment(Customer customer, Cash cash);\n\n\tpublic abstract void msgAskForPayment(String food, int batchSize, Market market, double price);\n\n\tpublic abstract String getCash();\t\n\t\n\tpublic abstract String getTotalDebt(); \n}",
"interface Account1 {\n\t\n\t//must initialise i \n\t//by default it is public static final \n\tint i=0; //public static final \n\t\n\t//if you write it it is the same \n\tpublic static final int a=0;\n\tpublic void withdraw();\n\t\n\t\n\t//can only have a body when there is a concrete static method\n\t\n\tpublic static void show() {\n\t\t\n\t}\n\t\n\t//but in interfaces everything is public by default (if not declared)\n\t//must specify it is default\n\t//cannot write concrete methods in interfaces\n\t//ONLY STATIC AND DEFAULT ALLOWED \n\t//NO CONCRETE METHODS\n\t//\n\tdefault void show1() {\n\t\t\n\t\t\n\t}\n\t\n\t\n\tclass SavingAccount1 extends Account_temp{\n\t\t//when working with abstracts \n\t\tpublic void withdraw() {\n\t\t}\n\t\n\tclass SavingAccount2 implements Account1{\n\t\t//when working with abstracts \n\t\tpublic void withdraw() {\n\t\t\t\n\t\t}\n\t}\n\t\t\n\tabstract class SavingsAccount3 implements Account1{\n\t\tpublic void withdraw() {\n\t\t\t\n\t\t}\n\t}\n\t\n\tinterface xxx extends Account1 {\n\t\tint j=0; \n\t}\n\t\n\t\n\t\n\tclass Y{\n\t\tpublic void show() {}\n\t}\n\t\n\n\tclass Z{\n\t\tpublic void show() {}\n\t\n\t}\n\t\n\t//CAN ONLY EXTEND ONE CLASS AT A TIME- CAN'T EXTEND Y AND Z\n\t//MULTIPLE INHERITANCE NOT ALLOWED \n\t\n\tclass X extends Y {\n\t\t\n\t}\n\t\n\t//but if you want to implement 2 classes;\n\t\n\tclass A{\n\t\tpublic void show() {}\n\t}\n\t\n\n\tinterface B{\n\t\tpublic void show();\n\t\n\t}\n\t\n\t//CAN ONLY EXTEND ONE CLASS AT A TIME- CAN'T EXTEND Y AND Z\n\t//MULTIPLE INHERITANCE NOT ALLOWED \n\t\n\tclass C extends A implements B {\n\t\t\n\t\tpublic void show() {\n\t\t\t\n\t\t}\n\t}\n\t\t\n\t}\n\t\n\t//interface doesn't have a body \n\t//interface solves the \n\n}",
"public interface ClientBalanceService {\n public void queryClientBalance();\n}",
"public interface ABC extends Unionpay { //农行卡\n public boolean payPhoneBill(String phone , double money );//交话费\n}",
"public interface BankProcessingCenterOperations\n{\n\t/* constants */\n\t/* operations */\n\tboolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberException, SQLException, ClassNotFoundException;\n\tboolean credit(TransactionRequest transaction) throws ebank.CardNumberException, ClassNotFoundException, SQLException;\n\tfloat getBalance(long card_number) throws ebank.CardNumberException, SQLException, ClassNotFoundException;\n}",
"interface myClient {\n}",
"public interface ICreditRefundBorrow {\n}",
"public interface IndexProviderClient extends IndexServiceClient {\n\n}",
"public interface RiskClient {\n\tboolean isPassingCreditCheck(String userId);\n}",
"public interface Restaurant4Customer {\n\n\t/**\n\t * @param amount The cost that was not paid and is added to the amount owed by the customer\n\t *\n\t * Sent by the cashier if the customer does not have enough money to pay.\n\t */\n\tpublic abstract void msgPayNextTime(double amount);\n\n\tpublic abstract void msgAnimationFinishedGoToSeat();\n\n\tpublic abstract void msgAnimationFinishedGoToWaitingArea();\n\n\tpublic abstract void msgAnimationFinishedLeaveRestaurant();\n\n\tpublic abstract void gotHungry();\n\n\tpublic abstract Object getGui();\n\n\tpublic abstract void setWaiter(Restaurant4Waiter waiter);\n\n\tpublic abstract void msgRestaurantIsFull(int seat);\n\n\tpublic abstract void msgFollowMe(int table);\n\n\tpublic abstract void msgWhatDoYouWant();\n\n\tpublic abstract void msgChooseNewOrder();\n\n\tpublic abstract void msgHereIsYourFood();\n\n\tpublic abstract void msgHereIsYourCheck(double checkAmt);\n\n\tpublic abstract void setHost(Restaurant4Host h1);\n\n\tpublic abstract void setCashier(Restaurant4Cashier ca);\n\n}",
"public interface ClientDAO {\n\t/**\n\t * Return client by its name, initialize client accounts.\n\t * @param bank\n\t * @param name\n\t * @return\n\t */\n\tClient findClientByName(Bank bank, String name) throws ClientNotFoundException;\n\n\t/**\n\t * Return client by its name, initialize client accounts.\n\t * @param clientId\n\t * @return\n\t */\n\tClient findClientById(int clientId) throws ClientNotFoundException;\n\n\t/**\n\t * Returns the list of all clients of the Bank\n\t * and their accounts\n\t * @param bankId\n\t * @return\n\t */\n\tList<Client> getAllClients(Bank bankId);\n\n\t/**\n\t * Method should insert new Client (if id==null)\n\t * or update client in database (if id!=null)\n\t * @param client\n\t */\n\tvoid save(Client client) throws DAOException;\n\n\t/**\n\t * Method removes client from Database\n\t * @param client\n\t */\n\tvoid remove(Client client) throws DAOException;\n}",
"public interface IBank {\n //办卡\n void applyBank();\n //挂失\n void loseBank();\n //......\n}",
"public interface IClient {\n\n public Set<CabResult> getCabList(Double lat, Double lon, BookingMode mode, CabType cabType);\n\n public CabResult getBestCab(Double lat, Double lon, BookingMode mode, CabType cabType);\n}",
"public interface BankAccountService\n{\n BankAccount openAccount(long accountNumber, Date timeCreated);\n\n BankAccount getAccount(long accountNumber);\n\n void deposit(long accountNumber, double amount, String description, Date time);\n\n List<Transaction> getTransactions(BankAccount bankAccount, Date startTime, Date endTime);\n\n void withdraw(long testAccountNumber, double amount, String description, Date time);\n\n List<Transaction> getAllTransactions(BankAccount bankAccount);\n\n List<Transaction> getLatestTransactions(BankAccount bankAccount, int total);\n}",
"public interface IAccount {\n\n public double getCurrentBalance();\n public String getAccountNumber();\n public String getType();\n String getPartyType();\n}",
"public interface Cartmanagement extends UcFindCart, UcManageCart {\n\n}",
"public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}",
"public interface borrowable {\n\n\tpublic void borrowbook();\n\n}",
"public interface InterfaceClient extends Remote {\n\n double seConnecter(Client client) throws RemoteException;\n\n \n\n boolean peutReserver(Reservation rv) throws RemoteException;\n\n void visualiser(Vehicule voiture) throws RemoteException;\n\n \n \n \n void deconnexion() throws RemoteException;\n\n boolean sinscrire(Client client) throws RemoteException;\n\n void inscriptionReussite(Client client) throws RemoteException;\n}",
"public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}",
"public interface AdultAccountInterface {\n\n\tpublic void makeAccount();\n}",
"public interface AccountServer {\r\n\t\r\n\t/**\r\n\t Method: newAccount\r\n\t Inputs: String type, String name, float balance\r\n\t Returns: boolean true if the account was created and stored, false otherwise\r\n\r\n\t Description: Create a new account object in the server. if an account already exists with the given name then a new account is not created and stored.\r\n\t*/\r\n\tpublic boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;\r\n\r\n\t\r\n\t/**\r\n\t Method: closeAccount\r\n\t Inputs: String\r\n\t Returns: boolean true if there was an account with this name and close was successful\r\n\r\n\t Description: Close an account \r\n\t*/\r\n\tpublic boolean\tcloseAccount(String name);\r\n\r\n\t/**\r\n\t * @param name name of the account \r\n\t * @return Account object or null if not found. \r\n\t */\r\n\tpublic Account\tgetAccount(String name);\r\n\r\n\t/** \r\n\t * @return a list of all Accounts inside the server \r\n\t */\r\n\tpublic List<Account> getAllAccounts();\r\n\r\n\t/** \r\n\t * @return a list of Accounts inside the server that are not CLOSED\r\n\t */\r\n\tpublic List<Account> getActiveAccounts();\r\n\r\n\t\r\n\t/**\r\n\t Method: saveAccounts\r\n\t Inputs: none\r\n\t Returns: void\r\n\r\n\t Description: Saves the state of the server\r\n\t*/\r\n\tpublic void\tsaveAccounts() throws IOException;\r\n}",
"public interface Bike\r\n{\r\n /**\r\n * An enumeration defining the possible Colour classifications for\r\n * the Bike.\r\n */\r\n public enum Colour {RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET, WHITE, BLACK};\r\n\r\n /**\r\n * Returns the Colour of this Bike\r\n * \r\n * @return the Colour of this Bike\r\n */\r\n public Colour getColour();\r\n \r\n /**\r\n * Sets the Colour of this Bike\r\n * \r\n * @param colour the Colour of this Bike\r\n * @throws UnsupportedOperationException if the implementation of \r\n * the interface is read-only with respect to this property\r\n */\r\n public void setColour(Colour colour);\r\n\r\n /**\r\n * Returns the number of gears this Bike has\r\n * \r\n * @return the number of gears\r\n */\r\n public int getGears();\r\n\r\n /**\r\n * Sets the number of gears this Bike has\r\n * \r\n * @param gears the number of gears\r\n * @throws UnsupportedOperationException if the implementation of \r\n * the interface is read-only with respect to this property\r\n */\r\n public void setGears(int gears);\r\n\r\n /**\r\n * Returns the price of this Bike in pounds Sterling.\r\n * \r\n * @return the price of this Bike\r\n */\r\n public int getValue();\r\n\r\n /**\r\n * Sets the price of this Bike in pounds Sterling\r\n * \r\n * @param price the price of this Bike\r\n * @throws UnsupportedOperationException if the implementation of \r\n * the interface is read-only with respect to this property\r\n */\r\n public void setValue(int value);\r\n}",
"public interface StockPriceService extends StockPriceServiceBasic, StockPriceServiceExcelUpload {\r\n\r\n\r\n}",
"public interface TransBankService {\n /**\n * 获的所有的银行\n * @return\n */\n List<TransBank> getBankList();\n\n TransBank getBank(String bankId);\n /**\n * 获得银行的信息\n * @param regionCode\n * @return\n */\n List<TransBank> getBankListByRegion(String regionCode);\n\n /**\n * 保存银行的相关信息\n * @param transBank\n */\n TransBank save(TransBank transBank);\n\n /**\n * 删除银行\n * @param bankId\n * @return\n */\n void del(String bankId);\n\n}",
"public interface AccountService {\n void deposit(Account account, double amount);\n\n void withdraw(Account account, double amount) throws NotEnoughFundsException;\n\n void transfer(Account fromAccount, Account toAccount, double amount) throws NotEnoughFundsException;\n\n\n}",
"public interface BankContract {\n\n\n\n interface Presenter extends BasePresenter{\n void initLoader();\n\n }\n\n interface View extends BaseView<BankContract.Presenter> {\n\n void showErrorMessage(String error);\n void getData(List<CardIssuers> list);\n\n\n\n }\n}",
"public interface IClient {\n\n void setName(String name);\n}",
"public interface IPaymentService {\r\n\r\n\r\n\r\n\t/**\r\n\t * Metodo que permite hacer le pago por PSE\r\n\t * @return factura de la factura generada\r\n\t */\r\n\tpublic FacturaCompra pagoPSE(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n\t\r\n\t/**\r\n\t * Metodo que permite hacer le pago por PSE\r\n\t * @return factura de la factura generada\r\n\t */\r\n\tpublic FacturaCompra pagoCreditCard(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n\t/**\r\n\t * Metodo que permite realizar el pago \r\n\t * mediante efectivo en un punto de pago\r\n\t * @return\r\n\t */\r\n\tpublic FacturaCompra cashOnDelivery(String userName,TipoMoneda tipoMoneda);\r\n\t\r\n}",
"public interface user_interface {\n public Double getCredit();\n\n\n public void setCredit(Double credit);\n\n\n public String getName();\n\n public String getType();\n\n public void setFirstName(String name);\n\n public String getSurename();\n\n public void setSurename(String surename);\n\n public String getTypeOfCar();\n\n public String getCarID();\n\n public void setTypeOfCar(String typeOfCar);\n}",
"public interface BlackJackService {\n boolean isAce(CardNumberEntity cardNumber);\n\n boolean isBlackJack(int sumCardPoint);\n\n com.blackjack.webservice.entity.Card isHit(CardDeck cardDeck);\n\n void isStand(List<Card> cardList);\n\n boolean isBust(int sumPoint);\n\n int sumCardPoint(List<Card> cardList);\n\n}",
"public interface Comunicator {\n \n\n}",
"public interface ClientsInterface {\r\n\t/**\r\n\t * Gibt die Anzahl an Kunden in der Warteschlange an.\r\n\t * @return\tAnzahl an Kunden in der Warteschlange\r\n\t */\r\n\tint count();\r\n\r\n\t/**\r\n\t * Legt fest, dass ein bestimmter Kunde für den Weitertransport freigegeben werden soll.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t */\r\n\tvoid release(final int index);\r\n\r\n\t/**\r\n\t * Liefert den Namen eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tName des Kunden\r\n\t */\r\n\tString clientTypeName(final int index);\r\n\r\n\t/**\r\n\t * Liefert die ID der Station, an der der aktuelle Kunde erzeugt wurde oder an der ihm sein aktueller Typ zugewiesen wurde.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tID der Station\r\n\t */\r\n\tint clientSourceStationID(final int index);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Daten-Element eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tdouble clientData(final int index, final int data);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Daten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientData(final int index, final int data, final double value);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Textdaten-Element eins Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tString clientTextData(final int index, final String key);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Textdaten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientTextData(final int index, final String key, final String value);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingTime(int)\r\n\t */\r\n\tdouble clientWaitingSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tString clientWaitingTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Wartezeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tWartezeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tvoid clientWaitingSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferTime(int)\r\n\t */\r\n\tdouble clientTransferSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tString clientTransferTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Transferzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tTransferzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tvoid clientTransferSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessTime(int)\r\n\t */\r\n\tdouble clientProcessSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tString clientProcessTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Bedienzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tBedienzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tvoid clientProcessSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceTime(int)\r\n\t */\r\n\tdouble clientResidenceSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tString clientResidenceTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Verweilzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tVerweilzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tvoid clientResidenceSecondsSet(final int index, final double time);\r\n}",
"public interface IBuyCar {\n //买车\n void buyCar();\n}",
"public interface RentToBuyService {\n}",
"public interface AnalyticalServiceOperationsRemoteInterface extends AnalyticalServiceOperationsBusinessInterface, EJBObject {\r\n\r\n}",
"public interface WithDrawAContract {\n interface View extends BaseView{\n void showBalance(UserBalanceDto userBalanceDto);\n void withdrawSuccess();\n }\n interface Presenter extends BasePresenter{\n void getUserBalance();\n void submitWithdraw(WithDrawAccountDto withDrawAccountDto,String money);\n }\n}",
"public interface OrderContract {\n interface OrderContractPresenter {\n void loaAlldOrder(String userId, String status);\n\n boolean loadJudgeView(List<OrderAllBean.DataBean.ListBean> list, ListView listView, ImageView imageView, TextView textView);\n }\n\n interface OrderContractView {\n void showAlldOrder(OrderAllBean orderBean);\n }\n}",
"public interface ClientInterface {\r\n\r\n\t/**\r\n\t * Start.\r\n\t */\r\n\tpublic abstract void start();\r\n}",
"public interface ReviewContract {\n\n /*\n View - this defines the methods that the pure views like Activity or Fragments etc will implement.\n */\n public interface View{\n void setupViews();\n void onClickSubmitReview();\n void showSuccessfullReviewSubmit();\n void showErrorSubmitReview();\n }\n\n /*\n Actions - this defines the methods the pure Presenter class will implement. Also known as user actions,\n this is where the app logic is defined.\n */\n public interface Actions {\n void initScreen();\n void submitReview(String accessToken,\n String productID,\n String rating,\n String orderDID,\n String comment);\n }\n\n /*\n this defines the methods that pure model or persistence class like database or server data will implement.\n */\n public interface Repository {\n\n }\n\n}",
"public interface BankCustomersContract {\n interface Presenter {\n void downBankCustomers(String orgCode);\n void loadBankCustomers(String orgCode);\n void bindCustomer(Customer customer);\n void doDestroy();\n }\n\n interface View {\n void downBankCustomersCallback(String message);\n void loadBankCustomersCallback(List<Customer> customerList);\n void bindCustomerCallback(ResponseEntity responseEntity, Customer customer);\n }\n}",
"public interface BillContracts {\n\tinterface View {\n\t\t/**\n\t\t * 列表显示\n\t\t * @param\n\t\t */\n\t\tpublic void showBillItem(BillList bills);\n\n\t}\n\n\tinterface Presenter {\n\n\t\t/**\n\t\t * 条目被点击\n\t\t * @param context\n\t\t * @param simpleBill\n\t\t */\n\t\tpublic void itemClick(Context context, SimpleBill simpleBill);\n\n\t\t/**\n\t\t * 获取列表\n\t\t */\n\t\tpublic BillList getBillList();\n\n\t\t/**\n\t\t * 通知数据改变\n\t\t */\n\t\tpublic void notifyDataChange(Context context, BillAdapter adapter);\n\n\t\t/**\n\t\t * 加载缓存\n\t\t */\n\t\tpublic void startCacheLoading(Context context, BillList.SyncLoadBillLisetner syncLoadBillLisetner);\n\n\t\t/**\n\t\t * 获取分享链接\n\t\t * @param activity\n\t\t * @param billId\n\t\t */\n\t\tpublic void getInviteLink(final Activity activity, final String billId);\n\t}\n}",
"interface Client {\n\n /**\n * Returns an ID string for this client.\n * The returned string should be unique among all clients in the system.\n *\n * @return An unique ID string for this client.\n */\n @Nonnull\n String getId();\n\n /**\n * Called when resources have been reserved for this client.\n *\n * @param resources The resources reserved.\n * @return <code>true</code> if, and only if, this client accepts the resources allocated. A\n * return value of <code>false</code> indicates this client does not need the given resources\n * (any more), freeing them implicitly.\n */\n boolean allocationSuccessful(@Nonnull Set<TCSResource<?>> resources);\n\n /**\n * Called if it was impossible to allocate a requested set of resources for this client.\n *\n * @param resources The resources which could not be reserved.\n */\n void allocationFailed(@Nonnull Set<TCSResource<?>> resources);\n }",
"public interface IClient {\n\n public void onLogin(String authToken, String username);\n\n public void onRegister(String authToken, String username);\n\n public void displayError(String message);\n\n void claimedRoute(Integer player, String routeID);\n\n public void promptRenewSession();\n\n public void onCreateGame(Game game);\n\n public void onJoinGame(Game game);\n\n public void onLeaveGame();\n\n public void onGameStarted();\n\n public void onGetServerGameList(Game[] games);\n\n public void addGametoList(Game game);\n\n public void removeGameFromList(String gameID);\n\n public void updateGame(Game game);\n\n public void receiveMessage(GameHistory gameHistory);\n\n public void drawTrainCards(Integer player, Integer numCards, TrainCard[] cards, Integer deckSize);\n\n public void discardTrainCards(Integer player, Integer numCards, int[] pos, Integer deckSize);\n\n public void drawDestCards(Integer player, Integer numCards, DestinationCard[] cards, Integer deckSize);\n\n public void discardDestCards(Integer player, Integer numCards, int[] pos, Integer deckSize);\n\n public void swapFaceUpCards(int[] pos, TrainCard[] cards, Integer deckSize);\n\n public void onGameEnded();\n\n public void setTurn(Integer player);\n\n public void setLastTurn();\n\n public void updateAllPlayerFinalPoints(FinalGamePoints[] allFinalPoints);\n\n void promptRestoreGame(Game game);\n}",
"public interface ClientInterface {\r\n\r\n //Recebe notificação de operação realizada.\r\n public boolean notifyCompletedOperation(Operacao operacao);\r\n \r\n //Recebe notificação de atualização dos valores da ação de uma empresa.\r\n public void notifyUpdate(Empresa empresaAtualizado);\r\n}",
"public interface CreditLineService {\n\n\t/**\n\t * Calcula o montante <i>amount</i> final que cada {@link Client} tem ja com o juros\n\t * calculados conforme regra.\n\t * \n\t * @param client - O client relativo.\n\t * @param venture - O tipo de Risco. Veja mais em {@link Venture}\n\t * @param value - O valor solicitado de emprestimo.\n\t * @return - O objeto contendo valor calculado mais os dados do cliente Veja mais em {@link Amount}.\n\t */\n\tAmount calculateAmount(Client client, Venture venture, BigDecimal value);\n\n\t/**\n\t * Calcula o valor do montante final que cada {@link Client} tem ja com o juros\n\t * calculados conforme regra.\n\t * \n\t * @param client - O client relativo.\n\t * @param venture - O tipo de Risco. Veja mais em {@link Venture}\n\t * @param value - O valor solicitado de emprestimo.\n\t * @return - O objeto contendo valor calculado mais os dados do cliente Veja mais em {@link Amount}.\n\t */\n\tBigDecimal calculateAmountValue(Venture venture, BigDecimal value);\n}",
"public interface BitcoinWalletWallet {\n\n /*\n * Get wallet Id\n */\n public UUID getWalletId();\n\n public BitcoinWalletBalance getAvailableBalance() throws CantCalculateBalanceException;\n\n public BitcoinWalletBalance getBookBalance() throws CantCalculateBalanceException;\n\n public List<BitcoinWalletTransactionRecord> getTransactions(int max, int offset) throws CantGetTransactionsException;\n\n public void setDescription(UUID transactionID, String memo) throws CabtStoreMemoException, CantFindTransactionException;\n}",
"public interface Payment {\n\n void pay();\n}",
"public interface BillService {\n\n//\t/**\n//\t * <p>MethodName: getCount</p>\n//\t * <p>Description: </p>\n//\t * <p>Company: www.shuiguoyizhan.com</p>\n//\t * <p>Parameter: </P>\n//\t * <p>Return Type: int</P>\n//\t * @author yjs\n//\t * @date 2016-5-8\n//\t * @vession 1.0.0\n//\t */\n//\tint getCount() throws Exception;\n//\n//\t/**\n//\t * <p>MethodName: getPageList</p>\n//\t * <p>Description: </p>\n//\t * <p>Company: www.shuiguoyizhan.com</p>\n//\t * <p>Parameter: </P>\n//\t * <p>Return Type: List<BaseInfo></P>\n//\t * @author yjs\n//\t * @date 2016-5-8\n//\t * @vession 1.0.0\n//\t */\n//\tList<BaseInfo> getPageList(PageParameter pageParameter) throws Exception;\n//\n//\t/**\n//\t * <p>MethodName: delete</p>\n//\t * <p>Description: </p>\n//\t * <p>Company: www.shuiguoyizhan.com</p>\n//\t * <p>Parameter: </P>\n//\t * <p>Return Type: int</P>\n//\t * @author yjs\n//\t * @date 2016-5-8\n//\t * @vession 1.0.0\n//\t */\n//\tint delete(List<String> idList) throws Exception;\n//\n//\t/**\n//\t * <p>MethodName: delete</p>\n//\t * <p>Description: </p>\n//\t * <p>Company: www.shuiguoyizhan.com</p>\n//\t * <p>Parameter: </P>\n//\t * <p>Return Type: int</P>\n//\t * @author yjs\n//\t * @date 2016-5-8\n//\t * @vession 1.0.0\n//\t */\n//\tint delete(String billId) throws Exception;\n\n\t\n}",
"public interface BonusPaymentSource extends PaymentSource {\n}",
"public interface CustomerManageBusiness extends BaseBusiness {\n\n\t/**\n\t * 条件获取广告主名\n\t * @param condition\n\t * @return\n\t */\n\tpublic List<Map<String, Object>> searchCustomer(int visitId, Map<String, Object> condition) throws BusinessException;\n\t\n\t/**\n\t * 根据ID删除策略-广告主关系\n\t * @param id\n\t * @return\n\t * @throws BusinessException\n */\n\tpublic int deleteInfoById(int id)throws BusinessException;\n\n\tpublic int insertTradeInfo(Map<String,Object> condition) throws BusinessException;\n\n\tpublic List<Map<String,Object>> findAllByCondition(Map<String,Object> condition) throws BusinessException;\n\n\tpublic int countAllByCondition(Map<String,Object> condition) throws BusinessException;\n\n\tpublic List<Map<String,Object>> selectAllInfo(Map<String,Object> condition) throws BusinessException;\n\n\tpublic int countAllInfo(Map<String,Object> condition) throws BusinessException;\n}",
"public interface GigyaAuthService\n{\n\n\t/**\n\t * Method to assign authorisations to the customer after fetching it from SAP CDC.\n\t *\n\t * @param customer\n\t * The customer model \n\t */\n\tvoid assignAuthorisationsToCustomer(CustomerModel customer);\n\n\t/**\n\t * Method to remove authorisations from the customer.\n\t *\n\t * @param customer\n\t * The customer model \n\t */\n\tvoid removeAuthorisationsOfCustomer(CustomerModel customer);\n\n}",
"public interface Contest extends Adif {\n\n /**\n * Gets the contest id. A \"\" indicates that this field is not in use.\n * \n * @return the contest id.\n */\n public String getContestId() ;\n \n /**\n * Sets the contest id. A \"\" indicates that this field is not in use.\n * \n * @param contestId the contest id.\n */\n public void setContestId(String contestId) ;\n \n /**\n * Gets the received serial number for a contest QSO. A \"\" indicates that this field is not in use.\n * \n * @return the received serial number for a contest QSO.\n */\n public String getReceivedSerialNumber() ;\n \n /**\n * Sets the received serial number for a contest QSO. A \"\" indicates that this field is not in use.\n * \n * @param receivedSerialNumber the received serial number for a contest QSO.\n */\n public void setReceivedSerialNumber(String receivedSerialNumber) ;\n\n /**\n * Gets the transmitted serial number for a contest QSO. A \"\" indicates that this field is not in use.\n * \n * @return the transmitted serial number for a contest QSO.\n */\n public String getTransmittedSerialNumber() ;\n \n /**\n * Sets the transmitted serial number for a contest QSO. A \"\" indicates that this field is not in use.\n * \n * @param transmittedSerialNumber the transmitted serial number for a contest QSO.\n */\n public void setTransmittedSerialNumber(String transmittedSerialNumber) ;\n\n}",
"public interface Transactionable {\n\n void book(String fromName, String toName, BigDecimal amount) throws NoNegativeBalanceAllowedException, NoSameAccountTransfersException;\n\n}",
"public interface Implementor {\n // 实现抽象部分需要的某些具体功能\n void operationImpl();\n}",
"public interface ClientService {\n\n /**\n * This service adds the given client to the database.\n * Afterwards with the help of ClientEntity the Client will be persistent.\n *\n * @param client is the Client to add.\n * @return This service returns the persistent DB Client.\n * @throws BaseException as exception.\n */\n Client addClient(Client client) throws BaseException;\n\n /**\n * Update a client service.\n *\n * @param client the client to be updated.\n * @return updated client.\n * @throws BaseException as exception.\n */\n Client updateClient(Client client) throws BaseException;\n\n /**\n * Find client by ID.\n * @param id the ID of a client.\n * @return a client.\n * @throws BaseException as exception.\n */\n Client findClientById(Long id) throws BaseException;\n\n /**\n * It gives back a list of clients, belonging to a user.\n * @param user the employee.\n * @return list of clients.\n * @throws BaseException as exception.\n */\n List<ClientResponse> findUsersClient(User user) throws BaseException;\n}",
"public interface Dishonorable {\n\n}",
"public interface ClientController {\n /**\n * Adds new object in the table.\n *\n * @return true if the addition was successful, else return false.\n */\n boolean add(Dish dish);\n\n /**\n * Adds new object in the table.\n *\n * @return true if the addition was successful, else return false.\n */\n boolean add(DishCategory dishCategory );\n\n\n /**\n * Edits existing dish.\n *\n * @param oldDish is an existing dish, that is changed.\n * @param newDish is a dish which parameters is set to existing dish.\n * @return true if the edition was successful, else return false.\n */\n boolean edit(Dish oldDish, Dish newDish);\n\n /**\n * Edits existing dish category.\n *\n * @param oldDishCategory is an existing dish category, that is changed.\n * @param newDishCategory is a dish category which parameters is set to existing dish category.\n * @return true if the edition was successful, else return false.\n */\n\n boolean edit(DishCategory oldDishCategory, DishCategory newDishCategory);\n\n /**\n * Edits existing user.\n *\n * @param oldUser is an existing user, that is changed.\n * @param newUser is an user which parameters is set to existing user.\n * @return true if the edition was successful, else return false.\n */\n boolean edit(User oldUser, User newUser);\n\n /**\n * Deletes existing dish.\n *\n * @return true if the deleting was successful, else return false.\n */\n boolean delete(Dish dish);\n\n /**\n * Deletes existing dish category.\n *\n * @return true if the deleting was successful, else return false.\n */\n boolean delete(DishCategory dishCategory);\n\n /**\n * Deletes existing user account.\n *\n * @param user is an user that is deleted.\n * @return true if user was deleted, else return false.\n */\n\n boolean delete(User user);\n\n /**\n * Updates content, getting actual information.\n * @return true if the update was successful, else return false.\n */\n boolean updateContent();\n\n /**\n * Connects to server\n */\n void connectToServer() throws IOException;\n\n /**\n * Disconnects from the server. Finishes the client session.\n */\n void exit();\n\n /**\n * Sends request to the server.\n *\n * @param message is sent as a request\n */\n void sendRequest(String message);\n\n /**\n * Checks if a user with the same password and login exists.\n *\n * @param login is the parameter by which the user is checked.\n * @param password is the parameter by which the user is checked.\n * @return user, if there is the user exists in user base, return null, if there is not the user exists in user base\n */\n User signIn(String login, String password);\n\n /**\n * Adds a new user to the database of existing ones.\n *\n * @param user is added as a new Admin\n * @return true if an <code>user</code> was added\n */\n boolean signUp(User user);\n\n\n /**\n * Signs out\n */\n void signOut();\n\n /**\n * Finds dishes which contain <code>subStr</code> in the name.\n *\n * @param subStr is the substring that the name must contain.\n * @return dishes which contain <code>subStr</code> in the name.\n */\n List<Dish> getDishesWhichContains(String subStr);\n\n /**\n * Sorts dishes by a criteria, which is pointed in parameter.\n * @param sortBy is a criteria, by which dishes are sorted.\n * @return list of dishes sorted by pointed criteria.\n */\n List <Dish> getDishesSortedBy(String sortBy);\n\n /**\n * Shows general frame.\n */\n void showGeneralFrame();\n\n /**\n * Gets all users from storage.\n *\n * @return all users that are sighed up.\n */\n List<User> getAllUsers();\n\n /**\n * Gives the user admin rights.\n *\n * @param user is a user, that gets admin rights.\n * @return true if operation was successful, else return false.\n */\n boolean makeAdmin(User user);\n\n}",
"public interface IUserInterface {\n\t\n\t/**\n\t * Displays the welcome message.\n\t */\n\tpublic void displayWelcomeMsg();\n\t\n\t/**\n\t * Used to ask the user for the departure airport's 3-digit code.\n\t * @return the departure airport as a string from the user.\n\t */\n\tpublic String getDepartureAirport();\n\t\n\t/**\n\t * Used to ask the user for the arrival airport's 3-digit code.\n\t * @return the arrival airport as a string from the user.\n\t */\n\tpublic String getArrivalAirport();\n\t\n\t/**\n\t * Used to ask the user what date they want to leave.\n\t * @return the departure date (day) as a string from the user.\n\t */\n\tpublic String getLeavingDate();\n\t\n\t/**\n\t * Ask user if they want to book a round trip. \n\t * @return the user's answer. Should be a \"yes\" or a \"no\".\n\t */\n\tpublic String roundTrip();\n\t\n\t/**\n\t * Used to ask the user what date they want to return.\n\t * @return the return date (day) as a string from the user.\n\t */\n\tpublic String getReturnDate();\n\t\n\t/**\n\t * Used to ask the user if they want 1st class seating or not.\n\t * <p>\n\t * The user answer should start with a 'y' for yes\n\t * and a 'n' for no.\n\t * @return the \"yes\" or \"no\" as a string.\n\t */\n\tpublic String isFirstClassSeat();\n\t\n\t/**\n\t * Displays a message that tells the user how many flights \n\t * fit their search criteria.\n\t * @param numOfFlights the number of available flights\n\t */\n\tpublic void numOfFlights(int numOfFlights);\n\t\n\t/**\n\t * Displays a message that tells the user there are no flights \n\t * that fit their search criteria.\n\t */\n\tpublic void noFlights();\n\t\n\t/**\n\t * Asks the user which flight they would like to book.\n\t */\n\tpublic String bookFlight();\n\t\n\t/**\n\t * Tells the user that their flight was bought.\n\t */\n\tpublic void confirmFlight();\n\t\n\t/**\n\t * Asks the user if they would like to book another flight.\n\t */\n\tpublic String bookAnother();\n\n\t/**\n\t * Tell the user goodbye and thanks for using the system.\n\t */\n\tpublic void goodbyeMsg();\n\t\n\t/**\n\t * Prints the flight index in a user-friendly format.\n\t * @param index the index of the flight within the list.\n\t */\n\tpublic void printFlightOption(int index);\n\t\n\t/**\n\t * Asks the user if they want more detail about a\n\t * specific flight.\n\t * @return a \"yes\" or \"no\" String.\n\t */\n\tpublic String wantDetail();\n\t\n\t/**\n\t * Asks the user for the flight option that they want to \n\t * get detail about.\n\t * @return a positive number, because it is an index in the flight list.\n\t */\n\tpublic String getDetailFlight();\n\t\n\t/**\n\t * Asks the user if they want to get detail about\n\t * another flight.\n\t * @return a \"yes\" or \"no\" String.\n\t */\n\tpublic String getAnotherDetail();\n\t\n\t/**\n\t * Tells the user what flight they selected. \n\t */\n\tpublic void userFlightChoice(int index);\n\t\n\t/**\n\t * Tells the user the flight doesn't exist anymore \n\t */\n\tpublic void flightDisappear();\n\t\n\t/** \n\t * Tell the user that they can't buy the flight right now\n\t * please wait a few minutes, or try back later.\n\t */\n\tpublic void dataBaseLocked();\n\t\n\t/**\n\t * Ask the user if they want to filter a flight.\n\t * @return \"yes\" or \"no\" answer.\n\t */\n\tpublic String doSort();\n\t\n\t/**\n\t * Ask the what criteria they user wants to sort by.s\n\t * @return what criteria the user wants to sort by.\n\t */\n\tpublic String sortBy();\n\t\n\t/**\n\t * Ask the user if they want the list in ascending or descending order.\n\t */\n\tpublic String sortOrder();\n\t\n\t/**\n\t * Ask the user if they want to filter by departure time. \n\t */\n\tpublic String askDepFilter();\n\t\n\t/**\n\t * Ask the user if they want to filter by arrival time. \n\t */\n\tpublic String askArrFilter();\n\t\n\t/**\n\t * Asks the user if they want to filter the time as before or after.\n\t */\n\tpublic String b4OrAfter();\n\t\n\t/**\n\t * Ask the user what time they want to depart at.\n\t * @param depTime \n\t */\n\tpublic void askDepTime(boolean depTime);\n\t\n\t/**\n\t * Gets hour information from the user.\n\t * @return the hours the user wants their flight.\n\t */\n\tpublic String getHours();\n\t\n\t/**\n\t * Gets minutes information from the user.\n\t * @return the minutes the user wants their flight.\n\t */\n\tpublic String getMinutes();\n\n\t/**\n\t * Tells the user that you're searching for flights.\n\t */\n\tpublic void searchFlights();\n\n\t/**\n\t * Ask's the user if they want to book a round trip.\n\t * @return The yes or no answer.\n\t */\n\tpublic String wantRoundTrip();\n\t\n\t/**\n\t * Ask the user if they want to with the flight information. \n\t * @return the user's option.\n\t */\n\tpublic String doWhatWithFlights();\n\t\n\t/** \n\t * Ask the user which list they want to filter \n\t * @return the user's answer.\n\t */\n\tpublic String askOriginOrReturn();\n\t\n\t/** \n\t * Ask the user if they want to sort the origin flights,\n\t * or the return flights\n\t * @return the user's answer.\n\t */\n\tpublic String sortOriginOrReturn();\n\t\n\t/**\n\t * Ask the user if they want detail about an origin flight or a return flight.\n\t * @return the origin flight or return flight.\n\t */\n\tpublic String detailOriginOrReturn();\n\t\n\t/**\n\t * Ask the user if they want to buy the origin ticket or the return ticket.\n\t * @return The user's answer.\n\t */\n\tpublic String buyOrgOrRet();\n\t\n}",
"public interface IBankWorkerAction extends INormalUserAction {\n // 查用户的信用\n void checkUserCredit();\n // 冻结用户账号\n void freezeUserAccount();\n}",
"interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}",
"public interface Discount {\n}",
"public interface Carriageable {\r\n\r\n}",
"public interface bzt extends cdm {\n}",
"public interface AshipService {\n\n public Statistics getStatistics(); // 获取统计信息\n\n public Account getAccount( String userIdentity); //获取Account表信息\n\n public int insertAccount( Account account); //增加一条记录到Account表\n\n public UserAccount getUserAccountBreakIf(Map<String,Object> map); // 查看用户是否有关联的公司\n\n public int insertUserAccount( UserAccount userAccount); //增加一条记录到UserAccount表\n\n public List<UserAccount> getUserAccountList(Map<String,Object> map); //获取员工列表\n\n public int updateByAccountUUIDSelective(UserAccount userAccount); //根据用户的AccountUUID 进行更新\n\n /*********以下是公告**********/\n public List<Public> getPublicList(Map<String,Object> map); //\n\n public int updateByPrimaryKeySelective(UserAccount userAccount);\n\n public int updateByPrimaryKeySelectiveAndBusiness(UserAccount userAccount);\n\n ///////////获取用户的充值记录///////////////////\n public List<PayMoney> getPayMoneyList(String useruuid);\n\n\n}",
"public interface WeighInService {\n}",
"public interface Account {\n\t\n//\t\n//\t\tMoney money;\n//\t\tInterestRate interestRate;\n//\t\tPeriod interestPeriod;\n\t\t\n\t\tpublic int deposit(int depositAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()+depositAmmount;\n//\t\t}\n\t\t\n\t\tpublic int withdrawl(int withdrawAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()-withdrawAmmount;\n//\t\t}\n\t\t\n\t\tpublic int getBalance();\n//\t\t{\n//\t\t\treturn money.getMoney()*interestRate.getInterestRate()*interestPeriod.getPeriod()/100;\n//\t\t}\n\t}",
"public interface NewServerContract {\n\n interface View {\n void clickAdd(String name, String description);\n\n }\n\n interface Presenter {\n void saveServer(String name, String description);\n }\n}",
"public interface AirlineInfoDao extends ABEDao {\n\n\t/**\n\t * Method to retrieve the airline information\n\t * \n\t * @return AirlineInfoResponse\n\t * \n\t * @see\n\t * @since\n\t */\n\tpublic AirlineInfoResponse retrieveAirlineInfo(String airlineCode);\n\n\t\n\t\n}",
"public interface LeaseInterface\r\n{\r\n\t// method all lease subclasses must include\r\n\tpublic abstract double calculateFee(int aWidth);\r\n\t\t\r\n}",
"public interface C19588a {\n }",
"public interface FlyBehevour {\n void fly();\n}",
"public interface MineContract {\n interface MineView extends BaseView {\n\n void showDataLoading();\n\n void hideDataLoading();\n\n void loadAccount(AccountBean accountBean);\n\n void loadUserInfoToUI(User user);\n void loadUserInfoToUI();\n void setDataLoaded(boolean isDataLoaded);\n void dismissUpDateUserUI();\n void upLoadUerInfo(User user);\n\n void gotoLogin();\n }\n interface MeProfileView{\n\n void setCity(Province province);\n\n void setProvinces(Province[] provinces);\n void dismiss();\n }\n\n interface FeedbackView extends BaseView{\n void dismissFeedbackByUpate();\n }\n\n interface Presenter extends BasePresenter<BaseView> {\n void getAccountInfo();\n\n void getUserInfo();\n\n void uploadUserInfo(User user);\n }\n\n\n\n}",
"public interface HostBen {\n\t\t\n\tpublic void addWaiter(WaiterBen waiter);\n\t\n\tpublic void msgIWantFood(CustomerBen cust);\n\t\n\tpublic void msgICantWait(CustomerBen cust);\n\n\tpublic void msgLeavingTable(CustomerBen cust);\n\t\n\tpublic void msgWantToGoOnBreak(WaiterBen w);\n\t\n\tpublic void msgGoingBackToWork(WaiterBen w);\n\n\tpublic String getName();\n\n}",
"public interface ShipmentsInterface {\n\n /**\n * Method that calcule the cost of the shipment\n *\n * @param purchase the purchase shipment\n * @return the cost of the shipment\n */\n public double calculateCost(Purchase purchase);\n\n}",
"public interface BasicAPI {\r\n\r\n UserAccount confirmCredentials(String username, String password) throws NonExistentAccountException, FrozenAccountException;\r\n\r\n double checkBalance(int userID, int acctId) throws NonExistentAccountException;\r\n\r\n void withdraw(int acctId, double amount) throws InsufficientFundsException, NonExistentAccountException, FrozenAccountException;\r\n\r\n void deposit(int acctId, double amount) throws InsufficientFundsException, NonExistentAccountException, FrozenAccountException;\r\n\r\n void transfer(int userIDFrom, int acctIdToWithdrawFrom, int userIDTo, int acctIdToDepositTo, double amount) throws InsufficientFundsException, NonExistentAccountException, FrozenAccountException;\r\n\r\n String transactionHistory(int acctId);\r\n\r\n}",
"interface Bank {\r\n\tvoid deposit();\r\n\tabstract void withdraw();\r\n\tvoid checkBalance();\r\n\t// int code; // we cant declare like this, compilation error\r\n\tfinal static int code = 204050; // we have to declare variable value, by default it is final and static\r\n\t\r\n}",
"public interface CargoForecastPasswordContract {\n interface View extends IBaseView, ITransactionView, ICommitSuccessView {\n void showHint(String text);\n }\n\n interface Presenter extends IBasePresenter {\n void submit(String dp, String dpc, String rp, String rpc) throws UnsupportedEncodingException;\n }\n}",
"public interface IClientDAO {\n Long insert(Client client, boolean getID);\n ArrayList<Client> getAll();\n boolean updateById(Long id, Properties columns);\n boolean updateOrder(Long client_id, Long order_id);\n boolean deleteById(Long id);\n Client getById(long id);\n boolean increaseOrdersCount(Long client_id);\n}",
"public interface BalanceInfoService {\r\n\r\n\t/** The user balance Dao. */\r\n\tUserBalanceDao userBalance=null;\r\n\t\r\n\t/**\r\n\t * Gets the balance info.\r\n\t *\r\n\t * @param request the webservice request from which the function is called. \r\n\t * @param user the user \r\n\t * @return the balance info in the json format similar to the object com.mobisols.tollpayments.response.get.BalanceInfoResponse\r\n\t */\r\n\tpublic String getBalanceInfo(String request,String user);\r\n}",
"public interface HawkToBrainComp {\n /**\n * Every kind of personality will have a designated response in the form of IDK(I don't know)\n * This method allows the Hawker can use this method and an equals method to the response to determine\n * if the AI didn't have a response available for the User.\n * @return returns the IDK response of the Personality\n */\n public String getIDKReply();\n\n /**\n * Send a conventional grammar into this method and receive a response from the AI Personality\n * @param conventional_Grammar to be determined\n */\n public String requestResponce(String conventional_Grammar);\n}",
"@SuppressWarnings(\"unused\")\npublic interface AccountI extends Remote {\n String login(String id, String passwd) throws RemoteException;\n String signUp(String id, String passwd, String secureQuestion, String answer)throws RemoteException;\n String logOut(String userName) throws RemoteException;\n String forgetPassword(String username)throws RemoteException;\n String resetPassword(String username,String answer, String password)throws RemoteException;\n void startIO()throws RemoteException;\n int getRuntimeServer()throws RemoteException;\n int getFileServer() throws RemoteException;\n int getIOUniqueNumber()throws RemoteException;\n}",
"public interface ClientContract {\n interface ClientView extends BaseView {\n\n void showDataLoading();\n\n void hideDataLoading();\n\n void loadClients(Clients clients);\n\n void loadDataToUI();\n\n void loadProvince(List<Province> provinces);\n void setDataLoaded(boolean isDataLoaded);\n\n }\n\n interface AddClientView {\n void setCity(Province provinceId);\n\n void loadProvince(List<Province> provinces);\n void showDataLoading();\n\n void hideDataLoading();\n void setTags(String tags);\n\n void dismissAddClientUI();\n }\n\n interface Presenter extends BasePresenter<BaseView> {\n void getClientsInfo();\n\n void creatNewClient(Map<String, String> uploadList);\n\n void getProvinceInfo();\n\n void deleteClient(String id);\n }\n\n interface ProvinceView extends BaseView {\n\n void loadProvince(List<Province> provinces);\n }\n interface TagsView extends BaseView {\n\n void loadTags(SearchConditions mSearchConditions);\n }\n\n}",
"public interface Transaction {\n void startPurchase();\n void addTicket(int age, boolean isStudent);\n double finishPurchase();\n\n}",
"public interface BillingService {\n /**\n * Attempts to charge the order to the credit card. Both successful and\n * failed transactions will be recorded.\n *\n * @return a receipt of the transaction. If the charge was successful, the\n * receipt will be successful. Otherwise, the receipt will contain a\n * decline note describing why the charge failed.\n */\n Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);\n}",
"public interface HouseholdAppliances {\n public void on();\n public void off();\n}",
"public interface CatalogueClient {\n\n\tList<Exoplanet> getCatalogue();\n\n}",
"public interface AddCustomerContract {\n\n interface View extends IBaseView<Presenter> {\n\n Customer getCustomer();\n\n String getInputName();\n\n String getInputSubscriptionNo();\n\n void handleModelValidationError(int errorCode);\n\n void handlePostError(int errorCode);\n\n void hideProgress();\n\n void finishByResult(PostedCustomerInfo postedCustomerInfo);\n }\n\n interface Presenter extends IBasePresenter {\n\n void createCustomer(DoneResponseListener doneResponseListener);\n\n void validCustomerName(GenericResponseListener<Integer> responseListener);\n\n void validCustomerSubscriptionNo(GenericResponseListener<Integer> responseListener);\n }\n}",
"public interface Requirements {\n\n /**\n * the method checks that the purchase requirements are met\n * @param playerBoard of the player\n * @return true if the player can buy the card\n */\n public boolean checkRequirements(PlayerBoard playerBoard);\n\n\n /**\n * method to draw the card's requirements\n * @return string containing the requirements to print\n */\n public String drawRequirements();\n}",
"public interface Dependency extends Relationship , java.io.Serializable\n{\n // declare/define something only in the code\n // please fill in/modify the following section\n // -beg- preserve=no 327A646F00E6 detail_begin \"Dependency\"\n\n // -end- 327A646F00E6 detail_begin \"Dependency\"\n\n // -beg- preserve=no 3E423DBE00A1 head327A646F00E6 \"changeClient\"\n public void changeClient(ModelElement oldClient, ModelElement newClient)\n // -end- 3E423DBE00A1 head327A646F00E6 \"changeClient\"\n // declare any checked exceptions\n // please fill in/modify the following section\n // -beg- preserve=no 3E423DBE00A1 throws327A646F00E6 \"changeClient\"\n\n // -end- 3E423DBE00A1 throws327A646F00E6 \"changeClient\"\n ; // empty\n\n // -beg- preserve=no 3E423DCA0134 head327A646F00E6 \"changeSupplier\"\n public void changeSupplier(ModelElement oldSupplier, ModelElement newSupplier)\n // -end- 3E423DCA0134 head327A646F00E6 \"changeSupplier\"\n // declare any checked exceptions\n // please fill in/modify the following section\n // -beg- preserve=no 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n\n // -end- 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n ; // empty\n\n /** add a Client.\n * \n * @see #removeClient\n * @see #containsClient\n * @see #iteratorClient\n * @see #clearClient\n * @see #sizeClient\n */\n // -beg- preserve=no 33FFE57B03B3 add_head327A646F00E6 \"Dependency::addClient\"\n public void addClient(ModelElement client1)\n // -end- 33FFE57B03B3 add_head327A646F00E6 \"Dependency::addClient\"\n ; // empty\n\n /** disconnect a Client.\n * @see #addClient\n */\n // -beg- preserve=no 33FFE57B03B3 remove_head327A646F00E6 \"Dependency::removeClient\"\n public ModelElement removeClient(ModelElement client1)\n // -end- 33FFE57B03B3 remove_head327A646F00E6 \"Dependency::removeClient\"\n ; // empty\n\n /** tests if a given Client is connected.\n * @see #addClient\n */\n // -beg- preserve=no 33FFE57B03B3 test_head327A646F00E6 \"Dependency::containsClient\"\n public boolean containsClient(ModelElement client1)\n // -end- 33FFE57B03B3 test_head327A646F00E6 \"Dependency::containsClient\"\n ; // empty\n\n /** used to enumerate all connected Clients.\n * @see #addClient\n */\n // -beg- preserve=no 33FFE57B03B3 get_all_head327A646F00E6 \"Dependency::iteratorClient\"\n public java.util.Iterator iteratorClient()\n // -end- 33FFE57B03B3 get_all_head327A646F00E6 \"Dependency::iteratorClient\"\n ; // empty\n\n /** disconnect all Clients.\n * @see #addClient\n */\n // -beg- preserve=no 33FFE57B03B3 remove_all_head327A646F00E6 \"Dependency::clearClient\"\n public void clearClient()\n // -end- 33FFE57B03B3 remove_all_head327A646F00E6 \"Dependency::clearClient\"\n ; // empty\n\n /** returns the number of Clients.\n * @see #addClient\n */\n // -beg- preserve=no 33FFE57B03B3 size_head327A646F00E6 \"Dependency::sizeClient\"\n public int sizeClient()\n // -end- 33FFE57B03B3 size_head327A646F00E6 \"Dependency::sizeClient\"\n ; // empty\n\n /** DONT USE; link management internal\n */\n // -beg- preserve=no 33FFE57B03B3 _link_body327A646F00E6 \"Dependency::_linkClient\"\n public void _linkClient(ModelElement client1);\n // -end- 33FFE57B03B3 _link_body327A646F00E6 \"Dependency::_linkClient\"\n\n /** DONT USE; link management internal\n */\n // -beg- preserve=no 33FFE57B03B3 _unlink_body327A646F00E6 \"Dependency::_unlinkClient\"\n public void _unlinkClient(ModelElement client1);\n // -end- 33FFE57B03B3 _unlink_body327A646F00E6 \"Dependency::_unlinkClient\"\n\n /** add a Supplier.\n * \n * @see #removeSupplier\n * @see #containsSupplier\n * @see #iteratorSupplier\n * @see #clearSupplier\n * @see #sizeSupplier\n */\n // -beg- preserve=no 335C0D7A02E4 add_head327A646F00E6 \"Dependency::addSupplier\"\n public void addSupplier(ModelElement supplier1)\n // -end- 335C0D7A02E4 add_head327A646F00E6 \"Dependency::addSupplier\"\n ; // empty\n\n /** disconnect a Supplier.\n * @see #addSupplier\n */\n // -beg- preserve=no 335C0D7A02E4 remove_head327A646F00E6 \"Dependency::removeSupplier\"\n public ModelElement removeSupplier(ModelElement supplier1)\n // -end- 335C0D7A02E4 remove_head327A646F00E6 \"Dependency::removeSupplier\"\n ; // empty\n\n /** tests if a given Supplier is connected.\n * @see #addSupplier\n */\n // -beg- preserve=no 335C0D7A02E4 test_head327A646F00E6 \"Dependency::containsSupplier\"\n public boolean containsSupplier(ModelElement supplier1)\n // -end- 335C0D7A02E4 test_head327A646F00E6 \"Dependency::containsSupplier\"\n ; // empty\n\n /** used to enumerate all connected Suppliers.\n * @see #addSupplier\n */\n // -beg- preserve=no 335C0D7A02E4 get_all_head327A646F00E6 \"Dependency::iteratorSupplier\"\n public java.util.Iterator iteratorSupplier()\n // -end- 335C0D7A02E4 get_all_head327A646F00E6 \"Dependency::iteratorSupplier\"\n ; // empty\n\n /** disconnect all Suppliers.\n * @see #addSupplier\n */\n // -beg- preserve=no 335C0D7A02E4 remove_all_head327A646F00E6 \"Dependency::clearSupplier\"\n public void clearSupplier()\n // -end- 335C0D7A02E4 remove_all_head327A646F00E6 \"Dependency::clearSupplier\"\n ; // empty\n\n /** returns the number of Suppliers.\n * @see #addSupplier\n */\n // -beg- preserve=no 335C0D7A02E4 size_head327A646F00E6 \"Dependency::sizeSupplier\"\n public int sizeSupplier()\n // -end- 335C0D7A02E4 size_head327A646F00E6 \"Dependency::sizeSupplier\"\n ; // empty\n\n /** DONT USE; link management internal\n */\n // -beg- preserve=no 335C0D7A02E4 _link_body327A646F00E6 \"Dependency::_linkSupplier\"\n public void _linkSupplier(ModelElement supplier1);\n // -end- 335C0D7A02E4 _link_body327A646F00E6 \"Dependency::_linkSupplier\"\n\n /** DONT USE; link management internal\n */\n // -beg- preserve=no 335C0D7A02E4 _unlink_body327A646F00E6 \"Dependency::_unlinkSupplier\"\n public void _unlinkSupplier(ModelElement supplier1);\n // -end- 335C0D7A02E4 _unlink_body327A646F00E6 \"Dependency::_unlinkSupplier\"\n\n /** add a Presentation.\n * \n * @see #removePresentation\n * @see #containsPresentation\n * @see #iteratorPresentation\n * @see #clearPresentation\n * @see #sizePresentation\n */\n // -beg- preserve=no 362409A9000A add_head327A646F00E6 \"ModelElement::addPresentation\"\n public void addPresentation(PresentationElement presentation1)\n // -end- 362409A9000A add_head327A646F00E6 \"ModelElement::addPresentation\"\n ; // empty\n\n /** disconnect a Presentation.\n * @see #addPresentation\n */\n // -beg- preserve=no 362409A9000A remove_head327A646F00E6 \"ModelElement::removePresentation\"\n public PresentationElement removePresentation(PresentationElement presentation1)\n // -end- 362409A9000A remove_head327A646F00E6 \"ModelElement::removePresentation\"\n ; // empty\n\n /** tests if a given Presentation is connected.\n * @see #addPresentation\n */\n // -beg- preserve=no 362409A9000A test_head327A646F00E6 \"ModelElement::containsPresentation\"\n public boolean containsPresentation(PresentationElement presentation1)\n // -end- 362409A9000A test_head327A646F00E6 \"ModelElement::containsPresentation\"\n ; // empty\n\n /** used to enumerate all connected Presentations.\n * @see #addPresentation\n */\n // -beg- preserve=no 362409A9000A get_all_head327A646F00E6 \"ModelElement::iteratorPresentation\"\n public java.util.Iterator iteratorPresentation()\n // -end- 362409A9000A get_all_head327A646F00E6 \"ModelElement::iteratorPresentation\"\n ; // empty\n\n /** disconnect all Presentations.\n * @see #addPresentation\n */\n // -beg- preserve=no 362409A9000A remove_all_head327A646F00E6 \"ModelElement::clearPresentation\"\n public void clearPresentation()\n // -end- 362409A9000A remove_all_head327A646F00E6 \"ModelElement::clearPresentation\"\n ; // empty\n\n /** returns the number of Presentations.\n * @see #addPresentation\n */\n // -beg- preserve=no 362409A9000A size_head327A646F00E6 \"ModelElement::sizePresentation\"\n public int sizePresentation()\n // -end- 362409A9000A size_head327A646F00E6 \"ModelElement::sizePresentation\"\n ; // empty\n\n /** DONT USE; link management internal\n */\n // -beg- preserve=no 362409A9000A _link_body327A646F00E6 \"ModelElement::_linkPresentation\"\n public void _linkPresentation(PresentationElement presentation1);\n // -end- 362409A9000A _link_body327A646F00E6 \"ModelElement::_linkPresentation\"\n\n /** DONT USE; link management internal\n */\n // -beg- preserve=no 362409A9000A _unlink_body327A646F00E6 \"ModelElement::_unlinkPresentation\"\n public void _unlinkPresentation(PresentationElement presentation1);\n // -end- 362409A9000A _unlink_body327A646F00E6 \"ModelElement::_unlinkPresentation\"\n\n // declare/define something only in the code\n // please fill in/modify the following section\n // -beg- preserve=no 327A646F00E6 detail_end \"Dependency\"\n\n // -end- 327A646F00E6 detail_end \"Dependency\"\n\n}",
"public interface Sell {\n void sell();\n void ad();\n\n}",
"public interface C24717ak {\n}",
"public interface UserOrderContract {\n interface Model {\n }\n\n interface View extends BaseOrderContract.View {\n /**\n * 数据获取成功\n *\n * @param dataBeans\n */\n void onGetListDataSuccess(List<UserOrderBean.DataBean> dataBeans);\n\n /**\n * 数据获取失败\n *\n * @param msg 提示信息\n */\n void onGetListDataFailed(String msg);\n\n }\n\n interface Presenter extends BaseOrderContract.Presenter{\n void getListDataFromNet(String uid, String index, String item);\n\n }\n}",
"public interface CapFloorIborSABRCapMethodInterface {\n\n /**\n * Computes the present value of the instrument.\n * \n * @param cap\n * The cap/floor on Ibor.\n * @param sabr\n * The SABR cap/floor data and multi-curves provider.\n * @return The present value.\n */\n MultipleCurrencyAmount presentValue(CapFloorIbor cap, SABRCapProviderInterface sabr);\n\n}"
] |
[
"0.70246005",
"0.70053774",
"0.70011854",
"0.6968478",
"0.695507",
"0.6899338",
"0.6852639",
"0.6825266",
"0.6724968",
"0.6724591",
"0.67093986",
"0.6676843",
"0.66540676",
"0.66075",
"0.65805215",
"0.6565237",
"0.6563563",
"0.65573543",
"0.6521575",
"0.651874",
"0.64677304",
"0.6459935",
"0.64556974",
"0.6454921",
"0.64302176",
"0.642429",
"0.64227194",
"0.6418806",
"0.6413363",
"0.64029247",
"0.63946676",
"0.6384198",
"0.6384099",
"0.63665724",
"0.63604873",
"0.63494337",
"0.6332164",
"0.6329922",
"0.63261557",
"0.63224804",
"0.6322335",
"0.6313426",
"0.62916183",
"0.6291064",
"0.62864286",
"0.62747884",
"0.6273385",
"0.6265105",
"0.6264549",
"0.6252582",
"0.62480336",
"0.62380314",
"0.62337977",
"0.623225",
"0.62321883",
"0.62289435",
"0.622796",
"0.62253517",
"0.6224403",
"0.62202555",
"0.62154746",
"0.6214555",
"0.6210714",
"0.62088925",
"0.62080747",
"0.6207636",
"0.6207546",
"0.6206986",
"0.6201217",
"0.6195581",
"0.61946255",
"0.6187016",
"0.6185673",
"0.61788833",
"0.61758",
"0.6164065",
"0.61628133",
"0.6150614",
"0.6150467",
"0.61352074",
"0.61310625",
"0.6130189",
"0.6125254",
"0.61217207",
"0.6120978",
"0.61197704",
"0.6119265",
"0.61192006",
"0.6115446",
"0.610977",
"0.61069125",
"0.6105748",
"0.60992",
"0.6095582",
"0.60949135",
"0.60893536",
"0.60871667",
"0.6082825",
"0.6078821",
"0.6076019",
"0.60700506"
] |
0.0
|
-1
|
I can't access this method with 'bankingClient" as the return type.
|
public void myExtraMethod_login() {
System.out.println("this is my method that i added to this class and not from interface. This is login");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"shared.data.Bank getBank();",
"List<Client> getAllClients(Bank bankId);",
"IBank getBank(int rekeningNr) throws RemoteException;",
"public Bank getBank() {\r\n return bank;\r\n }",
"public String getBankAccountType();",
"Databank getBank();",
"public static Bank getBank() {\n return Bank;\n }",
"public String getBank() {\r\n return bank;\r\n }",
"public String getBank() {\r\n return bank;\r\n }",
"public int getBankAccount() {\n return bankAccount;\n }",
"IBank getBankFromName(String bankName) throws RemoteException;",
"public ClanBank getClanBank() {\n return clanBank;\n }",
"public String getBank() {\n return bank;\n }",
"public String getBankCode() {\r\n return bankCode;\r\n }",
"Client findClientByName(Bank bank, String name) throws ClientNotFoundException;",
"java.lang.String getBankName();",
"public String getBankName() {\n return bankName;\n }",
"public String getBankID() {\n return bankID;\n }",
"public int getC_BankAccount_ID();",
"public PUKEHandlerCallBanker_ABZ_FOUR(){\r\n\t}",
"public int getRequestableBank() \n {\n return -1; \n }",
"public long getBankId() {\n return bankId;\n }",
"public BankingOperation(int type, Client client) {\n super(type);\n m_client = client;\n }",
"public List<BankAccount> getAllByClient(Client client){\n\t\treturn this.getRepo().getAllByClient(client);\n\t}",
"public int getBankAccountNumber() {\n return bankAccountNumber;\n }",
"BankTellers getBankTeller(String userName);",
"public IBankTransfert payment();",
"BillingAccount getBillingAccount();",
"public void setBankAccountType (String BankAccountType);",
"public boolean collectAccountInfo(IBankAPI bankAPI){\n\t}",
"public Map<Integer, BankClient> getBankDatabase() {\n return bankDatabase;\n }",
"public String getBankID() {\n return bankID;\n }",
"public Banking addFundsToAccount(Banking banking){\n return client.addBanking(banking);\n }",
"void setBank(shared.data.Bank bank);",
"public BankThing retrieve(String id);",
"public interface BankCardService {\n /**\n * 根据主账号id,查询微店的银行卡信息\n *\n * @api {dubbo} com.pzj.core.customer.bankcard.BankCardService#queryMicroshopBankCardByOwnerid 查询主账号的银行卡信息\n * @apiGroup 银行卡服务\n * @apiVersion 1.3.0\n * @apiDescription\n * <p>\n * 根据主账号id,查询微店的银行卡信息。\n * </p>\n *\n * @apiParam {Long} ownerId 主账号id\n *\n * @apiParamExample {json} 参数示例\n *\n * {\n * \"id\" : 48381023784545\n * }\n *\n * @apiSuccess (响应数据) {int} errorCode 错误码\n * @apiSuccess (响应数据) {String} errorMsg 错误说明\n * @apiSuccess (响应数据) {BankCardDetailResponse} data 银行卡信息。\n *\n * @apiSuccessExample {json} 响应数据示例\n *\n * {\n * \"errorCode\" : 10000,\n * \"errorMsg\" : null,\n * \"data\" : {\n * \"id\" : 123,\n * \"ownerId\" : 48381023784545,\n * \"accountHolder\" : \"张三\",\n * \"idNum\" : \"14010919999999\",\n * \"bank\" : \"农行\",\n * \"cardNum\" : “596432034334”,\n * }\n * }\n *\n * @apiError (错误码说明) 1 1。\n *\n * @param ownerId\n * @return\n */\n Result<BankCardDetailResponse> queryMicroshopBankCardByOwnerid(Long ownerId);\n\n /**\n * 创建微店的银行卡信息\n *\n * @api {dubbo} com.pzj.core.customer.bankcard.BankCardService#createMicroshopBankCard 创建微店的银行卡信息\n * @apiGroup 银行卡服务\n * @apiVersion 1.3.0\n * @apiDescription\n * <p>\n * 创建微店的银行卡信息,目前只能创建一份。\n * </p>\n *\n * @apiParam {String} accountHolder 开户人\n * @apiParam {String} idNum 身份证号\n * @apiParam {String} bank 银行名称\n * @apiParam {String} cardNum 银行卡号\n * @apiParam {Integer} dataSource 创建系统\n * @apiParam {Long} operator 创建人id\n *\n * @apiParamExample {json} 参数示例\n *\n * {\n * \"accountHolder\" : \"张三\",\n * \"idNum\" : \"14010919999999\",\n * \"bank\" : \"农行\",\n * \"cardNum\" : \"596432034334\",\n * \"dataSource\" : 1,\n * \"id\" : 48381023784545\n * }\n *\n * @apiSuccess (响应数据) {int} errorCode 错误码\n * @apiSuccess (响应数据) {String} errorMsg 错误说明\n * @apiSuccess (响应数据) {Long} data 银行卡id。\n *\n * @apiSuccessExample {json} 响应数据示例\n *\n * {\n * \"errorCode\" : 10000,\n * \"errorMsg\" : null,\n * \"data\" : 123\n * }\n *\n * @apiError (错误码说明) 1 1。\n *\n * @param request\n * @return\n */\n Result<Long> createMicroshopBankCard(CreateBankCardRequest request);\n\n /**\n * 修改微店的银行卡信息\n *\n * @api {dubbo} com.pzj.core.customer.bankcard.BankCardService#modifyMicroshopBankCard 修改微店的银行卡信息\n * @apiGroup 银行卡服务\n * @apiVersion 1.3.0\n * @apiDescription\n * <p>\n * 修改微店的银行卡信息。\n * </p>\n *\n * @apiParam {Long} dataSource 银行卡id\n * @apiParam {String} accountHolder 开户人\n * @apiParam {String} idNum 身份证号\n * @apiParam {String} bank 银行名称\n * @apiParam {String} cardNum 银行卡号\n * @apiParam {Long} operator 创建人id\n *\n * @apiParamExample {json} 参数示例\n *\n * {\n * \"id\" : 123,\n * \"accountHolder\" : \"张三\",\n * \"idNum\" : \"14010919999999\",\n * \"bank\" : \"农行\",\n * \"cardNum\" : \"596432034334\",\n * \"id\" : 48381023784545\n * }\n *\n * @apiSuccess (响应数据) {int} errorCode 错误码\n * @apiSuccess (响应数据) {String} errorMsg 错误说明\n * @apiSuccess (响应数据) {Boolean=true:成功,false:失败} data 是否修改成功。\n *\n * @apiSuccessExample {json} 响应数据示例\n *\n * {\n * \"errorCode\" : 10000,\n * \"errorMsg\" : null,\n * \"data\" : true\n * }\n *\n * @apiError (错误码说明) 1 1。\n *\n * @param request\n * @return\n */\n Result<Boolean> modifyMicroshopBankCard(ModifyBankCardRequest request);\n}",
"public String getBank() {\n\t\tthis.setBank(this.bank);\n\t\treturn this.bank;\n\t}",
"java.lang.String getBankNo();",
"public java.lang.String getBankaccount() {\r\n return localBankaccount;\r\n }",
"private Bank() {\r\n\t\tsuper();\r\n\t\tlogService = new Logger(\"driverName\");\r\n\t\tlogger = new Logger(\"driverName\");\r\n\t\tthis.balance = balance;\r\n\t\tthis.clients = new Client[100];\r\n\t}",
"public double getAmountBank() {\n return this.amountBank;\n }",
"BillingSource billingSource();",
"public DataBank getDataBank() {\n return dataBank;\n }",
"public void setBankService(BankService bankService) {\r\n this.bankService = bankService;\r\n }",
"public interface ClientBalanceService {\n public void queryClientBalance();\n}",
"public interface BankAccountService\n{\n BankAccount openAccount(long accountNumber, Date timeCreated);\n\n BankAccount getAccount(long accountNumber);\n\n void deposit(long accountNumber, double amount, String description, Date time);\n\n List<Transaction> getTransactions(BankAccount bankAccount, Date startTime, Date endTime);\n\n void withdraw(long testAccountNumber, double amount, String description, Date time);\n\n List<Transaction> getAllTransactions(BankAccount bankAccount);\n\n List<Transaction> getLatestTransactions(BankAccount bankAccount, int total);\n}",
"private RateClient(BitPayClient bitPayClient) {\n this.bitPayClient = bitPayClient;\n }",
"public List<BankAccount> getAccountsByClientId(String clientID) {\n\n String sql = \"SELECT * FROM bankaccount WHERE bankclient_id = :bankclient_id\";\n Map paramMap = new HashMap();\n paramMap.put(\"bankclient_id\", new BigDecimal(clientID));\n List<BankAccount> result = jdbcTemplate.query(sql, paramMap, new AccountRowMapper());\n return result;\n }",
"public LoanAccounting getAccounting();",
"@org.jetbrains.annotations.Nullable()\n @kotlin.jvm.JvmStatic()\n public final com.stripe.android.view.NetbankingBank get(@org.jetbrains.annotations.Nullable()\n java.lang.String bankCode) {\n return null;\n }",
"public interface BankServerOperations \n{\n boolean checkAcntNum (int acntNum);\n boolean checkAcntStatus (int acntNum);\n boolean verifyAcntPin (int acntNum, int acntPin);\n void lockAcnt (int acntNum);\n void makeDeposit (int acntNum, int amount);\n void makeWithdrawal (int acntNum, int amount);\n double checkBalance (int acntNum);\n boolean checkOverdraft (int acntNum, double amount);\n void getTransactions (int acntNum, String startDate, String endDate, String emailAddr);\n}",
"List selectByExample(CusBankAccountExample example);",
"public interface BuxferApiClient {\n\n /**\n * https://www.buxfer.com/help/api#login\n */\n LoginResponse login(String buxferUser, String buxferPassword) throws BuxferApiException;\n\n /**\n * https://www.buxfer.com/help/api#transactions\n */\n TransactionsResponse transactions(int pageIndex, String sessionToken);\n}",
"public java.lang.String getBankNumber() {\n return bankNumber;\n }",
"@Override\n public boolean isBoatOnTheLeftBank() {\n return false;\n }",
"Bond investmentGetBond(String bondName) throws BankException, BondException {\n throw new BankException(\"This account does not support this feature\");\n }",
"public BankAccount findAccountById(int currentBankID) throws SQLException;",
"public interface IClient {\n\n public Set<CabResult> getCabList(Double lat, Double lon, BookingMode mode, CabType cabType);\n\n public CabResult getBestCab(Double lat, Double lon, BookingMode mode, CabType cabType);\n}",
"protected String xabCB() { return EnterpriseOfferCB.class.getName(); }",
"public interface TransBankService {\n /**\n * 获的所有的银行\n * @return\n */\n List<TransBank> getBankList();\n\n TransBank getBank(String bankId);\n /**\n * 获得银行的信息\n * @param regionCode\n * @return\n */\n List<TransBank> getBankListByRegion(String regionCode);\n\n /**\n * 保存银行的相关信息\n * @param transBank\n */\n TransBank save(TransBank transBank);\n\n /**\n * 删除银行\n * @param bankId\n * @return\n */\n void del(String bankId);\n\n}",
"public boolean selectBankAccount(String bankAccount, String user, int choose);",
"public Long getBusinessBankAccountId() {\n return businessBankAccountId;\n }",
"public String getSupAcctBank() {\n return supAcctBank;\n }",
"@Override\n\tpublic void setBankCustomerPerson() {\n\t\t\n\t}",
"public void setBankID(String value) {\n this.bankID = value;\n }",
"public String getBalService() {\r\n\t\treturn balService;\r\n\t}",
"public interface MemberBankcardService {\n /**\n * 根据MemberId来获取用户银行卡List信息集\n * @param memberId\n * */\n List<MemberBankcard> selectByMemberId(Long memberId);\n /**\n * 检测银行卡信息是否正确\n * */\n String checkBankcard(MemberBankcard memberBankcard);\n /**\n * 添加新的银行卡\n * */\n int addBankcard(MemberBankcard memberBankcard);\n\n /**\n * 清除绑定卡 设置还款卡或放款卡\n * */\n int bindBankCard(Long memberId,Long cardId,Long bindType);\n /**\n * 检查账户是否拥有到账卡 返回卡id\n * */\n Long checkMemberBankcard(Long memberId);\n int updateBankCard(MemberBankcard memberBankcard);\n\n List<MemberBankcard> queryBankcard(MemberBankcard memberBankcard);\n\n Boolean valid(Long memberId);\n\n MemberBankcard selectByPrimaryKey(Long id);\n\n MemberBankcard selectByMemberIdAndBindType(Long memberId,Long bindType);\n\n MemberBankcard selectWithhold(Long memberId);\n\n MemberBankcard selectByUidBankNumber(Long memberId,String bankcardNumber);\n\n}",
"public interface BitcoinWalletWallet {\n\n /*\n * Get wallet Id\n */\n public UUID getWalletId();\n\n public BitcoinWalletBalance getAvailableBalance() throws CantCalculateBalanceException;\n\n public BitcoinWalletBalance getBookBalance() throws CantCalculateBalanceException;\n\n public List<BitcoinWalletTransactionRecord> getTransactions(int max, int offset) throws CantGetTransactionsException;\n\n public void setDescription(UUID transactionID, String memo) throws CabtStoreMemoException, CantFindTransactionException;\n}",
"public List BestClient();",
"public String getJP_BankAccountType();",
"public void setBank(Bank bank) {\r\n this.bank = bank;\r\n }",
"public AGateway getGateway()\r\n/* 16: */ {\r\n/* 17:36 */ return this.gateway;\r\n/* 18: */ }",
"public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }",
"public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }",
"String getTradingAccount();",
"public String getSubBank() {\r\n return subBank;\r\n }",
"public BankAccount getBankAccount (int secretKey) {\n // using a secretKey to obtain a BankAccount means/assumes that\n // the BankAccount belongs to an Agent that has been involved in\n // an AuctionHouse-linked transaction\n\n int theBankAccountNumber;\n // use the secretKey to get associated AccountLink\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n\n if (theAccountLink != null) { // i.e. secret key was valid\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n // secretKey appears to be invalid, return generic BankAccount\n return new BankAccount();\n }\n\n // return the associated BankAccount\n return hashMapOfAllAccts.get(theBankAccountNumber);\n\n }",
"@Test\n @Order(6)\n void get_client_2() {\n Client c = service.getClient(client);\n Assertions.assertEquals(client.getId(), c.getId());\n Assertions.assertEquals(client.getName(), c.getName());\n Assertions.assertEquals(client.getAccounts().size(), c.getAccounts().size());\n for(Account i : client.getAccounts()) {\n Account check = c.getAccountById(i.getId());\n Assertions.assertEquals(i.getAmount(), check.getAmount());\n Assertions.assertEquals(i.getClientId(), check.getClientId());\n }\n }",
"public String getFinancialDocumentBankCode() {\r\n return financialDocumentBankCode;\r\n }",
"public String getBankName()\n\t{\n\t\tif(response.containsKey(\"BANK_NAME\")) {\n\t\t\treturn response.get(\"BANK_NAME\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public static void main(String[] args) {\n FundsTransfer transfer = new FundsTransfer(clientId, clientSecret, Interswitch.ENV_DEV);\n\n try {\n\n BankResponse response = transfer.fetchBanks(); // makes network call\n\n Bank[] bank = response.getBanks(); // a bank array of all banks\n\n if (bank instanceof Object) {\n\n // successful\n Bank testBank = bank[0]; // bank at index 0\n\n String cbnCode = testBank.getCbnCode(); // Central bank code\n String bankName = testBank.getBankName(); // bank name: \n String bankCode = testBank.getBankCode(); // bankcode in alphabetical form: UBA, GTB, FBN\n\n } else {\n\n // error occured\n }\n\n } catch (\n\n Exception ex) {\n // request was not completed\n }\n }",
"BrokerAlgo getBrokerAlgo();",
"@org.jetbrains.annotations.Nullable()\n @kotlin.jvm.JvmStatic()\n public static final com.stripe.android.view.NetbankingBank get(@org.jetbrains.annotations.Nullable()\n java.lang.String bankCode) {\n return null;\n }",
"public interface GPB2BCustomerAccountService {\n\n\n\t/**\n\t * This method gets b2b order list\n\t * \n\t * @param currentCustomer\n\t * \t\t\tthe current customer\n\t * @param currentBaseStore\n\t * \t\t\tthe current base store\n\t * @param statuses\n\t * \t\t\tthe status\n\t * @param pageableData\n\t * \t\t\tthe data for pagination\n\t * @param b2bUnit\n\t * \t\t\tthe b2b unit\n\t * @return b2b order list\n\t */\n\tSearchPageData<OrderModel> getB2BOrderList(CustomerModel currentCustomer, BaseStoreModel currentBaseStore,\n\t\t\tOrderStatus[] statuses, PageableData pageableData, List<B2BUnitModel> b2bUnit);\n\n\t/**\n\t * This method gets order for code\n\t * @param currentUser\n\t * \t\t\tthe current user\n\t * @param code\n\t * \t\t\tthe code\n\t * @param baseStoreModel\n\t * \t\t\tthe base store model\n\t * @return the order model for code\n\t */\n\tOrderModel getOrderForCode(CustomerModel currentUser, String code, BaseStoreModel baseStoreModel);\n\n\t/**\n\t * This method gets b2b order list for admin\n\t * @param currentCustomer\n\t * \t\t\tthe current customer\n\t * @param currentBaseStore\n\t * \t\t\tthe current base store\n\t * @param statuses\n\t * \t\t\tthe statuses\n\t * @param pageableData\n\t * \t\t\tthe data for pagination\n\t * @param b2bUnitList\t\n\t * \t\t\tthe b2b unit list\n\t * @return the order list for admin\n\t */\n\tSearchPageData<OrderModel> getB2BOrderListForAdmin(\n\t\t\tCustomerModel currentCustomer, BaseStoreModel currentBaseStore,\n\t\t\tOrderStatus[] statuses, PageableData pageableData,\n\t\t\tList<B2BUnitModel> b2bUnitList);\n\n}",
"public String getJP_BankAccount_Value();",
"public java.lang.String getBankName() {\n java.lang.Object ref = bankName_;\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 bankName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"void addBank(IBank bank) throws RemoteException;",
"public void mutualFund(){\r\n\t\tSystem.out.println(\"HSBC ---mutualFund method called from Interface BrazilBank\");\r\n\t}",
"@Test\n void bankListIsAccountExistToTransfer_accountExistWithSufficientMoneyToTransfer_success() {\n ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n System.setOut(new PrintStream(outContent));\n BankList bankList = new BankList(storage);\n Ui uiTest = new Ui();\n Bank newSavingAccount = new Saving(\"Test Saving Account\", 1000, 2000);\n Bank newInvestmentAccount = new Investment(\"Test Investment Account\", 1000);\n String expectedReturnType = \"investment\";\n\n try {\n bankList.bankListAddBank(newSavingAccount, uiTest);\n bankList.bankListAddBank(newInvestmentAccount, uiTest);\n outContent.reset();\n String returnType = bankList.getTransferBankType(\"Test Investment Account\",\n 500);\n assertEquals(expectedReturnType, returnType);\n\n\n } catch (BankException error) {\n System.out.println(\"Expected no throw, but error thrown\");\n }\n\n assertEquals(2, bankList.getBankListSize());\n\n }",
"void bankInfo(T ref);",
"@Test\n void getAccountBalance() throws JsonProcessingException {\n\n String idAccount = \"14537780\";\n\n Response response = greetingWebClient.getAccountBalance(idAccount);\n assertTrue(response.getPayload().getList().size()>0 && response.getStatus().equals(\"OK\"));\n\n }",
"public int getC_BPartner_ID();",
"@Test\n void bankListIsAccountExistToReceive_accountExist_success() {\n ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n System.setOut(new PrintStream(outContent));\n BankList bankList = new BankList(storage);\n Ui uiTest = new Ui();\n Bank newSavingAccount = new Saving(\"Test Saving Account\", 1000, 2000);\n Bank newInvestmentAccount = new Investment(\"Test Investment Account\", 1000);\n String expectedReturnType = \"investment\";\n\n try {\n bankList.bankListAddBank(newSavingAccount, uiTest);\n bankList.bankListAddBank(newInvestmentAccount, uiTest);\n outContent.reset();\n String returnType = bankList.getReceiveBankType(\"Test Investment Account\");\n assertEquals(expectedReturnType, returnType);\n\n } catch (BankException error) {\n System.out.println(\"Expected no throw, but error thrown\");\n }\n\n assertEquals(2, bankList.getBankListSize());\n }",
"private ClientOnboarded getClientOnboarded(String clientName) {\n\n ClientOnboarded clientOnboarded = null;\n try{\n clientOnboarded = ClientOnboarded.valueOf(clientName);\n } catch (Exception ex) {\n clientOnboarded = ClientOnboarded.CONNSOCIO;\n }\n return clientOnboarded;\n }",
"private ResponseBank(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\r\npublic void checkBalance() {\n\t\r\n}",
"public GlAccountBank () {\n\t\tsuper();\n\t}",
"public Integer getSubBankId() {\r\n return subBankId;\r\n }",
"public ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyAddressDescription getBank()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyAddressDescription target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyAddressDescription)get_store().find_element_user(BANK$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"@Nullable\n public String getBankName() {\n return bankName;\n }",
"public java.lang.String getBankName() {\n java.lang.Object ref = bankName_;\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 bankName_ = s;\n return s;\n }\n }"
] |
[
"0.678869",
"0.66772866",
"0.6641033",
"0.65972203",
"0.6562219",
"0.6537725",
"0.6492935",
"0.63247776",
"0.63247776",
"0.63237065",
"0.6303493",
"0.62598974",
"0.62533104",
"0.62264943",
"0.62233466",
"0.6098607",
"0.60930973",
"0.60848683",
"0.6070428",
"0.60578895",
"0.60450935",
"0.60217744",
"0.6017466",
"0.5998446",
"0.59925956",
"0.59826",
"0.5972526",
"0.5968081",
"0.5961277",
"0.5954446",
"0.5933849",
"0.59174216",
"0.59152144",
"0.589096",
"0.5878907",
"0.5856183",
"0.5837268",
"0.58259875",
"0.58226824",
"0.5820492",
"0.5807563",
"0.57775337",
"0.5770058",
"0.57691664",
"0.57675374",
"0.5766916",
"0.5721926",
"0.57044065",
"0.56802905",
"0.566823",
"0.5649674",
"0.5647823",
"0.56461287",
"0.5645609",
"0.5642539",
"0.56378347",
"0.56156427",
"0.56104463",
"0.5592487",
"0.5581071",
"0.55761755",
"0.5575106",
"0.5567285",
"0.55637383",
"0.555315",
"0.5551655",
"0.5551502",
"0.5551226",
"0.55450994",
"0.5541732",
"0.55377716",
"0.55316937",
"0.5528938",
"0.5528938",
"0.55260515",
"0.551143",
"0.55105764",
"0.55094355",
"0.54963046",
"0.5492335",
"0.5492181",
"0.5491405",
"0.5491246",
"0.54863936",
"0.5486073",
"0.54848325",
"0.5462264",
"0.54555684",
"0.5429098",
"0.54283744",
"0.5414745",
"0.5414682",
"0.5409738",
"0.5406049",
"0.5405651",
"0.53940105",
"0.5391338",
"0.5386879",
"0.5385933",
"0.5381806",
"0.5377754"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void investment() {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void noninvesters() {
}
|
{
"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
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsAsDouble() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords(2523.04);
String expResult = "Two thousand five hundred twenty-three and 04/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.7778645
|
11
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsAsString() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("2523.04");
String expResult = "Two thousand five hundred twenty-three and 04/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.80687416
|
5
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsBillion() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("1233444253.04");
String expResult = "One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.8041891
|
6
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsBillionMilTeens() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("1018000000.05");
String expResult = "One billion eighteen million and 05/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.8124168
|
4
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsMillions() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("5000000.05");
String expResult = "Five million and 05/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.77209365
|
12
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsThousands() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("428030.16");
String expResult = "Four hundred twenty-eight thousand thirty and 16/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.81902176
|
1
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsHundreds() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("46.00");
String expResult = "Forty-six and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.82500106
|
0
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsEmpty() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("");
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.8014486
|
7
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsNull() {
System.out.println("getWords");
String input=null;
DollarsToWords instance = new DollarsToWords(input);
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.762471
|
14
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsJustDecimal() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords(".");
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.79695207
|
9
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsZero() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("0");
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.7660729
|
13
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsZeroDot() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("0.");
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.77852094
|
10
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsDotZero() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords(".0");
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.75890666
|
15
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsOverBillion() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("2123456789123");
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.8175638
|
2
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsOverBillionDecimal() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords(2e24);
String expResult = "Zero and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNoFraction() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"458\");\n String expResult = \"Four hundred fifty-eight and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8163545",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.79933214
|
8
|
Test of getWords method, of class DollarsToWords.
|
@Test
public void testGetWordsNoFraction() {
System.out.println("getWords");
DollarsToWords instance = new DollarsToWords("458");
String expResult = "Four hundred fifty-eight and 00/100 dollars";
String result = instance.getWords();
assertEquals(expResult, result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n public void testGetWordsHundreds() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"46.00\");\n String expResult = \"Forty-six and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsThousands() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"428030.16\");\n String expResult = \"Four hundred twenty-eight thousand thirty and 16/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2123456789123\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillionMilTeens() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1018000000.05\");\n String expResult = \"One billion eighteen million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsString() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"2523.04\");\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsBillion() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"1233444253.04\");\n String expResult = \"One billion two hundred thirty-three million four hundred forty-four thousand two hundred fifty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsEmpty() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsOverBillionDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2e24);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsJustDecimal() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZeroDot() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0.\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsAsDouble() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(2523.04);\n String expResult = \"Two thousand five hundred twenty-three and 04/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result); \n }",
"@Test\n public void testGetWordsMillions() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"5000000.05\");\n String expResult = \"Five million and 05/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\"0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsNull() {\n System.out.println(\"getWords\");\n String input=null;\n DollarsToWords instance = new DollarsToWords(input);\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetWordsDotZero() {\n System.out.println(\"getWords\");\n DollarsToWords instance = new DollarsToWords(\".0\");\n String expResult = \"Zero and 00/100 dollars\";\n String result = instance.getWords();\n assertEquals(expResult, result);\n }",
"@Test\n public void testConvertToWords()\n {\n System.out.println(\"convertToWords\");\n WoordenController instance = new WoordenController();\n String[] expResult =\n {\n \"een\", \"twee\", \"drie\", \"vier\", \"hoedje\", \"van\", \"hoedje\", \"van\", \"een\", \"twee\", \"drie\", \"vier\",\n \"hoedje\", \"van\", \"papier\"\n };\n String[] result = instance.convertToWords();\n assertArrayEquals(expResult, result);\n }",
"@Test\r\n public void testGetCandidateWords() throws IOException {\r\n System.out.println(\"getCandidateWords\");\r\n String word = \"idabetes\";\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n Map<String, Double> result = sc.getCandidateWords(word);\r\n for (String key : result.keySet()) {\r\n System.out.println(key + \", \" + result.get(key));\r\n }\r\n\r\n /*assertEquals(expResult, result);\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 }",
"@Test\n\tpublic void testGetWords() throws MalformedURLException, IOException, BadLocationException {\n\t\t\n\t\t// Setup\n\t\tArticle a = new Article(new File(\"test/res/sample_article.html\").toURI().toURL());\n\t\ta.read();\n\t\t\n\t\t// Exercise\n\t\tList<String> words = a.getWords();\n\t\t\n\t\t// Verify\t\t\n\t\tAssert.assertNotNull(words);\n\t\tAssert.assertTrue(words.size() > 0);\n\t}",
"@Test \n\tpublic void generateWordsTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter '100' in the count field \n\t\thomePage.inputCount(\"1000\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(wordCount == 1000);\n\n\t\t// validate the report text // ex: \"Generated 10 paragraphs, 1106 words, 7426 bytes of Lorem Ipsum\" \n\t\tAssert.assertEquals(\"Generated \" + generatedPage.getReport(\"paragraphs\") + \n\t\t\t\t\" paragraphs, \" + generatedPage.getReport(\"words\") + \n\t\t\t\t\" words, \" + generatedPage.getReport(\"bytes\") + \n\t\t\t\t\" bytes of Lorem Ipsum\", generatedPage.getCompleteReport());\n\n\t}",
"public static void main(String[] args) {\n numberToWords(1230);\n }",
"@Test\n public void printAllWords() {\n // TODO\n }",
"SList oddWords();",
"public static void main(String[] args) {\n System.out.println(\"*******\");\n numberToWords(-100);\n System.out.println(\"*******\");\n numberToWords(1010);\n System.out.println(\"*******\");\n numberToWords(1000);\n System.out.println(\"*******\");\n numberToWords(1234567890);\n System.out.println(\"*******\");\n\n\n\n\n\n\n\n }",
"SList evenWords();",
"@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }",
"@Test\n void generate25Words() {\n // given\n Board board = new Board();\n board.generateWords(WordsReader.read(\"words.json\"));\n List<Word> words;\n // when\n words = board.getWordList();\n // then\n assertEquals(25, words.size());\n assertNotNull(words.get(0));\n assertNotNull(words.get(1));\n assertNotNull(words.get(2));\n assertNotNull(words.get(24));\n }",
"public static void fetchWords() {\n wordList = new ArrayList<String>();\n try {\n //problems with reading into method\n WordFetcher.readInto(wordList); \n } catch(Exception e) {\n System.out.println(e);\n }\n }",
"public Cursor getWords() \n\t{\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t_havingDataContraint +\n\t\t\t\t\t\t\" ORDER BY \" + DBConstants.WordTable.WORD_KEY;\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\n }",
"int totalWords();",
"List<T> getWord();",
"public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"public Iterator<String> words();",
"private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}",
"public static Words toWords(String cs){\n Words r = new Words();\n String s = \"\";\n int l = cs.length();\n int i = 0;\n char current;\n while(i<l){\n current = cs.charAt(i);\n if(!Char.isAlfaNumericPoint(current)){\n if(s.length()>0){\n r.add(s);\n s = \"\";\n }\n }\n else{\n s += current;\n }\n i++;\n }\n if(s.length()>0){\n r.add(s);\n }\n return r;\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public static void main(String[] args) {\n System.out.println(allDollars(\"hello\"));\n System.out.println(allDollars(\"jones\"));\n }",
"public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}",
"private void getWordsList(final States.difficulty diff) {\n \t\tString file;\n \t\tif (diff == States.difficulty.EASY) {\n \t\t\tfile = \"4words.txt\";\n \t\t} else if (diff == States.difficulty.MEDIUM) {\n \t\t\tfile = \"5words.txt\";\n \t\t} else {\n \t\t\tfile = \"6words.txt\";\n \t\t}\n \n \t\t// read entire file as string, parsed into array by new line\n \t\ttry {\n \t\t\tInputStream stream = am.open(file);\n \t\t\tString contents = IOUtils.toString(stream, \"UTF-8\");\n \t\t\twordsList = contents.split(System.getProperty(\"line.separator\"));\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// Shuffle the elements in the array\n \t\tCollections.shuffle(Arrays.asList(wordsList));\n \t}",
"public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }",
"public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }",
"private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}",
"java.lang.String getWord();",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }",
"private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}",
"public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}",
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }",
"public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}",
"@Test\n public void testGetWordsFromList_6args() throws Exception {\n System.out.println(\"testGetWordsFromList_6args\");\n String permalink = testList.getPermalink();\n Knicker.SortBy sortBy = null;\n SortOrder sortOrder = null;\n int skip = 0;\n int limit = 0;\n List<WordListWord> result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n\n assertNotNull(result);\n for (WordListWord word : result) {\n assertEquals(word.getUsername(), username);\n }\n\n sortOrder = SortOrder.ASCENDING;\n sortBy = Knicker.SortBy.alpha;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord1);\n assertEquals(result.get(1).getWord(), testWord2);\n\n sortOrder = SortOrder.DESCENDING;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n assertEquals(result.get(1).getWord(), testWord1);\n\n limit = 1;\n result = WordListApi.getWordsFromList(token, permalink, sortBy, sortOrder, skip, limit);\n assertNotNull(result);\n assertEquals(result.get(0).getWord(), testWord2);\n }",
"WordBean getWord(String word);",
"@Test\r\n\tvoid testwordLengthsTallyHandout1() {\n\t\tString input = Main.TEXT_1;\r\n\t\tString expected[] = {\"Star\",\"Wars:\",\"Episode\",\"VII\",\"The\",\"Force\",\"Awakens\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\r\n\t}",
"@Test\n\tpublic void doNotCastComposedWordNumbers() {\n\t\tString input = \"I want twenty-nine dollars.\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I want twenty-nine dollars.\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }",
"public List<String> getRandomWords(int numWords) throws Exception {\n\n List<String> randomWords = new ArrayList();\n\n List<Word> words = WordsApi.randomWords(true, null, null, 2, 0, 2, 0, 0, 0, null, null, numWords);\n\n for (Word word : words) {\n randomWords.add(word.getWord());\n }\n\n return randomWords;\n\n }",
"public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }",
"private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test \n\tpublic void generateWordsTest_NegativeTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// select 'words' radio button \n\t\thomePage.selectContentType(\"words\");\n\n\t\t// enter 'abcd' in the count field \n\t\thomePage.inputCount(\"abcd\");\n\n\t\t// click \"Generate Lorum Ipsum\" button\n\t\thomePage.generateLorumIpsum();\n\t\tGeneratedPage generatedPage = new GeneratedPage(driver);\n\n\t\t// validate the number of words generated \n\t\tint wordCount = generatedPage.getActualGeneratedCount(\"words\");\n\t\tAssert.assertTrue(\"Incorrect reported words count with abcd input\", wordCount == 0);\n\t}",
"public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }",
"public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }",
"@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}",
"public abstract void overallWords(long ms, int n);",
"public static String getWords(String fileName){\n\t\tString result = null;\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(fileName);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\t\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t\twhile(line != null){\n\t\t\t\tsb.append(line);\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tresult = Utils.removeStopWords(sb.toString());\n\t\t\treturn result;\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t}",
"public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}",
"private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }",
"public void getWord() {\n\t\t\n\t}",
"public KeyWordList extractKeyWords(String input);",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"private void addCustomWords() {\r\n\r\n }",
"public ArrayList<String> getWords() {\n return words;\n }",
"public List<String> getAllWords() {\n List<String> words = new ArrayList<>();\n // get the words to the list\n getAllWords(root, \"\", 0, words);\n // and return the list of words\n return words;\n }",
"public String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}",
"public String catchPhrase() {\n @SuppressWarnings(\"unchecked\") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject(\"company.buzzwords\");\n return joinSampleOfEachList(catchPhraseLists, \" \");\n }",
"public static ArrayList<String> findWords(TrieNode root) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tgetWords(root, \"\", result);\n\t\treturn result;\n\t}",
"@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }",
"@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }",
"@Override\n public List<DefinitionDTO> findAllWords() {\n List<Word> words = wordRepository.findAll();\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"Stream<CharSequence> toWords(CharSequence sentence);",
"private static List<String> getSensorWords(SensorDetails details){\r\n\t\tvar sensorLoc = details.location;\r\n\t\tvar fullstopIndex1 = sensorLoc.indexOf(\".\");\r\n\t\tvar fullstopIndex2 = sensorLoc.lastIndexOf(\".\");\r\n\t\tvar strLength = sensorLoc.length();\r\n\t\tvar firstWord = sensorLoc.substring(0, fullstopIndex1);\r\n\t\tvar secondWord = sensorLoc.substring(fullstopIndex1 + 1, fullstopIndex2);\r\n\t\tvar thirdWord = sensorLoc.substring(fullstopIndex2 + 1, strLength);\r\n\t\tvar wordsList = List.of(firstWord, secondWord, thirdWord);\r\n\t\treturn wordsList;\r\n\t}",
"@Test\r\n\tpublic void testCapitalizeAllWords() throws Exception{\r\n\t\tAssert.assertEquals(\"Hello World\", Capitalizer.capitalizeAllWords(\"hello woRLd\"));\r\n\t}",
"public interface IWord2Spell {\r\n String word2spell();\r\n}",
"public List<String> findAllWords(String[] words, String target,int k) {\n List<String> res = new ArrayList<>();\n if(target == null || k < 0) return res;\n TrieNode root = buildTrie(words);\n int[] targetDP = new int[target.length() + 1];\n for(int i = 0; i < targetDP.length; i++) targetDP[i] = i;\n helper(root, \"\", target, targetDP, res, k);\n return res;\n }",
"public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}",
"public void testGetRelevantTerms408() throws IOException {\n String narr = \"The date of the storm, the area affected, and the extent of \\n\" +\n \"damage/casualties are all of interest. Documents that describe\\n\" +\n \"the damage caused by a tropical storm as \\\"slight\\\", \\\"limited\\\", or\\n\" +\n \"\\\"small\\\" are not relevant. \";\n ArrayList<ArrayList<String>> result = getRelevantTermsHelper(narr);\n assertTrue(result.get(0).toString().equals(\"[date, storm, area, affected, extent, damage, casualties, damage, caused, tropical, storm]\"));\n assertTrue(result.get(1).toString().equals(\"[slight, limited, small]\"));\n }",
"public String numberToWords(int num) {\n String words = \"\";\n if (num == 0) {\n return \"Zero\";\n } else if (num < 100) {\n words = toLessHundred(num);\n } else if (num < 1000) {\n words = toLessThousand(num);\n } else if (num < 1000000) {\n words = toLessMillon(num);\n } else if (num < 1000000000) {\n words = toLessBillon(num);\n } else if (num < Math.pow(2, 31)) {\n words = toLessMax(num);\n }\n return words.trim();\n }",
"public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }",
"public String toOrdinalWords(String ordinalParam, long number, int wordCase) {\n\n String s;\n if(number==1000000000){\n \t s=\"miljardte\";\n }\n else if(number==1000000){\n \t s=\"miljonte\";\n }\n else if(number==1000){\n \t s=\"tusende\";\n }\n else if(number==100){\n \t s=\"hundrade\";\n } else if (number >= 1000000000) {\n long rem = number % 1000000000;\n s = (number / 1000000000==1?\"en\":toWords(number / 1000000000)) + \" miljard \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000000) {\n long rem = number % 1000000;\n s = (number / 1000000==1?\"en\":toWords(number / 1000000)) + \" miljon \" +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 1000) {\n long rem = number % 1000;\n s = (number/1000==1?\"et\":toWords(number / 1000)) + \"tusen\" +\" \"+\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else if (number >= 100) {\n long rem = number % 100;\n s = (number/100==1?\"\":toWords(number / 100)) + \"hundra\" +\n (rem==0||rem > 19 ? \"\" : \"en\") +\n toOrdinalWords(ordinalParam, rem, wordCase);\n } else {\n if (number < 20) {\n s = swedishOrdinalUnits[(int)number];\n } else {\n int rem = (int)(number % 10);\n if (rem==0) {\n s = swedishOrdinalTens[(int)number / 10];\n } else {\n s = swedishTens[(int)number / 10]+swedishOrdinalUnits[rem];\n }\n }\n }\n\n if (wordCase == UPPER_CASE) {\n return s.toUpperCase();\n } else if (wordCase == LOWER_CASE) {\n return s.toLowerCase();\n } else {\n return s;\n }\n }",
"public static ArrayList<String> words(String s){\n\t\ts = s.toLowerCase().replaceAll(\"[^a-zA-Z ]\", \"\");\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\tString currWord = \"\";\n\n\t\tfor(int i = 0; i < s.length(); i ++){\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (Character.isLetter(c) == false){\n\t\t\t\tarrayList.add(currWord);\n\t\t\t\tcurrWord = \"\";\n\t\t\t}else{\n\t\t\t\tcurrWord = currWord + c;\n\t\t\t}\n\t\t}\n\t\tarrayList = removeSpaces(arrayList);\n\t\treturn arrayList;\n\t}",
"public List<Word> getWordsStartingAt(int start);",
"public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"public int getDollars()\r\n {\r\n return dollars;\r\n }",
"@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }",
"public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}",
"private static Double[] collectWord(HashMap<Integer, ArrayList<Integer>> VtDocTr, int n) {\n\t\tDouble []arr= new Double[3];\r\n\t\tarr[0] = 0.0d ;\r\n\t\tarr[1] = 0.0d ;\r\n\t\tarr[2] = 0.0d ;\r\n\t\tfor (int i = 0; i < VtDocTr.size(); i++) {\r\n\t\t\tif(VtDocTr.get(i).get(n) > 0 && i < 10) {\r\n\t\t\t\t arr[0] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 20) {\r\n\t\t\t\t arr[1] += 1;\r\n\t\t\t}else if(VtDocTr.get(i).get(n)> 0 && i < 30) {\r\n\t\t\t\t arr[2] += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(arr[0] == 0.0d ) {\r\n\t\t\tarr[0] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[1] == 0.0d){\r\n\t\t\tarr[1] = 0.1d;\r\n\t\t}\r\n\t\tif(arr[2] == 0.0d){\r\n\t\t\tarr[2]=0.1d;\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public void highLightWords(){\n }"
] |
[
"0.82500106",
"0.81902176",
"0.8175638",
"0.8124168",
"0.80687416",
"0.8041891",
"0.8014486",
"0.79933214",
"0.79695207",
"0.77852094",
"0.7778645",
"0.77209365",
"0.7660729",
"0.762471",
"0.75890666",
"0.6959958",
"0.65079635",
"0.5891826",
"0.5867252",
"0.5850185",
"0.5837897",
"0.5824578",
"0.57835275",
"0.57782453",
"0.56954557",
"0.56851053",
"0.5674448",
"0.5624541",
"0.5573595",
"0.5533146",
"0.552233",
"0.54821134",
"0.5445994",
"0.5433064",
"0.54124606",
"0.5397688",
"0.53817827",
"0.537871",
"0.53618747",
"0.5355346",
"0.5334707",
"0.5316622",
"0.5308403",
"0.5293714",
"0.52781385",
"0.52596027",
"0.5257337",
"0.52514815",
"0.5205852",
"0.5191823",
"0.5172633",
"0.5149773",
"0.5140816",
"0.5132377",
"0.510471",
"0.5101516",
"0.50974214",
"0.5094276",
"0.5092708",
"0.5088765",
"0.5063167",
"0.5060677",
"0.5054078",
"0.50504553",
"0.50499356",
"0.5041435",
"0.50390506",
"0.502812",
"0.50240296",
"0.5018771",
"0.50098515",
"0.5008626",
"0.50038415",
"0.5001433",
"0.49937913",
"0.4989166",
"0.4982182",
"0.498082",
"0.4957176",
"0.4956905",
"0.49529895",
"0.49507234",
"0.49425465",
"0.49356744",
"0.49336118",
"0.49305013",
"0.492699",
"0.49153328",
"0.4912666",
"0.49102065",
"0.4906068",
"0.48954275",
"0.48953852",
"0.48948696",
"0.48936322",
"0.48929295",
"0.48857093",
"0.48773766",
"0.48743096",
"0.48741627"
] |
0.8163545
|
3
|
transform a pluginBase of form /my/plugin/path/ to my/plugin/path
|
private String formatServletRoute(String pluginBase, String servletRelative) {
if (pluginBase.startsWith("/")) {
pluginBase = pluginBase.substring(1);
}
if (pluginBase.endsWith("/")) {
pluginBase = pluginBase.substring(0, pluginBase.length() - 1);
}
if (servletRelative == null || servletRelative.isEmpty()) {
return String.format("/%s/", pluginBase);
}
if (servletRelative.startsWith("/")) {
servletRelative = servletRelative.substring(1);
}
if (servletRelative.endsWith("/")) {
servletRelative = servletRelative.substring(0,
servletRelative.length() - 1);
}
return String.format(ROUTE_REGEX, pluginBase, servletRelative);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void addPlugin(BaseComponentPlugin baseComponent);",
"private static URL findPluginBaseWithoutLoadingPlugin(Plugin plugin) {\r\n \ttry {\r\n \t\tURL url = plugin.getClass().getResource(\".\");\r\n \t\ttry {\r\n \t\t\t// Plugin test with OSGi plugin need to resolve bundle resource\r\n\t\t\t\turl = FileLocator.resolve(url);\r\n\t\t\t} catch (NullPointerException e) {\r\n\t\t\t\t// junit non plugin test, OSGi plugin is not loaded\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// junit non plugin test\r\n\t\t\t}\r\n\t\t\tjava.io.File currentFile = new java.io.File(url.toURI());\t//$NON-NLS-1$\r\n\t\t\tdo {\r\n\t\t\t\tcurrentFile = currentFile.getParentFile();\r\n\t\t\t\tif (currentFile.getName().equals(\"bin\") || currentFile.getName().equals(\"src\")) {\t//$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t\t\t\tif (new File(currentFile.getParentFile(), \"plugin.xml\").exists()) {\t\t//$NON-NLS-1$\r\n\t\t\t\t\t\t// Eclipse project should have plugin.xml at root\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\treturn currentFile.getParentFile().toURI().toURL();\r\n\t\t\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t\t\t// give up and just bail out to null like before\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} while (currentFile.getParentFile() != null);\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\t// give up and just bail out to null like before\r\n\t\t\treturn null;\r\n\t\t}\r\n \treturn null;\r\n }",
"File getPluginDirectory(String pluginId);",
"public interface Plugin\n{\n\tpublic String getPluginName();\n}",
"Plugin getPlugin( );",
"Plugin getPlugin();",
"private URL getPluginPath(HashMap importElement) {\n \n \t\tif (importElement == null)\n \t\t\treturn null;\n \n \t\t// determine which plugin we are looking for\n \t\tVersionedIdentifier id;\n \t\tString pid = (String) importElement.get(\"plugin\"); //$NON-NLS-1$\n \t\tString version = (String) importElement.get(\"version\"); //$NON-NLS-1$\n \t\tString match = (String) importElement.get(\"match\"); //$NON-NLS-1$\n \t\tif (pid == null)\n \t\t\treturn null; // bad <import> element\n \t\tif (version == null)\n \t\t\tid = new VersionedIdentifier(pid);\n \t\telse {\n \t\t\tid = new VersionedIdentifier(pid + \"_\" + version); //$NON-NLS-1$\n \t\t\tif (match == null)\n \t\t\t\tmatch = \"compatible\"; //$NON-NLS-1$\n \t\t}\n \n \t\t// search plugins on all configured sites\n \t\tISiteEntry[] sites = getConfiguredSites();\n \t\tif (sites == null || sites.length == 0)\n \t\t\treturn null;\n \n \t\tVersionedIdentifier savedVid = id; // initialize with baseline we are looking for\n \t\tString savedEntry = null;\n \t\tURL savedURL = null;\n \t\tfor (int j = 0; j < sites.length; j++) {\n \t\t\tString[] plugins = sites[j].getPlugins();\n \t\t\tfor (int i = 0; plugins != null && i < plugins.length; i++) {\n \t\t\t\t// look for best match.\n \t\t\t\t// The entries are in the form <path>/<pluginDir>/plugin.xml\n \t\t\t\t// look for -------------------------^\n \t\t\t\tint ix = findEntrySeparator(plugins[i], 2); // second from end\n \t\t\t\tif (ix == -1)\n \t\t\t\t\tcontinue; // bad entry ... skip\n \t\t\t\tString pluginDir = plugins[i].substring(ix + 1);\n \t\t\t\tix = pluginDir.indexOf(\"/\"); //$NON-NLS-1$\n \t\t\t\tif (ix != -1)\n \t\t\t\t\tpluginDir = pluginDir.substring(0, ix);\n \t\t\t\tif (pluginDir.equals(\"\")) //$NON-NLS-1$\n \t\t\t\t\tcontinue; // bad entry ... skip\n \n \t\t\t\t// compare the candidate plugin using the matching rule\n \t\t\t\tVersionedIdentifier vid = new VersionedIdentifier(pluginDir);\n \t\t\t\tif (vid.equalIdentifiers(id)) {\n \n \t\t\t\t\t// check if we have suffixed directory. If not (eg. self-hosting)\n \t\t\t\t\t// we need to actually parse the plugin.xml to get its version\n \t\t\t\t\tif (pluginDir.indexOf(\"_\") == -1) { //$NON-NLS-1$\n \t\t\t\t\t\tURL xmlURL = null;\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\txmlURL = new URL(((SiteEntry) sites[j]).getResolvedURL(), plugins[i]);\n \t\t\t\t\t\t} catch (MalformedURLException e) {\n \t\t\t\t\t\t\tcontinue; // bad URL ... skip\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\t// parse out the plugin element attributes\n \t\t\t\t\t\tfinal String fpid = pid;\n \t\t\t\t\t\tSelector versionSel = new Selector() {\n \t\t\t\t\t\t\t\t// parse out plugin attributes\n \tpublic boolean select(String element) {\n \t\t\t\t\t\t\t\tif (element.startsWith(\"plugin\")) //$NON-NLS-1$\n \t\t\t\t\t\t\t\t\treturn true;\n \t\t\t\t\t\t\t\telse\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tpublic boolean select(String element, HashMap attributes) {\n \t\t\t\t\t\t\t\tif (attributes == null)\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\tString plugin = (String) attributes.get(\"id\"); //$NON-NLS-1$\n \t\t\t\t\t\t\t\treturn fpid.equals(plugin);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t};\n \t\t\t\t\t\tParser p = new Parser(xmlURL);\n \t\t\t\t\t\tHashMap attributes = p.getElement(versionSel);\n \t\t\t\t\t\tif (attributes == null)\n \t\t\t\t\t\t\tcontinue; // bad xml ... skip\n \t\t\t\t\t\tString pluginVersion;\n \t\t\t\t\t\tif ((pluginVersion = (String) attributes.get(\"version\")) == null) //$NON-NLS-1$\n \t\t\t\t\t\t\tcontinue; // bad xml ... skip\n \t\t\t\t\t\tpluginDir += \"_\" + pluginVersion; //$NON-NLS-1$\n \t\t\t\t\t\tvid = new VersionedIdentifier(pluginDir);\n \t\t\t\t\t}\n \n \t\t\t\t\t// do the comparison\n \t\t\t\t\tint result;\n \t\t\t\t\tif ((result = vid.compareVersion(savedVid)) >= 0) {\n \t\t\t\t\t\tif (\"greaterOrEqual\".equals(match)) { //$NON-NLS-1$\n \t\t\t\t\t\t\tif (result > VersionedIdentifier.GREATER_THAN)\n \t\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t} else if (\"compatible\".equals(match)) { //$NON-NLS-1$\n \t\t\t\t\t\t\tif (result > VersionedIdentifier.COMPATIBLE)\n \t\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t} else if (\"equivalent\".equals(match)) { //$NON-NLS-1$\n \t\t\t\t\t\t\tif (result > VersionedIdentifier.EQUIVALENT)\n \t\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t} else if (\"perfect\".equals(match)) { //$NON-NLS-1$\n \t\t\t\t\t\t\tif (result > VersionedIdentifier.EQUAL)\n \t\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t} else if (result > VersionedIdentifier.GREATER_THAN)\n \t\t\t\t\t\t\tcontinue; // use the latest\n \t\t\t\t\t\tsavedVid = vid;\n \t\t\t\t\t\tsavedEntry = plugins[i];\n \t\t\t\t\t\tsavedURL = ((SiteEntry) sites[j]).getResolvedURL();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tif (savedEntry == null)\n \t\t\treturn null;\n \n \t\ttry {\n \t\t\treturn new URL(savedURL, savedEntry);\n \t\t} catch (MalformedURLException e) {\n \t\t\treturn null;\n \t\t}\n \t}",
"public String loadNewPlugin(final String extPointId);",
"public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}",
"public interface PluginBase {\n void init();\n void run();\n}",
"protected abstract String getPluginId();",
"protected abstract PluginManager<String, BaseType> getPluginManager();",
"private void updateConfigurationFromPlugins(URL file) throws IOException {\n \n \t\t// get the actual plugin path\n \t\tURL[] pluginPath = BootLoader.getPluginPath(file);\n \t\tif (pluginPath == null || pluginPath.length == 0)\n \t\t\treturn;\n \n \t\t// create a temp configuration and populate it based on plugin path\n \t\tPlatformConfiguration tempConfig = new PlatformConfiguration((URL) null);\n \t\tfor (int i = 0; i < pluginPath.length; i++) {\n \t\t\tString entry = pluginPath[i].toExternalForm();\n \t\t\tString sitePortion;\n \t\t\tString pluginPortion;\n \t\t\tint ix;\n \t\t\tif (entry.endsWith(\"/\")) { //$NON-NLS-1$\n \t\t\t\t// assume directory path in the form <site>/plugins/\n \t\t\t\t// look for -------------------------------^\n \t\t\t\tix = findEntrySeparator(entry, 2); // second from end\n \t\t\t\tsitePortion = entry.substring(0, ix + 1);\n \t\t\t\tpluginPortion = entry.substring(ix + 1);\n \t\t\t\tif (!pluginPortion.equals(\"plugins/\")) //$NON-NLS-1$\n \t\t\t\t\tcontinue; // unsupported entry ... skip it (\"fragments/\" are handled)\n \t\t\t\tpluginPortion = null;\n \t\t\t} else {\n \t\t\t\t// assume full path in the form <site>/<pluginsDir>/<some.plugin>/plugin.xml\n \t\t\t\t// look for --------------------------^\n \t\t\t\tix = findEntrySeparator(entry, 3); // third from end\n \t\t\t\tsitePortion = entry.substring(0, ix + 1);\n \t\t\t\tpluginPortion = entry.substring(ix + 1);\n \t\t\t}\n \t\t\tif (ix == -1)\n \t\t\t\tcontinue; // bad entry ... skip it\n \n \t\t\tURL siteURL = null;\n \t\t\ttry {\n \t\t\t\tsiteURL = new URL(sitePortion);\n \t\t\t\tif (siteURL.getProtocol().equals(\"file\")) { //$NON-NLS-1$\n \t\t\t\t\tFile sf = new File(siteURL.getFile());\n \t\t\t\t\tString sfn = sf.getAbsolutePath().replace(File.separatorChar, '/');\n \t\t\t\t\tif (!sfn.endsWith(\"/\")) //$NON-NLS-1$\n \t\t\t\t\t\tsfn += \"/\"; //$NON-NLS-1$\n \t\t\t\t\tsiteURL = new URL(\"file:\" + sfn); //$NON-NLS-1$\n \t\t\t\t}\n \t\t\t} catch (MalformedURLException e) {\n \t\t\t\tcontinue; // bad entry ... skip it\n \t\t\t}\n \n \t\t\t// configure existing site or create a new one for the entry\n \t\t\tISiteEntry site = tempConfig.findConfiguredSite(siteURL);\n \t\t\tISitePolicy policy;\n \t\t\tif (site == null) {\n \t\t\t\t// new site\n \t\t\t\tif (pluginPortion == null)\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_EXCLUDE, null);\n \t\t\t\telse\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_INCLUDE, new String[] { pluginPortion });\n \t\t\t\tsite = tempConfig.createSiteEntry(siteURL, policy);\n \t\t\t\ttempConfig.configureSite(site);\n \t\t\t} else {\n \t\t\t\t// existing site\n \t\t\t\tpolicy = site.getSitePolicy();\n \t\t\t\tif (policy.getType() == ISitePolicy.USER_EXCLUDE)\n \t\t\t\t\tcontinue; // redundant entry ... skip it\n \t\t\t\tif (pluginPortion == null) {\n \t\t\t\t\t// directory entry ... change policy to exclusion (with empty list)\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_EXCLUDE, null);\n \t\t\t\t} else {\n \t\t\t\t\t// explicit entry ... add it to the inclusion list\n \t\t\t\t\tArrayList list = new ArrayList(Arrays.asList(policy.getList()));\n \t\t\t\t\tlist.add(pluginPortion);\n \t\t\t\t\tpolicy = tempConfig.createSitePolicy(ISitePolicy.USER_INCLUDE, (String[]) list.toArray(new String[0]));\n \t\t\t\t}\n \t\t\t\tsite.setSitePolicy(policy);\n \t\t\t}\n \t\t}\n \n \t\t// merge resulting site(s) into the specified configuration\n \t\tISiteEntry[] tempSites = tempConfig.getConfiguredSites();\n \t\tfor (int i = 0; i < tempSites.length; i++) {\n \t\t\tconfigureSite(tempSites[i], true /*replace*/\n \t\t\t);\n \t\t}\n \t}",
"public interface PluginAdapterBuild extends PluginAdapterBase {\n\n /**\n * Defines the project frontend directory from where resources should be\n * copied from for use with webpack.\n *\n * @return {@link File}\n */\n\n File frontendResourcesDirectory();\n\n /**\n * Whether to generate a bundle from the project frontend sources or not.\n *\n * @return boolean\n */\n\n boolean generateBundle();\n\n /**\n * Whether to generate embeddable web components from WebComponentExporter\n * inheritors.\n *\n * @return boolean\n */\n\n boolean generateEmbeddableWebComponents();\n\n /**\n * Whether to use byte code scanner strategy to discover frontend\n * components.\n *\n * @return boolean\n */\n boolean optimizeBundle();\n\n /**\n * Whether to run <code>npm install</code> after updating dependencies.\n *\n * @return boolean\n */\n boolean runNpmInstall();\n\n}",
"abstract protected String getWrapperFileNameBase();",
"public interface PluginGateway {\r\n ExecutionResult runPlugin(Object... inputs) throws Exception;\r\n}",
"public interface PluginProvider {\n\n /**\n * Returns an instance of the specified plugin by loading the plugin class through the specified class loader.\n *\n * @param type plugin type class\n * @param className plugin class name\n * @param classLoader class loader to be used to load the plugin class\n * @param <T> plugin type\n * @return instance of the plugin\n * @throws PluginLoadingException if en error occurred when loading or instantiation of the plugin\n */\n <T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;\n}",
"public interface Plugin {\n void doUsefil();\n}",
"public static Object createBeanshellPlugin(String srcContent, String pluginName) throws Exception\n {\n Class coreClass;\n Interpreter i;\n \n i = new Interpreter();\n \n try\n {\n System.out.println(i.eval(srcContent));\n \n String classname = pluginName;\n \n Class newPlugin = i.getNameSpace().getClass(classname);\n \n if( newPlugin != null )\n {\n Object newPluginObject = newPlugin.newInstance();\n \n return newPluginObject;\n }\n else\n {\n throw new Exception(\"Could not load new plugin.\");\n }\n }\n catch( bsh.EvalError e )\n {\n throw new Exception(\"Could not compile plugin \" + e.getMessage(), e);\n }\n catch( Exception e )\n {\n throw new Exception(\"Could not compile plugin \" + e.getMessage(), e);\n }\n }",
"public URL makeBase(URL startingURL);",
"private static String getApPluginRulePath(String pluginUID) {\n return String.format(\"//.okbuck/cache/processor:%s\", getApPluginRuleName(pluginUID));\n }",
"@Override\n public String resolve(String path)\n {\n\n // strip classname\n path = path.substring(path.lastIndexOf(\"/\") + 1);\n\n return path;\n }",
"@Override\n public String getPluginName() {\n return \"Unify server-exporter\";\n }",
"abstract public String getMspluginsDir();",
"public Path getPluginsDirectory()\n {\n return pluginDirectory;\n }",
"private interface FakeVersionedPlugin extends VersionedPlugin, StoragePlugin {\n }",
"private String translateCodebase() {\n if(codebase==null)\n return(codebase);\n if(System.getProperty(\"os.name\").startsWith(\"Win\") && codebase.startsWith(\"file://\")) {\n codebase = \"file:/\"+codebase.substring(7);\n }\n return(codebase);\n }",
"private static String getDirectoryBase(String parentBase) {\n if (parentBase.endsWith(\"/\")) return parentBase;\n int lastSlash = parentBase.lastIndexOf('/');\n return parentBase.substring(0, lastSlash+1);\n }",
"public interface Plugin<T> {\n\t/**\n\t * Method returns the hashmap with loaded plugins. </p> Hashmap is inside\n\t * PluginManager class.\n\t * \n\t * @return hashmap with loaded plugins\n\t */\n\tpublic HashMap<String, T> getStorage();\n\n\t/**\n\t * Method adds the plugin specified in pluginClass param into hashmap with\n\t * param key. </p> Hashmap is inside PluginManager class.\n\t * \n\t * @param key\n\t * to hashmap with added plugin\n\t * @param pluginClass\n\t * of type class to save into hashmap\n\t */\n\tpublic void addPlugin(String key, T pluginClass);\n\n\t/**\n\t * Name of the plugin.\n\t * \n\t * @return name of plugin\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Tests if the plugin has any error\n\t * \n\t * @return true if there is any error.\n\t */\n\tpublic boolean hasError();\n}",
"public static String composePath(URI base, String relativePath) {\n\t\tURI uri = composeURI(base, relativePath);\n\t\tif (uri.isAbsolute()) {\n\t\t\tFile file = new File(uri);\n\t\t\treturn file.toString();\n\t\t} else if (base != null) {\n\t\t\tFile file = new File(new File(base), uri.toString());\n\t\t\treturn file.toString();\n\t\t}\n\t\treturn relativePath;\n\t}",
"@Override\n \tprotected File deriveLocalFileCodeBase(Class<?> baseClass)\n \t{\n \t\t// setup codeBase\n \t\tif (baseClass == null)\n \t\t\tbaseClass = this.getClass();\n \n \t\tPackage basePackage = baseClass.getPackage();\n \t\tString packageName = basePackage.getName();\n \t\tString packageNameAsPath = packageName.replace('.', Files.sep);\n \n \t\tString pathName = System.getProperty(\"user.dir\") + Files.sep;\n \t\tFile path = new File(pathName);\n \t\tString pathString = path.getAbsolutePath();\n \n \t\t// println(\"looking for \" + packageNameAsPath +\" in \" + pathString);\n \n \t\tint packageIndex = pathString.lastIndexOf(packageNameAsPath);\n \t\tif (packageIndex != -1)\n \t\t{\n \t\t\tpathString = pathString.substring(0, packageIndex);\n \t\t\tpath = new File(pathString + Files.sep);\n \t\t}\n \n \t\tcodeBase = new ParsedURL(path);\n \t\tprintln(\"codeBase=\" + codeBase);\n \t\treturn path;\n \t}",
"void publishPlugin(byte[] jarFile);",
"@Override\r\n public String rewriteHost(final String host) {\r\n return this.rewriteHost(getPluginDomains(), host);\r\n }",
"public interface SysPluginService extends BaseService<Sys_plugin> {\n}",
"private void convertToDestinationBase(int convertedToDecimalValue,\n\t\t\tint destinationSystemBase) {\n\t\tStack<Integer> numbers = new Stack<Integer>();\n\t\twhile (convertedToDecimalValue > 0) {\n\t\t\tint remain = convertedToDecimalValue % destinationSystemBase;\n\t\t\tnumbers.push(remain);\n\t\t\tconvertedToDecimalValue /= destinationSystemBase;\n\n\t\t}\n\n\t\t// Adding support for the base 16\n\t\tif (destinationSystemBase == 16) {\n\t\t\tString values = \"0123456789ABCDEF\";\n\t\t\twhile (!numbers.empty()) {\n\t\t\t\tint result = numbers.pop();\n\t\t\t\tthis.convertedValue += values.charAt(result);\n\n\t\t\t}\n\n\t\t} else {\n\t\t\twhile (!numbers.empty()) {\n\t\t\t\tthis.convertedValue += numbers.pop();\n\t\t\t}\n\n\t\t}\n\n\t}",
"public String getPluginPath() {\n return pluginPath;\n }",
"public interface Renameable {\r\n\t/**\r\n\t * Gibt den Key des Plugin zurück. Den Klassenname.\r\n\t * \r\n\t * @return String den Key des Plugin, der Klassenname\r\n\t */\r\n\tString getPluginKey();\r\n\r\n\t/**\r\n\t * Gibt die Beschreibung des Rename Plugin zurück.\r\n\t * \r\n\t * @return String die Beschreibung des Plugin\r\n\t */\r\n\tString getPluginBeschreibung();\r\n\r\n\t/**\r\n\t * Setzt die Datei die geändert werden soll. Die Quelldatei.\r\n\t * \r\n\t * @param pvDatei\r\n\t * die Quelldatei Datei die geändert werden soll.\r\n\t */\r\n\tvoid setDateiname(File pvDatei);\r\n\r\n\t/**\r\n\t * Gibt den neuen Dateiname zurück. Der Zieldatei Name.\r\n\t * \r\n\t * @return String mit den neuen Zieldatei Name\r\n\t */\r\n\tString getZielDateiname();\r\n\r\n\t/**\r\n\t * Gibt das Zielverzeichnis zurück.\r\n\t * \r\n\t * @return gibt das Ziel Verzeichnis\r\n\t */\r\n\tString getZielPfad();\r\n\r\n\t/**\r\n\t * Gibt die Klasse zurück, die die Gui implementiert.\r\n\t * \r\n\t * @return String der Klasse die die Gui implementiert\r\n\t */\r\n\tString getGuiClass();\r\n\r\n\t/**\r\n\t * Gibt das Gui Panel Objekt zurück.\r\n\t * \r\n\t * @return das Gui Panel Object\r\n\t */\r\n\tOptionGuiable getGuiObject();\r\n}",
"public interface IPluginManager {\n\tpublic BasePluginPackage initPlugin(String pluginPath);\n\n\tpublic BasePluginPackage getPluginPackage(String packageName);\n\n\tpublic Class loadPluginClass(BasePluginPackage basePluginPackage, String className);\n}",
"private String prepareLocation (String location)\n\t{\n\t\tlocation = Utils.pathFixer (location);\n\t\tif (location.startsWith (\"./\"))\n\t\t\tlocation = location.substring (1);\n\t\t\n\t\tif (!location.startsWith (\"/\"))\n\t\t\tlocation = \"/\" + location;\n\t\t\n\t\treturn location;\n\t}",
"protected static String getApPluginRuleName(String pluginUID) {\n return String.format(\"processor_%s\", pluginUID);\n }",
"private PluginLoader<Object> createPluginLoader() {\n return PluginLoader.forType(Object.class)\n .ifVersionGreaterOrEqualTo(JAVA_9).load(pluginTypeBetweenJava9AndJava13.getName())\n .ifVersionGreaterOrEqualTo(JAVA_14).load(pluginTypeAfterJava13.getName())\n .fallback(newInstance(pluginTypeBeforeJava9));\n }",
"public native void loadPlugin(final String plugin);",
"public static String getAbsoluteResourcePath(String resourcePathInPlugin) {\r\n String pluginPath = RichFacesTemplatesActivator.getPluginResourcePath();\r\n IPath pluginFile = new Path(pluginPath);\r\n File file = pluginFile.append(resourcePathInPlugin).toFile();\r\n if (file.exists()) {\r\n return file.getAbsolutePath();\r\n } else {\r\n throw new IllegalArgumentException(\"Can't get path for \" //$NON-NLS-1$\r\n + resourcePathInPlugin);\r\n }\r\n }",
"protected static String convertHex( String base )\r\n\t{\r\n\t\treturn \"H\" + HexConvertor.convertHex( base.getBytes() ); \r\n\t}",
"public void setPluginName(String pluginName);",
"public void loadPluginsStartup();",
"public void initialize(File base) {\n \t\tFile[] bundles = bundleLocations == null ? new File[] {new File(base, \"plugins\")} : bundleLocations; //$NON-NLS-1$\n \t\tFile features = featuresLocation == null ? new File(base, \"features\") : featuresLocation; //$NON-NLS-1$\n \t\tFile executable = executableLocation == null ? new File(base, getDefaultExecutableName(os)) : executableLocation;\n \t\tFile configuration = configLocation == null ? new File(base, \"configuration\") : configLocation; //$NON-NLS-1$\n \n \t\tinitialize(base, configuration, executable, bundles, features);\n \t}",
"public void addPlugin(String key, T pluginClass);",
"<T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;",
"abstract public void setMspluginsDir(String path);",
"@Override\n public String getPluginId() {\n return PLUGIN_ID;\n }",
"public void reloadMsPlugins(String path);",
"public URL getResource(String resource) {\n\t\tif (resource.equals(\"/\" + PLUGIN_NAME) || resource.equals(\"/\" + PLUGIN_NAME + \"/\"))\n\t\t\treturn null;\n\n\t\tresource = resource.replaceAll(PLUGIN_NAME + \"/\", \"\");\n\t\tif (resource.startsWith(\"/\"))\n\t\t\tresource = resource.substring(1);\n\n\t\tURL url = getClass().getResource(resource);\n\t\treturn url;\n\t}",
"private String getPluginName(HttpServletRequest request) {\n String url = request.getRequestURI();\n\n // /report/PluginName\n if (url.startsWith(\"//report/\")) {\n return url.substring(\"//report/\".length());\n }\n\n else if (url.startsWith(\"/report/\")) {\n return url.substring(\"/report/\".length());\n }\n\n // /report.php?plugin=PluginName\n else if (url.startsWith(\"/report.php?plugin=\")) {\n return url.substring(\"/report.php?plugin=\".length());\n }\n\n return null;\n }",
"public interface IPluginLibrary {\n \n /*\n * Initializes the library\n */\n public void initialize(DefaultPluginsCollector collector);\n \n /*\n * Start the module and initialize components\n */\n public void startLibrary();\n \n /*\n * Fetches all extensions for the given extension point qualifiers.\n * \n * @param extPointId The extension point id to gather plugins for\n * \n * @return The gathered plugins in a LinkedList\n */\n public void loadAllPlugins(final String extPointId);\n \n /*\n * Fetches new extensions for the given extension point qualifiers.\n * \n * @param extPointId The extension point id to gather plugins for\n * \n * @return A human readable string\n */\n public String loadNewPlugin(final String extPointId); \n \n /**\n * Checks a plugin for validity.\n * \n * @param plugin The plugin to check\n * @param The level to test against, this method will return true if the result is greater or\n * equal than the testLevel\n * @return true or false\n */\n public boolean isValidPlugin(MartinPlugin plugin, MartinAPITestResult testLevel);\n\n /**\n * Answer a request by searching plugin-library for function and executing\n * them.\n * \n * @param req The {@link ExtendedQequest} to answer.\n * \n * @return The generated {@link MResponse}.\n */\n public MResponse executeRequest(ExtendedRequest req);\n\n \n public List<PluginInformation> getPluginInformation();\n \n /**\n * Returns a list of example calls read from the plugin database. Is usually\n * only called from the AI controller when the user first loads the MArtIn\n * frontend.\n * \n * @return a list of example calls\n */\n public List<MExampleCall> getExampleCalls();\n \n /**\n * Returns a list of 5 randomly choosen example calls read from the plugin database. Is usually\n * only called from the AI controller when the user first loads the MArtIn\n * frontend.\n * \n * @return a list of 5 randomly choosen example calls\n */\n public List<MExampleCall> getRandomExampleCalls();\n \n public Map<String, Pair<Boolean, MartinPlugin> > getPluginExtentions();\n}",
"public synchronized Path getPluginPath( Plugin plugin )\n {\n final String canonicalName = getCanonicalName( plugin );\n if ( canonicalName != null )\n {\n return pluginDirs.get( canonicalName );\n }\n return null;\n }",
"static String makeAuId(String baseUrlPath) {\n String baseUrlHost = \"import%2Elockss%2Eorg\";\n return PLUGIN_KEY + \"&base_url~http%3A%2F%2F\" + baseUrlHost + \"%2F\"\n\t+ baseUrlPath;\n }",
"@Override\n\tpublic void addPlugin(ComponentPlugin plugin) throws Exception {\n\n\t}",
"ResourceLocation withExtension(String newExtension);",
"void bootPlugins() {\n\t\tList<List<String>>vals = (List<List<String>>)properties.get(\"PlugInConnectors\");\n\t\tif (vals != null && vals.size() > 0) {\n\t\t\tString name, path;\n\t\t\tIPluginConnector pc;\n\t\t\tList<String>cntr;\n\t\t\tIterator<List<String>>itr = vals.iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tcntr = itr.next();\n\t\t\t\tname = cntr.get(0);\n\t\t\t\tpath = cntr.get(1);\n\t\t\t\ttry {\n\t\t\t\t\tpc = (IPluginConnector)Class.forName(path).newInstance();\n\t\t\t\t\tpc.init(this, name);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogError(e.getMessage(), e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public interface GeoServerPluginConfigurator {\r\n \r\n /**\r\n * Get the list of Resources used by the plugin.\r\n * \r\n * @return\r\n * @throws IOException\r\n */\r\n public List<Resource> getFileLocations() throws IOException;\r\n \r\n /**\r\n * Allows the plugin to store its configuration on the target {@link GeoServerResourceLoader}.\r\n * This way we delegate the plugin to save its configuration since it is the only\r\n * on who knows how to do it better.\r\n * \r\n * @param resourceLoader\r\n * @throws IOException\r\n */\r\n public void saveConfiguration(GeoServerResourceLoader resourceLoader) throws IOException;\r\n \r\n /**\r\n * Allows the plugin to reload its configuration from the target {@link GeoServerResourceLoader}.\r\n * This way we delegate the plugin to load its configuration since it is the only\r\n * on who knows how to do it better.\r\n * \r\n * @param resourceLoader\r\n * @throws IOException\r\n */\r\n public void loadConfiguration(GeoServerResourceLoader resourceLoader) throws IOException;\r\n\r\n}",
"public static String resolveImportURI(String baseURI, String importURI) {\r\n if (importURI == null) {\r\n throw new IllegalArgumentException(\"importURI is null.\");\r\n }\r\n // case 1: absolute URI of a remote file\r\n if (importURI.startsWith(HTTP_PREFIX) ||\r\n importURI.startsWith(HTTPS_PREFIX) ||\r\n importURI.startsWith(FTP_PREFIX)) {\r\n return importURI;\r\n }\r\n // case 2: absolute URI of a local file\r\n if (importURI.startsWith(FILE_PREFIX)) {\r\n return importURI.replaceFirst(FILE_PREFIX, \"\");\r\n }\r\n // case 3: absolute file path of a local file\r\n Path path = Paths.get(importURI);\r\n if (path.isAbsolute()) {\r\n return importURI;\r\n }\r\n if (baseURI == null) {\r\n throw new IllegalArgumentException(\"baseURI is null.\");\r\n }\r\n // case 4: relative URI of a remote file\r\n if (baseURI.startsWith(HTTP_PREFIX) ||\r\n baseURI.startsWith(HTTPS_PREFIX) ||\r\n baseURI.startsWith(FTP_PREFIX)) {\r\n return baseURI.endsWith(\"/\") ? baseURI + importURI : baseURI + \"/\" + importURI;\r\n }\r\n // case 5: relative URI of a local file\r\n if (baseURI.startsWith(FILE_PREFIX)) {\r\n baseURI = baseURI.replaceFirst(FILE_PREFIX, \"\");\r\n return baseURI.endsWith(\"/\") ? baseURI + importURI : baseURI + \"/\" + importURI;\r\n }\r\n // case 6: relative file path of a local file\r\n path = Paths.get(baseURI, importURI);\r\n return path.toString();\r\n }",
"protected void pluginInitialize() {}",
"private void fillPluginList() {\n\t\tlesSitesPlugin = new ArrayList<HashMap<String, String>>();\n\t\tcategories = new ArrayList<String>();\n\t\tPackageManager packageManager = getPackageManager();\n\t\tIntent baseIntent = new Intent(ACTION_PICK_PLUGIN);\n\t\tbaseIntent.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION);\n\t\tList<ResolveInfo> list = packageManager.queryIntentServices(baseIntent, PackageManager.GET_RESOLVED_FILTER);\n\t\tfor (int i = 0; i < list.size(); ++i) {\n\t\t\tResolveInfo info = list.get(i);\n\t\t\tServiceInfo sinfo = info.serviceInfo;\n\t\t\t IntentFilter filter = info.filter;\n\t\t\tNotification.log(tag, \"taille de la liste de Plugin: \" + i + 1 + \"; sinfo: \" + sinfo);\n\t\t\tif (sinfo != null) {\n\t\t\t\t HashMap<String, String> item = new HashMap<String, String>();\n\t\t\t\t item.put(KEY_PKG, sinfo.packageName); // nom du package\n//\t\t\t\t item.put(KEY_SERVICENAME, StringLt.lastSegment(sinfo.name, '.')); // nom du plugin\n\t\t\t\t item.put(KEY_SERVICENAME, sinfo.name);\n\t\t\t\t String firstCategory = null;\n\t\t\t\t if (filter != null) {\n\t\t\t\t StringBuilder actions = new StringBuilder();\n\t\t\t\t for (Iterator<String> actionIterator = filter.actionsIterator(); actionIterator.hasNext();) {\n\t\t\t\t String action = actionIterator.next();\n\t\t\t\t if (actions.length() > 0)\n\t\t\t\t actions.append(\",\");\n\t\t\t\t actions.append(action);\n\t\t\t\t }\n\t\t\t\t StringBuilder categories = new StringBuilder();\n\t\t\t\t for (Iterator<String> categoryIterator = filter.categoriesIterator(); categoryIterator.hasNext();) {\n\t\t\t\t String category = categoryIterator.next();\n\t\t\t\t if (firstCategory == null)\n\t\t\t\t firstCategory = category;\n\t\t\t\t if (categories.length() > 0)\n\t\t\t\t categories.append(\",\");\n\t\t\t\t categories.append(category);\n\t\t\t\t }\n\t\t\t\t// item.put(KEY_ACTIONS, new\n\t\t\t\t// String(StringLt.lastSegment(actions.toString(), '.')));\n\t\t\t\t// item.put(KEY_CATEGORIES, new\n\t\t\t\t// String(StringLt.lastSegment(categories.toString(),\n\t\t\t\t// '.')));\n\t\t\t\t item.put(KEY_ACTIONS, new String(actions));\n\t\t\t\t item.put(KEY_CATEGORIES, new String(categories));\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t item.put(KEY_ACTIONS, \"<null>\");\n\t\t\t\t item.put(KEY_CATEGORIES, \"<null>\");\n\t\t\t\t }\n\t\t\t\t if (firstCategory == null)\n\t\t\t\t firstCategory = \"\";\n\t\t\t\t categories.add(firstCategory);\n\t\t\t\t lesSitesPlugin.add(item);\n\t\t\t\t// lesSitesPlugin.add(StringLt.lastSegment(sinfo.name, '.'));\n\t\t\t\tlesSites.add(StringLt.lastSegment(sinfo.name, '.'));\n\t\t\t}\n\t\t}\n\t}",
"private String prepareExtension(final String ext) {\n if (ext.contains(\":\")) {\n return ext;\n }\n return \"org.apache.geronimo.arthur.knights:\" + ext + (ext.endsWith(\"-knight\") ? \"\" : \"-knight\") + ':' + lookupVersion();\n }",
"public NormalizationPlugin(String menuLabel, String pluginFileName)\n {\n super(menuLabel, pluginFileName);\n }",
"public synchronized String getCanonicalName( Plugin plugin )\n {\n for ( Map.Entry<String, Plugin> entry : pluginsLoaded.entrySet() )\n {\n if ( entry.getValue().equals( plugin ) )\n {\n return entry.getKey();\n }\n }\n return null;\n }",
"private static void initPlugins() {\n \tJSPFProperties props = new JSPFProperties();\n PluginManager pm = PluginManagerFactory.createPluginManager(props);\n pm.addPluginsFrom(new File(\"plugins/\").toURI());\n JavaBot.plugins = new PluginManagerUtil(pm).getPlugins(javaBotPlugin.class);\n }",
"private static String normalizeUrlPath(String baseUrl) {\n if (!baseUrl.matches(\".*/$\")) {\n return baseUrl + \"/\";\n }\n return baseUrl;\n }",
"public void mapResourceNameToCodeBaseEntry(String resourceName, ICodeBaseEntry codeBaseEntry);",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"public NormalizationPlugin()\n {\n super(\"Normalization\");\n }",
"synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}",
"private Plugin getPluginVersionFromPluginManagement( Plugin plugin )\n {\n\n if ( !isPluginManagementDefined() )\n {\n return plugin;\n }\n\n if ( isPluginVersionDefined( plugin ) )\n {\n return plugin;\n }\n\n Map<String, Plugin> plugins = getMavenProject().getPluginManagement().getPluginsAsMap();\n\n Plugin result = plugins.get( plugin.getKey() );\n if ( result == null )\n {\n return plugin;\n }\n else\n {\n return result;\n }\n }",
"@Override\n public void register(PluginAPI api){\n if(api instanceof VPluginAPI){\n VPluginAPI vapi = (VPluginAPI) api;\n vapi.addComponent(ODECreator.class);\n vapi.addComponent(ODESolver.class);\n }\n }",
"protected String getTildered(String wrappedUri) {\r\n\t\treturn wrappedUri.replaceAll(\"~\", \"~0\").replaceAll(\"/\", \"~1\");\r\n\t}",
"public static Path getPluginsDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null)).resolve(PLUGINS_DIR);\n\t}",
"public String getPluginClass() {\n return pluginClass;\n }",
"public URL standardizeURL(URL startingURL);",
"private PluginsInternal() {}",
"public String normalizePathName( final String name );",
"private URI findBaseUrl0(String stringUrl) throws URISyntaxException {\n stringUrl = stringUrl.replace(\"\\\\\", \"/\");\n int qindex = stringUrl.indexOf(\"?\");\n if (qindex != -1) {\n // stuff after the ? tends to make the Java URL parser burp.\n stringUrl = stringUrl.substring(0, qindex);\n }\n URI url = new URI(stringUrl);\n URI baseUrl = new URI(url.getScheme(), url.getAuthority(), url.getPath(), null, null);\n\n String path = baseUrl.getPath().substring(1); // toss the leading /\n String[] pieces = path.split(\"/\");\n List<String> urlSlashes = new ArrayList<String>();\n // reverse\n for (String piece : pieces) {\n urlSlashes.add(piece);\n }\n List<String> cleanedSegments = new ArrayList<String>();\n String possibleType = \"\";\n boolean del;\n\n for (int i = 0; i < urlSlashes.size(); i++) {\n String segment = urlSlashes.get(i);\n\n // Split off and save anything that looks like a file type.\n if (segment.indexOf(\".\") != -1) {\n possibleType = segment.split(\"\\\\.\")[1];\n\n /*\n * If the type isn't alpha-only, it's probably not actually a file extension.\n */\n if (!possibleType.matches(\"[^a-zA-Z]\")) {\n segment = segment.split(\"\\\\.\")[0];\n }\n }\n\n /**\n * EW-CMS specific segment replacement. Ugly. Example:\n * http://www.ew.com/ew/article/0,,20313460_20369436,00.html\n **/\n if (segment.indexOf(\",00\") != -1) {\n segment = segment.replaceFirst(\",00\", \"\");\n }\n\n // If our first or second segment has anything looking like a page\n // number, remove it.\n /* Javascript code has some /i's here, we might need to fiddle */\n Matcher pnMatcher = Patterns.PAGE_NUMBER_LIKE.matcher(segment);\n if (pnMatcher.matches() && ((i == 1) || (i == 0))) {\n segment = pnMatcher.replaceAll(\"\");\n }\n\n del = false;\n\n /*\n * If this is purely a number, and it's the first or second segment, it's probably a page number.\n * Remove it.\n */\n if (i < 2 && segment.matches(\"^\\\\d{1,2}$\")) {\n del = true;\n }\n\n /* If this is the first segment and it's just \"index\", remove it. */\n if (i == 0 && segment.toLowerCase() == \"index\")\n del = true;\n\n /*\n * If our first or second segment is smaller than 3 characters, and the first segment was purely\n * alphas, remove it.\n */\n /* /i again */\n if (i < 2 && segment.length() < 3 && !urlSlashes.get(0).matches(\"[a-z]\"))\n del = true;\n\n /* If it's not marked for deletion, push it to cleanedSegments. */\n if (!del) {\n cleanedSegments.add(segment);\n }\n }\n\n String cleanedPath = \"\";\n for (String s : cleanedSegments) {\n cleanedPath = cleanedPath + s;\n cleanedPath = cleanedPath + \"/\";\n }\n URI cleaned = new URI(url.getScheme(), url.getAuthority(), \"/\"\n + cleanedPath.substring(0, cleanedPath\n .length() - 1), null, null);\n return cleaned;\n }",
"public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n String str;\n super.beforeHookedMethod(methodHookParam);\n String str2 = (String) methodHookParam.args[0];\n if (str2.startsWith(ExposedBridge.BASE_DIR)) {\n Object[] objArr = methodHookParam.args;\n String str3 = ExposedBridge.BASE_DIR;\n if (str2.equals(ExposedBridge.BASE_DIR)) {\n str = str;\n } else {\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\"/exposed_\");\n str = sb.toString();\n }\n objArr[0] = str2.replace(str3, str);\n }\n }",
"public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n String str;\n super.beforeHookedMethod(methodHookParam);\n String str2 = (String) methodHookParam.args[0];\n if (str2.startsWith(ExposedBridge.BASE_DIR)) {\n Object[] objArr = methodHookParam.args;\n String str3 = ExposedBridge.BASE_DIR;\n if (str2.equals(ExposedBridge.BASE_DIR)) {\n str = str;\n } else {\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\"/exposed_\");\n str = sb.toString();\n }\n objArr[0] = str2.replace(str3, str);\n }\n }",
"public void load(Maussentials plugin);",
"public final static String transformUrl(String url) {\n \n int c = url.indexOf('?');\n if (c > -1) {\n url = url.substring(0, c);\n }\n \n // temporary work around to enable authorization on opendap URLs\n url = url.replace(\"dodsC\", \"fileServer\").replace(\".ascii\", \"\").replace(\".dods\", \"\").replace(\".das\", \"\").replace(\".ddds\", \"\");\n \n return url;\n }",
"public static String toRelativeURL(URL base, URL target) {\n\t\t// Precondition: If URL is a path to folder, then it must end with '/'\n\t\t// character.\n\t\tif ((base.getProtocol().equals(target.getProtocol()))\n\t\t\t\t|| (base.getHost().equals(target.getHost()))) { // changed this logic symbol\n\n\t\t\tString baseString = base.getFile();\n\t\t\tString targetString = target.getFile();\n\t\t\tString result = \"\";\n\n\t\t\t// remove filename from URL\n\t\t\tbaseString = baseString.substring(0,\n\t\t\t\t\tbaseString.lastIndexOf(\"/\") + 1);\n\n\t\t\t// remove filename from URL\n\t\t\ttargetString = targetString.substring(0,\n\t\t\t\t\ttargetString.lastIndexOf(\"/\") + 1);\n\n\t\t\tStringTokenizer baseTokens = new StringTokenizer(baseString, \"/\");// Maybe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// causes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// problems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// under\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// windows\n\t\t\tStringTokenizer targetTokens = new StringTokenizer(targetString,\n\t\t\t\t\t\"/\");// Maybe this causes problems under windows\n\n\t\t\tString nextBaseToken = \"\", nextTargetToken = \"\";\n\n\t\t\t// Algorithm\n\n\t\t\twhile (baseTokens.hasMoreTokens() && targetTokens.hasMoreTokens()) {\n\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tif (!(nextBaseToken.equals(nextTargetToken))) {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\t\t\tif (!baseTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t\t\t\tif (!targetTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\tString temp = target.getFile(); // to string\n\t\t\t\t\tresult = result.concat(temp.substring(\n\t\t\t\t\t\t\ttemp.lastIndexOf(\"/\") + 1, temp.length()));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (baseTokens.hasMoreTokens()) {\n\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\tbaseTokens.nextToken();\n\t\t\t}\n\n\t\t\twhile (targetTokens.hasMoreTokens()) {\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t}\n\n\t\t\tString temp = target.getFile(); // to string\n\t\t\tresult = result.concat(temp.substring(temp.lastIndexOf(\"/\") + 1,\n\t\t\t\t\ttemp.length()));\n\t\t\treturn result;\n\t\t}\n\t\treturn target.toString();\n\t}",
"@Override\r\n\tpublic void configPlugin(Plugins me) {\n\r\n\t}",
"public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }",
"@Beta\npublic interface PluginEndpoint {\n /**\n * get the type of method parameter\n *\n * @return Type of method's first parameter\n * @throws IllegalArgumentException if argument list is empty\n */\n Type getMethodParameterType() throws IllegalArgumentException;\n\n /**\n * get the return type of plugin method\n *\n * @return return type of method\n */\n Type getResultType();\n\n /**\n * invoke method with the request object as parameter.\n *\n * @param reqest request object\n * @return result from invoking the object\n * @throws IOException when instantiating plugin before invoking method on it\n * @throws ClassNotFoundException when instantiating plugin before invoking method on it\n * @throws InvocationTargetException method invoke can throw\n * @throws IllegalAccessException method invoke can throw\n * @throws IllegalArgumentException method invoke can throw\n */\n Object invoke(Object reqest) throws IOException, ClassNotFoundException,\n InvocationTargetException, IllegalAccessException, IllegalArgumentException;\n}",
"protected static String getFilename(String base) {\n //return Integer.toHexString(base.hashCode()) + \".map\";\n return base + \".map\";\n }",
"private static Map<String, IInterfaceDefinition> generateExtensionInterfaces(\n\t\t\tEnvironment result, Environment ext, Environment base)\n\t{\n\t\tMap<String, IInterfaceDefinition> replacementMap = new HashMap<String, IInterfaceDefinition>();\n\t\tfor (IInterfaceDefinition iDef : ext.getInterfaces())\n\t\t{\n\t\t\tif (willGenerateExtensionFor(iDef, base))\n\t\t\t{\n\t\t\t\t// Lookup base production in the base environment, e.g. the one\n\t\t\t\t// to extend\n\t\t\t\tIInterfaceDefinition baseProduction = base.lookUpType(iDef.getName().getName());\n\n\t\t\t\t// Create the new Cml Production as a sub-interface of the base\n\t\t\t\t// production\n\t\t\t\tJavaName newName = makeExtensionJavaName(baseProduction, ext, base, iDef.getName().getPackageName());\n\t\t\t\tInterfaceDefinition extProduction = new InterfaceDefinition(newName, result.getAstPackage());\n\t\t\t\textProduction.supers.add(baseProduction);\n\n\t\t\t\t// Update mapping, in the result environment the new extension\n\t\t\t\t// node is a sub-interface for the baseProduction node.\n\t\t\t\tresult.addCommonTreeInterface(extProduction, baseProduction);\n\n\t\t\t\t// Add the newly generated interface to the interface list in\n\t\t\t\t// the result env.\n\t\t\t\tresult.getInterfaces().add(extProduction);\n\n\t\t\t\t// Alternatives and base classes in ext current has Production\n\t\t\t\t// and SubProduction nodes from the ext environment that should\n\t\t\t\t// not exist as super Def and in their interface-lists. The same\n\t\t\t\t// is true for method and field definition inside each\n\t\t\t\t// IInterface- and IClassDefinition.\n\t\t\t\t//\n\t\t\t\t// The replacement map will help us later to fix this by mapping\n\t\t\t\t// the\n\t\t\t\t// wrongly generated names to the extended names that we wish to\n\t\t\t\t// use.\n\t\t\t\t//\n\t\t\t\t// Example:\n\t\t\t\t//\n\t\t\t\t// PExp is extended with an alternative AFatBraceExp\n\t\t\t\t//\n\t\t\t\t// We generate: PCmlExp, PCmlExpBase which shall become the\n\t\t\t\t// parent-hierarchy\n\t\t\t\t// for AFatBraceExp. However, the AFatBraceExp has PExp and\n\t\t\t\t// PExpBase from the\n\t\t\t\t// ext environment is its parent hierarchy currently. The\n\t\t\t\t// replacement map\n\t\t\t\t// will help us fix this later.\n\t\t\t\treplacementMap.put(baseProduction.getName().getName(), extProduction);\n\t\t\t}\n\t\t}\n\t\treturn replacementMap;\n\t}",
"@Override\n public void executeByPluginType(String contentType) {\n pluginFactory\n .getPlugin(contentType)\n .otherOutput();\n }",
"public String getPlugin() {\n\t\treturn adaptee.getPlugin();\n\t}",
"private Plugin loadPlugin(String p) {\n Plugin plugin = this.getServer().getPluginManager().getPlugin(p);\n if (plugin != null && plugin.isEnabled()) {\n getLogger().info(\" Using \" + plugin.getDescription().getName() + \" (v\" + plugin.getDescription().getVersion() + \")\");\n return plugin;\n }\n return null;\n }",
"protected void setBaseNameFromName(String name) {\n int lastDot = name.lastIndexOf(\".\");\n this.baseName = (lastDot == -1) ? name : name.substring(0, lastDot);\n }",
"public String getPluginClass() {\n return pluginClass;\n }",
"private String reassemble(int start, String[] split)\n {\n int count = split.length - start;\n\n if (count == 0)\n return null;\n\n if (count == 1)\n return split[split.length - 1];\n\n StringBuffer buffer = new StringBuffer();\n\n for (int i = start; i < split.length; i++)\n {\n if (i > start)\n buffer.append('.');\n\n buffer.append(split[i]);\n }\n\n return buffer.toString();\n }",
"public PluginManager( Path pluginDir )\n {\n this.pluginDirectory = pluginDir;\n pluginMonitor = new PluginMonitor( this );\n }",
"private static ArrayIterator<String> splitString(String base, String delimiter) {\r\n\t\tString[] substrings = base.split(delimiter);\r\n\t\treturn ArrayIterator.create(substrings);\r\n\t}"
] |
[
"0.5775518",
"0.54485714",
"0.52432775",
"0.5166743",
"0.5135268",
"0.5031496",
"0.50280374",
"0.49607596",
"0.49528167",
"0.4936063",
"0.48140913",
"0.4734469",
"0.4715251",
"0.4702402",
"0.46896186",
"0.4681995",
"0.4640018",
"0.46042877",
"0.46017694",
"0.45912156",
"0.4584947",
"0.45088217",
"0.45076117",
"0.449315",
"0.4485734",
"0.4482452",
"0.4478687",
"0.44670358",
"0.44578996",
"0.4442432",
"0.4433997",
"0.44085267",
"0.44018495",
"0.43956318",
"0.43931258",
"0.4381037",
"0.4379104",
"0.43666053",
"0.43657297",
"0.43578288",
"0.43540195",
"0.43427247",
"0.43258852",
"0.43220773",
"0.43160382",
"0.431525",
"0.4306792",
"0.4302747",
"0.42970568",
"0.42932704",
"0.4278493",
"0.4275057",
"0.4270925",
"0.42640275",
"0.42524642",
"0.4248363",
"0.42432675",
"0.42330536",
"0.41967764",
"0.41932434",
"0.41714305",
"0.41704836",
"0.41681764",
"0.4147722",
"0.4147598",
"0.4145862",
"0.414551",
"0.41437736",
"0.4142061",
"0.41254735",
"0.411865",
"0.41168293",
"0.41040456",
"0.40988937",
"0.4096554",
"0.40962693",
"0.40948856",
"0.40932035",
"0.40929952",
"0.4085714",
"0.40822822",
"0.40765184",
"0.40532336",
"0.40532336",
"0.40490997",
"0.40442327",
"0.40401083",
"0.40329647",
"0.40323508",
"0.40301904",
"0.40213102",
"0.401824",
"0.40066987",
"0.40065724",
"0.40057045",
"0.40007907",
"0.39789057",
"0.39783353",
"0.39775455",
"0.39768273"
] |
0.4919463
|
10
|
////////////////// C T O R //////////////////////////// Ctor for a new player.
|
public Player(final double xCoordinate, final double yCoordinate, final double playerVelocity) {
super(xCoordinate, yCoordinate, PLAYER_SIZE, playerVelocity);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Player() {\t\n\t}",
"public Player(){}",
"public Player(){}",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"public Player(){\r\n\r\n }",
"public Player(){\n\n }",
"public Player() {\n this(\"\", \"\", \"\");\n }",
"public AbstractPlayer() {\r\n }",
"public Player(){\n default_init();\n }",
"public GamePlayer() {}",
"public Player(String name) {\n this(name, null);\n }",
"public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}",
"Player(String playerName) {\n this.playerName = playerName;\n }",
"public Multi_Player()\r\n {\r\n \r\n }",
"Player createPlayer();",
"public Player(){\r\n\t\tname = \"\";\r\n\t\tchip = 0;\r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}",
"public Player(String name) {\r\n this.name = name;\r\n }",
"public Player(String name)\n\t{\n\t\tthis.name = name;\n\t}",
"public StudentPlayer() {\n super(\"260740998\");\n }",
"public TestPlayer()\n {\n }",
"public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}",
"public StudentPlayer() {\n super(\"260719721\");\n }",
"void createPlayer(Player player);",
"public StudentPlayer() {\r\n super(\"260767897\");\r\n }",
"public StudentPlayer() {\n super(\"260622641\");\n }",
"public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }",
"public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }",
"public Player(String name) {\n setName(name);\n setId(++idCounter);\n setHealthPoints(100);\n setYourTurn(false);\n }",
"public Player()\n\t{\n\t\tsetUserName(\"\");\n\t\tsetFamilyName(\"\");\n\t\tsetGivenName(\"\");\n\t\tsetGamesPlayed(0);\n\t\tsetGamesWon(0);\n\t\tsetGamesDrawn(0);\n\t}",
"public RandomPlayer() {\n\t\tsuper(\"Random\");\n\t}",
"public Player()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.numPlayed = 0;\n\t\tthis.numCompleted = 0;\n\t\tthis.averageTime = new Time(0);\n\t\tthis.bestTime = new Time(0);\n\t\tthis.accuracy = 0;\n\t}",
"public HumanPlayer(String name) {\n super(name);\n }",
"public Player() {\r\n\t\tname=null;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n }",
"public Player(String playerId) {\n\t\tthis.playerid = playerId;\n\t\tthis.pieceType = null;\n\t}",
"public Player2(){\n super();\n name=\"110\";\n }",
"public Player() {\n hand = new Hand();\n }",
"Player()\n\t{\n\t\tiHP = 30;\n\t\tstrEquippedWeapon = \"None\";\n\t\tiLocation = 1;\n\t\tblnPlayerState = true;\n\t\tblnPlayerVictory = false;\n\t\tblnSearchedDirt = false;\n\t\tblnSearchedBarrels = false;\n\t\t\n\t}",
"public computerPlayer(Player player) {\n\t\tsuper(player);\n\t\t\n\t}",
"public Player(String inName)\n {\n // initialise instance variables\n mName = inName;\n mBrokenRules = new RuleBook();\n }",
"public Player(String name)\n\t{\n\t\tthis.money = START_MONEY;\n\t\tthis.name = name;\n\t}",
"public Player(String name) {\n this.NAME = name;\n this.ownedCountries = new ArrayList<>();\n this.totArmyCount = 0;\n this.PlayerTurn = false;\n }",
"public Player(String nickname) {\n this(nickname, -1, -1);\n }",
"public Player()\n // POST: A default Player object is created with all class members set to 0\n\t{\n\t\tthis(2000, 0);\n\t}",
"public Player(String s) //only constructor\n {\n \tsuper(s,1,false);\n \tposition=-1;\n \tship=false;\n \tSetHealth();\n \tSetWealth();\n }",
"public Player(String name) {\n this.name = name;\n this.points = 0;\n }",
"public Player(Othello othello, char player) {\n\t\tthis.othello=othello;\n\t\tthis.player=player;\n\t\tthis.type = null;\n\t}",
"Player(String name){\n\t\tthis.name = name;\n\t}",
"public Player(String Name)\n {\n // initialise instance variables\n score = 0;\n energy = 100;\n this.name = Name;\n items = new ArrayList<>();\n }",
"public Player(String username)\n\t{\n\t\tm_username = username;\n\t\tm_requests = new HashMap<String, RequestType>();\n\t}",
"public Player() {\n\n\t\tnumberOfPlayers++;\n\t\tthis.playerNumber = \"Player \" + numberOfPlayers; \n\t\tthis.balance = 500.00; \n\t\tthis.numberOfLoans = 0;\n\t\tthis.score = 0;\n\t\tthis.inRound = true; \n\t}",
"public Player(){\n reset();\n }",
"public Player() {\n//\t\thand = new Hand();\n\t\tthis.cardsInhand = new ArrayList<Card>();\n\t}",
"public Player(String name)\n { \n if (name == \"\")\n {\n setName(\"Anonymous\");\n }\n else\n {\n setName(name);\n }\n }",
"public FootballPlayerV3()\n {\n }",
"public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}",
"public Player(String type){\n \n this.type = type;\n }",
"public Player(String name) {\n this.name = name;\n gameDeck = new Deck(false);\n wonDeck = new Deck(false);\n }",
"public Player(String nickname, String color) {\n //Creating objects\n this.nickname = nickname;\n this.resources = new Assets();\n this.strengths = new Strengths();\n this.leaderCards = new ArrayList<>();\n this.familyMembers = new ArrayList<>();\n this.pickDiscounts = new HashMap<>();\n this.diceOverride = new HashMap<>();\n this.defaultHarvestBonus = new Assets();\n this.defaultProductionBonus = new Assets();\n this.color = color;\n this.cards = new HashMap<>();\n DEFAULT_TOWERS_COLORS.forEach(towerColor -> this.pickDiscounts.put(towerColor, new Assets()));\n pickDiscounts.put(BLACK_COLOR, new Assets());\n getLog().log(Level.INFO, \"New empty player %s created.\", nickname);\n }",
"public Player(String name) {\n\t\tthis.name = name;\n\t\tscore = 0;\n\t}",
"Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}",
"public Player(World world) {\n\n super(world, playerShape);\n addImage(idleImage);\n score = 0;\n lives = 3;\n\n }",
"public Game() {\n\t\tbPlayer = new Player(false);\n\t\twPlayer = new Player(true);\n\t\t// TODO Auto-generated constructor stub\n\t}",
"Player(String Name){\n\t\tthis.Name=Name;\n\t\tdate=new Date();\n\t\tthis.Score=Score;\n\t\tScore=0;\n\t}",
"Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}",
"public Player(Position position) {\n this.position = position;\n this.image = new Image(\"O\");\n }",
"public Player1() {\n dbg = new DBG(DBG.PLAYERS, \"Player1\");\n }",
"public Player() {\n\t\tscore = 0;\n\t}",
"public Player(String name) {\r\n\t\tthis.name=name;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n\t}",
"public Player(String name, int playerIndex) {\r\n\t\tthis.name = name;\r\n\t\tthis.playerIndex = playerIndex;\r\n }",
"public Player(Player p)\r\n {\r\n this(p.isCompletingGame, p.averageTime, p.fastestTime, p.gamesCompleted, p.rank, p.title, p.username);\r\n }",
"public Player(String name){\r\n\t\tthis.name = name;\r\n\t\tDie die = new Die();\r\n\t\tthis.die = die;\r\n\t}",
"public Player(Game game){\r\n this.game = game;\r\n }",
"public Player(Player p){\n this.dead = p.dead;\n this.hiddenTreasures = p.hiddenTreasures;\n this.level = p.level;\n this.name = p.name;\n this.pendingBadConsequence = p.pendingBadConsequence;\n this.visibleTreasures = p.visibleTreasures;\n }",
"public HexComputerPlayer1(String name) {\n // invoke superclass constructor\n super(name); // invoke superclass constructor\n }",
"private Player(final int objectId) {\n this(objectId, null);\n\n _ai = new PlayerAI(this);\n\n if (!ServerConfig.EVERYBODY_HAS_ADMIN_RIGHTS) {\n setPlayerAccess(GmAccessConfig.gmlist.get(objectId));\n } else {\n setPlayerAccess(GmAccessConfig.gmlist.get(0));\n }\n if (AcpConfig.allowAcp) {\n acpComponent = new AcpComponent(this);\n }\n }",
"protected Computer(String playerName) {\n super(playerName);\n }",
"public Player() {\n\t\tsetDimensions(16, 16);\n\t\tsetLocation(512 + 16, 512 + 16);\n\t\tsetKeyBindings();\n\t}",
"public Player(Level l, Tile t)\n {\n \tstartTile = t;\n \tsetLevel(l);\n setUpStartPosition();\n \n System.out.println(\"----------> new Player\");\n \n if(!setUp)\n { \n initAnim(); \n setUpCollisionBox();\n initBow();\n setUpPlayerSpeed();\n setUp = true;\n }\n }",
"public Player(String name, Pool p)\n\t{\n\t\tsetName(name); // sets the name for the player\n\t\tsetScore(0); // sets the intial score for the player\n\t\tsetFrame(p); // assigns a frame to the player\n\t}",
"public Pawn(Player player) {\n super(player);\n }",
"public Player(String name)\n {\n this.name = name;\n cash = 0;\n }",
"public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }",
"public Command(int Player) {\r\n\t\tmyPlayer = Player;\r\n\t}",
"public Player(String name, int x, int y) {\n \t\t\n \t\tsuper(x*Main.gridSize, y*Main.gridSize);\n \t\t\n \t\tsetMaxHP(100);\n \t\tsetMaxPP(100);\n \t\t\n \t\tsetLevel(1);\n \t\tsetExp(0);\n \t\t\n \t\tsetScene(0, 0);\n \t\t\n \t\tthis.name = name;\n \t}",
"public void initPlayer();",
"public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }",
"public FakePlayer() {\n this(Minecraft.getMinecraft().thePlayer.worldObj);\n }",
"public Player(String name)\n\t{\n\t\tif (name == null || validateName(name) == false)\n\t\t{\n\t\t\tmyName = DEFAULT_NAME;\n\t\t}\n\t\telse if (name.matches(\"[a-zA-Z]+\"))\n\n\t\t{\n\t\t\tmyName = name;\n\t\t}\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}",
"public PlayableGame() {\r\n\r\n }",
"public Player2(State state){\n super(state);\n name=\"110\";\n }",
"public Player(Keyboard input) {\n\t\tthis.input = input;\n\t}",
"public Player(int i){\r\n playerID=i;\r\n }",
"public Player() {\n\t\t\n\t\tif (Main.role == 0) this.role = Role.Attacker;\n\t\tif (Main.role == 1) this.role = Role.Defender;\n\t\t\n\t\tnavigator = Main.nav;\n\t\t\n\t\tballGrabber = new BallGrab();\n\t\t\n\t\tballPlatform[0] = Main.upperRightX + 35; //120\n\t\tballPlatform[1] = Main.upperRightY - 8; //165\n\t\t\n\t\tstartingCorner = Main.startingCorner;\n\t\t\n\t\t\n\t}",
"public DefensivePlayers(){}",
"public Player()\n {\n playerItem = new ArrayList();\n }",
"public Player(String name){\n\t\tthis.name = name;\n\t\t//this.deck = new Deck(1);\n\t\t((Deck) this.deck).buildDeck();\n\t\t//this.inhand = new CardsGroup();\n\t\tthis.bench = new CardsGroup();\n\t\tthis.userDiscardPile = new CardsGroup();\n\t}",
"public Player(String playerId, String ptype) {\n\t\tthis.playerid = playerId;\n\t\tthis.pieceType=PieceType.valueOf(ptype);\n\t\tthis.setWhenGo();\n\t}",
"private HumanGamePlayerOnKeyboard initializePlayer() {\n\t\tHumanGamePlayerOnKeyboard player = new HumanGamePlayerOnKeyboard();\n\t\tplayer.setPlayerName(HUMAN_PLAYER_NAME);\n\t\treturn player;\n\t}"
] |
[
"0.8601457",
"0.85643995",
"0.85643995",
"0.8528397",
"0.8528397",
"0.8528397",
"0.8528397",
"0.83868885",
"0.8327934",
"0.82089716",
"0.80616623",
"0.80435383",
"0.7942426",
"0.79293156",
"0.7918455",
"0.7878765",
"0.78420466",
"0.782828",
"0.77534693",
"0.773869",
"0.77346075",
"0.77300006",
"0.7685516",
"0.7681221",
"0.76798296",
"0.7651886",
"0.7649972",
"0.7649967",
"0.76277274",
"0.7592247",
"0.7572671",
"0.75614864",
"0.75018185",
"0.7497831",
"0.74888325",
"0.7477928",
"0.74645936",
"0.7463242",
"0.7458215",
"0.74567735",
"0.74446",
"0.74413455",
"0.74372363",
"0.74371624",
"0.7428806",
"0.7426854",
"0.7419803",
"0.7379497",
"0.73691744",
"0.7344186",
"0.7339171",
"0.7339083",
"0.73298025",
"0.73253566",
"0.7324867",
"0.7317827",
"0.73143524",
"0.72719187",
"0.72681147",
"0.72676516",
"0.72327775",
"0.71895903",
"0.7169367",
"0.71598613",
"0.7154907",
"0.7149613",
"0.7139099",
"0.7132266",
"0.713128",
"0.7126123",
"0.71082085",
"0.7105508",
"0.7104564",
"0.7101248",
"0.7100842",
"0.7096234",
"0.70867974",
"0.7076335",
"0.7072764",
"0.70708865",
"0.70621336",
"0.7061637",
"0.7055516",
"0.70538247",
"0.7052715",
"0.7038668",
"0.7022341",
"0.70215017",
"0.70152044",
"0.7013938",
"0.7012094",
"0.7006731",
"0.700311",
"0.69969565",
"0.6995693",
"0.69858694",
"0.69598025",
"0.69530857",
"0.69530076",
"0.69507897",
"0.6946281"
] |
0.0
|
-1
|
Method sets a new Target.
|
public void setDestination(final double xCoord, final double yCoord) {
super.setDestination(new Target(xCoord, yCoord));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void setTarget(Object arg0) {\n\t\tdefaultEdgle.setTarget(arg0);\n\t}",
"public void setTarget(Object method)\n {\n __m_Target = method;\n }",
"void setTarget(java.lang.String target);",
"public void setTarget(Target target) {\n\t\tthis.target = target;\n\t}",
"void setTarget(Node target) {\n\t\tthis.target = target;\n\t}",
"@objid (\"8fb70c43-b102-4a64-9424-c7cc07d58fcf\")\n void setTarget(Instance value);",
"public void setTarget(String val)\r\n\t{\r\n\t\t_target = val;\r\n\t}",
"protected void setTarget(Command target) {\n\t\tproxy.setTarget(target);\n\t}",
"public void setCurrentTarget(Object target) {\r\n if (target instanceof IModelNode) {\r\n newSource = null;\r\n newTarget = (IModelNode) target;\r\n }\r\n }",
"public void setTarget(String newValue);",
"public void setTarget(String target) {\n this.target = target;\n }",
"T setUrlTarget(String urlTarget);",
"public void setTarget(String targetToAdd) {\n if (targetToAdd.equals(\"\")) {\n throw new BuildException(\"target attribute must not be empty\");\n }\n targets.add(targetToAdd);\n targetAttributeSet = true;\n }",
"public void setTarget(java.lang.String target) {\n this.target = target;\n }",
"public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }",
"@Override\n public void setTarget(GameObject newTarget) {\n if (newTarget != null && !newTarget.isVisible()) {\n newTarget = null;\n }\n\n // Can't target and attack festival monsters if not participant\n if (newTarget instanceof FestivalMonsterInstance && !isFestivalParticipant()) {\n newTarget = null;\n }\n\n final Party party = getParty();\n\n // Can't target and attack rift invaders if not in the same room\n if (party != null && party.isInDimensionalRift()) {\n final int riftType = party.getDimensionalRift().getType();\n final int riftRoom = party.getDimensionalRift().getCurrentRoom();\n if (newTarget != null && !DimensionalRiftManager.getInstance().getRoom(riftType, riftRoom).checkIfInZone(newTarget.getX(), newTarget.getY(), newTarget.getZ())) {\n newTarget = null;\n }\n }\n\n final GameObject oldTarget = getTarget();\n\n if (oldTarget != null) {\n if (oldTarget == newTarget) {\n return;\n }\n\n // Remove the L2Player from the _statusListener of the old target if it was a L2Character\n if (oldTarget.isCreature()) {\n ((Creature) oldTarget).removeStatusListener(this);\n }\n\n broadcastPacket(new TargetUnselected(this));\n }\n\n if (newTarget != null) {\n // Add the L2Player to the _statusListener of the new target if it's a L2Character\n if (newTarget.isCreature()) {\n ((Creature) newTarget).addStatusListener(this);\n }\n\n broadcastPacket(new TargetSelected(getObjectId(), newTarget.getObjectId(), getLoc()));\n }\n\n super.setTarget(newTarget);\n }",
"void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }",
"private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }",
"public void setTarget(Object t) {\n\n if (!(t instanceof UMLDiagram)) {\n // This is perfectly normal and happens among other things\n // within the call to setDiagram (below).\n LOG.debug(\"target is null in set target or \"\n\t\t + \"not an instance of UMLDiagram\");\n return;\n }\n UMLDiagram newTarget = (UMLDiagram) t;\n\n if (target != null) {\n target.removePropertyChangeListener(\"remove\", this);\n }\n \n newTarget.addPropertyChangeListener(\"remove\", this);\n\n setToolBar(newTarget.getJToolBar());\n\n // NOTE: This listener needs to always be active \n // even if this tab isn't visible\n graph.removeGraphSelectionListener(this);\n graph.setDiagram(newTarget);\n graph.addGraphSelectionListener(this);\n target = newTarget;\n }",
"public void setTarget(DmcObjectName value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n try{\n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The alternative type specific set() method shouldn't throw exceptions!\",ex));\n }\n }",
"public void setTarget(CPointer<BlenderObject> target) throws IOException\n\t{\n\t\tlong __address = ((target == null) ? 0 : target.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 128, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 104, __address);\n\t\t}\n\t}",
"public void setTarget(NameContainer value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n try{\n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The type specific set() method shouldn't throw exceptions!\",ex));\n }\n }",
"public void setTarget(Object target) {\n/* 116 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void setTargetObject(Object targetObject) {\n this.targetObject = targetObject;\n }",
"public void setTarget(double x, double y) {\n\t\tkin.target = new Vector2d(x, y);\n\t}",
"public void setTarget(Vector3f target) \n {\n float distance = FastMath.abs(target.y - this.getPosition().y);\n this.motionTarget = target;\n this.motionPath = new MotionPath();\n \n this.motionPath.addWayPoint(this.getPosition());\n\n this.motionPath.addWayPoint(new Vector3f(this.getPosition().x, target.y, this.getPosition().z));\n \n grabberMotion = new MotionEvent(this.node, this.motionPath);\n grabberMotion.setInitialDuration(distance / this.speed);\n }",
"public void setTargetValue(String name, Object def);",
"public void setTarget(double target)\n {\n setTarget(target, null);\n }",
"public void setTarget(TestExecutionTarget target) {\n this.target = target;\n }",
"public void setTarget(String s) { \n shortcutValue(s, GENERAL_TARGET);\n }",
"public void setTargeted() {\n targeted ++;\n }",
"@com.exedio.cope.instrument.Generated // customize with @WrapperType(genericConstructor=...)\n\t\tprivate Target(final com.exedio.cope.SetValue<?>... setValues){super(setValues);}",
"public void setTargetType(TargetTypes targetType) {\n this.targetType = targetType.getValue();\n }",
"public void set(Object target, Object value)\n\t\tthrows IllegalAccessException,\n\t\tInvocationTargetException {\n\t\tsetter.setAccessible(true);\n\t\tsetter.invoke(target, value);\n\t}",
"public void setTargetLocation(Location targetLocation) \n {\n this.targetLocation = targetLocation;\n }",
"private void setCurrentTarget(String newLayerName) {\n\n\t\tthis.currentNewLayerName = newLayerName;\n\t\tthis.currentTargetLayer = null;\n\t}",
"public void setTarget(Object value) throws DmcValueException {\n DmcTypeNameContainerSV attr = (DmcTypeNameContainerSV) get(DmpDMSAG.__target);\n if (attr == null)\n attr = new DmcTypeNameContainerSV(DmpDMSAG.__target);\n \n attr.set(value);\n set(DmpDMSAG.__target,attr);\n }",
"public void setTarget(AbstractModelElement target, EditPart editPart) {\n\t\tif (target == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.target = target;\n\t\tthis.targetEditPart = editPart;\n\t}",
"public void setSetPropertyTarget(String setPropertyTarget) {\n \n this.setPropertyTarget = setPropertyTarget;\n }",
"public void updateTarget(EnemyBot newRadarTarget) {\r\n\t\tradarTarget = newRadarTarget;\r\n\t}",
"public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }",
"public void setVectorTarget(@NonNull Vector2D target)\n {\n targetVector = target;\n }",
"public void setTargetType(Class<?> targetType)\n/* */ {\n/* 257 */ this.targetType = (targetType != null ? ResolvableType.forClass(targetType) : null);\n/* */ }",
"public void setTarget(String target) {\n this.target = target == null ? null : target.trim();\n }",
"Target target();",
"void setTarget(IWfnTransitionAndPlace elem);",
"@JsonProperty(\"target\")\n public void setTarget(String target) {\n this.target = target;\n }",
"public void setTargetName(String targetName) {\r\n this.targetName = targetName;\r\n }",
"void activateTarget(@ParamName(\"targetId\") String targetId);",
"public void teammateNewTarget(String teammateName, String newTarget) {\r\n\t\tif (getIndexForName(teammateName) != -1 && getIndexForEnemy(newTarget) != -1) {\r\n\t\t\ttargetTracking.get(getIndexForName(teammateName))\r\n\t\t\t\t\t.updateTarget(enemyTracker.getEnemyList().get(getIndexForEnemy(newTarget)));\r\n\t\t}\r\n\t}",
"public void toSelectingAttackTarget() {\n }",
"public void setLink(FileNode target){\n\t\t/*link = target;\n\t\tsuper.setOffset(0);\n\t\tsuper.setLength(link.getLength());\n\t\tsuper.setSourcePath(link.getSourcePath());*/\n\t\tsuper.setVirtualSourceNode(target);\n\t\tsuper.setOffset(0);\n\t\tif(target != null){\n\t\t\tsuper.setLength(target.getLength());\n\t\t\tsuper.setSourcePath(target.getSourcePath());\n\t\t}\n\t}",
"public Target()\n\t{\n\t\tx = 2.0;\n\t\ty = 2.0;\n\t\tangle = 0.0;\n\t\tdistance = 0.0;\n\t\tnullTarget=true;\n\t}",
"public void setField(final Object target, final String name, final Object value) {\n\n // check if the object is a proxy object\n if (AopUtils.isAopProxy(target) && target instanceof Advised) {\n try {\n ReflectionTestUtils.setField(((Advised) target).getTargetSource().getTarget(), name, value);\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n ReflectionTestUtils.setField(target, name, value);\n }\n }",
"public void setTargetSelected(boolean targetSelected) {\n this.targetSelected = targetSelected;\n }",
"public void addTarget(Target target)\n {\n if (!targets.contains(target))\n {\n targets.add(target);\n }\n }",
"public void setTargetAgent(final Agent agent) {\r\n mTargetAgent = agent;\r\n }",
"public void setTargetId(Long targetId) {\r\n this.targetId = targetId;\r\n }",
"public Target(Registry registry) {\r\n\t\tthis.registry = registry;\r\n\t\tthis.id = registry.getId();\r\n\t}",
"public Builder setTargetName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n targetName_ = value;\n onChanged();\n return this;\n }",
"private void setCurrentTarget(ILayer layer) {\n\n\t\tif (layer != null) {\n\t\t\tthis.currentNewLayerName = null;\n\t\t\tthis.currentTargetLayer = layer;\n\t\t}\n\t}",
"public TargetClass() {\n super();\n }",
"public Target(TargetMeta targetMeta, float x, float y) {\n super(targetMeta, x, y);\n metaObject = targetMeta;\n hitCounter = 0;\n }",
"protected void setValue(Object target, String targetName, String propName,\n\t\t\tObject valToSet) throws WekaException {\n\n\t\ttry {\n\t\t\tgetStepManager().logDebug(\n\t\t\t\t\t\"Attempting to set property '\" + propName + \"' \"\n\t\t\t\t\t\t\t+ \"with value of type '\" + valToSet.getClass().getCanonicalName()\n\t\t\t\t\t\t\t+ \" '(\" + valToSet + \") on '\" + targetName + \"'\");\n\t\t\tPropertyDescriptor prop = getPropDescriptor(target, propName);\n\n\t\t\tif (prop == null) {\n\t\t\t\tthrow new WekaException(\"Unable to find method '\" + propName + \"'\");\n\t\t\t}\n\t\t\tMethod setMethod = prop.getWriteMethod();\n\t\t\tsetMethod.invoke(target, valToSet);\n\t\t} catch (Exception e) {\n\t\t\tthrow new WekaException(e);\n\t\t}\n\t}",
"public void addTarget(Target target) {\n // XXX check out for name, if null, reject!\n targets.put(target.getName(), target);\n }",
"public void setTargets(IdentifierListNode targets);",
"public void addOrReplaceTarget(Target target) {\n addOrReplaceTarget(target.getName(), target);\n }",
"public void setTargetName(String targetName) {\n this.targetName = targetName;\n }",
"public void setTargetValue(int idx, Object value);",
"public void setTargetType(int targetType) {\n this.targetType = targetType;\n \n Ability ability = battleEvent.getAbility();\n \n switch ( targetType ) {\n case NORMAL_TARGET:\n case AE_CENTER:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(false);\n \n break;\n case SKILL_TARGET:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(false);\n \n break;\n case AE_TARGET:\n case AE_SELECTIVE_TARGET:\n case AE_NONSELECTIVE_TARGET:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n noMoreTargetsButton.setVisible(true);\n if ( targetSelected == true ) {\n noMoreTargetsButton.setText( \"Remove Target\" );\n } else {\n noMoreTargetsButton.setText( \"No More Targets\" );\n }\n noTargetButton.setVisible(false);\n break;\n case KNOCKBACK_TARGET:\n //targetSelfButton.setVisible(false);\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(true);\n break;\n case SECONDARY_TARGET:\n //targetSelfButton.setVisible(ability.can(\"TARGETSELF\"));\n \n if ( targetSelected == true ) {\n noMoreTargetsButton.setText( \"Remove Target\" );\n noMoreTargetsButton.setVisible(true);\n noTargetButton.setVisible(false);\n } else {\n noMoreTargetsButton.setVisible(false);\n noTargetButton.setVisible(true);\n }\n \n break;\n }\n }",
"Object getTarget();",
"Object getTarget();",
"public AbstractWrappingTarget( final LogTarget logTarget )\n {\n this( logTarget, false );\n }",
"public TargetCollection(TargetCollection targetCollection){\n targets = targetCollection.getTargets();\n }",
"public static void setTargetAnnotation (ITextUnit textUnit,\r\n \t\tLocaleId locId,\r\n \t\tIAnnotation annotation)\r\n \t{\r\n \t\tif ( textUnit == null ) return;\r\n \t\tif ( Util.isNullOrEmpty(locId) ) return;\r\n \t\tif ( textUnit.getTarget(locId) == null ) return;\r\n \t\ttextUnit.getTarget(locId).setAnnotation(annotation);\r\n \t}",
"public void setTarget(double target, TrcWarpSpace warpSpace)\n {\n final String funcName = \"setTarget\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"target=%f,warpSpace=%s\", target, warpSpace);\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 input = pidInput.get();\n\n synchronized (this)\n {\n if (!absSetPoint)\n {\n //\n // Set point is relative, add target to current input to get absolute set point.\n //\n setPoint = input + target;\n currError = target;\n }\n else\n {\n //\n // Set point is absolute, use as is but optimize it if it is in warp space.\n //\n setPoint = target;\n if (warpSpace != null)\n {\n setPoint = warpSpace.getOptimizedTarget(setPoint, input);\n }\n currError = setPoint - input;\n }\n\n if (inverted)\n {\n currError = -currError;\n }\n\n setPointSign = Math.signum(currError);\n //\n // If there is a valid target range, limit the set point to this range.\n //\n if (maxTarget > minTarget)\n {\n if (setPoint > maxTarget)\n {\n setPoint = maxTarget;\n }\n else if (setPoint < minTarget)\n {\n setPoint = minTarget;\n }\n }\n\n totalError = 0.0;\n prevTime = settlingStartTime = TrcUtil.getCurrentTime();\n // Only init the prevOutputTime if this setTarget is called after a reset()\n // If it's called mid-operation, we don't want to reset the prevOutputTime clock\n if (prevOutputTime == 0.0)\n {\n prevOutputTime = prevTime;\n }\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n }",
"public Living getTarget();",
"@Required\n\tpublic void setTargetService(TargetService service) {\n\t\tthis.targetService = service;\n\t}",
"public void setTargetUUID(String gameUUID, String targetUUID) {\n\t\tif (this.gameTargetUUIDs == null) {\n\t\t\tthis.gameTargetUUIDs = new HashMapJDO();\n\t\t}\n\t\tthis.gameTargetUUIDs.addNewTarget(gameUUID, targetUUID);\n\t}",
"public static void setTarget(GameWorld gw){\n\t\tif(game == null)\n\t\t\tgame = gw;\n\t}",
"public void setTargetType(ResolvableType targetType)\n/* */ {\n/* 249 */ this.targetType = targetType;\n/* */ }",
"public void setTargetLocation(Point location) {\n this.targetLocation = location;\n }",
"public void addTarget(Target target) {\n SocketChannel socketChannel = null;\n try {\n socketChannel = SocketChannel.open();\n socketChannel.configureBlocking(false);\n socketChannel.connect(target.address);\n target.socketChannel = socketChannel;\n target.connectStart = System.currentTimeMillis();\n synchronized (targets) {\n targets.add(target);\n }\n selector.wakeup();\n } catch (IOException e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n if (socketChannel != null) {\n try {\n socketChannel.close();\n } catch (IOException e1) {\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }\n target.failure = e;\n addFinishedTarget(target);\n }\n\n }",
"public void setTargetPosition(double position){\n targetPosition = position;\n }",
"public void setDefaultTarget(String defaultTarget) {\n this.defaultTarget = defaultTarget;\n }",
"public void setTargetClassName(String targetClassName) {\r\n m_targetClassName = targetClassName;\r\n }",
"public abstract void addTarget(Component target);",
"public void setTargetNumber(java.lang.String targetNumber) {\r\n this.targetNumber = targetNumber;\r\n }",
"public Object getTarget()\n {\n return __m_Target;\n }",
"public Target getTarget() {\n return target;\n }",
"public Target getTarget() {\n\n return target;\n }",
"public void setTargetObjectClass(ClassDefinitionDMO value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__targetObjectClass);\n if (attr == null)\n attr = new DmcTypeClassDefinitionREFSV(DmpDMSAG.__targetObjectClass);\n else\n ((DmcTypeClassDefinitionREFSV)attr).removeBackReferences();\n \n try{\n attr.set(value);\n set(DmpDMSAG.__targetObjectClass,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The type specific set() method shouldn't throw exceptions!\",ex));\n }\n }",
"@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}",
"public void settarget(float posX, float posY)\n\t{\n\t\t// go threw all are drawables\n\t\tfor (int i =0; i < drawableItems.size();i++)\n\t\t{\n\t\t\tdrawableItems.get(i).setTargetX(posX);\n\t\t\tdrawableItems.get(i).setTargetY(posY);\n\t\t}\n\t}",
"public final void takeTarget(xmf xmf) {\n akcr.b(xmf, \"target\");\n super.takeTarget(xmf);\n xmf.getLifecycle().a(this);\n }",
"public org.landxml.schema.landXML11.TargetSetupDocument.TargetSetup addNewTargetSetup()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.TargetSetupDocument.TargetSetup target = null;\r\n target = (org.landxml.schema.landXML11.TargetSetupDocument.TargetSetup)get_store().add_element_user(TARGETSETUP$0);\r\n return target;\r\n }\r\n }",
"public void setPoint(Point operand, Point target) {\n\tfor (Shape s : this.shapes)\n\t s.setPoint(operand, target);\n }",
"public void setTranslationTarget(float targetX, float targetY, float damping) {\n\t\tif (this.target == null)\n\t\t\ttarget = new Vector2();\n\t\t\n\t\tthis.translationDamping = damping;\n\t\tthis.target.set(targetX, targetY);\n\t}",
"@Override\n\tpublic void setTargetDetailOne(int id, HttpServletRequest request) {\n\t\t\n\t}",
"public TurnToTarget() {\n forceDone = false;\n turnToTarget = new TurnToAngle(0);\n }",
"public void setToRefid(String targetid) {\n this.targetid = targetid;\n }"
] |
[
"0.7605871",
"0.75738865",
"0.75085187",
"0.7481662",
"0.7355186",
"0.7185884",
"0.71332544",
"0.71236175",
"0.7036361",
"0.70333356",
"0.70069385",
"0.69422925",
"0.6938051",
"0.6923577",
"0.69057816",
"0.68484974",
"0.68203515",
"0.67851204",
"0.67434585",
"0.6734945",
"0.6711197",
"0.6640749",
"0.6615174",
"0.6581452",
"0.6555954",
"0.6544572",
"0.6532382",
"0.6481597",
"0.64707726",
"0.64322",
"0.64190906",
"0.63513213",
"0.6344771",
"0.63365066",
"0.6326748",
"0.6262569",
"0.62227076",
"0.62211007",
"0.6212368",
"0.6205378",
"0.62000847",
"0.61172354",
"0.6110249",
"0.6110125",
"0.6087048",
"0.6085126",
"0.6083158",
"0.60823077",
"0.6066729",
"0.60554904",
"0.60458857",
"0.6035352",
"0.6023605",
"0.6017817",
"0.6013596",
"0.60079896",
"0.60076505",
"0.60062605",
"0.60044473",
"0.5993744",
"0.5984314",
"0.59820896",
"0.59708816",
"0.5958194",
"0.595615",
"0.5951266",
"0.59478027",
"0.59473944",
"0.5946383",
"0.59071666",
"0.5899962",
"0.5899962",
"0.58958244",
"0.58932054",
"0.58791614",
"0.5874462",
"0.58669734",
"0.58411777",
"0.58362687",
"0.5829243",
"0.58118373",
"0.5801122",
"0.5797691",
"0.57953024",
"0.57772356",
"0.5776455",
"0.57744867",
"0.57735425",
"0.5771588",
"0.5769716",
"0.57315403",
"0.5714971",
"0.57121277",
"0.5709353",
"0.5702488",
"0.5700235",
"0.56980735",
"0.5694828",
"0.5691023",
"0.5668021",
"0.566731"
] |
0.0
|
-1
|
Constructs a MatchBot to operate on the last numTweets of the given user.
|
public MatchBot(String user, int numTweets) {
super(user, numTweets);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Twitter() {\n\t\t\tuserMap = new HashMap<>();\n\t\t\tmaxFeed = 10;\n\t\t}",
"public Twitter() {\n size = 0;\n users = new ArrayList<>();\n }",
"@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }",
"void makeTweet(OnTweetPostListener onTweetPostListener);",
"public Listener(int max) {\r\n count = 0;\r\n maxCount = max;\r\n tweets = new LinkedList<Status>();\r\n }",
"public @NotNull TwitterFeedResponse getTwitterFeed(@NotNull final String userName,\n final int maxNumOfTweets,\n final long sinceMessageId) throws TwitterException {\n User u = twitter.showUser(userName);\n TwitterFeedResponse feed = initializeFeed(u);\n ResponseList<Status> tweets;\n if (sinceMessageId <= 0) {\n tweets = twitter.getUserTimeline(feed.userId, new Paging(1, maxNumOfTweets));\n } else {\n tweets = twitter.getUserTimeline(feed.userId, new Paging(1, maxNumOfTweets, sinceMessageId));\n }\n feed.limit = u.getRateLimitStatus().getLimit();\n feed.remaining = u.getRateLimitStatus().getRemaining();\n\n for (Status s : tweets) {\n TwitterFeedResponse.Tweet t = initializeTweet(s, feed);\n feed.tweets.add(t);\n }\n\n return feed;\n }",
"void getTweets(long lastUid) {\n client.getMentionsTimeline(lastUid, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG\", response.toString());\n addAll(Tweet.fromJsonArray(response));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n });\n }",
"private RetryQuery timeTweets(int n, Query lastQuery, String search, Configuration auth) {\r\n /*while (!DBStore.getInstance().isEmpty()) {\r\n try {\r\n Thread.sleep(10000);\r\n } catch (InterruptedException ex) {\r\n }\r\n }*/\r\n TwitterFactory tf = new TwitterFactory(auth);\r\n Twitter twitter = tf.getInstance();\r\n Query query = new Query(search);\r\n /*query.setGeoCode(new twitter4j.GeoLocation(geocode[0], geocode[1]), \r\n geocode[2], Query.Unit.km);*/\r\n query.setLang(\"nl\");\r\n query.count(1000);\r\n \r\n if (lastQuery != null) {\r\n query = lastQuery;\r\n }\r\n \r\n QueryResult result;\r\n \r\n if (Abort.getInstance().abort()) {\r\n return new RetryQuery(-1, query);\r\n }\r\n\r\n try {\r\n result = twitter.search(query);\r\n while (result.nextQuery() != null) {\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n query = result.nextQuery();\r\n result = twitter.search(query);\r\n }\r\n\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n\r\n } catch (TwitterException te) {\r\n System.out.println(\"Failed to search tweets: \" + te);\r\n System.out.println(\"\\nRetry at n = \" + n + \": \" + \r\n (new Date(te.getRateLimitStatus()\r\n .getResetTimeInSeconds() * 1000L)));\r\n return new RetryQuery(\r\n te.getRateLimitStatus().getResetTimeInSeconds() * 1000L,\r\n query);\r\n }\r\n return new RetryQuery(0, null);\r\n }",
"public void searchUserAccount( )\r\n throws TwitterException, URISyntaxException, IOException{\r\n\r\n // looks at all tweets since this page\r\n // the count is the limit\r\n\r\n int count = 0;\r\n String text = \"\";\r\n Paging paging = new Paging(pageInt, 10);\r\n List<Status> statuses = twitter.getUserTimeline(user, paging);\r\n\r\n for (Status s : statuses) {\r\n String url = \"https://twitter.com/\" + s.getUser().getScreenName() + \"/status/\" + s.getId();\r\n if (s.getRetweetedStatus() == null) {\r\n content = url;\r\n //send the links to text\r\n HandleFile(override, active);\r\n\r\n //regular expressions\r\n String regex = \"https://t.co/.*\";\r\n text = s.getText().replaceAll(regex,\"\");\r\n\r\n System.out.println(s.getUser().getName() + \": \" + text);\r\n System.out.println(url); //prints the url of the tweet\r\n System.out.println(s.getCreatedAt()+\"\\n\");\r\n\r\n //sets the tweets to variables to be exported\r\n tweets = tweets + \" \" +text + \"\\n\"+ url + \"\\n\" + s.getCreatedAt() + \"\\n\\n\";\r\n\r\n\r\n active = false;\r\n\r\n //search for nudes\r\n getTwitterImage(s);\r\n }\r\n count++;\r\n\r\n if(count == 5 && limitInt > 0){\r\n limitInt--;\r\n pageInt++;\r\n searchUserAccount();\r\n }\r\n }\r\n }",
"public void postTweet(int userId, int tweetId) {\n tweets.put(tweetId, idx++);\n LinkedList<Integer> tweets = userToTwitter.computeIfAbsent(userId, e -> new LinkedList<>());\n tweets.addLast(tweetId);\n while (tweets.size() > 10) {\n tweets.removeFirst();\n }\n }",
"public Listener() {\r\n count = 0;\r\n error = false;\r\n maxCount = Integer.MAX_VALUE - 1;\r\n tweets = new LinkedList<Status>();\r\n }",
"public String[] findUserTwitterId(String name, TweetsIndexManager tim) throws IOException {\r\n // Initialize a new Tweets index builder for the index of the all tweets\r\n \r\n String[] name_ary = name.split(\" \");\r\n \r\n\r\n ArrayList<String> fieldValues = new ArrayList<String>();\r\n // Search user that match name + surname\r\n fieldValues.add((name_ary[0] + \" \" + name_ary[1]).toLowerCase());\r\n // Search user that match surname + name\r\n fieldValues.add((name_ary[1] + \" \" + name_ary[0]).toLowerCase());\r\n \r\n ArrayList<Document> results = tim.searchForField(\"name\", fieldValues, 10000);\r\n \r\n // Variable that will mantain the max number of followers among the users found\r\n int max = 0;\r\n // User id related to the max\r\n String id = \"\";\r\n \r\n // For each document found \r\n for (Document doc : results) {\r\n // check if the user that made it has the more influencer of our actual max\r\n if (Integer.parseInt(doc.get(\"followers\")) >= max) {\r\n // And in case take it as new max\r\n max = Integer.parseInt(doc.get(\"followers\"));\r\n id = doc.get(\"screenName\");\r\n }\r\n }\r\n // Return the max\r\n String[] result = {id, new Integer(max).toString()};\r\n return result;\r\n }",
"public Twitter() {\r\n\t\t\ttweet = new HashMap<Integer, List<twi>>(100);\r\n\t\t\tfollower = new HashMap<Integer, List<Integer>>(100);\r\n\t\t\ttimeStamp = 0;\r\n\t\t}",
"public String getTweets(int user, int n) throws TwitterException{\n\t\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t twitter4j.User user1 = twitter.showUser(user);\n\t // System.out.println(\"INIZIO PER \" + user1.getScreenName() + \" - isProtect: \" + user1.isProtected()); \n\t \n\t \n\t if (user1.getLang().equalsIgnoreCase(\"en\") && user1.isProtected() == false /*&& user1.getFollowersCount() > 50*/ ){\n\t\t\t\t//First param of Paging() is the page number, second is the number per page (this is capped around 200 I think.\n\t\t\t\tPaging paging = new Paging(1, n);// fet 200 twett\n\t\t\t\tList<Status> statuses = twitter.getUserTimeline(user, paging);\n\t\t \tString out = \"\";\n\t\t\t\t/*User's Tweets*/\n\t\t\t\tfor(Status st : statuses)\n\t\t\t\t{\n\t\t\t\t//\tSystem.out.println(st.getUser().getLocation() + \" \" + st.getUser().getScreenName()+\" ----------- \" + st.getText() + \"\\n\");\n\t\t\t\t\tif (st.getLang().equals(\"en\")){\n\t\t\t\t\t\tout = out + \"\\n\" + st.getText();\n\t\t\t\t\t//\tSystem.out.println(st.getText()+ \" \" + user);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn out;\n\t } else {\n\t \treturn \"\";\n\t }\n\n\t\t} catch (TwitterException name) {\n\t\t\t\n\t\t//\tSystem.out.println(\"This username is not valid \" + name.getErrorMessage());\n\t\t\treturn \"\";\n\t\t} \n\t\t\n \t\n }",
"public TestClass(int num) {\r\n accounts = new HashSet<String>();\r\n // connecting to twitter\r\n // creating object to work with\r\n twitter = TwitterFactory.getSingleton();\r\n this.num = num;\r\n count = 0;\r\n }",
"public void setBotNumber(int num) {\n botNum = num;\n }",
"public Show_Tweet(String userid,Tweets tweet) {\n initComponents();\n \n jLabel_username.setText(userid);\n String Name = SQL.user.GetName(userid);\n jLabel_name.setText(Name);\n \n jLabel_Name.setText(tweet.User.Name);\n jLabel_Username.setText(tweet.User.Username);\n jLabel_Tweetid.setText(String.valueOf(tweet.TweetId));\n \n jTextArea.setText(tweet.Text);\n List<Users> list1 = SQL.user.GetLikers(tweet.TweetId);\n jLabel_NumberofLikes.setText(String.valueOf(list1.size()));\n List<Tweets> list2 = SQL.user.GetReplies(tweet.TweetId);\n jLabel_NumberofReplies.setText(String.valueOf(list2.size()));\n }",
"public void getTweets() {\r\n\t\t\r\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\r\n\t\tcb.setDebugEnabled(true);\r\n\t\t\r\n\t\t//provide your own keys\r\n\t cb.setOAuthConsumerKey(\"ConsumerKey\");\r\n\t cb.setOAuthConsumerSecret(\"ConsumerSecret\");\r\n\t cb.setOAuthAccessToken(\"AccessToken\");\r\n\t cb.setOAuthAccessTokenSecret(\"TokenSecret\");\r\n\r\n TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); \r\n \r\n //Check for live status updates\r\n StatusListener listener = new StatusListener() {\r\n\r\n @Override\r\n public void onException(Exception arg0) {\r\n \tSystem.out.println(\"Exception!! Data Not Inserted Into Database\");\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\r\n \tSystem.out.println(\"Got a status deletion notice id:\" + arg0.getStatusId());\r\n }\r\n \r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n \r\n @Override\r\n public void onStatus(Status status) {\r\n \t\r\n \t User user = status.getUser();\r\n \t \r\n String username = status.getUser().getScreenName();\r\n String profileLocation = user.getLocation();\r\n long tweetId = status.getId(); \r\n String content = status.getText();\r\n \r\n \r\n //Create a model for the live data\r\n TweetModel memoryData = new TweetModel(username, profileLocation, tweetId, content);\r\n \r\n //store to MongoDB if data is correct\r\n System.out.println(++counter + \") username: \" + username + \" location: \" + profileLocation + \" tweetId \" + tweetId + \" Text: \" + content );\r\n data.save(memoryData);\r\n }\r\n \r\n\t\t\t@Override\r\n public void onTrackLimitationNotice(int arg0) {\r\n\t System.out.println(\"Got track limitation notice:\" + arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onStallWarning(StallWarning warning) {}\r\n };\r\n \r\n //Filter the live tweet results\r\n FilterQuery filterQuery = new FilterQuery();\r\n //Search for tweets with specific keywords\r\n String keywords[] = {\"Java\", \"Python\", \"PHP\"};\r\n //Restrict the language to English\r\n String[] lang = {\"en\"}; \r\n //Add the Filters\r\n filterQuery.language(lang);\r\n filterQuery.track(keywords);\r\n //Listen for Live Tweets\r\n twitterStream.addListener(listener);\r\n twitterStream.filter(filterQuery);\r\n\t}",
"public Twitter() {\n usersMap = new HashMap<>();\n }",
"public /*User*/ void createUser (String username) throws TwitterException, JAXBException{\n\t\t\n \tSystem.out.println(\"STEP 1 - \" + username);\n \ttwitter4j.User user1 = twitter.showUser(username);\n \ttwCount ++;\n \t\n \tList<Status> status = twitter.getHomeTimeline();\n \ttwCount ++;\n \t\n \tString name = user1.getName();\n \tString location = user1.getLocation();\n \tString description = user1.getDescription();\n \t\n \tArrayList<Integer> follower = new ArrayList<Integer>();\n \tArrayList<Integer> following = new ArrayList<Integer>();\n \tArrayList<Integer> friend = new ArrayList<Integer>();\n \t\n \tString tweets = getTweets((int)user1.getId(), 200);\n \tArrayList<String> tweetsFollowing = new ArrayList<String>();\n \tArrayList<String> tweetsFriends = new ArrayList<String>();\n \t\n\n\t\t\n\t\t\n \t\n\t\tIDs ids, ids2;\n\t\tids = twitter.getFollowersIDs(username, -1); // follower\n\t\ttwCount ++;\n\t\tids2 = twitter.getFriendsIDs(username, -1); // following\n\t\ttwCount ++;\n\t\t\n\n\t\t\n\t \tSystem.out.println(\"STEP 2 - \" + username);\n\t\t\n\n\t\t/*Follower*/ /*MAX 5000*/\n for (long id : ids.getIDs()) { \n\t \tfollower.add((int) id);\n\n\n }\n \n \n /**Following**/ /*MAX 5000*/\n for (long id : ids2.getIDs()) { \n \tfollowing.add((int) id);\n \n }\n \n\n \n /*Friends*/\n \n \t/*showFriendship(int sourceId,int targetId) throws TwitterException\n\t\tGets the detailed relationship status between a source user and a target user\n\t\tThis method calls http://api.twitter.com/1/friendships/show.json */\n \n Relationship r = null;\n int z = 0;\n for (long id : ids2.getIDs()){\n \t r = twitter.showFriendship(user1.getId(),id);\n \t if (r.isSourceFollowedByTarget()){\n \t\t z += 1;\n \t\t// System.out.println(id + \",number \"+ i );\n \t\t friend.add((int)id);\n \t }\n \t \n \t if (z >= 20){\n \t\t break;\n \t }\n \t\n }\n \n \n \n \n \n \n // \tSystem.out.println(\"\\n hddjkdsakjsadkjsdkj \" + friend.size() + \" \" + following.size());\n \n \n \n \tSystem.out.println(\"STEP 3 - \" + username);\n \t\n \t\n \t\n \t\n String u = \"\";\n \n \n int count = 0;\n /*tweetsFollowing*/\n for (int j : following){\n //\tSystem.out.println(\"\\n\\n\\n prints following: \" + j );\n \tu = getTweets(j, 10);\n // \tSystem.out.println(\"u.size \" + u.length() );\n \tif( u.length() > 0){\n \t\ttweetsFollowing.add(u);\n \t\tcount ++;\n \t}\n if (count >= 10){\n \tbreak;\n }\n \t\n }\n \n \n \n /*tweetsFriends*/\n\t\tcount = 0;\n if (friend.size() >= 10){\n\t for (int i : friend){\n\t // \tSystem.out.println(\"\\n there is some friends: \" + friend.size() );\n\t \tu = getTweets(i, 10);\n\t //\tSystem.out.println(\"\\n U.LENGHT \" + u.length() );\n\t \tif (u.length() > 0){\n\t \t\ttweetsFriends.add(u);\n\t \t\tcount ++;\n\t \t}\n\t \t\n\t if (count >= 10){\n\t \tbreak;\n\t }\n\t }\n\t \n }else if (following.size() > 21){ // no friends, I consider the following (not in tweetsFollowing) like friends \n //\tSystem.out.println(\"There is not a friend - > considers some following like friends\");\n \tfor (int i = 11; i < following.size(); i++){ // considers some following like friends\n\t \t//System.out.println(\"\\n\\n\\n prints follower: \" + i );\n\t \tu = getTweets(i, 10);\n\t // \tSystem.out.println(\"u.size friend\" + u.length() );\n\t \tif (u.length() > 0){\n\t \t\ttweetsFriends.add(u);\n\t \t\tcount ++;\n\t \t}\n\t \t\n\t if (count >= 10){\n\t \tbreak;\n\t }\n\t }\n \t\n }else{// I consider the following like friends\n \ttweetsFriends = tweetsFollowing;\n }\n \n \n//\t\t\n\n \n \n //System.out.println(tweetsFriends.size() + \"siiixx\");\n \n \ttwitter.User user = new twitter.User(username, name, location, friend, following, tweets, tweetsFriends, tweetsFollowing, description);\n //\tSystem.out.println(user.getTweetsFriends().size() + \"siiixx\");\n \t\n \tFile file = new File(\"otherFile/users/\"+username+\".xml\");\n\t\tJAXBContext jaxbContext = JAXBContext.newInstance(twitter.User.class);\n\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n\t\t// output pretty printed\n\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n\t\tjaxbMarshaller.marshal(user, file);\n\t\tjaxbMarshaller.marshal(user, System.out);\n\n \n }",
"@Override\r\n public void build() throws IOException, TwitterException {\r\n // Read the csv file\r\n CSVReader csvr = new CSVReader(\";\", sourcePath);\r\n // Will contains the csv file rows\r\n ArrayList<String[]> rows;\r\n // Set builder params\r\n setBuilderParams(indexPath);\r\n // Get the whole CSV rows\r\n rows = csvr.readCSV();\r\n \r\n TweetsIndexManager tim = new TweetsIndexManager(\"index/AllTweetsIndex\");\r\n\r\n // Mantain the id of a user\r\n String id;\r\n // Manatain the id and the number of the followers of the user\r\n String[] result;\r\n // Mantain the number of followers of that user\r\n int followers;\r\n \r\n int tNotFound = 0;\r\n int tFound = 0;\r\n \r\n // For each politicians in the file read\r\n for (String[] row : rows) {\r\n // Get the politician name\r\n String name = row[0];\r\n // Get the politician surname\r\n //String surname = row[1];\r\n // Get all users that have the same name of the politician\r\n result = findUserTwitterId(name, tim);\r\n // Get the userId\r\n id = result[0]; // row[1]; \r\n // Get the number of followers\r\n followers = Integer.parseInt(result[1]);\r\n \r\n //System.out.println(\"Current twitter ID: \" + id);\r\n \r\n if(id.equals(\"\")) {\r\n tNotFound++;\r\n id= row[1];\r\n followers = 800;\r\n } else {\r\n tFound++;\r\n }\r\n \r\n //System.out.println(\"Politicians Builder index path: \" + this.indexPath);\r\n \r\n //System.out.println(\"Search for : \" + name + \", followers: \" + followers);\r\n // If a user was found and it has at list a certain value of followers\r\n if (!id.equals(\"\") && followers >= 800) {\r\n // Create a new document for the index\r\n this.name.setStringValue((name).toLowerCase());\r\n this.screenName.setStringValue(id);\r\n\r\n //System.out.println(\"\");\r\n //System.out.println(this.politician.get(\"name\"));\r\n //System.out.println(this.politician.get(\"screenName\"));\r\n\r\n // Define the politician vote\r\n // If the pol vote is equal to his group vote\r\n /*if (row[2].equals(groupVote.get(row[3]))) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is defined in the csv file\r\n } else if (row[2].equals(\"si\") || row[2].equals(\"no\")) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is not defined in the csv file\r\n } else if (row[2].equals(\"-\") && !row[3].equals(\"MISTO\")) {\r\n // Return his group vote and write the document\r\n this.vote.setStringValue(groupVote.get(row[3]));\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n }*/\r\n \r\n \r\n this.vote.setStringValue(groupVote.get(row[2]));\r\n \r\n //this.vote.setStringValue(\"si\");\r\n \r\n //System.out.println(this.politician.get(\"vote\"));\r\n \r\n this.writer.addDocument(this.politician);\r\n }\r\n \r\n //System.out.println(\"Party: \" + row[2]);\r\n //System.out.println(\"----------------\");\r\n \r\n this.writer.commit();\r\n \r\n }\r\n \r\n System.out.println(\"Twitter IDs not found: \" + tNotFound);\r\n \r\n System.out.println(\"Twitter IDs found: \" + tFound);\r\n \r\n this.writer.close();\r\n }",
"public void postTweet(int userId, int tweetId) {\n size++;\n Tweet newTweet = new Tweet(tweetId, size);\n User target = null;\n for (User user : users) {\n if (user.id == userId) {\n target = user;\n break;\n }\n }\n if (target == null) {\n target = new User(userId);\n users.add(target);\n }\n target.tweetList.add(newTweet);\n }",
"private void setFollowingCount() {\n ParseQuery<Follow> query = ParseQuery.getQuery(Follow.class);\n query.whereEqualTo(Follow.KEY_FROM, user);\n query.countInBackground((count, e) -> {\n mFollowingTextView.setText(String.valueOf(count));\n });\n }",
"public static Twitter createTwitterObject() {\n\t\tOAuth2Token token = createFactory();\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\n\n\t\tcb.setApplicationOnlyAuthEnabled(true);\n\t\tcb.setOAuthConsumerKey(Secret.cKey);\n\t\tcb.setOAuthConsumerSecret(Secret.cSecret);\n\t\tcb.setOAuth2TokenType(token.getTokenType());\n\t\tcb.setOAuth2AccessToken(token.getAccessToken());\n\n\t\tTwitter twitter = new TwitterFactory(cb.build()).getInstance();\n\t\t\n\t\treturn twitter;\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if ((accounts.size() == 0) || (jTextAreaTweets.getText() == null || jTextAreaTweets.getText().length() == 0)) {\n int mc = JOptionPane.WARNING_MESSAGE;\n JOptionPane.showMessageDialog(null, \"Add an account/tweet/mention to tweet!!\", \"Attention!!\", mc);\n } else {\n String ids = jTextAreaId.getText();\n String lines[] = ids.split(\"\\\\r?\\\\n\");\n if (lines.length > 0) {\n for (String str : lines) {\n if (str != null && str.length() > 0) {\n tagIDList.add(str);\n }\n }\n } else {\n }\n if (tagIDList.size() > 0) {\n\n for (String mention : tagIDList) {\n for (String tweet : tweetList) {\n String tempTweet = tweet + \" \" + mention;\n mentionStack.push(tempTweet);\n }\n }\n\n } else {\n for (String tweet : tweetList) {\n String tempTweet = tweet;\n mentionStack.push(tempTweet);\n }\n }\n ArrayList<Thread> threads = new ArrayList<Thread>();\n long timeIntervalNumber = 1000 * 60;\n long timeIntervalNumberMax = 1000 *60*3;\n try {\n timeIntervalNumber = Long.parseLong(timeIntervalInput.getText()) * 1000;\n if (timeIntervalNumber < 60000)\n timeIntervalNumber = 1000 * 60;\n\n\n } catch (Exception e1) {\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n try{\n timeIntervalNumberMax = Long.parseLong(timeIntervalInputMax.getText()) * 1000;\n if (timeIntervalNumberMax < 60000)\n timeIntervalNumberMax = 1000 * 60;\n }catch(Exception ex){\n ex.printStackTrace();\n }\n if(timeIntervalInput==timeIntervalInputMax)\n timeIntervalNumberMax+=30;\n for (Account account : accounts) {\n\n TweeterThread tweeterThread = new TweeterThread(mentionStack,\n account, accountDispName,\n statusDisplay, timeIntervalNumber<timeIntervalNumberMax?timeIntervalNumber:timeIntervalNumberMax,\n timeIntervalNumber>timeIntervalNumberMax?timeIntervalNumber:timeIntervalNumberMax,\n tweetLog, f1);\n Thread t = new Thread(tweeterThread);\n t.start();\n nThreads++;\n threads.add(t);\n }\n\n }\n }",
"public void onTweetClicked(View v) {\n String tweetText = tweetInput.getText().toString();\n RestClient client = TwitterClientApp.getRestClient();\n client.postTweet(tweetText, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(JSONObject jsonObject) {\n // Parse tweet and finish activity\n Tweet twt = new Tweet(jsonObject);\n twt.save();\n Intent result = new Intent();\n result.putExtra(EXTRA_TWEET, twt);\n setResult(RESULT_OK, result);\n finish();\n }\n\n @Override\n public void onFailure(Throwable throwable, JSONObject jsonObject) {\n super.onFailure(throwable, jsonObject);\n Log.e(\"ComposeTweetActivity\", \"Error occurred\");\n finish();\n }\n\n });\n }",
"public Twitter() {\n userToTwitter = new HashMap<>();\n friends = new HashMap<>();\n tweets = new HashMap<>();\n }",
"public Twitter() {\n followees = new HashMap<>();\n tweetList = new ArrayList<>();\n }",
"public void postTweet(int userId, int tweetId) {\n\n }",
"public static void main(String[] args) throws TweetTooLongException {\n Scanner stdin = new Scanner(System.in); //for console input\r\n \t\r\n\t\tTimeline Tlist = new Timeline();\t\r\n\t\tArrayList<Tweet> allTweet = new ArrayList<Tweet>();\t\t\r\n\t\tArrayList followList = new ArrayList();\r\n\t\tString user = \"\";\r\n\t\tArrayList userList = new ArrayList();\r\n\t\t\t\t\r\n\t\tfor(int a = 0; a < args.length; a ++)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tFile srcFile = new File(args[a]);\r\n\t\t\t\tfor(int i = 0; i < args[a].length(); i ++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(args[a].charAt(i) == '.')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tuser = args[a].substring(0, i);\t\r\n\t\t\t\t\t\tuserList.add(user);\r\n\t\t\t\t\t\tfollowList.add(user);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tScanner fileIn = new Scanner(srcFile);\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\twhile(fileIn.hasNextLine())\r\n\t\t\t\t{\r\n\t\t\t\t\tString currline = fileIn.nextLine();\r\n\t\t\t\t\tint lineLength = currline.length();\r\n\t\t\t\t\tint index = 0;\t\t\t\t\t\r\n\t\t\t\t\tint time = 0;\r\n\t\t\t\t\tString message = \"\";\r\n\r\n\t\t\t\t\tfor(int k = 0; k < lineLength; k ++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(currline.charAt(k) == ':' && index == 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttime = Integer.parseInt(currline.substring(index, k));\r\n\t\t\t\t\t\t\tindex = k + 1;\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(index != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmessage = currline.substring(index, lineLength);\r\n\t\t\t\t\t\t\tindex = k + 1;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tTlist.add(new Tweet(time, message, user));\r\n\t\t\t\t\t\t\t\tallTweet.add(new Tweet(time, message, user));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}catch(TweetTooLongException e){\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\t\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}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Error: Cannot access input file\");\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t\r\n boolean done = false;\r\n while (!done) {\r\n System.out.print(\"Enter option : \");\r\n String input = stdin.nextLine();\r\n\r\n //only do something if the user enters at least one character\r\n if (input.length() > 0) {\r\n String[] commands = input.split(\" \");//split on space\r\n switch(commands[0]){\r\n case \"list\": \t\r\n \tif(commands.length != 2)\r\n \t{\r\n \t\tSystem.out.println(\"Invalid Command\");\r\n \t\tbreak;\r\n \t}\r\n \tif(commands[1].equals(\"users\"))\r\n \t{\r\n \t\tfor(int i = 0; i < userList.size(); i ++)\r\n \t{\r\n \t\tSystem.out.println(userList.get(i));\r\n \t} \t\t\r\n \t}else if(commands[1].equals(\"following\"))\r\n \t{\r\n \t\tfor(int i = 0; i < followList.size(); i ++)\r\n \t{\r\n \t\tSystem.out.println(followList.get(i));\r\n \t}\r\n \t}\r\n \t\r\n break;\r\n case \"follow\":\r\n \tif(commands.length != 2)\r\n \t{\r\n \t\tSystem.out.println(\"Invalid Command\");\r\n \t\tbreak;\r\n \t}\r\n \tif(!userList.contains(commands[1]))\r\n \t{\r\n \t\tSystem.out.println(\"Invalid user\");\r\n \t}\r\n \telse if(followList.contains(commands[1]))\r\n \t{\r\n \t\tSystem.out.println(\"Warning: User already followed\");\r\n \t}\r\n \telse\r\n \t{\r\n \t\tfor(int i = 0; i < userList.size(); i ++)\r\n \t\t{\r\n \t\t\tif(userList.get(i).equals(commands[1]))\r\n \t\t\t{\r\n \t\t\t\tfollowList.add(i, commands[1]);\r\n \t\t\t}\r\n \t\t}\r\n \t\tfor(int j = 0; j < allTweet.size(); j ++)\r\n \t\t{\r\n \t\t\tif(allTweet.get(j).getUser().equals(commands[1]))\r\n \t\t\t{\r\n \t\t\t\tTlist.add(allTweet.get(j));\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n break;\r\n case \"unfollow\":\r\n \tif(commands.length != 2)\r\n \t{\r\n \t\tSystem.out.println(\"Invalid Command\");\r\n \t\tbreak;\r\n \t}\r\n \tif(!userList.contains(commands[1]))\r\n \t{\r\n \t\tSystem.out.println(\"Invalid user\");\r\n \t}\r\n \telse if(!followList.contains(commands[1]))\r\n \t{\r\n \t\tSystem.out.println(\"Warning: User not followed\");\r\n \t}\r\n \telse\r\n \t{\r\n \t\tfor(int i = 0; i < followList.size(); i ++)\r\n \t{\r\n \t\t\tif(followList.get(i).equals(commands[1]))\r\n \t\t\t{\r\n \t\t\t\tfollowList.remove(i);\r\n \t\t\t}\r\n \t}\r\n \t\tTlist.remove(commands[1]);\r\n \t}\r\n break;\r\n case \"search\":\r\n \tif(commands.length != 2)\r\n \t{\r\n \t\tSystem.out.println(\"Invalid Command\");\r\n \t\tbreak;\r\n \t}\r\n \tTlist.search(commands[1]).print();\r\n break;\r\n case \"print\":\r\n \tif(commands.length > 2)\r\n \t{\r\n \t\tSystem.out.println(\"Invalid Command\");\r\n \t\tbreak;\r\n \t}\r\n \tif(commands.length<2)\r\n \t{\r\n \t\tTlist.print();\r\n \t}else if(commands.length == 2)\r\n \t{\r\n \t\tint timeIndex = Integer.parseInt(commands[1]);\r\n \t\tTlist.print(timeIndex);\r\n \t} \t\r\n break;\r\n case \"quit\":\r\n done = true;\r\n System.out.println(\"exit\");\r\n break;\r\n default: //a command with no argument\r\n System.out.println(\"Invalid Command\");\r\n break;\r\n }\r\n } //end if\r\n } //end while\r\n }",
"public Twitter() {\n twitterTweetMap = new HashMap<>();\n reverseTwitterFollowMap = new HashMap<>();\n }",
"public long getLastTweetId() {\n return tweetAdapter.getItem(tweetAdapter.getCount()-1).getTweetId();\n }",
"public Twitter() {\n\t\t\ttweets = new ArrayList<>();\n\t\t\tuserTweets = new HashMap<>();\n\t\t\ttweetOwner = new HashMap<>();\n\t\t\tuserRelation = new HashMap<>();\n\t\t}",
"@UiThreadTest\n\tpublic void testMakeTweet() {\n\t\t// Set that the Listview Adapter gets a new tweet\n\t\tLonelyTwitterActivity lta = getActivity();\n\t\tint old_length = lta.getAdapter().getCount();\n\t\tmakeTweet(\"NaOH Test. Wub. Wub.\");\n\t\tArrayAdapter<NormalTweetModel> aa = lta.getAdapter();\n\t\tassertEquals(aa.getCount(), old_length+1);\n\t\t\n\t\tassertTrue(aa.getItem(aa.getCount()-1) instanceof NormalTweetModel);\n\t\t\n\t\tassertEquals(aa.getItem(aa.getCount()-1).getText(), \"NaOH Test. Wub. Wub.\");\n\t}",
"private static void printMostRetweetedTweets() throws Exception{\n\t\t\n\t\tString max_retweeted_tweet[] = new String[3];\t//string containing tweets\n\t\tint max_counts[] = new int[3];\t//string containing their retweet count\n\t\t\n\t\tfor(Status status : statusList){\n\t\t\tif(!status.isRetweet() && status.getURLEntities().length != 0){\n\t\t\t\tint count = status.getRetweetCount();\n\t\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\tif(count>max_counts[index]){\n\t\t\t\t\tmax_counts[index] = count;\n\t\t\t\t\tmax_retweeted_tweet[index] = status.getText();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most retweeted tweets with links in them */\n\t\tSystem.out.println(\"the top 3 most retweeted tweets with links in them : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Tweet : \" + max_retweeted_tweet[i] + \" retweeted \"+ max_counts[i] + \" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}",
"public void onTweetSuccess(Tweet tweet);",
"@Override\n public void onTweetsFetched(List<Tweet> tweets) {\n finalTweetID = tweets.get(tweets.size() - 1).getId();\n twitterCallback.onTweetsFetched(tweets); //Return tweets\n }",
"public void addUserVenuesListener(long userId) {\r\n\tStatusListener listener = new StatusListener() { \r\n\t\t@Override public void onStatus(Status status) {\r\n\t\t\t// If the shutdown time is after the current time, record the tweet, otherwise close the connection\r\n\t\t\tif (Calendar.getInstance().getTime().before( shutdownTime.getTime() )) {\r\n\t\t\t\ttweets.add(status);\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOGGER.log(Level.FINE, \"Shutting down Twitter stream..\");\r\n\t\t\t\tclearLists();\r\n\t\t\t\tshutdown = true;\r\n\t\t\t\ttwitterStream.shutdown();\r\n\t\t\t}\r\n\t\t} \r\n\t\t@Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {} \r\n\t\t@Override public void onTrackLimitationNotice(int numberOfLimitedStatuses) {} \r\n\t\t@Override public void onScrubGeo(long userId, long upToStatusId) {} \r\n\t\t@Override public void onStallWarning(StallWarning warning) {}\r\n\t\t@Override public void onException(Exception ex) { ex.printStackTrace(); }\r\n\t\t};\r\n\t\ttwitterStream.addListener(listener);\r\n\t\t\r\n\t\t// Filter the listener to tweets from the given user\r\n\t\tint count = 0;\r\n\t\tlong[] idToFollow = new long[1];\r\n\t\tidToFollow[0] = userId; \r\n\t\tString[] stringsToTrack = null;\r\n\t\tdouble[][] locationsToTrack = null;\r\n\t\ttwitterStream.filter(new FilterQuery(count, idToFollow, stringsToTrack, locationsToTrack));\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n HttpSession session = request.getSession();\r\n \r\n String action = request.getParameter(\"action\");\r\n User user = (User) session.getAttribute(\"user\");\r\n\r\n String url = \"/home.jsp\";\r\n \r\n if(action.equals(\"post_tweet\")) {\r\n String composerEmail = user.getemail();\r\n String message = request.getParameter(\"user_tweet\");\r\n ArrayList<String> mentions = null; //ArrayList used if more than one user is mentioned. \r\n UserMention userMention = new UserMention();\r\n HashTag hash = new HashTag();\r\n ArrayList<String> hashTags = null; //Arraylist used if more than one hashtag is used\r\n \r\n //find usernames that are mentioned. Returned values are the email addresses of usernames.\r\n mentions = findMentions(message);\r\n //find hashtags that are used.\r\n hashTags = findHashTags(message);\r\n //build tweet object\r\n Tweet tweet = new Tweet();\r\n tweet.setcomposerEmail(composerEmail);\r\n tweet.setMessage(message);\r\n \r\n //set boolean value mentions\r\n if(!mentions.isEmpty())\r\n tweet.setMentions(true);\r\n \r\n if(!hashTags.isEmpty())\r\n tweet.sethashTags(true);\r\n \r\n try {\r\n TweetDB.insert(tweet);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ArrayList<UserTweetInfo> tweets;\r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n \r\n //If mentions, insert userMention with user tweetID\r\n if(!mentions.isEmpty()){\r\n int tweetid = tweets.get(0).gettweetid();\r\n userMention.setemailAddress(email);\r\n userMention.settweetid(tweetid);\r\n for(int i = 0; i < mentions.size(); i++)\r\n {\r\n userMention.setuserMentionedEmail(mentions.get(i));\r\n \r\n try {\r\n UserMentionDB.insert(userMention);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n }\r\n //if hashTags, check for new hashtag or update\r\n if(!hashTags.isEmpty()){\r\n ArrayList<HashTag> allHashTags;\r\n allHashTags = HashTagDB.getHashTags();\r\n boolean found = false;\r\n int tweetid = tweets.get(0).gettweetid();\r\n TweetHashTag tweethash = new TweetHashTag();\r\n\r\n //if hashtag DB not empty, otherwise insert as new\r\n if(!allHashTags.isEmpty()) {\r\n for(int i = 0; i < hashTags.size(); i++) {\r\n for(int j = 0; j < allHashTags.size(); j++) {\r\n //update hashtag count in DB \r\n if(hashTags.get(i).equals(allHashTags.get(j).gethashText())) {\r\n found = true;\r\n int count = allHashTags.get(j).gethashCount();\r\n int id = allHashTags.get(j).getid();\r\n count += 1;\r\n hash.setid(id);\r\n hash.sethashCount(count);\r\n HashTagDB.update(hash);\r\n \r\n //associate hashtagID with tweetID\r\n tweethash.settweetid(tweetid);\r\n tweethash.sethashid(id);\r\n try {\r\n TweetHashTagDB.insert(tweethash);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n } \r\n }\r\n //insert new hashtag\r\n if(!found) {\r\n hash.sethashText(hashTags.get(i));\r\n hash.sethashCount(1);\r\n try {\r\n HashTagDB.insert(hash);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //Get HashTagID from DB and associate hashID with TweetID\r\n HashTag addedHashTag = new HashTag();\r\n addedHashTag = HashTagDB.searchByHashText(hashTags.get(i));\r\n tweethash.sethashid(addedHashTag.getid());\r\n tweethash.settweetid(tweetid);\r\n try {\r\n TweetHashTagDB.insert(tweethash);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n found=false; \r\n }\r\n }else{\r\n for(int i = 0; i < hashTags.size(); i++) {\r\n hash.sethashText(hashTags.get(i));\r\n hash.sethashCount(1);\r\n try {\r\n HashTagDB.insert(hash);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n HashTag addedHashTag = new HashTag();\r\n //getHashTagID from DB and associate hashID with tweetID in TweetHashTagDB\r\n addedHashTag = HashTagDB.searchByHashText(hashTags.get(i));\r\n tweethash.sethashid(addedHashTag.getid());\r\n tweethash.settweetid(tweetid);\r\n try {\r\n TweetHashTagDB.insert(tweethash);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n }\r\n \r\n }\r\n ArrayList<HashTag> top10Hash;\r\n top10Hash = HashTagDB.top10HashTags();\r\n session.setAttribute(\"trends\", top10Hash);\r\n session.setAttribute(\"tweets\", tweets);\r\n }\r\n if(action.equals(\"delete_tweet\")){\r\n // Get the id of this tweet from the request\r\n String tweetID = request.getParameter(\"tweetID\");\r\n ArrayList<UserTweetInfo> tweets;\r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n boolean mentions = false;\r\n boolean hashTags = false;\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n ArrayList<TweetHashTag> tweetHash;\r\n \r\n //check for user mentions and hashtags\r\n for(int i = 0; i < tweets.size(); i++) {\r\n if(tweets.get(i).gettweetid() == Integer.parseInt(tweetID)) {\r\n if(tweets.get(i).getmentions() != null)\r\n mentions = true;\r\n if(tweets.get(i).gethashtags() != null)\r\n hashTags = true;\r\n }\r\n }\r\n //if there are user mentions, delete mentions\r\n if(mentions){\r\n try {\r\n UserMentionDB.delete(tweetID);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n //if there are hashtags, delete hashtag or decrement current hashtag\r\n if(hashTags){\r\n HashTag hash = new HashTag();\r\n int count = 1;\r\n tweetHash = TweetHashTagDB.selectHashTagIDsByTweet(Integer.parseInt(tweetID));\r\n\r\n for(int i = 0; i < tweetHash.size(); i++)\r\n {\r\n hash = HashTagDB.searchByHashID(tweetHash.get(i).gethashid());\r\n //if count is 1, then hashtag is deleted from DB\r\n if(hash.gethashCount() == 1)\r\n {\r\n try {\r\n HashTagDB.delete(hash.getid());\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }else{\r\n //decrement hashCount by 1\r\n int hashCount = hash.gethashCount();\r\n hashCount -= count;\r\n hash.sethashCount(count);\r\n HashTagDB.update(hash);\r\n }\r\n }\r\n //delete TweetID/HashtagID association in DB\r\n try {\r\n TweetHashTagDB.delete(Integer.parseInt(tweetID));\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n //update top 10 hashtags \r\n ArrayList<HashTag> top10Hash;\r\n top10Hash = HashTagDB.top10HashTags();\r\n session.setAttribute(\"trends\", top10Hash);\r\n }\r\n try {\r\n TweetDB.delete(tweetID);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n tweets.clear(); //clear tweets array to update\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n session.setAttribute(\"tweets\", tweets);\r\n \r\n }\r\n if(action.equals(\"follow_user\"))\r\n {\r\n int userID = user.getid(); //get session user ID\r\n String followedUserID = request.getParameter(\"followedUserID\"); \r\n UserFollow follow = new UserFollow();\r\n \r\n //set Follow object\r\n follow.setuserID(userID);\r\n follow.setfollowedUserID(Integer.parseInt(followedUserID));\r\n \r\n //insert Follow object into DB\r\n try {\r\n FollowDB.insert(follow);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Pull follows for user and set session attribute\r\n ArrayList<UserFollow> follows;\r\n ArrayList<UserTweetInfo> tweets;\r\n int numFollowing = 0;\r\n\r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n \r\n follows = FollowDB.selectFollowsByUser(userID);\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n numFollowing = TweetDB.numberOfFollowing(email);\r\n\r\n session.setAttribute(\"tweets\", tweets);\r\n session.setAttribute(\"userFollows\", follows);\r\n session.setAttribute(\"numberOfFollowing\", numFollowing);\r\n }\r\n if(action.equals(\"unfollow_user\"))\r\n {\r\n int userID = user.getid();\r\n String followedUserID = request.getParameter(\"followedUserID\");\r\n UserFollow follow = new UserFollow();\r\n \r\n //set Follow object\r\n follow.setuserID(userID);\r\n follow.setfollowedUserID(Integer.parseInt(followedUserID));\r\n \r\n //Delete follow from DB\r\n try {\r\n FollowDB.delete(follow);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //update session with new follow list for user\r\n ArrayList<UserFollow> follows;\r\n ArrayList<UserTweetInfo> tweets;\r\n int numFollowing = 0;\r\n \r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n \r\n follows = FollowDB.selectFollowsByUser(userID);\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n numFollowing = TweetDB.numberOfFollowing(email);\r\n \r\n session.setAttribute(\"tweets\", tweets);\r\n session.setAttribute(\"userFollows\", follows);\r\n session.setAttribute(\"numberOfFollowing\", numFollowing);\r\n \r\n }\r\n \r\n int numberOfTweets = TweetDB.numberOfUserTweets(user);\r\n session.setAttribute(\"numberOfTweets\", numberOfTweets);\r\n getServletContext()\r\n .getRequestDispatcher(url)\r\n .forward(request, response);\r\n }",
"public void postTweet(int userId, int tweetId) {\r\n\t\t\ttwi twitt = new twi(userId, tweetId, timeStamp++);\r\n\t\t\tList<twi> list = tweet.get(userId);\r\n\t\t\tif (list == null) {\r\n\t\t\t\tlist = new ArrayList<twi>();\r\n\t\t\t\tlist.add(twitt);\r\n\t\t\t\ttweet.put(userId, list);\r\n\t\t\t} else {\r\n\t\t\t\tif (list.size() == 10) {\r\n\t\t\t\t\tlist.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(twitt);\r\n\t\t\t}\r\n\t\t\tList<Integer> friend = follower.get(userId);\r\n\t\t\tif (friend == null) {\r\n\t\t\t\tfriend = new LinkedList<Integer>();\r\n\t\t\t\tfriend.add(userId);\r\n\t\t\t\tfollower.put(userId, friend);\r\n\t\t\t}\r\n\t\t}",
"public LinkedList<User> getUsers() throws TwitterException {\n System.out.println(\"##########Getting The Tweets##########\");\n LinkedList<User> users = new LinkedList<>();\n for (String keyword : this.wordsLookingFor) {\n //Search for tweets\n for (Status A : this.searchTweets(keyword)) {\n //System.out.println(A.getText());\n getUserFromStatus(users, A);\n }\n }\n\n System.out.println(\"Users Number is \".concat(Integer.toString(users.size())));\n return users;\n }",
"private Tweet() {\n this(\"\", -1, \"\", false);\n }",
"@Override\n public void populateTimeline() {\n long fetchMoreStart = tweets.size() > 0 ? tweets.get(tweets.size() - 1).getUid() : -1;\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n // on success\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n addAll(Tweet.fromJSONArray(json));\n }\n\n // on failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, fetchMoreStart);\n }",
"public Q355_Twitter() {\n userId2Followees = new HashMap<>();\n userId2Followers = new HashMap<>();\n userId2AllTweets = new HashMap<>();\n userId2TopTenTweets = new HashMap<>();\n }",
"public List<TweetDto> tweets(String username) {\n\t\tList<Tweet> convert = userRepository.findByUname(username).getTweets();\n\n\t\tList<TweetDto> dto = new ArrayList<>();\n\t\tfor(Tweet check : convert){\n\t\t\tswitch (check.getType()) {\n\t\t\tcase \"simple\":\n\t\t\t\tdto.add(tweetMapper.toSimpleDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"reply\":\n\t\t\t\tdto.add(tweetMapper.toReplyDto(check));\n\t\t\t\tbreak;\n\t\t\tcase \"repost\":\n\t\t\t\tdto.add(tweetMapper.toRepostDto(check));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tCollections.sort(dto, new TweetCompare());\n\t\tCollections.reverse(dto);\n\t\treturn dto;\n\t}",
"public static void main(String[] args) throws TwitterException, IOException {\n\t\tfinal long count = 10;\n\n\t\t// Twitter Conf.\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\n\t\tcb.setDebugEnabled(true).setOAuthConsumerKey(CONSUMER_KEY)\n\t\t\t\t.setOAuthConsumerSecret(CONSUMER_SECRET)\n\t\t\t\t.setOAuthAccessToken(ACCESS_KEY)\n\t\t\t\t.setOAuthAccessTokenSecret(ACCESS_SECRET);\n\n\t\tfinal TwitterStream twitterStream = new TwitterStreamFactory(cb.build())\n\t\t\t\t.getInstance();\n\n\t\tStatusListener listener = new StatusListener() {\n\t\t\tprivate long counter = 0;\n\n\t\t\t@Override\n\t\t\tpublic void onStatus(Status status) {\n//\t\t\t\tSystem.out.println(status.getUser().getName());\n//\t\t\t\twriter.println(TwitterObjectFactory.getRawJSON(status)+\",\");\n\t\t\t\tTweet tweet = new Tweet(status);\n\t\t\t\ttry {\n\t\t\t\t\tHBaseHelper.put(tweet);\n\t\t\t\t} catch (IOException | JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcounter++;\n\t\t\t\tSystem.out.println(counter);\n//\t\t\t\tif (counter >= count) {\n//\t\t\t\t\ttwitterStream.shutdown();\n//\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDeletionNotice(\n\t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t\t\t// System.out.println(statusDeletionNotice.toString());\n\t\t\t\t// System.out.println(\"Got a status deletion notice id:\" +\n\t\t\t\t// statusDeletionNotice.getStatusId());\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n\t\t\t\tSystem.out.println(\"Got track limitation notice:\"\n\t\t\t\t\t\t+ numberOfLimitedStatuses);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onScrubGeo(long userId, long upToStatusId) {\n\t\t\t\tSystem.out.println(\"Got scrub_geo event userId:\" + userId\n\t\t\t\t\t\t+ \" upToStatusId:\" + upToStatusId);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStallWarning(StallWarning warning) {\n\t\t\t\tSystem.out.println(\"Got stall warning:\" + warning);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onException(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t};\n\t\ttwitterStream.addListener(listener);\n\t\tFilterQuery fq = new FilterQuery();\n\t\tString keywords[] = { \"#nosql\" };\n\t\tfq.track(keywords);\n\n\t\ttwitterStream.sample();\n\t}",
"public JsonHttpResponseHandler getPopulateTimelineHandler(final long maxId, final List<Tweet> tweets, final TweetAdapter adapter, final Context context, final ProgressBarListener progressBarListener) {\n // Start showing the progress bar.\n progressBarListener.showProgressBar();\n\n JsonHttpResponseHandler handler = new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"TwitterClient\", response.toString());\n\n List<Tweet> newTweets = Tweet.fromJsonArray(response);\n\n // If there is no new tweets, do nothing.\n if (newTweets.size() > 0 && newTweets.get(0).getUid() > maxId) {\n tweets.addAll(newTweets);\n adapter.notifyDataSetChanged();\n }\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"TwitterClient\", responseString);\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, String responseString) {\n super.onSuccess(statusCode, headers, responseString);\n\n progressBarListener.hideProgressBar();\n }\n };\n\n return handler;\n }",
"public int getCount() {\n return tweets.size();\n }",
"TwitterResourceProvider(final IndexableTweets indexableTweets) throws IOException {\r\n tweets = new Stack<>();\r\n clones = indexableTweets.getClones();\r\n TwitterTemplate twitterTemplate = new TwitterTemplate( //\r\n indexableTweets.getConsumerKey(), //\r\n indexableTweets.getConsumerSecret(), //\r\n indexableTweets.getToken(), //\r\n indexableTweets.getTokenSecret());\r\n StreamingOperations streamingOperations = twitterTemplate.streamingOperations();\r\n StreamListener streamListener = new StreamListener() {\r\n\r\n final AtomicInteger counter = new AtomicInteger();\r\n final AtomicInteger deleted = new AtomicInteger();\r\n\r\n @Override\r\n public void onTweet(final Tweet tweet) {\r\n if (tweets.size() < 10000) {\r\n tweets.push(tweet);\r\n }\r\n if (counter.incrementAndGet() % 1000 == 0) {\r\n logger.info(\"Tweets received : \" + counter.get() + \", tweet cache : \" + tweets.size() + \", tweet : \" + ToStringBuilder.reflectionToString(tweet));\r\n }\r\n }\r\n\r\n @Override\r\n public void onDelete(final StreamDeleteEvent streamDeleteEvent) {\r\n if (deleted.incrementAndGet() % 1000 == 0) {\r\n logger.info(\"Deleted : \" + deleted.get() + \", event : \" + ToStringBuilder.reflectionToString(streamDeleteEvent));\r\n }\r\n }\r\n\r\n @Override\r\n public void onLimit(final int i) {\r\n logger.info(\"Limit : \" + i);\r\n }\r\n\r\n @Override\r\n public void onWarning(final StreamWarningEvent streamWarningEvent) {\r\n logger.info(\"Warning : \" + streamWarningEvent);\r\n }\r\n };\r\n List<StreamListener> listeners = Collections.singletonList(streamListener);\r\n stream = streamingOperations.sample(listeners);\r\n }",
"@Override\n\tpublic void expectTwitterMessage(String username) {\n\t}",
"public static void getUserTimeline(String user, Classifier classifier, HttpServletResponse response, int pagenum, int countnum) throws IOException {\n\t\tresponse.setContentType(\"application/json\");\n\t\tPrintWriter out = response.getWriter();\n Twitter twitter = new TwitterFactory().getInstance();\n try {\n List<Status> statuses;\n Paging page = new Paging(pagenum, countnum);\n statuses = twitter.getUserTimeline(user, page);\n String responseObject = \"{\\\"user\\\":\\\"\"+user+\"\\\",\\\"tweets\\\":[\";\n for (Status status : statuses) {\n // System.out.println(\"@\" + status.getUser().getScreenName() + \" - \" + status.getText());\n \t\n if (status.getText().length() >= 50) {\n \tString tweet = status.getText();\n \t\ttry {\n \t\t\ttweet = \"1 personal \"+tweet;\n \t\t\tresponseObject += \"{\\\"\"+status.getId()+\"\\\": {\\\"datetime\\\":\\\"\" + status.getCreatedAt().toString() + \"\\\",\";\n \t\t\tresponseObject += \"\\\"classification\\\":\"+printLabelings(classifier, tweet, out) + \"}},\";\n \t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n \t\t\t\t\n \t\t } else {\n \t\t\t\t// out.print(\"Please enter at least 50 characters for the tweet content.\");\n \t\t \t// TWEET CONTENT NOT LONG ENOUGH\n \t\t\t}\n }\n responseObject = responseObject.substring(0, responseObject.length()-1);\n out.print(responseObject + \"]}\");\n } catch (TwitterException te) {\n te.printStackTrace();\n System.out.println(\"Failed to get timeline: \" + te.getMessage());\n System.exit(-1);\n }\n }",
"public Tweets(Date date, int counter) {\r\n this.date = date;\r\n this.counter = counter;\r\n }",
"public static Tweet fromJsonObject(JSONObject jsonObject) {\n\t\tTweet tweet = new Tweet();\n\t\ttry {\n\t\t\ttweet.text = jsonObject.getString(\"text\");\n\t\t\ttweet.uid = jsonObject.getLong(\"id\");\n\t\t\ttweet.timeStamp = jsonObject.getString(\"created_at\");\n\t\t\ttweet.reTweetCount = jsonObject.getInt(\"retweet_count\");\n\t\t\ttweet.user = User.fromJsonObject(jsonObject.getJSONObject(\"user\"));\n\t\t\ttweet.id = jsonObject.getLong(\"id\");\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn tweet;\n\t}",
"public void postTweet(int userId, int tweetId) {\n Tweet tweet = new Tweet(tweetId, System.nanoTime());\n putSelfTweet(userId, tweet);\n if (userId2Followers.containsKey(userId)) {\n Set<Integer> followers = userId2Followers.get(userId);\n for (Integer followerId : followers) {\n putFollowerTweet(followerId, tweet);\n }\n }\n }",
"private void setFollowersCount() {\n ParseQuery<Follow> query = ParseQuery.getQuery(Follow.class);\n query.whereEqualTo(Follow.KEY_TO, user);\n query.countInBackground((count, e) -> {\n mFollowersTextView.setText(String.valueOf(count));\n });\n }",
"@Override\n protected Void doInBackground(Void... params) {\n try {\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 1, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if(tweet.getGeoLocation()!=null){\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if(id>latestTweetId){\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n } catch (TwitterException te) {\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n return null;\n }",
"public MetodosTwit() {\r\n\r\n twitter = new TwitterFactory().getInstance();\r\n }",
"public TweetAdapter(List<Tweet> tweets, Activity timeLineActivity) {\n mTweets = tweets;\n this.timeLineActivity = timeLineActivity;\n }",
"public Twitter() {\n \n }",
"private ArrayList<TweetData> query(QueryTargetInfo info) {\n String url;\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n InputStream is = null;\n\n // lastSeenId should have been set earlier.\n // However, if it is still null, just use \"0\".\n if (info.lastSeenId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=0\",\n URL_BASE, info.query, RPP);\n } else if (info.smallestId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId);\n } else {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s&max_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId, info.smallestId);\n }\n\n try {\n do {\n URL searchURL = new URL(url);\n HttpsURLConnection searchConnection = (HttpsURLConnection)searchURL.openConnection();\n\n searchConnection.setRequestProperty(\"Host\", \"api.twitter.com\");\n searchConnection.setRequestProperty(\"User-Agent\", \"BirdCatcher\");\n searchConnection.setRequestProperty(\"Authorization\", \"Bearer \" + kBearerToken);\n\n is = searchConnection.getInputStream();\n\n JSONTokener jsonTokener = new JSONTokener(is);\n\n JSONObject json = new JSONObject(jsonTokener);\n\n is.close();\n\n url = getNextLink(json, url, info);\n\n tweets.addAll(getTweets(json, info));\n\n Thread.sleep(1000);\n\n is = null;\n } while (url != null);\n } catch (Exception e) {\n Logger.logError(\"Error performing query\", e);\n\n if (is != null) {\n try {\n java.io.BufferedReader in =\n new java.io.BufferedReader(new java.io.InputStreamReader(is));\n\n String response = \"Response from Twitter:\\n\";\n String temp;\n\n while ((temp = in.readLine()) != null) {\n response += (temp + \"\\n\");\n }\n\n Logger.logDebug(response);\n\n response = null;\n temp = null;\n } catch (Exception ex) {\n }\n }\n\n return tweets;\n }\n\n return tweets;\n }",
"public void populateTimeline(long maxId, String screenName) {\n\n //check connectivity:\n if (Utilities.isNetworkAvailable(getContext()) && Utilities.isOnline()) {\n\n twitterClient.getUserTimeline(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n // deserialize the response and create models\n ArrayList<Tweet> tweetList = Tweet.fromJSONArray(response);\n\n //load data into the view:\n\n //store reference to current size\n int currentSize = tweets.size();\n\n //add retrieved tweets to existing list\n tweets.addAll(tweetList);\n\n //visually refresh the list\n tweetsAdapter.notifyItemRangeInserted(currentSize, tweetList.size());\n\n if (!tweetList.isEmpty()) {\n updateIndex();\n }\n swipeContainer.setRefreshing(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {\n Toast.makeText(getContext(), \"Error in request\", Toast.LENGTH_SHORT).show();\n }\n\n\n @Override\n public void onUserException(Throwable error) {\n Toast.makeText(getContext(), R.string.on_user_exception, Toast.LENGTH_SHORT).show();\n }\n }, maxId, screenName);\n } else {\n Toast.makeText(getContext(), R.string.device_not_connected, Toast.LENGTH_SHORT).show();\n }\n }",
"public static Twitter crearTwitter(){\n \tConfigurationBuilder cb = new ConfigurationBuilder();\n \tcb.setDebugEnabled(true)\n \t .setOAuthConsumerKey(\"WX0FvnWENusasa09R8IVG6FFm\")\n \t .setOAuthConsumerSecret(\"Z6cXLTiqkU6NvlhqEHD7Br3S0jhmtUiLPvOPXCqLcrhQKFMYNr\")\n \t .setOAuthAccessToken(\"509341639-6R41f6i6WUAQn1xfzI8uNbPeyIhQvkMnXYaszNv6\")\n \t .setOAuthAccessTokenSecret(\"We08mCgnLMPXn6zl8UrKwGegac0Z4ksrI0LwhAbBoxp5q\");\n \tTwitterFactory tf = new TwitterFactory(cb.build());\n \treturn tf.getInstance();\n\t}",
"private ArrayList<TweetData> getTweets(JSONObject json, QueryTargetInfo info) {\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n\n JSONArray jsonArray = json.optJSONArray(\"statuses\");\n\n\n if (jsonArray == null) {\n return tweets;\n }\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n TweetData tweet = new TweetData();\n JSONObject tweetJson = jsonArray.getJSONObject(i);\n\n SimpleDateFormat df = new SimpleDateFormat(TIME_FORMAT);\n\n tweet.twitterId = tweetJson.getString(\"id_str\");\n tweet.published = (int)(df.parse(tweetJson.getString(\"created_at\")).getTime() / 1000);\n tweet.content = tweetJson.getString(\"text\");\n tweet.source = tweetJson.optString(\"source\", \"<No Source>\");\n tweet.lang = tweetJson.optString(\"lang\", \"en\");\n\n tweet.author = \"Jon Doe\";\n JSONObject user = tweetJson.optJSONObject(\"user\");\n if (user != null) {\n tweet.author = user.optString(\"screen_name\", \"Jon Doe\");\n }\n\n tweet.place = tweetJson.optString(\"place\", \"\");\n tweet.geo = tweetJson.optString(\"geo\", \"\");\n\n // Keep track of the smallest id.\n if (info.smallestId == null ||\n Long.valueOf(tweet.twitterId) < Long.valueOf(info.smallestId)) {\n info.smallestId = tweet.twitterId;\n }\n\n // Keep track of the last seen (max) id.\n if (info.lastSeenId == null ||\n Long.valueOf(tweet.twitterId) > Long.valueOf(info.lastSeenId)) {\n info.lastSeenId = tweet.twitterId;\n }\n\n tweets.add(tweet);\n } catch (Exception ex) {\n Logger.logError(\"Unable to parse tweet.\", ex);\n }\n }\n\n return tweets;\n }",
"@SuppressWarnings({\"SleepWhileInLoop\", \"LoggerStringConcat\"})\n public static void main(String[] args) throws TwitterException, InterruptedException {\n ConfigurationBuilder cb = new ConfigurationBuilder();\n cb.setJSONStoreEnabled(true);\n TwitterFactory twitterFactory = new TwitterFactory(cb.build()); // The factory instance is re-useable and thread safe.\n Twitter twitter = twitterFactory.getInstance();\n\n // Set Twitter API keys.\n Properties twitterApiKeysProp = getProperties(Constants.AppConstants.TWITTER_PROP_FILE_NAME);\n AccessToken accessToken = new AccessToken(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_SECRET));\n twitter.setOAuthConsumer(\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_KEY),\n twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_SECRET));\n twitter.setOAuthAccessToken(accessToken);\n\n // Connect Database\n Properties appProp = getProperties(Constants.AppConstants.APPLICATION_PROP_FILE_NAME);\n MongoClient mongo = new MongoClient(\n appProp.getProperty(Constants.AppConstants.HOST),\n Integer.parseInt(appProp.getProperty(Constants.AppConstants.PORT)));\n MongoDatabase db = mongo.getDatabase(appProp.getProperty(Constants.AppConstants.DATABASE));\n MongoCollection<Document> collection = db.getCollection(\n appProp.getProperty(Constants.AppConstants.COLLECTION));\n\n // Set query properties to pass it to Twitter Search API\n Query query = new Query(appProp.getProperty(Constants.AppConstants.QUERY));\n query.setLang(Constants.AppConstants.LANG);\n query.setSince(appProp.getProperty(Constants.AppConstants.SINCE));\n query.setUntil(appProp.getProperty(Constants.AppConstants.UNTIL));\n Long maxId = Long.parseLong(appProp.getProperty(Constants.AppConstants.MAX_ID)) - 1;\n if (maxId > 0) {\n query.setMaxId(maxId);\n LOGGER.log(Level.INFO, \"Max Id set: \" + maxId);\n }\n LOGGER.log(Level.INFO, \"Query: {0}\", query.getQuery());\n\n QueryResult result = twitter.search(query);\n\n // In one try, only limited number of tweets are retrieved. So\n // keep retrying until all tweets are received.\n while (!result.getTweets().isEmpty()) {\n Long minId = Long.MAX_VALUE;\n Document document;\n for (Status status : result.getTweets()) {\n document = Document.parse(TwitterObjectFactory.getRawJSON(status));\n collection.insertOne(document);\n if (status.getId() < minId) {\n minId = status.getId();\n }\n LOGGER.log(Level.INFO, \"Id: \" + status.getId());\n }\n query.setMaxId(minId - 1);\n try {\n result = searchWithRetry(twitter, query);\n } catch (TwitterException ex) {\n LOGGER.log(Level.SEVERE, ex.getErrorMessage(), ex);\n LOGGER.log(Level.INFO, \"Thread is sleeping for 15 minutes. \"\n + \"Application will retry to make an API call after 15 minutes.\");\n Thread.sleep(15 * 60 * 1000); // sleep for 15 minutes\n result = searchWithRetry(twitter, query);\n }\n }\n }",
"@Override\n public void run() {\n tweetLog.setText(tweetLog.getText() + tweets.size() + \" [\" + mention\n + \"] sent successfully from account @\" + account.screenName + \"\\n\");\n// frame.validate();\n// frame.pack();\n }",
"@Override\n public void update(String tweet, Long tweetTime) {\n\tuserFeed.add(tweet);\n\tlastUpdateTime = tweetTime;\n }",
"public void userWithMostLikes() {\n Map<Integer, Integer> userLikesCount = new HashMap<>();\n Map<Integer, User> users = DataStore.getInstance().getUsers();\n \n for (User user : users.values()) {\n for (Comment c : user.getComments()) {\n int likes = 0;\n if (userLikesCount.containsKey(user.getId())) {\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n int max = 0;\n int maxId = 0;\n for (int id : userLikesCount.keySet()) {\n if (userLikesCount.get(id) > max) {\n max = userLikesCount.get(id);\n maxId = id;\n }\n }\n System.out.println(\"User with most likes: \" + max + \"\\n\" \n + users.get(maxId));\n }",
"public void userWithMostLikes() {\n Map<Integer, Integer> userLikesCount = new HashMap<>();\n Map<Integer, User> users = DataStore.getInstance().getUsers();\n \n for (User user : users.values()) {\n for (Comment c : user.getComments()) {\n int likes = 0;\n if (userLikesCount.containsKey(user.getId())) {\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n int max = 0;\n int maxId = 0;\n for (int id : userLikesCount.keySet()) {\n if (userLikesCount.get(id) > max) {\n max = userLikesCount.get(id);\n maxId = id;\n }\n }\n System.out.println(\"User with most likes: \" + max + \"\\n\" \n + users.get(maxId));\n }",
"public EndTurnResponse(String username, String rank, String winner){\n //multi player end game\n super(username, MessageType.ENDTURNUPDATE);\n this.newPlayerName = winner;\n this.message = rank;\n this.gameOver = true;\n this.isSinglePlayer = false;\n }",
"public void tweet() {\r\n try {\r\n\r\n String twet = JOptionPane.showInputDialog(\"Tweett:\");\r\n Status status = twitter.updateStatus(twet);\r\n System.out.println(\"Successfully updated the status to [\" + status.getText() + \"].\");\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private void twitterStream(ServerAccess sa, String search, String geocode, \r\n int max) throws IOException {\r\n final TwitterStream twitterStream = \r\n new TwitterStreamFactory(getAuth()).getInstance();\r\n final Count count = new Count(max);\r\n \r\n final StatusListener listener = new StatusListener() {\r\n @Override\r\n public void onStatus(Status status) {\r\n count.increment();\r\n try {\r\n sa.addTweet(new TweetEntity(status, search));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n try {\r\n sa.addUser(new UserEntity(status.getUser()));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n \r\n if (Abort.getInstance().abort() || count.isMax()) {\r\n Abort.getInstance().setAbort(false);\r\n twitterStream.shutdown();\r\n }\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\r\n //System.out.println(\"Got a status deletion notice id:\" + statusDeletionNotice.getStatusId());\r\n }\r\n\r\n @Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\r\n //System.out.println(\"Got track limitation notice:\" + numberOfLimitedStatuses);\r\n }\r\n\r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n //System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n\r\n @Override\r\n public void onStallWarning(StallWarning warning) {\r\n //System.out.println(\"Got stall warning:\" + warning);\r\n }\r\n\r\n @Override\r\n public void onException(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n };\r\n twitterStream.addListener(listener);\r\n FilterQuery filterquery = new FilterQuery();\r\n //filterquery.count(500);\r\n //String[] searchwords = {\"voetbal\", \"tennis\", \"basketbal\"};\r\n //filterquery.track(searchwords);\r\n final List<String> alts = relations.get(search);\r\n final String[] altsGeo = new String[alts.size()];\r\n for (int i = 0; i < alts.size(); i++) {\r\n altsGeo[i] = alts.get(i) + \" \" + geocode;\r\n }\r\n filterquery.track(altsGeo);\r\n twitterStream.filter(filterquery);\r\n twitterStream.sample();\r\n }",
"@Override\n public void run() {\n\n try {\n LocalDateTime now = LocalDateTime.now();\n voda bot = new voda();\n\n List<Integer> notifyTime = Arrays.asList(7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23);\n int currentHour = now.getHour();\n\n ArrayList<Integer> consulted = dbmodel.MysqlCon.getFollowers();\n\n for (Integer ntime : notifyTime) {\n if (ntime == currentHour) {\n for (Integer consultedUser : consulted) {\n bot.sendTextToIdMessage(consultedUser, dbmodel.MysqlCon.getEveryDayWaterUserWaterCountView(consultedUser));\n }\n }\n }\n\n\n } catch (Exception e) {\n System.out.println();\n }\n }",
"public Twitter() {\n u_map = new HashMap<>();\n }",
"public Twitter355() {\n followerMap = new HashMap<>();\n followeeMap = new HashMap<>();\n tweetMap = new HashMap<>();\n selfTweetMap = new HashMap<>();\n }",
"public Twitter() {\n }",
"public BangPlayer(long userId, int numTries, int numDeaths, int numJams) {\n super(userId);\n attempts = numTries;\n deaths = numDeaths;\n jams = numJams;\n }",
"Twitter geTwitterInstance();",
"@Override\r\n\tpublic void run() {\r\n\t\t\r\n\t\t/*\r\n\t\t * Alle Hashtags aus dem System werden aus der DB geladen.\r\n\t\t */\r\n\t\tadministration.getAllHashtags(getAllHashtagExecute());\r\n\t\t\r\n\t\t// Create UI\r\n\t\t\r\n\t\t/*\r\n\t\t * Erzeugt einen Button der das Erstellen des Reports für Nachrichten eines ausgewählten Users ausgibt.\r\n\t\t */ \r\n\t\tFollower = new Button(\"Show Follower\", new ClickHandler() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t * Entfernung des evtl. zuvor generierten Reports\r\n\t\t\t\t */\r\n\t\t\t\tscrollPanel.clear();\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t * Entfernung der evtl. zuvor ausgegebenen Fehlermeldung\r\n\t\t\t\t * in der infoBox\r\n\t\t\t\t */\r\n\t\t\t\t\tinfoBox.clear();\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Erzeugt aus den Text aus dem Suchfeld das Keyword und\r\n\t\t\t\t\t * entfernt ggf. Leerzeichen.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString keyword = suggestBox.getText().trim()\r\n\t\t\t\t\t\t\t.replaceAll(\" \", \"\");\r\n\t\t\t\t\tfor (Hashtag hashtag : allHashtag) {\r\n\t\t\t\t\t\tif (hashtag.getKeyword() == keyword) {\r\n\t\t\t\t\t\t\thashtagSelection = hashtag;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Überprüfung ob mindestens drei Zeichen eingegeben wurden.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (!FieldVerifier.isValidHashtag(keyword)) {\r\n\t\t\t\t\t\tinfoBox.setWarningText(\"Please select a Hashtag with at least three characters!\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t * Lädt alle User, die der ausgewählte User abonniert hat und startet die Methode \r\n\t\t\t\t * \"generateUserSubscriptionReport(result)\" der Klasse \"HTMLUserSubscriptionReport\", \r\n\t\t\t\t * die den Report aufbaut und im ScrollPanel ausgibt\r\n\t\t\t\t * \r\n\t\t\t\t * @see HTMLUserSubscriptionReport\r\n\t\t\t\t */ \r\n\t\t\t\tadministration.getAllFollowersFromHashtag(hashtagSelection, new AsyncCallback<Vector<User>>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(Vector<User> result) {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Zuweisung und Anpassung des Widgets.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tscrollPanel.setSize(\"100%\", \"100%\");\r\n\t\t\t\t\t\tRootPanel.get(\"Details\").add(scrollPanel);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Fügt den generierten Report dem scrollPanel hinzu.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tscrollPanel.add(HTMLHashtagFollowerReport.generateHashtagFollowerReport(result, hashtagSelection));\r\n\t\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});\r\n\t\t\r\n\t\t/*\r\n\t\t * Anlegen einer chatFlexTable zum Anordnen der verschiedenen Widgets im Navigatorbereich\r\n\t\t */\r\n\t\t// Text\r\n\t\tchatFlexTable.setText(0, 0, \"Follower of: #\");\r\n\r\n\t\t// Textbox\r\n\t\tchatFlexTable.setWidget(0, 1, suggestBox);\r\n\r\n\t\t// Show-Button\r\n\t\tchatFlexTable.setWidget(3, 1, Follower);\r\n\t\t\r\n\t\t//Hinzufügen der infoBox für Fehlermeldungen\r\n\t\tchatFlexTable.setWidget(4, 1, infoBox);\r\n\t\t\r\n\t\t// Hinzufügen der widgets\r\n\t\tmainPanel.add(chatFlexTable);\r\n\t\tmainPanel.add(addPanel);\r\n\t\tRootPanel.get(\"Navigator\").clear();\r\n\t\tRootPanel.get(\"Navigator\").add(mainPanel);\r\n\t\t\r\n\t}",
"public EndTurnResponse(String username, LightLorenzo lorenzo, ArrayList<LightPlayer> players, LightDevelopmentBoard board){\n //single player end turn\n super(username, MessageType.ENDTURNUPDATE);\n this.lorenzo = lorenzo;\n this.players = players;\n this.board = board;\n this.gameOver=false;\n this.isSinglePlayer = true;\n }",
"public void postTweet(int userId, int tweetId) {\n tweetList.add(new Tweet(tweetId, userId));\n }",
"@Override\n public void run() {\n while (!tweets.empty()) {\n synchronized (tweets) {\n synchronized (status) {\n synchronized (tweetLog) {\n\n final String mention = tweets.pop();\n try {\n account.updateStatus(mention);\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n //To change body of implemented methods use File | Settings | File Templates.\n tweetLog.setText(tweetLog.getText() + tweets.size() + \" [\" + mention\n + \"] sent successfully from account @\" + account.screenName + \"\\n\");\n// frame.validate();\n// frame.pack();\n }\n });\n\n } catch (final TwitterException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n int inde = 0;\n String idArray[] = id.getText().split(\"\\\\r?\\\\n\");\n for (String el : idArray) {\n System.out.println(\"idarray: \" + el);\n if (el.compareTo(account.screenName) == 0)\n break;\n else\n inde++;\n }\n final int inde2 = inde;\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n\n AddFormWin.updateStateOfAccount(id, status, e.getErrorMessage(), account);\n //To change body of implemented methods use File | Settings | File Templates.\n tweetLog.setText(tweetLog.getText() + \"failed to send tweet '\" + mention +\n \"' From Account \" + account.screenName + \"due to error:[\" + e.getErrorMessage() + \"]\\n\");\n tweets.push(mention);\n }\n });\n AddFormWin.nThreads--;\n //if this was the last thread then show error message and the remaining tweets\n if (AddFormWin.nThreads == 0 && tweets.size() > 0)\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n //To change body of implemented methods use File | Settings | File Templates.\n String finalString = \"\";\n String str;\n while (true) {\n try {\n str = tweets.pop();\n finalString += (str + \"\\n\");\n } catch (Exception e) {\n break;\n }\n }\n AddFormWin.clearTweetStack();\n tweetLog.setText(tweetLog.getText() +\n \"\\nFailed to send the following tweets:\\n\" + finalString);\n JOptionPane.showMessageDialog(null, \"Tweet Sending Failed!\"\n , \"Failure!!\", JOptionPane.WARNING_MESSAGE);\n\n }\n });\n return;\n }\n\n }\n }\n }\n try {\n long sleepTime= (long)(sleepInterval + Math.random()*(sleepIntervalMax-sleepInterval));\n Thread.sleep(sleepTime);\n } catch (InterruptedException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n }\n AddFormWin.nThreads--;\n if (tweets.isEmpty())\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n //To change body of implemented methods use File | Settings | File Templates.\n String finalString = \"\";\n String str;\n while (true) {\n try {\n str = tweets.pop();\n finalString += (str + \"\\n\");\n } catch (Exception e) {\n break;\n }\n }\n tweetLog.setText(tweetLog.getText() + \"\\nFailed to send the following tweets:\\n\" + finalString);\n JOptionPane.showMessageDialog(null, \"All Tweets Sent Successfully!\", \"Success!!\", JOptionPane.WARNING_MESSAGE);\n }\n });\n\n }",
"public Twitter() {\n\n }",
"@Override\r\n\t\t\t\tpublic Tuple2<String, Integer> call(WordCount t) throws Exception {\n\t\t\t\t\treturn new Tuple2<>(t.getWord() , new Integer(t.getCount()));\r\n\t\t\t\t\t\r\n\t\t\t\t}",
"@PostMapping(value=\"/private\")\n\t\tpublic Long newLobby(@RequestBody User user) {\n\t\t\tlong id = lastId.incrementAndGet();\n\t\t\tLobby lob = new Lobby(user,true);\n\t\t\tlobbies.put(id, lob);\n\t\t\tChat chat = new Chat(user.getUserName()+\" se ha conectado.\",\"SERVER\");\n\t \tlobbies.get(id).addChat(chat);\n\t\t\treturn id;\n\t\t}",
"public void updateWindow() {\n MatchDAO ma = new MatchDAO();\n ArrayList<User> u = ma.getTopFiveMostMatchedUsers();\n view.updateWindow(ma.getLastMonthMatches(), ma.getLastWeekMatches(), ma.getLastDayMatches(), u);\n }",
"public void postTweet(int userId, int tweetId) {\n if(!users.containsKey(userId)){\n HashSet<Integer> uId = new HashSet<>(); // if the user Id is not there, how will it post the tweet?\n users.put(userId, uId); // Add the user to the database first\n }\n users.get(userId).add(userId);\n if(!tweets.containsKey(userId)){\n List<Tweet> t_id = new ArrayList<>();\n t_id.add(new Tweet(timestamp++, tweetId)); // Similarly add the same user with the tweet object\n tweets.put(userId, t_id);\n } else {\n tweets.get(userId).add(new Tweet(timestamp++, tweetId)); // User is tweeting more nowadays\n }\n }",
"public static void main(String[] args) throws Exception\r\n\t{\n\t\tint\ttotalTweets = 0;\r\n FileOutputStream fout=new FileOutputStream(args[0]);\r\n PrintStream ps=new PrintStream(fout);\r\n FileOutputStream fout1=new FileOutputStream(\"location.txt\");\r\n PrintStream ps1=new PrintStream(fout1);\r\n //FileOutputStream fout=new FileOutputStream(\"result.csv\");\r\n //PrintStream ps=new PrintStream(fout);\r\n\r\n\t\t//\tThis variable is the key to our retrieving multiple blocks of tweets. In each batch of tweets we retrieve,\r\n\t\t//\twe use this variable to remember the LOWEST tweet ID. Tweet IDs are (java) longs, and they are roughly\r\n\t\t//\tsequential over time. Without setting the MaxId in the query, Twitter will always retrieve the most\r\n\t\t//\trecent tweets. Thus, to retrieve a second (or third or ...) batch of Tweets, we need to set the Max Id\r\n\t\t//\tin the query to be one less than the lowest Tweet ID we've seen already. This allows us to page backwards\r\n\t\t//\tthrough time to retrieve additional blocks of tweets\r\n\t\tlong maxID = -1;\r\n\r\n\t\tTwitter twitter = getTwitter();\r\n\r\n\t\t//\tNow do a simple search to show that the tokens work\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\r\n\t\t\t//\tThis returns all the various rate limits in effect for us with the Twitter API\r\n\t\t\tMap<String, RateLimitStatus> rateLimitStatus = twitter.getRateLimitStatus(\"search\");\r\n\r\n\t\t\t//\tThis finds the rate limit specifically for doing the search API call we use in this program\r\n\t\t\tRateLimitStatus searchTweetsRateLimit = rateLimitStatus.get(\"/search/tweets\");\r\n \r\n \r\n \r\n\r\n\t\t\t//\tAlways nice to see these things when debugging code...\r\n\t\t\tSystem.out.printf(\"You have %d calls remaining out of %d, Limit resets in %d seconds\\n\",\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getRemaining(),\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getLimit(),\r\n\t\t\t\t\t\t\t searchTweetsRateLimit.getSecondsUntilReset());\r\n\r\n\r\n\t\t\t//\tThis is the loop that retrieve multiple blocks of tweets from Twitter\r\n\t\t\tfor (int queryNumber=0;queryNumber < MAX_QUERIES; queryNumber++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.printf(\"\\n\\n!!! Starting loop %d\\n\\n\", queryNumber);\r\n\r\n\t\t\t\t//\tDo we need to delay because we've already hit our rate limits?\r\n\t\t\t\tif (searchTweetsRateLimit.getRemaining() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//\tYes we do, unfortunately ...\r\n\t\t\t\t\tSystem.out.printf(\"!!! Sleeping for %d seconds due to rate limits\\n\", searchTweetsRateLimit.getSecondsUntilReset());\r\n\r\n\t\t\t\t\t//\tIf you sleep exactly the number of seconds, you can make your query a bit too early\r\n\t\t\t\t\t//\tand still get an error for exceeding rate limitations\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// \tAdding two seconds seems to do the trick. Sadly, even just adding one second still triggers a\r\n\t\t\t\t\t//\trate limit exception more often than not. I have no idea why, and I know from a Comp Sci\r\n\t\t\t\t\t//\tstandpoint this is really bad, but just add in 2 seconds and go about your business. Or else.\r\n\t\t\t\t\tThread.sleep((searchTweetsRateLimit.getSecondsUntilReset()+2) * 1000l);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tQuery q = new Query(SEARCH_TERM);\t\t\t// Search for tweets that contains this term\r\n\t\t\t\tq.setCount(TWEETS_PER_QUERY);\t\t\t\t// How many tweets, max, to retrieve\r\n\t\t\t\tq.resultType(Query.ResultType.recent);\t\t\t\t\t\t// Get all tweets\r\n\t\t\t\tq.setLang(\"en\");\t\t\t\t\t\t\t// English language tweets, please\r\n\r\n\t\t\t\t//\tIf maxID is -1, then this is our first call and we do not want to tell Twitter what the maximum\r\n\t\t\t\t//\ttweet id is we want to retrieve. But if it is not -1, then it represents the lowest tweet ID\r\n\t\t\t\t//\twe've seen, so we want to start at it-1 (if we start at maxID, we would see the lowest tweet\r\n\t\t\t\t//\ta second time...\r\n\t\t\t\tif (maxID != -1)\r\n\t\t\t\t{\r\n\t\t\t\t\tq.setMaxId(maxID - 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//\tThis actually does the search on Twitter and makes the call across the network\r\n\t\t\t\tQueryResult r = twitter.search(q);\r\n\r\n\t\t\t\t//\tIf there are NO tweets in the result set, it is Twitter's way of telling us that there are no\r\n\t\t\t\t//\tmore tweets to be retrieved. Remember that Twitter's search index only contains about a week's\r\n\t\t\t\t//\tworth of tweets, and uncommon search terms can run out of week before they run out of tweets\r\n\t\t\t\tif (r.getTweets().size() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\t\t\t// Nothing? We must be done\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//\tloop through all the tweets and process them. In this sample program, we just print them\r\n\t\t\t\t//\tout, but in a real application you might save them to a database, a CSV file, do some\r\n\t\t\t\t//\tanalysis on them, whatever...\r\n\t\t\t\tfor (Status s: r.getTweets())\t\t\t\t// Loop through all the tweets...\r\n\t\t\t\t{\r\n\t\t\t\t\t//\tIncrement our count of tweets retrieved\r\n\t\t\t\t\ttotalTweets++;\r\n\r\n\t\t\t\t\t//\tKeep track of the lowest tweet ID. If you do not do this, you cannot retrieve multiple\r\n\t\t\t\t\t//\tblocks of tweets...\r\n\t\t\t\t\tif (maxID == -1 || s.getId() < maxID)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaxID = s.getId();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//\tDo something with the tweet....\r\n\t\t\t\t\tSystem.out.printf(\"At %s, @%-20s said: %s\\n\",\r\n\t\t\t\t\t\t\t\t\t s.getCreatedAt().toString(),\r\n\t\t\t\t\t\t\t\t\t s.getUser().getScreenName(),\r\n\t\t\t\t\t\t\t\t\t cleanText(s.getText()));\r\n \r\n \r\n GeoLocation geoLocation = s.getGeoLocation();\r\n //Place place = s.getPlace();\r\n //String placeCountry = place.getCountry();\r\n //System.out.println(\"loc\" +placeCountry);\r\n \r\n //double latitude = geoLocation.getLatitude();\r\n //double longitude = geoLocation.getLongitude();\r\n double latitude=37.0902;\r\n double longitude=95.7129;\r\n //String userLocation = getUserLocation(String.valueOf(latitude), String.valueOf(longitude));\r\n \r\n String userLocation=\"US\"; \r\n ps.println(cleanText(s.getText()));\r\n ps1.println(userLocation);\r\n \r\n //System.out.println(\"loc\" +userLocation);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//\tAs part of what gets returned from Twitter when we make the search API call, we get an updated\r\n\t\t\t\t//\tstatus on rate limits. We save this now so at the top of the loop we can decide whether we need\r\n\t\t\t\t//\tto sleep or not before making the next call.\r\n\t\t\t\tsearchTweetsRateLimit = r.getRateLimitStatus();\r\n\t\t\t}\r\n \r\n \r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//\tCatch all -- you're going to read the stack trace and figure out what needs to be done to fix it\r\n\t\t\tSystem.out.println(\"That didn't work well...wonder why?\");\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"\\n\\nA total of %d tweets retrieved\\n\", totalTweets);\r\n try\r\n {\r\n\t\tps.close();\r\n ps1.close();\r\n fout1.close();\r\n fout.close();\r\n }catch(Exception ee)\r\n {\r\n System.out.println(ee);\r\n }\r\n }",
"public void sampleInvestigate ()\r\n {\r\n Query query = new Query(\"Hawker\");\r\n query.setCount(100);\r\n query.setGeoCode(new GeoLocation(1.423844, 103.776921), 5, Query.MILES);\r\n query.setSince(\"2016-12-1\");\r\n try {\r\n QueryResult result = twitter.search(query);\r\n System.out.println(\"Count : \" + result.getTweets().size()) ;\r\n for (Status tweet : result.getTweets()) {\r\n System.out.println(\"@\"+tweet.getUser().getName()+ \": \" + tweet.getText()); \r\n }\r\n } \r\n catch (TwitterException e) {\r\n e.printStackTrace();\r\n } \r\n System.out.println(); \r\n }",
"private static twitter4j.Twitter createClient() {\n \t\ttwitter4j.Twitter client = TwitterFactory.getSingleton();\n \t\tclient.setOAuthConsumer(consumerKey, consumerSecret);\n \t\treturn client;\n \t}",
"public void downloadTweetsForItem(String item, int numTweets) \n\t\t\tthrows IOException, TwitterException\n\t{\n\t\t/*if (numTweets <= 0) \n\t\t{ \n\t\t\tnumTweets = Integer.MAX_VALUE; \n\t\t}*/\n\t\tFile userDir = new File(String.format(\"%s/%s\", DATA_DIR, item));\n\t\tboolean success = false;\n\t try{\n\t \t //success = userDir.mkdir();\t\n\t \t Files.createDirectory(userDir.toPath());\n\t } \n\t catch(IOException se)\n\t {\n\t \tSystem.out.println(\"****mkdir failed!!!!!!!!\");\n\t }\n\t\t\n\t\tString multiLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets.txt\", DATA_DIR, item, item);\n\t\tString singleLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets_single.txt\", DATA_DIR, item, item);\n\t\tString multiLineFileRaw = \n\t\t\t\tString.format(\"%s/%s/%s_tweets_multiRaw.txt\", DATA_DIR, item, item);\n\t\t//item = \"@\" + item;\n\t\t\n\t\tList<String> allTweets = GetAllTweets(item, numTweets);//Query(item, numTweets);\n\t\t\n\t\t// Now do some pre-processing on allTweets.\n\t\t// Topic modelling prefers text with stop words removed etc.\n\t\t List<String> filteredTweets = new ArrayList<String>();\n\n\t\t BufferedReader f = new BufferedReader(new FileReader(\"stopwords.txt\"));\n\t\t String line = f.readLine();\n\t\t List<String> stopwords = new ArrayList<String>();\n\t\t while(line != null)\n\t\t {\n\t\t\t stopwords.add(line);\n\t\t\t line = f.readLine();\n\t\t }\n\t\t f.close();\n\t\t \n\t\titem = item.toLowerCase();\n\t\tint i = 0;\n\t\twhile(i < allTweets.size())\n\t\t{\n\t\t\tString text = allTweets.get(i);\n\t\t\t\n\t\t\t// First, remove all non alphabetic characters. This removes a lot of junk! hash tags, prices, etc.\n\t\t\ttext = text.replaceAll(\"[^a-zA-Z\\\\s]\", \"\").toLowerCase();\n\t\t\t\n\t\t\t// first, get rid of our actual search term. we do not want it to come up as a topic,\n\t\t\t// as we already know that we are searching for tweets of that item\n\t\t\ttext = text.replace(item, \"\"); \n\t\t\t\n\t\t\t// Now, remove all words less than a certain length\n\t\t\ttext = text.replaceAll(\"\\\\b\\\\w{1,3}\\\\b\\\\s?\", \"\");\n\t\t\t\n\t\t\t// The DMM package doesn't do stop word removal! So I have to do this manually.\n\t\t\tfor(String word : stopwords){\n\t\t\t text = text.replace(word+\"\\\\s*\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\t// Again, remove strings that are too short!\n\t\t\tif(text.length() > 14)\n\t\t\t{\n\t\t\t\tfilteredTweets.add(text);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// This string is too short, so it must get removed.\n\t\t\t\tallTweets.remove(i);\n\t\t\t\t// don't increment i, since we just deleted this one.\n\t\t\t}\n\t\t}\n\t\t// Sentiment analysis doesn't need pre-processing.\n\t\tsaveTweetsToFile(allTweets, multiLineFileRaw, true);\n\t\t\n\t\t// But our topics needs some stuff removed.\n\t\tsaveTweetsToFile(filteredTweets, multiLineFile, true);\n\t\tsaveTweetsToFile(filteredTweets, singleLineFile, false);\n\n\t}",
"public ArrayList<Tweet> getTweetsByUserId(long id) {\n\t\tTweet tweet = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\t\"?user sweb:id \" + id + \".\" +\n\t\t\t \t\t\"?tweet sweb:user ?user. \" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t ArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"tweet\");\n\n\t /* Taking care of the date */\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d k:m:s\");\n\t\t\tString dateRaw = currentResource.getProperty(this.createdAt).getString();\n\t\t\tdateRaw = dateRaw.replace('T', ' ');\n\t\t\tdateRaw = dateRaw.replace(\"Z\", \"\");\n\t\t\t\n\t\t\tDate date = null;\n\t\t\ttry {\n\t\t\t\tdate = dateFormat.parse(dateRaw);\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t tweet = new Tweet(\n\t \t\tString.valueOf(id),\n\t \t\tcurrentResource.getProperty(this.text).getString(),\n\t \t\tdate\n\t );\t\n\t \n\t tweets.add(tweet);\n\t }\n\t \n\t return tweets;\n\t}",
"private void getMatchHistoryForPlayer(final long account_id, final int num_results,\n long latest_match_id, final long max_unix_timestamp, final APICallback callback){\n String url = STEAM_API_BASE_URL + GET_MATCHES + \"?\" + STEAM_API_KEY_PARAMETER + mContext.getResources().getString(R.string.steam_api_key) +\n \"&\" + ACCOUNT_ID + convert64IdTo32(account_id);\n if(num_results > 0){\n url += \"&\" + MATCHES_REQEUSTED_NUMBER + num_results;\n }\n if(latest_match_id < 1){\n //return the results so far;\n }\n else{\n url += \"&\" + START_AT_MATCH_ID + latest_match_id;\n }\n //if there's a timestamp include it to back in time!\n //TODO fix code when date_max gets fixed\n// if(max_unix_timestamp > 0){\n// url += \"&\" + DATE_MAX + max_unix_timestamp;\n// }\n\n Log.d(TAG, \"getMatchHistoryForPlayer: request url = \" + url);\n final List<HistoryMatch> matchList = new ArrayList<>();\n JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>()\n {\n @Override\n public void onResponse(JSONObject response) {\n // display response\n Log.d(\"Response\", response.toString());\n Gson gson = new Gson();\n MatchHistoryResults.MatchHistory results = gson.fromJson(response.toString(), MatchHistoryResults.MatchHistory.class);\n matchList.addAll(results.getResult().getMatches());\n Log.d(TAG, \"onResponse: \" + results.getResult().getNum_results());\n\n if(results.getResult().hasMorePagedResults()){\n getMatchHistoryForPlayer(account_id, num_results, results.getResult().getLastMatchId() - 1, max_unix_timestamp, callback);\n }\n //if there were no results from the last call return what we have\n else if(results.getResult().getTotal_results() < 500 && results.getResult().getResults_remaining() < 1){\n callback.onMatchHistoryResponse(matchList);\n }\n\n //continue to earlier dates by taking one less than the last date and one less than the last match id\n //TODO fix code when date_max gets fixed\n /*\n else{\n getMatchHistoryForPlayer(account_id, num_results, results.getResponse().getLastMatchId() - 1, results.getResponse().getLastMatchTimestamp() - 1, callback);\n }\n */\n }\n },\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \" getMatchHistoryForPlayer Error.Response\");\n error.printStackTrace();\n }\n }\n );\n\n// add it to the RequestQueue\n mRequestQueue.add(getRequest);\n }",
"public void postTweet(int userId, int tweetId) {\n u_map.putIfAbsent(userId, new User(userId));\n u_map.get(userId).post(new Tweet(tweetId, counter++));\n }",
"public void postTweet(int userId, int tweetId) {\n if (!followMap.containsKey(userId)) followMap.put(userId, new HashSet<Integer>());\n followMap.get(userId).add(userId);\n if (!tweetMap.containsKey(userId)) tweetMap.put(userId, new LinkedList<Tweet>());\n tweetMap.get(userId).addFirst(new Tweet(count++, tweetId)); // tweets sorted\n }",
"@Override\n protected String doInBackground(String... params) {\n if(isFirstRead ||\n SessionObject.getTweetList() == null ||\n SessionObject.getTweetList().size() == 0){\n //Get last 20 MSG\n\n //Quick and dirty\n String url = MESSAGE_URL+\"?username=\"+SessionObject.getUsername()+\"&token=\"+SessionObject.getToken();\n\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"Begin SignUp HTTP call \"+ url);\n String result = connect(url,MESSAGE_READ_METHOD, null);\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"End SignUp HTTP call, result: \"+result);\n isFirstRead = false;\n SessionObject.setTweetList(JsonParser.parseJsonFromGetMsgs(result));\n return result;\n }\n //Find new messages from last message\n //Quick and dirty\n String url = MESSAGE_TS_URL+\"?timestamp=\"+SessionObject.getTweetList().get(0).getTimestamp();\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"Begin SignUp HTTP call \"+url);\n String result = connect(url,MESSAGE_READ_METHOD, null);\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"End SignUp HTTP call, result: \"+result);\n SessionObject.addTwettToList(JsonParser.parseJsonFromGetMsgs(result));\n return result;\n }",
"public Builder setLastUpdatedTurn(int value) {\n \n lastUpdatedTurn_ = value;\n onChanged();\n return this;\n }",
"@Override\n public void success(Result<TwitterSession> result) {\n String username=result.data.getUserName();\n\n Toast.makeText(MainActivity.this,\"Hi.. \"+username,Toast.LENGTH_LONG).show();\n\n\n TwitterSession session = TwitterCore.getInstance().getSessionManager()\n .getActiveSession();\n\n Intent intent = new Intent(MainActivity.this,ComposeTweetActivity.class);\n\n startActivity(intent);\n\n /* TwitterSession session = TwitterCore.getInstance().getSessionManager()\n .getActiveSession();\n\n Intent intent = new ComposerActivity.Builder(MainActivity.this)\n .session(session)\n .createIntent();\n startActivity(intent); */\n\n\n\n\n }",
"public static Tweet fromJSON(JSONObject jsonObject) throws JSONException {\n Tweet tweet = new Tweet();\n //extract values from JSON\n tweet.body = jsonObject.getString(\"text\");\n tweet.uid = jsonObject.getLong(\"id\");\n tweet.createdAt = jsonObject.getString(\"created_at\");\n tweet.user = User.fromJSON(jsonObject.getJSONObject(\"user\"));\n tweet.retweet_count = jsonObject.getInt(\"retweet_count\");\n tweet.retweeted = jsonObject.getBoolean(\"retweeted\");\n tweet.favorite_count = jsonObject.getInt(\"favorite_count\");\n tweet.favorited = jsonObject.getBoolean(\"favorited\");\n tweet.id = jsonObject.getInt(\"id_str\");\n return tweet;\n\n }",
"public Tweet(String message){\n this.message = message;\n this.Unique = UUID.randomUUID();\n }",
"@Path(\"fetch/{query}/{limit}\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response fetchTweets(@PathParam(\"query\") final String query, @PathParam(\"limit\") final String limit)\r\n {\r\n log.debug(\"GET: augmentTweets: \" + query + \"\\tlimit string: \" + limit);\r\n\r\n final TweetList list = new TweetList();\r\n final int limitValue = Integer.parseInt(limit);\r\n\r\n // TODO try-with-resources should be:\r\n // try(final MongoClient client = new MongoClient(host, port)){\r\n try (final MongoClient client = new MongoClient(\"74.140.208.12\", 6789))\r\n {\r\n final MongoCollection<Document> coll = client.getDatabase(\"visualdb\").getCollection(\"visualcollection\");\r\n\r\n final Document queryDoc = new Document();\r\n queryDoc.put(\"query\", query);\r\n\r\n final FindIterable<Document> results = coll.find(queryDoc);\r\n\r\n int count = 0;\r\n for (final Document doc : results)\r\n {\r\n count++;\r\n\r\n final Tweet tweet = new Tweet();\r\n tweet.setText(doc.getString(\"text\"));\r\n tweet.setTweetUrl(doc.getString(\"url\"));\r\n tweet.setId(doc.getString(\"tweetId\"));\r\n\r\n final Location loc = new Location();\r\n loc.setInitialized(true);\r\n\r\n final Document locationDoc = doc.get(\"loc\", Document.class);\r\n loc.setLatitude(locationDoc.getDouble(\"latitude\").doubleValue());\r\n loc.setLongitude(locationDoc.getDouble(\"longitude\").doubleValue());\r\n tweet.setLocation(loc);\r\n\r\n final List<String> imageUrls = new ArrayList<>();\r\n final List<?> urls = doc.get(\"images\", List.class);\r\n\r\n for (final Object object : urls)\r\n {\r\n imageUrls.add(object.toString());\r\n }\r\n tweet.setImageUrls(imageUrls);\r\n\r\n final List<String> entities = new ArrayList<>();\r\n final List<?> entityList = doc.get(\"entities\", List.class);\r\n for (final Object object : entityList)\r\n {\r\n entities.add(object.toString());\r\n }\r\n tweet.setExtractedEntities(entities);\r\n list.getTweets().add(tweet);\r\n\r\n if (count > limitValue)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return Response.ok(list).build();\r\n }"
] |
[
"0.5658242",
"0.54879326",
"0.5301281",
"0.52596146",
"0.5193131",
"0.5151462",
"0.51365495",
"0.5132681",
"0.5015023",
"0.49969223",
"0.49594033",
"0.49423075",
"0.49096698",
"0.49021816",
"0.4874559",
"0.48718235",
"0.48664445",
"0.48653713",
"0.4848079",
"0.48358098",
"0.48354253",
"0.4799831",
"0.477589",
"0.47657746",
"0.47587892",
"0.47516337",
"0.47260946",
"0.4710029",
"0.4708469",
"0.46902618",
"0.4668371",
"0.4645383",
"0.46233836",
"0.45812052",
"0.4580253",
"0.4574336",
"0.45686236",
"0.4565747",
"0.45652214",
"0.45642528",
"0.45355794",
"0.45297223",
"0.45271185",
"0.45269313",
"0.4507829",
"0.45065245",
"0.45054635",
"0.45019567",
"0.45000893",
"0.44957453",
"0.44944057",
"0.4491779",
"0.44897845",
"0.4489216",
"0.44881785",
"0.4481287",
"0.44790483",
"0.4476703",
"0.44569388",
"0.4444583",
"0.44431487",
"0.44382724",
"0.44250292",
"0.44160846",
"0.44149837",
"0.44133717",
"0.4410824",
"0.4410824",
"0.43947902",
"0.43563437",
"0.4350619",
"0.43413356",
"0.43410903",
"0.43398595",
"0.43392542",
"0.43182975",
"0.4316545",
"0.43086725",
"0.43066394",
"0.43025574",
"0.4300736",
"0.42950767",
"0.4294737",
"0.4292681",
"0.42909867",
"0.42790827",
"0.42776954",
"0.4275954",
"0.42704457",
"0.4267015",
"0.42668465",
"0.42658514",
"0.42619452",
"0.42549068",
"0.4254373",
"0.42500976",
"0.42481476",
"0.4248141",
"0.42447555",
"0.42439958"
] |
0.79076797
|
0
|
TODO Employs the KMP string matching algorithm to add all tweets containing the given pattern to the provided list. Returns the total number of character comparisons performed.
|
public int searchTweetsKMP(String pattern, List<String> ans) {
int compCost = 0;
Assoc<Integer, Integer> holder;
int[] flinks = new int[pattern.length() + 1];
int flinkcost = StringMatch.buildKMP(pattern, flinks);
compCost = flinkcost;
for(String tweet : tweets) {
//holder = StringMatch.matchKMP(pattern, tweet);
holder = StringMatch.matchKMP(pattern.toLowerCase(), tweet.toLowerCase());
compCost += holder.value - flinkcost;
if(holder.key != -1)
ans.add(tweet);
}
return compCost;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static long count (List<String> lst, String pattern) {\n\t\t\n\t\tlong cpt = 0;\n\t\tfor(String st : lst) {\n\t\t\tif(st.equals(pattern)) {\n\t\t\t//if(st.contains(pattern)) {\n\t\t\t\tcpt++;\n\t\t\t}\n\t\t}\n\t\treturn cpt;\n\t\n\t}",
"public int searchTweetsNaive(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchNaive(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n }",
"public static long count2(List<String> lst, String pattern) {\n\n\t\t return lst.stream()\n\t\t\t\t \n\t\t.filter(x -> x.equals(pattern))\n\t\t.count();\n\t\t\n\t}",
"public int searchTweetsBoyerMoore(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchBoyerMoore(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n\n }",
"private static int matchFunction(Scanner inputStream, List<Character> text, List<Character> pattern) {\n\n int countPattern = 0;//Keeps track of the successful occurrences.\n\n while (inputStream.hasNext()) { //checks for every new line of the text file.\n\n String[] line = inputStream.nextLine().split(\" \"); //Splits the line into tokens.\n\n\n for(String word: line){\n //For every token analyzed, turn every token into an array of characters and store it in the list.\n for(int i =0 ; i < word.length(); i++){\n text.add(word.charAt(i));\n }//end for\n\n int result = findBrute(text, pattern); //returns the index where the substring is found.\n\n if (result != -1) { //if it returns anything but -1, substring was found in the token.\n countPattern++; //increment for every matching substring found.\n }//end if\n\n text.clear(); //clears the token from the list. loops back again for the next token.\n }//end for\n\n }//end while\n inputStream.close(); //closes input stream.\n return countPattern;\n }",
"@Test(timeout = TIMEOUT)\n public void kmp() {\n assertEquals(ans, PatternMatching.kmp(pattern, text, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(\"Counts: \" + comparator.getComparisonCount() + \". Should be 23.\",\n 23, comparator.getComparisonCount());\n\n comparator.clear(); // Personally made this method to test every kmp matching in single method.\n //Just set comparisonCount to 0 in the CharacterComparator class.\n\n /*\n pattern: aaba\n text: aabaacaadaabaaba\n */\n assertEquals(ans1, PatternMatching.kmp(pattern1, text1, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(\"Counts: \" + comparator.getComparisonCount() + \". Should be 24.\",\n 24, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n Another multiple match test for reassurance.\n */\n String a = \"ab\";\n String b = \"abab\";\n\n List<Integer> list = new ArrayList<>();\n list.add(0);\n list.add(2);\n\n assertEquals(list, PatternMatching.kmp(a, b, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(5, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n No match case\n pattern: aabcaabd\n text: aabaacaadaabaaba\n */\n assertEquals(empty, PatternMatching.kmp(wrong, text1, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(\"Counts: \" + comparator.getComparisonCount() + \". Should be 23.\",\n 23, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n Longer text\n */\n assertEquals(empty, PatternMatching.kmp(text, pattern, comparator));\n assertEquals(0, comparator.getComparisonCount());\n\n }",
"@Test\npublic void testKMPSearch() throws Exception { \n//TODO: Test goes here...\n String origin = \"aaaaaab\";//目标字符串\n String pattern = \"aababaaa\"; //匹配字符串\n int i = KMP.KMPSearch(origin,pattern);\n System.out.println(i);\n}",
"public static void main(String... args) {\n String handle = \"realDonaldTrump\", pattern = \"mexico\";\n System.out.println(\"Starting\");\n MatchBot bot = new MatchBot(handle, 2000);\n System.out.println(\"made bot\");\n // search all tweets for the pattern\n List<String> ansNaive = new DoublyLinkedList<>();\n System.out.println(\"naive start\");\n\n // test 1\n int compsNaive = bot.searchTweetsNaive(pattern, ansNaive); \n\n List<String> ansKMP = new DoublyLinkedList<>();\n System.out.println(\"kmp start\");\n int compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n\n List<String> ansBM = new DoublyLinkedList<>();\n System.out.println(\"Boyer - Moore start\");\n int compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n\n \n System.out.println(\"*** Donald test (normal size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n /*for (int i = 0; i < ansKMP.size(); i++) {\n String tweet = ansKMP.get(i);\n assert tweet.equals(ansNaive.get(i));\n System.out.println(i++ + \". \" + tweet);\n System.out.println(pattern + \" appears at index \" + \n tweet.toLowerCase().indexOf(pattern.toLowerCase()));\n }*/\n\n // test 2\n handle = \"cnnbrk\";\n pattern = \"syria\";\n bot = new MatchBot(handle, 2000);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** CNN breaking news (normal size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n\n //test 3\n handle = \"realDonaldTrump\";\n pattern = \"mexico\";\n bot = new MatchBot(handle, 250);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** Donald test (small size): **: ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n\n // test 4\n handle = \"cnnbrk\";\n pattern = \"syria\";\n bot = new MatchBot(handle, 250);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** CNN breaking news (small size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n\n // test 5\n handle = \"cnnbrk\";\n pattern = \"syria\";\n bot = new MatchBot(handle, 4000);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** CNN breaking news (large size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n // test 6\n handle = \"realDonaldTrump\";\n pattern = \"mexico\";\n bot = new MatchBot(handle, 4000);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** Donald test (large size): **: ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n }",
"public int selectWordTokens (String [] list1, int count1, String [] list2){\n \n int count = 0;\n \n //Runs through each value of list1 grabs the values that align with \"[A-Za-z]+\" and assigns them to list2\n for (int i = 0; i < count1 ; i++){\n if (list1[i].matches(\"[A-Za-z]+\")){\n String Str = list1[i]; \n list2[count]= Str; \n count++;\n }//End if statement\n }//End for loop\n \n return count;\n \n }",
"public static void main(String[] args) {\n String pattern = \"aabe\";\n String text = \"aabaacdeaaabe\";\n\n List<Integer> foundIndexes = KnuthMorrisPrattPatternSearch.performKMPSearch(text, pattern);\n\n if (foundIndexes.isEmpty()) {\n System.out.println(\"Pattern not found in the given text String\");\n } else {\n System.out.println(\"Pattern found in the given text String at positions: \"+\n foundIndexes.stream().map(Object::toString).collect(Collectors.joining(\", \")));\n }\n }",
"public List<String> match(List<String> someList)\n {\n char[] objectWord = this.aWord.toCharArray();\n Arrays.sort(objectWord);\n\n List<String> answer = new ArrayList<>();\n HashMap<String, Integer> mapForEachWord = new HashMap<>();\n\n for (int i = 0; i < someList.size(); i++)\n {\n String wordFromList = someList.get(i).toLowerCase();\n //mapForEachWord = processWord(wordFromList);\n\n char[] listWordArray = wordFromList.toCharArray();\n Arrays.sort(listWordArray);\n\n if (Arrays.equals(listWordArray, objectWord) && !this.aWord.equals(wordFromList))\n {\n answer.add(someList.get(i));\n }\n\n }\n\n return answer;\n }",
"public static int stringMatch(String text, String pattern) {\n char[] t = text.toLowerCase().toCharArray();\n char[] p = pattern.toLowerCase().toCharArray();\n int n = t.length;\n int m = p.length;\n int i = m - 1; // index the right end of pattern/text alignment\n int comp = 0; //number of comparisons done\n\n Hashtable<Character, Integer> table = shiftTable(p, t);\n\n //catches empty string error and pattern.length > text.length error\n if (text.isEmpty() || pattern.isEmpty() || m > n) {\n System.out.println(\"-------Warning------\\nInputs are either empty or wrong lengths\");\n return -1;\n }\n\n while (i <= n - 1) {\n System.out.println(\"Right Most Position = \" + i + \"\\n\" + text + \"\\n\" + pattern);\n int k = 0; // k is how many chars have matched\n comp++;\n\n while (k <= m - 1 && p[m - 1 - k] == t[i - k]) {\n k += 1;\n }\n if (k == m) {\n System.out.println(\"Pattern Found!\\nNumber of Comparisons: \" + comp);\n return i - m + 1;\n } else {\n String spaces = spaces(table.get(t[i]));\n pattern = spaces + pattern;\n i = i + table.get(t[i]); // shift according to rightmost char\n }\n }\n System.out.println(\"No Match Found\");\n return -1; // if get here, no matches anywhere\n }",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int T = scan.nextInt();\n scan.nextLine();\n for(int i = 0 ; i < T ; i++){\n int count = 0;\n String text = scan.nextLine();\n char[] letters = text.toCharArray();\n\n if(letters.length > 0){\n char character = letters[0];\n\n for(int j = 1 ; j < letters.length ; j++){\n\n if(character == letters[j]){\n count++;\n }else{\n character = letters[j];\n }\n }\n }\n System.out.println(count);\n }\n scan.close();\n }",
"public void doCount(ArrayList<String> liste){\n\t\tint j;\n\t\t\n\t\tfor (int i = 0; i < liste.size(); i++) {\n\t\t\t// check if string already exists\n\t\t\tif(!map.containsKey(liste.get(i))){\n\t\t\t\t// check frequency of the given string\n\t\t\t\tj = Collections.frequency(liste, liste.get(i));\t\n\t\t\t\t\n\t\t\t\t// underscore instead of blank space\n\t\t\t\tif(liste.get(i).equals(\" \"))\n\t\t\t\t\tmap.put(\"_\", j);\t\n\t\t\t\telse\n\t\t\t\t\tmap.put(liste.get(i), j);\t// (char, frequency)\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n\t\t//return map;\n\t}",
"private static int findBrute(List<Character> text, List<Character> pattern) {\n int n = text.size();\n int m = pattern.size();\n for (int i = 0; i <= n - m; i++) { //try every starting index within text.\n int k = 0; // k is index into pattern\n while (k < m && text.get(i + k) == pattern.get(k))\n // kth character of pattern matches\n k++;\n if (k == m) // if we reach the end of the pattern,\n return i; // substring text[i..i+m-1] is a match\n } //end for\n return -1;// search failed\n }",
"public static ResultModel search(String text, String pattern) {\n long startTime = System.nanoTime();\n ResultModel Result = new ResultModel();\n String positionText = \"\";\n int Count = 0;\n // Write your code here\n int M = pattern.length(); \n int N = text.length(); \n int i, j; \n int p = 0; // hash value for pattern \n int t = 0; // hash value for txt \n int h = 1; \n \n // The value of h would be \"pow(d, M-1)%q\" \n for (i = 0; i < M-1; i++) {\n h = (h*d)%q; \n }\n // Calculate the hash value of pattern and first \n // window of text \n for (i = 0; i < M; i++) \n { \n p = (d*p + pattern.charAt(i))%q; \n t = (d*t + text.charAt(i))%q; \n\n\n } \n \n \n // Slide the pattern over text one by one \n for (i = 0; i <= N - M; i++) \n { \n \n // Check the hash values of current window of text \n // and pattern. If the hash values match then only \n // check for characters on by one \n if ( p == t ) \n { \n /* Check for characters one by one */\n for (j = 0; j < M; j++) \n { \n if (text.charAt(i+j) != pattern.charAt(j)) \n break; \n } \n \n // if p == t and pat[0...M-1] = txt[i, i+1, ...i+M-1] \n if (j == M) { \n \tCount ++;\n\t // return i\n\t if(positionText == \"\") {\n\t positionText += (i+ 1) + \"th\";\n\t }else {\n\t positionText = positionText + \", \" + (i+1) + \"th\";\n\t }\n }\n } \n \n // Calculate hash value for next window of text: Remove \n // leading digit, add trailing digit \n if ( i < N-M ) \n { \n\n t = (d*(t - text.charAt(i)*h) + text.charAt(i+M))%q; \n \n // We might get negative value of t, converting it \n // to positive \n if (t < 0) {\n\n t = (t + q); \n }\n \n } \n \n } \n\n //End of code\n\n long endTime = System.nanoTime();\n long totalTime = endTime - startTime;\n\n Result.setExecutionTime(TimeUnit.NANOSECONDS.toMillis(totalTime));\n Result.setFoundCount(Count);\n Result.setPosition(positionText);\n return Result;\n }",
"public int countOccurencesOf(String text, String target) {\n if(text.length() > target.length()) return 0;\n\n int numberOfCompares = target.length() - text.length() + 1;\n int count = 0;\n\n for(int i = 0; i < numberOfCompares; i++) {\n String sub = target.substring(i, i + text.length());\n if(text.equals(sub)) count++;\n }\n\n return count;\n }",
"public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}",
"public static void main(String[] args) {\n ArrayList<Character> actual=new ArrayList<>();\n actual.add('R');\n actual.add('G');\n actual.add('B');\n actual.add('Y');\n ArrayList<Character> guess=new ArrayList<>();\n guess.add('G');\n guess.add('G');\n guess.add('R');\n guess.add('R');\n ArrayList<Character> hitLists=new ArrayList<>();\n ArrayList<Character> pseudoLists=new ArrayList<>();\n int hits=0;\n int pseudoHits=0;\n for(int i=0;i<4;i++)\n {\n \t if(actual.get(i)==guess.get(i))\n \t {\n \t\t hits++;\n \t\t hitLists.add(actual.get(i));\n \t }\n }\n for(int i=0;i<4;i++)\n {\n \t char g=guess.get(i);\n \t if(g!=actual.get(i)&&!hitLists.contains(g)&&actual.contains(g))\n { \n\t pseudoLists.add(g);\n }\n }\n for(int i=0;i<pseudoLists.size();i++)\n { char g=pseudoLists.get(i);\n \t int actualOccs=numOccurences(g,actual);\n \t int guessOccs=numOccurences(g,guess);\n \t \n\t\tif(guessOccs==actualOccs)\n \t {\n \t\t pseudoHits++; \n \t }\n\t\telse{\n\t\t\tpseudoHits+=Math.min(guessOccs,actualOccs);\n\t\t}\t \n System.out.println(g);\n }\n \n \n System.out.println(hits+\" hits \"+pseudoHits+\" pseudoHits\");\n\t}",
"private int getNumMatches(String word1, String word2) {\n int count = 0;\n for (int i = 0; i < word1.length(); i++) {\n if (word1.charAt(i) == word2.charAt(i)) {\n count++;\n }\n }\n \n return count;\n }",
"private static int search() {\n\t\tint index = -1;\n\t\tdouble txtRollingHash = 0;\n\t\tfor (int i = 0; i < textLength - (patternLength - 1); i++) {\n\t\t\tif (i == 0) {\n\t\t\t\ttxtRollingHash = calculateHash(text, patternLength);\n\t\t\t} else {\n\t\t\t\t// Remove previous char and add current char\n\t\t\t\ttxtRollingHash = calculateHash(text, textLength, i - 1, i + (patternLength - 1), txtRollingHash);\n\t\t\t}\n\t\t\tlogger.info(\"At index: \" + i + \"\\t\\tRolling Hash:\" + txtRollingHash + \"\\t\\tPattern Hash: \" + patternHash);\n\t\t\tif (patternHash == txtRollingHash && compare(text, i)) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}",
"public static void main(String[] args) {\n String pat = args[0];\n String txt = args[1];\n char[] pattern = pat.toCharArray();\n char[] text = txt.toCharArray();\n\n KMP kmp1 = new KMP(pat);\n int offset1 = kmp1.search(txt);\n\n KMP kmp2 = new KMP(pattern, 256);\n int offset2 = kmp2.search(text);\n\n // print results\n StdOut.println(\"text: \" + txt);\n\n StdOut.print(\"pattern: \");\n for (int i = 0; i < offset1; i++)\n StdOut.print(\" \");\n StdOut.println(pat);\n\n StdOut.print(\"pattern: \");\n for (int i = 0; i < offset2; i++)\n StdOut.print(\" \");\n StdOut.println(pat);\n }",
"public int numMatches() {\n int count = 0;\n for (WordPair pair : allPairs) {\n if (pair.getFirst() == pair.getSecond())\n count++;\n }\n return count;\n }",
"@Override\n public void run() {\n long beginTime = System.currentTimeMillis();\n String[] words = text.split(\" \");\n long endTime = System.currentTimeMillis();\n System.out.printf(\"Regex time: %d;\\n\", endTime - beginTime);\n int count = 0;\n beginTime = System.currentTimeMillis();\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n if (c == ' ' || c == '.' || c == '!' || c == '?') {\n count++;\n }\n }\n endTime = System.currentTimeMillis();\n System.out.printf(\"For time: %d;\\n\", endTime - beginTime);\n System.out.printf(\"Words: %d;\\n\", words.length);\n System.out.printf(\"Count word: %d;\\n\", count);\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic void suggestword(String pattern) throws Exception\r\n\t{\r\n\t\t\t// String to be scanned to find the pattern.\r\n\t\t\tString line = \" \";\r\n\t\t\tString reg = \"[\\\\w]+[@$%^&*()!?{}\\b\\n\\t]*\";\r\n\r\n\t\t\t// Create a Pattern object\r\n\t\t\tPattern p = Pattern.compile(reg);\r\n\t\t\t\r\n\t\t\t// Now create matcher object.\r\n\t\t\tMatcher m = p.matcher(line);\r\n\t\t\t\r\n\t\t\tint fileNum = 0;\r\n\t\t\t\r\n\t\t\t\tFile directory = new File(\"C:\\\\Users\\\\jayad\\\\eclipse-workspace\\\\Search Engine\\\\src\\\\Webpages\\\\Text\\\\\");\r\n\t\t\t\tFile[] fileArray = directory.listFiles();\r\n\t\t\t\tfor (int i = 0; i < fileArray.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfind(fileArray[i], fileNum, m, pattern); // Calls the function find()\r\n\t\t\t\t\tfileNum++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings({ \"unused\" })\r\n\t\t\t\tSet keys = new HashSet();\r\n\t\t\t\tInteger value1 = 1;\r\n\t\t\t\tInteger value2 = 0;\r\n\t\t\t\tint counter = 0;\r\n\r\n\t\t\t\tSystem.out.println(\"\\nDid you mean?:\");\r\n\t\t\t\tfor (Map.Entry entry : hashTable.entrySet())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (value2 == entry.getValue())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\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\tif (value1 == entry.getValue())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (counter == 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" , \" + entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} // End of if\r\n\r\n\t\t\t\t\t} // End of else\r\n\t\t\t\t} // End of for loop\r\n\t}",
"public List<Integer> matchingStrings(List<String> strings, List<String> queries) {\n Map<String, Integer> wordsCount = new HashMap<>();\n for (String string : strings) {\n Integer count = wordsCount.get(string);\n if (count == null) {\n count = 0;\n }\n count++;\n wordsCount.put(string, count);\n }\n List<Integer> result = new ArrayList<>();\n for (String query : queries) {\n Integer count = wordsCount.get(query);\n if (count == null) {\n count = 0;\n }\n result.add(count);\n }\n\n return result;\n\n }",
"static int countOccurrences(String str, String word) \r\n\t\t{\n\t\t String a[] = str.split(\" \");\r\n\t\t \r\n\t\t // search for pattern in a\r\n\t\t int count = 0;\r\n\t\t for (int i = 0; i < a.length; i++) \r\n\t\t {\r\n\t\t // if match found increase count\r\n\t\t if (word.equals(a[i]))\r\n\t\t count++;\r\n\t\t }\r\n\t\t \r\n\t\t return count;\r\n\t\t}",
"private Tuple charCountReduce(List<Tuple> input) {\n String chars = input.get(0).fst();\n Integer count = input.size();\n \n // output <charCount, # of words with that charCount>\n return new Tuple(chars, count.toString());\n }",
"public static void main(String[] args)\n{\n\tString str=\"like like rcb\";\n String[] Spl = str.split(\" \");\n\tint count=0;\n\tfor(int i=0;i<Spl.length;i++)\n\t{\n\t\tif(Spl[i].equals(\"like\"))\n\t\t{\n\t\tcount++;\n\t\t}\n\t}\n\tSystem.out.println(\"number of like present in given String are \"+count);\n}",
"public static void main(String[] args) {\n \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n String[] p = new String[n];\n int[] counter = new int[n];\n for(int i = 0; i<n;i++ ){\n \tp[i] = input.next();\n \t\n \tint j = 0;\n \twhile(j<p[i].length()){\n \t\tint t =1;\n \t\tif(j + t < p[i].length()){\n \t\twhile(p[i].charAt(j) == p[i].charAt(j+t) ){\n \t\t\tt++;\n \t\t\tcounter[i]++;\n \t\t\tif(j+t >= p[i].length())\n \t\t\t\tbreak;\n \t\t\t\n \t\t}\n \t\t}\n \t\tj = j+t;\n \t\t\n \t\t\n \t\t\n \t}\n }\n \n for(int i= 0; i<n;i++){\n\t System.out.println(counter[i]);\n }\n \n \n \n input.close();\n }",
"public boolean count()\n {\n if(!textReaderWriter.initTextReader(fileName))\n return false;\n\n while(textReaderWriter.hasNextString()) {\n String temp = textReaderWriter.readOneString();\n String[] wordsTable = temp.split(\" \");\n for (int i = 0; i < wordsTable.length; i ++) // go throw words in a 1 line\n {\n for (StringPattern stringPattern : stringPatternList) { // go throw patterns\n if(containsPattern(stringPattern.getPattern(), wordsTable[i]))\n {\n stringPattern.incrementCountWords();\n }\n }\n }\n }\n return true;\n }",
"public int search(String text){\r\n\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\tchar[] textChar = text.toCharArray();\r\n\t\tchar[] patternChar = pattern.toCharArray();\r\n\r\n\t\tboolean found = false;\r\n\r\n\t\tlong textLength = text.length();\r\n\t\tlong patternLength = patternChar.length;\r\n\t\t\r\n\t\tif(patternLength == 0) { \r\n\t\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\tlastSearchTime = endTime - startTime; \r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i<=textLength-patternLength;i++){\r\n\t\t\tif(inspect(textChar,i) == inspect(patternChar, 0)){\r\n\t\t\t\tfound = true;\r\n\t\t\t\tfor (int j = 0; j < patternLength; j++) {\r\n\t\t\t\t\tif(inspect(textChar , i+j) != inspect (patternChar, j)){\r\n\t\t\t\t\t\tfound = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(found){\r\n\t\t\t\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\t\t\tlastSearchTime = endTime - startTime;\r\n//\t\t\t\t\tSystem.out.println(\"Found : Total time in ms(Brute Force): \"+(endTime-startTime));\r\n//\t\t\t\t\tSystem.out.println(\"Total Inspection Times: \" + counter);\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlong endTime = System.currentTimeMillis();\r\n\t\tlastSearchTime = endTime - startTime;\r\n//\t\tSystem.out.println(\"Not Found : Total time in ms: \"+(endTime-startTime));\r\n//\t\tSystem.out.println(\"Total Inspection Times: \" + counter);\r\n\t\treturn -1;\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tString s1=\"Hi Hello\";\n\t\tfrequent(s1);\n//\t\tchar ch[] = s1.toCharArray();\n//\t\tchar ch1;\n//\t\tchar ch2[]=new char[10];\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\tSystem.out.println(ch[i]);\n//\t\t}\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\t\n//\t\t\tint count=1;\n//\t\t\tfor(int j=i+1;j<ch.length;j++) {\n//\t\t\t\t\n//\t\t\t\tif(ch[i]==ch[j]) {\n//\t\t\t\t\t\n//\t\t\t\t\tcount++;\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}System.out.println(\"Count of \"+ch[i]+\"=\"+count);\n//\t\t}\n\t\t\n\t\t\n\t\n\n\t}",
"public static void main(String[] args) throws IOException {\n final String KEY = \"hackerrank\";\n Scanner in = new Scanner(System.in);\n Matcher matcher = Pattern.compile(KEY, Pattern.CASE_INSENSITIVE).matcher(\"\");\n //Count the tweets with KEY in it\n int count = 0;\n for(int N = Integer.parseInt(in.nextLine()); N > 0; --N) {\n String tweet = in.nextLine();\n matcher.reset(tweet);\n count += matcher.find() ? 1 : 0;\n }\n //Output count\n System.out.println(count);\n }",
"private void updateCommon(List<Status> tweetsList) {\r\n numberOfTweets += tweetsList.size();\r\n \r\n tweetsList.stream().forEach(tweet -> {\r\n final HashtagEntity[] hashtags = tweet.getHashtagEntities();\r\n for (HashtagEntity hashtag : hashtags) {\r\n final String text = hashtag.getText().toLowerCase();\r\n if (!countHashtags.containsKey(text)) {\r\n countHashtags.put(text, 0);\r\n }\r\n countHashtags.put(text, countHashtags.get(text) + 1);\r\n }\r\n \r\n final String[] words = tweet.getText().split(\" \");\r\n for (String word : words) {\r\n word = word.toLowerCase();\r\n if (!wordsFilter.contains(word)) {\r\n if (!countWords.containsKey(word)) {\r\n countWords.put(word, 0);\r\n }\r\n countWords.put(word, countWords.get(word) + 1);\r\n }\r\n }\r\n \r\n final String location = tweet.getUser().getLocation();\r\n if (!countLocation.containsKey(location)) {\r\n countLocation.put(location, 0);\r\n }\r\n countLocation.put(location, countLocation.get(location) + 1);\r\n });\r\n }",
"static int countCharacters2(String[] words, String chars) {\n int count = 0;\n int[] seen = new int[26];\n //Count char of Chars String\n for (char c : chars.toCharArray())\n seen[c - 'a']++;\n // Comparing each word in words\n for (String word : words) {\n // simple making copy of seen arr\n int[] tSeen = Arrays.copyOf(seen, seen.length);\n int Tcount = 0;\n for (char c : word.toCharArray()) {\n if (tSeen[c - 'a'] > 0) {\n tSeen[c - 'a']--;\n Tcount++;\n }\n }\n if (Tcount == word.length())\n count += Tcount;\n }\n return count;\n }",
"private TreeMap<String, Integer> getWordsCount(TreeMap<String, ArrayList<String>> wordFamilies, ArrayList<String> allPatterns) {\r\n \t// get all the patterns first\r\n \tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\twordFamilies.put(allPatterns.get(i), new ArrayList<String>());\r\n \t}\r\n \t// add the words into each pattern\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\t\tif (s.equals(allPatterns.get(i))) {\r\n \t\t\t\tArrayList<String> curr = wordFamilies.get(s);\r\n \t\t\t\tcurr.add(this.activeWords.get(i));\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t// get the number of words in each pattern\r\n \tTreeMap<String, Integer> results = new TreeMap<String, Integer>();\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tresults.put(s, wordFamilies.get(s).size());\r\n \t}\r\n \treturn results;\r\n }",
"public int search(String txt)\n {\n String patternCollector;\n int N = txt.length();\n long txtHash = hash(txt, M);\n if (N < M) {return N;}\n patternCollector = hashMatchPattern(txtHash);\n if (patternCollector != null){\n if (check(0, txt, patternCollector)){\n return 0;\n }\n }\n\n for (int i = M; i < N; i++) {\n txtHash = (txtHash + Q - RM*txt.charAt(i-M) % Q) % Q;\n txtHash = (txtHash*R + txt.charAt(i)) % Q;\n patternCollector = hashMatchPattern(txtHash);\n if (patternCollector != null){\n if (check(i - M + 1, txt, patternCollector)){\n return i - M + 1;\n }\n }\n }\n return N; // no match found\n }",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public ArrayList<String> findSimilarStringsLiterals(String s, double score){\n\t\t\n\t\tsetForSuggestions.clear();\n\t\t\n\t\t// ArrayList for match scores\n\t\tArrayList<StringScore> matchesScores = new ArrayList<StringScore>(); \n\t\t\n\t\t// ArrayList for the matches\n\t\tArrayList<String> matches = new ArrayList<String>();\n\t\t\n\t\t// The trimmed string variable\n\t\tString trimmedString;\n\t\t\n\t\t// Check if it's not a literal\n\t\tif(!s.startsWith(\"\\\"\"))\n\t\t\treturn matches;\n\t\t\n\t\t// Extract what's between double quotes\n\t\ttrimmedString = s.substring(s.indexOf(\"\\\"\")+1,\n\t\t\t\ts.indexOf(\"\\\"\", s.indexOf(\"\\\"\")+1)).toLowerCase();\t// Just choose what is between brackets\n\t\t\n\t\t// Find similar literals withing 5 characters\n\t\tint minLength = trimmedString.length() - 2;\n\t\tint maxLength = trimmedString.length() + 3;\n\t\t\n\t\tint minIndex = Integer.MAX_VALUE;\n\t\tint maxIndex = -1;\n\t\t\n\t\t// Determine indices for search in bins\n\t\tfor(int i = 0; i < lengths.size(); ++i){\n\t\t\tif(lengths.get(i) > maxLength) {\n\t\t\t\tmaxIndex = indexes.get(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minLength >= lengths.get(i)) {\n\t\t\t\tminIndex = indexes.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Assign threads to search tasks\n\t\tint indexesPerThread = (maxIndex - minIndex) / (numOfCores - 1);\n\t\t\n\t\t// Arraylist to keep track of threads\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\n\t\t\n\t\tfor(int i = minIndex; i < maxIndex; i += indexesPerThread) {\n\t\t\tthreads.add(new Thread(new SuggestionTask(i, i + indexesPerThread, s, trimmedString, score)));\n\t\t}\n\t\t\n\t\t// Start threads\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\tthreads.get(i).start();\n\t\t}\n\t\t\n\t\t// Join threads before continue\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\ttry {\n\t\t\t\tthreads.get(i).join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Copy contents of the synchronized list into the matchesScores list\n\t\tfor(StringScore stringScore : setForSuggestions) {\n\t\t\tmatchesScores.add(stringScore);\n\t\t}\n\t\t\n\t\t// Sort the candidate matches based on score and return top 5\n\t\tjava.util.Collections.sort(matchesScores, new StringScoreComparator());\n\t\tfor(int i = 0; i < 5 && i < matchesScores.size(); ++i){\n\t\t\tmatches.add(matchesScores.get(i).getS());\n\t\t}\n\t\treturn matches;\n\t}",
"public int countAllStringAppearances(List<String> stringsToCheck, String stringToContain) {\n int counter = 0;\n Pattern patternToMatch = Pattern.compile(stringToContain.toLowerCase());\n for (String currentString : stringsToCheck) {\n Matcher matcher = patternToMatch.matcher(currentString.toLowerCase());\n while (matcher.find()) {\n counter ++;\n }\n }\n return counter;\n }",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tchar[] input = br.readLine().toCharArray();\n\t\tint[] arr = new int[26];\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tarr[input[i] - 'A']++;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor (int i = 1; i < t; i++) {\n\t\t\tchar[] candidates = br.readLine().toCharArray();\n\t\t\tint[] scores = new int[26];\n\t\t\tfor (int j = 0; j < candidates.length; j++) {\n\t\t\t\tscores[candidates[j] - 'A']++;\n\t\t\t}\n\t\t\t\n\t\t\tif (similar(arr, scores)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"public static void main(String args[]) \n\t{ \n String txt = \"ABABDABACDABABCABAB\"; \n String pat = \"ABABCABAB\"; \n\t\tnew KMP().KMPSearch(pat, txt); \n\t}",
"public static void main(String[] args) {\n\t\tString original=\"Java is Programming Language Java asdf Java ghjhfj\";\r\n\t\tString occurence=\"Java\";\r\n\t\t\r\n\t\tint count=0;\r\n\t\tint fromIndex=0;\r\n\t\t\r\n\t\twhile ((fromIndex = original.indexOf(occurence, fromIndex)) != -1 )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Fount at index: \"+fromIndex);\r\n\t\t\tcount++;\r\n\t\t\tfromIndex++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Total number of occurence of Java: \"+count);\r\n\t}",
"@Override\n protected Integer count() {\n Matcher matcher = UPPER.matcher(this.password);\n Integer score = 0;\n\n while (matcher.find()) {\n score++;\n }\n\n return score;\n }",
"public static int KMPSearch(String txt, String pat) {\r\n\t\tint M = pat.length();\r\n\t\tint N = txt.length();\r\n\r\n\t\t// return -1 if pattern cannot be found in txt\r\n\t\tif (M > N) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\t// create lps[] that will hold the longest\r\n\t\t// prefix suffix values for pattern\r\n\t\tint lps[] = new int[M];\r\n\t\tint j = 0; // index for pat[]\r\n\r\n\t\t// Preprocess the pattern (calculate lps[] array)\r\n\t\tcomputeLPSArray(pat, M, lps);\r\n\r\n\t\t// use i as index for txt\r\n\t\tint i = 0;\r\n\t\t// loop through txt until the end\r\n\t\twhile (i < N) {\r\n\r\n\t\t\t// if the characters match increase the indexes of txt and pattern\r\n\t\t\tif (pat.charAt(j) == txt.charAt(i)) {\r\n\t\t\t\ti++;\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\r\n\t\t\t// if the index of pattern reaches the end then the word has been found, return\r\n\t\t\t// the index of txt where it starts\r\n\t\t\tif (j == M) {\r\n\t\t\t\treturn i - M;\r\n\t\t\t}\r\n\r\n\t\t\t// if no match is found after j attempts, calculate the jump when j>0, otherwise\r\n\t\t\t// increment i\r\n\t\t\telse if (i < N && pat.charAt(j) != txt.charAt(i)) {\r\n\t\t\t\tif (j > 0) {\r\n\t\t\t\t\tj = lps[j - 1];\r\n\t\t\t\t} else\r\n\t\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"@Override\r\n public Integer countingDuplicates(String match) {\r\n if(duplicates == null) { // if it's not already located\r\n duplicates = new HashMap<>();\r\n for (Core str : pondred) {\r\n for (String term:str.abstractTerm){\r\n if (duplicates.containsKey(term) )\r\n duplicates.put(term, duplicates.get(term) + 1);\r\n else {\r\n duplicates.put(term, 1);\r\n }\r\n }\r\n }\r\n }\r\n return duplicates.get(match);\r\n }",
"private static int matchValue(TrieNode existing, TrieNode toAdd, String[] allWords){\n\t\tSystem.out.println(allWords[existing.substr.wordIndex]);\n\t\tSystem.out.println(allWords[toAdd.substr.wordIndex]);\n\n\t\tString first=allWords[existing.substr.wordIndex].substring(existing.substr.startIndex,existing.substr.endIndex+1);\n\t\tString second=allWords[toAdd.substr.wordIndex].substring(toAdd.substr.startIndex,toAdd.substr.endIndex+1);\n\t\tSystem.out.println(\"Compare: \"+first+ \"\\twith\" +\"\\t\"+ second);\n\t\t\n\t\tint count=1;\n\t\tint matchValue=0;\n\t/*\tif(first.charAt(0)!=second.charAt(0)){\n\t\t\treturn 0;\n\t\t}*/\n\t\t\n\t\t//System.out.println(\"From: \"+ existing.substr.startIndex+\" To: \"+existing.substr.endIndex);\n\t\tif(first.length()<=second.length()){\n\t\t\tint imax=(short)(existing.substr.endIndex-existing.substr.startIndex+1);\n\t\tfor(int i=0;i<imax;i++){\n\t\t\t\n\t\t\t//System.out.println(\"UM WE RUN COUNT: \" );\n\t\t\tif(first.charAt(i)==second.charAt(i)){\n\t\t\t\tmatchValue++;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(first.charAt(i)!=second.charAt(i)){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t}\n\t\telse{\n\t\t\tint imax=(short)(toAdd.substr.endIndex-toAdd.substr.startIndex+1);\n\t\t\tfor(int i=0;i<imax;i++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(first.charAt(i)==second.charAt(i)){\n\t\t\t\t\tmatchValue++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(first.charAt(i)!=second.charAt(i)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t}\t\n\t\t}\n\t\treturn matchValue;\n\t}",
"public static void main(String[] args) {\n Scanner inputScanner = new Scanner(System.in);\n System.out.println(\"Enter the filename to be used as the text:\");\n String file = inputScanner.nextLine();\n \n // Read in text from file\n String text = new String();\n try (BufferedReader reader = new BufferedReader(new FileReader(file))) {\n StringBuilder sb = new StringBuilder();\n String line = reader.readLine();\n \n while (line != null) {\n sb.append(line);\n line = reader.readLine();\n }\n text = sb.toString();\n }\n catch (Exception e) {\n System.out.println(e.toString());\n System.exit(-1);\n }\n \n // Preprocessing.\n long startTime = System.nanoTime();\n BWT L = new BWT(text);\n SuffixArray SA = new SuffixArray(text);\n WaveletTree WT = new WaveletTree(L.getBWT());\n \n // Obtain the alphabet of the text.\n HashSet<Character> textAlphabet = new HashSet<>();\n for (int i = 0; i < text.length(); i++) {\n textAlphabet.add(text.charAt(i));\n }\n \n System.out.println(\"The size of the alphabet of the text is \" + textAlphabet.size());\n \n // Compute the C mapping.\n Hashtable<Character, Integer> C = new Hashtable<>();\n for (Character c : textAlphabet) {\n // Add the character if it isn't already present.\n if (!C.contains(c))\n C.put(c, 0);\n \n // Iterate over the text, computing C.\n for (int i = 0; i < text.length(); i++) {\n if (text.charAt(i) < c) {\n C.put(c, C.get(c) + 1);\n }\n }\n }\n \n long endTime = System.nanoTime();\n long duration = (endTime - startTime);\n \n System.out.println(\"Construction time: \" + duration/1000000);\n \n // Search for patterns forever.\n Scanner input = new Scanner(System.in);\n String pattern = null;\n while (true) {\n System.out.println();\n System.out.println(\"Enter a pattern:\");\n pattern = input.nextLine();\n\n // Run the algorithm a hundred times to get a reasonable time value.\n startTime = System.nanoTime();\n int sp = 0;\n int ep = 0;\n for (int repeat = 0; repeat < 1000; repeat++) {\n // All values are prepared for the search.\n int i = pattern.length();\n sp = 1;\n ep = L.getBWT().length();\n while (sp <= ep && i >= 1) {\n char c = pattern.charAt(i-1);\n sp = C.get(c) + WT.occ(WT.getRoot(), sp - 1, c) + 1;\n ep = C.get(c) + WT.occ(WT.getRoot(), ep, c);\n i--;\n }\n }\n \n endTime = System.nanoTime();\n duration = (endTime - startTime);\n \n if (ep < sp)\n System.out.println(\"Pattern not found.\");\n else\n System.out.println(\"<sp, ep> pair is <\" + sp + \", \" + ep + \">\");\n\n// for (int j = sp; j <= ep; j++) {\n// System.out.println(SA.getSuffixArray().get(j-1).toString());\n// }\n \n System.out.println();\n System.out.println(\"The text length is \" + text.length());\n System.out.println(\"The pattern length is \" + pattern.length());\n System.out.println(\"1000 repetitions of the search took \" + duration/1000000 + \" milliseconds.\");\n }\n }",
"static\nint\ncountPairs(String str) \n\n{ \n\nint\nresult = \n0\n; \n\nint\nn = str.length(); \n\n\nfor\n(\nint\ni = \n0\n; i < n; i++) \n\n\n// This loop runs at most 26 times \n\nfor\n(\nint\nj = \n1\n; (i + j) < n && j <= MAX_CHAR; j++) \n\nif\n((Math.abs(str.charAt(i + j) - str.charAt(i)) == j)) \n\nresult++; \n\n\nreturn\nresult; \n\n}",
"private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }",
"public int search(String text, String pattern) {\n int M = pattern.length();\n int N = text.length();\n int i, j;\n for (i = 0, j = 0; i < N && j < M; i++) {\n while (j >= 0 && text.charAt(i) != pattern.charAt(j))\n j = next[j];\n j++;\n }\n if (j == M) return i - M;\n return N;\n }",
"static int chars(List<String> strings) {\n\t\tint sum=0;\n\t\t//using loop\n//\t\tfor(String str : strings) {\n//\t\t\tsum+=str.length();\n//\t\t}\n\t\t//using iterator\n\t\tfor(Iterator<String> iterator=strings.iterator();iterator.hasNext();)\n\t\t\tsum+=iterator.next().length();\n\t\treturn sum;\n\t}",
"private static ArrayList<Integer> patternSearch(String s, String p){\n ArrayList<Integer> indexes = new ArrayList<>(); \n\n for(int i = 0 ; i < s.length() - p.length(); i++){\n\n if(s.substring(i, i + p.length()).equals(p)) indexes.add(i);\n\n\n }\n\n return indexes;\n }",
"public static int countRegexWordCharacters(String pattern) {\n String trimmed = pattern.replaceAll(\"^\\\\^(\\\\(\\\\?-?[ic]\\\\))?|\\\\$$\", \"\"); // trim off ^, $ and (?-i), etc.\n // only retain word characters\n return trimmed.replaceAll(\"\\\\W\", \"\").length();\n //trimmed.replaceAll(\"^(\\\\w*)(\\\\W(|.*\\\\W))(\\\\w*)$\", \"$1$4\"); // only retain prefix and suffix\n }",
"@Test\n public void testCharCountPool() throws FileNotFoundException, IOException {\n List<Tuple> input = getTuplesFromFileSimple(\"mapreduceExamples/shortstory.txt\");\n \n MapReduceController mr = new MapReduceController();\n \n mr.addJob(input, new Instructions() {\n \n @Override\n public List<Tuple> map(Tuple input) {\n return charCountMap(input);\n }\n \n @Override\n public Tuple reduce(List<Tuple> input) {\n return charCountReduce(input);\n }\n \n }).executeThreadPool(8);\n \n \n List<Tuple> output = mr.gatherResult();\n \n assertTrue(output.size()>0);\n for(Tuple tup : output) {\n assertTuple(tup, \"1\", \"217\");\n assertTuple(tup, \"2\", \"501\");\n assertTuple(tup, \"3\", \"577\");\n assertTuple(tup, \"4\", \"511\");\n assertTuple(tup, \"5\", \"257\");\n assertTuple(tup, \"6\", \"260\");\n assertTuple(tup, \"7\", \"193\");\n assertTuple(tup, \"8\", \"104\");\n assertTuple(tup, \"9\", \"77\");\n assertTuple(tup, \"10\", \"47\");\n assertTuple(tup, \"11\", \"14\");\n assertTuple(tup, \"12\", \"9\");\n assertTuple(tup, \"13\", \"7\");\n assertTuple(tup, \"14\", \"6\");\n }\n }",
"public static void testKMPMatch(){\n KMPMatch kmp = new KMPMatch ();\n System.out.println (kmp.indexOf ( \"aaaaabcdef\",\"aaaaax\" ));\n\n// System.out.println (Arrays.toString ( kmp.getNext ( \"aaaaaaaab\" ) ));\n String str = \"abcabc\";\n System.out.println ( Arrays.toString ( kmp.getNextVal ( str ) ));\n System.out.println (Arrays.toString ( getNextVal ( str ) ));\n }",
"public static int duplicateCount(String text) {\n String[] textArray = text.toLowerCase().split(\"\");\n List<String> temp = new ArrayList<String>();\n\n // Storing all of the duplicated strings\n for(int i=0; i < textArray.length; i++){\n for(int j=i+1; j < textArray.length; j++){\n if(textArray[i].equals(textArray[j])){\n temp.add(textArray[i]);\n }\n }\n }\n \n // Convert list to array\n String[] itemsArray = new String[temp.size()];\n itemsArray = temp.toArray(itemsArray);\n \n // Removing all the duplicated strings by using hashset\n Set<String> set = new HashSet<String>();\n for(int i = 0; i < itemsArray.length; i++){\n set.add(itemsArray[i]);\n }\n\n // Returning the length \n return set.size();\n }",
"public void strComp() {\n\t\tSystem.out.printf(\"total word: %d\", userstring.size());\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < userstring.size() ) {\n\t\t\tif (userstring.get(i++).equalsIgnoreCase(masterString.get(j++))) {\n\t\t\t\t// user said correct word. update the array and total number of\n\t\t\t\t// matches\n\t\t\t\tmatchValues[k] = true;\n\t\t\t\ttotalCorrectMatches++;\n\t\t\t} \n\t\t\tk++;\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter a word:\");\n String word = scan.next();\n System.out.println(\"Enter character:\");\n char character = scan.next().charAt(0);\n\n int count=0; //count frequency of character\n for (int i =0; i<word.length(); i++) {\n char each = word.charAt(i); //each character by given string word\n\n if (each == character) { //if each character in str is matching with ch\n count++; //count increase the frequency of ch by 1\n\n }\n }\n System.out.println(count);\n\n System.out.println(\"===========================\");\n\n\n\n }",
"static long substrCount(int n, String s) {\n ArrayList<Point> points = new ArrayList<>();\n\n char current = s.charAt(0);\n int count = 1;\n\n for (int i = 1; i < s.length(); i++) {\n char ch = s.charAt(i);\n if (current == ch) {\n count++;\n } else {\n points.add(new Point(current, count));\n current = ch;\n count = 1;\n }\n }\n points.add(new Point(current, count));\n\n count = 0;\n if (points.size() > 2) {\n\n count += addup(points.get(0).count);\n\n for (int i = 1; i < points.size() - 1; i++) {\n Point prev = points.get(i - 1);\n Point curr = points.get(i);\n Point next = points.get(i + 1);\n\n\n count += addup(curr.count);\n\n if (prev.ch == next.ch && curr.count == 1) {\n int min = Math.min(prev.count, next.count);\n count += min;\n }\n }\n\n count += addup(points.get(points.size() - 1).count);\n\n } else if (points.size() == 1) {\n Point curr = points.get(0);\n count += addup(curr.count);\n } else if (points.size() == 2) {\n Point prev = points.get(0);\n count += addup(prev.count);\n Point next = points.get(1);\n count += addup(next.count);\n }\n\n\n System.out.println(points);\n\n return count;\n\n }",
"private List<Tuple> charCountMap(Tuple input) {\n \n String[] words = input.snd().replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n for(String word : words) {\n Integer chars = word.length();\n output.add(new Tuple(chars.toString(),\"1\"));\n }\n \n lolligag();\n \n //<charCount, 1>, <charCount, 1> ...\n return output;\n }",
"public ArrayList<Shout> getMatches(Pattern pattern, String text) {\r\n\t\tArrayList<Shout> matches = new ArrayList<Shout>();\r\n\t\tMatcher m = pattern.matcher(text);\r\n//\t\tint match= 0;\r\n\t\twhile(m.find()){\r\n//\t\t\tLog.i(\"FUCKING WORK\", \"a: \" + m.start());\r\n\t\t\tmatches.add(new Shout(Integer.parseInt(m.group(1)), m.group(2), m.group(3)));\r\n//\t\t\tmatch++;\r\n\t\t}\r\n\t\treturn matches;\r\n\t}",
"@Override\n public synchronized Long count(String query) {\n long count = 0L;\n String nQuery = normalizeQuery(query);\n Set<String> keys = suggestIndex.getKeys();\n Map index = suggestIndex.getIndex();\n LinkedHashSet<Long> result = new LinkedHashSet<Long>();\n\n logger.debug(\"IN SEARCH: query={}, keys={}\", query, keys);\n\n StringBuilder patternBuilder;\n List<Pattern> patterns = new ArrayList<Pattern>();\n for (String keyPart : nQuery.split(\" \")) {\n patternBuilder = new StringBuilder(\"^(?iu)\");\n patternBuilder.append(ALLOWED_CHARS_REGEXP);\n keyPart = Normalizer.normalize(keyPart, Normalizer.Form.NFD);\n patternBuilder.append(keyPart)\n .append(ALLOWED_CHARS_REGEXP)\n .append('$');\n patterns.add(Pattern.compile(patternBuilder.toString()));\n }\n\n for (String key : keys) {\n for (Pattern pattern : patterns) {\n\n if (pattern.matcher(key).matches()) {\n result.addAll((LinkedHashSet<Long>) index.get(key));\n count += ((LinkedHashSet<Long>) index.get(key)).size();\n }\n }\n }\n return Long.valueOf(result.size());\n }",
"public static int countWords(final List<String> tokens) {\n\tint nWords = 0;\n\n\tfor (final String token : tokens) {\n\t if (!StringUtils.isComposedOf(token, ALL_DELIMS)) {\n\t\tnWords++;\n\t }\n\t}\n\n\treturn nWords;\n }",
"public int count(String word);",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"int countByZipcodeDesc(String zipcodeCodePattern, String zipcodeDescPattern);",
"@Test\n public void countNumberOfCharactersInWords() {\n final long count = 0; //TODO\n\n assertEquals(105, count);\n }",
"static HashMap runLengthEncoding(List<Character> list){\r\n\t\t\r\n\t\tHashMap<Character,Integer> map=new HashMap<>();\r\n\t\t\r\n\t\tfor(char a:list)\r\n\t\t{\r\n\t\tif(map.get(a)==null)\r\n\t\t{\r\n\t\t\tmap.put(a, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tmap.put(a, map.get(a)+1);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\treturn map;\r\n\t\r\n\t}",
"public static int duplicateCount(String text) {\n \r\n int count=0; \r\n \r\n \r\n \r\n int l=text.length(); int index=0; String s1=\"\"; char [] c= new\r\n char [text.length()] ; for (int i=0;i <text.length();i++) {\r\n c[i]=text.toLowerCase().charAt(index++);\r\n \r\n System.out.println(\"Character at c[\"+i+\"] is\"+c[i]);\r\n \r\n }\r\n \r\n System.out.println(\"Character array is \"+Arrays.toString(c));\r\n \r\n int charSize=c.length; int index2=1;\r\n \r\n HashMap h =new HashMap();\r\n for (int i=0;i<charSize;i++)\r\n {\r\n for(int j=i+1;j<charSize;j++)\r\n {\r\n if (c[i]==c[j])\r\n {\r\n count++;\r\n //s1=s1+c[j];\r\n \r\n h.put(c[j],count);\r\n }\r\n }\r\n }\r\n \r\n \r\n System.out.println(h);\r\n \r\n int hsize= h.size();\r\n \r\n return hsize;\r\n }",
"public static ArrayList<Integer> findAnagrams(String s, String p) {\r\n\t \t \r\n\t \t //write your code here\r\n\t\t if(s.length()<p.length()) {\r\n\t\t\t ArrayList<Integer> arr = new ArrayList<>();\r\n\t\t\t return arr;\r\n\t\t }\r\n\t\t ArrayList<Integer> result = new ArrayList<>();\r\n\t\t HashMap<Character,Integer> P = new HashMap<>();\r\n\t\t HashMap<Character,Integer> H = new HashMap<>();\r\n\t\t \r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = p.charAt(i);\r\n\t\t\t if(!P.containsKey(ch)) {\r\n\t\t\t\t P.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t P.put(ch,P.get(ch)+1);\r\n\t\t\t }\r\n\t\t }\r\n\t\t int start =0;\r\n\t\t int end=0;\r\n\t\t int mcount=0;\r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = s.charAt(i);\r\n\t\t\t if(!H.containsKey(ch)) {\r\n\t\t\t\t H.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t H.put(ch,H.get(ch)+1);\r\n\t\t\t }\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t if(P.get(ch)>=H.get(ch)) {\r\n\t\t\t\t\t mcount++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t end=i;\r\n\t\t }\r\n\t\t if(mcount==p.length()) {\r\n\t\t\t result.add(start);\r\n\t\t }\r\n\t\t while(end<s.length()-1) {\r\n\t\t\t char ch=s.charAt(start);\r\n\t\t\t int hfreq = H.get(ch)-1;\r\n\t\t\t H.put(ch,hfreq);\r\n\t\t\t if(H.get(ch)==0) {\r\n\t\t\t\t H.remove(ch);\r\n\t\t\t }\r\n\t\t\t int pfreq=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreq=P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreq<pfreq) {\r\n\t\t\t\t mcount--;\r\n\t\t\t }\r\n\t\t\t ch=s.charAt(end+1);\r\n\t\t\t int hfreqend=0;\r\n\t\t\t if(H.containsKey(ch)) {\r\n\t\t\t\t hfreqend = H.get(ch);\r\n\t\t\t }\r\n\t\t\t hfreqend++;\r\n\t\t\t H.put(ch, hfreqend);\r\n\t\t\t int pfreqend=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreqend = P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreqend<=pfreqend) {\r\n\t\t\t\t mcount++;\r\n\t\t\t }\r\n\t\t\t start++;\r\n\t\t\t end++;\r\n\t\t\t if(mcount==p.length()) {\r\n\t\t\t\t result.add(start);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t return result;\r\n\t\t \r\n\t \t \r\n\t }",
"public static void main(String[] args) {\r\n\r\n\t\tString pattern = \"pattern\";\r\n\t\tString string = \"String used to search for patterns\";\r\n\t\tint sub = bruteForce(string, pattern);\r\n\t\tif (sub > -1) {\r\n\t\t\tSystem.out.println(\"Pattern found at index \" + sub + \": \" + string.substring(sub, sub + pattern.length()));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(pattern + \" not found in \" + string);\r\n\t\t}\r\n\t\tsub = -1;\r\n\t\tsub = KMPSearch(string, pattern);\r\n\t\tif (sub > -1) {\r\n\t\t\tSystem.out.println(\"Pattern found at index \" + sub + \": \" + string.substring(sub, sub + pattern.length()));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(pattern + \" not found in \\\"\" + string + \"\\\"\");\r\n\t\t}\r\n\t}",
"private int getCount(String token, String content) {\n int index = 0;\n int count = 0;\n// String[] parts = token.split(\"\\\\s+\");\n// int size = parts.length;\n boolean hasPreview = false;\n while ((index = content.indexOf(token, index)) != -1) {\n if (!hasPreview) {\n int end = Math.min(content.length(), index + 200);\n while (end < content.length() && content.charAt(end) != ' ') {\n end++;\n }\n preview = content.substring(index, end);\n hasPreview = true;\n }\n count++;\n index += token.length();\n }\n return count;\n }",
"public static void main(String[] args) {\n\t\tString character = \"fsdkjfklsdjfksdlkjdsfoweiopriewfklsdkfldksaflkdsafldkfsieoirwpoiroewofkdsfksldkf\";\n\t\tMap<Character,Integer> map = new HashMap<Character, Integer>();\n\t\tmap = countChars(character);\n\t\tSortMap(map);\n\t}",
"public int strCount(String str, String sub) {\n//Solution to problem coming soon\n}",
"public static void main(String[] args) {\n\r\n\t\tString str = \"learning automation is fun\";\r\n\t\tstr = str.replace(\" \", \"\");\r\n\t\tchar letters[] = str.toCharArray();\r\n\t\t\r\n\t\tfor(int i = 0;i<letters.length;i++) {\r\n\t\t\tint count = 0;\r\n\t\t\tfor(int j=0;j<letters.length;j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (j<i&&(letters[j]==letters[i])) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(letters[i]==letters[j]) {\r\n\t\t\t\t\tcount++;\r\n\t\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\tif (count>0)\r\n\t\t\tSystem.out.println(\"Occurrence of \"+letters[i]+\" is \"+count);\r\n\t\t}\r\n\t\t\r\n\t}",
"@Test\n\tpublic static void main() {\n\t\tSystem.out.println(Stringcount2(\"reddygaru\"));\n\t}",
"public int countTokens()\n {\n\n int count = 0;\n int currpos = currentPosition;\n\n while (currpos < maxPosition)\n {\n int start = currpos;\n\n while ((currpos < maxPosition)\n && Character.isLetterOrDigit(str.charAt(currpos)))\n {\n currpos++;\n }\n\n if ((start == currpos)\n && (Character.isLetterOrDigit(str.charAt(currpos)) == false))\n {\n currpos++;\n }\n\n count++;\n }\n\n return count;\n }",
"private void RecalculateCharDistribution() {\r\n\t\tMap<Character, Integer> temp = new HashMap<>();\r\n\t\tfor (String s : sameWordLength) {\r\n\t\t\tfor (int i = 0; i < s.length(); i++) {\r\n\r\n\t\t\t\tchar ch = s.charAt(i);\r\n\t\t\t\tif (guessedCharacter.contains(ch)) {\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!temp.containsKey(ch)) {\r\n\t\t\t\t\t\ttemp.put(ch, 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint t = temp.get(ch) + 1;\r\n\t\t\t\t\t\ttemp.put(ch, t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcharCount = temp;\r\n\r\n\t}",
"@Test\n public void charCount() {\n final int expectedEight = 8;\n final int expectedFour = 4;\n\n CharCount charCounter = new CharCount();\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'z'));\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'Z'));\n assertEquals(expectedFour, charCounter.characterCounter(\"FIZZBUZZ\", 'z'));\n assertEquals(0, charCounter.characterCounter(\"TEdff fdjfj 223\", '1'));\n assertEquals(expectedFour, charCounter.characterCounter(\"TE00df0f f0djfj 223\", '0'));\n assertEquals(0, charCounter.characterCounter(\"RRuyt 111000AAdda\", (char) 0));\n }",
"public long getNumberOfPatternOccurrences() {\n if(!hasFinished()) {\n throw new IllegalArgumentException(\"the recompression is not jet ready.\");\n }\n\n S terminal = slp.get(getPattern().getLeft(), 1);\n return getPatternOccurrence(terminal).get(getText());\n }",
"static int[] calculateMaxMatchLengths(String pattern) {\n //initiate PMT\n int[] pmt = new int[pattern.length()];\n int maxMatched = 0;\n //loop in the whole string for pattern\n for (int i = 1;i<pattern.length();i++){\n //when not matched, return to last match position\n while(maxMatched > 0 && pattern.charAt(maxMatched) != pattern.charAt(i)){\n maxMatched = pmt[maxMatched -1];\n }\n //when match, maxMatch ++\n if(pattern.charAt(i)==pattern.charAt(maxMatched)){\n maxMatched++;\n }\n //record the maxMatch at separete index\n pmt[i]=maxMatched;\n }\n return pmt;\n }",
"public int search(char[] text) {\n int M = pattern.length;\n int N = text.length;\n int skip;\n for (int i = 0; i <= N - M; i += skip) {\n skip = 0;\n for (int j = M-1; j >= 0; j--) {\n if (pattern[j] != text[i+j]) {\n skip = Math.max(1, j - right[text[i+j]]);\n break;\n }\n }\n if (skip == 0) return i; // found\n }\n return N; // not found\n }",
"public static void main(String [] args) {\n\t\tString str = \"ccacacabccacabaaaabbcbccbabcbbcaccabaababcbcacabcabacbbbccccabcbcabbaaaaabacbcbbbcababaabcbbaa\"\n\t\t\t\t+ \"ababababbabcaabcaacacbbaccbbabbcbbcbacbacabaaaaccacbaabccabbacabaabaaaabbccbaaaab\"\n\t\t\t\t+ \"acabcacbbabbacbcbccbbbaaabaaacaabacccaacbcccaacbbcaabcbbccbccacbbcbcaaabbaababacccbaca\"\n\t\t\t\t+ \"cbcbcbbccaacbbacbcbaaaacaccbcaaacbbcbbabaaacbaccaccbbabbcccbcbcbcbcabbccbacccbacabcaacbcac\"\n\t\t\t\t+ \"cabbacbbccccaabbacccaacbbbacbccbcaaaaaabaacaaabccbbcccaacbacbccaaacaacaaaacbbaaccacbcbaaaccaab\"\n\t\t\t\t+ \"cbccacaaccccacaacbcacccbcababcabacaabbcacccbacbbaaaccabbabaaccabbcbbcaabbcabaacabacbcabbaaabccab\"\n\t\t\t\t+ \"cacbcbabcbccbabcabbbcbacaaacaabb\"\n\t\t\t\t+ \"babbaacbbacaccccabbabcbcabababbcbaaacbaacbacacbabbcacccbccbbbcbcabcabbbcaabbaccccabaa\"\n\t\t\t\t+ \"bbcbcccabaacccccaaacbbbcbcacacbabaccccbcbabacaaaabcccaaccacbcbbcccaacccbbcaaaccccaabacabc\"\n\t\t\t\t+ \"abbccaababbcabccbcaccccbaaabbbcbabaccacaabcabcbacaccbaccbbaabccbbbccaccabccbabbbccbaabcaab\"\n\t\t\t\t+ \"cabcbbabccbaaccabaacbbaaaabcbcabaacacbcaabbaaabaaccacbaacababcbacbaacacccacaacbacbbaacbcbbbabc\"\n\t\t\t\t+ \"cbababcbcccbccbcacccbababbcacaaaaacbabcabcacaccabaabcaaaacacbccccaaccbcbccaccacbcaaaba\";\n\t\tSystem.out.println(substrCount2(1017, str));\n\t}",
"public static int commonCharacterCount(String s1, String s2) {\n\t int count = 0;\n\t int auxArray[] = new int[s2.length()];\n\t for (int i = 0; i < auxArray.length; i++){\n\t\tauxArray[i] = 0;\n\t }\n\t \n\t for(int i = 0; i < s1.length(); i++){\n\t\tfor(int j = 0; j < s2.length(); j++){\n\t\t if( auxArray[j] == 1){\n\t\t continue;\n\t\t }\n\t\t else{\n\t\t if(s1.charAt(i) == s2.charAt(j)){\n\t\t auxArray[j] = 1;\n\t\t count += 1;\n\t\t break;\n\t\t }\n\t\t }\n\t\t}\n\t }\n\t return count;\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] tokens = scanner.nextLine().split(\"\\\\s\");\n String search = scanner.nextLine().trim();\n System.out.println(Collections.frequency(List.of(tokens), search));\n }",
"public String mostCommonWord(String[] tweets) {\n int big = -100000;\n String mostCommon = null;\n for (String tweet : tweets) {// = for(int i = 0 ; i<tweets.length;i++) { String tweet = tweets[i] }\n for (String word : tweet.split(\" \")) {\n int amt = 0;\n for (String tweet2 : tweets)\n for (String word2 : tweet2.split(\" \"))\n if (word2.equals(word))\n amt++;\n if (amt > big) {\n big = amt;\n mostCommon = word;\n }\n }\n }\n return mostCommon;\n}",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"public static void sortStringsNumAs( ArrayList<String> lst )\n {\n PredicateStringPair p = (a, b) -> {\n String[] A = a.split(\"\");\n String[] B = b.split(\"\");\n int acount = 0;\n int bcount = 0;\n for (String i : A){\n if (i == \"a\" || i == \"A\"){\n acount += 1;\n }\n }\n for (String i : B){\n if (i == \"a\" || i == \"A\"){\n bcount += 1;\n }\n }\n\n if (acount > bcount) return true;\n else return false;\n };\n sortStrings(lst, p);\n \n }",
"public int numMatches();",
"public static void main(String[] args){\n String str = \"aasdfasdfasdfasdfas\";\n String pattern = \"aasdf.*asdf.*asdf.*asdf.*s\";\n// String str = \"mississippi\";\n// String pattern = \"mis*is*ip*.\";\n// String pattern = \"mis*is*p*.\";\n// String pattern = \"mis*is*ip*.\";\n// String str = \"aaaaaaaaaaaaac\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*c\";\n long time = System.currentTimeMillis();\n// String str = \"aaaaaaaaaaaaab\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*b\";\n System.out.println(find(str,pattern));\n System.out.println(\"time: \" + (System.currentTimeMillis() - time));\n }",
"public static List<String> findAndReplacePattern(String[] words, String pattern) {\n List<String> answer = new ArrayList<>();\n HashMap<Character, Integer> patternHashMap = new HashMap<>();\n List<Integer> patternAsInteger = new ArrayList<>();\n\n for (int i = 0; i < pattern.length(); i++) {\n Character x = pattern.charAt(i);\n if(!patternHashMap.containsKey(x)) {\n patternHashMap.put(x, patternHashMap.size()+1);\n }\n patternAsInteger.add(patternHashMap.get(x));\n }\n\n\n\n for(String word : words){\n HashMap<Character, Integer> wordHashMap = new HashMap<>();\n List<Integer> wordAsInteger = new ArrayList<>();\n for(int i = 0; i < word.length(); i++){\n Character x = word.charAt(i);\n if(!wordHashMap.containsKey(x)) {\n wordHashMap.put(x, wordHashMap.size()+1);\n }\n wordAsInteger.add(wordHashMap.get(x));\n }\n if(wordAsInteger.equals(patternAsInteger))\n answer.add(word);\n }\n\n\n return answer;\n }",
"public static void main(String[] args) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"A201550B\");\n\t\tlist.add(\"ABB19991000Z\");\n\t\tlist.add(\"XYZ200019Z\");\n\t\tlist.add(\"ERF200220\");\n\t\tlist.add(\"SCD203010T\");\n\t\t//list.add(\"abC200010E\");\n\t\t//countFakes(list);\n\t\tSystem.out.println(countFakes(list));\n\n\t}",
"StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }",
"@Test\r\n public void test5() {\r\n String[] words = new String[] {\r\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"F\", \"B\", \"H\", \"I\", \"J\", \"K\"\r\n };\r\n \r\n Assert.assertEquals(shortestDistanceBetween(words, \"B\", \"F\"), 1);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"A\", \"E\"), 4);\r\n Assert.assertEquals(shortestDistanceBetween(words, \"I\", \"A\"), 9);\r\n }",
"public static void main(String[] args) {\n//\n// String pattern = \"abba\";\n// String s = \"dog cat cat fish\";\n\n\n// String pattern = \"aaaa\";\n// String s = \"dog cat cat dog\";\n\n String pattern = \"abba\";\n String s = \"dog dog dog dog\";\n\n// String pattern = \"e\";\n// String s = \"eukera\";\n\n boolean flag = wordPattern(pattern, s);\n\n System.out.println(flag);\n }",
"private int getContentLengthPerThread(int numberOfThreads,\n\t\t\tList<String> inputWordsList) {\n\t\tint contentLengthPerThread = 0;\n\t\tif (numberOfThreads == 0) {\n\t\t\tcontentLengthPerThread = 1;\n\t\t\tnumberOfThreads = 1;\n\t\t} else {\n\t\t\tcontentLengthPerThread = inputWordsList.size() / numberOfThreads;\n\t\t}\n\t\tif (contentLengthPerThread == 0) {\n\t\t\tcontentLengthPerThread = inputWordsList.size();\n\t\t}\n\t\treturn contentLengthPerThread;\n\t}",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"public int countByTodoText(String todoText);"
] |
[
"0.71703166",
"0.70636773",
"0.69060814",
"0.6843461",
"0.63700926",
"0.59935635",
"0.5889226",
"0.588771",
"0.56987745",
"0.56978726",
"0.56641513",
"0.5631968",
"0.5626956",
"0.5613795",
"0.56085926",
"0.55682826",
"0.5536186",
"0.5510514",
"0.55062044",
"0.5505006",
"0.5485385",
"0.5459566",
"0.5447612",
"0.5444048",
"0.54376996",
"0.5433207",
"0.5429475",
"0.542839",
"0.5427311",
"0.5423641",
"0.5422819",
"0.5410212",
"0.54010147",
"0.53987503",
"0.53943056",
"0.5393189",
"0.5383267",
"0.5374903",
"0.5329033",
"0.53012025",
"0.52983415",
"0.52935183",
"0.5289329",
"0.52888644",
"0.5232804",
"0.52274173",
"0.52245504",
"0.52215266",
"0.5207447",
"0.52070546",
"0.5201246",
"0.51987416",
"0.5198288",
"0.5197263",
"0.5182318",
"0.5174266",
"0.51657367",
"0.5146687",
"0.5138816",
"0.51371217",
"0.51369864",
"0.51364034",
"0.5124013",
"0.5108759",
"0.5108472",
"0.50957865",
"0.5093397",
"0.5093075",
"0.5091898",
"0.5090982",
"0.50773674",
"0.5073395",
"0.506738",
"0.5066016",
"0.506273",
"0.50623256",
"0.5060346",
"0.50541806",
"0.5046248",
"0.5039506",
"0.50387233",
"0.50347173",
"0.5022207",
"0.50198996",
"0.5015621",
"0.5013157",
"0.50123024",
"0.5008143",
"0.50055355",
"0.5005436",
"0.5003551",
"0.5003089",
"0.50015265",
"0.49986023",
"0.4994392",
"0.49856907",
"0.49835894",
"0.49833083",
"0.49558052",
"0.49548"
] |
0.7591383
|
0
|
TODO Employs the naive string matching algorithm to add all tweets containing the given pattern to the provided list. Returns the total number of character comparisons performed.
|
public int searchTweetsNaive(String pattern, List<String> ans) {
int compCost = 0;
Assoc<Integer, Integer> holder;
for(String tweet : tweets) {
holder = StringMatch.matchNaive(pattern.toLowerCase(), tweet.toLowerCase());
compCost += holder.value;
if(holder.key != -1)
ans.add(tweet);
}
return compCost;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static long count (List<String> lst, String pattern) {\n\t\t\n\t\tlong cpt = 0;\n\t\tfor(String st : lst) {\n\t\t\tif(st.equals(pattern)) {\n\t\t\t//if(st.contains(pattern)) {\n\t\t\t\tcpt++;\n\t\t\t}\n\t\t}\n\t\treturn cpt;\n\t\n\t}",
"public static long count2(List<String> lst, String pattern) {\n\n\t\t return lst.stream()\n\t\t\t\t \n\t\t.filter(x -> x.equals(pattern))\n\t\t.count();\n\t\t\n\t}",
"public int searchTweetsKMP(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n int[] flinks = new int[pattern.length() + 1];\n int flinkcost = StringMatch.buildKMP(pattern, flinks);\n compCost = flinkcost;\n\n for(String tweet : tweets) {\n\n //holder = StringMatch.matchKMP(pattern, tweet);\n holder = StringMatch.matchKMP(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value - flinkcost;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n }",
"public int searchTweetsBoyerMoore(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchBoyerMoore(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n\n }",
"private static int matchFunction(Scanner inputStream, List<Character> text, List<Character> pattern) {\n\n int countPattern = 0;//Keeps track of the successful occurrences.\n\n while (inputStream.hasNext()) { //checks for every new line of the text file.\n\n String[] line = inputStream.nextLine().split(\" \"); //Splits the line into tokens.\n\n\n for(String word: line){\n //For every token analyzed, turn every token into an array of characters and store it in the list.\n for(int i =0 ; i < word.length(); i++){\n text.add(word.charAt(i));\n }//end for\n\n int result = findBrute(text, pattern); //returns the index where the substring is found.\n\n if (result != -1) { //if it returns anything but -1, substring was found in the token.\n countPattern++; //increment for every matching substring found.\n }//end if\n\n text.clear(); //clears the token from the list. loops back again for the next token.\n }//end for\n\n }//end while\n inputStream.close(); //closes input stream.\n return countPattern;\n }",
"public int countAllStringAppearances(List<String> stringsToCheck, String stringToContain) {\n int counter = 0;\n Pattern patternToMatch = Pattern.compile(stringToContain.toLowerCase());\n for (String currentString : stringsToCheck) {\n Matcher matcher = patternToMatch.matcher(currentString.toLowerCase());\n while (matcher.find()) {\n counter ++;\n }\n }\n return counter;\n }",
"public int selectWordTokens (String [] list1, int count1, String [] list2){\n \n int count = 0;\n \n //Runs through each value of list1 grabs the values that align with \"[A-Za-z]+\" and assigns them to list2\n for (int i = 0; i < count1 ; i++){\n if (list1[i].matches(\"[A-Za-z]+\")){\n String Str = list1[i]; \n list2[count]= Str; \n count++;\n }//End if statement\n }//End for loop\n \n return count;\n \n }",
"public int countOccurencesOf(String text, String target) {\n if(text.length() > target.length()) return 0;\n\n int numberOfCompares = target.length() - text.length() + 1;\n int count = 0;\n\n for(int i = 0; i < numberOfCompares; i++) {\n String sub = target.substring(i, i + text.length());\n if(text.equals(sub)) count++;\n }\n\n return count;\n }",
"public static void main(String... args) {\n String handle = \"realDonaldTrump\", pattern = \"mexico\";\n System.out.println(\"Starting\");\n MatchBot bot = new MatchBot(handle, 2000);\n System.out.println(\"made bot\");\n // search all tweets for the pattern\n List<String> ansNaive = new DoublyLinkedList<>();\n System.out.println(\"naive start\");\n\n // test 1\n int compsNaive = bot.searchTweetsNaive(pattern, ansNaive); \n\n List<String> ansKMP = new DoublyLinkedList<>();\n System.out.println(\"kmp start\");\n int compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n\n List<String> ansBM = new DoublyLinkedList<>();\n System.out.println(\"Boyer - Moore start\");\n int compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n\n \n System.out.println(\"*** Donald test (normal size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n /*for (int i = 0; i < ansKMP.size(); i++) {\n String tweet = ansKMP.get(i);\n assert tweet.equals(ansNaive.get(i));\n System.out.println(i++ + \". \" + tweet);\n System.out.println(pattern + \" appears at index \" + \n tweet.toLowerCase().indexOf(pattern.toLowerCase()));\n }*/\n\n // test 2\n handle = \"cnnbrk\";\n pattern = \"syria\";\n bot = new MatchBot(handle, 2000);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** CNN breaking news (normal size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n\n //test 3\n handle = \"realDonaldTrump\";\n pattern = \"mexico\";\n bot = new MatchBot(handle, 250);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** Donald test (small size): **: ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n\n // test 4\n handle = \"cnnbrk\";\n pattern = \"syria\";\n bot = new MatchBot(handle, 250);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** CNN breaking news (small size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n\n // test 5\n handle = \"cnnbrk\";\n pattern = \"syria\";\n bot = new MatchBot(handle, 4000);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** CNN breaking news (large size): ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n // test 6\n handle = \"realDonaldTrump\";\n pattern = \"mexico\";\n bot = new MatchBot(handle, 4000);\n compsNaive = bot.searchTweetsNaive(pattern, ansNaive);\n compsKMP = bot.searchTweetsKMP(pattern, ansKMP);\n compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);\n\n System.out.println(\"*** Donald test (large size): **: ***naive comps = \" + compsNaive +\n \", KMP comps = \" + compsKMP + \", Boyer-Moore comps = \" + compsBM);\n\n }",
"private void updateCommon(List<Status> tweetsList) {\r\n numberOfTweets += tweetsList.size();\r\n \r\n tweetsList.stream().forEach(tweet -> {\r\n final HashtagEntity[] hashtags = tweet.getHashtagEntities();\r\n for (HashtagEntity hashtag : hashtags) {\r\n final String text = hashtag.getText().toLowerCase();\r\n if (!countHashtags.containsKey(text)) {\r\n countHashtags.put(text, 0);\r\n }\r\n countHashtags.put(text, countHashtags.get(text) + 1);\r\n }\r\n \r\n final String[] words = tweet.getText().split(\" \");\r\n for (String word : words) {\r\n word = word.toLowerCase();\r\n if (!wordsFilter.contains(word)) {\r\n if (!countWords.containsKey(word)) {\r\n countWords.put(word, 0);\r\n }\r\n countWords.put(word, countWords.get(word) + 1);\r\n }\r\n }\r\n \r\n final String location = tweet.getUser().getLocation();\r\n if (!countLocation.containsKey(location)) {\r\n countLocation.put(location, 0);\r\n }\r\n countLocation.put(location, countLocation.get(location) + 1);\r\n });\r\n }",
"@Override\n public void run() {\n long beginTime = System.currentTimeMillis();\n String[] words = text.split(\" \");\n long endTime = System.currentTimeMillis();\n System.out.printf(\"Regex time: %d;\\n\", endTime - beginTime);\n int count = 0;\n beginTime = System.currentTimeMillis();\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n if (c == ' ' || c == '.' || c == '!' || c == '?') {\n count++;\n }\n }\n endTime = System.currentTimeMillis();\n System.out.printf(\"For time: %d;\\n\", endTime - beginTime);\n System.out.printf(\"Words: %d;\\n\", words.length);\n System.out.printf(\"Count word: %d;\\n\", count);\n }",
"public static int stringMatch(String text, String pattern) {\n char[] t = text.toLowerCase().toCharArray();\n char[] p = pattern.toLowerCase().toCharArray();\n int n = t.length;\n int m = p.length;\n int i = m - 1; // index the right end of pattern/text alignment\n int comp = 0; //number of comparisons done\n\n Hashtable<Character, Integer> table = shiftTable(p, t);\n\n //catches empty string error and pattern.length > text.length error\n if (text.isEmpty() || pattern.isEmpty() || m > n) {\n System.out.println(\"-------Warning------\\nInputs are either empty or wrong lengths\");\n return -1;\n }\n\n while (i <= n - 1) {\n System.out.println(\"Right Most Position = \" + i + \"\\n\" + text + \"\\n\" + pattern);\n int k = 0; // k is how many chars have matched\n comp++;\n\n while (k <= m - 1 && p[m - 1 - k] == t[i - k]) {\n k += 1;\n }\n if (k == m) {\n System.out.println(\"Pattern Found!\\nNumber of Comparisons: \" + comp);\n return i - m + 1;\n } else {\n String spaces = spaces(table.get(t[i]));\n pattern = spaces + pattern;\n i = i + table.get(t[i]); // shift according to rightmost char\n }\n }\n System.out.println(\"No Match Found\");\n return -1; // if get here, no matches anywhere\n }",
"private int getNumMatches(String word1, String word2) {\n int count = 0;\n for (int i = 0; i < word1.length(); i++) {\n if (word1.charAt(i) == word2.charAt(i)) {\n count++;\n }\n }\n \n return count;\n }",
"public List<String> match(List<String> someList)\n {\n char[] objectWord = this.aWord.toCharArray();\n Arrays.sort(objectWord);\n\n List<String> answer = new ArrayList<>();\n HashMap<String, Integer> mapForEachWord = new HashMap<>();\n\n for (int i = 0; i < someList.size(); i++)\n {\n String wordFromList = someList.get(i).toLowerCase();\n //mapForEachWord = processWord(wordFromList);\n\n char[] listWordArray = wordFromList.toCharArray();\n Arrays.sort(listWordArray);\n\n if (Arrays.equals(listWordArray, objectWord) && !this.aWord.equals(wordFromList))\n {\n answer.add(someList.get(i));\n }\n\n }\n\n return answer;\n }",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int T = scan.nextInt();\n scan.nextLine();\n for(int i = 0 ; i < T ; i++){\n int count = 0;\n String text = scan.nextLine();\n char[] letters = text.toCharArray();\n\n if(letters.length > 0){\n char character = letters[0];\n\n for(int j = 1 ; j < letters.length ; j++){\n\n if(character == letters[j]){\n count++;\n }else{\n character = letters[j];\n }\n }\n }\n System.out.println(count);\n }\n scan.close();\n }",
"@Override\n protected Integer count() {\n Matcher matcher = UPPER.matcher(this.password);\n Integer score = 0;\n\n while (matcher.find()) {\n score++;\n }\n\n return score;\n }",
"public boolean count()\n {\n if(!textReaderWriter.initTextReader(fileName))\n return false;\n\n while(textReaderWriter.hasNextString()) {\n String temp = textReaderWriter.readOneString();\n String[] wordsTable = temp.split(\" \");\n for (int i = 0; i < wordsTable.length; i ++) // go throw words in a 1 line\n {\n for (StringPattern stringPattern : stringPatternList) { // go throw patterns\n if(containsPattern(stringPattern.getPattern(), wordsTable[i]))\n {\n stringPattern.incrementCountWords();\n }\n }\n }\n }\n return true;\n }",
"static int countCharacters2(String[] words, String chars) {\n int count = 0;\n int[] seen = new int[26];\n //Count char of Chars String\n for (char c : chars.toCharArray())\n seen[c - 'a']++;\n // Comparing each word in words\n for (String word : words) {\n // simple making copy of seen arr\n int[] tSeen = Arrays.copyOf(seen, seen.length);\n int Tcount = 0;\n for (char c : word.toCharArray()) {\n if (tSeen[c - 'a'] > 0) {\n tSeen[c - 'a']--;\n Tcount++;\n }\n }\n if (Tcount == word.length())\n count += Tcount;\n }\n return count;\n }",
"static int countOccurrences(String str, String word) \r\n\t\t{\n\t\t String a[] = str.split(\" \");\r\n\t\t \r\n\t\t // search for pattern in a\r\n\t\t int count = 0;\r\n\t\t for (int i = 0; i < a.length; i++) \r\n\t\t {\r\n\t\t // if match found increase count\r\n\t\t if (word.equals(a[i]))\r\n\t\t count++;\r\n\t\t }\r\n\t\t \r\n\t\t return count;\r\n\t\t}",
"private TreeMap<String, Integer> getWordsCount(TreeMap<String, ArrayList<String>> wordFamilies, ArrayList<String> allPatterns) {\r\n \t// get all the patterns first\r\n \tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\twordFamilies.put(allPatterns.get(i), new ArrayList<String>());\r\n \t}\r\n \t// add the words into each pattern\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\t\tif (s.equals(allPatterns.get(i))) {\r\n \t\t\t\tArrayList<String> curr = wordFamilies.get(s);\r\n \t\t\t\tcurr.add(this.activeWords.get(i));\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t// get the number of words in each pattern\r\n \tTreeMap<String, Integer> results = new TreeMap<String, Integer>();\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tresults.put(s, wordFamilies.get(s).size());\r\n \t}\r\n \treturn results;\r\n }",
"public List<Integer> matchingStrings(List<String> strings, List<String> queries) {\n Map<String, Integer> wordsCount = new HashMap<>();\n for (String string : strings) {\n Integer count = wordsCount.get(string);\n if (count == null) {\n count = 0;\n }\n count++;\n wordsCount.put(string, count);\n }\n List<Integer> result = new ArrayList<>();\n for (String query : queries) {\n Integer count = wordsCount.get(query);\n if (count == null) {\n count = 0;\n }\n result.add(count);\n }\n\n return result;\n\n }",
"public static void main(String[] args)\n{\n\tString str=\"like like rcb\";\n String[] Spl = str.split(\" \");\n\tint count=0;\n\tfor(int i=0;i<Spl.length;i++)\n\t{\n\t\tif(Spl[i].equals(\"like\"))\n\t\t{\n\t\tcount++;\n\t\t}\n\t}\n\tSystem.out.println(\"number of like present in given String are \"+count);\n}",
"static int chars(List<String> strings) {\n\t\tint sum=0;\n\t\t//using loop\n//\t\tfor(String str : strings) {\n//\t\t\tsum+=str.length();\n//\t\t}\n\t\t//using iterator\n\t\tfor(Iterator<String> iterator=strings.iterator();iterator.hasNext();)\n\t\t\tsum+=iterator.next().length();\n\t\treturn sum;\n\t}",
"private static int search() {\n\t\tint index = -1;\n\t\tdouble txtRollingHash = 0;\n\t\tfor (int i = 0; i < textLength - (patternLength - 1); i++) {\n\t\t\tif (i == 0) {\n\t\t\t\ttxtRollingHash = calculateHash(text, patternLength);\n\t\t\t} else {\n\t\t\t\t// Remove previous char and add current char\n\t\t\t\ttxtRollingHash = calculateHash(text, textLength, i - 1, i + (patternLength - 1), txtRollingHash);\n\t\t\t}\n\t\t\tlogger.info(\"At index: \" + i + \"\\t\\tRolling Hash:\" + txtRollingHash + \"\\t\\tPattern Hash: \" + patternHash);\n\t\t\tif (patternHash == txtRollingHash && compare(text, i)) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}",
"private static int findBrute(List<Character> text, List<Character> pattern) {\n int n = text.size();\n int m = pattern.size();\n for (int i = 0; i <= n - m; i++) { //try every starting index within text.\n int k = 0; // k is index into pattern\n while (k < m && text.get(i + k) == pattern.get(k))\n // kth character of pattern matches\n k++;\n if (k == m) // if we reach the end of the pattern,\n return i; // substring text[i..i+m-1] is a match\n } //end for\n return -1;// search failed\n }",
"public int numMatches() {\n int count = 0;\n for (WordPair pair : allPairs) {\n if (pair.getFirst() == pair.getSecond())\n count++;\n }\n return count;\n }",
"private static int matchValue(TrieNode existing, TrieNode toAdd, String[] allWords){\n\t\tSystem.out.println(allWords[existing.substr.wordIndex]);\n\t\tSystem.out.println(allWords[toAdd.substr.wordIndex]);\n\n\t\tString first=allWords[existing.substr.wordIndex].substring(existing.substr.startIndex,existing.substr.endIndex+1);\n\t\tString second=allWords[toAdd.substr.wordIndex].substring(toAdd.substr.startIndex,toAdd.substr.endIndex+1);\n\t\tSystem.out.println(\"Compare: \"+first+ \"\\twith\" +\"\\t\"+ second);\n\t\t\n\t\tint count=1;\n\t\tint matchValue=0;\n\t/*\tif(first.charAt(0)!=second.charAt(0)){\n\t\t\treturn 0;\n\t\t}*/\n\t\t\n\t\t//System.out.println(\"From: \"+ existing.substr.startIndex+\" To: \"+existing.substr.endIndex);\n\t\tif(first.length()<=second.length()){\n\t\t\tint imax=(short)(existing.substr.endIndex-existing.substr.startIndex+1);\n\t\tfor(int i=0;i<imax;i++){\n\t\t\t\n\t\t\t//System.out.println(\"UM WE RUN COUNT: \" );\n\t\t\tif(first.charAt(i)==second.charAt(i)){\n\t\t\t\tmatchValue++;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(first.charAt(i)!=second.charAt(i)){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t}\n\t\telse{\n\t\t\tint imax=(short)(toAdd.substr.endIndex-toAdd.substr.startIndex+1);\n\t\t\tfor(int i=0;i<imax;i++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(first.charAt(i)==second.charAt(i)){\n\t\t\t\t\tmatchValue++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(first.charAt(i)!=second.charAt(i)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t}\t\n\t\t}\n\t\treturn matchValue;\n\t}",
"private Tuple charCountReduce(List<Tuple> input) {\n String chars = input.get(0).fst();\n Integer count = input.size();\n \n // output <charCount, # of words with that charCount>\n return new Tuple(chars, count.toString());\n }",
"public static void main(String[] args) {\n ArrayList<Character> actual=new ArrayList<>();\n actual.add('R');\n actual.add('G');\n actual.add('B');\n actual.add('Y');\n ArrayList<Character> guess=new ArrayList<>();\n guess.add('G');\n guess.add('G');\n guess.add('R');\n guess.add('R');\n ArrayList<Character> hitLists=new ArrayList<>();\n ArrayList<Character> pseudoLists=new ArrayList<>();\n int hits=0;\n int pseudoHits=0;\n for(int i=0;i<4;i++)\n {\n \t if(actual.get(i)==guess.get(i))\n \t {\n \t\t hits++;\n \t\t hitLists.add(actual.get(i));\n \t }\n }\n for(int i=0;i<4;i++)\n {\n \t char g=guess.get(i);\n \t if(g!=actual.get(i)&&!hitLists.contains(g)&&actual.contains(g))\n { \n\t pseudoLists.add(g);\n }\n }\n for(int i=0;i<pseudoLists.size();i++)\n { char g=pseudoLists.get(i);\n \t int actualOccs=numOccurences(g,actual);\n \t int guessOccs=numOccurences(g,guess);\n \t \n\t\tif(guessOccs==actualOccs)\n \t {\n \t\t pseudoHits++; \n \t }\n\t\telse{\n\t\t\tpseudoHits+=Math.min(guessOccs,actualOccs);\n\t\t}\t \n System.out.println(g);\n }\n \n \n System.out.println(hits+\" hits \"+pseudoHits+\" pseudoHits\");\n\t}",
"public int search(String text){\r\n\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\tchar[] textChar = text.toCharArray();\r\n\t\tchar[] patternChar = pattern.toCharArray();\r\n\r\n\t\tboolean found = false;\r\n\r\n\t\tlong textLength = text.length();\r\n\t\tlong patternLength = patternChar.length;\r\n\t\t\r\n\t\tif(patternLength == 0) { \r\n\t\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\tlastSearchTime = endTime - startTime; \r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i<=textLength-patternLength;i++){\r\n\t\t\tif(inspect(textChar,i) == inspect(patternChar, 0)){\r\n\t\t\t\tfound = true;\r\n\t\t\t\tfor (int j = 0; j < patternLength; j++) {\r\n\t\t\t\t\tif(inspect(textChar , i+j) != inspect (patternChar, j)){\r\n\t\t\t\t\t\tfound = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(found){\r\n\t\t\t\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\t\t\tlastSearchTime = endTime - startTime;\r\n//\t\t\t\t\tSystem.out.println(\"Found : Total time in ms(Brute Force): \"+(endTime-startTime));\r\n//\t\t\t\t\tSystem.out.println(\"Total Inspection Times: \" + counter);\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tlong endTime = System.currentTimeMillis();\r\n\t\tlastSearchTime = endTime - startTime;\r\n//\t\tSystem.out.println(\"Not Found : Total time in ms: \"+(endTime-startTime));\r\n//\t\tSystem.out.println(\"Total Inspection Times: \" + counter);\r\n\t\treturn -1;\r\n\t}",
"public void doCount(ArrayList<String> liste){\n\t\tint j;\n\t\t\n\t\tfor (int i = 0; i < liste.size(); i++) {\n\t\t\t// check if string already exists\n\t\t\tif(!map.containsKey(liste.get(i))){\n\t\t\t\t// check frequency of the given string\n\t\t\t\tj = Collections.frequency(liste, liste.get(i));\t\n\t\t\t\t\n\t\t\t\t// underscore instead of blank space\n\t\t\t\tif(liste.get(i).equals(\" \"))\n\t\t\t\t\tmap.put(\"_\", j);\t\n\t\t\t\telse\n\t\t\t\t\tmap.put(liste.get(i), j);\t// (char, frequency)\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n\t\t//return map;\n\t}",
"public static void main(String[] args) {\n\t\tString original=\"Java is Programming Language Java asdf Java ghjhfj\";\r\n\t\tString occurence=\"Java\";\r\n\t\t\r\n\t\tint count=0;\r\n\t\tint fromIndex=0;\r\n\t\t\r\n\t\twhile ((fromIndex = original.indexOf(occurence, fromIndex)) != -1 )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Fount at index: \"+fromIndex);\r\n\t\t\tcount++;\r\n\t\t\tfromIndex++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Total number of occurence of Java: \"+count);\r\n\t}",
"@Test\n public void countNumberOfCharactersInWords() {\n final long count = 0; //TODO\n\n assertEquals(105, count);\n }",
"@Test\r\n\tvoid testWordLengthsTallyHandout() {\n\t\tString input[] = Main.TEXT_LIST;\r\n\t\tint expected[] = {0, 9, 25, 42, 43, 26, 13, 11, 4, 2, 3, 1 };\r\n\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.wordLengthsTally(input) );\r\n\r\n\t}",
"public static ResultModel search(String text, String pattern) {\n long startTime = System.nanoTime();\n ResultModel Result = new ResultModel();\n String positionText = \"\";\n int Count = 0;\n // Write your code here\n int M = pattern.length(); \n int N = text.length(); \n int i, j; \n int p = 0; // hash value for pattern \n int t = 0; // hash value for txt \n int h = 1; \n \n // The value of h would be \"pow(d, M-1)%q\" \n for (i = 0; i < M-1; i++) {\n h = (h*d)%q; \n }\n // Calculate the hash value of pattern and first \n // window of text \n for (i = 0; i < M; i++) \n { \n p = (d*p + pattern.charAt(i))%q; \n t = (d*t + text.charAt(i))%q; \n\n\n } \n \n \n // Slide the pattern over text one by one \n for (i = 0; i <= N - M; i++) \n { \n \n // Check the hash values of current window of text \n // and pattern. If the hash values match then only \n // check for characters on by one \n if ( p == t ) \n { \n /* Check for characters one by one */\n for (j = 0; j < M; j++) \n { \n if (text.charAt(i+j) != pattern.charAt(j)) \n break; \n } \n \n // if p == t and pat[0...M-1] = txt[i, i+1, ...i+M-1] \n if (j == M) { \n \tCount ++;\n\t // return i\n\t if(positionText == \"\") {\n\t positionText += (i+ 1) + \"th\";\n\t }else {\n\t positionText = positionText + \", \" + (i+1) + \"th\";\n\t }\n }\n } \n \n // Calculate hash value for next window of text: Remove \n // leading digit, add trailing digit \n if ( i < N-M ) \n { \n\n t = (d*(t - text.charAt(i)*h) + text.charAt(i+M))%q; \n \n // We might get negative value of t, converting it \n // to positive \n if (t < 0) {\n\n t = (t + q); \n }\n \n } \n \n } \n\n //End of code\n\n long endTime = System.nanoTime();\n long totalTime = endTime - startTime;\n\n Result.setExecutionTime(TimeUnit.NANOSECONDS.toMillis(totalTime));\n Result.setFoundCount(Count);\n Result.setPosition(positionText);\n return Result;\n }",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public ArrayList<Shout> getMatches(Pattern pattern, String text) {\r\n\t\tArrayList<Shout> matches = new ArrayList<Shout>();\r\n\t\tMatcher m = pattern.matcher(text);\r\n//\t\tint match= 0;\r\n\t\twhile(m.find()){\r\n//\t\t\tLog.i(\"FUCKING WORK\", \"a: \" + m.start());\r\n\t\t\tmatches.add(new Shout(Integer.parseInt(m.group(1)), m.group(2), m.group(3)));\r\n//\t\t\tmatch++;\r\n\t\t}\r\n\t\treturn matches;\r\n\t}",
"public static int countRegexWordCharacters(String pattern) {\n String trimmed = pattern.replaceAll(\"^\\\\^(\\\\(\\\\?-?[ic]\\\\))?|\\\\$$\", \"\"); // trim off ^, $ and (?-i), etc.\n // only retain word characters\n return trimmed.replaceAll(\"\\\\W\", \"\").length();\n //trimmed.replaceAll(\"^(\\\\w*)(\\\\W(|.*\\\\W))(\\\\w*)$\", \"$1$4\"); // only retain prefix and suffix\n }",
"int countByZipcodeDesc(String zipcodeCodePattern, String zipcodeDescPattern);",
"public static void main(String[] args) throws IOException {\n final String KEY = \"hackerrank\";\n Scanner in = new Scanner(System.in);\n Matcher matcher = Pattern.compile(KEY, Pattern.CASE_INSENSITIVE).matcher(\"\");\n //Count the tweets with KEY in it\n int count = 0;\n for(int N = Integer.parseInt(in.nextLine()); N > 0; --N) {\n String tweet = in.nextLine();\n matcher.reset(tweet);\n count += matcher.find() ? 1 : 0;\n }\n //Output count\n System.out.println(count);\n }",
"@Test\n public void charCount() {\n final int expectedEight = 8;\n final int expectedFour = 4;\n\n CharCount charCounter = new CharCount();\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'z'));\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'Z'));\n assertEquals(expectedFour, charCounter.characterCounter(\"FIZZBUZZ\", 'z'));\n assertEquals(0, charCounter.characterCounter(\"TEdff fdjfj 223\", '1'));\n assertEquals(expectedFour, charCounter.characterCounter(\"TE00df0f f0djfj 223\", '0'));\n assertEquals(0, charCounter.characterCounter(\"RRuyt 111000AAdda\", (char) 0));\n }",
"private double checkWordsFromList(List<String> list, String review, int nonStopWordsFromReview) {\n int contor = 0;\n for (String l : list) {\n if (l.endsWith(\"*\")) {\n l = l.substring(0,l.length()-1);\n boolean contains = review.matches(\".*\\\\b\" + l + \".*\");\n if (contains) {\n contor ++;\n }\n } else {\n boolean contains = review.matches(\".*\\\\b\" + l + \"\\\\b.*\");\n if (contains) {\n contor ++;\n }\n }\n }\n double result = 0;\n //System.out.println(\"In review se gasesc \" + contor + \" cuvinte din lista\");\n result = (double)(100*contor)/nonStopWordsFromReview;\n\n DecimalFormat newFormat = new DecimalFormat(\"#.###\");\n double threeDecimal = Double.valueOf(newFormat.format(result));\n\n return threeDecimal;\n }",
"private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tString s1=\"Hi Hello\";\n\t\tfrequent(s1);\n//\t\tchar ch[] = s1.toCharArray();\n//\t\tchar ch1;\n//\t\tchar ch2[]=new char[10];\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\tSystem.out.println(ch[i]);\n//\t\t}\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\t\n//\t\t\tint count=1;\n//\t\t\tfor(int j=i+1;j<ch.length;j++) {\n//\t\t\t\t\n//\t\t\t\tif(ch[i]==ch[j]) {\n//\t\t\t\t\t\n//\t\t\t\t\tcount++;\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}System.out.println(\"Count of \"+ch[i]+\"=\"+count);\n//\t\t}\n\t\t\n\t\t\n\t\n\n\t}",
"public static int countWords(final List<String> tokens) {\n\tint nWords = 0;\n\n\tfor (final String token : tokens) {\n\t if (!StringUtils.isComposedOf(token, ALL_DELIMS)) {\n\t\tnWords++;\n\t }\n\t}\n\n\treturn nWords;\n }",
"private int getCount(String token, String content) {\n int index = 0;\n int count = 0;\n// String[] parts = token.split(\"\\\\s+\");\n// int size = parts.length;\n boolean hasPreview = false;\n while ((index = content.indexOf(token, index)) != -1) {\n if (!hasPreview) {\n int end = Math.min(content.length(), index + 200);\n while (end < content.length() && content.charAt(end) != ' ') {\n end++;\n }\n preview = content.substring(index, end);\n hasPreview = true;\n }\n count++;\n index += token.length();\n }\n return count;\n }",
"public int strCount(String str, String sub) {\n//Solution to problem coming soon\n}",
"public int countByTodoText(String todoText);",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic void suggestword(String pattern) throws Exception\r\n\t{\r\n\t\t\t// String to be scanned to find the pattern.\r\n\t\t\tString line = \" \";\r\n\t\t\tString reg = \"[\\\\w]+[@$%^&*()!?{}\\b\\n\\t]*\";\r\n\r\n\t\t\t// Create a Pattern object\r\n\t\t\tPattern p = Pattern.compile(reg);\r\n\t\t\t\r\n\t\t\t// Now create matcher object.\r\n\t\t\tMatcher m = p.matcher(line);\r\n\t\t\t\r\n\t\t\tint fileNum = 0;\r\n\t\t\t\r\n\t\t\t\tFile directory = new File(\"C:\\\\Users\\\\jayad\\\\eclipse-workspace\\\\Search Engine\\\\src\\\\Webpages\\\\Text\\\\\");\r\n\t\t\t\tFile[] fileArray = directory.listFiles();\r\n\t\t\t\tfor (int i = 0; i < fileArray.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfind(fileArray[i], fileNum, m, pattern); // Calls the function find()\r\n\t\t\t\t\tfileNum++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings({ \"unused\" })\r\n\t\t\t\tSet keys = new HashSet();\r\n\t\t\t\tInteger value1 = 1;\r\n\t\t\t\tInteger value2 = 0;\r\n\t\t\t\tint counter = 0;\r\n\r\n\t\t\t\tSystem.out.println(\"\\nDid you mean?:\");\r\n\t\t\t\tfor (Map.Entry entry : hashTable.entrySet())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (value2 == entry.getValue())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\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\tif (value1 == entry.getValue())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (counter == 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" , \" + entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} // End of if\r\n\r\n\t\t\t\t\t} // End of else\r\n\t\t\t\t} // End of for loop\r\n\t}",
"public static void main(String[] args) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"A201550B\");\n\t\tlist.add(\"ABB19991000Z\");\n\t\tlist.add(\"XYZ200019Z\");\n\t\tlist.add(\"ERF200220\");\n\t\tlist.add(\"SCD203010T\");\n\t\t//list.add(\"abC200010E\");\n\t\t//countFakes(list);\n\t\tSystem.out.println(countFakes(list));\n\n\t}",
"public static void main(String[] args) {\n String pattern = \"aabe\";\n String text = \"aabaacdeaaabe\";\n\n List<Integer> foundIndexes = KnuthMorrisPrattPatternSearch.performKMPSearch(text, pattern);\n\n if (foundIndexes.isEmpty()) {\n System.out.println(\"Pattern not found in the given text String\");\n } else {\n System.out.println(\"Pattern found in the given text String at positions: \"+\n foundIndexes.stream().map(Object::toString).collect(Collectors.joining(\", \")));\n }\n }",
"public static void main(String[] args) {\n \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n String[] p = new String[n];\n int[] counter = new int[n];\n for(int i = 0; i<n;i++ ){\n \tp[i] = input.next();\n \t\n \tint j = 0;\n \twhile(j<p[i].length()){\n \t\tint t =1;\n \t\tif(j + t < p[i].length()){\n \t\twhile(p[i].charAt(j) == p[i].charAt(j+t) ){\n \t\t\tt++;\n \t\t\tcounter[i]++;\n \t\t\tif(j+t >= p[i].length())\n \t\t\t\tbreak;\n \t\t\t\n \t\t}\n \t\t}\n \t\tj = j+t;\n \t\t\n \t\t\n \t\t\n \t}\n }\n \n for(int i= 0; i<n;i++){\n\t System.out.println(counter[i]);\n }\n \n \n \n input.close();\n }",
"public static void main(String[] args) {\n//\n// String pattern = \"abba\";\n// String s = \"dog cat cat fish\";\n\n\n// String pattern = \"aaaa\";\n// String s = \"dog cat cat dog\";\n\n String pattern = \"abba\";\n String s = \"dog dog dog dog\";\n\n// String pattern = \"e\";\n// String s = \"eukera\";\n\n boolean flag = wordPattern(pattern, s);\n\n System.out.println(flag);\n }",
"public int patternScore(Vector concept_list, Vector all_concepts,\n Vector entity_list, Vector non_entity_list)\n {\n int score = 0;\n return score;\n }",
"static long substrCount(int n, String input) {\n List<String> result = new ArrayList<>();\n if (!isEmpty(input)) {\n for (int index = 0; index <= input.length(); index++) {\n for (int i = index; i <= input.length(); i++) {\n String temp = input.substring(index, i);\n if (valid(temp)) {\n result.add(temp);\n }\n }\n }\n }\n return result.size();\n\n }",
"public int countTokens()\n {\n\n int count = 0;\n int currpos = currentPosition;\n\n while (currpos < maxPosition)\n {\n int start = currpos;\n\n while ((currpos < maxPosition)\n && Character.isLetterOrDigit(str.charAt(currpos)))\n {\n currpos++;\n }\n\n if ((start == currpos)\n && (Character.isLetterOrDigit(str.charAt(currpos)) == false))\n {\n currpos++;\n }\n\n count++;\n }\n\n return count;\n }",
"public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}",
"static double count(String str, String findStr) {\n\t\tint lastIndex = 0;\n\t\tint count = 0;\n\t\twhile (lastIndex != -1) {\n\t\t lastIndex = str.indexOf(findStr,lastIndex);\n\t\t if (lastIndex != -1) {\n\t\t count++;\n\t\t lastIndex += findStr.length();\n\t\t }\n\t\t}\n\t\treturn count;\n\t}",
"private static ArrayList<Integer> patternSearch(String s, String p){\n ArrayList<Integer> indexes = new ArrayList<>(); \n\n for(int i = 0 ; i < s.length() - p.length(); i++){\n\n if(s.substring(i, i + p.length()).equals(p)) indexes.add(i);\n\n\n }\n\n return indexes;\n }",
"public ArrayList<String> findSimilarStringsLiterals(String s, double score){\n\t\t\n\t\tsetForSuggestions.clear();\n\t\t\n\t\t// ArrayList for match scores\n\t\tArrayList<StringScore> matchesScores = new ArrayList<StringScore>(); \n\t\t\n\t\t// ArrayList for the matches\n\t\tArrayList<String> matches = new ArrayList<String>();\n\t\t\n\t\t// The trimmed string variable\n\t\tString trimmedString;\n\t\t\n\t\t// Check if it's not a literal\n\t\tif(!s.startsWith(\"\\\"\"))\n\t\t\treturn matches;\n\t\t\n\t\t// Extract what's between double quotes\n\t\ttrimmedString = s.substring(s.indexOf(\"\\\"\")+1,\n\t\t\t\ts.indexOf(\"\\\"\", s.indexOf(\"\\\"\")+1)).toLowerCase();\t// Just choose what is between brackets\n\t\t\n\t\t// Find similar literals withing 5 characters\n\t\tint minLength = trimmedString.length() - 2;\n\t\tint maxLength = trimmedString.length() + 3;\n\t\t\n\t\tint minIndex = Integer.MAX_VALUE;\n\t\tint maxIndex = -1;\n\t\t\n\t\t// Determine indices for search in bins\n\t\tfor(int i = 0; i < lengths.size(); ++i){\n\t\t\tif(lengths.get(i) > maxLength) {\n\t\t\t\tmaxIndex = indexes.get(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minLength >= lengths.get(i)) {\n\t\t\t\tminIndex = indexes.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Assign threads to search tasks\n\t\tint indexesPerThread = (maxIndex - minIndex) / (numOfCores - 1);\n\t\t\n\t\t// Arraylist to keep track of threads\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\n\t\t\n\t\tfor(int i = minIndex; i < maxIndex; i += indexesPerThread) {\n\t\t\tthreads.add(new Thread(new SuggestionTask(i, i + indexesPerThread, s, trimmedString, score)));\n\t\t}\n\t\t\n\t\t// Start threads\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\tthreads.get(i).start();\n\t\t}\n\t\t\n\t\t// Join threads before continue\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\ttry {\n\t\t\t\tthreads.get(i).join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Copy contents of the synchronized list into the matchesScores list\n\t\tfor(StringScore stringScore : setForSuggestions) {\n\t\t\tmatchesScores.add(stringScore);\n\t\t}\n\t\t\n\t\t// Sort the candidate matches based on score and return top 5\n\t\tjava.util.Collections.sort(matchesScores, new StringScoreComparator());\n\t\tfor(int i = 0; i < 5 && i < matchesScores.size(); ++i){\n\t\t\tmatches.add(matchesScores.get(i).getS());\n\t\t}\n\t\treturn matches;\n\t}",
"@Test\n public void testGetCountNonEmpty() {\n ArrayList<String> testArray;\n testArray =\n new ArrayList<String>(Arrays.asList(\"one\", \"two\", \"two\", \"three\", \"three\", \"three\"));\n\n fixture.countWords(testArray.iterator());\n\n assertEquals(fixture.getCount(\"one\"), 1);\n assertEquals(fixture.getCount(\"two\"), 2);\n assertEquals(fixture.getCount(\"three\"), 3);\n assertEquals(fixture.getCount(\"aRandomWord\"), -1);\n assertEquals(fixture.getCount(\"notEvenAWord\"), -1);\n assertEquals(fixture.getCount(\"password\"), -1);\n assertEquals(fixture.getCount(\"Habibi\"), -1);\n }",
"public int search(String text, String pattern) {\n int M = pattern.length();\n int N = text.length();\n int i, j;\n for (i = 0, j = 0; i < N && j < M; i++) {\n while (j >= 0 && text.charAt(i) != pattern.charAt(j))\n j = next[j];\n j++;\n }\n if (j == M) return i - M;\n return N;\n }",
"public int count(String word);",
"public void strComp() {\n\t\tSystem.out.printf(\"total word: %d\", userstring.size());\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < userstring.size() ) {\n\t\t\tif (userstring.get(i++).equalsIgnoreCase(masterString.get(j++))) {\n\t\t\t\t// user said correct word. update the array and total number of\n\t\t\t\t// matches\n\t\t\t\tmatchValues[k] = true;\n\t\t\t\ttotalCorrectMatches++;\n\t\t\t} \n\t\t\tk++;\n\t\t}\n\n\t}",
"@Override\n public synchronized Long count(String query) {\n long count = 0L;\n String nQuery = normalizeQuery(query);\n Set<String> keys = suggestIndex.getKeys();\n Map index = suggestIndex.getIndex();\n LinkedHashSet<Long> result = new LinkedHashSet<Long>();\n\n logger.debug(\"IN SEARCH: query={}, keys={}\", query, keys);\n\n StringBuilder patternBuilder;\n List<Pattern> patterns = new ArrayList<Pattern>();\n for (String keyPart : nQuery.split(\" \")) {\n patternBuilder = new StringBuilder(\"^(?iu)\");\n patternBuilder.append(ALLOWED_CHARS_REGEXP);\n keyPart = Normalizer.normalize(keyPart, Normalizer.Form.NFD);\n patternBuilder.append(keyPart)\n .append(ALLOWED_CHARS_REGEXP)\n .append('$');\n patterns.add(Pattern.compile(patternBuilder.toString()));\n }\n\n for (String key : keys) {\n for (Pattern pattern : patterns) {\n\n if (pattern.matcher(key).matches()) {\n result.addAll((LinkedHashSet<Long>) index.get(key));\n count += ((LinkedHashSet<Long>) index.get(key)).size();\n }\n }\n }\n return Long.valueOf(result.size());\n }",
"public static int calculateTotalChars(String[] text) {\n int totalChars = 0;\n for (String str : text) {\n totalChars += str.length();\n totalChars++;\n }\n totalChars--;\n return totalChars;\n }",
"@Test\n\tpublic static void main() {\n\t\tSystem.out.println(Stringcount2(\"reddygaru\"));\n\t}",
"public int numMatches();",
"public static int duplicateCount(String text) {\n String[] textArray = text.toLowerCase().split(\"\");\n List<String> temp = new ArrayList<String>();\n\n // Storing all of the duplicated strings\n for(int i=0; i < textArray.length; i++){\n for(int j=i+1; j < textArray.length; j++){\n if(textArray[i].equals(textArray[j])){\n temp.add(textArray[i]);\n }\n }\n }\n \n // Convert list to array\n String[] itemsArray = new String[temp.size()];\n itemsArray = temp.toArray(itemsArray);\n \n // Removing all the duplicated strings by using hashset\n Set<String> set = new HashSet<String>();\n for(int i = 0; i < itemsArray.length; i++){\n set.add(itemsArray[i]);\n }\n\n // Returning the length \n return set.size();\n }",
"private static int characterCount(String expr, Character c) {\n\t\tint count = 0;\n\t\tfor(Character ch : expr.toCharArray()) if(ch == c) count ++;\n\t\treturn count;\n\t}",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint t = Integer.parseInt(br.readLine());\n\t\tchar[] input = br.readLine().toCharArray();\n\t\tint[] arr = new int[26];\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tarr[input[i] - 'A']++;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor (int i = 1; i < t; i++) {\n\t\t\tchar[] candidates = br.readLine().toCharArray();\n\t\t\tint[] scores = new int[26];\n\t\t\tfor (int j = 0; j < candidates.length; j++) {\n\t\t\t\tscores[candidates[j] - 'A']++;\n\t\t\t}\n\t\t\t\n\t\t\tif (similar(arr, scores)) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t}",
"public static void main(String[] args){\n String str = \"aasdfasdfasdfasdfas\";\n String pattern = \"aasdf.*asdf.*asdf.*asdf.*s\";\n// String str = \"mississippi\";\n// String pattern = \"mis*is*ip*.\";\n// String pattern = \"mis*is*p*.\";\n// String pattern = \"mis*is*ip*.\";\n// String str = \"aaaaaaaaaaaaac\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*c\";\n long time = System.currentTimeMillis();\n// String str = \"aaaaaaaaaaaaab\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*b\";\n System.out.println(find(str,pattern));\n System.out.println(\"time: \" + (System.currentTimeMillis() - time));\n }",
"static long substrCount(int n, String s) {\n ArrayList<Point> points = new ArrayList<>();\n\n char current = s.charAt(0);\n int count = 1;\n\n for (int i = 1; i < s.length(); i++) {\n char ch = s.charAt(i);\n if (current == ch) {\n count++;\n } else {\n points.add(new Point(current, count));\n current = ch;\n count = 1;\n }\n }\n points.add(new Point(current, count));\n\n count = 0;\n if (points.size() > 2) {\n\n count += addup(points.get(0).count);\n\n for (int i = 1; i < points.size() - 1; i++) {\n Point prev = points.get(i - 1);\n Point curr = points.get(i);\n Point next = points.get(i + 1);\n\n\n count += addup(curr.count);\n\n if (prev.ch == next.ch && curr.count == 1) {\n int min = Math.min(prev.count, next.count);\n count += min;\n }\n }\n\n count += addup(points.get(points.size() - 1).count);\n\n } else if (points.size() == 1) {\n Point curr = points.get(0);\n count += addup(curr.count);\n } else if (points.size() == 2) {\n Point prev = points.get(0);\n count += addup(prev.count);\n Point next = points.get(1);\n count += addup(next.count);\n }\n\n\n System.out.println(points);\n\n return count;\n\n }",
"public int f1(List<Book> a) {\r\n int count = 0;\r\n for (Book o : a) {\r\n int demchu = 0;\r\n int demso = 0;\r\n for (int i = 0; i < o.getCode().length(); i++) {\r\n char c = o.getCode().charAt(i);\r\n if (Character.isDigit(c)) {\r\n demso++;\r\n }\r\n if (Character.isLetter(c)) {\r\n demchu++;\r\n }\r\n }\r\n if (demchu != 0 && demso != 0) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n\r\n }",
"public long getNumberOfPatternOccurrences() {\n if(!hasFinished()) {\n throw new IllegalArgumentException(\"the recompression is not jet ready.\");\n }\n\n S terminal = slp.get(getPattern().getLeft(), 1);\n return getPatternOccurrence(terminal).get(getText());\n }",
"public int countByTodoRichText(String todoRichText);",
"public static void main(String[] args) {\n\t\tString str = \"welcome to chennai\";\r\n\t\tchar search='e';\r\n\t\tint count=0;\r\n\t\tchar ch[]=str.toCharArray();\r\n\t\tint len=ch.length;\r\n\t\tfor(int i=0;i<len;i++)\r\n\t\t{\r\n\t\t\tif(search==(ch[i]))\r\n\t\t\t{\r\n\t\t\t\tcount=count+1;\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t\tSystem.out.println(count);\r\n\t\r\n\r\n\t}",
"StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }",
"public static List<String> findAndReplacePattern(String[] words, String pattern) {\n List<String> answer = new ArrayList<>();\n HashMap<Character, Integer> patternHashMap = new HashMap<>();\n List<Integer> patternAsInteger = new ArrayList<>();\n\n for (int i = 0; i < pattern.length(); i++) {\n Character x = pattern.charAt(i);\n if(!patternHashMap.containsKey(x)) {\n patternHashMap.put(x, patternHashMap.size()+1);\n }\n patternAsInteger.add(patternHashMap.get(x));\n }\n\n\n\n for(String word : words){\n HashMap<Character, Integer> wordHashMap = new HashMap<>();\n List<Integer> wordAsInteger = new ArrayList<>();\n for(int i = 0; i < word.length(); i++){\n Character x = word.charAt(i);\n if(!wordHashMap.containsKey(x)) {\n wordHashMap.put(x, wordHashMap.size()+1);\n }\n wordAsInteger.add(wordHashMap.get(x));\n }\n if(wordAsInteger.equals(patternAsInteger))\n answer.add(word);\n }\n\n\n return answer;\n }",
"@Test(timeout = TIMEOUT)\n public void kmp() {\n assertEquals(ans, PatternMatching.kmp(pattern, text, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(\"Counts: \" + comparator.getComparisonCount() + \". Should be 23.\",\n 23, comparator.getComparisonCount());\n\n comparator.clear(); // Personally made this method to test every kmp matching in single method.\n //Just set comparisonCount to 0 in the CharacterComparator class.\n\n /*\n pattern: aaba\n text: aabaacaadaabaaba\n */\n assertEquals(ans1, PatternMatching.kmp(pattern1, text1, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(\"Counts: \" + comparator.getComparisonCount() + \". Should be 24.\",\n 24, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n Another multiple match test for reassurance.\n */\n String a = \"ab\";\n String b = \"abab\";\n\n List<Integer> list = new ArrayList<>();\n list.add(0);\n list.add(2);\n\n assertEquals(list, PatternMatching.kmp(a, b, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(5, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n No match case\n pattern: aabcaabd\n text: aabaacaadaabaaba\n */\n assertEquals(empty, PatternMatching.kmp(wrong, text1, comparator));\n assertTrue(\"Comparator not used.\", comparator.getComparisonCount() != 0);\n assertEquals(\"Counts: \" + comparator.getComparisonCount() + \". Should be 23.\",\n 23, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n Longer text\n */\n assertEquals(empty, PatternMatching.kmp(text, pattern, comparator));\n assertEquals(0, comparator.getComparisonCount());\n\n }",
"private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }",
"@Override\n public int count(String txt) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n int count = 0;\n try {\n String query = \"select count(*) from news \\n\"\n + \"where title like ?\";\n conn = getConnection();\n statement = conn.prepareStatement(query);\n statement.setString(1, \"%\" + txt + \"%\");\n result = statement.executeQuery();\n while (result.next()) {\n count = result.getInt(1);\n }\n } catch (ClassNotFoundException | SQLException e) {\n throw e;\n } finally {\n closeResultSet(result);\n closePreparedStatement(statement);\n closeConnection(conn);\n }\n return count;\n }",
"private static int countOccurrences(String amount, char c) {\n int cnt = 0;\n for(int i = 0; i < amount.length(); i++){\n if(amount.charAt(i) == c){\n cnt++;\n }\n }\n return cnt;\n }",
"public static int countWords(String word, ArrayList<String> s){\n\t\tint n = 0;\n\t\tfor(String w : s){\n\t\t\tif(w.equals(word)){\n\t\t\t\tn++;\n\t\t\t}\n\t\t}\n\t\treturn n;\n\t}",
"@Test\n public void wordPatternTest() {\n String pattern = \"aaa\", str = \"aa aa aa aa\";\n boolean ans = instance.wordPattern(pattern, str);\n System.out.println(ans);\n }",
"public int search(String txt)\n {\n String patternCollector;\n int N = txt.length();\n long txtHash = hash(txt, M);\n if (N < M) {return N;}\n patternCollector = hashMatchPattern(txtHash);\n if (patternCollector != null){\n if (check(0, txt, patternCollector)){\n return 0;\n }\n }\n\n for (int i = M; i < N; i++) {\n txtHash = (txtHash + Q - RM*txt.charAt(i-M) % Q) % Q;\n txtHash = (txtHash*R + txt.charAt(i)) % Q;\n patternCollector = hashMatchPattern(txtHash);\n if (patternCollector != null){\n if (check(i - M + 1, txt, patternCollector)){\n return i - M + 1;\n }\n }\n }\n return N; // no match found\n }",
"private int getTotalLetters(File trainDir) {\r\n\t\tint totalCharacterCount = 0;\r\n\t\tfor(File file : trainDir.listFiles()){\r\n\t\t\ttry{\r\n\t\t\t\t// open file\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\t\r\n\t\t\t\twhile(br.ready()){\r\n\t\t\t\t\t// read a character and increment our counter if it is \r\n\t\t\t\t\t// a valid character (a-z, A-Z, ' ')\r\n\t\t\t\t\tchar c = (char) br.read();\r\n\t\t\t\t\tif(String.valueOf(c).matches(\"[A-Za-z ]\")){\r\n\t\t\t\t\t\ttotalCharacterCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(FileNotFoundException e){\r\n\t\t\t\tSystem.err.println(\"Failed to Find File: \" + file.toString());\r\n\t\t\t}\r\n\t\t\tcatch(IOException ioe){\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn totalCharacterCount;\r\n\t}",
"@Override\r\n public Integer countingDuplicates(String match) {\r\n if(duplicates == null) { // if it's not already located\r\n duplicates = new HashMap<>();\r\n for (Core str : pondred) {\r\n for (String term:str.abstractTerm){\r\n if (duplicates.containsKey(term) )\r\n duplicates.put(term, duplicates.get(term) + 1);\r\n else {\r\n duplicates.put(term, 1);\r\n }\r\n }\r\n }\r\n }\r\n return duplicates.get(match);\r\n }",
"static int[] calculateMaxMatchLengths(String pattern) {\n //initiate PMT\n int[] pmt = new int[pattern.length()];\n int maxMatched = 0;\n //loop in the whole string for pattern\n for (int i = 1;i<pattern.length();i++){\n //when not matched, return to last match position\n while(maxMatched > 0 && pattern.charAt(maxMatched) != pattern.charAt(i)){\n maxMatched = pmt[maxMatched -1];\n }\n //when match, maxMatch ++\n if(pattern.charAt(i)==pattern.charAt(maxMatched)){\n maxMatched++;\n }\n //record the maxMatch at separete index\n pmt[i]=maxMatched;\n }\n return pmt;\n }",
"public static int countDifferentQuestionsAnsweredByAll (String group) {\n ArrayList<Character> answeredQuestions = new ArrayList<Character>();\n HashMap<Character, Integer> count = new HashMap<Character, Integer>();\n \n String[] people = group.split(\"\\n\");\n for (String person : people) {\n for (int i = 0; i < person.length(); i++) {\n char question = person.charAt(i);\n \n if (!answeredQuestions.contains(question)) {\n answeredQuestions.add(question);\n count.put(question, 1);\n } else {\n count.replace(question, answeredQuestions.get(question) + 1);\n }\n }\n }\n \n int sum = 0;\n for (int j = 0; j < answeredQuestions.size(); j++) {\n System.out.println(j + \"/\" + answeredQuestions.size());\n if (count.get(answeredQuestions.get(j)) == people.length) {\n sum++;\n }\n }\n \n return sum;\n }",
"private List<Tuple> charCountMap(Tuple input) {\n \n String[] words = input.snd().replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n for(String word : words) {\n Integer chars = word.length();\n output.add(new Tuple(chars.toString(),\"1\"));\n }\n \n lolligag();\n \n //<charCount, 1>, <charCount, 1> ...\n return output;\n }",
"public static void main(String[] args) {\n\r\n\t\tString str = \"learning automation is fun\";\r\n\t\tstr = str.replace(\" \", \"\");\r\n\t\tchar letters[] = str.toCharArray();\r\n\t\t\r\n\t\tfor(int i = 0;i<letters.length;i++) {\r\n\t\t\tint count = 0;\r\n\t\t\tfor(int j=0;j<letters.length;j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (j<i&&(letters[j]==letters[i])) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(letters[i]==letters[j]) {\r\n\t\t\t\t\tcount++;\r\n\t\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\tif (count>0)\r\n\t\t\tSystem.out.println(\"Occurrence of \"+letters[i]+\" is \"+count);\r\n\t\t}\r\n\t\t\r\n\t}",
"private int getContentLengthPerThread(int numberOfThreads,\n\t\t\tList<String> inputWordsList) {\n\t\tint contentLengthPerThread = 0;\n\t\tif (numberOfThreads == 0) {\n\t\t\tcontentLengthPerThread = 1;\n\t\t\tnumberOfThreads = 1;\n\t\t} else {\n\t\t\tcontentLengthPerThread = inputWordsList.size() / numberOfThreads;\n\t\t}\n\t\tif (contentLengthPerThread == 0) {\n\t\t\tcontentLengthPerThread = inputWordsList.size();\n\t\t}\n\t\treturn contentLengthPerThread;\n\t}",
"public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter a word:\");\n String word = scan.next();\n System.out.println(\"Enter character:\");\n char character = scan.next().charAt(0);\n\n int count=0; //count frequency of character\n for (int i =0; i<word.length(); i++) {\n char each = word.charAt(i); //each character by given string word\n\n if (each == character) { //if each character in str is matching with ch\n count++; //count increase the frequency of ch by 1\n\n }\n }\n System.out.println(count);\n\n System.out.println(\"===========================\");\n\n\n\n }",
"static\nint\ncountPairs(String str) \n\n{ \n\nint\nresult = \n0\n; \n\nint\nn = str.length(); \n\n\nfor\n(\nint\ni = \n0\n; i < n; i++) \n\n\n// This loop runs at most 26 times \n\nfor\n(\nint\nj = \n1\n; (i + j) < n && j <= MAX_CHAR; j++) \n\nif\n((Math.abs(str.charAt(i + j) - str.charAt(i)) == j)) \n\nresult++; \n\n\nreturn\nresult; \n\n}",
"public int numdone(String s) {\n Integer i = 0;\n\n for (Entry entry : listentries) {\n if (entry.getStatus().equals(s)) {\n ArrayList<Entry> checkoff = new ArrayList<>();\n checkoff.add(entry);\n return (checkoff.size());\n }\n }\n return i;\n }",
"private static boolean wildCardMatch(String text, String pattern, boolean printDiff) {\n\t\tif (text.length() < 1 && pattern.length() < 1) {\n\t\t\treturn true;\n\t\t}\n\t\tif (text.length() < 1 || pattern.length() < 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// match the newline endings for both string values\n\t\tif (text.contains(\"\\r\")) {\n\t\t\tif (!pattern.contains(\"\\r\")) {\n\t\t\t\tpattern = pattern.replace(\"\\n\", \"\\r\\n\");\n\t\t\t}\n\t\t} else {\n\t\t\tif (pattern.contains(\"\\r\")) {\n\t\t\t\tpattern = pattern.replace(\"\\r\\n\", \"\\n\");\n\t\t\t}\n\t\t}\n\n\t\t// Create the cards by splitting using a RegEx. If more speed\n\t\t// is desired, a simpler character based splitting can be done.\n\t\tString[] cards = pattern.split(\"\\\\*\");\n\n\t\t// Iterate over the cards.\n\t\tfor (String card : cards) {\n\t\t\tint idx = text.indexOf(card);\n\n\t\t\t// Card not detected in the text.\n\t\t\tif (idx == -1) {\n\t\t\t\tif (printDiff) {\n\t\t\t\t\tPage.printFormattedMessage(\"\\ncard: \" + card + \"\\nDiff: \\n\" + StringUtils.difference(pattern, text));\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Move ahead, towards the right of the text.\n\t\t\ttext = text.substring(idx + card.length());\n\t\t}\n\n\t\treturn true;\n\t}",
"public static ParseAction<Located<String>> matchCharacters(int count){\n\t\treturn ctx -> {\n\t\t\tif(ctx.isEOF()){\n\t\t\t\treturn ParseResult.failure(ParseFailure.unexpectedEOF());\n\t\t\t}\n\t\t\tLocated<String> result = ctx.matchCharacters(count);\n\t\t\tif(result != null){\n\t\t\t\treturn ParseResult.success(result);\n\t\t\t}else{\n\t\t\t\treturn ParseResult.failure(ParseFailure.unexpectedEOF());\n\t\t\t}\n\t\t};\n\t}",
"private boolean hasCapDifferential(List<String> tokenList) {\n int countAllCaps = 0;\n for (String token : tokenList) {\n if (Utils.isUpper(token)) {\n countAllCaps++;\n }\n }\n final int capDifferential = tokenList.size() - countAllCaps;\n return (capDifferential > 0) && (capDifferential < tokenList.size());\n }",
"private static int countOccurrences(String input, char c) {\n int count = 0;\n for (int i = 0; i < input.length(); i++) {\n if (input.charAt(i) == c) {\n count++;\n }\n }\n return count;\n }"
] |
[
"0.7245107",
"0.70011026",
"0.6951954",
"0.6732717",
"0.63403374",
"0.565684",
"0.56560093",
"0.56514925",
"0.55672157",
"0.5555711",
"0.55265796",
"0.548846",
"0.5481259",
"0.54673004",
"0.545393",
"0.54498947",
"0.54458076",
"0.54408246",
"0.5435939",
"0.5418132",
"0.5399705",
"0.5366067",
"0.5361324",
"0.5343117",
"0.53321594",
"0.5267563",
"0.5249034",
"0.52454567",
"0.523263",
"0.52245533",
"0.5224298",
"0.5212702",
"0.5210866",
"0.5207301",
"0.5198227",
"0.51981026",
"0.5186375",
"0.5183484",
"0.5170443",
"0.51673955",
"0.5160243",
"0.51504934",
"0.5139875",
"0.5134657",
"0.51318944",
"0.5129364",
"0.51139826",
"0.51074135",
"0.51021963",
"0.50896895",
"0.5089499",
"0.50784427",
"0.5077095",
"0.5075579",
"0.50715667",
"0.5068898",
"0.506179",
"0.5057496",
"0.5056168",
"0.505361",
"0.50432265",
"0.5021112",
"0.5020638",
"0.5014236",
"0.5006527",
"0.49986842",
"0.49982038",
"0.49969897",
"0.49951985",
"0.4982607",
"0.4981119",
"0.49765816",
"0.497245",
"0.49626616",
"0.49571776",
"0.49509862",
"0.4950378",
"0.49479145",
"0.49471012",
"0.49470568",
"0.49296185",
"0.49252588",
"0.49236998",
"0.49175692",
"0.48960868",
"0.48956504",
"0.48920542",
"0.4881945",
"0.48796386",
"0.48767084",
"0.48754996",
"0.48733377",
"0.48723543",
"0.48684964",
"0.48641574",
"0.48581886",
"0.4847722",
"0.48298895",
"0.482578",
"0.48250708"
] |
0.71001
|
1
|
Now, do something similar to the above, but for the BoyerMoore matching algorithm. Use your results to write your REPORT, as described in the comment at the top of this file.
|
public int searchTweetsBoyerMoore(String pattern, List<String> ans) {
int compCost = 0;
Assoc<Integer, Integer> holder;
for(String tweet : tweets) {
holder = StringMatch.matchBoyerMoore(pattern.toLowerCase(), tweet.toLowerCase());
compCost += holder.value;
if(holder.key != -1)
ans.add(tweet);
}
return compCost;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void main(String[] args) throws IOException {\n if (args.length != 1) {\n System.err.println(\"Must provide a file to read from.\");\n } else { \n ArrayList<MatchPerson> allPeople = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> gayMalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> gayFemalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> straightMalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> straightFemalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> biPool = new ArrayList<MatchPerson>();\n\n File spreadsheet = new File(args[0]);\n File dest = new File(\"matchResults.txt\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(dest));\n // get answers in ArrayList from tsv\n ArrayList<String[]> allAnswers = MatchCalculation.fillAnswersArray(spreadsheet);\n String[] questions = allAnswers.get(0); // store questions titles (may or may not need)\n allAnswers.remove(0); // remove titles\n for (String[] arr: allAnswers) { // fill allPeople array\n MatchPerson newPerson = MatchCalculation.parseResponses(arr);\n allPeople.add(newPerson); // fill in person objects\n // add to specific pool for romantic matches\n if (newPerson.getMatchType() == MatchType.ROMANTIC) {\n if (newPerson.getPreference() == Preference.STRAIGHT) {\n if (newPerson.getGender() == Gender.MALE) {\n straightMalePool.add(newPerson);\n } else {\n straightFemalePool.add(newPerson);\n }\n } else if (newPerson.getPreference() == Preference.GAY) {\n if (newPerson.getGender() == Gender.MALE) {\n gayMalePool.add(newPerson);\n } else {\n gayFemalePool.add(newPerson);\n }\n } else {\n biPool.add(newPerson);\n }\n }\n }\n for (MatchPerson person: allPeople) {\n person.setFriendshipMatches(MatchCalculation.findMatches(person, allPeople));\n if (person.getPreference() == Preference.STRAIGHT) {\n if (person.getGender() == Gender.FEMALE) {\n person.setRomanticMatches(MatchCalculation.findMatches(person, straightMalePool));\n } else if (person.getGender() == Gender.MALE) {\n person.setRomanticMatches(MatchCalculation.findMatches(person, straightFemalePool));\n }\n } else if (person.getPreference() == Preference.BI) {\n person.setRomanticMatches(person.getFriendshipMatches());\n } \n// person.setBdayMatches(MatchCalculation.findBirthdayMatches(person, allPeople));\n// writer.write(\"Birthday matches for \" + person.getName() + \" \" \n// + person.getBirthday() + \"\\n\");\n writer.write(person.birthdayMatchesToString() + \"\\n\");\n writer.write(\"Friendship matches for \" + person.getName() + \"\\n\");\n writer.write(person.friendshipMatchesToString() + \"\\n\");\n writer.write(\"Romantic matches for \" + person.getName() + \"\\n\");\n writer.write(person.romanticMatchesToString() + \"\\n\");\n }\n writer.close();\n }\n \n }",
"public static void main(String[] args) throws IOException, InterruptedException, Household.InvalidHouseholdException, Matching.HouseholdAlreadyMatchedException, HousingMarket.FreeSpaceException, Matching.HouseAlreadyMatchedException, Matching.HouseholdLinkedToMultipleException, Matching.HouseholdLinkedToHouseholdException, DynamicMatching.TooManyTimestepsException, Matching.HouseLinkedToMultipleException, MatchingEvaluator.HouseholdIncomeTooHighException, CycleFinder.FullyExploredVertexDiscoveredException, Matching.PreferredNoHouseholdlessHouseException, Matching.HouseLinkedToHouseException {\n String inputFileName = \"../../Data/Input/test2.csv\";\n String outputfolder = \"../../Data/Output/Scores/\";\n\n int nTimes = 50; // Amount of matchings generated per configuration.\n long allowedRunningTime = 1_000; // Time an experiment for _nTimes_ matchings is allowed to run.\n int maxVal = 150; // Maximum lineCount.\n float timestepRatio = 2/3f; // Ratio of time-steps in a dynamic matching that have not yet been taken.\n // Uses H or F, whichever is lowest.\n // ---------------------------------------------------------------------------------------------------\n\n\n int[] startLines = new int[50];\n int counter = 0;\n for (int i = 0; i < 50; i++) {\n startLines[i] = counter;\n counter = counter + (1000 - maxVal) / nTimes; // == 17 with maxVal == 150 & nTimes == 50.\n }\n\n ArrayList<Double> envRatios = new ArrayList<>(Arrays.asList(0.5, 0.75, 1.0, 1.25, 1.5));\n\n ArrayList<Integer> lineCounts = new ArrayList<>(Arrays.asList(5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 20, 25, 30, 35, 40, 45, 50, 75, 100, 125, 150));\n// ArrayList<Integer> lineCounts = new ArrayList<>(Arrays.asList(5, 6, 7, 8, 9, 10, 11, 12));\n// ArrayList<Integer> lineCounts = new ArrayList<>(Arrays.asList(20, 25, 30, 35, 40, 45, 50, 75, 100, 125, 150));\n\n Experimenter experimenter = new Experimenter(inputFileName, outputfolder, allowedRunningTime, nTimes, startLines, envRatios, lineCounts, timestepRatio);\n experimenter.runExperiments();\n }",
"public static void matchMaker()\n {\n \n }",
"public Map<String, Map<String, List<String>>> dbMatch (Map<String, Map<String, List<String>>> outputVal) {\n\t\tfinal String DB_URL = \"jdbc:mysql://localhost/extractor\";\n\t\t\n\t\t// Database credentials\n\t\tfinal String USER = \"\";\n\t\tfinal String PASS = \"\";\n\t\t\n\t\tConnection conn = null;\n\t\tStatement stmt = null;\n\t\t\n\t\tArrayList<String> auditorResultsFromDB = new ArrayList<String>();\n\t\tMap<String, Map<String, List<String>>> dbMatchofAuditor = new HashMap<String, Map<String,List<String>>>();\n\t\tMap<String, List<String>> filteredValForSynonymMatchingInDB = new HashMap<String, List<String>>();\n\t\tList<String> filteredValues = new ArrayList<String>();\n\t\t\n\t\tfor (Map.Entry<String, Map<String, List<String>>> entry : outputVal.entrySet()) {\n\t\t\tString dataPoint = entry.getKey();\n\t\t\tMap<String, List<String>> InnerMap = entry.getValue();\n\t\t\tfor (Map.Entry<String, List<String>> innerMapEntry : InnerMap.entrySet()) {\n\t\t\t\tString keyword = innerMapEntry.getKey();\n\t\t\t\tfor (String value : innerMapEntry.getValue()) {\n\t\t\t\t\tif (auditorResultsFromDB.contains(value)) {\n\t\t\t\t\t\tfilteredValues.add(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilteredValForSynonymMatchingInDB.put(keyword, filteredValues);\n\t\t\t}\n\t\t\tdbMatchofAuditor.put(dataPoint, filteredValForSynonymMatchingInDB);\n\t\t }\n\t\t\n\t\ttry {\n\t\t\t// STEP 2: Register JDBC driver\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t// STEP 3: Open a connection\n\t\t\tSystem.out.println(\"Connecting to database...\");\n\t\t\tconn = DriverManager.getConnection(DB_URL, USER, PASS);\n\n\t\t\t// STEP 4: Execute a query\n\t\t\tSystem.out.println(\"Creating statement...\");\n\t\t\tstmt = conn.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"select name from auditors\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\n\t\t\t// STEP 5: Extract data from result set\n\t\t\twhile (rs.next()) {\n\t\t\t\tauditorResultsFromDB.add(rs.getString(\"name\"));\n\t\t\t}\n\t\t\t// STEP 6: Clean-up environment\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconn.close();\n\t\t} catch (SQLException se) {\n\t\t\t// Handle errors for JDBC\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\t// Handle errors for Class.forName\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// finally block used to close resources\n\t\t\ttry {\n\t\t\t\tif (stmt != null)\n\t\t\t\t\tstmt.close();\n\t\t\t} catch (SQLException se2) {\n\t\t\t} // nothing we can do\n\t\t\ttry {\n\t\t\t\tif (conn != null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException se) {\n\t\t\t\tse.printStackTrace();\n\t\t\t} // end finally try\n\t\t} // end try\n\t\t\n\t\treturn dbMatchofAuditor;\n\t}",
"@Test\n public void testMatch() {\n assertMetrics(\"match:1\", \"a\",\"a\");\n assertMetrics(\"match:0.9339\",\"a\",\"a x\");\n assertMetrics(\"match:0\", \"a\",\"x\");\n assertMetrics(\"match:0.9243\",\"a\",\"x a\");\n assertMetrics(\"match:0.9025\",\"a\",\"x a x\");\n\n assertMetrics(\"match:1\", \"a b\",\"a b\");\n assertMetrics(\"match:0.9558\",\"a b\",\"a b x\");\n assertMetrics(\"match:0.9463\",\"a b\",\"x a b\");\n assertMetrics(\"match:0.1296\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x b\");\n assertMetrics(\"match:0.1288\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x x x x x x b\");\n\n assertMetrics(\"match:0.8647\",\"a b c\",\"x x a x b x x x x x x x x a b c x x x x x x x x c x x\");\n assertMetrics(\"match:0.861\", \"a b c\",\"x x a x b x x x x x x x x x x a b c x x x x x x c x x\");\n assertMetrics(\"match:0.4869\",\"a b c\",\"a b x x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.4853\",\"a b c\",\"x x a x b x x x x x x x x x x b a c x x x x x x c x x\");\n assertMetrics(\"match:0.3621\",\"a b c\",\"a x b x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3619\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3584\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x c\");\n assertMetrics(\"match:0.3474\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x b x x x b x b x\");\n assertMetrics(\"match:0.3421\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.305\" ,\"a b c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.2927\",\"a b!200 c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n }",
"public void matchingcouple()\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Output :\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Following are the matching pairs \");\r\n\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<womenmatchinlist.size();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t// print the matching pair from same index of men and women matching list\r\n\t\t\t\tSystem.out.println(menmatchinglist.get(i)+\" is engaged with \"+womenmatchinlist.get(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}",
"private void CompareTwoFiles() {\n GetCharactersFromProject prog1Char;\r\n KGram prog1KGram;\r\n HashKGram prog1HashKGram;\r\n FingerPrint prog1FingerPrint;\r\n ArrayList<Integer> fingerprintProg1 = null;\r\n\r\n GetCharactersFromProject prog2Char;\r\n KGram prog2KGram;\r\n HashKGram prog2HashKGram;\r\n FingerPrint prog2FingerPrint;\r\n ArrayList<Integer> fingerprintProg2 = null;\r\n\r\n //for the first file\r\n try {\r\n prog1Char = new GetCharactersFromProject(filepath1);\r\n prog1KGram = new KGram(prog1Char.getCharacters());\r\n prog1HashKGram = new HashKGram(prog1KGram.ReturnProcessedKGram());\r\n prog1FingerPrint = new FingerPrint(prog1HashKGram.ReturnProcessedHashes());\r\n fingerprintProg1 = prog1FingerPrint.ReturnFingerPrint();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n //this is for the second file\r\n try {\r\n prog2Char = new GetCharactersFromProject(filepath2);\r\n prog2KGram = new KGram(prog2Char.getCharacters());\r\n prog2HashKGram = new HashKGram(prog2KGram.ReturnProcessedKGram());\r\n prog2FingerPrint = new FingerPrint(prog2HashKGram.ReturnProcessedHashes());\r\n fingerprintProg2 = prog2FingerPrint.ReturnFingerPrint();\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n //this is for jaccard index. Jaccard index will be the basis of similarity\r\n float numSimilarity = 0;\r\n boolean isSimilarEncounter = false;\r\n int sizeFingerprint1 = fingerprintProg1.size();\r\n int sizeFingerprint2 = fingerprintProg2.size();\r\n\r\n for (Integer integer : fingerprintProg1) {\r\n\r\n for (Integer value : fingerprintProg2) {\r\n\r\n\r\n if ((integer.intValue() == value.intValue()) && !isSimilarEncounter) {\r\n numSimilarity++;\r\n isSimilarEncounter = true;\r\n }\r\n\r\n }\r\n\r\n\r\n isSimilarEncounter = false;\r\n }\r\n\r\n SimilarityScore = (numSimilarity / (sizeFingerprint1 + sizeFingerprint2 - numSimilarity));\r\n }",
"@Test\n public void testLoop2() throws IOException {\n MapMatching mapMatching = new MapMatching(hopper, algoOptions);\n // TODO smaller sigma like 40m leads to U-turn at Tschaikowskistraße\n mapMatching.setMeasurementErrorSigma(50);\n Gpx gpx = xmlMapper.readValue(getClass().getResourceAsStream(\"/tour-with-loop.gpx\"), Gpx.class);\n MatchResult mr = mapMatching.doWork(gpx.trk.get(0).getEntries());\n assertEquals(Arrays.asList(\"Jahnallee, B 87, B 181\", \"Jahnallee, B 87, B 181\",\n \"Jahnallee, B 87, B 181\", \"Jahnallee, B 87, B 181\", \"Funkenburgstraße\",\n \"Gustav-Adolf-Straße\", \"Tschaikowskistraße\", \"Jahnallee, B 87, B 181\",\n \"Lessingstraße\", \"Lessingstraße\"), fetchStreets(mr.getEdgeMatches()));\n }",
"public void searchAndWriteQueryResultsToOutput() {\n\n List<String> queryList = fu.textFileToList(QUERY_FILE_PATH);\n\n for (int queryID = 0; queryID < queryList.size(); queryID++) {\n String query = queryList.get(queryID);\n // ===================================================\n // 4. Sort the documents by the BM25 scores.\n // ===================================================\n HashMap<String, Double> docScore = search(query);\n List<Map.Entry<String, Double>> rankedDocList =\n new LinkedList<Map.Entry<String, Double>>(docScore.entrySet());\n Collections.sort(rankedDocList, new MapComparatorByValues());\n\n // ===================================================\n // 5. Write Query Results to output\n // =================================================== \n String outputFilePath =\n RANKING_RESULTS_PATH + \"queryID_\" + (queryID + 1) + \".txt\";\n StringBuilder toOutput = new StringBuilder();\n // display results in console\n System.out.println(\"Found \" + docScore.size() + \" hits.\");\n int i = 0;\n for (Entry<String, Double> scoreEntry : rankedDocList) {\n if (i >= NUM_OF_RESULTS_TO_RETURN)\n break;\n String docId = scoreEntry.getKey();\n Double score = scoreEntry.getValue();\n String resultLine =\n (queryID + 1) + \" Q0 \" + docId + \" \" + (i + 1) + \" \" + score + \" BM25\";\n toOutput.append(resultLine);\n toOutput.append(System.getProperty(\"line.separator\"));\n System.out.println(resultLine);\n i++;\n }\n fu.writeStringToFile(toOutput.toString(), outputFilePath);\n }\n }",
"private static void writeResults() {\n\t\t//Sort hashMap before sending to file\n\t\tTreeSet<Word> mySet = new TreeSet<>(hm.values());\n\n\t\t//Create result.txt file and write treeMap out to it\n\t\tWriter writer = null;\n\t\ttry {\n\t\t\t//System.out.println(\"Here\");\n\t\t\twriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"output\\\\results.txt\")));\n\t\t\tfor (Word word : mySet) {\n\t\t\t\twriter.write(word.getValue() + \"\\t\" + word.getCount() + \"\\n\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\twriter.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n String[] user0 = {\"/start\", \"/pink\", \"/register\", \"/orange\", \"/red\", \"a\"};\n String[] user1 = {\"/start\", \"/green\", \"/blue\", \"/pink\", \"/register\", \"/orange\", \"/one/two\"};\n String[] user2 = {\"a\", \"/one\", \"/two\"};\n String[] user3 = {\"/red\", \"/orange\", \"/yellow\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/amber\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n String[] user4 = {\"/red\", \"/orange\", \"/amber\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/lavender\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n String[] user5 = {\"a\"};\n\n// out.println(rawr(user0, user1));\n// out.println(rawr(user1, user2));\n// out.println(rawr(user2, user0));\n// out.println(rawr(user5, user2));\n out.println(rawr(user3, user4));\n// out.println(rawr(user4, user3));\n\n P1 c=new P1();\n c.findContiguousHistory(user0, user1);\n c.findContiguousHistory(user1, user2);\n c.findContiguousHistory(user2, user0);\n c.findContiguousHistory(user5, user2);\n c.findContiguousHistory(user3, user4);\n\n // below scenaro is tricky because amber match later and user3 string. We have to come back again.\n // String[] user4 = {\"/red\", \"/orange\", \"/amber\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/lavender\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n // String[] user3 = {\"/red\", \"/orange\", \"/yellow\", \"/green\", \"/blue\", \"/purple\", \"/white\", \"/amber\", \"/HotRodPink\", \"/BritishRacingGreen\"};\n\n c.findContiguousHistory(user4, user3);\n }",
"public void printDistance(int runNum, String dir){\n\n List<String[]> destinations = parseFileByName(dir+\"/destinations.\"+readExtention);\n List<Point2D> destination = new ArrayList<>();\n List<List<Double>> distances = new ArrayList<>();\n for(String[] strings : destinations)\n destination.add(new Point2D(Double.parseDouble(strings[0]),Double.parseDouble(strings[1])));\n\n for(int i = 0; i < runNum; i++) {\n List<String[]> receiverContent = parseFileByName(dir+\"/receivers_placement_\"+i+\".\"+readExtention);\n List<Point2D> receiverValues = new ArrayList<>();\n for(String[] strings : receiverContent)\n receiverValues.add(new Point2D(Double.parseDouble(strings[1]),Double.parseDouble(strings[2])));\n List<Double> distanceFromDestination = new ArrayList<>();\n for(Point2D receiverPosition : receiverValues)\n distanceFromDestination.add(receiverPosition.distance(destination.get(i)));\n distances.add(distanceFromDestination);\n }\n\n try {\n PrintWriter resWriter = new PrintWriter(dir+\"/A_results/distances\"+\".\"+writeExtention, \"UTF-8\");\n for(int i = 0;i < distances.get(0).size(); i++){\n String s = \"\";\n for(List<Double> distanceFromDestination : distances)\n s = s + distanceFromDestination.get(i) + \",\";\n int n = i+1;\n\n int nLastChar = numberOfTests%26;\n\n char lastChar = 'A';\n\n lastChar+=nLastChar-1;\n int nFirstChar = 0;\n if(numberOfTests>26){\n nFirstChar= numberOfTests/26;\n }\n\n String avg;\n String var;\n\n if(nFirstChar==0){\n avg = \"=AVERAGE(A\"+n+(\":\"+lastChar)+n+\"),\";\n var = \"=VAR(A\"+n+(\":\"+lastChar)+n+\")\";\n }\n else {\n char firstChar = 'A';\n firstChar += nFirstChar;\n avg = \"=AVERAGE(A\"+n+(\":\"+firstChar+\"\"+lastChar)+n+\"),\";\n var = \"=VAR(A\"+n+(\":A\"+firstChar+\"\"+lastChar)+n+\")\";\n }\n\n s += avg + var;\n resWriter.println(s);\n resWriter.flush();\n\n }\n\n resWriter.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }",
"public void test_caselessmatch02() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch02.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public void test_caselessmatch12() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch12.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*80\r\n\t\tint matches = 3162;\r\n\t\tint results = 1218;\r\n\t\tint pairs = 146;\r\n\t\t*/\r\n\t\t//70\r\n\t\t/*int matches = 3302;\r\n\t\tint results = 909;\r\n\t\tint pairs = 59;*/\r\n\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tdouble b = (0.1*i)*((matches*3)+(results*3)+(pairs*3));\r\n\t\t\tSystem.out.print(Math.round(b)+\",\");\r\n\t\t}\t\r\n\t\r\n\t}",
"@Test\n public void testDoWork() {\n MapMatching mapMatching = new MapMatching(hopper, algoOptions);\n List<GPXEntry> inputGPXEntries = createRandomGPXEntries(\n new GHPoint(51.358735, 12.360574),\n new GHPoint(51.358594, 12.360032));\n MatchResult mr = mapMatching.doWork(inputGPXEntries);\n\n // make sure no virtual edges are returned\n int edgeCount = hopper.getGraphHopperStorage().getAllEdges().length();\n for (EdgeMatch em : mr.getEdgeMatches()) {\n assertTrue(\"result contains virtual edges:\" + em.getEdgeState().toString(),\n em.getEdgeState().getEdge() < edgeCount);\n }\n\n // create street names\n assertEquals(Arrays.asList(\"Platnerstraße\", \"Platnerstraße\", \"Platnerstraße\"),\n fetchStreets(mr.getEdgeMatches()));\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), 1.5);\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis());\n\n PathWrapper matchGHRsp = new PathWrapper();\n new PathMerger().doWork(matchGHRsp, Collections.singletonList(mr.getMergedPath()), translationMap.get(\"en\"));\n InstructionList il = matchGHRsp.getInstructions();\n\n assertEquals(il.toString(), 2, il.size());\n assertEquals(\"Platnerstraße\", il.get(0).getName());\n\n inputGPXEntries = createRandomGPXEntries(\n new GHPoint(51.33099, 12.380267),\n new GHPoint(51.330689, 12.380776));\n mr = mapMatching.doWork(inputGPXEntries);\n\n assertEquals(Arrays.asList(\"Windmühlenstraße\", \"Windmühlenstraße\", \"Bayrischer Platz\",\n \"Bayrischer Platz\", \"Bayrischer Platz\"), fetchStreets(mr.getEdgeMatches()));\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), .1);\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis(), 1);\n\n matchGHRsp = new PathWrapper();\n new PathMerger().doWork(matchGHRsp, Collections.singletonList(mr.getMergedPath()), translationMap.get(\"en\"));\n il = matchGHRsp.getInstructions();\n\n assertEquals(il.toString(), 3, il.size());\n assertEquals(\"Windmühlenstraße\", il.get(0).getName());\n assertEquals(\"Bayrischer Platz\", il.get(1).getName());\n\n // full path\n inputGPXEntries = createRandomGPXEntries(\n new GHPoint(51.377781, 12.338333),\n new GHPoint(51.323317, 12.387085));\n mapMatching = new MapMatching(hopper, algoOptions);\n mapMatching.setMeasurementErrorSigma(20);\n mr = mapMatching.doWork(inputGPXEntries);\n\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), 0.5);\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis(), 200);\n assertEquals(138, mr.getEdgeMatches().size());\n\n // TODO full path with 20m distortion\n // TODO full path with 40m distortion\n }",
"Match getResultMatch();",
"public void sensibleMatches2() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n for (String eachClient : clientMap.keySet()) \n {\n if (!eachClient.equals(\"Hal\")) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }\n }",
"public void test_caselessmatch06() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch06.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', 'K', 'i')\"; \n \t \n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public void sensibleMatches1() \n { \n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection ;\n\n Map<String, Set<String>> mapWithoutHal = new HashMap<>(clientMap);\n mapWithoutHal.remove(\"Hal\");\n for (String eachClient : mapWithoutHal.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString);\n }\n }",
"public void test_caselessmatch07() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch07.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', 'k', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public void test_caselessmatch09() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch09.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public static void computeBody() {\r\n\r\n double value;\r\n String text;\r\n\r\n for (int first = 0; first < columns; first++) {\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n computeRanks(first, second);\r\n }\r\n }\r\n }\r\n\r\n text = \"\\n\";\r\n\r\n //print individual comparisons\r\n\r\n for (int first = 0; first < columns; first++) {\r\n\r\n text += \"\\n\\\\section{Detailed results for \" + algorithms[first] + \"}\\n\\n\";\r\n text += \"\\n\\\\subsection{Results}\\n\\n\";\r\n text += \"\\\\begin{table}[!htp]\\n\\\\centering\\\\small\\n\" + \"\\\\begin{tabular}{\\n\";\r\n text += \"|c|c|c|c|c|\";\r\n text += \"}\\n\\\\hline\\n\";\r\n text += \" VS & $R^{+}$ & $R^{-}$ & Exact P-value & Asymptotic P-value \\\\\\\\ \\\\hline \\n\";\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n text += algorithms[second] + \" & \" + wilcoxonRanks[first][second] + \" & \" + wilcoxonRanks[second][first] + \" & \";\r\n\r\n if (rows < 51) {\r\n value = exactPValues[first][second];\r\n if (value != 1.0) {\r\n text += value + \" & \";\r\n } else {\r\n text += \"$\\\\geq$ 0.2 & \";\r\n }\r\n } else {\r\n text += \"- & \";\r\n }\r\n\r\n value = asymptoticPValues[first][second];\r\n text += nf.format(value);\r\n text += \"\\\\\\\\ \\\\hline \\n\";\r\n }\r\n }\r\n\r\n text += \"\\n\" + \"\\\\end{tabular}\\n\" + \"\\\\caption{Results obtained by the Wilcoxon test for algorithm \" + algorithms[first] + \"}\\n\\\\end{table}\\n\";\r\n\r\n text += \"\\n\\\\subsection{Confidence intervals for Median of diferences}\\n\\n\";\r\n\r\n text += \"\\\\begin{table}[!htp]\\n\\\\centering\\\\small\\n\" + \"\\\\begin{tabular}{\\n\";\r\n text += \"|c|c|c|\";\r\n text += \"}\\n\\\\hline\\n\";\r\n text += \" $\\\\alpha$=0.90 & Confidence interval & Exact confidence \\\\\\\\ \\\\hline \\n\";\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n text += algorithms[second] + \" & \" + confidenceIntervals90[first][second] + \" & \" + nf.format(exactConfidence90[first][second]) + \"\\\\\\\\ \\\\hline \\n\";\r\n }\r\n }\r\n text += \"\\n\" + \"\\\\end{tabular}\\n\" + \"\\\\caption{Confidence intervals for algorithm \" + algorithms[first] + \" ($\\\\alpha$=0.90)}\\n\\\\end{table}\\n\";\r\n\r\n text += \"\\\\begin{table}[!htp]\\n\\\\centering\\\\small\\n\" + \"\\\\begin{tabular}{\\n\";\r\n text += \"|c|c|c|\";\r\n text += \"}\\n\\\\hline\\n\";\r\n text += \" $\\\\alpha$=0.95 & Confidence interval & Exact confidence \\\\\\\\ \\\\hline \\n\";\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n text += algorithms[second] + \" & \" + confidenceIntervals95[first][second] + \" & \" + nf.format(exactConfidence95[first][second]) + \"\\\\\\\\ \\\\hline \\n\";\r\n }\r\n }\r\n text += \"\\n\" + \"\\\\end{tabular}\\n\" + \"\\\\caption{Confidence intervals for algorithm \" + algorithms[first] + \" ($\\\\alpha$=0.95)}\\n\\\\end{table}\\n\";\r\n text += \"\\n \\\\clearpage \\n\\n\";\r\n\r\n Files.addToFile(outputFileName, text);\r\n\r\n text = \"\";\r\n }\r\n\r\n }",
"public void test_caselessmatch04() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch04.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', '[A-Z]', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public static void main(String[] args) {\n ArrayList<Character> actual=new ArrayList<>();\n actual.add('R');\n actual.add('G');\n actual.add('B');\n actual.add('Y');\n ArrayList<Character> guess=new ArrayList<>();\n guess.add('G');\n guess.add('G');\n guess.add('R');\n guess.add('R');\n ArrayList<Character> hitLists=new ArrayList<>();\n ArrayList<Character> pseudoLists=new ArrayList<>();\n int hits=0;\n int pseudoHits=0;\n for(int i=0;i<4;i++)\n {\n \t if(actual.get(i)==guess.get(i))\n \t {\n \t\t hits++;\n \t\t hitLists.add(actual.get(i));\n \t }\n }\n for(int i=0;i<4;i++)\n {\n \t char g=guess.get(i);\n \t if(g!=actual.get(i)&&!hitLists.contains(g)&&actual.contains(g))\n { \n\t pseudoLists.add(g);\n }\n }\n for(int i=0;i<pseudoLists.size();i++)\n { char g=pseudoLists.get(i);\n \t int actualOccs=numOccurences(g,actual);\n \t int guessOccs=numOccurences(g,guess);\n \t \n\t\tif(guessOccs==actualOccs)\n \t {\n \t\t pseudoHits++; \n \t }\n\t\telse{\n\t\t\tpseudoHits+=Math.min(guessOccs,actualOccs);\n\t\t}\t \n System.out.println(g);\n }\n \n \n System.out.println(hits+\" hits \"+pseudoHits+\" pseudoHits\");\n\t}",
"public static void experiment2() {\n\t\tList<String> lines = FileUtil.loadFrom(\"docs/corpus-search-results-new-408.txt\");\n\t\tString cipher = Ciphers.cipher[1].cipher;\n\t\tString plain = Ciphers.cipher[1].solution;\n\t\tfor (String line : lines) {\n\t\t\tint pos = plain.indexOf(line.toLowerCase());\n\t\t\tif (pos < 0) System.out.println(\"Could not find \" + line + \" in plaintext\");\n\t\t\telse {\n\t\t\t\tString sub = cipher.substring(pos, pos+line.length());\n\t\t\t\tInfo info = new Info(sub, 0);\n\t\t\t\tSystem.out.println(line + \", \" + sub + \", \" + info.probability);\n\t\t\t}\n\t\t}\n\t}",
"public void test_caselessmatch05() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch05.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', '[a-z]', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public void test_caselessmatch01() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch01.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"void findMatchings(boolean isProtein) {\n\n GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();\n HashSet<String > searchSpaceList = new HashSet<>();\n GraphDatabaseService databaseService = dbFactory.newEmbeddedDatabase(graphFile);\n for (int id: queryGraphNodes.keySet()) {\n if(isProtein)\n searchSpaceList.add(queryGraphNodes.get(id).label);\n else\n searchSpaceList.add(String.valueOf(queryGraphNodes.get(id).labels.get(0)));\n }\n for(String x: searchSpaceList) {\n ResourceIterator<Node> xNodes;\n try(Transaction tx = databaseService.beginTx()) {\n xNodes = databaseService.findNodes(Label.label(x));\n tx.success();\n }\n\n while (xNodes.hasNext()) {\n Node node = xNodes.next();\n if (searchSpaceProtein.containsKey(x))\n searchSpaceProtein.get(x).add(node.getId());\n else {\n HashSet<Long> set = new HashSet<>();\n set.add(node.getId());\n searchSpaceProtein.put(x, set);\n }\n }\n\n }\n\n if(isProtein)\n search(0, databaseService, true);\n else\n search(0, databaseService, false);\n databaseService.shutdown();\n }",
"public static void main(String[] args) {\n RegexParser regexParser = new RegexParser(new File(args[0]));\n regexParser.parseCharClasses();\n regexParser.parseTokens();\n regexParser.buildDFATable();\n // write DFA Table to file\n try {\n BufferedWriter tableWriter = new BufferedWriter(new FileWriter(new File(args[2])));\n for (int i = 0; i < regexParser.dfaTable.tableRows.size(); i++) {\n tableWriter.write(\"State\" + i);\n tableWriter.newLine();\n for (int j = 0; j < 95; j++) {\n //if (regexParser.dfaTable.tableRows.get(i).nextStates[j] != 1) {\n tableWriter.write(\" \" + (char)(j + 32) + \" \" + regexParser.dfaTable.tableRows.get(i).nextStates[j]);\n //}\n }\n tableWriter.newLine();\n }\n tableWriter.newLine();\n tableWriter.write(\"Accept States\");\n tableWriter.newLine();\n for (int j = 0; j < regexParser.dfaTable.tableRows.size(); j++) {\n for (int i = 0; i < regexParser.dfaTable.nfa.acceptStates.size(); i++) {\n if (regexParser.dfaTable.tableRows.get(j).nfaStates.contains(regexParser.dfaTable.nfa.acceptStates.get(i))) {\n tableWriter.write(\" \" + j);\n }\n }\n }\n tableWriter.close();\n }\n catch (Exception e) {\n System.out.println(\"Could not write to table file\");\n System.exit(0);\n }\n TableWalker tw = new TableWalker(regexParser.dfaTable, new File(args[1]), new File(args[3]));\n System.out.println(\"Success! Check your output files!\");\n//Part 2, piece 1: parsing the grammar\n LL1GrammarParser parser = new LL1GrammarParser(new File(args[4]), regexParser.specReader.tokens);\n parser.parseGrammar();\n\n//piece 2/3: first and follow sets \n System.out.println(\"Creating First and Follow Sets: \");\n\n LL1FFSets sets = new LL1FFSets(parser.rules);\n\n System.out.println(\"Working on the Parsing Table\");\n//piece 4/5: LL(1) parsing table and running it. Success/reject message here.\n LL1ParsingTable table = new LL1ParsingTable(sets, regexParser.specReader.tokens,tw.parsedTokens, parser.rules);\n System.out.println(table.run());\n\n\n }",
"public static void main(String[] args) throws IOException {\n util.importUtility();\n \n // Create a list of numbers for the players; values initialized\n // to zero. This is a strategy profile.\n ArrayList<Integer> moves = new ArrayList<>();\n for(int i = 0; i < util.getNumPlayers(); i++)\n moves.add(0);\n \n // This list of Strings will store newly found strategy profiles.\n ArrayList<String> strats = new ArrayList<>();\n String s;\n \n // Indexes for players.\n int p1 = 0;\n int p2 = 1;\n \n // Loop control.\n int i = 0;\n \n // Index of beginning and end of the sink equilibrium best response\n // cycle found by generating the the list of profiles.\n // Once we've found said cycle, it's as if there's a long string\n // of strategy profiles still attached to it. This index allows us\n // to *snip* it off.\n int index = 0;\n \n // BEGIN!!! Let's hope this works....\n while(i < 1000) {\n // The next two if statements check if a best response to the\n // current strategy profile for p1 or p2 can be found. If it can, then\n // we check if the new strategy profile *is already in* our list.\n // If not, we add it in. If so, we note the index of where the \n // matching profile is in our current list and throw it on top anyway\n // (it's a String that will be the last line of our results file).\n if (bestResponse(moves, p1)) {\n s = newVertex(moves);\n if(strats.indexOf(s) == -1)\n strats.add(s);\n else {\n index = strats.indexOf(s);\n strats.add(s);\n break;\n }\n }\n if (bestResponse(moves, p2)) {\n s = newVertex(moves);\n if(strats.indexOf(s) == -1)\n strats.add(s);\n else {\n index = strats.indexOf(s);\n strats.add(s);\n break;\n }\n }\n i++;\n \n // This is what happens if finding the solution is *a bit* less \n // trivial than we'd hope. Once we try looking for best responses \n // between the two players a thousand times, we reset the iterator;\n // clear the profiles list, and increment the p2 index... changing\n // the player with which p1 would like to play. Then we do it again.\n if (i == 1000) {\n i = 0;\n strats.clear();\n p2++;\n }\n \n // If p1 has tried trading moves back in forth with EVERY player in \n // the list, then the player at the next index can try doing so.\n if (p2 == 20) {\n p1++;\n p2 = 0;\n }\n }\n // This algorithm will continue until it finds a sink or every player \n // has traded blows with each other. Note that there's no mechanism in \n // place to reset p1's counter; so if it ever reached that point it \n // would completely fail. In that case, it may not really be all that\n // useful to reset it anyway.\n \n // This is where the *snipping* takes place as described above.\n for (int j = 0; j < index; j++) {\n strats.remove(0);\n }\n \n // Print the result. If we've found one, of course.\n strats.stream().forEach(System.out::println);\n \n }",
"@Test\n public void testLoop() throws IOException {\n MapMatching mapMatching = new MapMatching(hopper, algoOptions);\n\n // Need to reduce GPS accuracy because too many GPX are filtered out otherwise.\n mapMatching.setMeasurementErrorSigma(40);\n\n Gpx gpx = xmlMapper.readValue(getClass().getResourceAsStream(\"/tour2-with-loop.gpx\"), Gpx.class);\n MatchResult mr = mapMatching.doWork(gpx.trk.get(0).getEntries());\n assertEquals(\n Arrays.asList(\"Gustav-Adolf-Straße\", \"Gustav-Adolf-Straße\", \"Gustav-Adolf-Straße\",\n \"Leibnizstraße\", \"Hinrichsenstraße\", \"Hinrichsenstraße\",\n \"Tschaikowskistraße\", \"Tschaikowskistraße\"),\n fetchStreets(mr.getEdgeMatches()));\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), 5);\n // TODO why is there such a big difference for millis?\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis(), 6000);\n }",
"public void test_caselessmatch08() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch08.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"Match getMatches();",
"public static void readResultsFromFile(File resultfile) {\n FileWriter fileWriter = null;\n try {\n fileWriter = new FileWriter(\"res.csv\");\n CSVPrinter csvp = null;\n CSVFormat csvf = CSVFormat.DEFAULT.withRecordSeparator(newLineSeparator);\n csvp = new CSVPrinter(fileWriter, csvf);\n csvp.printRecord(fileHeader);\n Constituency constituency = new Constituency();\n Candidate candidate = new Candidate();\n int flag = 0, constituencyFlag = 0, detailCounter = 0;\n FileReader fr = new FileReader(resultfile);\n LineNumberReader lnr = new LineNumberReader(fr);\n LineNumberReader nextReader;\n String line, nextLines;\n String candidateline = \"(\\\\A)(\\\\d+)(\\\\s)(\\\\w*)\";\n String constituencyline = \"(\\\\A)(\\\\d+)([.])(\\\\s)(\\\\w+)\";\n String sexline = \"(\\\\A)([M F])\";\n String ageline = \"(\\\\A)^([0-9]){2}$\";\n String categoryline = \"(\\\\A)([SC GEN ST]{1,3}$)\";\n String partyline = \"(\\\\A)^(?!GEN|TURNOUT)([A-Z()]+){3,10}$\";\n String generalline = \"(\\\\A)^([0-9]){1,10}$\";\n String postalline = \"(\\\\A)^[0-9]{1,4}$\";\n String totalline = \"(\\\\A)^([0-9]{1,10}$)\";\n Pattern candidatepattern = Pattern.compile(candidateline);\n Pattern constituencypattern = Pattern.compile(constituencyline);\n Pattern sexpattern = Pattern.compile(sexline);\n Pattern agepattern = Pattern.compile(ageline);\n Pattern categorypattern = Pattern.compile(categoryline);\n Pattern partypattern = Pattern.compile(partyline);\n Pattern generalpattern = Pattern.compile(generalline);\n Pattern postalpattern = Pattern.compile(postalline);\n Pattern totalpattern = Pattern.compile(totalline);\n while((line = lnr.readLine()) != null){\n if (line.toLowerCase().contains(\"detailed results\")){\n flag++;\n }\n if (flag >= 2){\n Matcher candidatematcher = candidatepattern.matcher(line);\n Matcher constituencymatcher = constituencypattern.matcher(line);\n if (candidatematcher.find()) {\n candidate.name = line;\n candidate.constituency = constituency.name;\n detailCounter = 1;\n constituencyFlag = 1;\n nextReader = lnr;\n while(!(nextLines = nextReader.readLine()).isEmpty()){\n nextLines.trim();\n candidate.name = candidate.name.concat(\" \"+nextLines);\n }\n // System.out.println(candidate.name);\n }\n if (constituencymatcher.find()){\n if(constituencyFlag == 1){\n writeResultsIntoFile(constituency, csvp);\n constituency = new Constituency();\n }\n constituency.name = line;\n //System.out.println(constituency.name);\n constituencyFlag = 0;\n }\n if (detailCounter > 0 && detailCounter <= 7){\n if(!line.isEmpty()) {\n switch (detailCounter) {\n case 1:\n Matcher sexmatcher = sexpattern.matcher(line);\n if (sexmatcher.find()) {\n candidate.sex = line;\n detailCounter++;\n }\n break;\n case 2:\n Matcher agematcher = agepattern.matcher(line);\n if (agematcher.find()) {\n candidate.age = line;\n detailCounter++;\n }\n break;\n case 3:\n Matcher categorymatcher = categorypattern.matcher(line);\n if (categorymatcher.find()) {\n candidate.category = line;\n detailCounter++;\n }\n break;\n case 4:\n Matcher partymatcher = partypattern.matcher(line);\n if (partymatcher.find()) {\n candidate.party = line;\n detailCounter++;\n }\n break;\n case 5:\n Matcher generalmatcher = generalpattern.matcher(line);\n if (generalmatcher.find()) {\n candidate.general = line;\n detailCounter++;\n }\n break;\n case 6:\n Matcher postalmatcher = postalpattern.matcher(line);\n if (postalmatcher.find()) {\n candidate.postal = line;\n detailCounter++;\n }\n break;\n case 7:\n Matcher totalmatcher = totalpattern.matcher(line);\n if (totalmatcher.find()) {\n candidate.total = line;\n detailCounter++;\n }\n default:\n break;\n }\n }\n }\n if (detailCounter > 7){\n constituency.candidates.add(candidate);\n candidate = new Candidate();\n detailCounter = 0;\n }\n }\n }\n } catch (IOException e){\n System.out.println(e);\n }finally {\n try{\n fileWriter.flush();\n fileWriter.close();\n }catch(IOException e){\n System.out.println(\"Error while flushing/closing file\");\n }\n }\n }",
"void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }",
"private static void LogOverall() throws IOException {\n\t\tBufferedWriter out;\n\t\tIterator entries = allPatternOne.entrySet().iterator();\n\t\t\n\t\t out = new BufferedWriter(new FileWriter(singlePatternPath+\"allPatternOne.txt\"));\n\t\t int count1 = 0;\n\t\t entries = allPatternOne.entrySet().iterator();\n\t\t\twhile (entries.hasNext()) {\n\t\t\t Map.Entry entry = (Map.Entry) entries.next();\n\t\t\t Integer value = (Integer)entry.getKey();\n\t\t\t HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue();\n\t\t\t count1+=set.size();\n\t\t\t out.write(\"!size \" + value + \" \" + set.size() + \"\\n\");\n\t\t\t Iterator itr = set.iterator();\n\t\t\t while(itr.hasNext()) {\n\t\t\t \tSequencePair current = (SequencePair) itr.next();\n\t\t\t \t//System.out.println(\"[\" + current.firstSeq +\":\"+current.secondSeq +\"]\");\n\t\t\t out.write(\"[\" + current.firstSeq +\":\"+current.secondSeq +\"]\"+\"\\n\");\n\t\t\t }\n\t\t\t}\n\t\t\tout.write(\"! total \" + count1);\n\t\t\t//System.out.println(count2);\n\t\t\tif(out!=null)\n\t\t\t\tout.close();\n\t\t\n\t\n\t\t\n\t\t\n\t out = new BufferedWriter(new FileWriter(newSinglePatternPath+\"allPatternTwo.txt\"));\n\t int count2 = 0;\n\t entries = allPatternTwo.entrySet().iterator();\n\t\twhile (entries.hasNext()) {\n\t\t Map.Entry entry = (Map.Entry) entries.next();\n\t\t Integer value = (Integer)entry.getKey();\n\t\t HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue();\n\t\t count2+=set.size();\n\t\t out.write(\"!size \" + value + \" \" + set.size() + \"\\n\");\n\t\t Iterator itr = set.iterator();\n\t\t while(itr.hasNext()) {\n\t\t \tSequencePair current = (SequencePair) itr.next();\n\t\t \t\n\t\t out.write(\"[\" + current.firstSeq +\":\"+current.secondSeq +\"]\"+\"\\n\");\n\t\t }\n\t\t}\n\t\tout.write(\"! total \" + count2);\n\t\t//System.out.println(count2);\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t}",
"public void test() throws IOException, SQLException\r\n\t{\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(\"src/result.txt\")));\r\n\t\tList<String> sents = new ArrayList<>();\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(\"src/test_tmp_col.txt\")));\r\n\t\tString line = \"\";\r\n\t\tString wordseq = \"\";\r\n\t\tList<List<String>> tokens_list = new ArrayList<>();\r\n\t\tList<String> tokens = new ArrayList<>();\r\n\t\twhile((line=br.readLine())!=null)\r\n\t\t{\r\n\t\t\tif(line.trim().length()==0)\r\n\t\t\t{\r\n\t\t\t\tsents.add(wordseq);\r\n\t\t\t\ttokens_list.add(tokens);\r\n\t\t\t\twordseq = \"\";\r\n\t\t\t\ttokens = new ArrayList<>();\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tString word = line.split(\"#\")[0];\r\n\t\t\t\twordseq += word;\r\n\t\t\t\ttokens.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tfor(String sent : sents)\r\n\t\t{\r\n\t\t\tString newsURL = null;\r\n\t\t\tString imgAddress = null;\r\n\t\t\tString newsID = null;\r\n\t\t\tString saveTime = null;\r\n\t\t\tString newsTitle = null;\r\n\t\t\tString placeEntity = null;\r\n\t\t\tboolean isSummary = false;\r\n\t\t\tPair<String, LabelItem> result = extractbysentence(newsURL, imgAddress, newsID, saveTime, newsTitle, sent, placeEntity, isSummary);\r\n\t\t\t\r\n\t\t\tif(result!=null)\r\n\t\t\t{\r\n\t\t\t\r\n//\t\t\t\tSystem.out.print(result.getSecond().eventType+\"\\n\");\r\n\t\t\t\tbw.write(sent+'\\t'+result.getSecond().triggerWord+\"\\t\"+result.getSecond().sourceActor+'\\t'+result.getSecond().targetActor+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tbw.write(sent+'\\n');\r\n\t\t\t}\r\n\t\t}\r\n\t\tbw.close();\r\n\t\t\r\n\t}",
"private void outputResults()\n{\n try {\n PrintWriter pw = new PrintWriter(new FileWriter(output_file));\n pw.println(total_documents);\n for (Map.Entry<String,Integer> ent : document_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n }\n pw.println(START_KGRAMS);\n pw.println(total_kdocuments);\n for (Map.Entry<String,Integer> ent : kgram_counts.entrySet()) {\n String wd = ent.getKey();\n int ct = ent.getValue();\n pw.println(ct + \" \" + wd);\n } \n pw.close();\n }\n catch (IOException e) {\n IvyLog.logE(\"SWIFT\",\"Problem generating output\",e);\n }\n}",
"public void test_caselessmatch11() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch11.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"protected void setupMatcherExpectations() {\n expectedMatchRecordIds.put(\"x028abMatcher\", 0);\r\n expectedMatchRecords.put (\"x028abMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x245ahMatcher\", 0);\r\n expectedMatchRecords.put (\"x245ahMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x240aMatcher\", 0);\r\n expectedMatchRecords.put (\"x240aMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x260abcMatcher\", 0);\r\n expectedMatchRecords.put (\"x260abcMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x130aMatcher\", 0);\r\n expectedMatchRecords.put (\"x130aMatcher\", 0);\r\n //TODO end of above TODO\r\n\r\n expectedMatchRecordIds.put(\"ISSNMatcher\", 14); //confirmed\r\n expectedMatchRecords.put (\"ISSNMatcher\", 2); //confirmed\r\n\r\n expectedMatchRecordIds.put(\"ISBNMatcher\", 78); //TODO confirm both of these\r\n expectedMatchRecords.put (\"ISBNMatcher\", 23);\r\n\r\n expectedMatchRecordIds.put(\"x024aMatcher\", 3); //confirmed\r\n expectedMatchRecords.put (\"x024aMatcher\", 3); //confirmed\r\n\r\n expectedMatchRecordIds.put(\"LccnMatcher\", 49); //TODO confirm both of these\r\n expectedMatchRecords.put (\"LccnMatcher\", 8);\r\n\r\n expectedMatchRecordIds.put(\"SystemControlNumberMatcher\", 92); //TODO confirm both of these\r\n expectedMatchRecords.put (\"SystemControlNumberMatcher\", 27);\r\n\r\n\r\n /*\r\n rule 2 matchsets?:\r\n- *** Matchset: {62, 160, 201, }\r\n- *** Matchset: {10, 29, 52, 66, 132, 171, 205, 255, }\r\n- *** Matchset: {33, 71, 113, 137, 175, 207, 262, }\r\n\r\n 035 matchsets?:\r\n- *** Matchset: {1, 25, 48, 94, 107, 167, 197, 234, 251, 316, }\r\n- *** Matchset: {3, 27, 50, 64, 96, 109, 162, 169, 203, 236, 253, 318, }\r\n- *** Matchset: {31, 68, 111, 134, 173, 238, 257, 320, }\r\n- *** Matchset: {12, 73, 98, 115, 177, 209, 264, 324, }\r\n- *** Matchset: {5, 14, 35, 54, 75, 100, 117, 179, 240, 267, 326, }\r\n- *** Matchset: {56, 58, 82, 121, 141, 164, 185, 211, 243, 275, 329, }\r\n- *** Matchset: {22, 60, 89, 104, 125, 154, 191, 222, 248, 308, 312, 333, }\r\n */\r\n\r\n expectedResults.add(getExpectedMatchSet(new long[]{5,14,35,54,75,100,117,179,240,267,326}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{22,60,89,104,125,154,191,222,248,308,312,333}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{56,58,82,121,141,164,185,211,243,275,329}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{12,73,98,115,177,209,264,324}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{31,68,111,134,173,238,257,320}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{3,27,50,64,96,109,162,169,203,236,253,318}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{1,25,48,94,107,167,197,234,251,316}));\r\n\r\n expectedResults.add(getExpectedMatchSet(new long[]{62, 160, 201}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{10, 29, 52, 66, 132, 171, 205, 255}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{33, 71, 113, 137, 175, 207, 262}));\r\n }",
"@Test\n public void showHandledPeaksForInterestingCases() {\n List<ISpectrum> spectra = ClusteringTestUtilities.readISpectraFromResource();\n\n ISpectrum[] spectrums = (ISpectrum[]) spectra.toArray();\n\n ISimilarityChecker checker = new FrankEtAlDotProductTester();\n ISimilarityChecker currentChecker = new FrankEtAlDotProduct(0.5F, 15, true);\n\n //noinspection UnnecessaryLocalVariable,UnusedDeclaration,UnusedAssignment\n Set<String> interestingIds = new HashSet<>();\n\n\n for (int i = 0; i < spectrums.length; i++) {\n ISpectrum psm1 = spectrums[i];\n String id1 = psm1.getId();\n if (!INTERESTING_ID_SET.contains(id1))\n continue; // not an interesting case\n\n for (int j = i + 1; j < spectrums.length; j++) {\n ISpectrum psm2 = spectrums[j];\n\n String id2 = psm2.getId();\n if (!INTERESTING_ID_SET.contains(id2))\n continue; // not an interesting case\n\n // System.out.println(\"Comparing \" + id1 + \" \" + id2);\n\n StringBuilder usedPeaksTester = new StringBuilder();\n\n //noinspection UnnecessaryLocalVariable,UnusedDeclaration,UnusedAssignment\n double dotOrg = checker.assessSimilarity(psm1, psm2);\n\n // System.out.println(\"Peaks compared original Frank Et Al (when the code is written)\");\n // print usage\n // System.out.println(usedPeaksTester.toString());\n\n usedPeaksTester.setLength(0); // clear debug output\n double dotNew = currentChecker.assessSimilarity(psm1, psm2);\n\n // print usage\n // System.out.println(\"Peaks compared current Frank Et Al \");\n // System.out.println(usedPeaksTester.toString());\n\n\n }\n\n }\n }",
"public void makeReport()\n\t{\n\t\tif (currentStage[currentSlice-1] > 1)\n\t\t{\n\t\t\tResultsTable rt = new ResultsTable();\n\t\t\tfor (int j=0;j<popSequence.N;j++)\n\t\t\t{\n\t\t\t\tpop = popSequence.PopList[j];\n\t\t\t\tint N = pop.N;\n\t\t\t\tfor (int i=0;i<N;i++)\n\t\t\t\t{\n\t\t\t\t\trt.incrementCounter();\n\t\t\t\t\tBalloon bal;\n\t\t\t\t\tbal = (Balloon)(pop.BallList.get(i));\n\t\t\t\t\tbal.mass_geometry();\n\t\t\t\t\trt.addValue(\"X\",bal.x0);\n\t\t\t\t\trt.addValue(\"Y\",bal.y0);\n\t\t\t\t\trt.addValue(\"Z\",j);\n\t\t\t\t\trt.addValue(\"ID\",bal.id);\n\t\t\t\t\trt.addValue(\"AREA\",bal.area);\n\t\t\t\t\trt.addValue(\"Ixx\",bal.Ixx);\n\t\t\t\t\trt.addValue(\"Iyy\",bal.Iyy);\n\t\t\t\t\trt.addValue(\"Ixy\",bal.Ixy);\n\t\t\t\t\trt.addValue(\"Lx\",bal.lx);\n\t\t\t\t\trt.addValue(\"Ly\",bal.ly);\n\t\t\t\t}\n\t\t\t}\n\t\t\trt.show(\"Report\");\n\t\t\tcurrentSlice = i1.getCurrentSlice();\n\t\t\tipWallSegment = (i1.getStack()).getProcessor(i1.getCurrentSlice());\n\t\t\tpop = popSequence.PopList[currentSlice-1];\n\t\t}\n\t}",
"public void find_girlfriend_func(String boys[] , girl girls[] ,couples_info couples[] , int total_boys , int total_girls ,int total_couples ) throws FileNotFoundException, IOException{\r\n DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(\"find_girlfriend_default.txt\"));\r\n \r\n for(int i=0;i<total_boys;i++){\r\n int j;\r\n for(j=0;j<total_couples;j++){\r\n if(boys[i].equals(couples[j].boyfriend)){\r\n dataoutputstream.writeBytes(boys[i]+\" and \"+couples[j].girlfriend+\" are a couples\\n\");\r\n System.out.println(boys[i]+\" and \"+couples[j].girlfriend+\" are a couples\\n\");\r\n break;\r\n }\r\n \r\n }\r\n if(j>=total_couples){\r\n dataoutputstream.writeBytes(boys[i]+\" is not currently involved in a relation ship\\n\");\r\n System.out.println(boys[i]+\" is not currently involved in a relation ship\\n\");\r\n \r\n }\r\n }\r\n }",
"public void test_caselessmatch14() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch14.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public void test_caselessmatch10() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch10.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"Match createMatch();",
"public static void main(String[] args) throws IOException {\n Reader reader = new FileReader(FILE_NAME);\r\n ReaderLineIterator src = new ReaderLineIterator(reader);\r\n\r\n // sets up a filtered iterator that uses the upper iterator as source\r\n Filter<String> filter = new LineFilter();\r\n FilteringIterator<String> iterator = new FilteringIterator<String>(src, filter);\r\n\r\n // create a writer to save the rows that matched the filter\r\n Writer out = new BufferedWriter(new FileWriter(\"matches.csv\"));\r\n\r\n // initialize counter and timer\r\n int matchCount = 0;\r\n System.out.println(\"Running...\");\r\n long startMillis = System.currentTimeMillis();\r\n\r\n // iterate the entries\r\n while (iterator.hasNext()) {\r\n String row = iterator.next();\r\n out.write(row);\r\n matchCount++;\r\n }\r\n\r\n out.close();\r\n reader.close();\r\n\r\n // output counter and timer values\r\n long elapsedTime = System.currentTimeMillis() - startMillis;\r\n System.out.println(\"Processed file \" + FILE_NAME + \" with \" + src.lineCount() + \" entries \" +\r\n \"within \" + elapsedTime + \"ms (\" + (src.lineCount() * 1000L / elapsedTime) + \" entries per second)\");\r\n System.out.println(\"Found \" + matchCount + \" matches\");\r\n }",
"static void getResults() throws IOException {\n\t\tint k = 2;\n\t\twhile (k <= 7) {\n\t\t\tint j = 1;\n\t\t\tString line;\n\t\t\tString precision = \"\";\n\t\t\tString recall = \"\";\n\t\t\tString fmeasure = \"\";\n\t\t\tString time = \"\";\n\n\n\t\t\twhile (j <= 10) {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\n\t\t\t\t\t\tnew File(ConfigManager.getExperimentFolder() + \"M\" + k + \"/Testbeds-\"+j\n\t\t\t\t\t\t\t\t+ \"/Generated/PSL/test/Precision/F1NoTraining.txt\")));\n\n\t\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\tif (line.contains(\"Precision :\")) {\n\t\t\t\t\t\tprecision += line.replace(\"Precision :\", \"\") + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tif (line.contains(\"Recall:\")) {\n\t\t\t\t\t\trecall += line.replace(\"Recall:\", \"\") + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tif (line.contains(\"Fmeasure:\")) {\n\t\t\t\t\t\tfmeasure += line.replace(\"Fmeasure:\", \"\") + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (line.contains(\"Time:\")) {\n\t\t\t\t\t\ttime += line.replace(\"Time:\", \"\") + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tj++;\n\t\t\t}\n\n\t\t\tSystem.out.print(precision);\n//\t\t\tSystem.out.print(recall);\n//\t\t\tSystem.out.print(fmeasure);\n//\t\t\tSystem.out.print(time);\n\n\t\t\tk++;\n\t\t}\n\t}",
"public void test_caselessmatch15() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch15.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public static void main(String[] args) throws AlignmentException, IOException, URISyntaxException, OWLOntologyCreationException {\n\t\tfinal double threshold = 0.9;\n\t\tfinal String thresholdValue = removeCharAt(String.valueOf(threshold),1);\t\n\t\t\n\t\t/*** 2. Define the folder name holding all ontologies to be matched ***/\t\t\n\t\tFile topOntologiesFolder = new File (\"./files/ATMONTO_AIRM/ontologies\");\n\t\t//File topOntologiesFolder = new File (\"./files/expe_oaei_2011/ontologies\");\n\t\tFile[] ontologyFolders = topOntologiesFolder.listFiles();\n\t\t\n\t\t/*** 3. Define the folder name holding all reference alignments for evaluation of the computed alignments ***/\n\t\t//File refAlignmentsFolder = new File(\"./files/expe_oaei_2011/ref_alignments\");\n\t\tFile refAlignmentsFolder = new File(\"./files/ATMONTO_AIRM/ref_alignments\");\n\n\n\t\t/*** No need to touch these ***/\n\t\tString alignmentFileName = null;\n\t\tFile outputAlignment = null;\n\t\tPrintWriter writer = null;\n\t\tAlignmentVisitor renderer = null;\n\t\tProperties params = new Properties();\n\t\tAlignmentProcess a = null;\n\t\tString onto1 = null;\n\t\tString onto2 = null;\t\t\n\t\tString vectorFile1Name = null;\n\t\tString vectorFile2Name = null;\n\n//\t\t//String matcher\n//\t\tfor (int i = 0; i < ontologyFolders.length; i++) {\n//\n//\t\t\tFile[] files = ontologyFolders[i].listFiles();\n//\n//\t\t\tfor (int j = 1; j < files.length; j++) {\n//\t\t\t\tSystem.out.println(\"Matching \" + files[0] + \" and \" + files[1]);\n//\t\t\t\t\n//\t\t\t\t//used for retrieving the correct vector files and for presenting prettier names of the stored alignments \n//\t\t\t\tonto1 = files[0].getName().substring(files[0].getName().lastIndexOf(\"/\") +1, files[0].getName().lastIndexOf(\"/\") + 4);\n//\t\t\t\tonto2 = files[1].getName().substring(files[1].getName().lastIndexOf(\"/\") +4, files[1].getName().lastIndexOf(\"/\") + 7);\t\n//\t\t\t\t\t\t\t\n//\n//\t\t\t\t//match the files using the ISUBMatcher\n//\t\t\t\ta = new ISubMatcher();\n//\t\t\t\ta.init(files[0].toURI(), files[1].toURI());\n//\t\t\t\tparams = new Properties();\n//\t\t\t\tparams.setProperty(\"\", \"\");\n//\t\t\t\ta.align((Alignment)null, params);\t\n//\t\t\t\t\n//\t\t\t\t//store the computed alignment to file\n//\t\t\t\talignmentFileName = \"./files/expe_oaei_2011/isub_alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"ISub\" + \"-\" + thresholdValue + \".rdf\";\n//\t\t\t\toutputAlignment = new File(alignmentFileName);\n//\t\t\t\t\n//\t\t\t\twriter = new PrintWriter(\n//\t\t\t\t\t\tnew BufferedWriter(\n//\t\t\t\t\t\t\t\tnew FileWriter(outputAlignment)), true); \n//\t\t\t\trenderer = new RDFRendererVisitor(writer);\n//\n//\t\t\t\tBasicAlignment ISubAlignment = (BasicAlignment)(a.clone());\n//\t\t\t\t\t\t\t\n//\t\t\t\t//remove all correspondences with similarity below the defined threshold\n//\t\t\t\tISubAlignment.cut(threshold);\n//\n//\t\t\t\tISubAlignment.render(renderer);\n//\t\t\t\t\n//\t\t\t\tSystem.err.println(\"The ISub alignment contains \" + ISubAlignment.nbCells() + \" correspondences\");\n//\t\t\t\twriter.flush();\n//\t\t\t\twriter.close();\n//\t\t\t\t\n//\t\t\t\tSystem.out.println(\"\\nMatching with ISub Matcher completed!\");\n//\n//\t\t\t}\n//\t\t}\n\t\t\n\t\t //WEMatcher\n\t\t for (int i = 0; i < ontologyFolders.length; i++) {\n\n\t\t\tFile[] files = ontologyFolders[i].listFiles();\n\n\t\t\tfor (int j = 1; j < files.length; j++) {\n\t\t\t\tSystem.out.println(\"Matching \" + files[0] + \" and \" + files[1]);\n\t\t\t\t\n\t\t\t\t//used for retrieving the correct vector files and for presenting prettier names of the stored alignments \n\t\t\t\tonto1 = files[0].getName().substring(files[0].getName().lastIndexOf(\"/\") +1, files[0].getName().lastIndexOf(\"/\") + 4);\n\t\t\t\tonto2 = files[1].getName().substring(files[1].getName().lastIndexOf(\"/\") +4, files[1].getName().lastIndexOf(\"/\") + 7);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t//get the relevant vector files for these ontologies\n//\t\t\t\tvectorFile1Name = \"./files/expe_oaei_2011/vector-files-single-ontology/vectorOutput-\" + onto1 + \".txt\";\n//\t\t\t\tvectorFile2Name = \"./files/expe_oaei_2011/vector-files-single-ontology/vectorOutput-\" + onto2 + \".txt\";\n\t\t\t\tvectorFile1Name = \"./files/ATMONTO_AIRM/vector-files-single-ontology/vectorOutput-\" + onto1 + \".txt\";\n\t\t\t\tvectorFile2Name = \"./files/ATMONTO_AIRM/vector-files-single-ontology/vectorOutput-\" + onto2 + \".txt\";\n\n\t\t\t\t//match the files using the WEGlobalMatcher\n\t\t\t\ta = new WEGlobalMatcher(vectorFile1Name, vectorFile2Name);\n\t\t\t\ta.init(files[0].toURI(), files[1].toURI());\n\t\t\t\tparams = new Properties();\n\t\t\t\tparams.setProperty(\"\", \"\");\n\t\t\t\ta.align((Alignment)null, params);\t\n\t\t\t\t\n\t\t\t\t//store the computed alignment to file\n//\t\t\t\talignmentFileName = \"./files/expe_oaei_2011/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WEGlobal\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\talignmentFileName = \"./files/ATMONTO_AIRM/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WEGlobal\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\toutputAlignment = new File(alignmentFileName);\n\t\t\t\t\n\t\t\t\twriter = new PrintWriter(\n\t\t\t\t\t\tnew BufferedWriter(\n\t\t\t\t\t\t\t\tnew FileWriter(outputAlignment)), true); \n\t\t\t\trenderer = new RDFRendererVisitor(writer);\n\n\t\t\t\tBasicAlignment WEGlobalAlignment = (BasicAlignment)(a.clone());\n\t\t\t\t\t\t\t\n\t\t\t\t//remove all correspondences with similarity below the defined threshold\n\t\t\t\tWEGlobalAlignment.cut(threshold);\n\n\t\t\t\tWEGlobalAlignment.render(renderer);\n\t\t\t\t\n\t\t\t\tSystem.err.println(\"The WEGlobal alignment contains \" + WEGlobalAlignment.nbCells() + \" correspondences\");\n\t\t\t\twriter.flush();\n\t\t\t\twriter.close();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nMatching with WEGlobal Matcher completed!\");\n\t\t\t\t\n\t\t\t\t//match the files using the WELabelMatcher\n\t\t\t\ta = new WELabelMatcher(vectorFile1Name, vectorFile2Name);\n\t\t\t\ta.init(files[0].toURI(), files[1].toURI());\n\t\t\t\tparams = new Properties();\n\t\t\t\tparams.setProperty(\"\", \"\");\n\t\t\t\ta.align((Alignment)null, params);\t\n\t\t\t\t\n\t\t\t\t//store the computed alignment to file\n//\t\t\t\talignmentFileName = \"./files/expe_oaei_2011/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WELabel\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\talignmentFileName = \"./files/ATMONTO_AIRM/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WELabel\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\toutputAlignment = new File(alignmentFileName);\n\t\t\t\t\n\t\t\t\twriter = new PrintWriter(\n\t\t\t\t\t\tnew BufferedWriter(\n\t\t\t\t\t\t\t\tnew FileWriter(outputAlignment)), true); \n\t\t\t\trenderer = new RDFRendererVisitor(writer);\n\n\t\t\t\tBasicAlignment WELabelAlignment = (BasicAlignment)(a.clone());\n\t\t\t\t\t\t\t\n\t\t\t\t//remove all correspondences with similarity below the defined threshold\n\t\t\t\tWELabelAlignment.cut(threshold);\n\n\t\t\t\tWELabelAlignment.render(renderer);\n\t\t\t\t\n\t\t\t\tSystem.err.println(\"The WELabel alignment contains \" + WELabelAlignment.nbCells() + \" correspondences\");\n\t\t\t\twriter.flush();\n\t\t\t\twriter.close();\n\t\t\t\tSystem.out.println(\"Matching with WELabel Matcher completed!\");\n\t\t\t}\n\t\t}\n}",
"@Test(timeout = TIMEOUT)\n public void boyerMoore() {\n assertEquals(ans, PatternMatching.boyerMoore(pattern, text, comparator));\n assertTrue(comparator.getComparisonCount() != 0);\n assertEquals(11, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n pattern: aaba\n text: aabaacaadaabaaba\n */\n assertEquals(ans1, PatternMatching.boyerMoore(pattern1, text1, comparator));\n assertTrue(comparator.getComparisonCount() != 0);\n assertEquals(20, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n No match case\n pattern: aabcaabd\n text: aabaacaadaabaaba\n */\n assertEquals(empty, PatternMatching.boyerMoore(wrong, text1, comparator));\n assertTrue(comparator.getComparisonCount() != 0);\n assertEquals(6, comparator.getComparisonCount());\n\n comparator.clear();\n\n /*\n Longer text\n */\n assertEquals(empty, PatternMatching.boyerMoore(text, pattern, comparator));\n assertEquals(0, comparator.getComparisonCount());\n }",
"public static void main(String[] args) {\n\t\t\n\t\tHashMap<String,Integer> hm = new HashMap<String,Integer>();\n\t\tint index = 1;\n\t\ttry {\n\t\t\t\n\t\t\tint[][] adjmatrix = new int[760][760];\n\t\t\t\n\t\t\tfor(int i=1;i<=750;i++)\n\t\t\t{\n\t\t\t\tfor(int j=1;j<=750;j++)\n\t\t\t\t{\n\t\t\t\t\tadjmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tFile file2 = new File(\"/home/swijal/Desktop/social/kavanamutual.txt\");\n\t\t\tFileReader fileReader2 = new FileReader(file2);\n\t\t\tBufferedReader bufferedReader2 = new BufferedReader(fileReader2);\n\t\t\t\n\t\t\tFile fout = new File(\"/home/swijal/Desktop/social/kavana_mapping_out.txt\");\n\t\t\tFileOutputStream fos = new FileOutputStream(fout);\n\t\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos));\n\t\t\t\n\t\t\tFile fout1 = new File(\"/home/swijal/Desktop/social/adjmat_kavana.txt\");\n\t\t\tFileOutputStream fos1 = new FileOutputStream(fout1);\n\t\t\tBufferedWriter bw1 = new BufferedWriter(new OutputStreamWriter(fos1));\n\t\t\t\n\t\t\tFile file = new File(\"/home/swijal/Desktop/social/numbering_kavana.txt\");\n\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tString line;\n\t\t\tString friend1 = \"\";\n\t\t\tString friend2 = \"\";\n\n\t\t\t//numbering\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tif(!hm.containsKey(line))\n\t\t\t\t{\n\t\t\t\t\thm.put(line, index);\n\t\t\t\t\tbw.write(line+\", \"+index);\n\t\t\t\t\tbw.newLine();\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(hm.size());\n\t\t\t//adj matrix\n\t\t\twhile ((line = bufferedReader2.readLine()) != null) {\n\t\t\t\tfriend1 = \"\";\n\t\t\t\tfriend2 = \"\";\n\t\t\t\t\n\t\t\t\tString[] ar=line.split(\",\");\n\t\t\t\t\n\t\t\t\tfriend1 = ar[0];\n\t\t\t\tfriend2 = ar[1];\n\t\t\t\tSystem.out.println(friend1 +\" : \"+ friend2);\n\t\t\t\tint p=0,q=0;\n\t\t\t\t\n\t\t\t\tif(hm.containsKey(friend1))\n\t\t\t\t\tp = hm.get(friend1);\n\t\t\t\t\n\t\t\t\tif(hm.containsKey(friend2))\n\t\t\t\t\tq = hm.get(friend2);\n\t\t\t\t\n\t\t\t\tadjmatrix[p][q] = 1;\n\t\t\t\tadjmatrix[q][p] = 1;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=1;i<=750;i++)\n\t\t\t{\n\t\t\t\tbw1.newLine();\n\t\t\t\tfor(int j=1;j<=750;j++)\n\t\t\t\t{\n\t\t\t\t\tbw1.write(adjmatrix[i][j]+\",\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*for(int i=0;i<750;i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tfor(int j=0;j<750;j++)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(adjmatrix[i][j]+ \" \");\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tfileReader2.close();\n\t\t\tfileReader.close();\n\t\t\tbw.close();\n\t\t\tbw1.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void test_caselessmatch03() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch03.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public static void main(String[] args) {\n Double BRGames = 30.9; //Number of games appeared for Babe Ruth\n Double BRAB = 23.0; // At Bat, Number of official bats minus sacrifices, walks, hits by pitcher\n Double BRR = 6.6; // Number of times baserunner safely reaches home plate\n Double BRH = 6.5;//Number of times batter hits ball and reaches bases safely\n Double BR2B = 16.4;//Number of times batter hits ball and reaches second base\n Double BR3B = 14.0; //Number of times batter hits ball and reaches third base\n Double BRHR = 1.5; // Number of times batter hits ball and reaches home plate scoring a run\n Double BRRBI = 1.1;//Number of runs that score safely due to batter hitting ball and drawing a base on balls\n Double BRBB = 3.0; //Number of walks by batter\n Double BRSO = 5.9; //Number of strike outs by batter\n Double BRSB = 3.7; //Number of times bases stolen by batter\n Double BRAVG = 7.1; //The average number of hits by batter defined by hits divided by at bats\n\n //Stats for Ty Cobb, TC for Ty Cobb\n Double TCGames = 30.0; //Number of games appeared for Babe Ruth\n Double TCAB = 38.0; // At Bat, Number of official bats minus sacrifices, walks, hits by pitcher\n Double TCR = 6.6; // Number of times baserunner safely reaches home plate\n Double TCH = 6.5;//Number of times batter hits ball and reaches bases safely\n Double TC2B = 16.4;//Number of times batter hits ball and reaches second base\n Double TC3B = 14.0; //Number of times batter hits ball and reaches third base\n Double TCHR = 1.5; // Number of times batter hits ball and reaches home plate scoring a run\n Double TCRBI = 1.1;//Number of runs that score safely due to batter hitting ball and drawing a base on balls\n Double TCBB = 3.0; //Number of walks by batter\n Double TCSO = 5.9; //Number of strike outs by batter\n Double TCSB = 3.7; //Number of times bases stolen by batter\n Double TCAVG = 7.1; //The average number of hits by batter defined by hits divided by at bats\n String player;\n\n\n if (BRGames > TCGames) {\n player = \"Babe Ruth\";\n } else {\n player = \"Ty Cobb\";\n }\n System.out.println(player + \" appeared in more games baseball games \");\n //Who's been in more Baseball Games on Average, career\n if (BRAB > TCAB) {\n player = \"Babe Ruth\";\n } else {\n player = \"Ty Cobb\";\n }\n System.out.println(player + \" appeared in more games baseball games \");\n //Who's been at Bat on average more times, career\n }",
"public static void main(String[] args) throws IOException {\n\t\tString groundTruthPath = \"C:/Users/15T-J000/Desktop/Malware_Classes_Ground_Truth.csv\";\n\t\tString resultPath = \"C:/Users/15T-J000/Desktop/sysnumresult.csv\";\n\t\tString outPath = \"C:/Users/15T-J000/Desktop/correction.csv\";\n\t\t\n\t\tint[] eachResult = {16, 17}; // Don't count index and name column (-2)\n\t\t\n\t\tMapping mapping = new Mapping();\n\t\tmapping.read(groundTruthPath, resultPath);\n\t\tmapping.compare(outPath, 17);\n\n\t}",
"public void matchesDemo() \n {\n Map<String, Set<String>> clientMap = new HashMap<>();\n Set<String> interests = new HashSet<>();\n\n interests.add(\"Food\");\n interests.add(\"Wine\");\n interests.add(\"Tandems\");\n clientMap.put(\"Hal\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Walking\");\n interests.add(\"Welding\");\n clientMap.put(\"Gemma\", interests);\n\t \n interests = new HashSet<>();\n interests.add(\"Food\");\n interests.add(\"Cinema\");\n interests.add(\"Wine\");\n clientMap.put(\"Caroline\", interests);\n\n Set<String> halsInterests = clientMap.get(\"Hal\");\n String outputString;\n Set<String> eachClientInterests;\n Set<String> intersection;\n\n for (String eachClient : clientMap.keySet()) \n {\n eachClientInterests = clientMap.get(eachClient);\n intersection = new HashSet<>(halsInterests);\n intersection.retainAll(eachClientInterests);\n outputString = \"Hal and \" + eachClient \n + \" have common interests: \"\n + intersection;\n System.out.println(outputString) ;\n }\n }",
"public void test_caselessmatch13() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch13.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"public void print()\n/* */ {\n/* 226 */ boolean emptyTarget = true;\n/* 227 */ Iterator it; if ((this.subjects != null) && (this.subjects.size() > 0)) {\n/* 228 */ System.out.println(\"\\nSubjects ---->\");\n/* 229 */ emptyTarget = false;\n/* 230 */ for (it = this.subjects.iterator(); it.hasNext();)\n/* 231 */ ((MatchList)it.next()).print();\n/* */ }\n/* 234 */ if ((this.resources != null) && (this.resources.size() > 0)) {\n/* 235 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Resources ---->\");\n/* 236 */ emptyTarget = false;\n/* 237 */ for (it = this.resources.iterator(); it.hasNext();)\n/* 238 */ ((MatchList)it.next()).print();\n/* */ }\n/* 241 */ if ((this.actions != null) && (this.actions.size() > 0)) {\n/* 242 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Actions ---->\");\n/* 243 */ emptyTarget = false;\n/* 244 */ for (it = this.actions.iterator(); it.hasNext();)\n/* 245 */ ((MatchList)it.next()).print();\n/* */ }\n/* 248 */ if ((this.environments != null) && (this.environments.size() > 0)) {\n/* 249 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Environments ---->\");\n/* 250 */ emptyTarget = false;\n/* 251 */ for (it = this.environments.iterator(); it.hasNext();) {\n/* 252 */ ((MatchList)it.next()).print();\n/* */ }\n/* */ }\n/* 255 */ if (emptyTarget) System.out.print(\"EMPTY\");\n/* */ }",
"public void writeToHTML(Match match) {\n ArrayList<String> template = new ArrayList<>();\n ArrayList<String> html = new ArrayList<>();\n ArrayList<Player> roster = new ArrayList<>();\n roster.addAll(match.getRoster().getAllPlayers());\n \n Scanner read = null;\n String fileTemplate = \"template.html\";\n String filePrint = match.getDate().toStringShort() \n + \"_\" + match.getOpponent() + \".html\";\n \n try {\n FileInputStream fileIn = new FileInputStream(fileTemplate);\n read = new Scanner(fileIn);\n }\n catch(FileNotFoundException e) {\n displayErrorMessage(\"File not found\", filePrint);\n }\n while(read.hasNext()) {\n template.add(read.nextLine());\n }\n read.close();\n \n String line = \"\";\n \n for(int i=0; i<template.size(); i++) {\n line = template.get(i);\n \n // Check match for null values\n String date, opponent, start, location, type;\n if(match.getDate().toStringShort().equals(\"0-00-00\")) {\n date = \"\"; \n } else {\n date = match.getDate().toStringShort();\n }\n if(match.getOpponent() == null) {\n opponent = \"\";\n } else {\n opponent = match.getOpponent();\n }\n if(match.getDate().toStringTime().equals(\"00:00\")) {\n start = \"\";\n } else {\n start = match.getDate().toStringTime();\n }\n if(match.getLocation() == null) {\n location = \"\";\n } else {\n location = match.getLocation();\n }\n if(match.getMatchType() == MatchType.none) {\n type = \"\";\n } else {\n type = match.getMatchType().toString();\n }\n \n // Replace values\n if(line.contains(\"$match\")) {\n line = line.replace(\"$match\",\n date + \" - \" + opponent);\n html.add(line);\n } else if(line.contains(\"$start\")) {\n line = line.replace(\"$start\", start);\n html.add(line);\n } else if(line.contains(\"$location\")) {\n line = line.replace(\"$location\", location);\n html.add(line);\n } else if(line.contains(\"$type\")) {\n line = line.replace(\"$type\", type);\n html.add(line);\n } else if(line.contains(\"$number\")) {\n \n // Replace values for each player\n for(int j=0; j<roster.size(); j++) {\n String temp = line;\n Player player = roster.get(j);\n String number, firstName=null, lastName, name=\"\", position;\n \n // Check player for null values\n if(player.getNumber() < 0) {\n number = \"\";\n } else {\n number = Integer.toString(player.getNumber());\n }\n if(player.getLastname() == null) {\n lastName = \"\"; \n } else {\n lastName = player.getLastname();\n name += lastName;\n }\n if(player.getFirstname() == null) {\n firstName = \"\";\n } else {\n firstName = String.valueOf(player.getFirstname().charAt(0));\n if(!(lastName.equals(\"\"))) {\n name += \", \";\n }\n name += firstName + \".\";\n }\n if(player.getPreferredPosition() == PositionType.none) {\n position = \"\";\n } else {\n position = player.getPreferredPosition().toString();\n }\n \n // Replace values in temp line\n temp = temp.replace(\"$number\", number);\n temp = temp.replace(\"$name\", name);\n temp = temp.replace(\"$position\",position);\n \n html.add(temp);\n } \n } else {\n html.add(line);\n }\n }\n PrintWriter write = null;\n try {\n FileOutputStream fileOut = new FileOutputStream(filePrint);\n write = new PrintWriter(fileOut);\n \n for(int i=0; i < html.size(); i++) {\n write.println(html.get(i));\n }\n }\n catch(FileNotFoundException e)\n {\n displayErrorMessage(\"File not found\", filePrint);\n }\n write.close();\n \n Alert printAlert = new Alert(Alert.AlertType.INFORMATION, filePrint + \" is ready for printing\", ButtonType.OK);\n printAlert.setTitle(\"Print Information\");\n printAlert.setHeaderText(null);\n printAlert.showAndWait();\n if(printAlert.getResult() == ButtonType.OK);\n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tReadXMLFile xmlReader = new ReadXMLFile();\n\n\t\t\tfor (HashMap<String, String> document : xmlReader\n\t\t\t\t\t.getRandomDocuments(12)) {\n\t\t\t\tfor (String key : document.keySet()) {\n\t\t\t\t\tSystem.out.println(key + \" : \" + document.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (XMLStreamException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Test - Match\n\n\t\t// try {\n\t\t// ReadXMLFile xmlReader = new ReadXMLFile();\n\t\t// String title_query = \"parser\";\n\t\t// HashMap<String, String> query = new HashMap<String, String>();\n\t\t// query.put(\"title\", title_query);\n\t\t// // query.put(\"year\", \"1996\");\n\t\t// System.out.println(\"First-----------------------\");\n\t\t// for (HashMap<String, String> document : xmlReader.getQueryNodes(\n\t\t// query, 20, true)) {\n\t\t// for (String key : document.keySet()) {\n\t\t// System.out.println(key + \" : \" + document.get(key));\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// System.out.println(\"Second-----------------------\");\n\t\t// for (HashMap<String, String> document : xmlReader.getQueryNodes(\n\t\t// query, 10, true)) {\n\t\t// for (String key : document.keySet()) {\n\t\t// System.out.println(key + \" : \" + document.get(key));\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// System.out.println(\"Done\");\n\t\t// } catch (XMLStreamException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// } catch (IOException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\n\t\t// String workingDir = System.getProperty(\"user.dir\");\n\t\t// System.out.println(\"Current working directory : \" + workingDir);\n\n\t\t// Get node count in extract\n\n\t\t// try {\n\t\t// ReadXMLFile xmlReader = new ReadXMLFile();\n\t\t// System.out.println(xmlReader.getNodeCount());\n\t\t// } catch (XMLStreamException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// } catch (IOException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\n\t}",
"public static void main(String[] args) throws IOException {\n List<String> lines = ResourcesFiles.readLinesInResources(\"wmpf.txt\");\r\n List<String> oneSet = ResourcesFiles.readLinesInResources(\"wmpf-single.txt\");\r\n\r\n Map<String, List<Word>> results = new TableMakeShort().makeSort(lines, oneSet);\r\n\r\n File outFile = new File(\"out\",\"wmff-out.txt\");\r\n List<Word> result = results.get(\"result\");\r\n writeTo(result, outFile);\r\n System.out.println(\"保存到:\" + outFile.getAbsolutePath());\r\n\r\n File outFullFile = new File(\"out\",\"wmff-full.txt\");\r\n List<Word> full = results.get(\"full\");\r\n writeTo(full, outFullFile);\r\n System.out.println(\"保存到:\" + outFullFile.getAbsolutePath());\r\n\r\n File outOtherFile = new File(\"out\",\"wmff-other.txt\");\r\n List<Word> sp = results.get(\"uncommon\");\r\n writeTo(sp, outOtherFile);\r\n System.out.println(\"保存到:\" + outOtherFile.getAbsolutePath());\r\n }",
"void generateMgiCrisprAlleleReport();",
"boolean generateReport();",
"private void outputMatchedLines(Pattern grepPattern, BufferedReader reader, BufferedWriter writer) throws IOException {\n String line = null;\n while ((line = reader.readLine()) != null) {\n Matcher matcher = grepPattern.matcher(line);\n if (matcher.find()) {\n writer.write(line);\n writer.write(System.getProperty(\"line.separator\"));\n writer.flush();\n }\n }\n }",
"public static void main(String[] args) {\n\t\tString great_association_rule =\"singlenearestgene\";\n\t\t\n\t\t//String filename = \"C:\\\\Users\\\\Burçak\\\\Google Drive\\\\GLANET_Bioinformatics_2ndSubmission\\\\GREAT\\\\great_twonearestgenes_found_enriched_BP_GO_Terms.txt\";\n\t\tString filename = \"C:\\\\Users\\\\Burçak\\\\Google Drive\\\\GLANET_Bioinformatics_2ndSubmission\\\\GREAT\\\\great_singlenearestgene_found_enriched_BP_GO_Terms.txt\";\n\t\tList<String> great_enriched_BP_GOTermNames_List = new ArrayList<String>();\n\t\treadFileAndFill(filename,great_enriched_BP_GOTermNames_List);\n\t\t\n\t\tSystem.out.println(\"Number of GO Term Names found enriched by GREAT: \" + great_enriched_BP_GOTermNames_List.size());\n\t\t\n\t\t//Fill GOTermName 2 GOTermID map\n\t\tString GOID2TermInputFile = \"C:\\\\Users\\\\Burçak\\\\Google Drive\\\\Data\\\\\" + Commons.GENE_ONTOLOGY_TERMS + System.getProperty(\"file.separator\") + Commons.GOID2TERM_INPUTFILE;\n\t\tMap<String,String> GOTermName2GOTermIDMap = new HashMap<String,String>();\n\t\tGOTermsUtility.fillGOTermName2GOTermIDMap(GOID2TermInputFile, GOTermName2GOTermIDMap);\n\t\t\n\t\t//output the converted GO Term IDs\n\t\t//GOTermList_GATA2_P= c(\"GO:0006351\",\"GO:0035854\",\"GO:0045599\",\"GO:0045746\",\"GO:0045766\",\"GO:0045944\",\"GO:0070345\",\"GO:2000178\")\n\t\tString great_enriched_BP_GOTermIDs = creatGOTermIDString(great_association_rule,great_enriched_BP_GOTermNames_List,GOTermName2GOTermIDMap);\n\t\t\n\t\tSystem.out.println(\"**************************************************\");\n\t\tSystem.out.println(great_enriched_BP_GOTermIDs);\n\n\t}",
"public String DetectIncorrects(ArrayList<ListArt> listNode2, Label recordClassLabel, String FindNode, float Equals, String NameNode, int numberOfFriends,\r\n\t\t\tString output, int j)\r\n\t{\r\n\t\tfloat NumberCross = 0;\r\n\t\tfloat percentage = 0;\r\n\t\tdouble ValidPerc = 0.60;\r\n//\t\tdouble ValidPerc = 0.50;\r\n//\t\tdouble ValidPerc = 0.40;\r\n\r\n\t\tint redi= 0;\r\n\t\tint singleton=0;\r\n\t\ttry ( Transaction tx = graphDb.beginTx() )\r\n\t\t{\r\n\t\t\tFindNode = listNode2.get(j).getWikiid();\r\n\r\n\t\t\tResourceIterator<Node> it = graphDb.findNodes(recordClassLabel, \"wikiid\", FindNode);\r\n\r\n\t\t\tNode neoNode \t\t\t = null; \r\n\t\t\twhile( it.hasNext() )\r\n\t\t\t{ \r\n\t\t\t\tneoNode = it.next(); \r\n\t\t\t\tString lang = (String)neoNode.getProperty(\"lang\"); \r\n\t\t\t\tif ( lang.equals(listNode2.get(j).getLang()) ) \r\n\t\t\t\t\tbreak;\r\n\t\t\t} \r\n\t\t\tNode start = neoNode;\r\n\r\n\t\t\tTraversalDescription myFriends = graphDb.traversalDescription()\r\n\t\t\t\t\t.breadthFirst()\r\n\t\t\t\t\t.relationships(Rels.crosslink, Direction.OUTGOING)\r\n\t\t\t\t\t.evaluator( Evaluators.atDepth( 1 ) );\r\n\t\t\tTraverser traverser = myFriends.traverse( start );\r\n\t\t\tfor( Node friend : traverser.nodes() )\r\n\t\t\t{\r\n\t\t\t\tNumberCross = NumberCross + 1;\r\n\t\t\t}\r\n\t\t\t\r\n//--------------------------------------------------------------------------\r\n\t\t\tif(listNode2.size() == 2){\r\n\t\t\t\tfor (int i=0; i<listNode2.size(); i++){\r\n\t\t\t\t\tfor( Node friend : traverser.nodes() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (friend.getProperty(\"wikiid\").equals(listNode2.get(0).getWikiid())){\r\n\t\t\t\t\t\t\tsingleton ++;\r\n\t\t\t\t\t\t\tbreak;\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(singleton == 0){\r\n\t\t\t\t\t\tListIncorrects.add(listNode2.get(0).getWikiid()+\"-\"+listNode2.get(0).getLang()+\"--\"+\r\n\t\t\t\t\t\t\t\t\t\t (String) start.getProperty(\"wikiid\")+\"-\"+(String) start.getProperty(\"lang\")); // add to ListIncorrects the nodes\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n//--------------------------------------------------------------------------\r\n\t\t\tif (listNode2.size() >= 3){\r\n\t\t\t\tfor( Node friend : traverser.nodes() )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor (int i=0; i<1; i++){\r\n\t\t\t\t\t\tif(friend.getProperty(\"wikiid\").equals(listNode2.get(0).getWikiid())){\r\n\t\t\t\t\t\t\tredi ++;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\tif(redi == 0){\r\n\t\t\t\t\t\tListIncorrects.add(listNode2.get(0).getWikiid()+\"-\"+listNode2.get(0).getLang()+\"--\"+\r\n\t\t\t\t\t\t\t\t\t\t\t(String) start.getProperty(\"wikiid\")+\"-\"+(String) start.getProperty(\"lang\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\r\n//----------------------------------------------------------------------------\t\t\t\r\n\t\t\t\tif(redi > 0){\r\n\t\t\t\t\tfor( Node friend : traverser.nodes() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (int i=0; i<listNode2.size(); i++){\r\n\t\t\t\t\t\t\tif (friend.getProperty(\"wikiid\").equals(listNode2.get(i).getWikiid())){\r\n\t\t\t\t\t\t\t\tEquals ++;\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\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(NumberCross >=3){\r\n\t\t\t\t\t\tpercentage = Equals/NumberCross;\r\n\t\t\t\t\t\tif(percentage < ValidPerc){\r\n\t\t\t\t\t\t\tListIncorrects.add(listNode2.get(0).getWikiid()+\"-\"+ listNode2.get(0).getLang()+\"--\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t(String) start.getProperty(\"wikiid\")+ \"-\"+(String) start.getProperty(\"lang\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(NumberCross == 0){\r\n\t\t\t\t\t\tListIncorrects.add(listNode2.get(0).getWikiid()+\"-\"+ listNode2.get(0).getLang()+\"--\"+\r\n\t\t\t\t\t\t\t\t\t\t\t(String) start.getProperty(\"wikiid\")+\"-\"+(String) start.getProperty(\"lang\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(NumberCross == 2 ){\r\n\t\t\t\t\t\tpercentage = Equals/NumberCross;\r\n\t\t\t\t\t\tif(percentage < ValidPerc){\r\n\t\t\t\t\t\t\tListIncorrects.add(listNode2.get(0).getWikiid()+\"-\"+listNode2.get(0).getLang()+\"--\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t(String) start.getProperty(\"wikiid\")+\"-\"+(String) start.getProperty(\"lang\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t}",
"public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}",
"private static List<FACMatch> findFACMatches(List<MACMatch> macMatches, List<Concept> entities) throws Exception\n\t{\n\t\tSystem.out.println(\"findingFACMatches\");\n\t\t\n\t\tConcept[] seedPair = new Concept[2];\n\t\tList<FACMatch> topMatches = new ArrayList<FACMatch>();\n\t\tPriorityQueue<FACMatch> pq = new PriorityQueue<FACMatch>();\n\t\tint matchNumber = 0;\n\t\t\n\t\tfor(MACMatch mm : macMatches)\n\t\t{\n\t\t\tConcept c = mm.match;\n\t\t\tseedPair[0] = mm.probe;\n\t\t\tseedPair[1] = c;\n\t\t\tList<Concept[]> seedPairs = new ArrayList<Concept[]>();\n\t\t\tseedPairs.add(seedPair);\n\t\t\tDirectedGraphAdapter<Concept> mapping = AnalogyEngine.map(seedPairs, entities);\n\t\t\tdouble scoreRaw = calculateAnalogyQuality(mapping);\n\t\t\t//normalize score\n\t\t\tdouble sim1 = calculateSelfSimilarityScore(mapping.getParents());\n\t\t\tdouble sim2 = calculateSelfSimilarityScore(mapping.getChildren());\n\t\t\tdouble scoreNormalized = scoreRaw / Math.sqrt(sim1 * sim2);\n\t\t\tFACMatch fm = new FACMatch(mapping, scoreRaw, scoreNormalized, seedPair[0], seedPair[1]);\n\t\t\tif(mm.sourceCapstone != null)\n\t\t\t{\n\t\t\t\tfm.sourceCapstone = mm.sourceCapstone;\n\t\t\t}\n\t\t\tif(mm.targetCapstone != null)\n\t\t\t{\n\t\t\t\tfm.targetCapstone = mm.targetCapstone;\n\t\t\t}\n\t\t\tpq.add(fm);\n\t\t\t\n\t\t\t//TODO need to get MAC value and FAC values for output... \n\t\t\tfacWriter.append(mm.simScore + \" \" + fm.scoreRaw + \" \" + fm.scoreNormalized + \"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t\tdouble maxScore;\n\t\tif(pq.isEmpty())\n\t\t{\n\t\t\tmaxScore = 0;\n\t\t}else{\n\t\t\tmaxScore = pq.peek().scoreRaw;\n\t\t}\n\t\tdouble scoreBound = maxScore * (1-facWidth);\n\t\tSystem.out.println();\n\t\tfor(FACMatch fm : pq)\n\t\t{\n\t\t\tif(fm.scoreRaw >= scoreBound && fm.scoreRaw >= facThreshold && matchNumber < facMaxMatches)\n\t\t\t{\n\t\t\t\ttopMatches.add(fm);\n\t\t\t\tmatchNumber++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"facMatchNumber:\" + matchNumber + \" :: score:\" + fm.scoreRaw);\n\t\t\t\t//facWriter.write(Double.toString(fm.score) + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(topMatches.size() == 0)\n\t\t{\n\t\t\tSystem.err.println(\"No FACMatches found\");\n\t\t}\n\t\treturn topMatches;\n\t}",
"public static ResultModel search(String text, String pattern) {\n long startTime = System.nanoTime();\n ResultModel Result = new ResultModel();\n String positionText = \"\";\n int Count = 0;\n // Write your code here\n int M = pattern.length(); \n int N = text.length(); \n int i, j; \n int p = 0; // hash value for pattern \n int t = 0; // hash value for txt \n int h = 1; \n \n // The value of h would be \"pow(d, M-1)%q\" \n for (i = 0; i < M-1; i++) {\n h = (h*d)%q; \n }\n // Calculate the hash value of pattern and first \n // window of text \n for (i = 0; i < M; i++) \n { \n p = (d*p + pattern.charAt(i))%q; \n t = (d*t + text.charAt(i))%q; \n\n\n } \n \n \n // Slide the pattern over text one by one \n for (i = 0; i <= N - M; i++) \n { \n \n // Check the hash values of current window of text \n // and pattern. If the hash values match then only \n // check for characters on by one \n if ( p == t ) \n { \n /* Check for characters one by one */\n for (j = 0; j < M; j++) \n { \n if (text.charAt(i+j) != pattern.charAt(j)) \n break; \n } \n \n // if p == t and pat[0...M-1] = txt[i, i+1, ...i+M-1] \n if (j == M) { \n \tCount ++;\n\t // return i\n\t if(positionText == \"\") {\n\t positionText += (i+ 1) + \"th\";\n\t }else {\n\t positionText = positionText + \", \" + (i+1) + \"th\";\n\t }\n }\n } \n \n // Calculate hash value for next window of text: Remove \n // leading digit, add trailing digit \n if ( i < N-M ) \n { \n\n t = (d*(t - text.charAt(i)*h) + text.charAt(i+M))%q; \n \n // We might get negative value of t, converting it \n // to positive \n if (t < 0) {\n\n t = (t + q); \n }\n \n } \n \n } \n\n //End of code\n\n long endTime = System.nanoTime();\n long totalTime = endTime - startTime;\n\n Result.setExecutionTime(TimeUnit.NANOSECONDS.toMillis(totalTime));\n Result.setFoundCount(Count);\n Result.setPosition(positionText);\n return Result;\n }",
"public void Report() throws IOException {\n\t\tFile outputFile = new File(outputPath);\n\n\t\tif(!outputFile.exists()) {\n\t\t\toutputFile.createNewFile();\n\t\t}\n\t\t\n\t\tFileWriter writer = new FileWriter(outputPath);\n\t\tLinkedHashMap<Word, Integer> sortedResult = sortByValue();\n\t\tfloat frequency;\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(Map.Entry<Word, Integer> entry: sortedResult.entrySet()) {\n\t\t\tsb.setLength(0);\n\t\t\t\n\t\t\tfor(char c: entry.getKey().getCharacters()) {\n\t\t\t\tsb.append(c + \", \");\n\t\t\t}\n\t\t\t\n\t\t\tsb.delete(sb.length()-2, sb.length());\n\t\t\tfrequency = (float)entry.getValue()/(float)total_targets;\n\t\t\twriter.write(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\\n\");\n\t\t\t\n\t\t\tSystem.out.println(\"{(\" + sb.toString() + \"), \" + entry.getKey().getLength() +\n\t\t\t\t\t\t\t\t\"} = \" + String.format(\"%.2f\",Math.round(frequency * 100.0) / 100.0) +\n\t\t\t\t\t\t\t\t\" (\" + entry.getValue() + \"/\" + total_targets + \")\");\n\t\t}\n\t\tfrequency = (float)total_targets/(float)total;\n\t\t\n\t\tSystem.out.println(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\");\n\t\twriter.write(\"TOTAL Frequency: \" + Math.round(frequency * 100.0) / 100.0 + \"(\" + total_targets + \"/\" + total + \")\\n\");\n\t\t\n\t\twriter.close();\n\t}",
"@Test\n public void testFindNMatches() {\n List<Path> files = new ArrayList<>();\n files.add(new File(String.join(File.separator, \"src\", \"test\", \"resources\"),\n \"logviewer-search-context-tests.log.test\").toPath());\n files.add(new File(String.join(File.separator, \"src\", \"test\", \"resources\"),\n \"logviewer-search-context-tests.log.gz\").toPath());\n\n final LogviewerLogSearchHandler handler = getSearchHandler();\n\n final List<Map<String, Object>> matches1 = handler.findNMatches(files, 20, 0, 0, \"needle\").getMatches();\n final List<Map<String, Object>> matches2 = handler.findNMatches(files, 20, 0, 126, \"needle\").getMatches();\n final List<Map<String, Object>> matches3 = handler.findNMatches(files, 20, 1, 0, \"needle\").getMatches();\n\n assertEquals(2, matches1.size());\n assertEquals(4, ((List) matches1.get(0).get(\"matches\")).size());\n assertEquals(4, ((List) matches1.get(1).get(\"matches\")).size());\n assertEquals(String.join(File.separator, \"test\", \"resources\", \"logviewer-search-context-tests.log.test\"), matches1.get(0).get(\"fileName\"));\n assertEquals(String.join(File.separator, \"test\", \"resources\", \"logviewer-search-context-tests.log.gz\"), matches1.get(1).get(\"fileName\"));\n\n assertEquals(2, ((List) matches2.get(0).get(\"matches\")).size());\n assertEquals(4, ((List) matches2.get(1).get(\"matches\")).size());\n\n assertEquals(1, matches3.size());\n assertEquals(4, ((List) matches3.get(0).get(\"matches\")).size());\n }",
"static public void main(String[] args) throws IOException{\n\t\tString sample = \"h19x24\";\n\t\tString parentFolder = \"/media/kyowon/Data1/Dropbox/fCLIP/new24/\";\t\t\n\t\tString bedFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.bed\";\n\t\tString dbFasta = \"/media/kyowon/Data1/RPF_Project/genomes/hg19.fa\";\n\t\tString parameterFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.param\";\n\t\t\n\t\tString trainOutFileName = parentFolder + sample + \".train.csv\";\n\t\tString arffTrainOutFileName = parentFolder + sample + \".train.arff\";\n\t\t\n\t\tString cisOutFileName = parentFolder + sample + \".csv\";\n\t\tString transOutFileNameM = parentFolder + sample + \".pair.M.csv\";\n\t\tString transOutFileNameU = parentFolder + sample + \".pair.U.csv\";\n\t\tString transControlOutFileNameM = parentFolder + sample + \".pair.M.AntiSense.csv\";\n\t\tString transControlOutFileNameU = parentFolder + sample + \".pair.U.AntiSense.csv\";\n\t\tString rmskBed = \"/media/kyowon/Data1/fCLIP/Data/cat.rmsk.bed\";\n\t\tString siControlBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siControl_R1_Aligned_Sorted.bed\";\n\t\tString siKDDroshaBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDrosha_R1_Aligned_Sorted.bed\";\n\t\tString siKDDicerBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDicer_R1_Aligned_Sorted.bed\";\n\t\t\n\t\tString cisBed5pFileName = cisOutFileName + \".5p.bed\";\n\t\tString cisBed3pFileName = cisOutFileName + \".3p.bed\";\n\t\t\n\t\tdouble unpairedScoreThreshold = 0.25; \n\t\tdouble pairedScoreThreshold = unpairedScoreThreshold/5;\n\t//\tdouble motifScoreThreshold = 0.15;\n\t\t\n\t\tint num3pPaired = 10;\n\t\tint num5pPaired = 20;\n\t\t\n\t\tString filteredTransOutFileName = transOutFileNameM + \".filtered.csv\";\n\t\t\n\t\tint blatHitThreshold = 100000000;\n\t\tint transPairSeqLength = FCLIP_Scorer.getFlankingNTNumber() *2 + 80;\n\t\t\n\t\tZeroBasedFastaParser fastaParser = new ZeroBasedFastaParser(dbFasta);\n\t\tMirGff3FileParser mirParser = new MirGff3FileParser(\"/media/kyowon/Data1/fCLIP/genomes/hsa_hg19.gff3\");\n\t\tAnnotationFileParser annotationParser = new AnnotationFileParser(\"/media/kyowon/Data1/fCLIP/genomes/hg19.refFlat.txt\");\n\t\tFCLIP_ScorerTrainer.train(parameterFileName, bedFileName, mirParser, annotationParser);\n\t\t\n\t\ttrain(trainOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\t\trunCis(cisOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\n\t\tScoredPositionOutputParser.generateBedFromCsv(cisOutFileName, cisBed5pFileName, cisBed3pFileName, false); // for fold change..\n\t//\tScoredPositionOutputParser.generateFastaForMotif(cisOutFileName, cisOutFileName + \".5p.motif.fa\", cisOutFileName + \".3p.motif.fa\",cisOutFileName + \".motif.m\", \"M\");\n\t\t\n\t\trunTrans(transOutFileNameM, transOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, false);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transOutFileNameM, transOutFileNameM + \".5p.motif.fa\", transOutFileNameM + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(transOutFileNameM + \".rmsk.csv\", transOutFileNameM + \".link.txt\");\n\t//\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t///\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\trunTrans(transControlOutFileNameM, transControlOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, true);\t\t\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transControlOutFileNameM, transControlOutFileNameM + \".5p.motif.fa\", transControlOutFileNameM + \".3p.motif.fa\");\n\t//\tGenerateCircosLinkFiles.run(transControlOutFileNameM + \".rmsk.csv\", transControlOutFileNameM + \".link.txt\");\n\t\t//CheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\tfilterTransPairs(transOutFileNameM, filteredTransOutFileName, num3pPaired, num5pPaired);\n\t\tCheckRepeat.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(filteredTransOutFileName, filteredTransOutFileName + \".5p.motif.fa\", filteredTransOutFileName + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(filteredTransOutFileName + \".rmsk.csv\", filteredTransOutFileName + \".link.txt\");\n\t///\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\t\n\t\t// generate background for drosha and dicer..\n\t\t\n\t\t\n\t\t// motif different conditioin?? \n\t\t\n\t\t\t\t\n\t\t//GenerateDepthsForEncodeDataSets.generate(outFileName, outFileName + \".encode.csv\", annotationParser);\n\t\t\n\t\t\n\t}",
"public void print_metrics(){\n\t\tHashMap<Integer, HashSet<Integer>> pairs=return_pairs();\n\t\tint total=gold.data.getTuples().size();\n\t\ttotal=total*(total-1)/2;\n\t\tSystem.out.println(\"Reduction Ratio is: \"+(1.0-(double) countHashMap(pairs)/total));\n\t\tint count=0;\n\t\tfor(int i:pairs.keySet())\n\t\t\tfor(int j:pairs.get(i))\n\t\t\tif(goldContains(i,j))\n\t\t\t\tcount++;\n\t\tSystem.out.println(\"Pairs Completeness is: \"+(double) count/gold.num_dups);\n\t}",
"public static void main(String[] args) \n\t { \n\t\t \n\t//\t ScrabbleCheater11 cheat = new ScrabbleCheater11();\n\t//\t Dictionary11 dict = new Dictionary11(1,\"C:\\\\words\\\\words-279k.txt\");\n\t \n\t\t MyHashTable11 htable = new MyHashTable11(7591,\"src/lab11_scrabble/wordsList_collins2019.txt\"); \n\t \t\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"against\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"against\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"against\");\n\t \n\t \tSystem.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"airport\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"airport\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"airport\");\n\t \t\n\t \tSystem.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"between\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"between\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"between\");\n\n\t \tSystem.out.println();\n\t\t System.out.print(\"All the words in the bucket where the word \"+ \"\\\"married\\\"\" + \" is located: \");\n\t\t System.out.println();htable.getWordsFromSameBucket(\"married\");\n\t\t System.out.println();\n\t\t System.out.println();\n\t\t htable.findPermutation(\"married\");\n\t\t \n\t\t System.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"ashbdap\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"ashbdap\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"ashbdap\");\n\t \t\n\t \t//test remove and size()\n\t \tSystem.out.println(htable.remove(\"speaned\"));\n\t \tSystem.out.println(htable.get(\"speaned\"));\n\t \tSystem.out.println(htable.size());\n\t }",
"public static void main(String[] args) {\n\t\tAnalyse ana = new Analyse(20, 5);\r\n//\t\tArrayList<Map.Entry<Integer, Double>> current = ana.getNeighbor(\"\")\r\n//\t\tfor(int i = 0; i < ana.average.length; i++){\r\n//\t\t\tSystem.out.println(ana.average[i]);\r\n//\t\t}\r\n//\t\tfor (int i = 0; i < 5; i++) {\r\n//\t\t\tSystem.out.println(ana.heap.get(i).getValue());\r\n//\t\t}\r\n\t\tSystem.out.println(ana.similarity.size());\r\n//\t\tArrayList<Map.Entry<Integer, Double>> record = ana.getNeighbor(\"0155061224\");\r\n//\t\tSystem.out.println(ana.heap.size());\r\n//\t\tSystem.out.println(record.size());\r\n//\t\tfor(int i = 0; i < record.size(); i++){\r\n//\t\t\tSystem.out.println(record.get(i).getKey());\r\n//\t\t\tSystem.out.println(record.get(i).getValue());\r\n////\t\t\tSystem.out.println(ana.matrix[record.get(i).getKey()][ana.read.getItems().indexOf(3149)]);\r\n//\t\t}\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"score\" + ana.predictionBaseline(\"100\"));\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(end - start);\r\n//\t\tSystem.out.println(ana.predictionBaseline(\"0155061224\"));\r\n\t}",
"abstract public void report();",
"public void report() throws IOException {\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"comparisons.txt\", false));\n\t\tfor (Integer[] data : this.comparisons)\n\t\t\twriter.append(data[0] + \" \" + data[1] + \"\\n\");\n\t\twriter.close();\n\t}",
"public static void main(String[] args) {\n MapDictionary<String> dictionary = new MapDictionary<String>();\r\n dictionary.addEntry(new DictionaryEntry<String>(\"50 Cent\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"XYZ120 DVD Player\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"cent\",\"\"));\r\n dictionary.addEntry(new DictionaryEntry<String>(\"dvd player\",\"\"));\r\n\r\n // build the dictionary-chunker:\r\n // dictionary, tokenizer factory, flag1, flag2\r\n // tokenizer will ignore thre blank space in the matching process\r\n // all matches flag:\r\n // sensitive flag: when case sensitivity is enabled, \r\n ExactDictionaryChunker dictionaryChunkerTT\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n true,true);\r\n\r\n ExactDictionaryChunker dictionaryChunkerTF\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n true,false);\r\n\r\n ExactDictionaryChunker dictionaryChunkerFT\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n false,true);\r\n\r\n ExactDictionaryChunker dictionaryChunkerFF\r\n = new ExactDictionaryChunker(dictionary,\r\n IndoEuropeanTokenizerFactory.INSTANCE,\r\n false,false);\r\n\r\n\r\n\r\n System.out.println(\"\\nDICTIONARY\\n\" + dictionary);\r\n \r\n String text = \"50 Cent is hard to distinguish from 50 cent and just plain cent without case.\";\r\n System.out.println(\"TEXT=\" + text);\r\n chunk(dictionaryChunkerFF,text);\r\n \r\n text = \"The product xyz120 DVD player won't match unless it's exact like XYZ120 DVD Player.\";\r\n System.out.println(\"TEXT=\" + text);\r\n chunk(dictionaryChunkerFF,text);\r\n\r\n }",
"@Test\n public void testRepeatedMatch() {\n assertMetrics(\"fieldCompleteness:1 queryCompleteness:0.6667 segments:1 earliness:1 gaps:1\",\n \"pizza hut pizza\",\"pizza hut\");\n }",
"public static void main(String[] args) throws IOException {\n\t\tRange<Double> vs30Range = Range.closed(800d, 1000d);\n\t\tRange<Double> willsRange = Range.closed(600d, 1200d);\n\t\tString outPrefix = \"cs_vs30_sites_800\";\n\t\t\n\t\tFile outputDir = new File(\"/home/kevin/CyberShake/sites/site_search\");\n\t\t\n\t\t// study from which we are selecting sites\n\t\tCyberShakeStudy siteStudy = CyberShakeStudy.STUDY_15_4;\n\t\t\n\t\tList<CyberShakeSiteRun> sites = CyberShakeSiteBuilder.buildSites(siteStudy, Vs30_Source.Simulation, siteStudy.runFetcher().fetch());\n\t\tList<CyberShakeSiteRun> matches = new ArrayList<>();\n\t\tList<String> bbStations = new ArrayList<>();\n\t\t\n\t\tWillsMap2015 wills = new WillsMap2015();\n\t\t\n\t\tfor (CyberShakeSiteRun site : sites) {\n\t\t\tdouble vs30 = site.getParameter(Double.class, Vs30_Param.NAME).getValue();\n\t\t\tdouble willsVal = wills.getValue(site.getLocation());\n\t\t\tif (vs30Range.contains(vs30) && (willsRange == null || willsRange.contains(willsVal))) {\n\t\t\t\tSystem.out.println(\"Site: \"+site.getName()+\"\\tVs30: \"+vs30+\"\\tWills: \"+willsVal);\n\t\t\t\tmatches.add(site);\n\t\t\t\tif (site.getCS_Site().type_id == CybershakeSite.TYPE_BROADBAND_STATION)\n\t\t\t\t\tbbStations.add(site.getName());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Found \"+matches.size()+\" matching sites\");\n\t\tSystem.out.println(\"BroadBand stations: \"+Joiner.on(\",\").join(bbStations));\n\t\t\n\t\tsiteStudy.getDB().destroy();\n\t\t\n\t\tFile outputFile = new File(outputDir, outPrefix+\".kml\");\n\t\tSystem.out.println(\"Writing KML to \"+outputFile.getAbsolutePath());\n\t\t\n\t\tFile csvOutFile = new File(outputDir, outPrefix+\"csv\");\n\t\tCSVFile<String> csv = new CSVFile<>(true);\n\t\tcsv.addLine(\"Name\", \"CS Vs30 (m/s)\", \"Wills Vs30 (m/s)\", \"Z1.0 (m)\", \"Z2.5 (km)\", \"Latitude\", \"Longitude\");\n\t\t\n\t\tFileWriter fw = new FileWriter(outputFile);\n\t\t\n\t\tfw.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + \"\\n\");\n\t\tfw.write(\"<kml xmlns=\\\"http://earth.google.com/kml/2.2\\\">\" + \"\\n\");\n\t\tfw.write(\" <Folder>\" + \"\\n\");\n\t\tfw.write(\" <name>CyberShake sites with Vs30=[\"+vs30Range.lowerEndpoint().floatValue()+\" \"\n\t\t\t\t+vs30Range.upperEndpoint().floatValue()+\"]</name>\" + \"\\n\");\n//\t\tfw.write(\" <description>Open Seismic Hazard Analysis Evenly Gridded Region</description>\" + \"\\n\");\n\t\t\n\t\tfor (Site site : matches) {\n\t\t\tLocation loc = site.getLocation();\n\t\t\t\n\t\t\tfw.write(\" <Placemark>\" + \"\\n\");\n\t\t\tfw.write(\" <name>\"+site.getName()+\"</name>\" + \"\\n\");\n\t\t\tfw.write(\" <Point id=\\\"\"+site.getName()+\"\\\">\" + \"\\n\");\n\t\t\tfw.write(\" <coordinates>\" + loc.getLongitude() + \",\" + loc.getLatitude() + \",\" + (-loc.getDepth()) + \"</coordinates>\" + \"\\n\");\n//\t\t\tfw.write(\" <latitude>\" + loc.getLatitude() + \"</latitude>\" + \"\\n\");\n//\t\t\tfw.write(\" <altitude>\" + (-loc.getDepth()) + \"</altitude>\" + \"\\n\");\n\t\t\tfw.write(\" </Point>\" + \"\\n\");\n\t\t\t\n\t\t\tfw.write(\" </Placemark>\" + \"\\n\");\n\n\t\t\tdouble vs30 = site.getParameter(Double.class, Vs30_Param.NAME).getValue();\n\t\t\tdouble willsVs30 = wills.getValue(loc);\n\t\t\tdouble z10 = site.getParameter(Double.class, DepthTo1pt0kmPerSecParam.NAME).getValue();\n\t\t\tdouble z25 = site.getParameter(Double.class, DepthTo2pt5kmPerSecParam.NAME).getValue();\n\t\t\t\n\t\t\tcsv.addLine(site.getName(), (float)vs30+\"\", (float)willsVs30+\"\", (float)z10+\"\", (float)z25+\"\",\n\t\t\t\t\t(float)loc.getLatitude()+\"\", (float)loc.getLongitude()+\"\");\n\t\t}\n\t\t\n\t\tcsv.writeToFile(csvOutFile);\n\t\t\n\t\tfw.write(\" </Folder>\" + \"\\n\");\n\t\tfw.write(\"</kml>\" + \"\\n\");\n\t\tfw.flush();\n\t\tfw.close();\n\t}",
"void findBuddies() {\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\t/*calling buddyMaker() to initialize our Buddy objects*/\n\t\tString buddyFile = buddyList;\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tbuddyMaker(buddyFile);\n\t\t\t\tbreak;\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"Error: File not found. Please re-enter file name\\n(should be type .csv) or type 'q' to quit:\");\n\t\t\t\tbuddyFile = in.next();\n\t\t\t\tif (buddyFile.toLowerCase().equals(\"q\"))\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\telse\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t};\n\t\t\n\t\t/*calling readKeywords() to initialize our interests*/\n\t\tString wordFile = wordList;\n\t\tHashSet<String> keywords;\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tkeywords = readKeywords(wordFile);\n\t\t\t\tbreak;\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"Error: File not found. Please re-enter file name\\n(should be type .csv) or type 'q' to quit:\");\n\t\t\t\twordFile = in.next();\n\t\t\t\tif (wordFile.toLowerCase().equals(\"q\"))\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\telse\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t};\n\t\t\n\t\tin.close();\n\t\t\n\t\t/*initializing interests for each buddy*/\n\t\tSystem.out.println(\"------------------------------\\nSorting interests...\");\n\t\tfor (Buddy b : buddies) {\n\t\t\tb.findInterests(keywords);\n\t\t\tb.sortInterests();\n\t\t\tSystem.out.println(b.name + \": \" + b.interests);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"------------------------------\\nMatchmaking...\");\n\t\tmatch(groupSize, buddies);\n\t\t\n\t\t/*printing out the results*/\n\t\tfor (ArrayList<Buddy> group : matches) {\n\t\t\tSystem.out.printf(\"-------- GROUP of (%d) --------\\n\", group.size());\n\t\t\tfor (Buddy b: group) {\n\t\t\t\tSystem.out.println(b.name);\n\t\t\t}\n\t\t}\n\t\tSystem.out.printf(\"------------------------------\\nMade %d groups total\", matches.size());\n\t}",
"public static void main(String[] args) {\n\t\tString[] set1 = new String[16];\n\t\tString[] set2 = new String[17];\n\t\tinitSet1(set1);\n\t\tinitSet2(set2);\n\t\t\n\t\t//insert test data in bloom filters\n\t\tBloomFilter<String> bf1 = new BloomFilter<String>(160, 16);\n\t\tBloomFilter<String> bf2 = new BloomFilter<String>(170, 17);\n\t\t\n\t\t\n\t\tfor(int i=0; i<set1.length; i++ ) {\n\t\t\tbf1.add(set1[i]);\n\t\t}\n\t\tfor(int i=0; i<set2.length; i++ ) {\n\t\t\tbf2.add(set2[i]);\n\t\t}\t\n\t\t\n\t\t//approximate number of elements in filter:\n\t\tint m = bf1.size();\n\t\tint k = bf1.getK();\n\t\tint z = m - bf1.getBitSet().cardinality();\n\t\tdouble numerator = Math.log((double)z/m);\n\t\tdouble denominator = k*Math.log(1-(1/(double)m));\n\t\tdouble X = numerator / denominator;\n\t\t\n\t\t//output some testing stuff\n\t\tSystem.out.println(bf1.contains(set2[16]));\n\t\tSystem.out.println(\"Expected FP-rate: \" + bf1.expectedFalsePositiveProbability());\n\t\tSystem.out.println(\"Number of hash functions used: \" + bf1.getK());\n\t\tSystem.out.println(\"Length of bloom filter: \" + bf1.size());\n\t\tSystem.out.println(\"Number of inserted elements (exactly counted by the object): \" + bf1.count());\n\t\tSystem.out.println(\"Number of bits set to true in bloom fitler: \" + bf1.getBitSet().cardinality());\n\t\tSystem.out.println(bf1.getBitSet());\n\t\tSystem.out.println(\"\\n\\n\\n\\n\");\n\t\tSystem.out.println(\"Expected number of elements in bf1: \" + X);\n\t}",
"private void SummaryReport()\n {\n System.out.println(\"\\n\\n***********************************************************************\");\n System.out.println(\"* CodeScanner Summary Report\");\n System.out.println(\"*\");\n System.out.println(\"* Run Date: \" + new SimpleDateFormat(\"yyyy.MM.dd HH:mm:ss\").format(new Date()));\n System.out.println(\"* Yaml File: \" + confFileName);\n System.out.println(\"* Code Path: \" + startPath);\n System.out.println(\"*\");\n System.out.println(\"* Dir include pattern: \" + dirIncludePattern.toString());\n System.out.println(\"* Dir exclude pattern: \" + dirExcludePattern.toString());\n System.out.println(\"* Directories scanned: \" + dirCount);\n System.out.println(\"* Directories matched: \" + dirMatchCount);\n System.out.println(\"* Dir Line matched: \" + dirLineMatchCount);\n System.out.println(\"*\");\n System.out.println(\"* File include pattern: \" + fileIncludePattern.toString());\n System.out.println(\"* File exclude pattern: \" + fileExcludePattern.toString());\n System.out.println(\"* Files scanned: \" + fileCount);\n System.out.println(\"* Files matched: \" + fileMatchCount);\n System.out.println(\"* Files Line matched: \" + fileLineMatchCount);\n System.out.println(\"*\");\n System.out.println(\"* Line replace pattern: \" + lineFindReplace.toString());\n System.out.println(\"* Line include pattern: \" + lineIncludePattern.toString());\n System.out.println(\"* Line exclude pattern: \" + lineExcludePattern.toString());\n System.out.println(\"* Lines replaced: \" + totalReplaceCount);\n System.out.println(\"* Lines scanned: \" + totalLineCount);\n System.out.println(\"* Lines matched: \" + lineMatchCount);\n System.out.println(\"*\");\n System.out.println(\"* Distinct Matching URLs Found\");\n\n for (String url : distinctURLs.values())\n {\n String ipAddress = \"\";\n try\n {\n InetAddress address = InetAddress.getByName(new URL(\"https://\" + url).getHost());\n ipAddress = address.getHostAddress();\n\n }\n catch(Exception ex)\n {\n ipAddress = \"not found\";\n }\n\n System.out.println(\"* \" + url + \" (\" + ipAddress + \")\");\n }\n\n System.out.println(\"*\");\n System.out.println(\"***********************************************************************\");\n }",
"private FontMatch printMatches(PriorityQueue<FontMatch> queue) {\n/* 719 */ FontMatch bestMatch = queue.peek();\n/* 720 */ System.out.println(\"-------\");\n/* 721 */ while (!queue.isEmpty()) {\n/* */ \n/* 723 */ FontMatch match = queue.poll();\n/* 724 */ FontInfo info = match.info;\n/* 725 */ System.out.println(match.score + \" | \" + info.getMacStyle() + \" \" + info\n/* 726 */ .getFamilyClass() + \" \" + info.getPanose() + \" \" + info\n/* 727 */ .getCIDSystemInfo() + \" \" + info.getPostScriptName() + \" \" + info\n/* 728 */ .getFormat());\n/* */ } \n/* 730 */ System.out.println(\"-------\");\n/* 731 */ return bestMatch;\n/* */ }",
"public static void main(String[] args) {\n String input_one = \"Fourscore and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battlefield of that war. We have come to dedicate a portion of that field as a final resting-place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we cannot dedicate — we cannot consecrate — we cannot hallow — this ground. The brave men, living and dead, who struggled here have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us — that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion — that we here highly resolve that these dead shall not have died in vain — that this nation shall have a new birth of freedom and that government of the people, by the people, for the people, shall not perish from the earth.\";\r\n String input_two = \"Oh, say can you see, by the dawn's early light,What so proudly we hailed at the twilight's last gleaming?Whose broad stripes and brightstars,through the perilous fight,O'er the ramparts we watched, were so gallantly streaming?And the rockets' red glare, the bombs bursting in air,Gave proof through the night that our flag was still there.O say, does that star-spangled banner yet waveO'er the land of the free and the home of the brave?On the shore, dimly seen through the mists of the deep,Wherethe foe's haughty host in dread silence reposes,What isthatwhichthe breeze, o'er the towering steep,As it fitfully blows, now conceals, now discloses?Now it catches the gleam of the morning's first beam,In full glory reflected now shines on the stream:'Tis the starspangled banner! O long may it waveO'er the land of the free and the home of the brave. And where is that band who so vauntingly swore That the havoc of war and the battle's confusionA home and a country should leaveus no more?Their blood has wiped out their foulfootstep'spollution.Norefuge could save the hireling and slaveFrom the terror of flight, or the gloom of the grave:And the star-spangled banner in triumph doth waveO'er theland of the free and the home of the brave.Oh! thus be it ever, when freemen shall stand Between their loved homes and the war's desolation!Blest with victory and peace, may the heaven-rescued land Praise the Power that hath made and preserved us a nation.Then conquer we must, for our cause it is just,And this be our motto: In God is our trust. And the star-spangled banner forever shall waveO'er the land of the free and the home of \";\r\n\r\n String input_upper = input_one.toUpperCase();\r\n String input_upper2 = input_two.toUpperCase();\r\n // System.out.println(input_upper);\r\n String[] pattern = { \"FREE\", \"BRAVE\", \"NATION\" };\r\n // Brute Force algorithm\r\n System.out.println();\r\n System.out.println(\"**************************** OUTPUT OF FIRST INPUT FILE: *****************************\");\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBRUTE FORCE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BF_Search bf = new BF_Search();\r\n long bf_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n bf.brute_force_search(input_upper, pattern[i]);\r\n }\r\n long bf_endTime = System.nanoTime();\r\n bf.printBF_Comparison();\r\n System.out.println(\"It took: \" + (bf_endTime - bf_startTime) + \" nanoseconds\");\r\n\r\n // Knuth Moris Pratt algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tKNUTH MORIS PRATT ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n KMP_Search kmp = new KMP_Search();\r\n long kmp_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n kmp.KMPSearch(pattern[i], input_upper);\r\n if (i == pattern.length - 1) {\r\n kmp.printKM_Comparisons();\r\n }\r\n }\r\n long kmp_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (kmp_endTime - kmp_startTime) + \" nanoseconds\");\r\n\r\n // Boyer Moore algorithm\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBOYER MOORE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BM_Search bm = new BM_Search();\r\n char[] bm_input = input_upper.toCharArray();\r\n char[] bm_pattern = new char[] {};\r\n long bm_startTime = System.nanoTime();\r\n for (String i : pattern) {\r\n bm_pattern = i.toCharArray();\r\n bm.bm_search(bm_input, bm_pattern);\r\n if (pattern[pattern.length - 1] == i) {\r\n bm.printBM_Comparison();\r\n }\r\n }\r\n long bm_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (bm_endTime - bm_startTime) + \" nanoseconds\");\r\n\r\n // Rabin Karp algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tRABIN KARP ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n RKA_Search rk = new RKA_Search();\r\n int q = 101;\r\n long rk_startTime = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n rk.rka_search(pattern[i], input_upper, q);\r\n if (i == pattern.length - 1) {\r\n rk.printRKA_Comparison();\r\n }\r\n }\r\n long rk_endTime = System.nanoTime();\r\n System.out.println(\"It took: \" + (rk_endTime - rk_startTime) + \" nanoseconds\");\r\n System.out.println();\r\n System.out.println(\"************************* OUTPUT OF SECOND INPUT FILE: *******************************\");\r\n // Brute Force algorithm\r\n System.out.println();\r\n // System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\tBRUTE FORCE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BF_Search bf2 = new BF_Search();\r\n long bf_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n bf.brute_force_search(input_upper2, pattern[i]);\r\n }\r\n long bf_endTime2 = System.nanoTime();\r\n bf2.printBF_Comparison();\r\n System.out.println(\"It took: \" + (bf_endTime2 - bf_startTime1) + \" nanoseconds\");\r\n\r\n // Knuth Moris Pratt algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tKNUTH MORIS PRATT ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n KMP_Search kmp2 = new KMP_Search();\r\n long kmp_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n kmp2.KMPSearch(pattern[i], input_upper2);\r\n if (i == pattern.length - 1) {\r\n kmp2.printKM_Comparisons();\r\n }\r\n }\r\n long kmp_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (kmp_endTime2 - kmp_startTime1) + \" nanoseconds\");\r\n\r\n // Boyer Moore algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tBOYER MOORE ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n BM_Search bm2 = new BM_Search();\r\n char[] bm_input2 = input_upper.toCharArray();\r\n char[] bm_pattern2 = new char[] {};\r\n long bm_startTime1 = System.nanoTime();\r\n for (String i : pattern) {\r\n bm_pattern2 = i.toCharArray();\r\n bm.bm_search(bm_input2, bm_pattern2);\r\n if (pattern[pattern.length - 1] == i) {\r\n bm2.printBM_Comparison();\r\n }\r\n }\r\n long bm_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (bm_endTime2 - bm_startTime1) + \" nanoseconds\");\r\n\r\n // Rabin Karp algorithm\r\n System.out.println(\"\\t\\t\\t\\t\\tRABIN KARP ALGORITHM:\");\r\n System.out.println(\"=====================================================================================\");\r\n RKA_Search rk2 = new RKA_Search();\r\n int q2 = 101;\r\n long rk_startTime1 = System.nanoTime();\r\n for (int i = 0; i < pattern.length; i++) {\r\n rk2.rka_search(pattern[i], input_upper2, q2);\r\n if (i == pattern.length - 1) {\r\n rk2.printRKA_Comparison();\r\n }\r\n }\r\n long rk_endTime2 = System.nanoTime();\r\n System.out.println(\"It took: \" + (rk_endTime2 - rk_startTime1) + \" nanoseconds\");\r\n }",
"private void report() {\n\t\t\n\t}",
"static void getResults2(String root) throws IOException {\n\t\tint k = 1;\n\t\twhile (k <= 1) {\n\t\t\tint j = 1;\n\t\t\tString line;\n\t\t\tString multi = \"\";\n\t\t\tSystem.out.println(\"M\" + k);\n\n\t\t\twhile (j <= 10) {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(new File(root\n\t\t\t\t\t\t+ \"M1/M1.1/Testbeds-\" + j + \"/Generated/PSL//test/Precision/multi.txt\")));\n\n\t\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\tmulti += line;\n\t\t\t\t\tSystem.out.print(line + \",\");\n\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}",
"private static void search(graph M, graph D, Tuple[] h){\n\t\tint v = M.V[0];\n\t\tint q = 0; //q keeps track of the index in the Tuple array where a new tuple is placed\n\t\tfor(; q < h.length && h[q] != null; q++){\n\t\t\t;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < D.V.length; i++){\n\t\t\tint w = D.V[i];\n\t\t \tTuple t = new Tuple(v, w);\n\t\t\th[q] = t; //add a new tuple\n\t\t\tboolean OK = true;\n\t\t\tfor (int k = 0; k < M.V.length; k++){\n\t\t\t\tboolean shouldBreak = false;\n\t\t\t\tfor (int j = 0; j < M.V.length; j++){\n\t\t\t\t\tif (M.matrix[M.V[k]][M.V[j]] == 0){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tThis is part of the pseudo-code that I tried to incorporate\n\t\t\t\t\tI could not quite get it to work, I believe the problem is \n\t\t\t\t\tin the big if statement. Instead I wrote a different chunk of code\n\t\t\t\t\tthat determines in the th should be printed.\n\t\t\t\t\t*/\n// \t\t\t\t\tif ( (M.V[k] == v && searchH(M.V[j], h) != null) || (M.V[j] == v && searchH(M.V[k], h) != null) ){\n// \t\t\t\t\t\tif(D.matrix[searchH(M.V[k], h).y][searchH(M.V[j], h).y] == 0){\n// \t\t\t\t\t\t\tOK = false;\n// \t\t\t\t\t\t\tshouldBreak = true;\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\tif(shouldBreak == true){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (OK == true){\n\t\t\t\tif(M.V.length == 1){\n\t\t\t\tboolean isGood = true;\n\t\t\t\t/*\n\t\t\t\tThis is what determines if h should be printed.\n\t\t\t\tEssentially it checks h against the adjacency matrices,\n\t\t\t\tand if the edges are present, it prints them out.\n\t\t\t\t*/\n\t\t\t\t\tfor(int g = 0; g < h.length && isGood == true; g++){\n\t\t\t\t\t\tfor(int f = g+1; f < h.length && isGood == true; f++){\n\t\t\t\t\t\t\tif(M.matrix[h[g].x][h[f].x] == 1 && D.matrix[h[g].y][h[f].y] == 0){\n\t\t\t\t\t\t\t\tisGood = false;\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\tif(isGood == true){\n\t\t\t\t\t\tSystem.out.println(printH(h));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\tHere I rebuild the vertex arrays and attached them to a new graph\n\t\t\t\tfor use as an argument in the recursive call.\n\t\t\t\t*/\n\t\t\t\telse{\t\t\n\t\t\t\t\tint[] modelTemp = rebuildV(v, M.V);\n\t\t\t\t\tint[] dataTemp = rebuildV(D.V[i], D.V);\n\n\t\t\t\t\tTuple[] h2 = new Tuple[h.length];\n\t\t\t\t\tfor(int p = 0; p < h.length; p++){\n\t\t\t\t\t\th2[p] = h[p];\n\t\t\t\t\t}\n\t\t\t\t\tgraph M2 = new graph();\n\t\t\t\t\tgraph D2 = new graph();\n\t\t\t\t\t\n\t\t\t\t\tM2.V = modelTemp;\n\t\t\t\t\tD2.V = dataTemp;\n\t\t\t\t\tM2.matrix = M.matrix;\n\t\t\t\t\tD2.matrix = D.matrix;\n\t\t\t\t\t\n\t\t\t\t\t//recursive call\n\t\t\t\t\tsearch(M2, D2, h2);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private static void process(Scanner fileScanner) {\n\t\tPrintStream outFile;\n\t\ttry {\n\t\t\tfileScanner = new Scanner(new File (RNATablePathway));\n\t\t\toutFile = new PrintStream(new File (RNAOutPathway));\n\t\t\twhile(fileScanner.hasNext()){\n\t\t\t\tRNATable.put(fileScanner.next(),fileScanner.next()); //Loading table.\n\t\t\t}\n\t\t\tfileScanner = new Scanner(new File(RNAStrandPathway));\n\t\t\tstrand = fileScanner.next(); //Loading RNA strand.\n\t\t\tfileScanner.close();\n\t\t\tSystem.out.print(\"Loading\");\n\t\t\tfor(int i = 0; i<strand.length(); i+=3){ //Searching table for RNA strand substrings.\n\t\t\t\tSystem.out.print(\".\");\n\t\t\t\tString section = strand.substring(i, i+3);\n\t\t\t\tif(section.equals(\"UGA\")||section.equals(\"UAA\")||section.equals(\"UAG\")){ //Catching the stop marker so it doesn't end up as part of the output.\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"complete.\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tresult = result + RNATable.get(section); //Adding the decrypted characters together to form output.\n\t\t\t\t}\n\t\t\t}\n\t\t\toutFile.println(result);//Writing to output file.\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found! Please check pathway and try again.\");\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) throws Exception\r\n\t{\n\t\tFile f=new File(\"w2smskwd.xls\");\r\n\t\t// open excel file for reading\r\n\t\tWorkbook rwb=Workbook.getWorkbook(f);\r\n\t\tSheet rsh1=rwb.getSheet(0); // 0 for sheet1(tests)\r\n\t\tint nour1=rsh1.getRows();\r\n\t\tint nouc1=rsh1.getColumns();\r\n\t\tSheet rsh2=rwb.getSheet(1); // 1 for sheet2(steps)\r\n\t\tint nour2=rsh2.getRows();\r\n\t\tint nouc2=rsh2.getColumns();\r\n\t\t\r\n\t\t// open same excel for result writing\r\n\t\tWritableWorkbook wwb=Workbook.createWorkbook(f,rwb);\r\n\t\tWritableSheet wsh1=wwb.getSheet(0); //0 means sheet1\r\n\t\tWritableSheet wsh2=wwb.getSheet(1); //1 means sheet2\r\n\t\t\r\n\t\t//set font style,color and cell alignment heading\r\n\t\tWritableFont wf=new WritableFont(WritableFont.TIMES,11,WritableFont.BOLD);\r\n\t\twf.setColour(Colour.BLUE);\r\n\t\tWritableCellFormat wcf=new WritableCellFormat(wf);\r\n\t\twcf.setAlignment(Alignment.JUSTIFY);\r\n\t\twcf.setAlignment(Alignment.CENTRE);\r\n\t\t\t\t\r\n\t\t//set font style,color and cell alignment for Test PASSED\r\n\t\tWritableFont wf1=new WritableFont(WritableFont.TIMES,11);\r\n\t\twf1.setColour(Colour.GREEN);\r\n\t\tWritableCellFormat wcf1=new WritableCellFormat(wf1);\r\n\t\twcf1.setAlignment(Alignment.JUSTIFY);\r\n\t\twcf1.setAlignment(Alignment.CENTRE);\r\n\t\t\t\t\r\n\t\t//set font style,color and cell alignment for Test FAILED\r\n\t\tWritableFont wf2=new WritableFont(WritableFont.TIMES,11);\r\n\t\twf2.setColour(Colour.RED);\r\n\t\tWritableCellFormat wcf2=new WritableCellFormat(wf2);\r\n\t\twcf2.setAlignment(Alignment.JUSTIFY);\r\n\t\twcf2.setAlignment(Alignment.CENTRE);\r\n\t\t\t\t\r\n\t\t//take results heading as date and time format\r\n\t\tSimpleDateFormat sf=new SimpleDateFormat(\"dd-MM-yyyy-hh-mm-ss\");\r\n\t\tDate dt=new Date();\r\n\t\tString cname=sf.format(dt);\r\n\t\t\r\n\t\t// set name to result column in sheet1\r\n\t\tLabel l1=new Label(nouc1,0,cname,wcf);\r\n\t\twsh1.addCell(l1);\r\n\t\t// set name to result column in sheet2\r\n\t\tLabel l2=new Label(nouc2,0,cname,wcf);\r\n\t\twsh2.addCell(l2);\r\n\t\t// create objects to methods class\r\n\t\tW2smsmethods ms=new W2smsmethods();\r\n\t\t// collect methods info using methods class object\r\n\t\tMethod m[]=ms.getClass().getMethods();\r\n\t\t// keyword driven\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//calling methods one after another\r\n\t\t\t//1st row (index=0) have names of columns in sheet1\r\n\t\t\tfor(int i=1;i<nour1;i++) // from 2nd row(index=1)\r\n\t\t\t{\r\n\t\t\t\tint flag=0;\r\n\t\t\t\t// get tid and mode from sheet1\r\n\t\t\t\tString tid=rsh1.getCell(0, i).getContents();\r\n\t\t\t\tString mode=rsh1.getCell(2, i).getContents();\r\n\t\t\t\tif(mode.equalsIgnoreCase(\"yes\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//1st row (index=0)have names of columns of sheet2\r\n\t\t\t\t\tfor(int j=1;j<nour2;j++) // from 2nd row(index=1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString sid=rsh2.getCell(0, j).getContents();\r\n\t\t\t\t\t\tif(tid.equalsIgnoreCase(sid))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//take step details from sheet2\r\n\t\t\t\t\t\t\tString mn=rsh2.getCell(2, j).getContents();\r\n\t\t\t\t\t\t\tString e=rsh2.getCell(3, j).getContents();\r\n\t\t\t\t\t\t\tString d=rsh2.getCell(4, j).getContents();\r\n\t\t\t\t\t\t\tString c=rsh2.getCell(5, j).getContents();\r\n\t\t\t\t\t\t\tSystem.out.println(mn+\" \"+e+\" \"+d+\" \"+c);\r\n\t\t\t\t\t\t\tfor(int k=0;k<m.length;k++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(m[k].getName().equals(mn))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tString r=(String) m[k].invoke(ms, e,d,c);\r\n\t\t\t\t\t\t\t\t\tLabel lb=new Label(nouc2,j,r,wcf1);\r\n\t\t\t\t\t\t\t\t\twsh2.addCell(lb);\r\n\t\t\t\t\t\t\t\t\tif(r.equalsIgnoreCase(\"unknown browser\"))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\twwb.write();\r\n\t\t\t\t\t\t\t\t\t\twwb.close();\r\n\t\t\t\t\t\t\t\t\t\trwb.close();\r\n\t\t\t\t\t\t\t\t\t\tSystem.exit(0); //force stop run\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(r.contains(\"Failed\") || r.contains(\"failed\") || r.contains(\"interrupted\") || r.contains(\"Interrupted\"))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tbreak; //terminate from loop for k \r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbreak; //terminate from loop if tid not equal to sid\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\tif(flag==0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tLabel l=new Label(nouc1,i,\"passed\",wcf1);\r\n\t\t\t\t\t\twsh1.addCell(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\tLabel l=new Label(nouc1,i,\"failed\",wcf2);\r\n\t\t\t\t\t\twsh1.addCell(l);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t}\r\n\t\t//to autofit width of excel column size(sheet1)\r\n\t\tCellView cv=rsh1.getColumnView(nouc1);\r\n\t\tcv.setAutosize(true);\r\n\t\twsh1.setColumnView(nouc1, cv);\r\n\t\t\r\n\t\t//to autofit width of excel column size(sheet2)\r\n\t\tCellView cv1=rsh2.getColumnView(nouc2);\r\n\t\tcv.setAutosize(true);\r\n\t\twsh2.setColumnView(nouc2, cv1);\r\n\t\t//save and close excel\r\n\t\twwb.write();\r\n\t\twwb.close();\r\n\t\trwb.close();\r\n\t\t\r\n\t}",
"private static void printResults(Map<Path, Double> resultFiles2) {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Najboljih 10 rezultata: \");\r\n\t\tint i = 0;\r\n\t\tfor (Map.Entry<Path, Double> e : resultFiles.entrySet()) {\r\n\t\t\tif (i==10) break;\r\n\t\t\tif (e.getValue() < 1E-9) break;\r\n\t\t\tSystem.out.printf(\"[%d] (%.4f) %s %n\", i, e.getValue(), e.getKey().toString());\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void generateDemoData() {\n for (int values = 0; values < votersAmt.size(); values++) {\n int n = votersAmt.get(values),\n m = candidatesAmt.get(values);\n for (int game = 1; game <= 20; game++) {\n try {\n String gameContent = \"\";\n for (int i = 0; i < n; i++) {\n // Mapping values so that voters can vote each candidate strictly once.\n List<String> candidatesPerVoter = new ArrayList<String>();\n for (int j = 0; j < m; j++) {\n int x = ThreadLocalRandom.current().nextInt(1, m);\n while (candidatesPerVoter.contains(\"C\"+x)) x = ThreadLocalRandom.current().nextInt(1, m + 1);\n candidatesPerVoter.add(\"C\" + x);\n }\n for (String candidate : candidatesPerVoter) {\n gameContent += (candidate + \" \");\n }\n if (i < n - 1) gameContent += \"\\n\";\n }\n\n String writingPolicy = \"plurality\";\n PrintWriter pw1 = new PrintWriter(outputDataRepository + \"/game\" + game + \"_\" + n + \"_\" + m + \"_\" + writingPolicy + \"_results.txt\");\n pw1.write(writingPolicy + \"\\n\" + gameContent); pw1.flush(); pw1.close();\n\n writingPolicy = \"borda\";\n PrintWriter pw2 = new PrintWriter(outputDataRepository + \"/game\" + game + \"_\" + n + \"_\" + m + \"_\" + writingPolicy + \"_results.txt\");\n pw2.write(writingPolicy + \"\\n\" + gameContent); pw2.flush(); pw2.close();\n } catch (FileNotFoundException exc) {\n System.err.println(\"Error writing file to disk; please check relevant permissions.\");\n exc.printStackTrace();\n }\n }\n }\n }",
"@Test\n\tpublic void andGrepTest() throws Exception {\n\t\t// & for 'undocumented' and 'mistress'\n\t\tHashSet<String> grepFound = loadGrepResults(\"undocumented\");\n\t\tHashSet<String> grep1 = loadGrepResults(\"mistress\");\n\t\tgrepFound.retainAll(grep1);\n\t\t\n\t\tCollection<Page> index = queryTest.query(\"mistress & undocumented\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\tassertEquals(indexFound, grepFound);\n\t}",
"private static void outputenrichment(String szoutfile,String[] files,double[][] tallyoverlaplabel, \n double[] tallylabel, double[] dsumoverlaplabel,Color theColor,\n boolean bcolscaleheat,String szstateorder,String sztitle, int noffset,\n String szlabelmapping,char chorder, boolean bprintimage,\n boolean bstringlabels, HashMap hmIndexToLabel) throws IOException\n {\n\n\tHashMap hmlabelExtend = makeLabelMapping(szlabelmapping);\n\n\tdouble dsumlabel = 0;\n\tfor (int ni = 0; ni < tallylabel.length; ni++)\n {\n\t dsumlabel += tallylabel[ni];\n\t}\n\n NumberFormat nf5 = NumberFormat.getInstance();\n nf5.setMaximumFractionDigits(5);\n\tnf5.setGroupingUsed(false);\n\tnf5.setMinimumFractionDigits(5);\n\n NumberFormat nf10 = NumberFormat.getInstance();\n nf10.setMaximumFractionDigits(10);\n\tnf10.setGroupingUsed(false);\n\tnf10.setMinimumFractionDigits(10);\n\n\tSystem.out.println(\"Writing to file \"+szoutfile+\".txt\");\n\tPrintWriter pw = new PrintWriter(new FileWriter(szoutfile+\".txt\"));\n\n\tpw.print(\"State (\"+szstateorder+\" order)\\tGenome %\");\n\tfor (int nfile = 0; nfile < files.length; nfile++)\n\t{\n\t pw.print(\"\\t\"+files[nfile]);\n\t}\n\tpw.println();\n\n\n\tdouble[][] heatmapfold;\n\n\n\tif (bcolscaleheat)\n\t{\n\t heatmapfold = new double[tallyoverlaplabel[0].length][tallyoverlaplabel.length+1];\n\t}\n\telse\n\t{\n\t heatmapfold = new double[tallyoverlaplabel[0].length][tallyoverlaplabel.length];\n\t}\n\n\tint numelim = 0;\n\n\tfor (int nstate = 0; nstate < tallyoverlaplabel[0].length; nstate++)\n\t{\n\t if (tallylabel[nstate] > 0)\n\t {\n\t\tif (bstringlabels)\n\t\t{\n\t\t pw.print(hmIndexToLabel.get(\"\"+nstate));\n\t\t}\n\t\telse\n\t\t{\n\t\t pw.print(nstate+noffset);\n String szsuffix;\n\n if ((szsuffix = (String) hmlabelExtend.get(\"\"+chorder+(nstate+noffset)))!=null)\n\t\t {\n\t \t pw.print(\"_\"+szsuffix);\n\t }\n\t\t}\n\n\t\tif (bcolscaleheat)\n\t\t{\n\t\t //only include genome % if scaling by column\n\t\t heatmapfold[nstate][0] =100*(tallylabel[nstate]/dsumlabel); //first column is heatmap\n\t\t pw.print(\"\\t\"+nf5.format(heatmapfold[nstate][0]));\n\t\t}\n\t\tfor (int nfile = 0; nfile < tallyoverlaplabel.length; nfile++)\n\t {\n\t\t //numerator is fraction of total of category in state while denominator is total fraction state is\n\t double dfold = (tallyoverlaplabel[nfile][nstate]/dsumoverlaplabel[nfile])/\n\t (tallylabel[nstate]/dsumlabel);\n\t\t if (bcolscaleheat)\n\t\t {\n\t\t heatmapfold[nstate][nfile+1] = dfold;\n\t\t }\n\t\t else\n\t\t {\n\t\t heatmapfold[nstate][nfile] = dfold;\n\t\t }\n\t\t pw.print(\"\\t\"+nf5.format(dfold));\n\t\t}\n\t\tpw.println();\n\t }\n\t else\n\t {\n\t\tnumelim++;\n\t }\n\t}\n\tpw.print(\"Base\\t100\");\n for (int nfile = 0; nfile < tallyoverlaplabel.length; nfile++)\n\t{\n\t pw.print(\"\\t\"+nf10.format(100*(dsumoverlaplabel[nfile]/dsumlabel)));\n\t}\n\tpw.println();\n\tpw.close();\n\n\tString[] rowlabels;// = new String[tallyoverlaplabel[0].length];\n\tif (numelim > 0)\n\t{\n\t double[][] heatmapreduce = new double[heatmapfold.length-numelim][heatmapfold[0].length];\n\t rowlabels = new String[heatmapreduce.length];\n\t int nkeepindex = 0;\n\t for (int nstate = 0; nstate < tallyoverlaplabel[0].length; nstate++)\n\t {\n if (tallylabel[nstate] > 0)\n\t {\n\t\t for (int ncol = 0; ncol < heatmapfold[nstate].length; ncol++)\n\t\t {\n\t\t heatmapreduce[nkeepindex][ncol] = heatmapfold[nstate][ncol];\n\t\t }\n\n\t\t if (bstringlabels)\n\t\t {\n\t\t rowlabels[nkeepindex] = (String) hmIndexToLabel.get(\"\"+nstate);\n\t\t }\n\t\t else\n\t\t {\n\t\t rowlabels[nkeepindex] = \"\"+(nstate+noffset);\n\t\t }\n\t\t nkeepindex++;\n\t }\n\t }\n\t heatmapfold = heatmapreduce;\n\t}\n\telse\n\t{\n\t rowlabels = new String[tallyoverlaplabel[0].length];\n\t if (bstringlabels)\n\t {\n\t for (int ni = 0; ni < rowlabels.length; ni++)\n\t {\n\t rowlabels[ni] = (String) hmIndexToLabel.get(\"\"+ni);\n\t }\n\t }\n\t else\n\t {\n\t for (int ni = 0; ni < rowlabels.length; ni++)\n\t {\n\t\t rowlabels[ni] = \"\"+(ni+noffset);\n\t }\n\t }\n\t}\n\n\n\tif (!bstringlabels)\n\t{\n\t for (int ni = 0; ni < rowlabels.length; ni++)\n\t {\n\t String szsuffix;\n\t if ((szsuffix = (String) hmlabelExtend.get(\"\"+chorder+rowlabels[ni]))!=null)\n {\n \t rowlabels[ni] = rowlabels[ni]+\"_\"+szsuffix;\n\t }\n\t }\n\t}\n\n\tif (bcolscaleheat)\n\t{\n\t for (int nfile = 0; nfile < heatmapfold[0].length; nfile++)\n\t {\t \n\t double dmaxval = Double.NEGATIVE_INFINITY;\n\t double dminval = Double.POSITIVE_INFINITY;\n\n\t for (int nstate = 0; nstate < heatmapfold.length; nstate++)\n\t {\n\t if (heatmapfold[nstate][nfile] > dmaxval)\n\t\t {\n\t\t dmaxval = heatmapfold[nstate][nfile];\n\t\t }\n\n\t if (heatmapfold[nstate][nfile] < dminval)\n\t\t {\n\t\t dminval = heatmapfold[nstate][nfile];\n\t\t }\n\t }\n\t\n\t for (int nstate = 0; nstate < heatmapfold.length; nstate++)\n\t {\n\t\t heatmapfold[nstate][nfile] =(heatmapfold[nstate][nfile]-dminval)/dmaxval;\n\t }\n\t }\n\t}\n\n\tString[] collabels = new String[heatmapfold[0].length];\n\tif (bcolscaleheat)\n\t{\n\t collabels[0] = \"Genome %\";\n\t}\n\n\tfor (int ni = 0; ni < files.length; ni++)\n\t{\n\t int nfirstindex = files[ni].indexOf('.');\n\t if (nfirstindex == -1)\n\t {\n\t if (bcolscaleheat)\n\t {\n\t collabels[ni+1] = files[ni];\n\t }\n\t else\n\t {\n\t collabels[ni] = files[ni];\n\t }\n\t }\n\t else\n\t {\n\t String szsub = files[ni].substring(0,nfirstindex);\n\n\t if (bcolscaleheat)\n\t {\n\t collabels[ni+1] = szsub;\n\t }\n\t else\n\t {\n\t collabels[ni] = szsub;\n\t }\n\t }\n\t}\n\n\n\tif (bprintimage)\n\t{\n\t makeEnrichmentHeatMap(heatmapfold, collabels, rowlabels,szoutfile,theColor,sztitle,\n\t\t\t\t \"Category\",\"State (\"+szstateorder+\" order)\");\n\t}\n }",
"public MyStringBuilder2 [] regMatch(String [] pats)\n\t{\n\t\t//System.out.print(\"hi\");\n\t\t\tMyStringBuilder2[] answers = new MyStringBuilder2[pats.length];\n\t\t\tMyStringBuilder2[] finals = new MyStringBuilder2[pats.length];\n\t\t\tfinals = recursiveArrayAdd(finals, pats, 0);\n\t\t\tif(finals[0] == null) {\n\t\t\t\tfinals = null;\n\t\t\t}\n\t\t\treturn finals;\n\t\t\n\t}",
"void compareSearch();",
"public static void main(String[] args) {\n String pattern = \"aabe\";\n String text = \"aabaacdeaaabe\";\n\n List<Integer> foundIndexes = KnuthMorrisPrattPatternSearch.performKMPSearch(text, pattern);\n\n if (foundIndexes.isEmpty()) {\n System.out.println(\"Pattern not found in the given text String\");\n } else {\n System.out.println(\"Pattern found in the given text String at positions: \"+\n foundIndexes.stream().map(Object::toString).collect(Collectors.joining(\", \")));\n }\n }",
"public void testOutput(){\n\t\tString dataMatrix = \"A R N D C Q E G H I L K M F P S T W Y V\";\r\n\t\tStringTokenizer st = new StringTokenizer(dataMatrix);\t\t\r\n\t\twhile(st.hasMoreTokens()){\r\n\t\t\tCharacter stchar = st.nextToken().charAt(0);\r\n\t\t\tStringTokenizer st2 = new StringTokenizer(dataMatrix);\r\n\t\t\twhile(st2.hasMoreTokens()){\t\t\t\t\r\n\t\t\t\tCharacter st2char = st2.nextToken().charAt(0);\t\t\t\r\n\t\t\t\tJOptionPane.showMessageDialog(null,stchar + \"-\" + st2char + \": \" + getScore(stchar,st2char),\r\n\t \t\t\t\t\"Error\",JOptionPane.ERROR_MESSAGE); \r\n\t\t\t}\r\n\t\t}\t\t\r\n }",
"@Test\r\n\tpublic void testWolfResultsReader() {\r\n\t\tString name = \"Krispy Kreme Challenge\";\r\n\t\tDouble dist = 5.0;\r\n\t\tLocalDate ld = LocalDate.parse(\"2018-02-18\");\r\n\t\tString location = \"Raleigh, NC\";\r\n\r\n\t\tRace r = new Race(name, dist, ld, location);\r\n\t\tString pName = \"BILLY FETZNER\";\r\n\t\tint age = 24;\r\n\t\tRaceTime time = new RaceTime(0, 11, 51);\r\n\t\tIndividualResult ir = new IndividualResult(r, pName, age, time);\r\n\r\n\t\tString pName2 = \"STEPHEN HENKEL\";\r\n\t\tint age2 = 21;\r\n\t\tRaceTime time2 = new RaceTime(0, 12, 02);\r\n\t\tIndividualResult ir2 = new IndividualResult(r, pName2, age2, time2);\r\n\r\n\t\tr.addIndividualResult(ir);\r\n\t\tr.addIndividualResult(ir2);\r\n\r\n\t\tRaceList rl = new RaceList();\r\n\t\trl.addRace(r);\r\n\r\n\t\tRaceList rl2 = WolfResultsReader.readRaceListFile(\"test-files/wolf_results_actual.md\");\r\n\r\n\t\tfor (int i = 0; i < rl.size(); i++) {\r\n\t\t\tRace race1 = rl.getRace(i);\r\n\t\t\tRace race2 = rl2.getRace(i);\r\n\t\t\tassertTrue(race1.equals(race2));\r\n\t\t\tassertEquals(race1.getResults().getResult(0).getAge(), race2.getResults().getResult(0).getAge());\r\n\t\t\tassertEquals(race1.getResults().getResult(0).getName(), race2.getResults().getResult(0).getName());\r\n\t\t\tassertEquals(0,\r\n\t\t\t\t\trace1.getResults().getResult(0).getTime().compareTo(race2.getResults().getResult(0).getTime()));\r\n\t\t\tassertEquals(0,\r\n\t\t\t\t\trace1.getResults().getResult(0).getPace().compareTo(race2.getResults().getResult(0).getPace()));\r\n\r\n\t\t\tassertEquals(race1.getResults().getResult(1).getAge(), race2.getResults().getResult(1).getAge());\r\n\t\t\tassertEquals(race1.getResults().getResult(1).getName(), race2.getResults().getResult(1).getName());\r\n\t\t\tassertEquals(0,\r\n\t\t\t\t\trace1.getResults().getResult(1).getTime().compareTo(race2.getResults().getResult(1).getTime()));\r\n\t\t\tassertEquals(0,\r\n\t\t\t\t\trace1.getResults().getResult(1).getPace().compareTo(race2.getResults().getResult(1).getPace()));\r\n\r\n\t\t}\r\n\r\n\t\t// test a bunch of invalid files\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv1.md\");\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(\"Invalid file\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv2.md\");\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(\"Invalid file\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv3.md\");\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(\"Invalid file\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv4.md\");\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(\"Invalid file 4\");\r\n\r\n\t\t}\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv5.md\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t//\r\n\t\t}\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv6.md\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t//\r\n\t\t}\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv7.md\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t//\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv8.md\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t//\r\n\t\t}\r\n//\t\ttry {\r\n//\t\t\tRaceList rl3 = WolfResultsReader.readRaceListFile(\"test-files/iv10.md\");\r\n//\t\t\tfail();\r\n//\t\t} catch (IllegalArgumentException e) {\r\n//\t\t\t//\r\n//\t\t}\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv11.md\");\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t//\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\trl2 = WolfResultsReader.readRaceListFile(\"test-files/iv12.md\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}",
"public void printAllResults(){\n String round = \"Rounds: \\t\\t\";\n String team1 = fight_list.get(0).t1.name + \"\\t\\t\"; //note: We assume that all the FightResults in 1 DataBag all have the same 2 teams. Gotta write that better later.\n String team2 = fight_list.get(0).t2.name + \"\\t\\t\";\n\n for(FightResult fig : this.fight_list){\n round += fig.final_round + \"\\t\";\n team1 += fig.t1_deaths + \"\\t\";\n team2 += fig.t2_deaths + \"\\t\";\n }\n\n System.out.println(round);\n System.out.println(team1);\n System.out.println(team2);\n\n //System.out.println(\"\\n--------\\n\");\n }"
] |
[
"0.6538967",
"0.6218579",
"0.59305876",
"0.583726",
"0.5818561",
"0.5810968",
"0.5801017",
"0.5794335",
"0.57678294",
"0.56959146",
"0.569058",
"0.56707007",
"0.5655808",
"0.5650728",
"0.5648026",
"0.5632881",
"0.5610377",
"0.56056225",
"0.560499",
"0.560046",
"0.55974925",
"0.5584403",
"0.5575895",
"0.5568138",
"0.5563896",
"0.5557105",
"0.5547686",
"0.5543303",
"0.55325407",
"0.5526902",
"0.55081236",
"0.5502416",
"0.5498767",
"0.54969716",
"0.54849267",
"0.5482926",
"0.5481432",
"0.54705024",
"0.5449917",
"0.5444499",
"0.543958",
"0.5434778",
"0.54211986",
"0.5418598",
"0.54148096",
"0.5393546",
"0.53913015",
"0.53903",
"0.5384623",
"0.53519124",
"0.53478134",
"0.5345467",
"0.5342065",
"0.53378356",
"0.5332604",
"0.53224033",
"0.53136766",
"0.53136486",
"0.53077984",
"0.5303456",
"0.5302177",
"0.52943635",
"0.52906114",
"0.5286845",
"0.52742857",
"0.5269119",
"0.52645314",
"0.52598476",
"0.52562463",
"0.525479",
"0.52502495",
"0.52457833",
"0.5238258",
"0.5234361",
"0.5228212",
"0.52206117",
"0.5205983",
"0.5185755",
"0.51752806",
"0.5165167",
"0.5163876",
"0.5163743",
"0.5157376",
"0.51569057",
"0.5155988",
"0.51399124",
"0.5129381",
"0.51286834",
"0.51277214",
"0.5119011",
"0.5118483",
"0.51118475",
"0.51069045",
"0.5101744",
"0.5101159",
"0.5093824",
"0.50913596",
"0.50897235",
"0.5089271",
"0.5086202",
"0.50860524"
] |
0.0
|
-1
|
TODO: Write your experiments here!
|
public static void main(String... args) {
String handle = "realDonaldTrump", pattern = "mexico";
System.out.println("Starting");
MatchBot bot = new MatchBot(handle, 2000);
System.out.println("made bot");
// search all tweets for the pattern
List<String> ansNaive = new DoublyLinkedList<>();
System.out.println("naive start");
// test 1
int compsNaive = bot.searchTweetsNaive(pattern, ansNaive);
List<String> ansKMP = new DoublyLinkedList<>();
System.out.println("kmp start");
int compsKMP = bot.searchTweetsKMP(pattern, ansKMP);
List<String> ansBM = new DoublyLinkedList<>();
System.out.println("Boyer - Moore start");
int compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);
System.out.println("*** Donald test (normal size): ***naive comps = " + compsNaive +
", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM);
/*for (int i = 0; i < ansKMP.size(); i++) {
String tweet = ansKMP.get(i);
assert tweet.equals(ansNaive.get(i));
System.out.println(i++ + ". " + tweet);
System.out.println(pattern + " appears at index " +
tweet.toLowerCase().indexOf(pattern.toLowerCase()));
}*/
// test 2
handle = "cnnbrk";
pattern = "syria";
bot = new MatchBot(handle, 2000);
compsNaive = bot.searchTweetsNaive(pattern, ansNaive);
compsKMP = bot.searchTweetsKMP(pattern, ansKMP);
compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);
System.out.println("*** CNN breaking news (normal size): ***naive comps = " + compsNaive +
", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM);
//test 3
handle = "realDonaldTrump";
pattern = "mexico";
bot = new MatchBot(handle, 250);
compsNaive = bot.searchTweetsNaive(pattern, ansNaive);
compsKMP = bot.searchTweetsKMP(pattern, ansKMP);
compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);
System.out.println("*** Donald test (small size): **: ***naive comps = " + compsNaive +
", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM);
// test 4
handle = "cnnbrk";
pattern = "syria";
bot = new MatchBot(handle, 250);
compsNaive = bot.searchTweetsNaive(pattern, ansNaive);
compsKMP = bot.searchTweetsKMP(pattern, ansKMP);
compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);
System.out.println("*** CNN breaking news (small size): ***naive comps = " + compsNaive +
", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM);
// test 5
handle = "cnnbrk";
pattern = "syria";
bot = new MatchBot(handle, 4000);
compsNaive = bot.searchTweetsNaive(pattern, ansNaive);
compsKMP = bot.searchTweetsKMP(pattern, ansKMP);
compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);
System.out.println("*** CNN breaking news (large size): ***naive comps = " + compsNaive +
", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM);
// test 6
handle = "realDonaldTrump";
pattern = "mexico";
bot = new MatchBot(handle, 4000);
compsNaive = bot.searchTweetsNaive(pattern, ansNaive);
compsKMP = bot.searchTweetsKMP(pattern, ansKMP);
compsBM = bot.searchTweetsBoyerMoore(pattern, ansBM);
System.out.println("*** Donald test (large size): **: ***naive comps = " + compsNaive +
", KMP comps = " + compsKMP + ", Boyer-Moore comps = " + compsBM);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n protected void setup() {\n }",
"@Override\n public void setup() {\n }",
"@Override\n public void setup() {\n }",
"@Override\n public void setup() {\n\n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void setup() {\r\n\r\n\t}",
"@Override\n public void perish() {\n \n }",
"public static void main(String[] args) {\n\n experiment();\n }",
"private void generateSolution() {\n\t\t// TODO\n\n\t}",
"private void test() {\n\n\t}",
"public void setup() {\n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"@Test\n public void trainWithMasterSplinterTest() {\n\n }",
"@Override\n protected long getTestSolution() {\n return 100024;\n }",
"@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }",
"@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}",
"@Test\n\tpublic void getWorksTest() throws Exception {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void solution() {\n\t\t\n\t}",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Test\n\tpublic void shouldGenerateSomeStuff() {\n\t\tString applicationName = \"cool-application-name\";\n\t\tEngagement engagement = buildSingleClusterMultiProjectEngagementNoBuildTool(applicationName);\n\t\tGson gson = new GsonBuilder().create();\n\t\tString output = gson.toJson(engagement);\n\t\tLOGGER.info(\"{}{}{}\",\"\\n\\n\", output, \"\\n\\n\");\n\t}",
"private stendhal() {\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}",
"@Test\n\tpublic void testExponentialSearch() {\n\t}",
"public static void main() {\n \n }",
"public void setup()\n {\n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public interface RtcSpeexWbTablesExperiment {\n}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"protected TestBench() {}",
"public static void main(String[] args) throws IOException {\n \n // set parameter set list\n ParameterSetListMaker maker = new ParameterSetListMaker(DefaultParameterRecipes.getDEFAULT_PARAMETER_RECIPES());\n List<ParameterSet> psList = maker.getParameterSetList();\n \n //Get sequenceDNA a singleton chromsomome II currently\n Path p1 = Paths.get(ParameterSet.FA_SEQ_FILE);\n seq = new SequenceDNA(p1, new SeqInterval(ParameterSet.SEQUENCE_START, ParameterSet.SEQUENCE_END));\n \n //Get PUExpt chromosome II - a singleton\n Path p = Paths.get(ParameterSet.BIN_COUNT_FILE);\n pu = new PuExperiment(p, new SeqBin(ParameterSet.PU_BIN_SIZE,0)); //the pu experiment under study - also sets bin size for analysis\n \n //Get genbank annotation file of chromosome II - a singleton\n Path p2 = Paths.get(ParameterSet.CHROMOSOME_II_GENBANK);\n annotation = new SequenceDNAAnnotationGenbank(p2);\n \n //get transcript list - a singleton\n transcriptList = annotation.getTranscriptsByType(type-> type == Transcript.TRANSCRIPT_TYPE.MRNA || type == Transcript.TRANSCRIPT_TYPE.SNRNA ||\n type == Transcript.TRANSCRIPT_TYPE.RRNA || type == Transcript.TRANSCRIPT_TYPE.SNORNA || type == Transcript.TRANSCRIPT_TYPE.TRNA);\n \n //get Rif1 list\n Path rif1p = Paths.get(ParameterSet.RIF1_INTERVAL_FILE);\n rif1List = new Rif1Sites(rif1p).getRif1IntervalList();\n \n \n //RUN PARAMETER SETS FOR DYNAMIC SIMULATION\n \n //Iterate over all parameter sets\n for (ParameterSet paramSet : psList) { \n\n //Create probability distribution based on transcript exclusion and AT content\n probDistribution = new ProbabilityDistribution2(seq.atFunction(paramSet.getInitiatorSiteLength()), paramSet, \n annotation.getTranscriptBlocks(transcriptList));\n\n //Replicate molecules\n population = new ReplicatingMoleculePopulation(probDistribution, paramSet, rif1List);\n\n //Create new model comparator to compare pu data with predicted right fork frequency distribution from population of replicating molecules\n modelComparator = new AtModelComparator(pu, ParameterSet.SEQUENCE_START / ParameterSet.PU_BIN_SIZE, population.getPopulationAveRtForkFreqInBins());\n \n //print list of interTranscripts with probabilities\n /*System.out.println(\"index\\tstart\\tend\\tAT Content\\tRif1 index\\tprob\"); \n InterTranscriptSites sites = new InterTranscriptSites(seq, annotation.getTranscriptBlocks(transcriptList), rif1List, probDistribution);\n sites.getInterTranscriptList().forEach(System.out::println);\n System.out.println(\"\");*/\n\n switch (task) {\n case PRINT_PARAMETER_SET:\n System.out.println(paramSet); \n break;\n case PRINT_SEQUENCE:\n System.out.println(seq.intervalToString(new SeqInterval(0, seq.getLength() - 1)));\n break;\n case PRINT_CDF:\n System.out.println(paramSet); \n System.out.println(\"MIDPOINT\\tCDF\");\n probDistribution.printCDf(ParameterSet.PU_BIN_SIZE);\n break;\n case PRINT_MEAN_SQUARED_DEVIATION_RIGHT_FORK_FREQUENCY:\n System.out.println(\"MSD\\tNumPreRCs\\tExpConst\\tAttenuator\\tInitLength\\tMaxRate\\tStdDevPredicted\\tStdDevObserved\");\n System.out.println(modelComparator.getMeanSquaredDifference() + \"\\t\" + paramSet.getNumberInitiators() + \"\\t\" + paramSet.getExponentialPowerFactor() + \"\\t\" + \n paramSet.getAttenuationFactor() + \"\\t\" + paramSet.getInitiatorSiteLength() \n + \"\\t\" + paramSet.getMaxFiringProbabilityPerMin() + \"\\t\" + modelComparator.getPredictedStdDeviation() + \"\\t\" + modelComparator.getObservedStdDeviation());\n break;\n case PRINT_PREDICTED_AND_OBSERVED_RIGHT_FORK_FREQUENCIES:\n printPredictedAndObservedRtForkFrequencies(paramSet);\n break;\n case PRINT_INITIATION_FREQUENCIES:\n printInitiationFrequencies(paramSet);\n break;\n case PRINT_TERMINATION_FREQUENCIES:\n printTerminationFrequencies(paramSet);\n break;\n case PRINT_MEDIAN_REPLICATION_TIMES_FOR_BINS_IN_GENOME:\n System.out.println(paramSet);\n System.out.println(\"Position\\tMedianTime\");\n List<Double> replicationTimes = population.getPopulationMedianTimeOfReplicationInBins(ParameterSet.PU_BIN_SIZE, ParameterSet.NUMBER_BINS);\n for (int i = 0; i < replicationTimes.size(); i++) {\n System.out.println(i * ParameterSet.PU_BIN_SIZE + ParameterSet.PU_BIN_SIZE / 2 + \"\\t\" + replicationTimes.get(i));\n }\n break;\n case PRINT_SPHASE_DURATION_FOR_MOLECULES_IN_POPULATION:\n System.out.println(paramSet);\n population.getElapsedTimeList().stream().forEach(f-> System.out.println(f));\n break;\n case PRINT_FRACTION_REPLICATED_OF_BINS_AT_GIVEN_TIME:\n System.out.println(paramSet);\n System.out.println(\"ELAPSED TIME: \" + timeOfReplication + \" min\");\n System.out.println(\"Position\\tFxReplicated\");\n List<Double> fxReplicated = population.getPopulationAveFxReplicatedInBins(timeOfReplication, ParameterSet.PU_BIN_SIZE, ParameterSet.NUMBER_BINS, paramSet.getMinPerCycle());\n for (int i = 0; i < fxReplicated.size(); i++) {\n System.out.println(i * ParameterSet.PU_BIN_SIZE + ParameterSet.PU_BIN_SIZE / 2 + \"\\t\" + fxReplicated.get(i));\n }\n break;\n case PRINT_REPLICATION_TIME_OF_BIN_FOR_MOLECULES_IN_POPULATION:\n System.out.println(paramSet);\n System.out.println(\"BIN NUMBER: \" + binNumber);\n for (int i = 0; i < paramSet.getNumberCells(); i++) {\n System.out.println(population.getPopulationTimesOfReplicationOfBin(binNumber)[i]);\n }\n break;\n case PRINT_RF_DELTA_LIST:\n PrintDeltaAtContentAndNumberTranscribedPositionsOfBins();\n }\n } \n }",
"@Override\n\tprotected void interr() {\n\t}",
"abstract void setup();",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"@Test\n public void testRun() {\n System.out.println(\"run\");\n FluorescenceImporter importer = null;\n try {\n FluorescenceFixture tf = new FluorescenceFixture();\n importer = new FluorescenceImporter(tf.testData());\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Importing dataset\");\n importer.setProgressHandle(ph);\n \n importer.run();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n //FluorescenceDataset dataset = importer.getDataset();\n Dataset<? extends Instance> plate = importer.getDataset();\n System.out.println(\"inst A1 \"+ plate.instance(0).toString());\n System.out.println(\"plate \"+plate.toString());\n Dataset<Instance> output = new SampleDataset<Instance>();\n output.setParent((Dataset<Instance>) plate);\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Analyzing dataset\");\n // AnalyzeRunner instance = new AnalyzeRunner((Timeseries<ContinuousInstance>) plate, output, ph);\n // instance.run();\n \n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"@Test\n public void test() throws Exception {\n// diversifiedRankingxPM2()\n diversifiedRankingxQuAD();\n }",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Before\n public void setup() {\n }",
"private void kk12() {\n\n\t}",
"public void mainTest()\n {\n \tprintSimilarRatingsByYearAfterAndMinutes();\n }",
"@Given(\"prepare to Analysis\")\npublic void preanalysis(){\n}",
"@Test\n public void testFitnessProportionateSelection()\n {\n }",
"@Test\r\n public void testMergeSpectra() throws Exception {\n }",
"public static void main(String[] args) throws IOException {\n PopulationModelDefinition def = new PopulationModelDefinition(\n new EvaluationEnvironment(),\n ChordModel::generatePopulationRegistry,\n ChordModel::getRules,\n ChordModel::getMeasures,\n (e, r) -> new HashMap<>(),\n ChordModel::states);\n def.setParameter(\"N\",new SibillaDouble(1000));\n PopulationModel model = def.createModel();\n\n List<Trajectory> trajectories = new LinkedList();\n byte[] trajectoryBytes = BytearrayToFile.fromFile(\".\", \"chordTrajectory_Samplings100_Deadline600_N1000_Samples6\");\n\n Trajectory toAdd = TrajectorySerializer.deserialize(trajectoryBytes, model);\n Sample firstSample =(Sample) toAdd.getData().get(0);\n PopulationState firstState = (PopulationState) firstSample.getValue();\n System.out.printf(\"Population model registry size: %d\", model.stateByteArraySize() / 4);\n System.out.printf(\"\\nChord with externalizable\\nSamples: %d\\nState population vector size: %d\", toAdd.getData().size(), firstState.getPopulationVector().length);\n trajectories.add(toAdd);\n\n ComputationResult result = new ComputationResult(trajectories);\n\n byte[] customBytes = ComputationResultSerializer.serialize(result, model);\n byte[] customBytesCompressed = Compressor.compress(customBytes);\n byte[] apacheBytes = Serializer.getSerializer(SerializerType.APACHE).serialize(result);\n byte[] apacheBytesCompressed = Compressor.compress(apacheBytes);\n byte[] fstBytes = Serializer.getSerializer(SerializerType.FST).serialize(result);\n byte[] fstBytesCompressed = Compressor.compress(fstBytes);\n\n System.out.printf(\"\\nCustom bytes: %d\\nApache bytes: %d\\nFst bytes: %d\", customBytes.length, apacheBytes.length, fstBytes.length);\n System.out.printf(\"\\nCustom bytes compressed: %d\\nApache bytes compressed: %d\\nFst bytes compressed: %d\", customBytesCompressed.length, apacheBytesCompressed.length, fstBytesCompressed.length);\n }",
"public void mo38850q() {\n }",
"public static void main(String[] args) {\n\n\n for (int i = 0; i < 3; i++) {\n System.out.println(\"\\n********* TEST \" + (i+1) + \" *********\");\n experimentOne(false);\n experimentOne(true);\n\n experimentTwo(false);\n experimentTwo(true);\n\n experimentThree(false);\n experimentThree(true);\n }\n }",
"private test5() {\r\n\t\r\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"@Override\n public void execute(IEnvironment env)\n {\n \n }",
"public static void main(String[] args) throws Exception\n\t{\n\t\tList<Artifact> docs = Artifact.listByType(Type.Document,false);\n\t\tint counter = 0;\n\t\tfor(Artifact doc : docs)\n\t\t{\n\t\t\t\tMLExample.hibernateSession = HibernateUtil.clearSession(MLExample.hibernateSession);\n\t\t\t\tString doc_path = doc.getAssociatedFilePath();\n//\t\t\t\tList<MLExample> trainExamples = \n//\t\t\t\t\tMLExample.getExamplesInDocument(LinkExampleBuilder.ExperimentGroupTimexEvent, doc_path);\n//\t\t\t\tList<MLExample> trainExamples2 = \n//\t\t\t\t\tMLExample.getExamplesInDocument(LinkExampleBuilder.ExperimentGroupEventEvent, doc_path);\n\n\t\t\t\tList<MLExample> trainExamples3 = \n\t\t\t\t\tMLExample.getExamplesInDocument(SecTimeEventExampleBuilder.ExperimentGroupSecTimeEvent,\n\t\t\t\t\t\t\tdoc_path);\n\t\t\t\t\n\t\t\t\tList<MLExample> all_train_examples = new ArrayList<MLExample>();\n//\t\t\t\tall_train_examples.addAll(trainExamples);\n//\t\t\t\tall_train_examples.addAll(trainExamples2);\n\t\t\t\tall_train_examples.addAll(trainExamples3);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(MLExample example_to_process: all_train_examples)\n\t\t\t\t{\n\t\t\t\t\tNormalizedDependencyFeatures ndf = new NormalizedDependencyFeatures();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tndf.calculateFeatures(example_to_process);\n\n\t\t\t\t\tHibernateUtil.clearLoaderSession();\n\t\t\t\t}\n\t\t\t\tcounter++;\n\t\t\t\tFileUtil.logLine(null, \"Doc processed:\"+counter);\n\t\t//\t\tMLExample example_to_process = MLExample.getInstanceForLink\n\t\t//\t\t(PhraseLink.getInstance(4117), experimentgroup);\n\t\t}\n\t\t\n\t}",
"protected void setup() {\r\n }",
"@Test\n public void testDAM30203001() {\n testDAM30102001();\n }",
"public static void main(String[] args)\r\t{",
"private DiscretePotentialOperations() {\r\n\t}",
"public void testPerformance() {\n \t}",
"private static void cajas() {\n\t\t\n\t}",
"@Before\r\n\tpublic void setup() {\r\n\t}",
"public static void main(String[] a){\n\n try {\n log.info(\"loading..\");\n\n //ExonQuantSource qs = new ExonQuantSource(new FileInputStream(System.getProperty(\"exon.quant.source\")));\n //ExonEQTLSource es = new ExonEQTLSource(new FileInputStream(System.getProperty(\"exon.eqtl.source\")), qs);\n\n TransQuantSource qs = new TransQuantSource(new FileInputStream(System.getProperty(\"exon.quant.source\")));\n TransEQTLSource es = new TransEQTLSource(new FileInputStream(System.getProperty(\"exon.eqtl.source\")), qs);\n\n\n AggregatedDataSource aggregatedSource = new AggregatedDataSource(qs, es);\n\n log.info(\"loaded\");\n\n log.info(\" \" + ((GenericQuantDataSource)aggregatedSource.quantSource).getStats());\n log.info(\" \" + ((GenericEQTLDataSource)aggregatedSource.eQTLSource).getStats());\n\n String chr = \"1\";\n int start = 1628906;\n int stop = 1629906;\n\n log.info(\"selecting \" + chr + \":\" + start + \"-\" + stop);\n\n ArrayList<DataFeature> quantResult = null;\n ArrayList<DataFeature> eQTLResult = null;\n\n long startTime = System.currentTimeMillis();\n\n quantResult = aggregatedSource.locateQuantFeatures(chr, start, stop);\n eQTLResult = aggregatedSource.locateEQTLFeatures(chr, start, stop);\n\n //for(int i=9;i<1000;i++) {\n //}\n\n long estimatedTime = System.currentTimeMillis() - startTime;\n\n log.info(\"Estimated run time:\" + estimatedTime + \" Millis\");\n\n log.info(\"quantResult.size() = \" + quantResult.size());\n log.info(\"eQTLResult.size() = \" + eQTLResult.size());\n\n for (DataFeature f : quantResult) {\n log.info(\"1 f = \" + f.getId() + \" start:\" + f.getStart() +\n \" end:\" + f.getEnd() + \" score:\" + f.getScore() );\n }\n\n for (DataFeature f : eQTLResult) {\n log.info(\"f = \" + f.getId() + \" start:\" + f.getStart() +\n \" end:\" + f.getEnd() + \" score:\" + f.getScore());\n\n log.info(\"linked to :\");\n\n for (LinkedFeature l0 : f.getLinked()) {\n log.info(\" linked = \" + l0.getFeature().getId() + \" start:\" + l0.getFeature().getStart() +\n \" end:\" + l0.getFeature().getEnd() + \" link score:\" + l0.getLinkScore());\n }\n }\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// Auto-generated catch block\n\t\t\tlog.error(\"Error!\", e);\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n log.error(\"Error!\", e);\n\t\t}\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Test\n public void testDAM30601001() {\n testDAM30102001();\n }",
"void pramitiTechTutorials() {\n\t\n}",
"@Override\n @Before\n public void setUp() throws IOException {\n }",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"@Override\n\tpublic void exams() {\n\t\t\n\t}",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"@Before\n public void setup() {\n }",
"public void mo21877s() {\n }",
"public static void main(String args[]){\n\t\t\n\t\n\t}",
"@Override\n public void computeSatisfaction() {\n\n }",
"public static void hvitetest1w(){\r\n\t}",
"public static void example1() {\n // moved to edu.jas.application.Examples\n }",
"@Test\n public void test9MLog_Siebel_SingleRun() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IOException, IllegalAccessException {\n String logPath_base = \"/home/xiaohe/workspace/DATA/FakeData4TestingPerf/Pub_fake.log\";\n// Common.testLog_multiTimes(logPath_base, 5, true); //eager eval\n\n// Common.testLog_multiTimes(logPath_base, 1, false); //lazy eval\n\n// String logPath_base = \"/home/xiaohe/workspace/DATA/ldccComplete_MonpolyStyle\";\n\n String[] args = new String[]{\"./test/count/insert.sig\", \"./test/count/insert.fl\", logPath_base};\n Main.main(args);\n\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Before\n public void DataSmoothExamples3() {\n\t LinkedList<Episode> eps9 = new LinkedList<Episode>();\n\t\teps9.add(new Episode(\"The One with the Tea Leaves\", 150));\n\t\teps9.add(new Episode(\"The One with Pricess Consuela\", 200));\n\t\teps9.add(new Episode(\"The One with the Bird Mother\", 250));\t\t\n\t\tshows3.add(new Show(\"Friends\", 2100, eps9, false));\n\t\t\n\t\tLinkedList<Episode> eps10 = new LinkedList<Episode>();\n\t\teps10.add(new Episode(\"Java\", 200));\n\t\teps10.add(new Episode(\"Python\", 210));\n\t\teps10.add(new Episode(\"C\", 210));\n\t\teps10.add(new Episode(\"C++\", 200));\n\t\tshows3.add(new Show(\"Programming Languages\", 2000, eps10, false));\n\t\t\n\t\tLinkedList<Episode> eps11 = new LinkedList<Episode>();\n\t\teps11.add(new Episode(\"Leaving Storybrooke\", 180));\n\t\teps11.add(new Episode(\"Homecoming\", 190));\n\t\teps11.add(new Episode(\"Where\", 200));\n\t\tshows3.add(new Show(\"Sisterhood\", 600, eps11, false));\n\n\t showResults3.add(200.0);\n\t showResults3.add(198.333);\n\t showResults3.add(190.0);\n\t}",
"@Test\n public void testDAM30402001() {\n testDAM30101001();\n }",
"@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}",
"public static void demo() {\n\t\tlab_2_2_5();\n\n\t}",
"public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public void working()\n {\n \n \n }",
"public void train ()\t{\t}",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\t\n\n\t}",
"@Test\n\tpublic void testInterpolationSearch() {\n\t}"
] |
[
"0.578374",
"0.57483155",
"0.5676113",
"0.5662736",
"0.5662736",
"0.56576854",
"0.5623516",
"0.5589186",
"0.557931",
"0.5577771",
"0.5570716",
"0.5491276",
"0.54795414",
"0.54727757",
"0.54724586",
"0.5468031",
"0.54651034",
"0.5450117",
"0.5439845",
"0.54303664",
"0.54215884",
"0.5419937",
"0.5397527",
"0.53851455",
"0.53807986",
"0.5377595",
"0.53601927",
"0.53582513",
"0.53573775",
"0.53540283",
"0.53520674",
"0.53520674",
"0.5340261",
"0.53356",
"0.53356",
"0.53356",
"0.53356",
"0.53356",
"0.53356",
"0.5335387",
"0.5322326",
"0.5315145",
"0.5313566",
"0.53124774",
"0.53080857",
"0.53079176",
"0.5307063",
"0.53046596",
"0.53044206",
"0.5295473",
"0.5292344",
"0.5288538",
"0.5277165",
"0.52751005",
"0.5271823",
"0.52662784",
"0.5264512",
"0.5259678",
"0.5258676",
"0.5256864",
"0.5256555",
"0.5252556",
"0.52515256",
"0.52476835",
"0.52419096",
"0.52391046",
"0.52359825",
"0.5235515",
"0.52336144",
"0.52169245",
"0.5214778",
"0.5206622",
"0.52029085",
"0.52009124",
"0.51991403",
"0.5198053",
"0.51855844",
"0.51855844",
"0.51855844",
"0.5180292",
"0.5180175",
"0.51791275",
"0.5159994",
"0.51592404",
"0.5154956",
"0.5154201",
"0.5153946",
"0.5150445",
"0.5149139",
"0.5144922",
"0.5143323",
"0.5139038",
"0.513586",
"0.51357573",
"0.51357573",
"0.51357573",
"0.51357573",
"0.5132668",
"0.5130291",
"0.51299113",
"0.5128035"
] |
0.0
|
-1
|
Use the current date as the default date in the picker
|
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Calendar c = Calendar.getInstance();
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day = c.get(Calendar.DAY_OF_MONTH);
// Create a new instance of DatePickerDialog and return it
return new DatePickerDialog(getActivity(), this, year, month, day);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}",
"public void set_value_to_default() {\n this.selectionListStrike.setText(\"\");\n this.selectionListCal_iv.setText(\"\");\n this.selectionListUlast.setText(\"\");\n String format = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date());\n int parseInt = Integer.parseInt(format.substring(6, 10));\n int parseInt2 = Integer.parseInt(format.substring(3, 5));\n int parseInt3 = Integer.parseInt(format.substring(0, 2));\n this.selectedDate = parseInt + \"-\" + parseInt2 + \"-\" + parseInt3;\n this.selectionListExpiry.setSelectedText(format);\n this.selectionListExpiry.initItems(R.string.set_date, SelectionList.PopTypes.DATE, parseInt, parseInt2, parseInt3);\n if (!this.wtype.equals(\"C\")) {\n this.callputbutton.callOnClick();\n }\n }",
"public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }",
"public Date getSelectedDate();",
"public void setSysDate()\r\n\t{\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n txtPDate.setText(sdf.format(new java.util.Date()));\r\n\t}",
"private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}",
"private void initDatePicker() {\n pickDateBox.setDayCellFactory(picker -> new DateCell() {\n public void updateItem(LocalDate date, boolean empty) {\n super.updateItem(date, empty);\n LocalDate today = LocalDate.now();\n\n setDisable(empty || date.compareTo(today) < 0 );\n }\n });\n }",
"public void initializeDate() {\n //Get current date elements from Calendar object\n day = cal.get(Calendar.DAY_OF_MONTH);\n month = cal.get(Calendar.MONTH); //Note months are indexed starting at zero (Jan -> 0)\n year = cal.get(Calendar.YEAR);\n\n //Pair EditText to local variable and set input type\n date = (EditText) findViewById(R.id.textSetDate);\n date.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n date.setText((month + 1) + \"/\" + day + \"/\" + year);\n\n //Create onClick listener on date variable\n date.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n datePicker = new DatePickerDialog(ControlCenterActivity.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int dayOfMonth) {\n date.setText((month + 1) + \"/\" + dayOfMonth + \"/\" + year);\n }\n }, year, month, day);\n\n datePicker.show();\n }\n });\n }",
"abstract Date getDefault();",
"private void setupCalendarView() {\n // Set the default date shown to be today\n DateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.UK);\n String todayDate = df.format(Calendar.getInstance().getTime());\n\n mTextView.setText(todayDate);\n }",
"protected String getSelectedDate()\n {\n String startsOnDate = String.valueOf(selectedYear);\n if(selectedMonth<10)startsOnDate+=\"-0\"+String.valueOf(selectedMonth);\n else startsOnDate+=\"-\"+String.valueOf(selectedMonth);\n if(selectedDay<10)startsOnDate+=\"-0\"+String.valueOf(selectedDay);\n else startsOnDate+=\"-\"+String.valueOf(selectedDay);\n\n return startsOnDate;\n }",
"public String getDefaultDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMMM d, yyyy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }",
"private void selectDate() {\n Calendar calendar = Calendar.getInstance();\n int year = calendar.get(Calendar.YEAR);\n int month = calendar.get(Calendar.MONTH);\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n DatePickerDialog datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n mDatebtn.setText(day + \"-\" + (month + 1) + \"-\" + year); //sets the selected date as test for button\n }\n }, year, month, day);\n datePickerDialog.show();\n }",
"public void setCurrentDate(String currentDate) {\n this.currentDate = currentDate;\n }",
"public void openDatePicker() {\n\n Calendar now = Calendar.getInstance();\n DatePickerDialog dpd = DatePickerDialog.newInstance(\n this,\n now.get(Calendar.YEAR),\n now.get(Calendar.MONTH),\n now.get(Calendar.DAY_OF_MONTH)\n );\n dpd.show(getActivity().getFragmentManager(), StringConstants.KEY_DATEPICKER_DIALOG);\n //dpd.setAccentColor(R.color.hb_medication_history);\n dpd.showYearPickerFirst(true);\n dpd.setMaxDate(now);\n dpd.setYearRange(StaticConstants.MIN_DATE, now.get(Calendar.YEAR));\n }",
"private void chooseDateDialog() {\n Calendar c = Calendar.getInstance();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH);\n int day = c.get(Calendar.DATE);\n\n DatePickerDialog datePickerDialog =\n new DatePickerDialog(Objects.requireNonNull(getContext()), this, year, month, day);\n datePickerDialog.show();\n }",
"private void configDate(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n tvDateLost.setText(dateFormat.format(date));\n }",
"@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckIn.setText(date);\n\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n datePickerDialog.show();\n }",
"private void dateOfBirthPicker() {\n _nextActionDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n int mYear = c.get(Calendar.YEAR);\n int mMonth = c.get(Calendar.MONTH);\n int mDay = c.get(Calendar.DAY_OF_MONTH);\n DatePickerDialog dateDialog = new DatePickerDialog(v.getContext(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, month, year);\n long dtDob = chosenDate.toMillis(true);\n\n String format = new SimpleDateFormat(\"yyyy-MM-dd\").format(dtDob);\n _nextActionDate.setText(format);\n\n }\n }, mYear, mMonth, mDay);\n //dateDialog.getDatePicker().setMaxDate(new Date().getTime());\n dateDialog.show();\n }\n });\n }",
"public void setCurrentDate(String d) {\n currentDate = d;\n }",
"@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckOut.setText(date);\n long today = Calendar.getTimeInMillis();\n view.setMinDate(today);\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n //memunculkan pilihan pada UI\n datePickerDialog.show();\n }",
"public void setTodayCalendar()\n {\n this.currentCalendar = Calendar.getInstance();\n }",
"public void setPickerDate(@NonNull final LocalDateTime date) {\n onView(viewMatcher).perform(click());\n onView(withClassName(equalTo(DatePicker.class.getName())))\n .perform(PickerActions.setDate(date.getYear(), date.getMonth().getValue(), date.getDayOfMonth()));\n new Dialog().confirmDialog();\n }",
"public Date getSelectDate();",
"public void selectDate(){\r\n\t\tcloseDateText.sendKeys(ConvertDate());\r\n\t}",
"public void setDate(Calendar currentDate) {\r\n this.currentDate = currentDate;\r\n }",
"public void setTodayDate() {\r\n int oldMonthValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().setTodayDate();\r\n updateControlsFromTable();\r\n // fire property change\r\n int newMonthValue = getMonth();\r\n if (oldMonthValue != newMonthValue) {\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, newMonthValue);\r\n }\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n // clear selection when changing the month in view\r\n if (oldMonthValue != newMonthValue && oldYearValue != newYearValue) {\r\n calendarTable.getSelectionModel().clearSelection();\r\n }\r\n }",
"public void selectDate()\r\n\t{\r\n\t\tsetLayout(new FlowLayout());\r\n\t\t\r\n\t\t// Create the DatePicker\r\n\t\tUtilDateModel model = new UtilDateModel();\r\n\t\tProperties properties = new Properties();\r\n\t\tproperties.put(\"text.today\", \"Today\");\r\n\t\tproperties.put(\"text.month\", \"Month\");\r\n\t\tproperties.put(\"text.year\", \"Year\");\r\n\t\tJDatePanelImpl datePanel = new JDatePanelImpl(model,properties);\r\n\t\tdatePicker = new JDatePickerImpl(datePanel, new DateFormatter());\r\n\t\t\r\n\t\t// Add confirmation button\r\n\t\tbutton = new JButton(\"OK\");\r\n\t\tbutton.addActionListener(this);\r\n\t\t\r\n\t\t// Display the DatePicker\r\n\t\tadd(datePicker);\r\n\t\tadd(button);\r\n setSize(300,300);\r\n setLocationRelativeTo(null);\r\n setVisible(true);\r\n\t}",
"private DatePicker createDatePicker(boolean veto) {\r\n DatePickerSettings datePickerSettings = new DatePickerSettings();\r\n datePickerSettings.setAllowEmptyDates(false);\r\n datePickerSettings.setAllowKeyboardEditing(false);\r\n DatePicker datePicker = new DatePicker(datePickerSettings);\r\n if (veto) {\r\n // If today is Saturday or Sunday, this sets the default\r\n // to the following Monday\r\n if (LocalDate.now().getDayOfWeek() == DayOfWeek.SATURDAY) {\r\n datePicker.setDate(LocalDate.now().plusDays(3));\r\n } else if (LocalDate.now().getDayOfWeek() == DayOfWeek.SUNDAY) {\r\n datePicker.setDate(LocalDate.now().plusDays(2));\r\n } else datePicker.setDate(LocalDate.now().plusDays(1));\r\n // Veto Policy to disallow weekends\r\n datePickerSettings.setVetoPolicy(new VetoDates());\r\n } else datePicker.setDate(LocalDate.now());\r\n return datePicker;\r\n }",
"public void setDefaultDateRange() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n Calendar todaysDate = Calendar.getInstance();\n toDateField.setText(dateFormat.format(todaysDate.getTime()));\n\n todaysDate.set(Calendar.DAY_OF_MONTH, 1);\n fromDateField.setText(dateFormat.format(todaysDate.getTime()));\n }",
"public void setCurrentDate(Date currentDate)\r\n {\r\n m_currentDate = currentDate;\r\n }",
"public void SetCurrentDate(CalendarWidget kCal) {\n\t\tfor(int i = 0; i < 42; ++i)\n\t\t{\n\t\t\tif(kCal.cell[i].date.getText().toString().length() == 0)\n\t\t\t\tcontinue;\n\t\t\tkCal.checkForCurrentData(kCal.cell[i]);\n\t\t}\n\t}",
"private Date getCurrentDate() {\n return Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant());\n }",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void onClick(View v) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) final Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker = new DatePickerDialog(Addnewuser.this, new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n mybirthday = new GregorianCalendar(selectedyear, selectedmonth, selectedday).getTime();\n birthday = \"\" + selectedday + \"/\" + (selectedmonth + 1) + \"/\" + selectedyear + \"\";\n dob.setText(birthday);\n // Toast.makeText(Addnewuser.this, \"\"+birthday+\"\\n\" +\n // \"\"+date.toString(), Toast.LENGTH_SHORT).show();\n\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select date\");\n mDatePicker.show();\n }",
"@Override\r\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\r\n int mYear = c.get(Calendar.YEAR); // current year\r\n int mMonth = c.get(Calendar.MONTH); // current month\r\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\r\n\r\n\r\n // date picker dialog\r\n datePickerDialog = new DatePickerDialog(task_setting.this,\r\n new DatePickerDialog.OnDateSetListener() {\r\n\r\n\r\n @Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth) {\r\n // set day of month , month and year value in the edit text\r\n\r\n final String[] MONTHS = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\r\n String mon = MONTHS[monthOfYear];\r\n date.setText(mon + \" \" + dayOfMonth + \", \" + year);\r\n }\r\n }, mYear, mMonth, mDay);\r\n datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);\r\n datePickerDialog.show();\r\n }",
"public Date getSelectedDate() {\n\t\treturn date.getValue();\n\t}",
"public GregorianCalendar getSelectedDate(){\n int day = Integer.parseInt(this.date_day.getSelectedItem().toString());\n int month = Integer.parseInt(this.date_month.getSelectedItem().toString());\n int year = Integer.parseInt(this.date_year.getSelectedItem().toString());\n\n GregorianCalendar date = new GregorianCalendar();\n date.setTimeInMillis(0);\n \n date.set(Calendar.DAY_OF_MONTH, day);\n date.set(Calendar.MONTH, month -1);\n date.set(Calendar.YEAR, year);\n\n return date;\n }",
"private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }",
"public void setCurrentDate(CurrentDate pCurrentDate) { \n mCurrentDate = pCurrentDate; \n }",
"public void setDateStart_CouponsTab_Marketing() {\r\n\t\tthis.dateStart_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tString today1 = (String) (formattedDate.format(c.getTime()));\r\n\t\tthis.dateStart_CouponsTab_Marketing.sendKeys(today1);\r\n\t}",
"private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }",
"public DatePickerDialog(@NonNull Context context) {\n this(context, 0, null, Calendar.getInstance(), -1, -1, -1);\n }",
"public void onDateSet(DatePicker view, int year, int month, int day) {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n DateFormat df = DateFormat.getDateInstance();\n String formattedDate = df.format(chosenDate);\n\n // Display the chosen date to app interface\n C_birthdate.setText(formattedDate);\n //C_reg_date.setText(formattedDate);\n }",
"@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_eDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }",
"@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_sDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }",
"public Main() {\n initComponents();\n setColor(btn_home);\n String date = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\").format(new Date());\n jcurrentDate.setText(date);\n \n }",
"@Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n mDateField.setText(year + \"/\" + (month + 1) + \"/\" + day);\n }",
"public static void setDate() {\r\n\t\tDate.set(DateFormat.getDateTimeInstance(DateFormat.SHORT,\r\n\t\t\t\tDateFormat.LONG, Locale.getDefault()).format(\r\n\t\t\t\tnew java.util.Date()));\r\n\t}",
"private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\texpense.setDate(c.getTime());\n\n\t\t// display the current date\n\t\tupdateDateDisplay();\n\t}",
"private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }",
"private void chooseDateFromCalendar(Button dateButton){\n DateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n Calendar nowCalendar = formatCalendar(Calendar.getInstance());\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(getContext(),\n R.style.Theme_TrainClimbing_DatePicker,\n (v, y, m, d) -> {\n inputCalendar.set(y, m, d);\n if (inputCalendar.after(nowCalendar))\n dateButton.setText(R.string.ad_button_date);\n else\n dateButton.setText(sdf.format(inputCalendar.getTime()));\n }, inputCalendar.get(Calendar.YEAR),\n inputCalendar.get(Calendar.MONTH),\n inputCalendar.get(Calendar.DAY_OF_MONTH));\n\n datePickerDialog.getDatePicker().setFirstDayOfWeek(Calendar.MONDAY);\n datePickerDialog.getDatePicker().setMinDate(formatCalendar(\n new GregorianCalendar(2000, 7, 19)).getTimeInMillis());\n datePickerDialog.getDatePicker().setMaxDate(nowCalendar.getTimeInMillis());\n datePickerDialog.show();\n }",
"@Override\n public void onClick(View v) {\n\n new DatePickerDialog(CompoffActivity.this, date, currentDate\n .get(Calendar.YEAR), currentDate.get(Calendar.MONTH),\n currentDate.get(Calendar.DAY_OF_MONTH)).show();\n }",
"@TargetApi(Build.VERSION_CODES.O)\n public LocalDate getTodayDate() {\n LocalDate date;\n date = LocalDate.now();\n return date;\n }",
"private void setCurrentDay() {\n Calendar c = Calendar.getInstance();\n\n year = c.get(Calendar.YEAR);\n month = c.get(Calendar.MONTH);\n day = c.get(Calendar.DAY_OF_MONTH);\n hour = c.get(Calendar.HOUR_OF_DAY);\n minute = c.get(Calendar.MINUTE);\n }",
"public static void dateDue() {\n Date date = new Date();\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n String strDate = formatter.format(date);\r\n NewProject.due_date = getInput(\"Please enter the due date for this project(dd/mm/yyyy): \");\r\n\r\n UpdateData.updateDueDate();\r\n updateMenu();\t//Return back to previous menu.\r\n }",
"public String getCurrentDate() {\n return currentDate;\n }",
"public static String getCurrentDate() {\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate dateobj = new Date();\n\t\treturn df.format(dateobj);\n\t}",
"DateFormatPanel() {\r\n\t\tfDateFormat = DateFormat.getTimeInstance(DateFormat.DEFAULT);\r\n\t}",
"public void setSelectedDate(Date selectedDate);",
"public DateChooser(Locale locale) {\r\n this.locale = locale;\r\n currentDate = Calendar.getInstance(locale);\r\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }",
"public static String getCurrentDate() {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"); \n LocalDateTime now = LocalDateTime.now(); \n return dtf.format(now);\n }",
"@SuppressLint(\"SetTextI18n\")\n private void setTransactionDate() {\n // used to get the name of the month from the calendar\n HashMap<String, String> months = new HashMap<>();\n String[] mnths = {\"\", \"Jan\", \"Feb\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"Sept\", \"Oct\", \"Nov\", \"Dec\"};\n for (int i = 1; i <= 12; i++) {\n if (i < 10) {\n months.put(mnths[i], Integer.toString(i));\n } else {\n\n months.put(mnths[i], Integer.toString(i));\n }\n }\n\n // set the date when somehting is selected from the DatePicker\n dateText.setText(months.get(transaction.getMonth()) + '-' + Integer.toString(transaction.getDay()) + '-' + transaction.getYear());\n findViewById(R.id.transaction_date).setOnClickListener(new View.OnClickListener() {\n @Override\n // show DatePicker on field click\n public void onClick(View v) {\n showDatePickerDialog();\n }\n });\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), startdatepicker, trigger.getStarttime().get(Calendar.YEAR), trigger.getStarttime().get(Calendar.MONTH), trigger.getStarttime().get(Calendar.DAY_OF_MONTH)).show();\n }",
"private void setDefaultExpiryDate() {\n int twoWeeks = 14;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.DAY_OF_YEAR, twoWeeks);\n this.expiryDate = calendar.getTime();\n }",
"public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public static Date getCurrentDate() {\n return new Date();\n }",
"private void showDateDialog(){\n final Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n\n if(!newDate.before(newCalendar)){\n /**\n * Update TextView with choosen date\n */\n newDate.set(Calendar.HOUR_OF_DAY, 0);\n newDate.set(Calendar.MINUTE, 0);\n newDate.set(Calendar.SECOND, 0);\n newDate.set(Calendar.MILLISECOND,0);\n mDateTextView.setTextColor(Color.BLACK);\n String day = mDateFormatter.getDayName(newDate.getTime());\n String date = mDateFormatter.getOnlyDate(newDate.getTime());\n String month = mDateFormatter.getMonth(newDate.getTime());\n mDateTextView.setText(day + \" \" + date + \",\" + month);\n mChoosenSaveDate = newDate;\n }else{\n mDateTextView.setText(\"Deadline has to be at leats same as current date\");\n mDateTextView.setTextColor(Color.RED);\n Toast.makeText(view.getContext(),\"invalid choosen date\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n },newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n\n }",
"@Override\n\tpublic Calendar getInitialDate() {\n\t\treturn Calendar.getInstance();\n\t}",
"public Date getCurrentDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n Date currentDate = cal.getTime();\n return currentDate;\n }",
"private void pickDate(final Calendar initDate){\n //callback for when a date is picked\n DatePickerDialog.OnDateSetListener setDate = new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n initDate.set(year, month, dayOfMonth,\n initDate.get(Calendar.HOUR_OF_DAY),\n initDate.get(Calendar.MINUTE),\n initDate.get(Calendar.SECOND));\n setDateTimeViews();\n }\n };\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(this,\n setDate, //callback\n initDate.get(Calendar.YEAR), //initial values\n initDate.get(Calendar.MONTH),\n initDate.get(Calendar.DAY_OF_MONTH));\n datePickerDialog.show(); //shows the dialogue\n }",
"public void setDate() {\n this.date = new Date();\n }",
"@Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n final String selectedDate = year + \"-\" + String.format(\"%02d\", (month+1)) + \"-\" + String.format(\"%02d\", day);\n mDateSession.setText(selectedDate);\n dateFormatted=year+\"\"+String.format(\"%02d\", (month+1))+\"\"+String.format(\"%02d\", day);\n }",
"public CurrentDate getCurrentDate() { \n return mCurrentDate; \n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"public void promptDate(String date)\n {\n this.date = date;\n }",
"public Date getCurrentDate()\r\n {\r\n return (m_currentDate);\r\n }",
"public void onDateSet(DatePicker view, int year, int month, int day){\n TextView tv = getActivity().findViewById(R.id.textBornAdult);\n\n // Create a Date variable/object with user chosen date\n Calendar cal = Calendar.getInstance(SBFApplication.config.locale);\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n // DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, BaseActivity.getInstance().config.locale);\n String formattedDateShow = formatterBornShow.format(chosenDate);\n String formattedDate = formatterTrain.format(chosenDate);\n // formatter.format(date.getDate()\n\n\n // Display the chosen date to app interface\n tv.setText(formattedDateShow);\n dateBorn=formattedDate;\n // MemoryStore.set(getActivity(), \"adultBorn\", formattedDate);\n // MemoryStore.set(getActivity(), \"adultBornShow\", formattedDateShow);\n }",
"public Date getCurrentDate() {\n\t\treturn new Date();\n\t}",
"@Override\n\tprotected void setDate() {\n\n\t}",
"@Override\r\n public void onDateSet(DatePicker view, int selectedYear, int selectedMonth, int selectedDay) {\r\n year = selectedYear;\r\n month = selectedMonth;\r\n day = selectedDay;\r\n\r\n // Show selected date\r\n W_date.setText(new StringBuilder().append(month + 1).append(\"-\").append(day)\r\n .append(\"-\").append(year).append(\" \"));\r\n }",
"private void initPopupDate() {\n editDate = findViewById(R.id.date_depense);\n date = new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n // TODO Auto-generated method stub\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDate();\n }\n\n };\n\n // onclick - popup datepicker\n editDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n new DatePickerDialog(context, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }",
"private void show_Date_Picker() {\n final Calendar c = Calendar.getInstance();\r\n mYear = c.get(Calendar.YEAR);\r\n mMonth = c.get(Calendar.MONTH);\r\n mDay = c.get(Calendar.DAY_OF_MONTH);\r\n android.app.DatePickerDialog datePickerDialog = new android.app.DatePickerDialog(this,\r\n new android.app.DatePickerDialog.OnDateSetListener() {\r\n\r\n @Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth)\r\n {\r\n\r\n txt_mfgdate_text.setText(dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year);\r\n\r\n }\r\n }, mYear, mMonth, mDay);\r\n datePickerDialog.show();\r\n\r\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(merchantHome, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"public static Date getCurrentDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tjava.util.Date currentDate = calendar.getTime();\r\n\t\tDate date = new Date(currentDate.getTime());\r\n\t\treturn date;\r\n\t}",
"@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}",
"public void setDate(Date newDate) {\n this.currentDate = newDate;\n }",
"public void setRequestedDate(Date date) {\n requestedDate.setText(formatDate(date));\n }",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void onClick(final View v) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) final Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker = new DatePickerDialog(UserRegister.this, new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n mybirthday = new GregorianCalendar(selectedyear, selectedmonth, selectedday).getTime();\n\n String birthday = \"\" + selectedday + \"/\" + (selectedmonth + 1) + \"/\" + selectedyear + \"\";\n // String dob = birthday;\n et_dob.setText(birthday);\n\n\n if (validatedate(mybirthday)) {\n Snackbar.make(v, birthday + \" is not possible\", Snackbar.LENGTH_LONG).show();\n et_dob.setText(\"\");\n return;\n }\n if (validateage(mybirthday)) {\n Snackbar.make(v, \"You have to be above 15 years old\", Snackbar.LENGTH_LONG)\n .setAction(\"Help\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //visitwebsite();\n }\n })\n .show();\n et_dob.setText(\"\");\n }\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select date\");\n mDatePicker.show();\n\n\n }",
"@Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n int mYear = c.get(Calendar.YEAR); // current year\n int mMonth = c.get(Calendar.MONTH); // current month\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\n // date picker dialog\n datePickerDialog = new DatePickerDialog(ChangeProfileActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n // set day of month , month and year value in the edit text\n txtdate.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }",
"private void setToday() {\r\n\t\tmTime = new Date().getTime();\r\n\t}",
"public void resetDates() {\r\n selectedDate = null;\r\n currentDate = Calendar.getInstance();\r\n }",
"public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the current date as the default date in the picker\n final Calendar c = Calendar.getInstance();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH);\n int day = c.get(Calendar.DAY_OF_MONTH);\n\n // Create a new instance of DatePickerDialog and return it\n return new DatePickerDialog(getActivity(), this, year, month, day);\n }",
"public Date getDate(Date defaultVal) {\n return get(ContentType.DateType, defaultVal);\n }",
"public void selectDateToMeet(View view) {\n int day;\n int month;\n int year;\n\n /* if the date button has tag of DATE_PICKED then set the date on dialog to date picked earlier,\n otherwise display todays date on the dialog */\n if (dateText.getText().toString().equals(\"\") || !dateText.getText().toString().toLowerCase().contains(\"date\")) {\n String dates[] = dateText.getText().toString().split(\"-\");\n\n day = Integer.parseInt(dates[2]);\n //minus 1 to get the month index\n month = Integer.parseInt(dates[1]) - 1;\n year = Integer.parseInt(dates[0]);\n\n } else {\n //get todays date\n Calendar cal = Calendar.getInstance();\n\n day = cal.get(Calendar.DAY_OF_MONTH);\n month = cal.get(Calendar.MONTH);\n year = cal.get(Calendar.YEAR);\n }\n\n //set the dialog with the date and show it\n DatePickerDialog dialog = new DatePickerDialog(BookPlanActivity.this,\n android.R.style.Theme_Holo_Light_Dialog_MinWidth,\n mDataSetListener, year, month, day);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, \"Clear Date\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n dateText.setText(\"Select a date\");\n }\n });\n\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.show();\n }",
"private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }",
"public void goToToday() {\n goToDate(today());\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(UserUpdate.this, date, cal\n .get(Calendar.YEAR), cal.get(Calendar.MONTH), cal\n .get(Calendar.DAY_OF_MONTH)).show();\n }"
] |
[
"0.7570866",
"0.7052404",
"0.6975466",
"0.68639815",
"0.67990696",
"0.6789898",
"0.6783088",
"0.6780454",
"0.670162",
"0.6687505",
"0.66742736",
"0.6661783",
"0.66408455",
"0.6629506",
"0.6622046",
"0.6614785",
"0.66132003",
"0.65635",
"0.6558133",
"0.65395504",
"0.65298307",
"0.65156174",
"0.6510428",
"0.6485256",
"0.648461",
"0.64734167",
"0.64591086",
"0.6439087",
"0.64362216",
"0.64352",
"0.6425105",
"0.64064705",
"0.64024687",
"0.6393669",
"0.63908446",
"0.637432",
"0.63651586",
"0.6359516",
"0.63401186",
"0.63357407",
"0.632999",
"0.63193524",
"0.63104266",
"0.63042456",
"0.62969303",
"0.6276454",
"0.62764436",
"0.62690413",
"0.62551206",
"0.62495565",
"0.6243641",
"0.62392336",
"0.62359583",
"0.6220534",
"0.6207687",
"0.6200541",
"0.61888283",
"0.6177189",
"0.61749333",
"0.6163734",
"0.6161484",
"0.615686",
"0.6150765",
"0.61318576",
"0.6123813",
"0.6115902",
"0.609712",
"0.6087521",
"0.60867393",
"0.6079668",
"0.6078085",
"0.6077477",
"0.607349",
"0.6068905",
"0.6047426",
"0.6044209",
"0.6043971",
"0.60376734",
"0.60356957",
"0.60304505",
"0.602971",
"0.6022028",
"0.6019977",
"0.6016815",
"0.6011811",
"0.6000793",
"0.59980947",
"0.5995633",
"0.59946495",
"0.59938633",
"0.59934145",
"0.5984254",
"0.5983004",
"0.5982952",
"0.5980931",
"0.5977113",
"0.5972836",
"0.59721",
"0.5970178",
"0.59692395",
"0.59642744"
] |
0.0
|
-1
|
when user change date change value of button
|
public void onDateSet(DatePicker view, int year, int month, int day) {
if (getTag().equals("begin")) {
String y = Integer.toString(year);
String m = Integer.toString(month + 1);
String d = Integer.toString(day);
if (d.length() == 1) {
d = "0" + d;
}
if (m.length() == 1) {
m = "0" + m;
}
SearchActivity.setBeginDate(d + "/" + m + "/" + y);
}
if (getTag().equals("end")) {
String y = Integer.toString(year);
String m = Integer.toString(month + 1);
String d = Integer.toString(day);
if (d.length() == 1) {
d = "0" + d;
}
if (m.length() == 1) {
m = "0" + m;
}
SearchActivity.setEndDate(d + "/" + m + "/" + y);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}",
"@FXML\n private void handleChangeDatesButton(ActionEvent e) {\n updateView();\n }",
"private void updateDateButtonText() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); \n String dateForButton = dateFormat.format(mCalendar.getTime()); \n mDateButton.setText(dateForButton);\n\t}",
"private void updateDateDisplay() {\n\t\tStringBuilder date = new StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \");\n\n\t\tchangeDateButton.setText(date);\t\n\t}",
"private void setDateButtonActionPerformed(java.awt.event.ActionEvent evt) {\n Date newDate = calendario.getDate();\n if(newDate != null) {\n java.sql.Date date = new java.sql.Date(newDate.getTime());\n control.setDate(date);\n control.crearAlerta(\"Informacion\", \"La fecha \" + date + \" ha sido agregada\" , this);\n } else {\n control.crearAlerta(\"Advertencia\", \"Debe escoger una fecha\", this);\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDate now = new Date();\n\t\t\t\tString ss = DateFormat.getDateTimeInstance().format(now);\n\t\t\t\tlblDate.setText(ss);\n\t\t\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateMasuk)\n mTglMasuk.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateLulus)\n mTglLulus.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnMasukKerja)\n mTglMasukKerja.setText(dateFormatter.format(newDate.getTime()));\n\n }",
"public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tendDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\n\t\t\ttry {\n\t\t\t\tDatePicker startDatePicker = dpdS.getDatePicker();\n\t\t\t\tDate endDate = (Date) formatter.parse( getFormattedDate(year, month, day) );\n\t\t\t\tDate startDate = (Date) formatter.parse( getFormattedDate(startDatePicker) );\n\t\t\t\tdpdS.getDatePicker().setMinDate(endDate.getTime());\n\t\t\t\tif ( endDate.getTime() < startDate.getTime() ) {\n\t\t\t\t\tdpdS.updateDate(year, month, day);\n\t\t\t\t\tstartDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}",
"public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tstartDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t// change end date\n\t\t\t\n\t\t\ttry {\n\t\t\t\tDatePicker endDatePicker = dpdE.getDatePicker();\n\t\t\t\tDate startDate = (Date) formatter.parse( getFormattedDate(year, month, day) );\n\t\t\t\tDate endDate = (Date) formatter.parse( getFormattedDate(endDatePicker) );\n\t\t\t\tdpdE.getDatePicker().setMinDate(startDate.getTime());\n\t\t\t\tif ( endDate.getTime() < startDate.getTime() ) {\n\t\t\t\t\tdpdE.updateDate(year, month, day);\n\t\t\t\t\tendDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateAnak)\n mTglLahirAnak.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateTanggungan)\n mTglLahirTanggungan.setText(dateFormatter.format(newDate.getTime()));\n }",
"void updateChangedDate(int year, int month, int day);",
"private void dateFieldDtActionPerformed(java.awt.event.ActionEvent evt) {\n\t}",
"public void onDateSet(DatePicker view, int year, int month, int day) {\n Button button = (Button) findViewById(R.id.dateBtn);\n button.setText(\"Selected Date: \" + month + \"/\" + day + \"/\" + year);\n calendarSelected.set(year, month, day);\n userSelectedDate = true;\n\n if (!userSelectedTime) {\n int hour = calendarSelected.get(Calendar.HOUR_OF_DAY);\n int minute = calendarSelected.get(Calendar.MINUTE);\n\n button = (Button) findViewById(R.id.timeBtn);\n button.setText(\"Selected Time: \" + hour + \":\" + String.format(\"%02d\",minute));\n }\n }",
"public void updateChangedDate(int year, int month, int day);",
"@Override\n public void onClick(View v) {\n\n dp.updateDate(2020, 6, 1);\n tp.setCurrentHour(19);\n tp.setCurrentMinute(30);\n edName.setText(\" \");\n edMobile.setText(\" \");\n edSize.setText(\" \");\n\n Toast.makeText(MainActivity.this, \"You have Reset your reservation\", Toast.LENGTH_LONG).show();\n //Toast.makeText(MainActivity.this, \"Button Reset is clicked\", Toast.LENGTH_SHORT).show();\n }",
"private void writeDateToButton(Calendar c, int id){\n switch (id){\n case R.id.newEvent_button_from:\n btnFrom.setText(Calender.formatDateGlobal(c.getTime()));\n break;\n case R.id.newEvent_button_to:\n btnTo.setText(Calender.formatDateGlobal(c.getTime()));\n break;\n case R.id.newEvent_button_from_hour:\n btnHourFrom.setText(Calender.formatTimeGlobal(c.getTime()));\n break;\n case R.id.newEvent_button_to_hour:\n btnHourTo.setText(Calender.formatTimeGlobal(c.getTime()));\n break;\n }\n }",
"@FXML\n private void updateDateOrder(ActionEvent event) {\n\n if (sortOrder == Order.DATE_ASC) {\n\n sortOrder = Order.DATE_DESC;\n\n } else if (sortOrder == Order.DATE_DESC) {\n\n sortOrder = Order.DEFAULT;\n\n } else {\n\n sortOrder = Order.DATE_ASC;\n\n }\n\n updateOrderButtons();\n\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString fcraDate = (String) btnFcraDate.getText();\n\t\t\t\t\tString dateParts[] = fcraDate.split(\"-\");\n\t\t\t\t\tsetfromday1 = dateParts[0];\n\t\t\t\t\tsetfrommonth1 = dateParts[1];\n\t\t\t\t\tsetfromyear1 = dateParts[2];\n\t \n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromday1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfrommonth1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromyear1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+fcraDate);\n\t\t\t\t\tshowDialog(FCRA_DATE_DIALOG_ID);\n\t\t\t\t}",
"public void actualDateSwitchAction() {\n\t\tdateToDisplay = Utils.removeTime(Calendar.getInstance().getTime());\n\t\tshowAnimalList(dateToDisplay);\n\t\tanimalsListPanel.switchToToday();\n\t}",
"public void updateDate(Date date);",
"@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n int mMonth = month + 1;\n String bydate = year + \"-\" + mMonth + \"-\" + day;\n mIdTvMoonatCenterShortLine.setText(bydate);\n\n List<SleepDataInfo> all = manager.findAllSleep();\n SleepDataInfo sleepDataInfo_total = manager.findSleepDataInfo(SPUtil.getUserName(getApplication()), bydate);\n RefreshView(sleepDataInfo_total); /*选择日期后刷新ui*/\n }",
"private void updateDisplay(int year, int month, int day) {\n\t\tDate = new StringBuilder().append(month + 1).append(\"-\").append(day).append(\"-\").append(year).append(\" \").toString();\r\n\t\tSystem.out.println(\"BirthDate==>\" + Date);\r\n\t\t btnBirthDate.setText(fun.getBirthDate(String.valueOf(month+1),String.valueOf(day),String.valueOf(year)));\r\n\t\t//btnBirthDate.setText(new StringBuilder().append(month + 1).append(\"-\").append(day).append(\"-\").append(year).append(\" \").toString());\r\n\t\t// Date=new StringBuilder().append(month + 1).append(\"-\").append(day).append(\"-\").append(year).append(\" \").toString();\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlan = 1;\r\n\t\t\t\tchonNgayDatetimePicker(c);\r\n\t\t\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n purCalen.set(year, monthOfYear, dayOfMonth);\n purDateBtn.setText(year+\"년 \"+(monthOfYear+1)+\"월 \"+ dayOfMonth+\"일\");\n setShelfCalen();\n// String msg = String.format(\"%d / %d / %d\", year,monthOfYear+1, dayOfMonth);\n// Toast.makeText(FoodInputActivity.this, msg, Toast.LENGTH_SHORT).show();\n }",
"public void stateChanged(ChangeEvent e) \n\t{\n\t\t//if user has changed clicked the next month, redraw all the buttons\n\t\tif (cModel.hasUpdated()) \n\t\t{\n\t\t\t//find and update the new amount of days in the month\n\t\t\tmonthMaxDays = cModel.getMonthMaxDays();\n\t\t\t\n\t\t\t//erase buttons from panel\n\t\t\tnumberPanel.removeAll();\n\t\t\t\n\t\t\t//delete all the buttons from the array\n\t\t\tbuttonArray.clear();\n\t\t\t\n\t\t\t//erase the date since none is selected\n\t\t\teraseDateLabel();\n\t\t\t\n\t\t\t//update the label for the month/year\n\t\t\tmonthYearLabel.setText(monthArray[cModel.getCalMonth()] + \" \" + cModel.getCalYear());\n\t\t\t\n\t\t\t//make the new number buttons\t\t\t\n\t\t\tmakeDayButtons();\n\t\t\t\n\t\t\t//put in the empty buttons\n\t\t\tfor (int i = 1; i < cModel.findDayOfWeek(1); i++) \n\t\t\t{\n\t\t\t\tJButton emptyButton = new JButton();\n\t\t\t\t\n\t\t\t\t//these buttons will not work\n\t\t\t\temptyButton.setEnabled(false);\n\t\t\t\tnumberPanel.add(emptyButton); //add to panel\n\t\t\t}\n\t\t\t\n\t\t\t//add each button from ArrayList to the panel\n\t\t\tfor (JButton day : buttonArray) \n\t\t\t{\n\t\t\t\tnumberPanel.add(day);\n\t\t\t}\n\t\t\t\n\t\t\t//highlightEvents();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//no bordered button\n\t\t\tbordered = -1;\n\t\t\t\n\t\t\tcModel.unupdated();\n\t\t\tframe.pack();\n\t\t\tframe.repaint();\n\t\t} \n\t\telse \n\t\t{\n\t\t\twriteEvents(cModel.getSelectedDate());\n\t\t\tchangeDateLabel(cModel.getSelectedDate());\n\t\t\tborderSelected(cModel.getSelectedDate() - 1);\n\t\t}\n\t}",
"@Override\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString regDate = (String) btnRegDate.getText();\n\t\t\t\t\tString dateParts[] = regDate.split(\"-\");\n\t\t\t\t\tsetfromday = dateParts[0];\n\t\t\t\t\tsetfrommonth = dateParts[1];\n\t\t\t\t\tsetfromyear = dateParts[2];\n\t\t \n\t\t\t\t\tSystem.out.println(\"regdate is:\"+regDate);\n\t\t\t\t\tshowDialog(REG_DATE_DIALOG_ID);\n\t\t\t\t}",
"@FXML\n void saveBtnClicked(ActionEvent event) {\n reportSettingsDAO = new ReportSettingsDAO();\n reportSettings = new ReportSettings();\n\n if (weeklyRadioBtn.isSelected()) {\n reportSettings.setFrequency(\"WEEKLY\");\n } else {\n reportSettings.setFrequency(\"MONTHLY\");\n }\n\n LocalDate tmpDate = nextDate.getValue();\n reportSettings.setNextDate(Date.valueOf(tmpDate));\n\n reportSettingsDAO.updateDate(reportSettings);\n\n }",
"private void selectDate() {\n Calendar calendar = Calendar.getInstance();\n int year = calendar.get(Calendar.YEAR);\n int month = calendar.get(Calendar.MONTH);\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n DatePickerDialog datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n mDatebtn.setText(day + \"-\" + (month + 1) + \"-\" + year); //sets the selected date as test for button\n }\n }, year, month, day);\n datePickerDialog.show();\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n startYear = year;\n startMonth = monthOfYear + 1;\n startDay = dayOfMonth;\n try {\n dateChoisie = df.parse(String.valueOf(startYear + \"-\" + startMonth + \"-\" + startDay));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Log.e(\"DATE CHOISIE\",df.format(dateChoisie));\n switch (v.getId()){\n case R.id.buttonDateDebut:\n editDateDebut.setText(df.format(dateChoisie));\n break;\n case R.id.buttonDateFin:\n editDateFin.setText(df.format(dateChoisie));\n break;\n }\n }",
"@FXML\n public void changeDueDate(ActionEvent actionEvent) {\n }",
"@FXML\r\n\tprivate void updateEndDate(ActionEvent event) {\r\n\t\tupdateAsset(AssetOperation.END_DATE);\r\n\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tshowDialog(SET_DATE_DIALOG);\n\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n Date date = new Date();\n DateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n String time = timeFormat.format(date);\n relogio.setText(time);\n \n Date date2 = new Date();\n DateFormat timeFormat2 = new SimpleDateFormat(\"dd/MM/yyyy\");\n String time2 = timeFormat2.format(date2);\n data.setText(time2);\n }",
"@Override\n public void onClick(Date date) {\n Event_dialog(date);\n }",
"@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(btnStartDate, myCalendar);\n\n //set hasCheckDate to true\n hasCheckDate = true;\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(btnEndDate, myCalendar);\n\n //set hasCheckDate to true\n hasCheckDate = true;\n }",
"public void setTodayDate() {\r\n int oldMonthValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().setTodayDate();\r\n updateControlsFromTable();\r\n // fire property change\r\n int newMonthValue = getMonth();\r\n if (oldMonthValue != newMonthValue) {\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, newMonthValue);\r\n }\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n // clear selection when changing the month in view\r\n if (oldMonthValue != newMonthValue && oldYearValue != newYearValue) {\r\n calendarTable.getSelectionModel().clearSelection();\r\n }\r\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(UserUpdate.this, date, cal\n .get(Calendar.YEAR), cal.get(Calendar.MONTH), cal\n .get(Calendar.DAY_OF_MONTH)).show();\n }",
"protected void UpdateButtons()\n {\n btnIn.setEnabled(usr.getPostType() == Util.ATTENDANCE_DAY_OUT);\n btnOut.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n btnScan.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n\n }",
"private void dateEntryViewActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@FXML\n private void updateDates() {\n WeekFields weekFields = WeekFields.of(Locale.ENGLISH);\n weekNumber = date.get(weekFields.weekOfWeekBasedYear());\n weekNr.setText(\"\" + weekNumber);\n\n /* Update drawn events when changing week */\n drawEventsForWeek();\n \n\t\t/* Set current month/year */\n month_Year.setText(date.getMonth() + \" \" + date.getYear());\n\t\t\n\t\t/* Set date of weekday_labels */\n for (int i = 0; i < weekday_labels.size(); i++) {\n int date_value = date.with(DayOfWeek.MONDAY).plusDays(i).getDayOfMonth();\n weekday_labels.get(i).setText(\"\" + date_value + \".\");\n }\n }",
"private void updateLabel(Button button, Calendar calendar) {\n button.setText(sdf.format(calendar.getTime()));\n }",
"public void onDayWeekOrMonthButtonClicked(View view) {\n buttonIdChecked = view.getId();\n updateView();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd-mm-yyyy\");\n\t\t\t\t\n\t\t\t\tDate DatumRodjenja = new Date();\n\t\t\t\ttry {\n\t\t\t\t\tDatumRodjenja = formatter.parse(txtFieldDatumRodjenja.getText());\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint brojIndeksa = Integer.parseInt(txtFieldBrIndeksa.getText());\n\t\t\t\t\n\t\t\t\t\tControllerStudenti.getInstance().izmeniStudenta(row, txtFieldBrIndeksa.getText(),txtFieldIme.getText(), txtFieldPrezime.getText(), DatumRodjenja, txtFieldAdresaStanovanja.getText(), \n\t\t\t\t\t\t\ttxtFieldBrTelefona.getText(), txtFieldEmail.getText(), (GodinaStudija.getSelectedItem()).toString(), \n\t\t\t\t\t\t\t(comboStatus.getSelectedItem()).toString(),txtFieldGodinaUpisa.getText());\n\t\t\t\t\t\n\t\t\t\t\t//TabStudent.getInstance().azurirajPrikaz();\n\t\t\t\t\t\n\t\t\t\t\tdispose();\n\t\t\t}",
"private void chooseDateFromCalendar(Button dateButton){\n DateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n Calendar nowCalendar = formatCalendar(Calendar.getInstance());\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(getContext(),\n R.style.Theme_TrainClimbing_DatePicker,\n (v, y, m, d) -> {\n inputCalendar.set(y, m, d);\n if (inputCalendar.after(nowCalendar))\n dateButton.setText(R.string.ad_button_date);\n else\n dateButton.setText(sdf.format(inputCalendar.getTime()));\n }, inputCalendar.get(Calendar.YEAR),\n inputCalendar.get(Calendar.MONTH),\n inputCalendar.get(Calendar.DAY_OF_MONTH));\n\n datePickerDialog.getDatePicker().setFirstDayOfWeek(Calendar.MONDAY);\n datePickerDialog.getDatePicker().setMinDate(formatCalendar(\n new GregorianCalendar(2000, 7, 19)).getTimeInMillis());\n datePickerDialog.getDatePicker().setMaxDate(nowCalendar.getTimeInMillis());\n datePickerDialog.show();\n }",
"public interface CheckDateClicker {\n void changeDate(int type);\n}",
"public void setDate(int date){\n this.date = date;\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n int mYear = year;\n int mMonth = monthOfYear;\n int mDay = dayOfMonth;\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n String formatedDate = sdf.format(new Date(year-1900, mMonth, mDay));\n\n SimpleDateFormat sdf2 = new SimpleDateFormat(\"yyyyMMdd\");\n formatedDateMYSQL = sdf2.format(new Date(year-1900, mMonth, mDay));\n\n buttonDate.setText(\"\"+formatedDate+\"\");\n buttonDate.setTag(formatedDateMYSQL);\n\n mAuthTask = new getTaskDetail(useremail,\"\");\n\n mAuthTask.execute((Void) null);\n\n }",
"public void setSelectedDate(Date selectedDate);",
"@Override\n public void onClick(View v) {\n int year = dpStartDate.getYear();\n int month = dpStartDate.getMonth();\n int day = dpStartDate.getDayOfMonth();\n String startDate = Input.formatDateUserInput (\"dateYearFirst\", day, month, year,\n 0,0);\n year = dpEndDate.getYear();\n month = dpEndDate.getMonth();\n day = dpEndDate.getDayOfMonth();\n String endDate = Input.formatDateUserInput (\"dateYearFirst\", day, month, year,\n 0,0);\n\n ReportCalorieBalancePerPeriodAsyncTask reportCaloriePerPeriodAsyncTask = new ReportCalorieBalancePerPeriodAsyncTask();\n reportCaloriePerPeriodAsyncTask.execute(startDate, endDate);\n }",
"public void onUpdate(final String updateId) {\n LayoutInflater ld = LayoutInflater.from(GoalDisActivity.this);\n View promptsDateView = ld.inflate(R.layout.date_button, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Goal-Date\");\n build.setMessage(\"Please Enter new Goal Date\");\n build.setView(promptsDateView);\n newDate = (Button) promptsDateView.findViewById(R.id.newGoalDate);\n newDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n showDialog(DATE_DIALOG_ID);\n }\n });\n\n final Calendar c = Calendar.getInstance();\n currentYear = c.get(Calendar.YEAR);\n currentMonth = c.get(Calendar.MONTH);\n currentDay = c.get(Calendar.DAY_OF_MONTH);\n\n newDate.setFocusableInTouchMode(true);\n //newDate.setFocusable(true);\n //newDate.requestFocus();\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + updateId, null);\n if (mCursor.moveToFirst()) {\n do {\n dayValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.DAY));\n } while (mCursor.moveToNext());\n }\n\n if (dayG != null && !dayG.isEmpty() && monthG != null && !monthG.isEmpty() && yearG != null && !yearG.isEmpty()) {\n int dayVal = Integer.valueOf(dayG), monthVal = Integer.valueOf(monthG), yearVal = Integer.valueOf(yearG);\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.DAY + \"=\" + String.valueOf(dayVal) + \", \" + DbHelperGoal.MONTH + \"=\" + String.valueOf(monthVal) + \", \" + DbHelperGoal.YEAR + \"=\" + String.valueOf(yearVal) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + updateId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), dayValue.toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }else{\n Toast.makeText(getApplication(), \"Please choose a date\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"New Date Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }",
"public void changeDate(String a) {\r\n getDate().editDate(a);\r\n }",
"private void monthFieldDtActionPerformed(java.awt.event.ActionEvent evt) {\n\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n date.setText(year+\"/\"+(month+1)+ \"/\"+ day);\n hDate = year+\"/\"+(month+1)+ \"/\"+ day;\n check(hDate, status);\n }",
"@Override\r\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\r\n int mYear = c.get(Calendar.YEAR); // current year\r\n int mMonth = c.get(Calendar.MONTH); // current month\r\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\r\n\r\n\r\n // date picker dialog\r\n datePickerDialog = new DatePickerDialog(task_setting.this,\r\n new DatePickerDialog.OnDateSetListener() {\r\n\r\n\r\n @Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth) {\r\n // set day of month , month and year value in the edit text\r\n\r\n final String[] MONTHS = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\r\n String mon = MONTHS[monthOfYear];\r\n date.setText(mon + \" \" + dayOfMonth + \", \" + year);\r\n }\r\n }, mYear, mMonth, mDay);\r\n datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);\r\n datePickerDialog.show();\r\n }",
"public void updateDate()\n\t{\n\t\t// Translate year, month and day into a Date object.\n\t\tmDate = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMin).getTime();\n\t\t\n\t\t// Update arguments to preserve selected value on rotation.\n\t\tgetArguments().putSerializable(CrimeFragment.EXTRA_DATE, mDate);\n\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n currentDate.set(year, monthOfYear, dayOfMonth);\n updateLabel();\n }",
"@Override\n public void actionPerformed(ActionEvent evt) \n {\n Evenement E2=new Evenement(E.getId_etablissement(),C.getDate(),gui_Text_Field_2.getText(),gui_Text_Field_1.getText());\n EvenementService service=new EvenementService();\n service.updateEvenement(E,E2);\n last.refreshTheme();\n last.show();\n \n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tDate date=new Date();\n\t\t\tDateFormat timeFormat=new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tString time=timeFormat.format(date);\n\t\t\tceas.setText(\"Ora curenta: \"+time);\n\t\t}",
"private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }",
"void onClickDateRange();",
"private void csrdateTxtActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\t\tif (e.getSource() == button)\r\n\t\t{\r\n\t\t\t//Get information from calendar\r\n\t\t\tif (datePicker.getModel().getValue() != null)\r\n\t\t\t{\r\n\t\t\t\tDate calendar = (Date) datePicker.getModel().getValue();\r\n\t\t\t\tint month = calendar.getMonth()+1;\r\n\t\t\t\tint day = calendar.getDate();\r\n\t\t\t\tdate = month + \"/\" + day;\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdispose();\r\n\t\t\t\tJOptionPane pane = new JOptionPane();\r\n\t\t\t\tpane.setMessage(\"Error: no date chosen\");\r\n\t\t\t\tJDialog dialog = pane.createDialog(null);\r\n\t\t\t\tdialog.setVisible(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdispose();\r\n\t\t\tJOptionPane pane = new JOptionPane();\r\n\t\t\tpane.setMessage(\"Error: no input\");\r\n\t\t\tJDialog dialog = pane.createDialog(null);\r\n\t\t\tdialog.setVisible(true);\r\n\t\t}\r\n\r\n\t}",
"public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n// updateLabel();\n updateLabel();\n// callTimeSlotService();\n\n }",
"public void updateDate() {\n for (ChangeListener l : listeners) {\n l.stateChanged(new ChangeEvent(this));\n }\n }",
"public void onDateSet(DatePicker view, int selectedYear,\n\t\t\t\t\tint selectedMonth, int selectedDay) {\n\t\t\t\t\tyear = selectedYear; \n\t\t\t\t\tmonth = selectedMonth; \n\t\t\t\t\tday = selectedDay;\n\t\t\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t\t\t// Month is 0 based, just add 1\n\t\t\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t\t\t.append(year));\n\t\t\t}",
"private void rangoFecha1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif(cbbChooseTime.getSelectedIndex() == 0 || dateChooser.getDate() == null) {\n\t\t\t\tJOptionPane.showMessageDialog(getPanel(), \"Hãy đảm bảo đã chọn đủ ngày và giờ.\\n\");\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tfor(int i = 0 ; i < 8 ; i ++) {// reset tất cả các màu các nút sẽ là màu cam\n\t\t\t\t\tif(listButtonYard.get(i).getStatus() != 2) {\n\t\t\t\t\t\tlistButtonYard.get(i).getButton().setBackground(Color.ORANGE);\n\t\t\t\t\t\tlistButtonYard.get(i).setStatus(0);// đánh dấu là chưa đặt\n\t\t\t\t\t\tlistButtonYard.get(i).getButton().setEnabled(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlistOrder = OrderService.getInstance().getOrderByDate_Time(dateChooser.getDate(), ((Time)cbbChooseTime.getSelectedItem()).getIdTime());//lấy danh sách Order theo ngày và time\n\t\t\t\tfor(int i = 0 ; i < listOrder.size() ; i++) {\n\t\t\t\t\tint id = listOrder.get(i).getIdYard();//lấy id Sân đã được đặt\n\t\t\t\t\tfor(Button_Yard item : listButtonYard) {\n\t\t\t\t\t\tif(item.getIdYard() == id) {\n\t\t\t\t\t\t\titem.getButton().setBackground(new Color(50, 205, 50));// set Color cho sân đã được đặt là màu xanh lá cây\n\t\t\t\t\t\t\titem.setStatus(1);// đánh dấu sân đã được đặ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}",
"private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }",
"@Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n int mYear = c.get(Calendar.YEAR); // current year\n int mMonth = c.get(Calendar.MONTH); // current month\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\n // date picker dialog\n datePickerDialog = new DatePickerDialog(ChangeProfileActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n // set day of month , month and year value in the edit text\n txtdate.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }",
"@Override\n\tpublic void eventDate(Date newDate) {\n\t\t\n\t}",
"@Override\n public void onClick(View v) {\n \t\tString text = textField.getText().toString();\n \t\t//String priority = priorityField.getText().toString();\n\t\t\t\tCalendar newDate = Calendar.getInstance();\n\t\t\t\tnewDate.set(datePicker.getYear(),\n\t\t\t\t\tdatePicker.getMonth(), datePicker.getDayOfMonth());\n \t\tlistener.onAddDialogDone(text, newDate);\n \t\tgetDialog().dismiss();\n }",
"@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckOut.setText(date);\n long today = Calendar.getTimeInMillis();\n view.setMinDate(today);\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n //memunculkan pilihan pada UI\n datePickerDialog.show();\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n yearN = year;\n monthN = month;\n dayN = dayOfMonth;\n\n yearFinal = year;\n monthFinal = String.valueOf(month + 1);\n dayFinal = String.valueOf(dayOfMonth);\n\n if (monthFinal.length() == 1) {\n monthFinal = \"0\" + monthFinal;\n }\n if (dayFinal.length() == 1) {\n dayFinal = \"0\" + dayFinal;\n }\n dateFinal = dayFinal + \".\" + monthFinal + \".\" + yearFinal;\n btn_dueDate.setText(dateFinal);\n }",
"void setDate(Date data);",
"public void onDateSet(DatePicker view, int selectedYear,\n\t\t\t\t\tint selectedMonth, int selectedDay) {\n\t\t\t\tyear = selectedYear;\n\t\t\t\tmonth = selectedMonth;\n\t\t\t\tday = selectedDay;\n\t\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t\t// Month is 0 based, just add 1\n\t\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t\t.append(year));\n\t\t\t}",
"private void configDate(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n tvDateLost.setText(dateFormat.format(date));\n }",
"@Override\n public void onClick(View v) {\n orderField = \"orderTime\";\n btn_single_time.setTextColor(getResources().getColor(R.color.colorff6c02));\n btn_array_time.setTextColor(getResources().getColor(R.color.color000000));\n submitInitOrRefreshOrSearch();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). consultPeriod() ;}",
"private void monthFieldDfActionPerformed(java.awt.event.ActionEvent evt) {\n\t}",
"public void onClick(View view) {\n\t\t\t\t\tf=1;f1=0;\n\t\t \t\tsyear=myCalendar.get(Calendar.YEAR);\n\t\t \t\tsmonth=myCalendar.get(Calendar.MONTH);\n\t\t \t\tsday=myCalendar.get(Calendar.DAY_OF_MONTH);\n\t\t\t\t\tnew DatePickerDialog(getActivity(), date, myCalendar\n\t\t .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n\t\t myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n\t\t\t\t}",
"private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }",
"@Override\n public void onClick(View v) {\n MmxDate dateTime = new MmxDate(getPaymentDate());\n\n CalendarDatePickerDialogFragment datePicker = new CalendarDatePickerDialogFragment()\n .setFirstDayOfWeek(dateUtils.getFirstDayOfWeek())\n .setOnDateSetListener(listener)\n .setPreselectedDate(dateTime.getYear(), dateTime.getMonth() - 1, dateTime.getDayOfMonth());\n if (new UIHelper(RecurringTransactionEditActivity.this).isUsingDarkTheme()) {\n datePicker.setThemeDark();\n }\n datePicker.show(getSupportFragmentManager(), TAG_DATEPICKER);\n }",
"public void updateBDate() {\n bDate = new Date();\n }",
"@Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n mDateField.setText(year + \"/\" + (month + 1) + \"/\" + day);\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel1();\n }",
"public void onClick(View view) {\n\t\t\t\t\tf1=1;f=0;\n\t\t\t\t\teyear=myCalendar.get(Calendar.YEAR);\n\t\t \t\temonth=myCalendar.get(Calendar.MONTH);\n\t\t \t\teday=myCalendar.get(Calendar.DAY_OF_MONTH);\n\t\t \t\tnew DatePickerDialog(getActivity(), date, myCalendar\n\t\t .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n\t\t myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n\t\t\t\t}",
"@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n month=month+1;\n String currentInfo=\"\";\n Cursor cursor=myDb.getRow(mId1);// finding selected row item to store the selected date\n if(cursor.moveToFirst()){\n do{\n currentInfo=cursor.getString(cursor.getColumnIndex(myDb.KEY_DATE));\n\n }while (cursor.moveToNext());\n cursor.close();\n }\n currentInfo =year+\"-\"+month+\"-\"+day;\n //Storing the date at selected row\n myDb.updateRow(mId1, currentInfo);\n\n populateListViewFromDB();\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateBdateValue();\n }",
"public void onDateSet(DatePicker view, int year, int month, int day) {\n }",
"private void yearFieldDtActionPerformed(java.awt.event.ActionEvent evt) {\n\t}",
"@Override\n public void onDateSet(DatePicker arg0,\n int arg1, int arg2, int arg3) {\n ETdateTo.setText(new StringBuilder().append(arg3).append(\"-\")\n .append(arg2+1).append(\"-\").append(arg1));\n }",
"public void set_value_to_default() {\n this.selectionListStrike.setText(\"\");\n this.selectionListCal_iv.setText(\"\");\n this.selectionListUlast.setText(\"\");\n String format = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date());\n int parseInt = Integer.parseInt(format.substring(6, 10));\n int parseInt2 = Integer.parseInt(format.substring(3, 5));\n int parseInt3 = Integer.parseInt(format.substring(0, 2));\n this.selectedDate = parseInt + \"-\" + parseInt2 + \"-\" + parseInt3;\n this.selectionListExpiry.setSelectedText(format);\n this.selectionListExpiry.initItems(R.string.set_date, SelectionList.PopTypes.DATE, parseInt, parseInt2, parseInt3);\n if (!this.wtype.equals(\"C\")) {\n this.callputbutton.callOnClick();\n }\n }",
"private void updateDisplay() {\r\n\t\tbtnBirthDate.setText(new StringBuilder()\r\n\t\t// Month is 0 based so add 1\r\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\").append(mYear).append(\" \"));\r\n\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, dayOfMonth);\n Date date = new Date(calendar.getTimeInMillis());\n edit.setText(Utils.formatDate(date, Constants.FORMAT_DATE_YEAR_MONTH_DAY));\n if (startDate) {\n mStartDate = new Date(date.getTime());\n } else {\n mEndDate = new Date(date.getTime());\n }\n // has to do here\n updateInterest();\n }",
"public void onClick(View v) {\n\t\t \tint days = 0;\n\t\t \ttry {\n\t\t \tdays = Integer.valueOf(WorkingDays.getText().toString());\n\t\t \tdays = days + 1;\n\t\t\t\tWorkingDays.setText(String.format(\"%d\", days));\n\t\t \t} catch (Throwable t) {\n//\t\t\t\t\tLog.e(TAG, t.getMessage());\n\t\t\t\t}\n\t\t \t\n\t\t \t\n\t\t\t\tcal.set(StartDate.getYear(), StartDate.getMonth(), StartDate.getDayOfMonth());\n\t\t\t\tcal= weekendOffset(cal);\n\t\t Calendar updatedc;\n\t\t\t\ttry {\n\t\t\t\t\tprojectdays = Integer.valueOf(WorkingDays.getText().toString());\n\t\t\t\t\tif(projectdays!=0)\n\t\t\t\t\t {\n\t\t\t\t\t updatedc = compute_day_date(cal,projectdays); \n\t\t\t\t\t Result.setText(String.format(\"%1$tA, %1$td %1$tB %1$ty\", updatedc));\n\t\t\t\t\t }\n\t\t\t\t\telse // 0 days is not a valid entry\n\t\t\t\t\t {\n\t\t\t\t\t\tWorkingDays.setText(\"1\");\n\t\t\t\t\t }\n\t\t\t\t} catch (Throwable t) {\n\t\t\t\t\tLog.e(TAG, t.getMessage());\n\t\t\t\t}\n\t\t }",
"public void onDateSet(DatePicker view, int year, int month, int day)\t{\n\t\tDate d = null;\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.set(year, month, day);\n\t\td = cal.getTime();\n\n\t\tString strFecha = Convertir_de_date_a_string(d);\n\t\tTextView labelFecha = (TextView) getActivity().findViewById(this.idLabelFecha);\n\t\tif(labelFecha!=null){\n\t\t\tlabelFecha.setText(strFecha);\n\t\t}\n\n\t\tactivity.calculateNextPeriod(strFecha);\n\t}",
"@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tString st=stext.getText().toString();\n\t\t\tinitdate(st);\n\t\t}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n\n\n }"
] |
[
"0.7449167",
"0.7065897",
"0.70464057",
"0.68179107",
"0.6723883",
"0.6639433",
"0.65341944",
"0.65314",
"0.65229005",
"0.6512588",
"0.6453457",
"0.6444066",
"0.6430267",
"0.63976085",
"0.6387811",
"0.63696635",
"0.63652146",
"0.63575906",
"0.6352537",
"0.6348454",
"0.63334435",
"0.6332228",
"0.63144475",
"0.63107336",
"0.6305484",
"0.63050956",
"0.6278997",
"0.6275168",
"0.62673175",
"0.6262677",
"0.62371576",
"0.61928236",
"0.6181338",
"0.61594594",
"0.6152942",
"0.61406225",
"0.6114361",
"0.61097693",
"0.61051893",
"0.6100939",
"0.60995543",
"0.60924906",
"0.60885364",
"0.6083968",
"0.60590744",
"0.6056781",
"0.60512996",
"0.6049791",
"0.60425097",
"0.6038811",
"0.60306513",
"0.6014167",
"0.60113305",
"0.6006576",
"0.60056144",
"0.6002517",
"0.60000604",
"0.5995171",
"0.5993456",
"0.599179",
"0.5962939",
"0.596053",
"0.5960133",
"0.5959454",
"0.5952447",
"0.5951641",
"0.5949197",
"0.5948808",
"0.59438026",
"0.5943661",
"0.5942636",
"0.59395534",
"0.59299755",
"0.59290814",
"0.5926884",
"0.59266144",
"0.5926205",
"0.59240067",
"0.59199387",
"0.59164965",
"0.5916192",
"0.59133285",
"0.59131247",
"0.59104806",
"0.5899743",
"0.5899426",
"0.58973247",
"0.58961",
"0.58954793",
"0.5893727",
"0.5890718",
"0.58846873",
"0.58790094",
"0.58763015",
"0.5875254",
"0.58718807",
"0.58682054",
"0.58644503",
"0.58626527",
"0.58599603",
"0.5845718"
] |
0.0
|
-1
|
checkAuthentication: check login and password
|
private boolean checkAuthentication(String login, String passwd) {
Connection connect;
boolean result = false;
try {
// connect db
Class.forName(DRIVER_NAME);
connect = DriverManager.getConnection(SQLITE_DB);
// looking for login && passwd in db
Statement stmt = connect.createStatement();
ResultSet rs = stmt.executeQuery(SQL_SELECT.replace("?", login));
while (rs.next())
result = rs.getString(PASSWD_COL).equals(passwd);
// close all
rs.close();
stmt.close();
connect.close();
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
return result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract boolean checkCredentials (String username, String password);",
"boolean authenticate(String userName, String password);",
"boolean isAuthenticate(String username, String password) throws UserDaoException;",
"@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\t\t// validate username and pwd with predefined credentials\n\t\tif (username.equals(Utility.USERNAME) && password.equals(Utility.PASSWORD)) {\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean validateUserAndPassword(String username, String password);",
"boolean isValidCredential(String username, String password);",
"boolean isLogin(String username, String password)\n {\n String endURL = \"login/\" + username + \"/\" + password;\n return (request(\"GET\", \"\", endURL).equals(\"SUCCESSFUL\"));\n }",
"public Boolean authentication(String username, String password) \n\t{\n\t\n\t switch (username) {\n\t case \"FS_UTO_CoE_Sreenivas\":\n\t \t\t\tif (year<=2018)\n\t \t\t\tpassorfail=password.equals(\"q2m!x:dCk6FaG$Ec\");\n\t \t\t\t\tbreak;\n\t// case \"FS_BAN_ANZ_DIGITAL_GANESH\": \n\t//\t\t \t\t\tpassorfail=password.equals(\"q`r^8{De,Sn*!KU_\");\n\t//\t\t \t\t\t\tbreak;\t\t \t\t\t\t\n\t default: \n\t\t\t\t\t\t\tpassorfail = false; \n\t\t\t\t\t\t\tbreak; \t\t \n\t\t}\n\t\treturn passorfail;\n\n\t}",
"public boolean loginCheck() {\n\t\tif(allParametersGiven==true) {\n\t\t\treturn dtb.checkLoginDetais(username,password);\n\t\t}\n\t\treturn false;\n\t}",
"private static boolean authenticate(String username, String password) {\r\n\t\tFile file = new File(\"auth.txt\");\r\n\t\tScanner scanner;\r\n\t\tString user = null;\r\n\t\tString pwd = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(file);\r\n\t\t\tString nextLine = scanner.nextLine();\r\n\t\t\tString[] parts = nextLine.split(\"=\");\r\n\t\t\tuser = parts[0];\r\n\t\t\tpwd = parts[1];\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn (username.equals(user) && password.equals(pwd));\r\n\t\t\r\n\t}",
"public boolean authenticate(String username, String password, HttpServletRequest request){\n try {\n MySQLService sql = new MySQLService();\n String digest = DigestUtils.md5Hex(password);\n boolean isMatched = sql.checkMatch(username, digest);\n System.out.println(isMatched);\n if (isMatched) {\n request.getSession().setAttribute(\"username\", username);\n return true;\n } else {\n return false;\n }\n }catch (Exception e){\n System.out.println(e);\n\n }\n return false;\n }",
"Boolean checkCredentials(String username, String password) throws\n SQLException, UserNotFoundException;",
"public static boolean authenticate(String username, String password) {\n\t\tif (username.equals(\"admin\") && password.equals(\"secret\"))\r\n\t\t\treturn true;\r\n\t\telse if (username.equals(\"user1\") && password.equals(\"1111\"))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean validateUserCredentials(String login, String password) throws SQLException;",
"boolean hasLogin();",
"boolean hasLogin();",
"boolean authNeeded();",
"public String isValidAgentLogin(String userName, String password);",
"Boolean isValidUserPassword(String username, String password);",
"private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }",
"Boolean checkCredentials(ClientCredentialsData clientData) throws AuthenticationException;",
"private void authenticate(String user, String pass) {\n }",
"private int checkAuthentication( SecureDirectory secureDirectory ) throws ServerException {\r\n\r\n\t\tif ( secureDirectory == null )\r\n\t\t\treturn NOT_SECURE_DIR;\r\n\r\n\t\tif ( !request.getHeaderFields().containsKey( HeaderFields.AUTHORIZATION ) )\r\n\t\t\treturn NEED_AUTHENTICATE;\r\n\r\n\t\tString auth = request.getHeaderFields().get( HeaderFields.AUTHORIZATION );\r\n\t\tString[] tokens = auth.split( \" \", 2 );\r\n\t\tif ( authenticate( secureDirectory, tokens[0], tokens[1] ) )\r\n\t\t\treturn AUTHENTICATED;\r\n\r\n\t\t// Password or username not correct\r\n\t\tthrow new ServerException( ResponseTable.FORBIDDEN );\r\n\t}",
"private void checkValidLogin(String username, String password) {\r\n //The check username will check to see if a password was returned. That means the user\r\n //exists. If a void is returned, then the user does not exist.\r\n String actualPassword = checkUsername(username);\r\n\r\n //If a null was passed back, then the username does not exist. We signal the user.\r\n if (actualPassword == null) {\r\n signalInvalidUser();\r\n return;\r\n }\r\n\r\n //We check to see if the password that was type is equal to the 1 we got from the DB. If\r\n //not we signal the user.\r\n if (!checkPassword(password, actualPassword)){\r\n signalInvalidPassword();\r\n return;\r\n }\r\n\r\n //If everything worked, we go to the landing page.\r\n goToLandingPage();\r\n }",
"boolean isAuthenticated();",
"boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);",
"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}",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }",
"private static boolean authenticateUser(String username_input, String password_input){\n\t\tif(!username_input.equals(USERNAME) || !password_input.equals(PASSWORD)){\n\t\t\tSystem.out.println(\"Invalid Credentials Entered!\");\n\t\t\treturn false;\n\t\t}\n\t\telse //username and password entered were correct\n\t\t\tSystem.out.println(\"User Credentials Authenticated! Please wait while books and students are being loaded.\");\n\t\treturn true;\n\t}",
"boolean hasAuth();",
"private void authenticate( String loging, String sysLoging,String password,String sys_password) throws Exception {\n \n if(!loging.equals(sysLoging) || !(sys_password.equals(password) )){\n Exception e = new Exception();\n throw e;\n }\n\n }",
"List<String> authenticateUser(String userName, String password);",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"public boolean ValidCredentials() { \n\t\tif(!isEmptyFieldData()){\n\t\t\tSystemUserQuery sq = new SystemUserQuery();\n\t\t\tUser user = sq.loginQuery(getUsername(), getPassword());\n\t\t\t\n\t\t\tif(user != null){\n\t\t\t\tMain.setCurrentUser(user);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean checkCredentials(final String userid, final String password)\n {\n if(userid == null || password == null || userid.trim().length() < 1 || password.trim().length() < 1)\n {\n return false;\n }\n this.loadPasswordFile();\n if(LoginServlet.passwords.containsKey(userid))\n {\n final String expectedPassword = LoginServlet.passwords.getProperty(userid);\n if(expectedPassword.equals(password))\n {\n return true;\n }\n }\n \n return false;\n }",
"private Authentication tryToAuthenticateWithUsernameAndPassword(String username, String password) {\n\t\tUsernamePasswordAuthenticationToken requestAuthentication = new UsernamePasswordAuthenticationToken(username, password);\n\t\treturn tryToAuthenticate(requestAuthentication);\n \n\t}",
"@Test\n public void existingUserOK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"secret\", 0); \n //Then\n assertThat(result, is(true));\n }",
"static boolean logIn(String username, String password) {\r\n if (accounts.containsKey(username)) {\r\n if (accounts.get(username).getPassword().equals(password)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"@Override\n public boolean checkLogin(String login, String password) {\n logger.info(\" This is checkLogin service ,Geting user from DB with login = \" + login);\n User user = userDao.get(login);\n if (user == null) {\n logger.info(\"This is checkLogin service, user was not found\");\n return false;\n }\n logger.info(\"We was got user by login : \" + login);\n logger.info(\"Checking user password...\");\n if (user.getPassword().equals(password)) {\n logger.info(\"Password is ok\");\n }\n return user.getPassword().equals(password);\n\n }",
"boolean hasLoginResponse();",
"User checkUser(String username, String password);",
"boolean hasLoginRequest();",
"public abstract boolean isLoginRequired();",
"public User doAuthentication(String account, String password);",
"public boolean CheckLogin(String email, String password){\n\n boolean status = false;\n if(this.email.equalsIgnoreCase(email) && this.password.equals(password)){\n status = true;\n }\n return status;\n }",
"@Override\n public boolean userLogin(String username, String password) \n {\n User tmpUser = null;\n tmpUser = getUser(username);\n if(tmpUser == null) return false;\n if(tmpUser.getPassword().equals(password)) return true;\n return false;\n }",
"boolean isLoginAvailable();",
"public static boolean login(Context ctx) {\n\t\t\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\t\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\t\n\t\tif(username.equals(\"user\") && password.equals(\"pass\")) {\n\t\t\tctx.res.setStatus(204);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"McBobby\",true));\n\t\t\treturn true;\n\t\t}else {\n\t\t\t\n\t\t\tctx.res.setStatus(400);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n//\t\tctx.queryParam(password); /authenticate?password=value\n//\t\tctx.pathParam(password); /authenticate/{password}\n\t}",
"private boolean verifyCredentials() {\n\n boolean bCredentialsValid = false;\n strUserMailID = strUserName = \"\";\n\n // Get the account information, if existing\n DatabaseHandler dbHandler = new DatabaseHandler(getApplicationContext());\n AccountInformation accInfo = dbHandler.getAccountInfo(m_tfUserEmailID.getText().toString());\n\n if(accInfo != null) {\n\n // Compute the hash for the user entered password\n OperationsHelper helper = new OperationsHelper();\n String strHashPwd = helper.getHashedPassword(m_tfUserPassword.getText().toString(), accInfo.getSaltValue());\n if(strHashPwd.equals(accInfo.getPassword())) {\n\n bCredentialsValid = true;\n strUserMailID = accInfo.getEmail();\n strUserName = accInfo.getName();\n\n // If Always login option is checked, update the value in the database\n if( ! (m_cbAutoLogon.isChecked() == accInfo.getIfAlwaysSignIn()) ) {\n\n accInfo.setAlwaysSignIn(m_cbAutoLogon.isChecked());\n dbHandler.updateAlwaysSignOnOption(accInfo);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Incorrect Password\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(getApplicationContext(), \"No such account exists. \\n\" +\n \" Create one to login\", Toast.LENGTH_LONG).show();\n }\n\n return bCredentialsValid;\n }",
"@Override\n public boolean checkLogin(String login, String password) throws DaoException {\n User user = userDao.getByEmail(login);\n boolean result = false;\n if (user != null && user.getPassword().equalsIgnoreCase(DigestMD5Helper.computeHash(password))) {\n log.info(\"User {} {} has successfully logged in\", user.getFirstName(), user.getLastName());\n result = true;\n }\n return result;\n }",
"@Override\n\tpublic int checkLogin(User user) {\n\t\tint msg=0;\n\t\ttry{\n\t\t\tUser user2=uDao.loginUser(user.getUsername().toString());\n\t\t\tString pwd=getEncodTool.decodeHexTest(user2.getPassword());\n\t\t\tif(pwd.equals(user.getPassword())){\n\t\t\tmsg=1;\n\t\t\t}else{\n\t\t\t\tmsg=3;\t\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tmsg=2;\n\t\t}\t\n\t\treturn msg;\n\t}",
"int authenticateUser(IDAOSession session, String userName, String password);",
"public boolean passwordCheck() {\n\t\tSystem.out.println(\"Password is: \"+LoggedUser.getPassword());\n\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\tparams.addValue(\"username\", LoggedUser.getUsername());\n\t\tparams.addValue(\"password\", LoggedUser.getPassword());\n\t\treturn jdbc.queryForObject(\"select count(*) from authors where username=:username and password=:password\", \n\t\t\t\tparams, Integer.class) > 0;\n\t}",
"boolean hasLoginapiavgrtt();",
"public boolean loginUser();",
"@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"@Override\n\tpublic boolean authenticate(final String name, final String password) {\n\t\treturn StringUtils.isNotBlank(name) && StringUtils.isNotBlank(password) && findByIdNoCache(name) != null;\n\t}",
"protected boolean doAuthenticate(String password, String challenge)\r\n {\r\n return digest(MD5, challenge).equals(password);\r\n }",
"private boolean authenticatedUser(String uName, String pass) {\n\t\treturn true;\n\t}",
"private boolean validate(String username, String password) {\n\t\tif(username.equals(\"Venkat\") && password.equals(\"kumar\")) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static String getCheckAuthentication() {\n\n\t\treturn baseURL + login_required_string + \"/rest/is-authenticated\";\n\t}",
"@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn true;\n\t}",
"boolean hasPassword2();",
"User authenticate(String username, String password);",
"AuthenticationToken authenticate(String username, CharSequence password) throws Exception;",
"public Boolean authenticate(String username, String password) {\n try {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(\n username,\n password\n )\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n return true;\n } catch (BadCredentialsException e) {\n return false;\n }\n }",
"@Override\r\n\tpublic boolean validatePassword(String hash)\r\n\t{\r\n\r\n\t\tif (hm.containsKey(hash))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Authentication OK.\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Authentication fail.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"public boolean authenticateUser(String userName,String password) throws ToDoListDAOException{\r\n\t\t\r\n\t\t User user = getUserByUserName(userName); \r\n\t\t System.out.println(userName + \" \" + password);\r\n\t if(user!=null && user.getUserName().equals(userName) && user.getPassword().equals(password)){\r\n\t return true;\r\n\t }else{\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t}",
"public void authenticate(LoginCredentials credentials) throws LoginException;",
"@Override\n\tpublic boolean managerLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.managerLogIn(username, password);\n\t\treturn result;\n\t}",
"protected boolean authenticate() {\n \tif (mConfig == null) {\n \t\tmConfig = getConfig();\n \t}\n \tString keys[] = getKeys();\n \tif (keys != null) {\n\t mConfig = api.authenticateToken(keys[0], keys[1], mConfig);\n\t if (mConfig != null) {\n\t return true;\n\t }\n \t}\n \tshowToast(\"Failed user authentication for stored login tokens.\");\n \tclearKeys();\n \tsetLoggedIn(false);\n \treturn false;\n }",
"public boolean logIn(String password) {\n\t\tbyte[] message = ComMethods.concatByteArrs(\"password:\".getBytes(), password.getBytes());\n\t\tbyte[] response = sendServerCoded(message); \n\n\t\tboolean success;\n\t\tswitch (new String(response)) {\n\t\t\tcase \"accepted\":\n\t\t\t\tsuccess = true;\n\t\t\t\tbreak;\n\t\t\tcase \"rejected\":\n\t\t\t\tsuccess = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsuccess = false;\n\t\t\t\tComMethods.handleBadResp();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn success;\n\t}",
"public static boolean authenticateUser(String username, String password){\n\t\tboolean login = false;\t\n\t\tMongoCollection<Document> collection = getDatabase().getCollection(\"LoginInformation\");\n\t\tDocument cursorName = collection.find(eq(\"username\", username)).first();\n\t\t\n\t\t// If the username is not found, create a new account in the database\n\t\tif(cursorName == null){\n\t\t\tDocument user = new Document(\"username\", username);\n\t\t\tuser.append(\"password\", password);\n\t\t\tuser.append(\"points\", 0.0);\n\t\t\tcollection.insertOne(user);\n\t\t\tlogin = true;\n\t\t}\n\t\t\n\t\t// if the username is found, check the password\n\t\tif(cursorName != null && cursorName.getString(\"password\").equals(password)){\n\t\t\tlogin = true;\n\t\t}\n\t\t\t\n\t\treturn login;\n\t}",
"@Override\n protected void checkCredential(CredentialChecker checker) {\n checker.check(UserPasswordCredential.class, credential -> {\n return memberBhv.selectCount(cb -> arrangeLoginByCredential(cb, credential)) > 0;\n });\n }",
"public static boolean checkLogin(String username, String password) throws Exception {\n boolean pass = true;\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(\"RDS_HOST\",\"RDS_USERNAME\",\"RDS_PASSWORD\");\n String query = \"SELECT username,password FROM users WHERE username = ?\";\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1,username);\n resultSet = preparedStatement.executeQuery();\n while(resultSet.next()){\n if(resultSet.getString(1).equals(username) &&\n checkPassword(password,resultSet.getString(2))){\n pass = true;\n } else {\n pass = false;\n }\n }\n } finally {\n close();\n return pass;\n }\n }",
"protected boolean verifyLogin(String username, String password){\n ServerSocket ss = null;\n Socket s = null;\n try {\n s = new Socket(\"123.56.4.12\", 8080);\n\n InputStream is = s.getInputStream();\n DataInputStream dis = new DataInputStream(is);\n\n OutputStream os = s.getOutputStream();\n DataOutputStream dos = new DataOutputStream(os);\n\n dos.writeUTF(username);\n dos.writeUTF(password);\n\n String info = dis.readUTF();\n if (info.equals(\"True\")){\n return true;\n } else {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"提示\");\n builder.setMessage(\"密码错误或找不到此用户\");\n builder.setPositiveButton(\"确认\", null);\n builder.show();\n return false;\n }\n } catch (Exception e) {\n e.printStackTrace();\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"提示\");\n builder.setMessage(\"连接失败\");\n builder.setPositiveButton(\"确认\", null);\n builder.show();\n return false;\n } finally {\n try {\n if (s != null) s.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }\n }",
"boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;",
"public static boolean authenticateUser(String username, String password)\n\t\t\tthrows IOException {\n\t\t// TODO (ejeadry): We need to store the state of the user here, and make\n\t\t// sure that he cannot login on different computers.\n\n\t\tBoolean foundMatch = false;\n\n\t\tFile f = new File(DB_FOLDER + DB_AUTH_FILE + DB_FILE_TYPE);\n\n\t\tFileReader fReader;\n\t\tfReader = new FileReader(f);\n\t\tBufferedReader bReader = new BufferedReader(fReader);\n\n\t\tString s = bReader.readLine();\n\n\t\twhile (s != null) {\n\t\t\tString[] pair = s.split(\"\\\\s+\");\n\t\t\tif (pair[0].equals(username) && pair[1].equals(password)) {\n\t\t\t\tfoundMatch = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ts = bReader.readLine();\n\t\t}\n\n\t\tfReader.close();\n\t\tbReader.close();\n\n\t\treturn foundMatch;\n\t}",
"public boolean validLogin(String username, String password) {\n\n String query = String.format(\"SELECT * FROM staff WHERE staff_password = '%s' and staff_id = '%s'\", password, username);\n try {\n preparedStatement = connection.prepareStatement(query);\n result = preparedStatement.executeQuery();\n if(result.next()){\n return true;\n }\n return false;\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }",
"@WebMethod public Pertsona isLogin(String erabiltzaileIzena, String pasahitza);",
"private void authenticate(String username, String password) throws Exception {\n\t\tboolean autenticated = false;\n\t\tEntityManagerFactory factory = Persistence.createEntityManagerFactory(\"ForumApp\");\n\t\tEntityManager em = factory.createEntityManager();\n\n\t\tTypedQuery<User> q = em.createQuery(\"SELECT u FROM User u WHERE u.username = '\" + username + \"'\", User.class);\n\t\tUser user = q.getSingleResult();\n\n\t\tif (user != null) {\n\n\t\t\tif (user.getPassword().equals(password)) {\n\t\t\t\tautenticated = true;\n\t\t\t}\n\t\t}\n\n\t\t// Close the entity manager\n\t\tem.close();\n\t\tfactory.close();\n\n\t\t// Throw an Exception if the credentials are invalid\n\t\tif (!autenticated) {\n\t\t\tthrow new Exception();\n\t\t}\n\t}",
"public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }",
"@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn false;\n\t}",
"private boolean checkCredentials(String userName, String password)\n {\n int count = 0;\n for(String user : userNames)\n {\n if(user.contentEquals(userName))\n {\n if(passwords[count].contentEquals(password))\n {\n return true;\n }\n }\n count++;\n }\n\n return false;\n }",
"private boolean checkUserInfo(String username, String password) {\n\t\treturn !(username == null || username.isEmpty()\n\t\t\t\t|| password == null || password.isEmpty() || password.length() < 6 && password.length() > 12);\n }",
"public boolean authenticateUser(String username, String password) {\n if (isNullOrEmpty(username) || isNullOrEmpty(password)) {\n return false;\n }\n final Optional<User> maybeUser = userRepository.getUserByUserName(username);\n\n return maybeUser.isPresent() && validatePassword(password, maybeUser.get());\n }",
"protected void doLogin(Authentication authentication) throws AuthenticationException {\n \n }",
"boolean verifyUser(User user, char[] password);",
"@Test\n public void testCheckAuth() throws Exception {\n SettingsManager manager = new SettingsManager();\n //manager.username = \"testUsername\";\n //manager.password = \"testPassword\";\n Assert.assertTrue(\"Correct credentials should return true\", manager.checkAuth(\"testUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad username should return false\", manager.checkAuth(\"badUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad password should return false\", manager.checkAuth(\"testUsername\", \"wrongPassword\"));\n }",
"@Override\n\tpublic boolean verifyUser(String username,String password )\n\t{\n\t\tboolean b;\n\t\tString sql = \"select username,password from f_loginTable where username=? and password=?\";\n\t\tint noOfRows=template.update(sql, new Object[] {username,password});\n\t\tif(noOfRows==1)\n\t\t{b=true;}\n\t\telse \n\t\t{b=false;}\n\t\treturn b;\t\t\n\t}",
"public boolean login() throws Exception {\n\n\t\tif (LoginDataBase.getInstance().constainsUsername(username)) {\n\t\t\t// local memory has records of that\n\t\t\tif (hashedPassword == LoginDataBase.getInstance()\n\t\t\t\t\t.getHashedPassword(password)) {\n\t\t\t\tsessionID = UUID.randomUUID().toString();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tPassExceptionToUI.passToUI(new PasswordMismatchError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// check with web server\n\t\t\tCertificateValidation.invalidate();\n\t\t\tURL url = new URL(\n\t\t\t\t\t\"https://mlite-demo.musoni.eu:8443/mifosng-provider/api/v1/authentication?username=\"\n\t\t\t\t\t\t\t+ username\n\t\t\t\t\t\t\t+ \"&password=\"\n\t\t\t\t\t\t\t+ password\n\t\t\t\t\t\t\t+ \"&tenantIdentifier=code4good\");\n\n\t\t\tHttpsURLConnection con = (HttpsURLConnection) url.openConnection();\n\t\t\tcon.setRequestMethod(\"POST\");\n\n\t\t\tif (con.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\t// if the account is found in web server\n\t\t\t\tLoginDataBase.getInstance().updateDataBase(username, hashedPassword);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// if web server does not have match\n\t\t\t\tPassExceptionToUI.passToUI(new UsernameMismatchError(username));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}"
] |
[
"0.77930987",
"0.7646736",
"0.7385382",
"0.7291242",
"0.72893286",
"0.7199486",
"0.71796036",
"0.71783024",
"0.7097455",
"0.7082834",
"0.7075725",
"0.7073795",
"0.7068987",
"0.7050092",
"0.70482284",
"0.70482284",
"0.70345837",
"0.69955033",
"0.69718456",
"0.6877824",
"0.68705827",
"0.68650997",
"0.68612474",
"0.6854413",
"0.6846165",
"0.68435293",
"0.6835768",
"0.6824578",
"0.6824578",
"0.6824578",
"0.6824578",
"0.6824578",
"0.6824578",
"0.6824578",
"0.6824578",
"0.6792415",
"0.6787127",
"0.67290634",
"0.6725332",
"0.67123115",
"0.6705953",
"0.6705953",
"0.6693149",
"0.6680067",
"0.6680024",
"0.6678599",
"0.66720486",
"0.6671173",
"0.6659651",
"0.6654676",
"0.664807",
"0.6597299",
"0.6597167",
"0.6582385",
"0.6581545",
"0.65808594",
"0.6568918",
"0.65654457",
"0.6555926",
"0.6533789",
"0.65301615",
"0.65282893",
"0.65210664",
"0.6518674",
"0.65082616",
"0.6506847",
"0.64816964",
"0.64741427",
"0.64630324",
"0.6440292",
"0.6429063",
"0.6427374",
"0.64216983",
"0.6398486",
"0.63981867",
"0.6397361",
"0.6392431",
"0.6389224",
"0.638675",
"0.6382146",
"0.638119",
"0.63811266",
"0.637821",
"0.63689053",
"0.63676465",
"0.635738",
"0.63516927",
"0.63479245",
"0.634396",
"0.6343616",
"0.63436115",
"0.63434356",
"0.63429207",
"0.63423944",
"0.63406587",
"0.6339757",
"0.6339438",
"0.63379276",
"0.6334869",
"0.6332285"
] |
0.7272186
|
5
|
The predefined stamp is carried out.
|
public StampRes stamp(Stamp stamp) {
// check validity of arguments
checkStampObjectValidity(stamp);
// execute
StampRes res = (StampRes) pdf4meClient.customHttp.postUniversalObject(stamp, StampRes.class, "Stamp/Stamp");
// check response for errors
if (res == null) {
throw new Pdf4meBackendException("Server Error");
} else {
ResponseChecker.checkDocumentForErrors(res.getDocument());
}
return res;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void stamp() {\n mInternalStamp = SystemClock.elapsedRealtime();\n }",
"private String makeEventStamp() {\n String name = \"DTSTAMP\";\n return formatTimeProperty(LocalDateTime.now(), name) + \"\\n\";\n }",
"private void updateTimeStamp() {\n\t\tthis.timeStamp = new Timestamp(System.currentTimeMillis());\n\t}",
"private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}",
"protected synchronized void updateTimestamp() {\n\t\ttimestamp = System.currentTimeMillis();\n\t}",
"public long getStamp() {\n return stamp;\n }",
"private static void seTimeStamps() {\n MDC.put(MDC_INSTANCE_UUID, \"\");\n MDC.put(MDC_ALERT_SEVERITY, \"\");\n\n var startTime = Instant.now();\n var endTime = Instant.now();\n\n seTimeStamps(startTime, endTime);\n\n MDC.put(PARTNER_NAME, \"N/A\");\n\n MDC.put(STATUS_CODE, COMPLETE_STATUS);\n MDC.put(RESPONSE_CODE, \"N/A\");\n MDC.put(RESPONSE_DESCRIPTION, \"N/A\");\n\n }",
"public void makeNow(final long delta) {\n stamp = System.currentTimeMillis() + delta;\n }",
"public void setTimestamp() {\n timestamp = System.nanoTime();\n }",
"public void setTimestamp(IWTimestamp stamp) {\n \t\tthis.stamp = stamp;\n \t}",
"@SuppressWarnings(\"unused\")\n private String makeEventStamp(Course item) {\n return makeEventStamp();\n }",
"public void now() {\n localDate = LocalDate.now();\n localDateTime = LocalDateTime.now();\n javaUtilDate = new Date();\n auditEntry = \"NOW\";\n instant = Instant.now();\n }",
"public void past();",
"@Override\n public void date()\n {\n }",
"private void addGeneratedTimestamp() {\n\t\tif (getConfig().skipGeneratedTimestamps()) {\n\t\t\treturn;\n\t\t}\n\t\tString value = Processor.class.getName();\n\t\tString date = new SimpleDateFormat(\"dd MMM yyyy hh:mm\").format(new Date());\n\t\tthis.pathBindingClass.addImports(Generated.class);\n\t\tthis.pathBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t\tthis.rootBindingClass.addImports(Generated.class);\n\t\tthis.rootBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t}",
"private static void announceProgram() {\r\n\t\t// https://www.mkyong.com/java/java-how-to-get-current-date-time-date-and-calender/\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tDate date = new Date(System.currentTimeMillis());\r\n\t\tDL.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\r\n\t\tDL.println(\" AR Splitter launched: \" + dateFormat.format(date));\r\n\t\tDL.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\r\n\t}",
"@Override\n public void ptt(int value, int timestamp) {\n }",
"public long getTimeStamp() {return timeStamp;}",
"private void addAnalysisTimestamp()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_timestamp\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n start.addAttribute(\"id\", \"1\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n if (mimicXpress)\r\n {\r\n start = new SimpleStartElement(\"xpressratio_timestamp\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n add(start);\r\n\r\n end = new SimpleEndElement(\"xpressratio_timestamp\");\r\n add(end);\r\n\r\n addNewline();\r\n }\r\n\r\n end = new SimpleEndElement(\"analysis_timestamp\");\r\n add(end);\r\n }",
"public void Stampa(Campo c){\r\n c.stampaCampo();\r\n }",
"@Override\n public void onTimePicked() {\n }",
"public void createTimeStamp (Object timeStamp) {\n LineTranslations.getTranslations().createTimeStamp(timeStamp);\n }",
"public void mo23018c() {\n this.f26122b.edit().putLong(\"last.last.show.attend\", System.currentTimeMillis()).apply();\n }",
"protected void takeAction() {\n lastAction = System.currentTimeMillis();\n }",
"public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}",
"public void A_noChangeInLocation(ListOfParameterLists parameterLists){\n ParameterList paramList = parameterLists.getFirst();\n String ts =\"\";\n try {\n Track eventInstance = (Track) paramList.getEventInstance();\n\t ts = (String) paramList.getObject(\"TimeStamp\");\n if(debug)\n System.out.println(\"TEST show the timestamp\"+ts);\n }\n\t catch (Exception e) {\n\t }\n\n\n\n if(debug)\n System.out.println(\"Action_Rule5 :: No update on track-\"+trackNumber+\" for 1 minutes.\");\n analystLogger.log (\" \");\n analystLogger.log (\"Alert for \"+trackNumber);\n analystLogger.log (\"No change in location of \"+trackNumber+\" for \"+TrackUtilities.printTimeValue (Constant.NO_CHANGE_IN_LOCATION_FOR_X_MINS) +\" form \"+ts);\n\n\n Constant.alertOutput.println (\" \");\n Constant.alertOutput.println (\"Alert for \"+trackNumber);\n Constant.alertOutput.println (\"No change in location of \"+trackNumber+\" for \"+TrackUtilities.printTimeValue (Constant.NO_CHANGE_IN_LOCATION_FOR_X_MINS) +\" form \"+ts);\n Constant.alertOutput.flush ();\n\n\n\n // Future Plan for Rule5\n // Add code to alert analyst here\n }",
"public void setTimeStamp(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localTimeStampTracker = true;\r\n } else {\r\n localTimeStampTracker = false;\r\n \r\n }\r\n \r\n this.localTimeStamp=param;\r\n \r\n\r\n }",
"public void mo23021d() {\n this.f26122b.edit().putLong(\"last.refresh.otherapp\", System.currentTimeMillis()).apply();\n }",
"private void doPoint()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\t\tubisenseData.setPosition(new Point3D(\tx1/100,\n\t\t\t\t\t\t\t\t\t\t\t\ty1/100,\n\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\n\t\twhile (elapsedTime < toolDuration && !this.terminate)\n\t\t{\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tthis.notifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"public boolean getStamp() {\r\n return Stamp;\r\n }",
"@Override\n protected void initialize() {\n startT = Timer.getFPGATimestamp();\n }",
"public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }",
"public final void run() {\t\n\t\tlong timeStamp = file.lastModified();\n\t if( this.timeStamp != timeStamp ) {\n\t \tthis.timeStamp = timeStamp;\n\t \tonChange(file);\n\t }\n\t}",
"public void alert(double x, double y, double time) {\n Reporter.debug(4, \"Post #%d SPOTTED! (%.1f, %.1f)@%.1f\",\n _num, _x, _y, time);\n if (time != 0) {\n _obs.add(String.format(\"(%.1f, %.1f)@%.1f\", x, y, time));\n }\n }",
"public void setTimeStamp(String timeStamp) {\n this.timeStamp = timeStamp;\n }",
"public TimeStamp(){\n\t\tdateTime = LocalDateTime.now();\n\t}",
"public long getTimestamp_() {\n return timestamp_;\n }",
"Date getTimestamp()\n{\n return time_stamp;\n}",
"private long now() {\n\treturn System.currentTimeMillis();\n }",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() + t;\n\t act.setLocation(act.getMap(), act.getX(), act.getY(), date);\n\t}\n }",
"long getTimeStamp();",
"public void touch() {\n setLastUpdateTime(System.currentTimeMillis());\n }",
"protected void setTimestamp(long time) \n {\n\t\tlTimestamp = time;\n\t}",
"protected void setupTime() {\n this.start = System.currentTimeMillis();\n }",
"public void periodic() {\n useOutput(lEncoder.getVelocity(), setpoint);\n SmartDashboard.putNumber(\"LauncherSpeed in RPM\", lEncoder.getVelocity());\n SmartDashboard.putNumber(\"Launcher Current\", launcher1.getOutputCurrent());\n //setSetpoint(SmartDashboard.getNumber(\"LauncherSetpoint in RPM\", setpoint));\n SmartDashboard.putNumber(\"LauncherSetpoint in RPM\", setpoint);\n /*getController().setP(SmartDashboard.getNumber(\"Kp\", getController().getP()));\n getController().setI(SmartDashboard.getNumber(\"Ki\", getController().getI()));\n getController().setD(SmartDashboard.getNumber(\"Kd\", getController().getD()));\n SmartDashboard.putNumber(\"Kp\", getController().getP());\n SmartDashboard.putNumber(\"Ki\", getController().getI());\n SmartDashboard.putNumber(\"Kd\", getController().getD());*/\n SmartDashboard.putNumber(\"Launcher get\",launcher1.get());\n }",
"void takeBefore(){\n beforeTimeNs=System.nanoTime();\n }",
"public static String fn_GetCurrentTimeStamp() {\n\t\tDate dte = new Date();\n\t\tDateFormat df = DateFormat.getDateTimeInstance();\n\t\tString strdte = df.format(dte);\n\t\tstrdte = strdte.replaceAll(\":\", \"_\");\n\t\treturn strdte;\n\t}",
"public abstract long startTimestamp();",
"public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}",
"public int getTimeStamp() {\n return timeStamp;\n }",
"@Override\r\n\tpublic void startTime() {\n\t\tSystem.out.println(\"인터페이스 ISports2메소드 --> startTime()\");\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void preExcute(long arg0) {\n\t\tstartTime = arg0;\r\n\r\n\t}",
"private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }",
"@Override\r\n\tpublic void onStart(ISuite arg0) {\n\t\tbuildTime = getCurrentDate();\r\n\t\tbuildDate = getCurrentTimeStamp();\r\n\t}",
"@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}",
"@Override\r\n public void timePassed() {\r\n }",
"@Override\n public long getTimestamp() {\n return timestamp;\n }",
"@Test\n\tpublic void testTstamp001() throws VistaWebServiceFault {\n\n\t\tresponse = service.tstamp();\n\n\t\tassertNotNull(response);\n\t\tif (response.getCurrentTimeStamp() != null) {\n\t\t\tassertEquals(\"5464917241\", response.getCurrentTimeStamp());\n\t\t} else {\n\t\t\tfail(\"currentTimeStamp is NULL !!\");\n\t\t}\n\t}",
"protected void execute() {\n this.setSetpoint(OI.getAdjustedThrottle()*RobotMap.maxRPM);\n ScraperBike.debugToTable(\"PIDSetpoint\", OI.getAdjustedThrottle()*RobotMap.maxRPM);\n \n }",
"private void createDefaultMarker(Point2D framePosition) {\n Point newPoint = activeTrajectory.copyLastPoint();\n newPoint.setX((int) Math.round(framePosition.getX()));\n newPoint.setY((int) Math.round(framePosition.getY()));\n\n activeTrajectory.set(getCurrentFrame(), newPoint);\n save(activeTrajectory);\n }",
"@Override\n public void make() {\n info=new StringBuilder().append(name).append(\" product was made: \").\n append(new GregorianCalendar().getTime()).append(\".\").toString();\n System.out.println(info);\n }",
"@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }",
"int getTimestamp();",
"public void setTime(){\r\n \r\n }",
"public void generateSchedule(){\n\t\t\n\t}",
"@Override\n public void timePassed() {\n }",
"private void mo71772t() {\n this.f74253i.mo60157b(R.id.ebb, new VideoPostTimeWidget());\n }",
"private long makeTimestamp() {\n return new Date().getTime();\n }",
"public final void mo118712a() {\n f97549f = System.currentTimeMillis();\n }",
"public void makeNow() {\n makeNow(0);\n }",
"public void run() {\r\n\t\t// Get current date/time and format it for output\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat format = \r\n\t\t\tnew SimpleDateFormat(\"dd.mm.yyyy hh:mm:ss\");\r\n\t\tString current_time = format.format(date);\r\n\r\n\t\t// Output to user the name of the objecet and the current \r\n\t\t// time\r\n\t\tSystem.out.println(objectName + \" - Current time: \" + \r\n\t\t\t\tcurrent_time);\r\n\t\t\r\n\t\t// notify each observer of timer expiry\r\n\t\tnotifyObservers();\r\n\t}",
"void now(HplsqlParser.Expr_func_paramsContext ctx) {\n if (ctx != null) {\n evalNull();\n return;\n }\n evalVar(currentTimestamp(3));\n }",
"@Override\n\tpublic String getTimestamp()\n\t{\n\t\treturn new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\").format(new Date());\n\t}",
"@Override\n protected void tick(final Tuple tuple) {\n\n }",
"public abstract void logTraceTime();",
"public long get() {\n return stamp;\n }",
"public abstract void sendTraceTimeCustom(Player p, String prefix);",
"public void setTimestamp(Date timestamp) {\r\n this.timestamp = timestamp;\r\n }",
"public void touch() {\n\t\t\t//lastAccess = System.currentTimeMillis();\n\t\t}",
"@Override\n\tpublic void tick() {\n\n\t}",
"@Override\r\n public void insertUpdate(DocumentEvent e) {\n ActivoTimer();\r\n }",
"public static String timestamp() {\n\t\tString t = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\").format(new Date());\n\t\t// File f=new\n\t\t// File(String.format(\"%s.%s\",t,RandomStringUtils.randomAlphanumeric(8)));\n\t\tSystem.out.println(\"Time is :\" + t);\n\t\treturn t;\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString time=preferences.getString(\"time\", null);\n\t\t\t\tint random=preferences.getInt(\"random\", 0);\n\t\t\t\tString result=time==null?\"您暂时还没写入数据\":\"写入时间\"+time+\"\\n写入的内容是:\"+random;\n\t\t\t\tToast.makeText(MainActivity.this, result,10000 ).show();\n\t\t\t}",
"public abstract long now();",
"Date getTimeStamp();",
"public void record() {\n stats.record();\n }",
"public void setTimeStamp(long t)\n\t{attributes.add(TIMESTAMP,String.valueOf(t));}",
"private static String getTimeStamp()\r\n\t{\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH.mm.ss\");\r\n\t\tDate date = new Date();\r\n\t\treturn dateFormat.format(date);\r\n\t}",
"long getTimeSpoutBoltF();",
"public final void testGetTimeStamp() {\n assertEquals(hello.timeStamp, n.getTimeStamp());\n }",
"public SavingProgressCallback()\r\n {\r\n mSavingStartedAt = new Date();\r\n }",
"public void setLastHeardTimeStamp() {\n\t\tlastHeardTimeStamp = System.currentTimeMillis();\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}"
] |
[
"0.7928503",
"0.6849034",
"0.66565126",
"0.64777553",
"0.637177",
"0.6281779",
"0.6256112",
"0.62136203",
"0.61994576",
"0.61483926",
"0.6032841",
"0.5959481",
"0.5846708",
"0.5830776",
"0.5817345",
"0.57351905",
"0.5708549",
"0.570594",
"0.57042843",
"0.56968",
"0.5681543",
"0.5670762",
"0.56576806",
"0.5651262",
"0.5634947",
"0.56214774",
"0.5610856",
"0.56033885",
"0.5580623",
"0.5550792",
"0.55493766",
"0.5530717",
"0.5525415",
"0.5518281",
"0.5514016",
"0.55111516",
"0.55092436",
"0.54790795",
"0.5469856",
"0.54593575",
"0.5442041",
"0.5408635",
"0.53939104",
"0.5393686",
"0.5383751",
"0.53775716",
"0.5375807",
"0.5374962",
"0.5373101",
"0.53711927",
"0.53692526",
"0.5364435",
"0.5355374",
"0.53541577",
"0.53540903",
"0.53540903",
"0.5353813",
"0.5351071",
"0.53500986",
"0.53495836",
"0.5346471",
"0.5343149",
"0.5342425",
"0.5337258",
"0.53333986",
"0.53268284",
"0.5326565",
"0.53251135",
"0.5322744",
"0.53186655",
"0.5315743",
"0.53086317",
"0.5308185",
"0.5305228",
"0.529959",
"0.5299181",
"0.5295641",
"0.529438",
"0.52940065",
"0.52937275",
"0.5291823",
"0.5287734",
"0.5287058",
"0.5278309",
"0.5272718",
"0.5272615",
"0.5271611",
"0.5269",
"0.5268374",
"0.52675253",
"0.526712",
"0.52587336",
"0.5245194",
"0.5237448",
"0.5237448",
"0.5237448",
"0.5237448",
"0.5237448",
"0.5237448",
"0.5237448"
] |
0.60416687
|
10
|
Places a custom text stamp on the pages of your choice. The position of the stamp is specified by alignX and alignY.
|
public byte[] textStamp(String text, String pages, AlignXEnum alignX, AlignYEnum alignY, File file) {
// prepare multipart parameters
List<Tuple<String, String>> params = new ArrayList<Tuple<String, String>>();
params.add(new Tuple("text", text));
params.add(new Tuple("pages", pages));
params.add(new Tuple("alignX", alignX.getValue()));
params.add(new Tuple("alignY", alignY.getValue()));
List<Tuple<String, File>> uploadFiles = new ArrayList<Tuple<String, File>>();
uploadFiles.add(new Tuple("file", file));
return pdf4meClient.customHttp.postWrapper(params, uploadFiles, "/Stamp/TextStamp");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static void drawText(PDDocument document, PDPage page, PDRectangle box, PDFont font, Color color, String[] lines, ALIGNMENT alignment, ROTATION rotation, float fontLeading, float fontSize, boolean autoScale, boolean drawBoundingBox) throws IOException {\n\n\n /* Prepare the content stream */\n PDPageContentStream stream = new PDPageContentStream(document, page, true, true);\n\n\n /* Define the working boundary for the text being inserted */\n float boundaryX = box.getLowerLeftX();\n float boundaryY = box.getUpperRightY();\n float boundaryWidth = box.getUpperRightX() - box.getLowerLeftX();\n float boundaryHeight = box.getUpperRightY() - box.getLowerLeftY();\n\n /* Define font attributes */\n if (fontSize <= 0)\n fontSize = 12.0f;\n\n stream.setFont(font, fontSize);\n\n if (fontLeading > 0)\n stream.setLeading(fontLeading);\n\n /* Get the size of the page in printer DPI */\n PDRectangle pageSize = page.getMediaBox();\n float pageWidth = pageSize.getWidth();\n float pageHeight = pageSize.getHeight();\n\n /* Draw the outline of the bounding box */\n if (drawBoundingBox == true) {\n stream.setNonStrokingColor(Color.BLUE);\n stream.addRect(box.getLowerLeftX(), box.getLowerLeftY(), box.getWidth(), box.getHeight());\n stream.fill();\n stream.setNonStrokingColor(Color.WHITE);\n stream.addRect(box.getLowerLeftX() + 1, box.getLowerLeftY() + 1, box.getWidth() - 2, box.getHeight() - 2);\n stream.fill();\n }\n\n\n /* Enter into text drawing mode */\n stream.beginText();\n stream.setNonStrokingColor(color);\n\n /* Create a TextMatrix object */\n // The text matrix allows drawing text normally without consideration for where it is located,\n // how big it is, or what direction it is facing\n Matrix matrix = new Matrix();\n\n /* Determine the value to scale the text to fit the boundary box, taking into account optional rotation */\n\n // Get the widths of each line\n float[] lineWidths = new float[lines.length];\n for (int i = 0; i < (lines.length); i++) {\n lineWidths[i] = font.getStringWidth(lines[i])/1000f*fontSize;\n }\n\n // Get the width of the longest line\n Arrays.sort(lineWidths);\n float maxlineWidth = lineWidths[(lines.length-1)];\n\n // Calculate autoScaleFactor based on the type of rotation\n float autoScaleFactor = 1.0f;\n if (rotation == ROTATION.RIGHT) {\n //The boundaryWidth and boundaryHeight variables are swapped for the rotate right and left cases\n\n // Calculate the scale factor to fit the longest line in the bounding box\n float fitWidthScaleFactor = boundaryHeight / maxlineWidth;\n\n // Determine the value to scale the combined height of text to fit the boundary box\n float fitHeightScaleFactor = boundaryWidth / (lines.length*fontLeading);\n\n // Go with the smaller of the calculated width and height scale values\n if (fitHeightScaleFactor < fitWidthScaleFactor)\n autoScaleFactor = fitHeightScaleFactor;\n else\n autoScaleFactor = fitWidthScaleFactor;\n\n matrix.translate(boundaryX+boundaryWidth, boundaryY);\n matrix.rotate(-Math.PI/2);\n } else if (rotation == ROTATION.LEFT){\n //The boundaryWidth and boundaryHeight variables are swapped for the rotate right and left cases\n\n // Calculate the scale factor to fit the longest line in the bounding box\n float fitWidthScaleFactor = boundaryHeight / maxlineWidth;\n\n // Determine the value to scale the combined height of text to fit the boundary box\n float fitHeightScaleFactor = boundaryWidth / (lines.length*fontLeading);\n\n // Go with the smaller of the calculated width and height scale values\n if (fitHeightScaleFactor < fitWidthScaleFactor)\n autoScaleFactor = fitHeightScaleFactor;\n else\n autoScaleFactor = fitWidthScaleFactor;\n\n matrix.translate(boundaryX,boundaryY-boundaryHeight);\n matrix.rotate(Math.PI/2);\n } else {\n // Calculate the scale factor to fit the longest line in the bounding box\n float fitWidthScaleFactor = boundaryWidth / maxlineWidth;\n\n // Determine the value to scale the combined height of text to fit the boundary box\n float fitHeightScaleFactor = boundaryHeight / (lines.length*fontLeading);\n\n // Go with the smaller of the calculated width and height scale values\n if (fitHeightScaleFactor < fitWidthScaleFactor)\n autoScaleFactor = fitHeightScaleFactor;\n else\n autoScaleFactor = fitWidthScaleFactor;\n\n // Determine the Y offset for the starting point of the text\n float textYOffset = 0.0f;\n if (autoScaleFactor == fitWidthScaleFactor)\n textYOffset = (boundaryHeight-(lines.length)*fontSize)/2;\n else {\n if (autoScale)\n textYOffset = (fontLeading - fontSize) * lines.length / 2;\n else\n textYOffset = 0.0f;\n }\n matrix.translate(boundaryX,boundaryY-textYOffset);\n }\n\n\n /* Scale the text if desired */\n if (autoScale)\n matrix.scale(autoScaleFactor,autoScaleFactor);\n else\n autoScaleFactor = 1.0f;\n\n\n /* Apply the text matrix to the content stream */\n stream.setTextMatrix(matrix);\n\n\n /* Draw the lines of text */\n for (int i = 0; i < lines.length; i++)\n {\n // Default the line offset to zero for ALIGNMENT.LEFT and adjust for other types of alignment\n float lineOffset = 0f;\n\n if (alignment == ALIGNMENT.CENTER) {\n if (rotation == ROTATION.RIGHT || rotation == ROTATION.LEFT)\n lineOffset = (boundaryHeight / autoScaleFactor / 2) - (font.getStringWidth(lines[i]) / 1000f * fontSize / 2);\n if (rotation == ROTATION.NONE)\n lineOffset = (boundaryWidth / autoScaleFactor / 2) - (font.getStringWidth(lines[i]) / 1000f * fontSize / 2);\n }\n\n if (alignment == ALIGNMENT.RIGHT) {\n if (rotation == ROTATION.RIGHT || rotation == ROTATION.LEFT)\n lineOffset = (boundaryHeight / autoScaleFactor) - (font.getStringWidth(lines[i]) / 1000f * fontSize);\n if (rotation == ROTATION.NONE)\n lineOffset = (boundaryWidth / autoScaleFactor) - (font.getStringWidth(lines[i]) / 1000f * fontSize);\n }\n\n // Move the cursor to the appropriate new location relative to its current old location\n stream.newLineAtOffset(lineOffset, -fontLeading);\n\n // Draw the text\n stream.showText(lines[i]);\n\n // Reset the cursor to a predictable state for the next loop iteration\n stream.moveTextPositionByAmount(-lineOffset,0);\n }\n\n\n stream.endText();\n stream.close();\n }",
"public void drawCenteredText(String text, int x, int y);",
"public void setTextAlign(TEXT_ALIGN align);",
"public static void main(String args[]) throws Exception {\n\t String filePath = \"test.pdf\";\r\n\t \r\n\t String pdfText = FileReader.getFile(filePath, 581, 584); \r\n\t text_position.position(580, 584);\r\n\t \r\n//\t String pdfText = FileReader.getFile(filePath, 396, 407); \r\n//\t text_position.position(395, 407);\r\n\r\n\t txtCreate.creatTxtFile(\"test\");\r\n\t txtCreate.writeTxtFile(pdfText);\r\n\t xmlCreater.getXML(\"test.txt\");\r\n }",
"public static void main( String[] args ) throws Exception\n {\n if( args.length != 2 )\n {\n System.out.println(\"Usage: <input pdf> <output file>\");\n }\n else\n {\n \tFile file = new File(\"./\"+args[0]);\n \tPDDocument document = PDDocument.load(file);\n\n \t List<PDPage> documentPages = document.getDocumentCatalog().getAllPages();\n\n \t\n try\n {\n \tPDPage page = documentPages.get(0);\n //document.addPage(page);\n List annotations = page.getAnnotations();\n\n // Setup some basic reusable objects/constants\n // Annotations themselves can only be used once!\n\n float inch = 72;\n PDGamma colourGreen = new PDGamma();\n colourGreen.setG(1);\n PDGamma colourBlue = new PDGamma();\n colourBlue.setB(1);\n\n PDBorderStyleDictionary borderThick = new PDBorderStyleDictionary();\n borderThick.setWidth(inch/12); // 12th inch\n PDBorderStyleDictionary borderThin = new PDBorderStyleDictionary();\n borderThin.setWidth(inch/72); // 1 point\n PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary();\n borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE);\n borderULine.setWidth(inch/72); // 1 point\n\n float pw = page.getMediaBox().getUpperRightX();\n float ph = page.getMediaBox().getUpperRightY();\n\n // Add the markup annotation, a highlight to PDFBox text\n PDFont font = PDType1Font.HELVETICA_BOLD;\n PDAnnotationTextMarkup txtMark = new PDAnnotationTextMarkup(PDAnnotationTextMarkup.SUB_TYPE_HIGHLIGHT);\n txtMark.setColour(colourBlue);\n txtMark.setConstantOpacity((float)0.1); // Make the highlight 20% transparent\n\n // Set the rectangle containing the markup\n\n float textWidth = (font.getStringWidth( \"PDFBox\" )/1000) * 18;\n PDRectangle position = new PDRectangle();\n position.setLowerLeftX(inch);\n position.setLowerLeftY( ph-inch-18 );\n position.setUpperRightX(72 + textWidth);\n position.setUpperRightY(ph-inch);\n txtMark.setRectangle(position);\n\n // work out the points forming the four corners of the annotations\n // set out in anti clockwise form (Completely wraps the text)\n // OK, the below doesn't match that description.\n // It's what acrobat 7 does and displays properly!\n float[] quads = new float[8];\n\n quads[0] = position.getLowerLeftX(); // x1\n quads[1] = position.getUpperRightY()-2; // y1\n quads[2] = position.getUpperRightX(); // x2\n quads[3] = quads[1]; // y2\n quads[4] = quads[0]; // x3\n quads[5] = position.getLowerLeftY()-2; // y3\n quads[6] = quads[2]; // x4\n quads[7] = quads[5]; // y5\n\n txtMark.setQuadPoints(quads);\n txtMark.setContents(\"Highlighted since it's important\");\n\n annotations.add(txtMark);\n\n\n \n\n // Now a square annotation\n\n PDAnnotationSquareCircle aSquare =\n new PDAnnotationSquareCircle( PDAnnotationSquareCircle.SUB_TYPE_SQUARE);\n aSquare.setContents(\"Square Annotation\");\n aSquare.setColour(colourGreen); // Outline in red, not setting a fill\n aSquare.setBorderStyle(borderThick);\n aSquare.setConstantOpacity((float)0.1);\n\n // Place the annotation on the page, we'll make this 1\" (72points) square\n // 3.5\" down, 1\" in from the right on the page\n\n position = new PDRectangle(); // Reuse the variable, but note it's a new object!\n position.setLowerLeftX(pw-(2*inch)); // 1\" in from right, 1\" wide\n position.setLowerLeftY(ph-(float)(3.5*inch) - inch); // 1\" height, 3.5\" down\n position.setUpperRightX(pw-inch); // 1\" in from right\n position.setUpperRightY(ph-(float)(3.5*inch)); // 3.5\" down\n aSquare.setRectangle(position);\n\n // add to the annotations on the page\n annotations.add(aSquare);\n\n\n\n document.save(args[1]);\n }\n finally\n {\n document.close();\n }\n }\n }",
"public interface IText extends ISinglePoint {\n\n /**\n * Defines whether the text rotation is relative to the screen or geographic\n * north\n * \n * @author sgilbert\n * \n */\n public static enum TextRotation {\n SCREEN_RELATIVE, NORTH_RELATIVE\n }\n\n /**\n * Defines the text justification options\n * \n * @author sgilbert\n * \n */\n public static enum TextJustification {\n LEFT_JUSTIFY, CENTER, RIGHT_JUSTIFY\n }\n\n /**\n * Defines available font styles\n * \n * @author sgilbert\n * \n */\n public static enum FontStyle {\n REGULAR, BOLD, ITALIC, BOLD_ITALIC\n }\n\n public static enum DisplayType {\n NORMAL, BOX, UNDERLINE, OVERLINE\n }\n\n /**\n * Gets the text to draw\n * \n * @return Array of text strings\n */\n public String[] getString();\n\n /**\n * Gets the name of the font to use\n * \n * @return font name\n */\n public String getFontName();\n\n /**\n * Gets the size of the font\n * \n * @return font size\n */\n public float getFontSize();\n\n /**\n * Gets the font style to use\n * \n * @return font style\n */\n public FontStyle getStyle();\n\n /**\n * Gets the lat/lon refernce position for the text display\n * \n * @return lat/lon coordinate\n */\n public Coordinate getPosition();\n\n /**\n * Gets the color to use for the text\n * \n * @return text color\n */\n public Color getTextColor();\n\n /**\n * Gets the specified justification\n * \n * @return the text justification\n */\n public TextJustification getJustification();\n\n /**\n * Gets the rotation angle to use\n * \n * @return rotation angle\n */\n public double getRotation();\n\n /**\n * Gets how the rotation angle is applied\n * \n * @return the rotation relativity\n */\n public TextRotation getRotationRelativity();\n\n /**\n * Determines whether the text should be displayed with an outline box\n * \n * @return true, if outline box should be displayed\n */\n public DisplayType getDisplayType();\n\n /**\n * Determines whether text background should be masked out.\n * \n * @return true, if background is to be masked\n */\n public Boolean maskText();\n\n /**\n * Gets the offset in the x direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The x direction offset\n */\n public int getXOffset();\n\n /**\n * Gets the offset in the y direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The y direction offset\n */\n public int getYOffset();\n\n public Boolean getHide();\n\n public Boolean getAuto();\n\n public int getIthw();\n\n public int getIwidth();\n\n}",
"public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }",
"public void alignLocation();",
"private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[0], position0Inverted, owner, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[1], position1NonInverted, owner, false));\n\t}",
"void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color);",
"public void displayCenter(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font of the text\n\t\tgc.setFill(Color.WHITE); //set the color of the text \n\t\tgc.setTextAlign(TextAlignment.CENTER); //set text alignment to center \n\t\tgc.fillText(text, x, y); //draw the text \n\t}",
"private void drawTextMarker(Graphics g, String message, int yLine) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPhysics() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position0Inverted, null, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position1NonInverted, null, false));\n\t}",
"public void setAlignmentX(AlignX anAlignX) { }",
"private void drawCenteredString(String text, float x, float y, int color)\n {\n this.getFontRenderer().drawStringWithShadow(text, (x - this.getFontRenderer().getStringWidth(text) / 2), y, color);\n }",
"@Deprecated\n static void drawText(PDDocument document, PDPage page, PDRectangle box, PDFont font, Color color, List<String> lines, ALIGNMENT alignment, ROTATION rotation, float fontLeading, float fontSize, boolean autoScale, boolean drawBoundingBox) throws IOException {\n String[] linesArray = new String[lines.size()];\n for (int i = 0; i < lines.size(); i++) {\n linesArray[i] = lines.get(i);\n }\n drawText(document, page, box, font, color, linesArray, alignment, rotation, fontLeading, fontSize, autoScale, drawBoundingBox);\n }",
"public void setAlignmentY(AlignY anAlignX) { }",
"@Override\n\tpublic void print(String text) {\n\t super.print(text);\n\t\tSimpleAttributeSet sas = new SimpleAttributeSet();\n\t StyleConstants.setAlignment(sas, StyleConstants.ALIGN_CENTER);\n\t document.setParagraphAttributes(0, document.getLength(), sas, false);\n\t}",
"public void writeText(int pageId, int startPos, String text) throws PageAlreadyPinned, IOException, NoMemoryForPage, OffLimitsException {\n Transaction tx = new Transaction();\n Page p = pcm.getRefPage(pageId);\n byte[] contentBefore = p.getContents();\n lrm.log(tx.id,pageId, Operation.Write, contentBefore, startPos, text.length(), text.getBytes(StandardCharsets.UTF_16));\n\n //create logic when tx contains more than one entry;\n lrm.flush(tx.id);\n pcm.write(p, startPos, text);\n pcm.shutdown();\n }",
"public void displayLeft(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font \n\t\tgc.setFill(Color.WHITE); //set the color of the text\n\t\tgc.fillText(text, x, y); //draw the text\n\t}",
"public void printAlignment(SWGAlignment alignment){\n\t\t\tString \torigSeq1 = alignment.getOriginalSequence1().toString(),\n\t\t\t\t\torigSeq2 = alignment.getOriginalSequence2().toString(),\n\t\t\t\t\talnSeq1 = new String(alignment.getSequence1()),\n\t\t\t\t\talnSeq2 = new String(alignment.getSequence2());\n\t\t\tint \tstart1 = alignment.getStart1(),\n\t\t\t\t\tstart2 = alignment.getStart2(),\n\t\t\t\t\tgap1 = alignment.getGaps1(),\n\t\t\t\t\tgap2 = alignment.getGaps2();\n\t\t\t\n\t\t\tString seq1, seq2, mark;\n\t\t\tif(start1>=start2){\n\t\t\t\tseq1=origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tString \tseq2Filler = start1==start2?\"\":String.format(\"%\"+(start1-start2)+\"s\", \"\"),\n\t\t\t\t\t\tmarkFiller = start1==0?\"\":String.format(\"%\"+start1+\"s\", \"\");\n\t\t\t\tseq2= seq2Filler + origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tmark= markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}else{\n\t\t\t\tseq2=origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tString \tmarkFiller = start2==0?\"\":String.format(\"%\"+start2+\"s\", \"\");\n\t\t\t\tseq1=String.format(\"%\"+(start2-start1)+\"s\", \"\") + origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tmark=markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}\n\t\t\tSystem.out.println(alignment.getSummary());\n\t\t\tSystem.out.println(seq1);\n\t\t\tSystem.out.println(mark);\n\t\t\tSystem.out.println(seq2);\n\t\t}",
"private Text createText(String text, int offset) {\n\t\tText res = new Text(text);\n\t\tres.setFont(new Font(\"Minecraftia\", 60));\n\t\tres.setFill(Color.YELLOW);\n\t\tres.getTransforms().add(new Rotate(-50, 300, 200, 20, Rotate.X_AXIS));\n\t\tres.setX(canvas.getWidth() / 2);\n\t\tres.setY(canvas.getHeight() / 2 + offset);\n\t\tres.setId(\"handCursor\");\n\t\tres.setOnMouseEntered(e -> {\n\t\t\tres.setText(\"> \" + res.getText() + \" <\");\n\t\t});\n\t\tres.setOnMouseExited(e -> {\n\t\t\tres.setText(res.getText().replaceAll(\"[<> ]\", \"\"));\n\t\t});\n\t\treturn res;\n\t}",
"public void addColumn(String text, int align)\n {\n addColumn(getDetailCell(text, align, Color.WHITE));\n }",
"@Override\n public void onEndPage(PdfWriter writer, Document document) {\n if (body) {\n page++;\n ColumnText.showTextAligned(writer.getDirectContent(),\n Element.ALIGN_CENTER, new Phrase(page + \"\"),\n (document.right() + document.left()) / 2, document.bottom() - 18, 0);\n }\n }",
"private void renderStringAligned(String text, int textX, int textY, int width, int color) {\n if (super.getBidiFlag()) {\n int stringWidth = super.getStringWidth(bidirectionalReorder(text));\n textX = textX + width - stringWidth;\n }\n \n renderString(text, textX, textY, color, false);\n }",
"static void setTextMousePoint(int i,int j){tmpx=i;tmpy=j;}",
"public void renderText(float x ,float y ){\n ttf.drawString(x, y, text);\n }",
"protected void paintGutterText(Graphics gfx, int line, int x) {\n String text = ta.getGutterText(line);\n if (text == null) {\n return;\n }\n \n gfx.setFont(getFont());\n Color textColor = ta.getGutterTextColor(line);\n if (textColor == null) {\n gfx.setColor(getForeground());\n } else {\n gfx.setColor(textColor);\n }\n int y = ta.lineToY(line) + fm.getHeight();\n \n // draw 4 times to make it appear bold, displaced 1px to the right, to the bottom and bottom right.\n //int len = text.length() > ta.gutterChars ? ta.gutterChars : text.length();\n Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()),\n ta.getGutterMargins(), y, gfx, this, 0);\n Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()),\n ta.getGutterMargins() + 1, y, gfx, this, 0);\n Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()),\n ta.getGutterMargins(), y + 1, gfx, this, 0);\n Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()),\n ta.getGutterMargins() + 1, y + 1, gfx, this, 0);\n }",
"private void drawCenteredText(Canvas canvas, PointF loc, Paint paint, String text) {\n float width = paint.measureText(text) / 2;\n canvas.drawText(text, loc.x - width, loc.y, paint);\n }",
"public static void main(String[] args) {\n PdfDocument pdf = new PdfDocument();\r\n\r\n PdfPageBase page = pdf.getPages().add();\r\n\r\n Rectangle2D rectangle2D = new Rectangle.Float();\r\n rectangle2D.setFrame(new Point2D.Double(10,10),new Dimension(100,100));\r\n\r\n PdfPopupAnnotation annotation = new PdfPopupAnnotation(rectangle2D, \"test\");\r\n annotation.setIcon(PdfPopupIcon.Help);\r\n annotation.setOpen(true);\r\n annotation.setAuthor(\"e-iceblue\");\r\n annotation.setSubject(\"subject_popup\");\r\n annotation.setColor(new PdfRGBColor(255,0,150));\r\n\r\n page.getAnnotationsWidget().add(annotation);\r\n String result = \"output/setAuthorAndSubjectForPdfPopupAnnotation.pdf\";\r\n\r\n //Save the document\r\n pdf.saveToFile(result);\r\n\t}",
"public void insertOutput(int offset, String text) {\r\n\t\ttry {\r\n\t\t\tdocument.insertString(offset, text, styles.getOutput());\r\n\t\t\tcommandIndex += text.length();\r\n\t\t\tcallOffsetListeners(offset, text.length());\r\n\t\t}\r\n\t\tcatch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void addTextLabel(String key, Double location, String text) {\r\n if (isXKey(key)) {\r\n mRenderer.addXTextLabel(location, text);\r\n } else {\r\n int scaleIndex = getScaleIndex(key);\r\n if (mRenderer.getYAxisAlign(scaleIndex) == Align.RIGHT) {\r\n text = \" \" + text;\r\n }\r\n mRenderer.addYTextLabel(location, text, scaleIndex);\r\n }\r\n }",
"public Text(double x, double y, String text, TextStyle style)\n {\n super(x, y, text);\n this.style = style;\n initialize();\n }",
"@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n float marginLefts = (position + positionOffset) * pointMargin;\n\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(widthDpi, widthDpi);\n params.leftMargin = (int) marginLefts;\n mRedPoint.setLayoutParams(params);\n }",
"public void switchClickableText(int offset, String text) {\r\n\t\ttry {\r\n\t\t\tdocument.remove(offset, text.length());\r\n\t\t\tdocument.insertString(offset, text, styles.getOutputFolder());\r\n\t\t}\r\n\t\tcatch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public PDFParagragh(String content, int alignment, int fontSize){\r\n\t\tsuper(content, PDFChineseFont.createChineseFont(fontSize, Font.NORMAL));\r\n\t\tsetAlignment(alignment);\r\n\t}",
"private void insert(String text, AttributeSet style) {\r\n\t\ttry {\r\n\t\t\tdocument.insertString(getCaretPosition(), text, style);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void onAnnotationsPreModify(Map<Annot, Integer> annots) {\n/* 297 */ if (annots == null || annots.size() == 0 || !this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ \n/* 301 */ this.mPreModifyPageNum = 0;\n/* 302 */ this.mPreModifyAnnotRect = null;\n/* */ \n/* 304 */ for (Map.Entry<Annot, Integer> pair : annots.entrySet()) {\n/* 305 */ Annot annot = pair.getKey();\n/* 306 */ Integer pageNum = pair.getValue();\n/* 307 */ if (this.mPreModifyPageNum != 0 && this.mPreModifyPageNum != pageNum.intValue()) {\n/* 308 */ this.mPreModifyPageNum = 0;\n/* 309 */ this.mPreModifyAnnotRect = null;\n/* */ return;\n/* */ } \n/* 312 */ this.mPreModifyPageNum = pageNum.intValue();\n/* */ try {\n/* 314 */ if (annot != null && annot.isValid()) {\n/* */ Rect annotRect;\n/* 316 */ if (annot.getType() == 19) {\n/* */ \n/* 318 */ Widget widget = new Widget(annot);\n/* 319 */ Field field = widget.getField();\n/* 320 */ annotRect = field.getUpdateRect();\n/* */ } else {\n/* 322 */ annotRect = this.mPdfViewCtrl.getPageRectForAnnot(annot, pageNum.intValue());\n/* */ } \n/* 324 */ annotRect.normalize();\n/* 325 */ if (this.mPreModifyAnnotRect != null) {\n/* 326 */ this.mPreModifyAnnotRect.setX1(Math.min(this.mPreModifyAnnotRect.getX1(), annotRect.getX1()));\n/* 327 */ this.mPreModifyAnnotRect.setY1(Math.min(this.mPreModifyAnnotRect.getY1(), annotRect.getY1()));\n/* 328 */ this.mPreModifyAnnotRect.setX2(Math.max(this.mPreModifyAnnotRect.getX2(), annotRect.getX2()));\n/* 329 */ this.mPreModifyAnnotRect.setY2(Math.max(this.mPreModifyAnnotRect.getY2(), annotRect.getY2())); continue;\n/* */ } \n/* 331 */ this.mPreModifyAnnotRect = annotRect;\n/* */ }\n/* */ \n/* 334 */ } catch (Exception e) {\n/* 335 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ } \n/* */ }",
"public void renderText(String text, int x, int y)\n {\n renderText(text, x, y, 0x00000000);\n }",
"private float drawText(Graphics2D g2d) {\n float yOffset = 0; // 1\" top margin\r\n for (TextLayout tl : textLayouts) {\r\n yOffset += tl.getAscent();\r\n tl.draw(g2d, 0, yOffset);\r\n yOffset += tl.getDescent();\r\n yOffset += tl.getLeading();\r\n }\r\n return yOffset;\r\n }",
"public static void main(String[] args)\n {\n String dataDir = RunExamples.getDataDir_Text();\n\n // Create an instance of Presentation class\n Presentation presentation = new Presentation();\n\n // Access the first slide \n ISlide slide = presentation.getSlides().get_Item(0);\n\n // Add an AutoShape of Rectangle type\n IAutoShape ashp = slide.getShapes().addAutoShape(ShapeType.Rectangle, 150, 75, 350, 350);\n\n // Add TextFrame to the Rectangle\n ashp.addTextFrame(\" \");\n ashp.getFillFormat().setFillType(FillType.NoFill);\n\n // Accessing the text frame\n ITextFrame txtFrame = ashp.getTextFrame();\n txtFrame.getTextFrameFormat().setAutofitType(TextAutofitType.Shape);\n\n // Create the Paragraph object for text frame\n IParagraph para = txtFrame.getParagraphs().get_Item(0);\n\n // Create Portion object for paragraph\n IPortion portion = para.getPortions().get_Item(0);\n portion.setText(\"A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog.\");\n portion.getPortionFormat().getFillFormat().setFillType(FillType.Solid);\n portion.getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.BLACK);\n\n // Save Presentation\n presentation.save(dataDir + \"formatText_out.pptx\", SaveFormat.Pptx);\n }",
"public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }",
"public static void main(String args[]) throws IOException {\n\t File file = new File(\"fdpModification.pdf\");\n\t PDDocument document = PDDocument.load(file);\n\n\t //Retrieving the pages of the document\n\t PDPage page = document.getPage(1);\n\t PDPageContentStream contentStream = new PDPageContentStream(document, page);\n\n\t //Begin the Content stream\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 105);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12);\n\t contentStream.drawString(\"bold text\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.setFont(PDType1Font.HELVETICA_OBLIQUE, 12);\n\t contentStream.drawString(\"Italic text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD_OBLIQUE, 12);\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.endText();\n\n\t contentStream.setLineWidth(.5f);\n\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 55);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"artificially bold text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.appendRawCommands(\"1 Tr\\n\");\n\t contentStream.drawString(\"Artificially outlined text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.setTextMatrix(1, 0, .2f, 1, 7, 5);\n\t contentStream.drawString(\"Artificially italic text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t //Setting the font to the Content streamt\n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line\n\t contentStream.newLineAtOffset(0, 0);\n\n //Setting the leading\n contentStream.setLeading(14.5f);\n\n //Setting the position for the line\n contentStream.newLineAtOffset(25, 725);\n\n String text1 = \"This is an example of adding text to a page in the pdf document. we can add as many lines\";\n String text2 = \"as we want like this using the ShowText() method of the ContentStream class\";\n\n //Adding text in the form of string\n contentStream. showText(text1);\n contentStream.newLine();\n contentStream. showText(text2);\n //Ending the content stream\n contentStream.endText();\n\n System.out.println(\"Content added\");\n\n //Closing the content stream\n contentStream.close();\n\n //Saving the document\n document.save(new File(\"newtou.pdf\"));\n\n //Closing the document\n document.close();\n }",
"public void displayRight(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font of the text \n\t\tgc.setFill(Color.WHITE); //set the color of the text\n\t\tgc.setTextAlign(TextAlignment.RIGHT); //set the alignment to right \n\t\tgc.fillText(text, x, y); //draw the text \n\t}",
"@Override\n\tpublic JComponent createWithAlignment(String text,String font, int x, int y, int w, int h,int Alignment) {\n\t\tJLabel label = new JLabel(text);\n\t\tlabel.setHorizontalAlignment(Alignment);\n\t label.setBounds(x,y,w,h);\n\t return label;\n\t}",
"public static void main(String[] args) throws DocumentException, IOException {\n \t\n// // step 1\n// Document document = new Document();\n \n // step 1: creation of the document with a certain size and certain margins\n Document document = new Document(PageSize.A4, 50, 50, 50, 50);\n \n // step 2: create a writer (we have many type of writer, eg HtmlWriter, PdfWriter)\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(RESULT));\n \n /* step 3: BEFORE open the document we add some meta information to the document (that properties can be viewed with adobe reader or right click-properties)\n * they don't appear in the document view\n */\n document.addAuthor(\"Author Test\"); \n document.addSubject(\"This is the result of a Test.\"); \n \n // step 4\n document.open();\n \n //The com.itextpdf.text.Image is used to add images to IText PDF documents\n Image image1 = Image.getInstance(\"src/main/resources/sms.png\");\n document.add(image1);\n \n // step 5\n /*\n access at the content under the new pdf document just created (ie the writer object that i can control/move)\n PdfContentByte is the object that contains the text to write and the content of a page (it offer the methods to add content to a page)\n */\n PdfContentByte canvas = writer.getDirectContentUnder();\n \n //Sets the compression level to be used for streams written by the writer.\n writer.setCompressionLevel(0);\n canvas.saveState(); \n canvas.beginText(); \n //move the writer to tha X,Y position\n canvas.moveText(360, 788); \n canvas.setFontAndSize(BaseFont.createFont(), 12);\n \n Rectangle rectangle = new Rectangle(400, 300);\n rectangle.setBorder(2);\n document.add(rectangle);\n \n /* \n Writes something to the direct content using a convenience method\n A Phrase is a series of Chunks (A Chunk is the smallest significant part of text that can be added to a document)\n \n Conclusion: A chunk is a String with a certain Font ---> A Phrase is a series of Chunk\n Both Chunck and Font has a Font field (but if a Chunk haven't a Font uses the one of the Phrase that own it)\n */\n \n //------- Two modes to set a Phrase: --------\n \n //mode 1) set the phrase directly without a separate chunk object\n Phrase hello = new Phrase(\"Hello World3\");\n document.add(hello);\n \n //mode 2) create before a chunk, adjust it and after assign it to a Phrase(s) \n Chunk chunk2 = new Chunk(\"Setting the Font\", FontFactory.getFont(\"dar-black\"));\n chunk2.setUnderline(0.5f, -1.5f);\n \n Phrase p1 = new Phrase(chunk2);\n document.add(p1); \n \n canvas.showText(\"Hello sms\"); \n canvas.endText(); \n canvas.restoreState(); \n \n document.add(Chunk.NEWLINE);\n \n //i chunk posso aggiungerli solo tramite l'oggetto Document ?\n Chunk chunk = new Chunk(\"I'm a chunk\");\n chunk.setBackground(BaseColor.GRAY, 1f, 0.5f, 1f, 1.5f);\n document.add(chunk);\n \n /*\n * A Paragraph is a series of Chunks and/or Phrases, has the same qualities of a Phrase, but also some additional layout-parameters\n * A paragraph is a sub-section in the document. After each Paragraph a CRLF is added\n */\n Paragraph paragraph = new Paragraph(\"A:\\u00a0\");\n Chunk chunk1 = new Chunk(\"I'm a chunk1\");\n paragraph.add(chunk1);\n paragraph.setAlignment(Element.ALIGN_JUSTIFIED);\n document.add(paragraph);\n \n \n //----- Add a table to the document ------\n \n //A cell in a PdfPTable\n PdfPCell cell;\n \n PdfPTable table = new PdfPTable(2); //in argument vis the number of column\n table.setWidths(new int[]{ 1, 2 }); //the width of the first and second cell. The number of element in the array must be equal at the number of column\n \n table.addCell(\"Name:\");\n cell = new PdfPCell();\n //We can attach event at the cell\n //cell.setCellEvent(new TextFields(1));\n table.addCell(cell);\n \n table.addCell(\"Loginname:\");\n cell = new PdfPCell();\n //cell.setCellEvent(new TextFields(2));\n table.addCell(cell);\n \n table.addCell(\"Password:\");\n cell = new PdfPCell(); \n table.addCell(cell);\n \n table.addCell(\"Reason:\");\n cell = new PdfPCell(); \n cell.setFixedHeight(60);\n table.addCell(cell);\n \n document.add(table);\n \n //add an horizontal line\n LineSeparator ls = new LineSeparator(); \n ls.setLineWidth(0);\n document.add(new Chunk(ls));\n \n Anchor pdfRef = new Anchor(\"http://www.java2s.com\");\n document.add(pdfRef);\n \n // step 5\n document.close();\n }",
"private void createPdf(String sometext) {\n PdfDocument document = new PdfDocument();\n // crate a page description\n PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(300, 600, 1).create();\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n Canvas canvas = page.getCanvas();\n Paint paint = new Paint();\n paint.setColor(Color.RED);\n canvas.drawCircle(50, 50, 30, paint);\n paint.setColor(Color.BLACK);\n canvas.drawText(sometext, 80, 50, paint);\n //canvas.drawt\n // finish the page\n document.finishPage(page);\n // draw text on the graphics object of the page\n // Create Page 2\n pageInfo = new PdfDocument.PageInfo.Builder(300, 600, 2).create();\n page = document.startPage(pageInfo);\n canvas = page.getCanvas();\n paint = new Paint();\n paint.setColor(Color.BLUE);\n canvas.drawCircle(100, 100, 100, paint);\n document.finishPage(page);\n\n // write the document content\n String directory_path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/mypdf/\";\n File file = new File(directory_path);\n if (!file.exists()) {\n file.mkdirs();\n }\n double random_double = Math.random() * (999999 - 999 + 1) + 999;\n String targetPdf = directory_path + String.valueOf(random_double) + \".pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(this, \"Done\", Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n Log.e(\"main\", \"error \" + e.toString());\n Toast.makeText(this, \"Something wrong: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n // close the document\n document.close();\n }",
"@Override\n protected void processPages(PDPageTree pages) throws IOException {\n\n List<ObjectRef> pageRefs = new ArrayList<>();\n //STEP 1: get the page refs\n findPages(pdDocument.getPages().getCOSObject().getItem(COSName.KIDS), pageRefs);\n //confirm the right number of pages was found\n if (pageRefs.size() != pdDocument.getNumberOfPages()) {\n throw new IOException(new TikaException(\n \"Couldn't find the right number of page refs (\" + pageRefs.size() +\n \") for pages (\" + pdDocument.getNumberOfPages() + \")\"));\n }\n\n PDStructureTreeRoot structureTreeRoot =\n pdDocument.getDocumentCatalog().getStructureTreeRoot();\n\n //STEP 2: load the roleMap\n Map<String, HtmlTag> roleMap = loadRoleMap(structureTreeRoot.getRoleMap());\n\n //STEP 3: load all of the text, mapped to MCIDs\n Map<MCID, String> paragraphs = loadTextByMCID(pageRefs);\n\n //STEP 4: now recurse the the structure tree root and output the structure\n //and the text bits from paragraphs\n\n try {\n recurse(structureTreeRoot.getK(), null, 0, paragraphs, roleMap);\n } catch (SAXException e) {\n throw new IOException(e);\n }\n\n //STEP 5: handle all the potentially unprocessed bits\n try {\n if (state.hrefAnchorBuilder.length() > 0) {\n xhtml.startElement(\"p\");\n writeString(state.hrefAnchorBuilder.toString());\n xhtml.endElement(\"p\");\n }\n for (MCID mcid : paragraphs.keySet()) {\n if (!state.processedMCIDs.contains(mcid)) {\n if (mcid.mcid > -1) {\n //TODO: LOG! piece of text that wasn't referenced in the marked content\n // tree\n // but should have been. If mcid == -1, this was a known item not part of\n // content tree.\n }\n\n xhtml.startElement(\"p\");\n writeString(paragraphs.get(mcid));\n xhtml.endElement(\"p\");\n }\n }\n } catch (SAXException e) {\n throw new IOException(e);\n }\n //Step 6: for now, iterate through the pages again and do all the other handling\n //TODO: figure out when we're crossing page boundaries during the recursion\n // step above and do the page by page processing then...rather than dumping this\n // all here.\n for (PDPage page : pdDocument.getPages()) {\n startPage(page);\n endPage(page);\n }\n\n }",
"public void setLabelPosition(int x, int y);",
"private Graphics buildPage(Graphics g, double width, double height, int page) {\n \t\t\n \t\tCalendar cal = GregorianCalendar.getInstance();\n \t\tcal.setTime(d);\n \t\t\n \t\tFont bigFont = new Font(\"Monospaced\", Font.BOLD, 20);\n \t\tFont smallFont = new Font(\"Monospaced\", Font.PLAIN, 9);\n \t\tFont medFont = new Font(\"Monospaced\", Font.PLAIN, 14);\n \t\t\n \t\tGraphics2D g2d = (Graphics2D) g;\n \t\tRectangle2D.Double rect = new Rectangle2D.Double ();\n \t\tdouble startx = Constants.PRINT_MARGINX;\n \t\tdouble starty = Constants.PRINT_MARGINY;\n \t\trect.setRect (startx, starty, width, 50);\n \t\tg2d.draw(rect);\n \t\tg2d.setFont(bigFont);\n \t\tString heading;\n \t\tint month = cal.get(Calendar.MONTH);\n \t\tif (month == 0) heading = \"January \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 1) heading = \"February \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 2) heading = \"March \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 3) heading = \"April \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 4) heading = \"May \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 5) heading = \"June \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 6) heading = \"July \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 7) heading = \"August \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 8) heading = \"September \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 9) heading = \"October \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 10) heading = \"November \" + cal.get(Calendar.YEAR);\n \t\telse heading = \"December \" + cal.get(Calendar.YEAR);\n \t\t\n \t\tFontMetrics f = g2d.getFontMetrics();\n \t\tint offsetx = (int)(width / 2.0 - f.charWidth(' ') * (heading.length() / 2.0));\n \t\tg2d.drawString(heading, (int)startx + offsetx, (int)starty + f.getHeight());\n \t\t\n \t\tstarty += 50;\n \t\t\n \t\tdouble blockWidth = width / 7;\n \t\tdouble blockHeight = (height-100) / 6;\n \t\tg2d.setFont(medFont);\n \t\tf = g2d.getFontMetrics();\n \t\t\n \t\tfor (int i = 0; i < 7; i++) {\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, 50);\n \t\t\tg2d.draw(rect);\n \t\t\tif (i == 0) heading = \"Sunday\";\n \t\t\telse if (i == 1) heading = \"Monday\";\n \t\t\telse if (i == 2) heading = \"Tuesday\";\n \t\t\telse if (i == 3) heading = \"Wednesday\";\n \t\t\telse if (i == 4) heading = \"Thursday\";\n \t\t\telse if (i == 5) heading = \"Friday\";\n \t\t\telse heading = \"Saturday\";\n \t\t\tg2d.drawString(heading, (int)startx + 5, (int)starty + f.getHeight());\n \t\t\tstartx += blockWidth;\n \t\t}\n \t\t\n \t\tstartx = Constants.PRINT_MARGINX;\n \t\tstarty += 50;\n \t\t\n \t\tg2d.setFont(smallFont);\n \t\tf = g2d.getFontMetrics();\n \t\t\n \t\t//GregorianCalendar cal = new GregorianCalendar();\n \t\t//cal.set(Calendar.DATE, 1);\n \t\t//cal.set(Calendar.MONTH, d.getMonth() - 1);\n \t\t//cal.set(Calendar.YEAR, d.getYear());\n \t\t\n \t\tint prevDays = cal.get(Calendar.DAY_OF_WEEK) - 1; \n \t\tint endDays = 42 - cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays;\n \t\t\n \t\tcal.roll(Calendar.MONTH, false);\n \t\t\n \t\tint rowCount = 0;\n \t\t\n \t\tfor (int i = 1; i <= prevDays; i++) {\n \t\t\t//Date date = new Date(cal.get(Calendar.MONTH) + 1, cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays + i, cal.get(Calendar.YEAR));\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, blockHeight);\n \t\t\tg2d.draw(rect);\n \t\t\t//g2d.drawString(date.toFormalString(), (int)startx + 5, (int)starty + f.getHeight());\n \t\t\tstartx += blockWidth;\n \t\t\trowCount++;\n \t\t}\n \t\t\n \t\tcal.roll(Calendar.MONTH, true);\n \t\t\n \t\t\n \t\tfor (int i = 1; i <= cal.getActualMaximum(Calendar.DAY_OF_MONTH); i++) {\n \t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH), i, cal.get(Calendar.YEAR));\n \t\t\tDate date = new Date(c.getTime().getTime());\n \t\t\t\n \t\t\t//Date date = new Date(d.getMonth(), i, d.getYear());\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, blockHeight);\n \t\t\tg2d.draw(rect);\n \t\t\tint offset = 1;\n \t\t\tg2d.drawString(date.toString(), (int)startx + 5, (int)starty + offset * f.getHeight());\n \t\t\toffset++;\n \t\t\t\n \t\t\tDayDto loadedDay = DataServiceImpl.GLOBAL_DATA_INSTANCE.getOrCreateDay(date);\n \t\t\tSchedulePractitionerDto scheduled = new SchedulePractitionerDto();\n \t\t\tscheduled.setField(SchedulePractitionerDto.DATE, loadedDay);\n \t\t\t\n \t\t\t\n \t\t\tif (loadedDay != null && scheduled.getAppointments() != null) {\n \t\t\t\tfor (AppointmentDto appt : scheduled.getAppointments()) {\n \t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\tPractitionerDto p = DataServiceImpl.GLOBAL_DATA_INSTANCE.getPractitioner(appt.getPractSchedID());\n \t\t\t\t\tString s = p.getTypeName();\n \t\t\t\t\t//if (room.isFull()) s = \"*\" + s;\n \t\t\t\t\tg2d.drawString(formatString(s), (int)startx + 5, (int)starty + offset * f.getHeight());\n \t\t\t\t\toffset++;\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t\n \t\t\tstartx += blockWidth;\n \t\t\trowCount++;\n \t\t\tif (rowCount >= 7) {\n \t\t\t\trowCount = 0;\n \t\t\t\tstartx = Constants.PRINT_MARGINX;\n \t\t\t\tstarty += blockHeight;\n \t\t\t}\n \t\t}\n \t\t\n \t\tcal.roll(Calendar.MONTH, true);\n \t\t\n \t\tfor (int i = 1; i <= endDays; i++) {\n \t\t\t//Date date = new Date(cal.get(Calendar.MONTH) + 1, i, cal.get(Calendar.YEAR));\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, blockHeight);\n \t\t\tg2d.draw(rect);\n \t\t\t//g2d.drawString(date.toFormalString(), (int)startx + 5, (int)starty + f.getHeight());\n \t\t\tstartx += blockWidth;\n \t\t\trowCount++;\n \t\t\tif (rowCount >= 7) {\n \t\t\t\trowCount = 0;\n \t\t\t\tstartx = Constants.PRINT_MARGINX;\n \t\t\t\tstarty += blockHeight;\n \t\t\t}\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\treturn g;\n \t}",
"public MyText(String text, double x1, double y2, Color color, int fontSize) {\n\t\tthis.x1 = x1;\n\t\tthis.y2 = y2;\n\t\tthis.text = text;\n\t\tthis.color = color;\n\t\tthis.fontSize = fontSize;\n\t}",
"public GraphicsText(String text, float x, float y){\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n textColor = Color.BLACK;\r\n font = new Font(\"SanSerif\", Font.PLAIN, 14);\r\n }",
"public void setAlign(String align) {\n this.align = align;\n }",
"public void renderTagCloud(List<Tag> tags, Text text, Rectangle2D renderArea) {\n List<TextLine> textLines = new ArrayList<TextLine>();\n\n BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);\n Graphics2D g = image.createGraphics();\n String fontFamily = text.getFontFamily();\n int fontSize = (int) text.getFontSize();\n Font font = new Font(fontFamily, Font.PLAIN, fontSize);\n FontMetrics fm = g.getFontMetrics(font);\n Point2D currentPosition = new Point2D.Double(renderArea.getX(), renderArea.getY());\n TextLine textLine = null;\n double minPadding = fm.getHeight();\n\n try {\n for (int i = 0; i < tags.size(); i++) {\n Tag tag = tags.get(i);\n String value = tag.getValue();\n Rectangle2D rect = fm.getStringBounds(value, g);\n // create new textline if not exists\n if (i == 0) {\n textLine = new TextLine();\n textLines.add(textLine);\n }\n if (currentPosition.getX() + rect.getWidth() + minPadding >= (renderArea.getX() + renderArea.getWidth())) {\n currentPosition.setLocation(renderArea.getX(),\n currentPosition.getY() + fm.getHeight() * 1.2);\n if ((currentPosition.getY() + fm.getHeight()) >= (renderArea.getY() + renderArea.getHeight()))\n break;\n textLine = new TextLine();\n textLines.add(textLine);\n }\n TSpan tspan = new TSpan(currentPosition.getX(),\n currentPosition.getY() + Math.abs(rect.getY()),\n rect.getWidth(),\n rect.getHeight(),\n fontFamily, fontSize, value);\n currentPosition.setLocation(currentPosition.getX() + rect.getWidth() + minPadding,\n currentPosition.getY());\n textLine.getTspans().add(tspan);\n text.getTspans().add(tspan);\n }\n\n for (TextLine line : textLines) {\n if (line.getTspans().size() > 1) {\n TSpan span = line.getTspans().get(line.getTspans().size() - 1);\n double additionalXPadding = ((renderArea.getX() + renderArea.getWidth()) - (span.getX() + span.getWidth())) / (double) (line.getTspans().size());\n for (int i = 0; i < line.getTspans().size(); i++) {\n TSpan tSpan = line.getTspans().get(i);\n if (i != 0) {\n tSpan.setX(tSpan.getX() + ((i + 1) * additionalXPadding));\n }\n }\n }\n }\n // remove single entry text line\n if (textLines.get(textLines.size() - 1).getTspans().size() == 1) {\n text.getTspans().remove(textLines.get(textLines.size() - 1).getTspans().get(0));\n textLines.remove(textLines.size() - 1);\n }\n\n }\n finally {\n g.dispose();\n }\n }",
"public void insertStaticText(String text){\n if(lastText != null){\n lastText.clear();\n }\n lastText = new TextBuilder(text);\n lastText.build();\n }",
"public void setAlignment(int align)\n {\n this.align = align;\n }",
"public BLabel(String text, Position align)\n {\n component = createComponent(text, null);\n setAlignment(align);\n }",
"public void centerText() {\r\n int theHeight = window.getGraphPanelHeight() / 2;\r\n int theWidth = window.getGraphPanelWidth() / 2;\r\n int writingHeight = textShape.getHeight() / 2;\r\n int writingWidth = textShape.getWidth() / 2;\r\n textShape.setY(theHeight - writingHeight);\r\n textShape.setX(theWidth - writingWidth);\r\n }",
"public void insertString(int offs, String str, AttributeSet a)\n throws BadLocationException\n {\n String currentText = getText( 0, getLength() ) + \"0\";\n\n String beforeOffset = currentText.substring(0, offs);\n String afterOffset = currentText.substring(offs, currentText.length());\n String proposedResult = beforeOffset + str + afterOffset;\n try {\n format.parseObject( proposedResult );\n super.insertString( offs, str, a );\n } catch (ParseException e) {\n Toolkit.getDefaultToolkit().beep();\n }\n }",
"@Override\n\tpublic void draw3dText(Vector3f location, String textString) {\n\n\t}",
"public void drawStringWithShadow(String text, float x, float y, int color) {\n/* 36 */ drawString(text, x, y, color, true);\n/* */ }",
"@Override\n public String getTextAlign() {\n return graphicsEnvironmentImpl.getTextAlign(canvas);\n }",
"public static void setSceneText(Text text, String textName, int x_location, int y_location) {\n text.setText(textName);\n text.setTextAlignment(TextAlignment.CENTER);\n text.setX(x_location);\n text.setY(y_location);\n }",
"public void drawMultiLine(SpriteBatch batch, String text, float x, float y, float alignWidth, HAlignment alignment);",
"public Text(double x, double y, String text, TextStyle style, Accent accent)\n {\n super(x, y, text);\n this.style = style;\n this.accent = accent;\n initialize();\n }",
"private void textInfoBottom(JPanel panel_TextInfo) {\n\t\tcontentPane.setLayout(gl_contentPane_1);\n\t\ttxtrPreparing = new JTextArea();\n\t\ttxtrPreparing.setBackground(Color.WHITE);\n\t\ttxtrPreparing.setText(\"Preparing... \");\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBackground(Color.WHITE);\n\t\ttextArea.setText(\" $10\");\n\t\tGroupLayout gl_panel_TextInfo = new GroupLayout(panel_TextInfo);\n\t\tgl_panel_TextInfo.setHorizontalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, 232, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(textArea, GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))\n\t\t);\n\t\tgl_panel_TextInfo.setVerticalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_panel_TextInfo.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textArea, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t);\n\t\tpanel_TextInfo.setLayout(gl_panel_TextInfo);\n\t}",
"@Action\n public void addWrappedText() {\n if (Math.random() < .33) {\n addWrappedTextEndChar();\n } else if (Math.random() < .5) {\n addWrappedTextRandom();\n } else {\n addWrappedTextSmall();\n }\n }",
"public abstract void doAlignment(String sq1, String sq2);",
"private void setText(Text text, int x_pos, int y_pos) {\n text.setTextOrigin(POS);\n text.setFont(new Font(fontType, fontSize));\n text.setX(x_pos);\n text.setY(y_pos);\n text.toFront();\n if (text == cursorPos) {\n cursor.setX(x_pos + round(text.getLayoutBounds().getWidth())+1);\n cursor.setY(y_pos);\n }\n }",
"@Override\r\n\tpublic void insertString(int offs, String str, AttributeSet a)\r\n\t\t\tthrows BadLocationException {\n\t\tStyleConstants.setForeground((MutableAttributeSet) a, Color.BLACK);\r\n\t\tStyleConstants.setItalic((MutableAttributeSet) a, false);\r\n\t\t\r\n\t\t// trim line breaks, spaces and tab characters from inserted string\r\n\t\tString line = str.trim();\r\n\t\t// check for keywords\r\n\t\t// TODO: maybe move context detection to separate method\r\n\t\tif (line.startsWith(\"[BEFORE_HEX]\")) {\r\n\t\t\tthis.branchContext = BranchContext.BEFORE_HEX;\r\n\t\t} else if (line.startsWith(\"[AFTER_HEX]\")) {\r\n\t\t\tthis.branchContext = BranchContext.AFTER_HEX;\r\n\t\t} else if (line.startsWith(\"[HEADER]\")) {\r\n\t\t\tthis.branchContext = BranchContext.HEX_HEADER;\r\n\t\t} else if (line.startsWith(\"[CODE]\")) {\r\n\t\t\tthis.branchContext = BranchContext.HEX_CODE;\r\n\t\t} else if (line.startsWith(\"//\")) {\r\n\t\t\t// TODO: get style data from context enum\r\n\t\t\tStyleConstants.setForeground((MutableAttributeSet) a, new Color(63, 127, 95));\r\n\t\t}\r\n\t\t\r\n\t\tif (this.leafContext == LeafContext.ATTRIBUTE_VALUE) {\r\n\t\t\tStyleConstants.setForeground((MutableAttributeSet) a, new Color(0, 0, 192));\r\n\t\t\tStyleConstants.setItalic((MutableAttributeSet) a, true);\r\n\t\t}\r\n\t\tthis.leafContext = LeafContext.OTHER;\r\n\t\t\r\n\t\t// check for comments\r\n\t\tint commentOffset = line.indexOf(\"//\");\r\n\t\tif (commentOffset > 0) {\r\n\t\t\t// split at '//' if comment is after other content\r\n\t\t\tString pre = str.substring(0, commentOffset + 1);\r\n\t\t\tString post = str.substring(commentOffset + 1);\r\n\t\t\t\r\n\t\t\tthis.insertString(offs, pre, a);\r\n\t\t\tthis.insertString(offs + pre.length(), post, a);\r\n\t\t} else {\r\n\t\t\t// check for attribute values\r\n\t\t\tint equalsOffset = str.indexOf(\"=\");\r\n\t\t\tif ((equalsOffset > 0) && (commentOffset < 0)) {\r\n\t\t\t\t// split at '=' if attribute/value pair is outside of comment\r\n\t\t\t\tString pre = str.substring(0, equalsOffset);\r\n\t\t\t\tString post = str.substring(equalsOffset + 1);\r\n\t\t\t\t\r\n\t\t\t\tthis.leafContext = LeafContext.ATTRIBUTE_NAME;\r\n\t\t\t\tthis.insertString(offs, pre, a);\r\n\t\t\t\tthis.leafContext = LeafContext.OTHER;\r\n\t\t\t\tthis.insertString(offs + pre.length(), \"=\", a);\r\n\t\t\t\tthis.leafContext = LeafContext.ATTRIBUTE_VALUE;\r\n\t\t\t\tthis.insertString(offs + pre.length() + 1, post, a);\r\n\t\t\t} else {\r\n\t\t\t\t// fall-back for default behavior\r\n\t\t\t\tsuper.insertString(offs, str, a);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void onPagesInserted(boolean success, int dstIndex, int[] range) {\n mAnnotPanel.prepare();\n mAnnotPanel.startSearch(0);\n }",
"private TransformGroup createTextX(\n\t\tfloat x,\n\t\tfloat z,\n\t\tfloat size,\n\t\tString str,\n\t\tColor3f col) {\n\n\t\t// create the text\n\t\tText2D txt =\n\t\t\tnew Text2D(\n\t\t\t\tstr,\n\t\t\t\tcol,\n\t\t\t\t\"courrier\",\n\t\t\t\t(new Float(300f * size)).intValue(),\n\t\t\t\tFont.BOLD);\n\t\t\n\t\t// make the text two-sided\n\t Appearance app = txt.getAppearance();\n\t PolygonAttributes polyAttrib = new PolygonAttributes();\n\t polyAttrib.setCullFace(PolygonAttributes.CULL_NONE);\n\t polyAttrib.setBackFaceNormalFlip(true);\n\t app.setPolygonAttributes(polyAttrib);\n\n\t\t// move and rotate the text\n\t\tTransform3D translate = new Transform3D();\n\t\ttranslate.set(new Vector3f(x, 0.0f, z + size));\n\n\t\tTransform3D rotate = new Transform3D();\n\t\trotate.rotX(-Math.PI / 2.0d);\n\t\ttranslate.mul(rotate);\n\n\t\tTransformGroup tg = new TransformGroup(translate);\n\n\t\t// apply Transform3D\n\t\ttg.addChild(txt);\n\n\t\treturn tg;\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tString dataDir = Utils.getSharedDataDir(CreateTextBoxhavingdifferentLineAlignment.class) + \"TechnicalArticles/\";\n\n\t\t// Create a workbook.\n\t\tWorkbook wb = new Workbook();\n\n\t\t// Access first worksheet.\n\t\tWorksheet ws = wb.getWorksheets().get(0);\n\n\t\t// Add text box inside the sheet.\n\t\tws.getShapes().addShape(MsoDrawingType.TEXT_BOX, 2, 0, 2, 0, 80, 400);\n\n\t\t// Access first shape which is a text box and set is text.\n\t\tShape shape = ws.getShapes().get(0);\n\t\tshape.setText(\n\t\t\t\t\"Sign up for your free phone number.\\nCall and text online for free.\\nCall your friends and family.\");\n\n\t\t// Acccess the first paragraph and set its horizontal alignment to left.\n\t\tTextParagraph p = shape.getTextBody().getTextParagraphs().get(0);\n\t\tp.setAlignmentType(TextAlignmentType.LEFT);\n\n\t\t// Acccess the second paragraph and set its horizontal alignment to center.\n\t\tp = shape.getTextBody().getTextParagraphs().get(1);\n\t\tp.setAlignmentType(TextAlignmentType.CENTER);\n\n\t\t// Acccess the third paragraph and set its horizontal alignment to right.\n\t\tp = shape.getTextBody().getTextParagraphs().get(2);\n\t\tp.setAlignmentType(TextAlignmentType.RIGHT);\n\n\t\t// Save the workbook in xlsx format.\n\t\twb.save(dataDir + \"CTBoxHDLineAlignment_out.xlsx\", SaveFormat.XLSX);\n\n\t}",
"public void drawstringCenter(String var1, int var2, int var3, int var4, int var5) {\n this.drawString(var1, var2 - this.method_271(var1, var4) / 2, var3, var4, var5);\n }",
"public void setText (byte[] page, int length) {\r\n this.pagepart = page;\r\n this.length = length;\r\n index = 0;\r\n }",
"public void printWithTemplate(String text) {\n String line = \"____________________________________________________________\";\n\n out.println(line);\n out.println(text);\n out.println(line);\n }",
"public void drawText(String text, float x, float y, float size) {\n\t\tTextLoader.addLargeText(text, x, y, size, this);\n\t}",
"public static void write(int x1, int y1, String stuff, String font,\n int just, LinkProperties properties,\n DataOutputStream dos) throws IOException {\n\n dos.write(Link.TEXT_HEADER.getBytes());\n dos.writeByte(GRAPHICTYPE_TEXT);\n dos.writeByte(RENDERTYPE_XY);\n dos.writeInt(x1);\n dos.writeInt(y1);\n dos.writeByte(just);\n\n properties.setProperty(LPC_LINKTEXTSTRING, stuff);\n properties.setProperty(LPC_LINKTEXTFONT, font);\n properties.write(dos);\n }",
"@Override\n public CharSequence getPageTitle(int position) {\n return \"Page \" + position;\n }",
"@Override\n public CharSequence getPageTitle(int position) {\n return \"Page \" + position;\n }",
"@Override\n public CharSequence getPageTitle(int position) {\n return \"Page \" + position;\n }",
"@Override\n public CharSequence getPageTitle(int position) {\n return \"Page \" + position;\n }",
"@Override\n public CharSequence getPageTitle(int position) {\n return \"Page \" + position;\n }",
"public void draw(String str, double x, double y, double size, int color, Align align) {\n GL11.glEnable(GL11.GL_BLEND);\n //GL11.glDepthMask(false);\n double scale = size / mcFont().FONT_HEIGHT;\n GL11.glPushMatrix(); {\n GL11.glTranslated(x, y, 0);\n GL11.glScaled(scale, scale, 1);\n String[] ss = str.split(\"\\n\");\n for(int i = 0; i < ss.length; ++i) {\n GL11.glPushMatrix(); {\n double dy = i * mcFont().FONT_HEIGHT;\n GL11.glTranslated(0, dy, 0);\n drawSingleLine(ss[i], color, align);\n } GL11.glPopMatrix();\n }\n } GL11.glPopMatrix();\n }",
"public void drawText(final String text, final int xPos, final int yPos, final Color color){\n font.setColor(Color.BLACK);\n font.setScale(0.51f);\n batch.begin();\n setDrawmode(GL10.GL_MODULATE);\n font.drawMultiLine(batch, text, xPos, yPos);\n batch.end();\n \n font.setColor(Color.WHITE);\n font.setScale(0.5f);\n batch.begin();\n font.drawMultiLine(batch, text, xPos, yPos);\n batch.end();\n font.setScale(1f);\n }",
"public Text(double x, double y, String text)\n {\n super(x, y, text);\n initialize();\n }",
"public void updatePointText(int point) {\n String textPoint = \"points: \" + point;\n text.setText(textPoint);\n }",
"public void renderText(String text, int x, int y, int color)\n {\n renderText(text, x, y, color, 1.0f);\n }",
"@Override\n public int drawString(String text, float x, float y, int color, boolean dropShadow) {\n super.enableAlpha();\n int textXPos;\n \n if (dropShadow) {\n drawNewString(color, true);\n textXPos = renderString(text, x + 1.0F, y + 1.0F, color, true);\n drawNewString(color, false);\n textXPos = Math.max(textXPos, renderString(text, x, y, color, false));\n } else {\n drawNewString(color, false);\n textXPos = renderString(text, x, y, color, false);\n }\n \n return textXPos;\n }",
"public static void writeText( XMLStreamWriter w,\n Supplier<String> cssClass,\n DoubleSupplier x,\n DoubleSupplier y,\n IntSupplier angle,\n IntSupplier size,\n Supplier<String> fill,\n Supplier<String> stroke,\n Supplier<String> anchor,\n Supplier<String> baseline,\n Supplier<String> text\n )\n {\n try {\n w.writeStartElement( \"text\" );\n writeSvgAttributes( w, cssClass, fill, stroke );\n w.writeAttribute( \"x\", SvgUtils.toString( x.getAsDouble() ) );\n w.writeAttribute( \"y\", SvgUtils.toString( y.getAsDouble() ) );\n\n if( angle != null ) {\n int ang = angle.getAsInt();\n if( ang != 0 ) {\n w.writeAttribute( \"transform\", \"rotate(\" + ang + \")\" );\n }\n }\n\n if( size != null ) {\n w.writeAttribute( \"font-size\", String.valueOf( size.getAsInt() ) );\n }\n\n if( anchor != null ) {\n w.writeAttribute( \"font-text-anchor\", anchor.get() );\n }\n\n if( baseline != null ) {\n w.writeAttribute( \"alignment-baseline\", baseline.get() );\n }\n\n w.writeCharacters( text.get() );\n w.writeEndElement();\n }\n catch( XMLStreamException ex ) {\n throw new RuntimeException( ex );\n }\n }",
"private boolean fillDrawTextMark(Graphics2D graphic, double tx, double ty, TextMark mark,\n int size, double rotation, Feature feature) {\n java.awt.Font javaFont = getFont(feature, mark.getFonts());\n \n if (javaFont != null) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"found font \" + javaFont.getFamily());\n }\n \n graphic.setFont(javaFont);\n } else {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"failed to find font \");\n }\n \n return false;\n }\n \n String symbol = mark.getSymbol().getValue(feature).toString();\n // TextLayout tl = new TextLayout(symbol, javaFont, graphic.getFontRenderContext());\n AffineTransform oldTx = graphic.getTransform();\n graphic.setTransform(IDENTITY_TRANSFORM);\n GlyphVector gv = javaFont.createGlyphVector(graphic.getFontRenderContext(), symbol);\n graphic.setTransform(oldTx);\n Rectangle2D textBounds = gv.getVisualBounds();\n \n \n // TODO: consider if symbols should carry an offset\n double dx = textBounds.getWidth() / 2.0;\n double dy = textBounds.getHeight() / 2.0;\n renderString(graphic, tx, ty, dx, dy, gv, feature, mark.getFill(), rotation);\n \n return true;\n }",
"public void positionTextMergeWindow() {\n if (textMergeWindow != null) {\n textMergeWindow.setBounds (\n this.getX() + TEXT_MERGE_WINDOW_DEFAULT_X,\n this.getY() + TEXT_MERGE_WINDOW_DEFAULT_Y,\n TEXT_MERGE_WINDOW_DEFAULT_WIDTH,\n TEXT_MERGE_WINDOW_DEFAULT_HEIGHT);\n WindowMenuManager.locateCenter(this, textMergeWindow);\n }\n }",
"public BLabel(String text, Icon image, Position align, Position textPos)\n {\n component = createComponent(text, image);\n setAlignment(align);\n setTextPosition(textPos);\n }",
"@JSProperty(\"textAlign\")\n void setTextAlign(String value);",
"private void drawText(Graphics2D g2)\n\t{\n\t\tfinal int PADDING = 5;\n\t\tfinal Rectangle bounds = getBounds();\n\t\tfinal String[] texts = getText().split(\"\\\\ \");\n\n\t\tfinal Font effectiveFont = font.deriveFont(font.getSize() * parent.getZoom());\n\n\t\tfinal FontMetrics metrics = g2.getFontMetrics(effectiveFont);\n\n\t\tfinal int hgt = metrics.getHeight();\n\t\tint adv, offsetY = bounds.y + PADDING + hgt, offsetX = PADDING;\n\t\tg2.setFont(effectiveFont);\n\n\t\tfor (final String text2 : texts)\n\t\t{\n\t\t\tfinal String currentText = text2 + \" \";\n\t\t\tadv = metrics.stringWidth(currentText);\n\n\t\t\tif (offsetX + adv > bounds.width - PADDING * 2)\n\t\t\t{\n\t\t\t\toffsetY += hgt; // new line\n\t\t\t\toffsetX = PADDING;\n\t\t\t}\n\n\t\t\tg2.drawString(currentText, bounds.x + offsetX, offsetY);\n\t\t\toffsetX += adv;\n\t\t}\n\t}",
"@Override\n public void render(Graphics g) {\n\n int x = g.repositionX((int) _coordOrigin._x + (int) _pos._x);\n int y = g.repositionY((int) _coordOrigin._y + ((int) _pos._y * (-1)));\n\n g.newFont(_f, g.repositionX(_lineThickness), _b);\n g.setColor(_c);\n g.drawText(_t, g.getCanvas().getX() + x, g.getCanvas().getY() + y);\n }",
"private void runExample() throws IOException {\n\t\tFont SansSerifBoldBig = new Font(\"SansSerif\", Font.BOLD, 20);\r\n\t\tFont SansSerifBoldNormal = new Font(\"SansSerif\", Font.BOLD, 12);\r\n\t\tFont SansSerifPlainNormal = new Font(\"SansSerif\", Font.PLAIN, 12);\r\n\t\t\r\n\t\t// 2. Load in the image which is used as watermark.\r\n\t\tInputStream is = this.getClass().getResourceAsStream(\r\n\t\t\t\t\"/nl/jamiecraane/imagegenerator/resources/images/watermark.png\");\r\n\t\tBufferedImage watermark = ImageIO.read(is);\r\n\t\t\r\n\t\t// 3. Use the WaterMarkImageBuilder to create a textimage with the specified image as a watermark\r\n\t\tTextImage waterMarked = new WaterMarkImageBuilder(450, 300, new Margin(5, 5)).build(watermark);\r\n\t\t\r\n\t\t// 4. Specify nl.jamiecraane.imagegenerator.examples.fonts, text and color (last line)\r\n\t\twaterMarked.withFont(SansSerifBoldBig).writeLine(\"What is Lorem Ipsum?\");\r\n\t\twaterMarked.withFont(SansSerifBoldNormal).write(\"Lorem Ipsum \").withFont(SansSerifPlainNormal).writeLine(\r\n\t\t\t\t\"is simply dummy text of the printing and typesetting industry.\");\r\n\t\twaterMarked.writeLine(\"Lorem Ipsum has been the industry's standard dummy text ever since\");\r\n\t\twaterMarked.writeLine(\"the 1500s, when an unknown printer took a galley of type and\");\r\n\t\twaterMarked.writeLine(\"scrambled it to make a type specimen book. It has survived not only\");\r\n\t\twaterMarked.writeLine(\"five centuries, but also the leap into electronic typesetting,\");\r\n\t\twaterMarked.writeLine(\"remaining essentially unchanged. It was popularised in the 1960s with\");\r\n\t\twaterMarked.writeLine(\"the release of Letraset sheets containing Lorem Ipsum passages, and\");\r\n\t\t// Underline\r\n\t\twaterMarked.withFontStyle(Style.UNDERLINED).write(\"more recently with desktop publishing software like Aldus PageMaker\").newLine();\r\n\t\t// Use a red color\r\n\t\twaterMarked.withFontStyle(Style.PLAIN).withColor(Color.RED).writeLine(\"including versions of Lorem Ipsum.\");\r\n\r\n ImageWriter imageWriter = ImageWriterFactory.getImageWriter(ImageType.PNG);\r\n imageWriter.writeImageToFile(waterMarked, new File(\"loremipsum-watermarked.png\"));\r\n\t}",
"private void createSpellCheckedText(Composite composite, int style) {\n\t\tAnnotationModel annotationModel = new AnnotationModel();\n\t\tIAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess();\n\n\t\tfinal SourceViewer sourceViewer = new SourceViewer(composite, null,\n\t\t\t\tnull, true, style);\n\t\ttext = sourceViewer.getTextWidget();\n\t\t// text.setIndent(2);\n\n\t\tfinal SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(\n\t\t\t\tsourceViewer, null, annotationAccess, EditorsUI\n\t\t\t\t\t\t.getSharedTextColors());\n\n\t\tIterator<?> e = new MarkerAnnotationPreferences()\n\t\t\t\t.getAnnotationPreferences().iterator();\n\t\twhile (e.hasNext())\n\t\t\tsupport.setAnnotationPreference((AnnotationPreference) e.next());\n\n\t\tsupport.install(EditorsUI.getPreferenceStore());\n\n\t\tDocument document = new Document(\"\");\n\n\t\t// NOTE: Configuration must be applied before the document is set in\n\t\t// order for\n\t\t// Hyperlink coloring to work. (Presenter needs document object up\n\t\t// front)\n\t\tsourceViewer.configure(new TextSourceViewerConfiguration(EditorsUI\n\t\t\t\t.getPreferenceStore()));\n\t\tsourceViewer.setDocument(document, annotationModel);\n\t}",
"SPAN createSPAN();",
"protected String createText() {\r\n\t\t// Default text is 1 based.\r\n\t\tNumberFormat formatter = NumberFormat.getFormat(\"#,###\");\r\n\t\tHasRows display = getDisplay();\r\n\t\tRange range = display.getVisibleRange();\r\n\t\tint pageStart = range.getStart() /*+ 1*/;\r\n\t\tint pageSize = range.getLength();\r\n\t\tint dataSize = display.getRowCount();\r\n\t\tint endIndex = Math.min(dataSize, pageStart + pageSize /*- 1*/);\r\n\t\tendIndex = Math.max(pageStart, endIndex);\r\n\t\tif(endIndex==0)\r\n\t\t\tpageStart = 0;\r\n\t\telse\r\n\t\t\tpageStart = pageStart + 1;\r\n\t\tString text = formatter.format(pageStart) + \"-\"\r\n\t\t\t\t+ formatter.format(endIndex);\r\n\t\treturn text;\r\n\t}",
"private TransformGroup createTextY(\n\t\tfloat x,\n\t\tfloat z,\n\t\tfloat size,\n\t\tString str,\n\t\tColor3f col) {\n\n\t\t// create the text\n\t\tText2D txt =\n\t\t\tnew Text2D(\n\t\t\t\tstr,\n\t\t\t\tcol,\n\t\t\t\t\"courrier\",\n\t\t\t\t(new Float(300f * size)).intValue(),\n\t\t\t\tFont.BOLD);\n\t\t\n\t\t// make the text two-sided\n\t Appearance app = txt.getAppearance();\n\t PolygonAttributes polyAttrib = new PolygonAttributes();\n\t polyAttrib.setCullFace(PolygonAttributes.CULL_NONE);\n\t polyAttrib.setBackFaceNormalFlip(true);\n\t app.setPolygonAttributes(polyAttrib);\n\n\t\t// move and rotate the text\n\t\tTransform3D translate = new Transform3D();\n\t\ttranslate.set(new Vector3f(x, 0.0f, size + z));\n\n\t\tTransform3D rotate = new Transform3D();\n\t\trotate.rotX(-Math.PI / 2.0d);\n\t\ttranslate.mul(rotate);\n\t\trotate.rotZ(-Math.PI / 2.0d);\n\t\ttranslate.mul(rotate);\n\n\t\tTransformGroup tg = new TransformGroup(translate);\n\n\t\t// apply Transform3D\n\t\ttg.addChild(txt);\n\n\t\treturn tg;\n\t}"
] |
[
"0.6014496",
"0.5954973",
"0.57660043",
"0.56464195",
"0.5603344",
"0.55185956",
"0.5396135",
"0.53850985",
"0.53390956",
"0.5314247",
"0.53035915",
"0.53030825",
"0.5293969",
"0.5274524",
"0.52429163",
"0.52309597",
"0.5228685",
"0.5221377",
"0.51848596",
"0.5126957",
"0.5075013",
"0.5046438",
"0.50248015",
"0.5019448",
"0.49991202",
"0.49797297",
"0.49727076",
"0.49542642",
"0.49483484",
"0.49471453",
"0.49403512",
"0.49364454",
"0.49361736",
"0.4935029",
"0.49350107",
"0.49338165",
"0.49250102",
"0.49212974",
"0.4918832",
"0.4891541",
"0.48881176",
"0.48792058",
"0.48751694",
"0.4875064",
"0.4861879",
"0.4852171",
"0.48507175",
"0.48336765",
"0.48277214",
"0.48128128",
"0.4804895",
"0.47988677",
"0.47972536",
"0.47959423",
"0.47938475",
"0.47896296",
"0.47885352",
"0.47815946",
"0.47702432",
"0.4758373",
"0.474288",
"0.47330403",
"0.47254482",
"0.4712789",
"0.47042632",
"0.47007692",
"0.4697058",
"0.4695093",
"0.46844053",
"0.46830803",
"0.4681297",
"0.46793008",
"0.46575397",
"0.46515647",
"0.46486667",
"0.46317935",
"0.4627386",
"0.4616196",
"0.4616196",
"0.4616196",
"0.4616196",
"0.46159488",
"0.4611802",
"0.46117213",
"0.4604211",
"0.46035004",
"0.46033746",
"0.46007317",
"0.46005926",
"0.45956874",
"0.45922366",
"0.458089",
"0.45802802",
"0.45760465",
"0.45721632",
"0.45701098",
"0.45602632",
"0.4552102",
"0.45504212",
"0.4548911"
] |
0.5994228
|
1
|
Checks whether the stamp object contains the essential information to be processed by the server.
|
private void checkStampObjectValidity(Stamp stamp) {
// check provided arguments
if (stamp == null) {
throw new Pdf4meClientException("The stamp parameter cannot be null.");
} else if (stamp.getDocument() == null || stamp.getDocument().getDocData() == null) {
throw new Pdf4meClientException("The stamp document cannot be null.");
} else if (stamp.getStampAction() == null) {
throw new Pdf4meClientException("The stampAction cannot be null.");
} else if (stamp.getStampAction().getAlpha() == null) {
throw new Pdf4meClientException("The alpha parameter of stampAction cannot be null.");
} else if (stamp.getStampAction().getText() == null && stamp.getStampAction().getImage() == null) {
throw new Pdf4meClientException("The image and text parameter of stampAction cannot both be null.");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"boolean hasData()\n {\n logger.info(\"server: \" + server + \" addr: \" + addr + \"text:\" + text);\n return server != null && addr != null && text != null;\n }",
"public boolean hasTimestamp() {\n return timestamp_ != null;\n }",
"boolean hasStartingInfo();",
"public boolean isGivingInformation();",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public boolean hasKeyComponents(){\n\n // Event is valid if it has an event name date\n if(event == null || date == 0 || startTime == null || endTime == null){\n return false;\n }\n return true;\n }",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }",
"public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }",
"public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }",
"public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }",
"private boolean checkTimeStamp(File file) {\n // uses sharedpreferences\n return (lastUpdate < file.getModifiedDate().getValue());\n }",
"public boolean hasTimestamp() {\n return result.hasTimestamp();\n }",
"private boolean adjustedTimeIsSet() {\n return (adjustedTimeStamp != null);\n }",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }",
"private boolean isPackValid() {\n\t\treturn (logData != null\n\t\t\t\t&& logData.entries != null\n\t\t\t\t&& logData.entries.size() > 1);\n\t}",
"public boolean isSetTServerInfo() {\n return this.tServerInfo != null;\n }",
"public boolean hasTsUpdate() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"private boolean verify_AdjustedTimeIsSet() {\n \n boolean res = adjustedTimeIsSet();\n \n try {\n\n if (!res) {\n throw new Exception(\"Cannot provide data related to 'adjusted timestamp'\"\n + \" until it has been generated by a successful call to\"\n + \" `adjust(Shift)`. Data passed may be incorrect.\");\n }\n \n } catch(Exception e) {\n System.err.println(e.toString());\n }\n \n return res;\n \n }",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTimestamp();",
"boolean hasTelemetry();",
"public boolean isMissingData() {\n return myModel.getRealtimeTimestamp() == 0;\n }",
"public boolean hasTimestamp() {\n return fieldSetFlags()[6];\n }",
"public boolean hasTimestamp() {\n return fieldSetFlags()[2];\n }",
"public boolean hasEventTimestamp() {\n return fieldSetFlags()[14];\n }",
"public boolean hasInstant() {\n return instant_ != null;\n }",
"boolean hasTsUpdate();",
"public abstract boolean hasWarning();",
"protected boolean checkIfAdditionalInfo(NbaDst work) {\n\t\tif (A_WT_TEMP_REINSURANCE.equals(work.getWorkType()) && !work.getNbaSources().isEmpty()) {\n\t\t\tList sources = work.getNbaSources();\n\t\t\tfor(int i=0; i<sources.size();i++) {\n\t\t\t\tNbaSource nbaSource = (NbaSource) work.getNbaSources().get(i);\n\t\t\t\tif(A_ST_REINSURANCE_XML_TRANSACTION.equals(nbaSource.getSourceType())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"static boolean isTimeStampValid(String timestamp) {\n return parseTimeStamp(timestamp) != null;\n }",
"boolean hasExtra();",
"@Override\n\tpublic boolean checkData() {\n\t\treturn false;\n\t}",
"public boolean isSetUpdate_time() {\n return this.update_time != null;\n }",
"private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }",
"public boolean hasInstant() {\n return instantBuilder_ != null || instant_ != null;\n }",
"boolean hasWarnings();",
"public boolean hasWarnings(){\n\t\treturn ! warningList.isEmpty();\n\t}",
"boolean hasSendTime();",
"boolean hasObjectTrackingConfig();",
"public boolean isUsefulReport() {\n if (metadata_ == null) {\n return false;\n }\n return capturedLogContent_ != null && !capturedLogContent_.isEmpty();\n }",
"public static boolean isSigned_infos_timestamp() {\n return false;\n }",
"boolean hasCollectEndTime();",
"public boolean hasWarning() {\n\t\treturn !fdpVisaAgentBool() || !fdpVisaDirecBool() || !fdpVisaRespBool();\n\t}",
"private boolean checkFields() {\n\t\tboolean status = true;\n\n\t\treturn status;\n\t}",
"boolean hasCoordInfo();",
"boolean hasErrorTime();",
"public boolean hasTimestamp() {\n return fieldSetFlags()[0];\n }",
"public boolean hasTelemetry() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"public boolean hasTelemetry() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"boolean hasUknown();",
"public boolean isSetExtraDataMap() {\n return this.extraDataMap != null;\n }",
"@Override\n public boolean isGivingInformation() {\n return true;\n }",
"boolean hasUsage();",
"public boolean hasInfos(){\n return infos != null;\n }",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"@java.lang.Override\n public boolean hasAdTimeOffset() {\n return adTimeOffset_ != null;\n }",
"protected boolean checkBioScarso() {\n return bioService.count() < BIO_NEEDED_MINUMUM_SIZE;\n }",
"@Override\r\n\tpublic boolean checkIfOnTraineeship() {\n\t\treturn false;\r\n\t}",
"public boolean hasTsUpdate() {\n return fieldSetFlags()[11];\n }",
"boolean hasSubmitTime();",
"protected boolean isValidWaterHeaterStatus(byte[] edt) {\n\t\tif(edt == null || !(edt.length == 1)) return false;\n\t\treturn true;\n\t}",
"public boolean hasUseTime() {\n return useTime_ != null;\n }",
"public boolean hasUseTime() {\n return useTime_ != null;\n }",
"public boolean statsRecorded() {\n\t\treturn !handStats.isEmpty();\n\t}",
"public boolean hasCoordInfo() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasCoordInfo() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasWarnings() {\n return !warnings.isEmpty();\n }",
"public static boolean m21423z(Context context) {\n List queryUsageStats = ((UsageStatsManager) context.getSystemService(\"usagestats\")).queryUsageStats(4, 0, System.currentTimeMillis());\n return queryUsageStats != null && !queryUsageStats.isEmpty();\n }",
"boolean isInfoEnabled();",
"private boolean isTimeToDumpAgain() {\n return (!getSettings().isSituationChangeOnly() || !isPreviousCheckFailed()) && (getLastThreadDumpTime() == 0 ||\n getLastThreadDumpTime() + TimeUnit.MINUTES.toMillis(getSettings().getMinutesBetweenThreadDumps()) <\n System.currentTimeMillis());\n }",
"public boolean hasEntries(){\n\t\treturn ! errorList.isEmpty();\n\t}",
"@java.lang.Override\n public boolean hasUpdateTime() {\n return updateTime_ != null;\n }",
"boolean hasTimeBoltHBoltE();",
"private boolean isSeedsInfoUpdated(String tDate){\n \treturn mSharedPref.getBoolean(tDate,false); \t\n }",
"boolean hasInstant();",
"void hasNewData(CheckPoint checkPoint);",
"boolean hasContainerTimestamp();",
"public boolean isSetTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(TIME$2) != 0;\n }\n }",
"public boolean isSetCreateTimestamp() {\n return EncodingUtils.testBit(__isset_bitfield, __CREATETIMESTAMP_ISSET_ID);\n }",
"boolean hasHas_certainty();",
"private boolean hasTimeSig (Measure measure)\r\n {\r\n for (Staff.SystemIterator sit = new Staff.SystemIterator(measure);\r\n sit.hasNext();) {\r\n Staff staff = sit.next();\r\n\r\n if (sit.getMeasure()\r\n .getTimeSignature(staff) != null) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }"
] |
[
"0.611871",
"0.591518",
"0.58263874",
"0.5820407",
"0.57655996",
"0.57286674",
"0.5725403",
"0.5720894",
"0.56928027",
"0.56878024",
"0.56868696",
"0.5654352",
"0.5641166",
"0.5627321",
"0.5627321",
"0.56181264",
"0.5608377",
"0.5608377",
"0.56074363",
"0.5590625",
"0.55593187",
"0.55420625",
"0.5536303",
"0.55350304",
"0.5521813",
"0.5510842",
"0.5505693",
"0.5505693",
"0.5505693",
"0.5505693",
"0.5505693",
"0.5505693",
"0.5505693",
"0.55012625",
"0.5499203",
"0.5488392",
"0.54812723",
"0.54764444",
"0.5452329",
"0.5430523",
"0.5418453",
"0.54091984",
"0.5405164",
"0.53899056",
"0.5340655",
"0.53322846",
"0.5321287",
"0.53123826",
"0.53110766",
"0.53095317",
"0.5304589",
"0.5300806",
"0.5296646",
"0.5273753",
"0.52691084",
"0.5267543",
"0.52666396",
"0.52652895",
"0.52562994",
"0.5250367",
"0.52412766",
"0.5236231",
"0.52320945",
"0.52319366",
"0.5217761",
"0.5213569",
"0.5210042",
"0.5206963",
"0.5206963",
"0.5206963",
"0.5206963",
"0.5206963",
"0.5206963",
"0.5206963",
"0.5203152",
"0.51972973",
"0.5194245",
"0.51937664",
"0.5192439",
"0.5189248",
"0.5186658",
"0.5186658",
"0.5185538",
"0.5184505",
"0.5180445",
"0.5178764",
"0.5178523",
"0.51762265",
"0.51669466",
"0.5163794",
"0.51632416",
"0.51557124",
"0.5152803",
"0.5146392",
"0.51415306",
"0.5130676",
"0.5128992",
"0.5127085",
"0.51263803",
"0.5125876"
] |
0.72110975
|
0
|
constructor of the utility class
|
public static String[] getDescribes(){
boolean haveNull = false;
for(int i=0 ; i<NUMBER_OF_COMPONENTS ; i++){
if( !notNull(i) ){
haveNull = true;
break;
}
}
if( haveNull ){
readShapes();
}
return Arrays.copyOf(describes, describes.length);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Utils() {}",
"private Util() { }",
"public Utils() {\n }",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Util() {\n }",
"private Util() {\n }",
"private Util() {\n }",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"private Utility() {\n\t}",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private OMUtil() { }",
"private CollectionUtils() {\n\n\t}",
"public ObjectUtils() {\n super();\n }",
"private RunUtils() {\n }",
"private XMLUtils()\r\n\t{\r\n\t}",
"private CLUtil()\n {\n }",
"private Utility() {\n throw new IllegalAccessError();\n }",
"private IOUtilities() {\n }",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private WolUtil() {\n }",
"private ClassUtil() {}",
"private XMLUtil() {\n\t}",
"public ResourceUtils() {\r\n //stub\r\n }",
"public ExceptionUtils()\n {\n // nothing to do\n }",
"protected VboUtil() {\n }",
"private J2EEUtils() {\n }",
"private JacobUtils() {}",
"private ClimateAlertUtils() {\n }",
"private DiagnosticMessageUtilities()\n {\n }",
"private NetUtils() {\r\n\t}",
"private SnapshotUtils() {\r\n\t}",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private UtilityKlasse() {\n\n }",
"private FunctionUtils() {\n }",
"protected CombinatoricsUtils() {\n super();\n }",
"private XhtmlUtils()\n\t{\n\t}",
"private XMLUtils() {\n }",
"private SysUtils(){}",
"private GeoUtil()\n\t{\n\t}",
"private LangUtilities() {\n }",
"public XMLUtils() {\r\n\t\tsuper();\r\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}",
"private NumberUtil()\n {\n\tLog.getInstance().error(\"This Class is utility class cannot be instantiated\");\n }",
"private DataProviderUtils() {\n }",
"private XMLUtil()\n {\n }",
"private VlcUtils()\n {\n \n }",
"private SupplierLoaderUtil() {\n\t}",
"private BuilderUtils() {}",
"protected HadoopUtils() { }",
"private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }",
"private CreateDateUtils()\r\n\t{\r\n\t}",
"private FileUtility() {\r\n\t}",
"private Helper() {\r\n // empty\r\n }",
"private ModuleUtil()\n {\n }",
"private InstanceUtil() {\n }",
"private ProcessorUtils() { }",
"private JsonUtils() {\n\t\tsuper();\n\t}",
"private ValidationUtils() {}",
"private CheckUtil(){ }",
"private XmlUtil() {\n }",
"private BeanUtils() {\n\t\t\n\t}",
"private CheckingTools() {\r\n super();\r\n }",
"private StringUtil() {\n\t\tsuper();\n\t}",
"public TypeUtils() {\n\t}",
"private RestUtil() {\n\t}",
"private KubevirtNetworkingUtil() {\n }",
"private TriggerUtils() {\n }",
"private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }",
"private StringUtilities() {\n // nothing to do\n }",
"private JarUtils() {\n }",
"private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }",
"private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}",
"private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }",
"private OspfConfigUtil() {\n\n }",
"private RdfFormatUtils() {\n }",
"private StringUtil() {\n }",
"private UIUtils() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"private FeedbackUtils() {\n }",
"private StringUtil() {\n\n }",
"private AuthenticationUtil(){\r\n //utility class\r\n }",
"public JSONUtils() {\n\t\tsuper();\n\t}",
"private ZipUtils() {\n }",
"public PageUtil() {\n\n\t}",
"private StringUtils() {\n }",
"private StringUtils() {\n }",
"private StringUtils() {\n }",
"private StringUtils() {\n }",
"private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private UtilsCache() {\n\t\tsuper();\n\t}"
] |
[
"0.8345655",
"0.8314651",
"0.8207921",
"0.8131061",
"0.8116878",
"0.8116878",
"0.8116878",
"0.8116878",
"0.8096726",
"0.8096726",
"0.80784345",
"0.8029246",
"0.8027941",
"0.8015441",
"0.8015441",
"0.7940328",
"0.7940328",
"0.7940328",
"0.7940328",
"0.7940328",
"0.7744219",
"0.7737234",
"0.76410663",
"0.7552285",
"0.7541323",
"0.7480213",
"0.7468508",
"0.7446086",
"0.7436326",
"0.74318886",
"0.7422281",
"0.742156",
"0.7409131",
"0.73988783",
"0.73933136",
"0.7377108",
"0.7370624",
"0.73691744",
"0.73618376",
"0.73547244",
"0.7354063",
"0.73455006",
"0.7340147",
"0.73300827",
"0.732021",
"0.7319983",
"0.73178464",
"0.7314284",
"0.7314084",
"0.7313552",
"0.7298447",
"0.7284893",
"0.7282413",
"0.7271067",
"0.72658676",
"0.72627574",
"0.7260693",
"0.7255181",
"0.72495836",
"0.7246011",
"0.72445536",
"0.7243889",
"0.7233792",
"0.72262967",
"0.7225516",
"0.72179836",
"0.7216526",
"0.7204717",
"0.7201025",
"0.71884006",
"0.7184",
"0.7175811",
"0.7174378",
"0.7173049",
"0.7172785",
"0.71693087",
"0.7163931",
"0.7160787",
"0.7159919",
"0.715593",
"0.71523905",
"0.7141396",
"0.7118376",
"0.7102284",
"0.70945805",
"0.7087543",
"0.70848674",
"0.7084861",
"0.70841223",
"0.7083456",
"0.7065026",
"0.7061321",
"0.705262",
"0.70444524",
"0.7024529",
"0.7014753",
"0.7014753",
"0.7014753",
"0.7014753",
"0.7012167",
"0.7010048"
] |
0.0
|
-1
|
static final String TXT_FILE_OF_SENTENCES="src/FileToHoI see hellewldSentences";
|
public static void main(String[] args)
{
GUI_Interface gui = new GUI_Interface();
gui.setVisible(true);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static File fMibsTextDir() \r\n\t{\r\n\t\treturn new File(fMibsDir() + File.separator + \"txt\");\t\r\n\t}",
"String transcribeFile(String filePath);",
"public String textExtractor(String filePath) {\n\n StringBuilder textBuilder = new StringBuilder();\n try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/\" + filePath), \"UTF-8\"))) {\n while (bufferedReader.ready()) {\n textBuilder.append(bufferedReader.readLine()).append(\"/n\");\n }\n\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return textBuilder.toString();\n }",
"public List<String> fileToVariable(String path) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new FileReader(path));\n\t\tList<String> sentences = null;\n\t\ttry{\n\t\t\tsentences = Files.readAllLines(new File(path), Charset.forName(\"utf-8\"));\n\t\t} finally {\n\t\t\tbr.close();\n\t\t}\n\t\treturn sentences ;\n\t}",
"public String readTextFromFile()\n\t{\n\t\tString fileText = \"\";\n\t\tString filePath = \"/Users/zcon5199/Documents/\";\n\t\tString fileName = filePath + \"saved text.txt\";\n\t\tFile inputFile = new File(fileName);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tScanner fileScanner = new Scanner(inputFile);\n\t\t\twhile(fileScanner.hasNext())\n\t\t\t{\n\t\t\t\tfileText += fileScanner.nextLine() + \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tfileScanner.close();\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException fileException)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(baseFrame, \"the file is not here :/\");\n\t\t}\n\t\t\n\t\treturn fileText;\n\t}",
"public String getDescription() {\n return \"Text file (.text)\";\n }",
"public String getText()\n{\n //String base = _type==FileType.PACKAGE_DIR? _proj.getPackageName(_file) :\n // _file.isRoot()? _file.getSite().getName() : _file.getName();\n //String prefix = _vc.isModified(_file)? \">\" : \"\";\n //String suffix = _file.isUpdateSet()? \" *\" : \"\";\n //return prefix + base + suffix;\n String text = _file.getName();\n return text.length()>0? text : \"Sample Files\";\n}",
"private void loadText() {\n\t\ttext1 = app.loadStrings(\"./data/imports/TXT 1.txt\");\n\t\ttext2 = app.loadStrings(\"./data/imports/TXT 2.txt\");\n\t}",
"private void get_text() {\n InputStream inputStream = JsonUtil.class.getClassLoader().getResourceAsStream(\"data.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n this.text = sb.toString().trim();\n }",
"public static void writeFile(String msg){\n\t\ttry { \n File f1 = new File(\"/Users/snehithraj/eclipse-workspace/ThreePhaseCommit/src/ServerDB.txt\");\n if(!f1.exists()) {\n f1.createNewFile();\n } \n FileWriter fileWriter = new FileWriter(f1.getName(),true);\n BufferedWriter bw = new BufferedWriter(fileWriter);\n bw.write(msg);\n bw.close();\n } catch(IOException e){\n e.printStackTrace();\n }\n }",
"@Test\n public void testCreateTextFile() {\n System.out.println(\"createTextFile to existing dest Path\");\n String destPath = folder.toString()+fSeparator+\"Texts\"+fSeparator;\n String text = \"qweqweqwewqeqw\";\n String fileName = \"test\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createTextFile(destPath, text, fileName);\n assertEquals(\"Some message\",expResult, result);\n }",
"@Test\n public void testReturnTextFile() throws Exception {\n System.out.println(\"returnTextFile which contains text\");\n String path = folder.toString()+fSeparator+\"Texts\"+fSeparator+\"textFile.txt\";\n FilesDao instance = new FilesDao();\n String expResult = \"textOfTextFile\";\n String result = instance.returnTextFile(path);\n assertEquals(\"Some message\",expResult, result);\n }",
"private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args){\n \tString tempStringLine;\n\n\t\t /* SCANNING IN THE SENTENCE */\n // create a queue called sentenceQueue to temporary store each line of the text file as a String.\n MyLinkedList sentenceList = new MyLinkedList();\n\n // integer which keeps track of the index position for each new sentence string addition.\n int listCount = 0;\n\n // create a new file by opening a text file.\n File file2 = new File(\"testEmail2.txt\");\n try {\n\n \t// create a new scanner 'sc' for the newly allocated file.\n Scanner sc = new Scanner(file2);\n\n // while there are still lines within the file, continue.\n while (sc.hasNextLine()) {\n\n \t// save each line within the file to the String 'tempStringLine'.\n \ttempStringLine = sc.nextLine();\n\n \t// create a new BreakIterator called 'sentenceIterator' to break the 'tempStringLine' into sentences.\n BreakIterator sentenceIterator = BreakIterator.getSentenceInstance();\n\n // Set a new text string 'tempStringLine' to be scanned.\n sentenceIterator.setText(tempStringLine);\n\n // save the first index boundary in the integer 'start'.\n // The iterator's current position is set to the first text boundary.\n int start = sentenceIterator.first();\n\n // save the boundary following the current boundary in the integer 'end'.\n for(int end = sentenceIterator.next();\n\n \t// while the end integer does not equal 'BreakIterator.DONE' or the end of the boundary.\n \tend != BreakIterator.DONE;\n\n \t// set the start integer equal to the end integer. Set the end integer equal to the next boundary.\n \tstart = end, end = sentenceIterator.next()){\n\n \t// create a substring of tempStringLine of the start and end boundsries, which are just Strings of\n \t// each sentence.\n \tsentenceList.add(listCount,tempStringLine.substring(start, end));\n\n \t// add to the count.\n \tlistCount++;\n }\n }\n\n // close the scanner 'sc'.\n sc.close(); \n\n // if the file could not be opened, throw a FileNotFoundException.\n }catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n\t\tsentenceProcessor one = new sentenceProcessor(sentenceList);\n\t\tString[] names = one.findNames();\n System.out.println(\"Speaker \" + names[0]);\n System.out.println(\"Subject \" + names[1]);\n\t}",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"String readText(FsPath path);",
"@Test\n public void whenReadFileThenResultLinesFromFile() {\n Cache cache = new Cache(\"c:/temp\");\n String result = cache.readFile(\"names.txt\");\n assertThat(result, is(String.format(\"Ivan%sVictor%sPetr%s\", sep, sep, sep)));\n }",
"public String iterateThroughArrayList_SentencesInFile(ArrayList<String> arr){\n\t\tString p = \"\";\n\t\tIterator itr = arr.iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tp += (itr.next() + \" /// \");\n\t\t}\n\t\treturn p;\n\t}",
"public void readText(String filename) throws IOException{\n\t\t\n\t\tif(sentences == null){\n\t\t\tsentences = new ArrayList<Sentence>();\n\t\t}\n\t\t\n\t\t//read from file\n\t\tFileInputStream inputStream = new FileInputStream(filename);\n\t\tDataInputStream stream = new DataInputStream(inputStream);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n\t\tString line;\n\t\twhile((line = reader.readLine()) != null){\n\t\t\tsentences.add(new Sentence(line));\n\t\t}\n\t\treader.close();\n\t\tstream.close();\n\t\tinputStream.close();\n\t\t\n\t\t\n\t}",
"public static Path getTextsDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null)).resolve(TEXTS_DIR);\n\t}",
"public String generateJsonFileFromParsedTextFileInApp() {\n\t\treturn generateJsonFileFromParsedTextFile(TEXTSAMPLEFILE);\n\t}",
"public String getFileText(String filePath) {\n String fileText = \"\"; \n \n File myFile = new File(filePath);\n Scanner myReader; \n \n try {\n myReader = new Scanner(myFile);\n \n while(myReader.hasNext()) {\n fileText+= myReader.nextLine() + \"\\n\"; \n }\n \n } catch (FileNotFoundException ex) {\n logger.log(Level.SEVERE, \"Error getting text from text file\", ex.getMessage()); \n }\n \n return fileText; \n }",
"private void openNlpSentSplitter(String source) throws InvalidFormatException, IOException {\n\t\tString paragraph = \"Hi. How are you? This is Mike. This is Elvis A. A cat in the hat. The type strain is KOPRI 21160T (= KCTC 23670T= JCM 18092T), isolated from a soil sample collected near the King Sejong Station on King George Island, Antarctica. The DNA G+ C content of the type strain is 30.0 mol%.\";\r\n\r\n\t\tInputStream modelIn = new FileInputStream(source);\r\n\r\n\t\ttry {\r\n\t\t // SentenceModel model = new SentenceModel(modelIn);\r\n\t\t\t// InputStream is = new FileInputStream(myConfiguration.getOpenNLPTokenizerDir());\r\n\t\t\t\r\n\t\t\tSentenceModel model = new SentenceModel(modelIn);\r\n\t\t\tSentenceDetectorME sdetector = new SentenceDetectorME(model);\r\n\t\t\tString sentences[] = sdetector.sentDetect(paragraph);\r\n\t\t\tfor ( int i = 0; i < sentences.length; i++ ) {\r\n\t\t\t\tSystem.out.println(sentences[i]);\r\n\t\t\t}\r\n\t\t\tmodelIn.close();\t\t \r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t if (modelIn != null) {\r\n\t\t try {\r\n\t\t modelIn.close();\r\n\t\t }\r\n\t\t catch (IOException e) {\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t}",
"private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n return contentBuilder.toString();\n }",
"public void salvaPartita(String file) {\n\r\n }",
"public static ImmutableList<File> oneMillionSentencesTokenizedFiles() {\n for (File file : ONE_MILLION_SENTENCES_TOKENIZED_FILES) {\n checkFileExistsAndReadable(file);\n }\n\n return ONE_MILLION_SENTENCES_TOKENIZED_FILES;\n }",
"String getNoticeFileContent();",
"public String getLocalText(String fileName){\n\t\t\tString r = \"\";\n\t\t\tint BUFFER_SIZE = 2000;\n\t \tif(fileName.length() > 1){\n\t \t\ttry{\n\t \t \tFileInputStream fin = openFileInput(fileName);\n\t \t \tif(fin != null){\n \t \t \t\tInputStreamReader isr = new InputStreamReader(fin);\n \t \t \tint charRead;\n\t \t \tchar[] inputBuffer = new char[BUFFER_SIZE]; \n\t \t \ttry{\n\t \t \twhile ((charRead = isr.read(inputBuffer))>0){ \n\t \t \t\tString readString = String.copyValueOf(inputBuffer, 0, charRead); \n\t \t \tr += readString;\n\t \t \tinputBuffer = new char[BUFFER_SIZE];\n\t \t \t}\n\t \t \tfin.close();\n\t \t \t}catch(IOException e){\n\t \t \t\tr = \"\";\n\t \t\tLog.i(\"ZZ\", \"AppDelegate:getLocalText: ERROR - 1: \" + e.getMessage()); \n\t \t \t} \t \t \t\n\t \t \t}\n\t \t}catch (Exception je){\n\t \t\tr = \"\";\n \t\t//Log.i(\"ZZ\", \"AppDelegate:getLocalText: ERROR - 2: \" + je.getMessage()); \n\t \t}\n\t \t}else{\n\t \t\tr = \"\";\n\t \t}\n \t\t//Log.i(\"ZZ\", \"AppDelegate:getLocalText: \" + fileName); \n\t return r;\n\t\t}",
"private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n\n return contentBuilder.toString();\n }",
"public static void main(String[] args) throws Exception {\n \n\n\t File pasta = new File(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\phishing\");\n\t \n\t File[] arquivos = pasta.listFiles();\n\t \n\t \n\t for (File file : arquivos) {\n\t\t System.out.println(file.getName()+ \"\tphishing\");\n\t }\n\t \n\t File pasta1 = new File(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\not_phishing\");\n\t \n\t File[] arquivos1 = pasta1.listFiles();\n\t \n\t \n\t for (File file : arquivos1) {\n\t\t if(!file.isDirectory()){\n\t\t\t System.out.println(file.getName()+ \"\tnot_phishing\"); \n\t\t }\t\t \n\t }\n\t \n//\t FileReader m = new FileReader(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\EMAIL000240\");\n//\n//\t\tStringBuffer text = new StringBuffer();\n//\t\tint l;\n//\t\twhile ((l = m.read()) != -1) {\n//\t\t\ttext.append((char) l);\n//\t\t}\n//\t\tm.close();\n//\t\t\n//\t\tString texto = text.toString();\n//\t\t\n//\t\tSystem.out.println(texto);\n//\t\tSystem.out.println(\"#########################################################################################################\");\n//\t\tSystem.out.println(\"############################################### NOVO TEXTO ##############################################\");\n//\t\tSystem.out.println(\"#########################################################################################################\");\n//\t\tString texto1 = texto.replaceAll(\"<.*?>\", \"\");\n//\t\ttexto1 = texto1.replaceAll(\"<.*?>\", \"\");\n//\t\ttexto1 = texto1.replaceAll(\"[0-9]\", \"\");\n//\t\tSystem.out.println(texto1);\n\t \n\t\t\n\t\t \n\t \n\t \n }",
"public static void main(String[] args) throws FileNotFoundException {\n\n Logger file = new Logger(\"/home/vladimir/text.txt\");\n\n file.log(\"dikie sobaki\");\n file.end();\n\n\n }",
"public static String textToString( String fileName )\n { \n String temp = \"\";\n try {\n Scanner input = new Scanner(new File(fileName));\n \n //add 'words' in the file to the string, separated by a single space\n while(input.hasNext()){\n temp = temp + input.next() + \" \";\n }\n input.close();\n \n }\n catch(Exception e){\n System.out.println(\"Unable to locate \" + fileName);\n }\n //make sure to remove any additional space that may have been added at the end of the string.\n return temp.trim();\n }",
"private static void dosyaYazici(String text)\n {\n File log = new File(\"log.txt\");\n try\n {\n if (!log.exists())\n {\n log.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(log,true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.append(text+\"\\n\");\n bufferedWriter.close();\n //System.out.print(\"TEST\");\n }\n catch (IOException e)\n {\n System.out.print(\"DOSYA HATASI!\");\n e.printStackTrace();\n }\n\n }",
"private static String lookForSentenceWhichContains(String[] words, String documentPath) throws IOException {\r\n\r\n File document = new File(documentPath);\r\n\r\n if (!document.exists()) throw new FileNotFoundException(\"File located at \"+documentPath+\" doesn't exist.\\n\");\r\n\r\n FileReader r = new FileReader(document);\r\n BufferedReader br = new BufferedReader(r);\r\n\r\n String line;\r\n String documentText = \"\";\r\n while ( (line=br.readLine()) != null) {\r\n documentText += line;\r\n }\r\n\r\n documentText = Jsoup.parse(documentText).text();\r\n\r\n String[] listOfSentences = documentText.split(\"\\\\.\");\r\n HashMap<String,String> originalToNormalized = new HashMap<>();\r\n String original;\r\n\r\n for (String sentence: listOfSentences){\r\n\r\n original = sentence;\r\n\r\n sentence = sentence.toLowerCase();\r\n sentence = StringUtils.stripAccents(sentence);\r\n sentence = sentence.replaceAll(\"[^a-z0-9-._\\\\n]\", \" \");\r\n\r\n originalToNormalized.put(original,sentence);\r\n }\r\n\r\n int matches, maxMatches = 0;\r\n String output = \"\";\r\n\r\n for (Map.Entry<String,String> sentence: originalToNormalized.entrySet()){\r\n\r\n matches = 0;\r\n\r\n for (String word: words){\r\n if (sentence.getValue().contains(word)) matches++;\r\n }\r\n\r\n if (matches == words.length) return sentence.getKey();\r\n if (matches > maxMatches){\r\n maxMatches = matches;\r\n output = sentence.getKey();\r\n }\r\n }\r\n\r\n return output;\r\n\r\n }",
"private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n\n return contentBuilder.toString();\n }",
"private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(contentBuilder::append);\n }\n return contentBuilder.toString();\n }",
"public static ArrayList<String> sentenceTokenizer(String filename) throws FileNotFoundException{\n \n ArrayList<String> sentenceList = new ArrayList<String>();\n \n Scanner sc = new Scanner(new File(filename));\n \n String token;\n String sentence = \"\";\n while(sc.hasNext()){\n \n token = sc.next();\n sentence += \" \" + token + \" \";\n \n if(!sc.hasNext()){\n sentenceList.add(sentence.trim());\n break;\n }\n \n if(token.endsWith(\".\")){\n sentence = sentence.trim();\n sentenceList.add(sentence);\n sentence = \"\";\n }\n \n }\n \n sc.close();\n \n return sentenceList;\n \n }",
"public static void main(String[] args) {\n String filePath = \"C:\\\\Users\\\\Catalin\\\\Desktop\\\\fisierdecitit.txt\";\n\n try {\n //incarcarea fisierului in memoria programului cu ajutorul ob fileReader\n FileReader fileReader = new FileReader(filePath);\n //incepem citirea din fisier linie cu line cu ajutorul BufferedReader\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String text = bufferedReader.readLine();\n while (text != null) {\n System.out.println(\"Linia citita este: \" + text);\n String[] array = text.split(\" \");\n System.out.println(array.length);\n text = bufferedReader.readLine();\n\n }\n\n } catch (IOException e) {\n System.out.println(\"A aparut o eroare: \" + e.getMessage());\n }\n\n\n //invatam sa scriem intr un fisier\n String filePathToWrite = \"C:\\\\Users\\\\Catalin\\\\Desktop\\\\fisierdescris.txt\";\n try {\n FileWriter fileWriter = new FileWriter(filePathToWrite);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n String text = \"Mama lu' Ana nu are nici mere si nici pere.\";\n String text2 = \"smhjhdgfdsbfkdhj\";\n\n bufferedWriter.write(text2);\n bufferedWriter.newLine();\n bufferedWriter.write(text);\n bufferedWriter.flush();\n bufferedWriter.close();\n } catch (IOException e) {\n System.out.println(\"A aparut o exceptie: \" + e.getMessage());\n }\n\n\n }",
"public n501070324_PedidosAssistencia() {\n super(\"Pedidos.txt\");\n }",
"public void addSpeechFile(String text, String filename) {\n mSelf.addSpeech(text, filename);\n }",
"public static void main(String[] args) throws IOException {\n\t\t\r\n File file = new File(\"C:\\\\Users\\\\balaji\\\\Desktop\\\\commons\\\\commons-io-2.6\\\\text file\\\\text1.txt\");\r\n\t\t\r\n\t\tFileUtils.write(file, \"Learning is Growing\", \"UTF-8\", false);\r\n\r\n\r\n\t}",
"private String readAndReplaceString(String fileName, String packageName, String className) {\n String baseFilePath = \"com.bgn.baseframe.base\";\n\n String time = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\").format(new Date());\n String path = (codeType == 0 ? \"kotlin/\" : \"java/\");\n return readFile(path + fileName + \".txt\")\n .replace(\"&time&\", time)\n .replace(\"&package&\", packageName)\n .replace(\"&mvp&\", baseFilePath)\n .replace(\"&className&\", className);\n }",
"public static void main(String[] args) throws FileNotFoundException {\n\t\tString modelFilePath = \"java//opennlpmodels//en-sent.bin\";\n\t\tInputStream modelIn = new FileInputStream(modelFilePath);\n\n\t\ttry {\n\t\t SentenceModel model = new SentenceModel(modelIn);\n\t\t SentenceDetectorME sentenceDetector = new SentenceDetectorME(model);\n\t\t String sentences[] = sentenceDetector.sentDetect(\" First sentence. Second B.S. U.S. sentence. \");\n\t\t \n\t\t for (String sent : sentences ) {\n\t\t\t System.out.println(sent);\n\t\t }\n\t\t \n\t\t}\n\t\tcatch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t if (modelIn != null) {\n\t\t try {\n\t\t modelIn.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t }\n\t\t }\n\t\t}\n\t}",
"public void saveText(String conversation, boolean appendToEnd)\n\t{\n\t\tString fileName = \"/Users/zcon5199/Documents/saved text.txt\";\n\t\tPrintWriter outputWriter;\n\t\t\n\t\tif(appendToEnd)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\toutputWriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName, true)));\n\t\t\t\toutputWriter.append(conversation);\n\t\t\t\toutputWriter.close();\n\t\t\t}\n\t\t\tcatch(FileNotFoundException noExistingFile)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, \"there is no file there :(\");\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, noExistingFile.getMessage());\n\t\t\t}\n\t\t\tcatch(IOException inputOutputError)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, \"there is no file there :(\");\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, inputOutputError.getMessage());\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\toutputWriter = new PrintWriter(fileName);\n\t\t\t\toutputWriter.println(conversation);\n\t\t\t\toutputWriter.close();\n\t\t\t}\n\t\t\tcatch(FileNotFoundException noFileIsThere)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(baseFrame, \"there is no file there :(\");\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"String getFileOutput();",
"public void concatePlainText(String[] filenames, String desFileName) {\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(desFileName));\n //StringBuffer buffer=new StringBuffer();\n for (String filename : filenames) {\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String str;\n while ((str = reader.readLine()) != null) {\n // buffer.append(str);\n writer.write(str);\n writer.newLine();\n }\n reader.close();\n }\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void test(){\n\t\tFile srcFile = new File(\"E:\\\\Workspaces\\\\MyPro\\\\ssh\\\\WebRoot\\\\products\\\\2\\\\男鞋\");\n//\t\tSystem.out.println(ss);\n\t\tthis.getAllJavaFilePaths(srcFile);\n\t}",
"public void logCNStr(String words, String fileName) {\n\t\ttry {\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(\n\t\t\t\t\tnew FileOutputStream(\"log//\" + fileName), \"utf-8\");\n\t\t\tosw.write(words);\n\t\t\tosw.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t}\n\t}",
"public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }",
"private void saveTextToFile(String content, File file) {\n try {\n PrintWriter writer;\n writer = new PrintWriter(file);\n writer.println(content);\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private static String m14291b(File file, String str) {\n if (file == null || TextUtils.isEmpty(str)) {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n sb.append(file.getAbsolutePath());\n sb.append(File.separator);\n sb.append(str);\n return sb.toString();\n }",
"private void fileModify(String text) throws IOException {\n text += \"\\n\";\n try {\n File filePath;\n filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);\n if (!filePath.exists()) {\n if (filePath.mkdir()) ; //directory is created;\n }\n\n fileOutputStream = new FileOutputStream(file);\n fileOutputStream.write(text.getBytes());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n fileOutputStream.flush();\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"public void writeDocumentForA(String filename, String path) throws Exception\r\n\t{\n\t\tFile folder = new File(path);\r\n\t\tFile[] listOfFiles = folder.listFiles();\r\n\t \r\n\t \r\n\t \tFileWriter fwText;\r\n\t\tBufferedWriter bwText;\r\n\t\t\r\n\t\tfwText = new FileWriter(\"C:/Users/jipeng/Desktop/Qiang/updateSum/TAC2008/Parag/\"+ filename+\"/\" +\"A.txt\");\r\n\t\tbwText = new BufferedWriter(fwText);\r\n\t\t\r\n\t \tfor ( int i=0; i<listOfFiles.length; i++) {\r\n\t \t\t//String name = listOfFiles[i].getName();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString text = readText(listOfFiles[i].getAbsolutePath());\r\n\t\t\t\r\n\t\t\tFileWriter fwWI = new FileWriter(\"C:/pun.txt\");\r\n\t\t\tBufferedWriter bwWI = new BufferedWriter(fwWI);\r\n\t\t\t\r\n\t\t\tbwWI.write(text);\r\n\t\t\t\r\n\t\t\tbwWI.close();\r\n\t\t\tfwWI.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<List<HasWord>> sentences = MaxentTagger.tokenizeText(new BufferedReader(new FileReader(\"C:/pun.txt\")));\r\n\t\t\t\r\n\t\t\t//System.out.println(text);\r\n\t\t\tArrayList<Integer> textList = new ArrayList<Integer>();\r\n\t\t\t\r\n\t\t\tfor (List<HasWord> sentence : sentences)\r\n\t\t\t {\r\n\t\t\t ArrayList<TaggedWord> tSentence = tagger.tagSentence(sentence);\r\n\t\t\t \r\n\t\t\t for(int j=0; j<tSentence.size(); j++)\r\n\t\t\t {\r\n\t\t\t \t \tString word = tSentence.get(j).value();\r\n\t\t\t \t \t\r\n\t\t\t \t \tString token = word.toLowerCase();\r\n\t\t\t \t \r\n\t\t\t \t \tif(token.length()>2 )\r\n\t\t\t\t \t{\r\n\t\t\t \t\t\t if (!m_EnStopwords.isStopword(token)) \r\n\t\t\t \t\t\t {\r\n\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t\t\t if (word2IdHash.get(token)==null)\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t textList.add(id);\r\n\t\t\t\t\t\t\t\t\t // bwText.write(String.valueOf(id)+ \" \");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t word2IdHash.put(token, id);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t allWordsArr.add(token);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t id++;\r\n\t\t\t\t\t\t\t\t } else\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t \tint wid=(Integer)word2IdHash.get(token);\r\n\t\t\t\t\t\t\t\t \tif(!textList.contains(wid))\r\n\t\t\t\t\t\t\t\t \t\ttextList.add(wid);\r\n\t\t\t\t\t\t\t\t \t//bwText.write(String.valueOf(wid)+ \" \");\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t \t}\r\n\t\t\t \t }\r\n\t\t\t }\r\n\t\t\tCollections.sort(textList);\r\n\t\t \r\n\t\t\tString text2 = valueFromList(textList);\r\n\t\t bwText.write(text2);\r\n\t\t //System.out.println(text2);\r\n\t\t bwText.newLine();\r\n\t\t textList.clear();\r\n\t\t \r\n\t \t}\r\n\t \tbwText.close();\r\n\t fwText.close();\r\n\t}",
"public static void main(String[] args) {\n byte[] content = null;\n try {\n content = Files.readAllBytes(new File(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\diemkhang\\\\test reader\\\\introduce.txt\").toPath());\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(new String(content));\n }",
"private void saveChatMessagesInFile() {\n\n if (chatMessages.isEmpty()) {\n return;\n }\n chatMessageFileName = utils.getUserName() + chatPartner + \"TutorscoutChatMessages\";\n\n StringBuilder messagesString = new StringBuilder();\n\n\n for (ChatMessage message : chatMessages) {\n messagesString.append(message.toString());\n }\n\n\n try {\n\n FileOutputStream fos = getContext().openFileOutput(chatMessageFileName, Context.MODE_PRIVATE);\n fos.write(messagesString.toString().getBytes());\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Test\r\n public void testSentencesFromFile() throws IOException {\r\n System.out.print(\"Testing all sentences from file\");\r\n int countCorrect = 0;\r\n int countTestedSentences = 0;\r\n\r\n for (ArrayList<String> sentences : testSentences) {\r\n String correctSentence = sentences.get(0);\r\n System.out.println(\"testing '\" + correctSentence + \"' variations\");\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n int countSub = 0;\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n countSub += correctSentence.equals(output) ? 1 : 0;\r\n System.out.println(String.format(\"Input \\\"%1$s\\\" returned \\\"%2$s\\\", equal: %3$b\", s, output, correctSentence.equals(output)));\r\n collector.checkThat(\"input sentence: \" + s + \". \", output, IsEqual.equalTo(correctSentence));\r\n countTestedSentences++;\r\n }\r\n System.out.println(String.format(\"Correct answers for '%3$s': (%1$2d/%2$2d)\", countSub, sentences.size(), correctSentence));\r\n System.out.println();\r\n countCorrect += countSub;\r\n }\r\n\r\n System.out.println(String.format(\"Correct answers in total: (%1$2d/%2$2d)\", countCorrect, countTestedSentences));\r\n System.out.println();\r\n }",
"public String getStringFile(){\n return fileView(file);\n }",
"private void shareLogText() {\n try {\n File file = service.createAuditLogFile();\n Uri contentUri = Uri.fromFile(file);\n\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:\"));\n intent.putExtra(android.content.Intent.EXTRA_TITLE, getString(R.string.share_title_audit_log));\n intent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.share_title_audit_log));\n intent.putExtra(android.content.Intent.EXTRA_TEXT, getString(R.string.share_text_audit_log));\n\n intent.putExtra(Intent.EXTRA_STREAM, contentUri);\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n\n startActivity(Intent.createChooser(intent, getResources().getString(R.string.chooser_title_share_audit_log)));\n\n } catch (Exception e) {\n Log.e(TAG, \"Exception during preparation of audit file.\", e);\n informUser(R.string.toast_warning_exception_during_audit_file_share);\n }\n }",
"private static String arquivoParaString(String caminhoArquivo){\n\t\ttry {\t\n\t\t\tbyte[] encoded = Files.readAllBytes(Paths.get(caminhoArquivo));\n\t\t\treturn new String(encoded, StandardCharsets.UTF_8);\n\t\t}catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public void nonNetworkMde(){\n System.out.println(\"Please enter file path: \");\n Scanner scanner = new Scanner(System.in);\n String filePath = scanner.nextLine();\n\n List<String> stringFromFile = fileReader.readFile(filePath);\n fileCotextProcessor.consoleText(stringFromFile);\n }",
"private static String getFilePath(int storyId) {\n return DaoUtils.storageDirectoryName() + File.separator + \"story\" + storyId + \".txt\";\n }",
"public void leseTextEin()\r\n\t{\n\t\tif( this.text != \"\" )\r\n\t\t\treturn;\r\n\t\t\r\n\t StringBuffer buffer = new StringBuffer();\r\n\t BufferedReader input = null;\r\n\t \r\n\t try \r\n\t {\r\n\t \tinput = new BufferedReader( new FileReader(this.dateipfad) );\r\n\t \tString line = null; \r\n\t \twhile ((line=input.readLine()) != null)\r\n\t \t{\r\n\t \t\tbuffer.append(line); \r\n\t \t\tbuffer.append(System.getProperty(\"line.separator\"));\r\n\t \t}\r\n\t }\r\n\t catch (IOException ex)\r\n\t { ex.printStackTrace(); }\r\n\t finally \r\n\t {\r\n\t \ttry\r\n\t \t{\r\n\t \t\tif (input!= null) \r\n\t \t\t\tinput.close();\r\n\t \t}\r\n\t \tcatch (IOException ex)\r\n\t \t{ ex.printStackTrace(); }\r\n\t }\r\n\t this.text = buffer.toString();\r\n\t}",
"String getFile();",
"String getFile();",
"String getFile();",
"public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;",
"public String readFileIntoString(String filepath) throws IOException;",
"void chatFile() {\n\t\ttry {\n\t\t\tFile f = new File(\"Chat.txt\");\n\t\t\tif (f.createNewFile()) {\n\t\t\t\tlog.log(Level.INFO, \"Created a chat file \" + f.getName());\n\t\t\t} else {\n\t\t\t\tlog.log(Level.INFO, \"Chat file already exists...\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.log(Level.INFO, \"Something ain't right\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tComponent[] comps = textArea.getComponents();\n\t\tfor (Component x : comps) {\n\t\t\tJEditorPane e = (JEditorPane) x;\n\t\t\tif (x != null) {\n\t\t\t\tsb.append(e.getText() + System.lineSeparator());\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tFileWriter w = new FileWriter(\"Chat.txt\", false);\n\t\t\tw.write(sb.toString());\n\t\t\tw.close();\n\t\t\tlog.log(Level.INFO, \"Wrote to Chat.txt\");\n\t\t} catch (IOException e) {\n\t\t\tlog.log(Level.INFO, \"Something ain't right\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void Tokenizer(String s) throws FileNotFoundException\r\n {\nInputStream modelIn = new FileInputStream(\"C:/OpenNLP_models/en-token.bin\"); \r\n\t \r\n // InputStream modelIn=getClass().getResourceAsStream(\"en-token.bin\");\r\n try {\r\n TokenizerModel model = new TokenizerModel(modelIn);\r\n TokenizerME tokenizer = new TokenizerME(model);\r\n String tokens[] = tokenizer.tokenize(s);\r\n \r\n for(int i=0; i<tokens.length;i++)\r\n {\r\n System.out.println(tokens[i]);\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (modelIn != null) {\r\n try {\r\n modelIn.close();\r\n }\r\n catch (IOException e) {\r\n }\r\n } \r\n } \r\n }",
"public void firstSem2a5(){\n chapter = \"firstSem2a5\";\n String firstSem2a5 = \"What about your friend here?\\\" he asks, nodding to \"+student.getRmName()+\". \\\"Oh, I'm good,\\\"\" +\n student.getRmName()+\"says quickly. I already have a job, through the underground Communist...uh, through\" +\n \" the school paper.\\\" You chat with the man a little longer before he excuses himself to go back to the \" +\n \"kitchen.\\tYou and \"+student.getRmName()+\" finish up your dinner and head back. About halfway there, your roommate \" +\n \"stops and peers at you intensely. \\\"Well?\\\" they say.\";\n getTextIn(firstSem2a5);\n }",
"public String loadTextFile(String path) throws IOException {\n File file = new File(path);\n\n // Convert the file to a string.\n String output;\n try {\n output = Files.toString(file, Charsets.UTF_8);\n } catch (IOException ex) {\n LoggerFactory.getLogger(Resources.class).error(\"Unable to locate the resource at \" + path + \".\", ex);\n throw ex;\n }\n\n return output;\n }",
"@Before\n public void setUp() throws Exception {\n wordFrequency = new WordFrequency();\n bufferedReader = new BufferedReader(new FileReader(\"/home/anurag/Desktop/P2/src/test/com/stackroute/practice/FileDemo.txt\"));\n }",
"public void writeFileContents(String filename, String contents) {\n }",
"public static List<List<String[]>> getLinesAsPOSSentences(String text) {\n\t\tStringBuilder sentenceSB = new StringBuilder();\n\t\tchar[] chars;\n\t\tchars = text.toCharArray();\n\t\tList<List<String[]>> lines = new ArrayList<List<String[]>>();\n\t\tList<String[]> words = new ArrayList<String[]>();\n\t\twords.add(new String[] {\"<s>\",\"BOS\"});\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == '\\n' || chars[i] == '\\r') {\n\t\t\t\tif (sentenceSB.length() > 0) {\n//\t\t\t\t\tSystem.out.println(\"Adding word: \"+sentenceSB.toString());\n\t\t\t\t\tString word = sentenceSB.toString();\n\t\t\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\t\t\tif (splitWord.length > 1) {\n//\t\t\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\t\t\twords.add(splitWord);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twords.add(new String[] {word, word});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (words.size() > 1) {\n//\t\t\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\t\t\twords.add(new String[] {\"<\\\\/s>\",\"EOS\"});\n\t\t\t\t\tlines.add(words);\n\t\t\t\t}\n\t\t\t\twords = new ArrayList<String[]>();\n\t\t\t\twords.add(new String[] {\"<s>\",\"BOS\"});\n\t\t\t\tsentenceSB.setLength(0);\n\t\t\t} else if (chars[i] == ' ') {\n\t\t\t\tif (sentenceSB.length() > 0) {\n\t\t\t\t\tString word = sentenceSB.toString();\n\t\t\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\t\t\tif (splitWord.length > 1) {\n//\t\t\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\t\t\twords.add(splitWord);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twords.add(new String[] {word, word});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsentenceSB.setLength(0);\n\t\t\t} else {\n\t\t\t\tsentenceSB.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sentenceSB.length() > 0) {\n\t\t\tString word = sentenceSB.toString();\n\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\tif (splitWord.length > 1) {\n\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\twords.add(splitWord);\n\t\t\t} else {\n\t\t\t\twords.add(new String[] {word, word});\n\t\t\t}\n\t\t}\n\t\tif (words.size() > 1) {\n\t\t\twords.add(new String[] {\"<\\\\/s>\",\"EOS\"});\n//\t\t\tSystem.out.print(\"Adding line: \");\n//\t\t\tfor (String[] token : words) {\n//\t\t\t\tSystem.out.print(\"(\"+token[0]+\",\"+token[1]+\")\"+\" \");\n//\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tlines.add(words);\n\t\t}\n\t\tsentenceSB.setLength(0);\n\t\treturn lines;\n\t}",
"void writeText(FsPath path, String text);",
"public static void main(String[] args) throws IOException {\n\n BufferedWriter bw = new BufferedWriter(new FileWriter(\"lorem4.txt\"));\n bw.write(\"It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. \");\n bw.newLine();\n bw.write(\"sahuashuashuashauh aubduabd augb ua auhuh\");\n\n bw.close();\n\n }",
"public String loadFromFile() {\n StringBuilder sb = new StringBuilder();\n try {\n Log.d(\"DEBUG\", this.context.getPackageName());\n Log.d(\"DEBUG\", this.file);\n FileInputStream fis = context.openFileInput(file);\n BufferedReader br = new BufferedReader(new InputStreamReader(fis, this.encoding));\n String line;\n while(( line = br.readLine()) != null ) {\n sb.append( line );\n sb.append( '\\n' );\n }\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n return sb.toString();\n }",
"private void loadStopWords() throws FileNotFoundException, IOException{\n\n BufferedReader reader = new BufferedReader(new FileReader(\"src/stopwords/English.txt\"));\n String sWord;\n while ((sWord = reader.readLine()) != null) \n {\n stopWordList.add(sWord);\n }\n reader.close();\n }",
"public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}",
"private void saveIt(String text, File file) {\n String[] line = text.split(\"\\n\");\n System.out.println(\"the size of string array is \" + line.length );\n if (file == null) {\n logger.debug(\"Null return because Closed the save stage\");\n return;\n }\n try {\n logger.info(\"saving file...\");\n PrintStream stream = new PrintStream(file);\n stream.write(text.getBytes());\n } catch(IOException io) {\n logger.error(io.getMessage());\n }\n logger.info(\"saved\");\n }",
"public static String textInicial(){\n\t\treturn \"******** Joc del SENKU ********\\n\"\n\t\t\t\t+ \"Es tracta d'eliminar totes les fitxes 'X' del taulell menys una.\\n\"\n\t\t\t\t+ \"Per fer-ho qualsevol fitxa pot saltar una altra fitxa i col·locar/-se a una posició buida.\\n\"\n\t\t\t\t+ \"La fitxa saltada s'elimina del taulell.\\n\"\n\t\t\t\t+ \"Els moviments només poden ser horitzontals o verticals, mai diagonals.\\n\";\n\t}",
"public TextFile(String filepath) {\n try {\n toFile = new File(filepath);\n if(toFile == null) {\n System.err.println(filepath + \" could not be created\");\n return;\n }\n writer = new BufferedWriter(new FileWriter(toFile));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n }",
"private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ());\n\n return s;\n }",
"@Test\r\n\tpublic void testSavedFile() throws FileNotFoundException {\r\n\r\n\t\tScanner in = new Scanner(new FileReader(\"FactoryScenarios/MyExample.txt\"));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\twhile (in.hasNext()) {\r\n\t\t\tsb.append(in.next());\r\n\t\t}\r\n\t\tin.close();\r\n\t\tString outString = sb.toString();\r\n\r\n\t\tString expected = \"Cell6Button4/~disp-string:hello/~repeat-button:2/~skip-button:02/~skip:3/~pause:5/~disp-clearAll\";\r\n\r\n\t\tassertEquals(expected, outString);\r\n\r\n\t}",
"public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public void firstSem10c(){\n chapter = \"firstSem10c\";\n String firstSem10c = \"Shocked, you wander around your very empty dorm room, staring at the broken glass. You spy a scrap of paper nearby - it's \" +\n \"a part of the Dave Grohl poster. How can he still be smiling at a time like this? \\\"Man, I'm sorry,\\\" your RA says again. \\\"That sucks. \" +\n \"I can help you clean up the glass and stuff. You want Insomnia Cookie or anything? On me. Well, partially. I only have like ten dollars.\\\" \" +\n \"You nod, only half-listening. \\\"Yeah.\\\" you say finally. \\\"Cookies would be good.\\\"\\n\\t LATER...\\n\";\n getTextIn(firstSem10c);\n }",
"public static void main(String[] args) throws FileNotFoundException {\n\t\tString newline = System.lineSeparator();\n\t\tFileReader fr = new FileReader(\"dictonary_english_special.txt\");\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString holder = \"\";\n\t\tString temp;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\ttemp = br.readLine();\n\t\t\t\tif(temp == null)\n\t\t\t\t\tbreak;\n\t\t\t\tif(temp.length() < 4)\n\t\t\t\t\tcontinue;\n\t\t\t\t//System.out.println(temp);\n\t\t\t\tholder += temp + newline;\n\t\t\t} catch (IOException e) {break;}\n\t\t}\n\t\t\tFileWriter fw;\n\t\t\ttry {\n\t\t\t\tfw = new FileWriter(\"dictonary_english_hangman.txt\");\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\tbw.write(holder);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Done!\");\n\t}",
"private String getFileContent(String filePath) {\r\n\r\n\t\ttry {\r\n\t\t\tString text = new String(Files.readAllBytes(Paths.get(filePath)), StandardCharsets.UTF_8);\r\n\t\t\treturn text;\r\n\t\t} catch (Exception ex) {\r\n\t\t\treturn \"-1\";\r\n\t\t}\r\n\t}",
"public static void copyTextWithBuffer() throws IOException {\n BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(RESOURCES_FOLDER + \"\\\\lorem_ipsum.txt\"));\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(COPY_FOLDER + \"\\\\copy_lorem.txt\"));\n// bufferedOutputStream.write(bufferedInputStream.readAllBytes());\n bufferedOutputStream.flush();\n bufferedOutputStream.close();\n bufferedInputStream.close();\n\n// int c;\n// while ((c = bufferedInputStream.read()) > -1) {\n// bufferedOutputStream.write(c);\n// }\n\n }",
"public void write(String s) {\n String s_t_txt = s + \".txt\";\n try {\n PrintWriter writer = new PrintWriter(s_t_txt, \"UTF-8\");\n writer.print(s + \"\\n\");\n writer.print(toString());\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void saveTermText() {\n String jTermText = jTerm.read();\n if (jTermText != null && jTermText.length() > 0) {\n JFileChooser fileChooser = new JFileChooser();\n File path = new File(Settings.get(\"Terminal_SavePath\"));\n if (!path.exists()) {\n path = new File(MobydroidStatic.MOBY_DATA_PATH);\n }\n fileChooser.setCurrentDirectory(path);\n fileChooser.setSelectedFile(new File(\"TerminalText_\" + (new SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\")).format(new Date()) + \".txt\"));\n fileChooser.setDialogTitle(\"Save Terminal Text\");\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"*.txt\", \"txt\"));\n File file;\n do {\n if (fileChooser.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) {\n return;\n }\n file = fileChooser.getSelectedFile();\n if (!file.exists()) {\n break;\n }\n if (JOptionPane.showConfirmDialog(this, \"Are you sure?\", \"Replace File\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, ResourceLoader.MaterialIcons_WARNING) == JOptionPane.YES_OPTION) {\n break;\n }\n } while (true);\n\n // save file\n try (FileOutputStream fos = new FileOutputStream(file)) {\n fos.write(jTermText.getBytes());\n } catch (IOException ex) {\n }\n // save last directory to settings ..\n Settings.set(\"Terminal_SavePath\", fileChooser.getSelectedFile().getParent());\n Settings.save();\n }\n }",
"public String getText(String type) {\n String path = filePath.get(type);\n InputStream is = getClass().getResourceAsStream(path);\n\n if (is == null) {\n return \"File not found\";\n }\n return new BufferedReader(\n new InputStreamReader(is, StandardCharsets.UTF_8))\n .lines()\n .collect(Collectors.joining(\"\\n\"));\n }",
"public void writeTextFile(String s) {\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,true)));\n\t\t\twriter.println(s);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to\\t\\\"\" + filename + \"\\\"\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t}",
"public SearchFile(){\r\n filePath = \"Unknown\";\r\n wordSearched = \"Unknown\";\r\n wordLength = 0;\r\n occurrences = 0;\r\n }",
"public void example(){\n\t\tPath path=Paths.get(\"C:\\\\Users\\\\Sharath\\\\Downloads\",\"sharath.txt\");\r\n\t\t//get an instance of seekable byte channel using newByteChannel\r\n\t\ttry(SeekableByteChannel sekbchnl=Files.newByteChannel(path, EnumSet.of(StandardOpenOption.READ))){\r\n\t\t\t//new bytechanneel need a path and how to open in using std enumset.of\r\n\t\t\tByteBuffer buf = ByteBuffer.allocate(12);\r\n\t\t\t//buffer of 12 bytes\r\n\t\t\tString encoding=System.getProperty(\"file.encoding\");\r\n\t\t\t//get the system file encoding\r\n\t\t\tbuf.clear();\r\n\t\t\t//get ready for new sequence\r\n\t\t\twhile(sekbchnl.read(buf)>0){\r\n\t\t\t\t//read from channel to the buffer\r\n\t\t\t\tbuf.flip();\r\n\t\t\t\t//get ready for new seq chan read or get op\r\n\t\t\t\tSystem.out.print(Charset.forName(encoding).decode(buf));\r\n\t\t\t\t//decodes buf to uni char\r\n\t\t\t\tbuf.clear();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(IOException e){\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\t\t//truncate\r\n\t\t//write uses write option\r\n\t\ttry(SeekableByteChannel seekableByteChannel = Files.newByteChannel(path, EnumSet.of(StandardOpenOption.WRITE,StandardOpenOption.TRUNCATE_EXISTING))){\r\n\t\t\tByteBuffer bug=ByteBuffer.wrap(\"sharath hello\".getBytes());\r\n\t\t\tint write=seekableByteChannel.write(bug);\r\n\t\t\tSystem.out.println(\"Number of written bytes:\"+write);\r\n\t\t\tbug.clear();\r\n\t\t}\r\n\t\tcatch(IOException e){\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public TextFile(Scanner input) {\n \tSystem.out.println(\"Enter your Textfile name: \");\n \tString textfilename = input.nextLine(); \n \ttextFile = new File(textfilename);\n \tthis.checkFile();\n }",
"public static void main(String[] args) throws FileNotFoundException {\n\t\tInputStream modelIn = new FileInputStream(\"en-token.bin\");\n\n\t\ttry {\n\t\t\tTokenizerModel model = new TokenizerModel(modelIn);\n\t\t\tTokenizer tokenizer = new TokenizerME(model);\n\t\t\tString txt1 = readFile(\"files/job_1.txt\", null);\n\t\t\ttokenize(txt1,tokenizer);\n\t\t\t\n\t\t//\tString txt2 = readFile(\"files/job_1.html\", null);\n\t\t//\ttokenize(txt2,tokenizer);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (modelIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tmodelIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public String readFile(){\r\n StringBuffer str = new StringBuffer(); //StringBuffer is a mutable string\r\n Charset charset = Charset.forName(\"UTF-8\"); //UTF-8 character encoding\r\n Path file = Paths.get(filename + \".txt\");\r\n try (BufferedReader reader = Files.newBufferedReader(file, charset)) { // Buffer: a memory area that buffered streams read\r\n String line = null;\r\n while ((line = reader.readLine()) != null) { //Readers and writers are on top of streams and converts bytes to characters and back, using a character encoding\r\n str.append(line + \"\\n\");\r\n }\r\n }\r\n catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n return str.toString();\r\n }",
"public void processNER(ArrayList<Sentence> listofSentences,\r\n\t\t\tString path) throws FileNotFoundException {\r\n\r\n\t\tScanner sc = new Scanner(new File(path));\r\n\t\twhile (sc.hasNext()) {\r\n\t\t\tString properNoun = sc.nextLine();\r\n\t\t\tfor (Sentence sentence : listofSentences) {\r\n\t\t\t\tMap<String, Integer> tokenMap = sentence.tokenMap;\r\n\t\t\t\tint index = properNoun.indexOf(\" \");\r\n\t\t\t\tif (index > 0) {\r\n\t\t\t\t\tString[] nameParts = properNoun.split(\" \");\r\n\t\t\t\t\tboolean isPresent = false;\r\n\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\tif (tokenMap.containsKey(name))\r\n\t\t\t\t\t\t\tisPresent = true;\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tisPresent = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isPresent) {\r\n\t\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\t\tint count = tokenMap.get(name);\r\n\t\t\t\t\t\t\tif (count == 1)\r\n\t\t\t\t\t\t\t\ttokenMap.remove(name);\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\ttokenMap.put(name, count - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttokenMap.put(properNoun, 1);\r\n\t\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (tokenMap.containsKey(properNoun))\r\n\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsc.close();\r\n\t}",
"public static ArrayList<ArrayList<ArrayList<String>>> readSourceInputFile(\n\t\t\tArrayList<ArrayList<ArrayList<String>>> allSentences, FilePath pathStr) throws IOException {\n\t\tArrayList<String> inputList = null;\n\t\tinputList = readInputTxtFile(inputList, pathStr);\n\t\treturn allSentences = readResultTxtFile(allSentences, inputList, pathStr);\n\t}",
"String getFilepath();"
] |
[
"0.57888114",
"0.5748912",
"0.5723208",
"0.56811345",
"0.56684047",
"0.560477",
"0.5601832",
"0.55958015",
"0.5548766",
"0.5469804",
"0.5434657",
"0.54321754",
"0.5430951",
"0.5411513",
"0.5402447",
"0.53777146",
"0.5358509",
"0.53413045",
"0.5341159",
"0.5329885",
"0.5317209",
"0.5307667",
"0.529294",
"0.52795255",
"0.5273892",
"0.5266445",
"0.5261857",
"0.52608186",
"0.5246046",
"0.52406967",
"0.52366316",
"0.5235",
"0.5234984",
"0.52066326",
"0.52045107",
"0.52045006",
"0.52022326",
"0.5195492",
"0.51892877",
"0.51719797",
"0.5169775",
"0.5163841",
"0.51628697",
"0.5161057",
"0.5150283",
"0.51356745",
"0.513448",
"0.5127572",
"0.5125136",
"0.5122202",
"0.5117422",
"0.51016825",
"0.5096193",
"0.5079473",
"0.50776213",
"0.50773543",
"0.5077058",
"0.5054838",
"0.5040263",
"0.5033244",
"0.50305146",
"0.50289124",
"0.5027754",
"0.5027754",
"0.5027754",
"0.5015016",
"0.5012064",
"0.50115633",
"0.50106287",
"0.5006584",
"0.5002587",
"0.4996931",
"0.49890816",
"0.49856287",
"0.49779248",
"0.4971084",
"0.49683213",
"0.4958348",
"0.49549234",
"0.49496353",
"0.49435943",
"0.4941263",
"0.49294972",
"0.49212003",
"0.49193555",
"0.49180058",
"0.49086565",
"0.4905351",
"0.49052402",
"0.4905112",
"0.49043012",
"0.49040908",
"0.49016756",
"0.4898739",
"0.48985463",
"0.48905584",
"0.4887195",
"0.48847777",
"0.4882927",
"0.48798555",
"0.48785794"
] |
0.0
|
-1
|
update all the marks
|
public void marksEdit(View view) {
Intent intent = new Intent(getApplicationContext(), InsertingAtten.class);
intent.putExtra("STATUS", "edit");
intent.putExtra("SEMESTER", semester);
intent.putExtra("SECTION", section);
intent.putExtra("COURSEID", courseId);
intent.putExtra("DEPARTMENT", department);
intent.putExtra("SERIES", series);
startActivity(intent);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void updateMarks() {\n this.marks.addAll(thisTurnMarks);\n thisTurnMarks.clear();\n if(game != null)\n game.notifyUpdateMarks(this);\n }",
"public void setMarks(int[] newMarks){\n marks = newMarks;\n }",
"@Override\n\tpublic void marks() {\n\t\t\n\t}",
"public void setMarks(int[] marks) {\n\t\tthis.marks = marks;\n\t}",
"@RequestMapping(value = \"/update\" , method = RequestMethod.POST)\n\tpublic String UpdateMark(@ModelAttribute(\"marks\") Marks marks, Map<String, Object> model){\n\t\tSystem.out.println(\"makrsController/update\");\n\t\tMarksDAO mDAO = new MarksDAOImpl();\n\t\tSystem.out.println(\"makrsController/update..... after mDAO\");\n\t\tStudent s = marks.getStudent_id();\n\t\tSystem.out.println(\"makrsController/update..... after s\");\n\t\tmDAO.updateMark(marks);\n\t\tSystem.out.println(\"makrsController/update..... after update Mark\");\n\t\tList<Marks> m = mDAO.findAllMarks(s.getS_id());\n\t\t\n\t\tfor(Marks marks1 : m) {\n System.out.println(marks1.getMark());\n }\n\t\tmodel.put(\"Student\", s );\n\t\tmodel.put(\"Marks\", m);\n\t\treturn \"listAllMarks\";\n\t}",
"public void markEverythingDirty() {\n fullUpdate = true;\n }",
"public void changeMark() {\n marked = !marked;\n }",
"public void setMarks(float mark1, float mark2, float mark3, float mark4) { \n\t this.mark1 = mark1;\t \n\tthis.mark2 = mark2;\t \n\tthis.mark3 = mark3; \n\tthis.mark4 = mark4; \n\t}",
"@Override\r\n\tpublic Student changeMarks(String cname, double marks) {\n\t\treturn dao.changeMarks(cname, marks);\r\n\t}",
"public void setMark( String newMark )\n\t\t{\n\t\t\tmark = newMark; // set mark of square\n\t\t\trepaint(); //repaint square\n\t\t}",
"private void update() {\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c =0; c< seatGrid[0].length; c++) {\r\n\t\t\t\tseatGrid[r][c].setText(chart.getStudentName(r, c));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setMark\n (int r, int c,\n Mark mark);",
"public void markDirty() {\n dirty = true;\n }",
"public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}",
"public void setMarks(String title, int marks) {\n\t\tint index = this.indexOf(title);\n\t\tif(index>=0) {\n\t\t\t\n\t\t\tthis.courses[index].setMarks(marks);\n\t\t}\n\t}",
"public void mark()\n {\n mark = true;\n }",
"@Transactional \n\tpublic void updateAll() {\n\t\t\n\t\tIterator<Pharmacy> newList = pharmacyRepository1.getAllEntity().iterator();\n\t\twhile (newList.hasNext()) {\n\t\t\tPharmacy pharmacy = newList.next();\n\t\t\tlistStockInPharmacy(pharmacy);\n\t\t\t}\n\t\t\n\t}",
"public void markDirty()\n {\n }",
"void flushAll() {\n dirtyS = true;\n dirtyD = true;\n modelRoot.incrementNumberOfDirtySNodes();\n modelRoot.incrementNumberOfDirtyDNodes();\n }",
"public void mark();",
"public void setMark() {\n\t_source.setMark();\n\t_markedNode = _current;\n }",
"@Override\n public int update(J34SiscomexPaises j34SiscomexPaises) {\n return super.doUpdate(j34SiscomexPaises);\n }",
"private void update() {\n\t\ttheMap.update();\n\t\ttheTrainer.update();\n\t}",
"public void update(){}",
"public void update(){}",
"public void updateMarkers(){\n markerMap = new HashMap<>();\n googleMap.clear();\n for (Station station : main.getStations()) {\n float fillLevel = station.getFillLevel();\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)));\n marker.setTag(station.getId());\n markerMap.put(station.getId(), marker);\n }\n }",
"public void updateMarkers() {\n\t\tArrayList<Parking> items = getMarkersForLocation();\n\t\tfor (Parking item : items) {\n\t\t\tint id = item.getParkingId();\n\t\t\tParking inHashItem = parkingsArray.get(id);\n\t\t\tparkingsArray.delete(id);\n\t\t\t// if the item already exists, update the position\n\t\t\tif (inHashItem != null) {\n\t\t\t\tLog.d(\"Markers\", \"An old item\");\n\t\t\t\tparkingsArray.put(id, inHashItem); // put it at the end\n\t\t\t} else {\n\t\t\t\tLog.d(\"Markers\", \"A new item\");\n\t\t\t\titem.addMarkerToMap(map);\n\t\t\t\tparkingsArray.put(id, item);\n\t\t\t}\n\t\t}\n\n\t\t// remove extras\n\t\tremoveOldMarkers();\n\t}",
"public void setUpdateData() {\n positionFenceToUpdateinController = Controller.getPositionFenceInArrayById(this.idFenceToUpdate);\n if(positionFenceToUpdateinController >= 0) {\n Fence fence = Controller.fences.get(positionFenceToUpdateinController);\n ((MainActivity)getActivity()).getSupportActionBar().setTitle(Constant.TITLE_VIEW_UPDATE_FENCE + \": \" + fence.getName());\n this.nameFence.setText(fence.getName());\n this.addressFence.setText(fence.getAddress());\n this.cityFence.setText(fence.getCity());\n this.provinceFence.setText(fence.getProvince());\n this.numberFence.setText(fence.getNumber());\n this.textSMSFence.setText(fence.getTextSMS());\n int index = (int)Constant.SPINNER_RANGE_POSITIONS.get(fence.getRange());\n this.spinnerRange.setSelection(index);\n this.spinnerEvent.setSelection(fence.getEvent());\n }\n }",
"public void setmarks(int s1, int s2) {\n\t\tm1=s1;\n\t\tm2=s2;\n\t}",
"public void clearmarks ()\n\t// clear all marks in the current node\n\t{\n\t\tgetinformation();\n\t\tundonode();\n\t\tListElement la = Pos.node().actions(), lan;\n\t\tAction a;\n\t\twhile (la != null)\n\t\t{\n\t\t\ta = (Action)la.content();\n\t\t\tlan = la.next();\n\t\t\tif (a.type().equals(\"M\") || a.type().equals(\"L\")\n\t\t\t\t|| a.type().equals(\"MA\") || a.type().equals(\"SQ\")\n\t\t\t\t|| a.type().equals(\"SL\") || a.type().equals(\"CR\")\n\t\t\t\t|| a.type().equals(\"TR\") || a.type().equals(\"LB\"))\n\t\t\t{\n\t\t\t\tPos.node().removeaction(la);\n\t\t\t}\n\t\t\tla = lan;\n\t\t}\n\t\tsetnode();\n\t\tshowinformation();\n\t\tcopy();\n\t}",
"public void update() {\r\n\t\t\r\n\t}",
"public void update(){\r\n\t\t\r\n\t}",
"public void mark() {\r\n\t\tmark = cursor;\r\n\t}",
"public void setAssignmentMark(int assignmentNumber, int mark){\n // we subtract 1 from the assignment number so it will match to the \n // indices of the assignment in the array \n marks[assignmentNumber - 1] = mark; \n }",
"public void clearMark()\n {\n mark = false;\n }",
"public void markChanged()\n \t{\n \t\tbChanged=true;\n \t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t}",
"public void update() {\n\t\t\n\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"protected abstract void setMarkers();",
"public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawGrid();\r\n\t\tplotDecades();\r\n\t\tgetEntries();\r\n\t}",
"public void setDrawMarks(boolean draw) {\r\n this.drawMarks = draw;\r\n }",
"void updateData();",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void updateAll() throws IOException {\n\t}",
"public void update() {\r\n\t\t\tsetTextValue(updateNoteEnabled);\r\n\t\t}",
"final void updateSpan(List<T> spans){\n setChildren(spans);\n setEdited();\n getParent().updateParent();\n }",
"public void setMark(Float mark) {\n this.mark = mark;\n }",
"public void setMark(int mark) {\n\t\tthis.mark = mark;\n\t}",
"public void setMark(int row, int col, Marker mark) throws Exception {\r\n if (row >= BOARD_SIZE || row < 0) {\r\n throw new Exception(\"Invalid move: row outside of board range.\");\r\n }\r\n\r\n if (col >= BOARD_SIZE || col < 0) {\r\n throw new Exception(\"Invalid move: column outside of board range.\");\r\n }\r\n\r\n if (board[row][col] != Marker.EMPTY) {\r\n throw new Exception(\"Invalid move: selected location is already marked.\");\r\n }\r\n\r\n board[row][col] = mark;\r\n\r\n sums[row] += mark.val;\r\n sums[BOARD_SIZE + col] += mark.val;\r\n\r\n // Main diagonal.\r\n if (row == col)\r\n sums[2 * BOARD_SIZE] += mark.val;\r\n\r\n if (BOARD_SIZE - col - 1 == row)\r\n sums[2 * BOARD_SIZE + 1] += mark.val;\r\n }",
"protected abstract void updateInfos();",
"public void updateData() {}",
"@Override\r\n\tpublic void update() {\r\n\r\n\t}",
"public void reloadMarkers() {\n this.markers.reload();\n }",
"protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}",
"public void update()\n\t{\n\t\tsuper.update();\n\t}",
"@Override\r\n\tpublic CustomResult updateAll(MaterialConsume materialConsume) throws Exception{\n\t\tint i = materialConsumeMapper.updateByPrimaryKey(materialConsume);\r\n\t\tif(i>0){\r\n\t\t\treturn CustomResult.ok();\r\n\t\t}else{\r\n\t\t\treturn CustomResult.build(101, \"修改物料消耗信息失败\");\r\n\t\t}\r\n\t}",
"protected void updateAll() {\n for (String key : listenerMap.keySet()) {\n updateValueForKey(key, true);\n }\n }",
"public List<Mark> getMarks ()\r\n {\r\n return marks;\r\n }",
"public void mark(Marker m) {\n\t\tmark = m;\n\t}",
"void updateInterest() {\n // FIXME: Currently unimplemented\n }",
"@Override\n\tpublic int update(Semester sem) {\n\t\treturn 0;\n\t}",
"public abstract void updateLabels();",
"public void update() {\n }",
"public void updateGame(Mark mark) {\n if (board.hasWon(mark)) { // check de winaar\n currentState = (mark == Mark.CROSS) ? GameState.CROSS_WON : GameState.NOUGHT_WON;\n } else if (board.isDraw()) { // check gelijkspel\n currentState = GameState.DRAW;\n }\n }",
"public void mark() {\n\t\tmarker = elementCount;\n\t\tsetSize(marker);\n\t}",
"private synchronized final void makeAllDirty() {\n dirtyTop = 0;\n dirtyLeft = 0;\n dirtyBottom = rows;\n dirtyRight = cols;\n isDirty = true;\n }",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"void flushDraw() {\n dirtyD = true;\n modelRoot.incrementNumberOfDirtyDNodes();\n }",
"private void setDirty() {\n\t}",
"@Override\n public void onClick(View v) {\n branch[0] = branch[0] + edit.getText().toString();\n edit.setText(\"\");\n text1.setText(\"Enter the Marks(Out of 100)\");\n edit.setHint(\"Marks?\");\n butt.setText(\"Done\");\n if(branch[0].equals(\"11\") || branch[0].equals(\"21\") || branch[0].equals(\"31\") || branch[0].equals(\"41\")|| branch[0].equals(\"51\")) //1st semester\n {\n text2.setText(\"Chemistry\");\n butt.setOnClickListener(new View.OnClickListener() { //Chemistry marks entered\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Mechanics\"); //Mechanics\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Mathematics\"); //Maths\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Physics\"); //Physics\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Communication Skills\"); //CS\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Chemistry LAB\"); //chem lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(2*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Workshop\"); //Workshop\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Engineering Drawing\"); //ED\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(5*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=40.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"12\") || branch[0].equals(\"22\") || branch[0].equals(\"32\") || branch[0].equals(\"42\") || branch[0].equals(\"52\")) //2nd semester\n {\n text2.setText(\"IC\"); //IC\n butt.setOnClickListener(new View.OnClickListener() { //IC marks entered\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"BEES\"); //BEES\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Mathematics\"); //Maths\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Physics\"); //Physics\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"EVS\"); //EVS\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"IC LAB\"); //IC lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"BEES LAB\"); //BEES lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Physics Lab\"); //Physics lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=40.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"13\")) //CSE 3rd semester\n {\n text2.setText(\"Maths\"); //Maths\n butt.setOnClickListener(new View.OnClickListener() { //IC marks entered\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Data Structures\"); //Data Structures\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Discrete Mathematics\"); //Discrete Maths\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Design\"); //Digital Design\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Engineering Economics\"); //EE\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Data Structures LAB\"); //DS lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Design LAB\"); //DD lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=36.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"14\")) //CSE 4th semester\n {\n text2.setText(\"Formal Languages\"); //FM\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Algorithms\"); //algorithms\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Computer Architecture\"); //Computer Architecture\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Object Oriented Programming\"); //oops\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Probability and Random Process\"); //probability\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Algorithms LAB\"); //Algo lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Object Oriented Programming LAB\"); //oops lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Peripherals and Accessories LAB\"); //peripheral lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=41.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"15\")) //CSE 5th semester\n {\n text2.setText(\"Optimization\"); //optimization\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Software Engineering\"); //software engineering\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Operating System\"); //os\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Data Communication\"); //data communication\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Machine Learning\"); //machine learning\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Software Engineering LAB\"); //soft lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Operating Systems LAB\"); //os lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Machine Learning LAB\"); //ml lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=41.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"16\")) //CSE 6th semester\n {\n text2.setText(\"Management and Economics\"); //management\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Databases\"); //databases\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Compilers\"); //compilers\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Computer Networks\"); //comp. net.\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Information Storage and Retrieval\"); //info\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Databases LAB\"); //data lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"System Programming LAB\"); //compilers lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Computer Networks LAB\"); //cn lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"17\")) //CSE 7th semester\n {\n text2.setText(\"Computer Graphics\"); //graphics\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Numerical Methods\"); //numerical\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - I\"); //de1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - II\"); //de2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - III\"); //de3\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Computer Graphics LAB\"); //graphics lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project - I\"); //project1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"18\")) //CSE 8th semester\n {\n text2.setText(\"Department Elective - IV\"); //de4\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - V\"); //de5\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - VI\"); //de6\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project - II\"); //project2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=27.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"23\")) //ECE 3rd semester\n {\n text2.setText(\"Network Analysis\"); //na\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Semiconductor Device and Circuits\"); //sdc\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Analog Circuits\"); //AC\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Maths\"); //math\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"HSS Elective\"); //hss\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Network Analysis LAB\"); //na lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Semiconductor Device LAB\"); //sdc lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Analog Circuits LAB\"); //ac lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=37.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"24\")) //ECE 4th semester\n {\n text2.setText(\"Digital Electronics\"); //de\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Analog Communication\"); //ac\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electronics and Electrical Measurements\"); //ee\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Signals and System\"); //signals\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Probability and Random Process\"); //prob\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Electronics LAB\"); //de lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Analog Communication LAB\"); //ac lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electronics and Electrical Measurement LAB\"); //ee lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"25\")) //ECE 5th semester\n {\n text2.setText(\"Microprocessors\"); //micro\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Communication\"); //dc\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electromagnetic Thoery\"); //em\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Signal Processing\"); //digital signals\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Control System\"); //cs\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Microprocessors LAB\"); //micro lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Communication LAB\"); //dc lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Signal Processing LAB\"); //digital signals lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Control Systems LAB\"); //cs LAB\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0]+=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=42.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"26\")) //ECE 6th semester\n {\n text2.setText(\"VLSI Design\"); //vlsi\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Embedded System\"); //embedded systems\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Industrial Electronics\"); //industrial\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Antenna Design\"); //antenna\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"VHDL\"); //vhdl\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"VLSI and VHDL LAB\"); //VLSI lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Embedded System LAB\"); //embedded lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Industrial Electronics LAB\"); //industrial signals lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Antenna Design LAB\"); //antenna LAB\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0]+=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=42.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"27\")) //ECE 7th semester\n {\n text2.setText(\"Industrial Management\"); //industrial\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Microwave Engineering\"); //me\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Computer Networks\"); //computer\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - I\"); //de1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - II\"); //de2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project - I\"); //project1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Microwave Engineering LAB\"); //mw lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Computer Networks LAB\"); //networks lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=37.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"28\")) //ECE 8th semester\n {\n text2.setText(\"Department Elective - III\"); //de3\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - IV\"); //de4\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Open Elective\"); //oe\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Soft Skills\"); //soft skills\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project Work - II\"); //project\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(9*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=31.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"33\")) //ME 3rd semester\n {\n text2.setText(\"Mathematics\"); //maths\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Engineering Thermodynamics\"); //thermo\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Strength of Materials\"); //strength\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Engineering Materials\"); //eng. materials\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Manufacturing Technology\"); //manufacturing\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Machine Drawing\"); //machine drawing\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(5*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Strength of Materials LAB\"); //stength lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=40.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"34\")) //ME 4th semester\n {\n text2.setText(\"Numerical Methods\"); //numerical methods\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Fluid Mechanics\"); //fluid\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Kinematics of Machinery\"); //kinematics\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Heat and Mass Transfer\"); //heat\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Manufacturing Technology - II\"); //manufacturing\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Heat Transfer LAB\"); //heat transfer\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Manufacturing Technology LAB\"); //manufacturing technology lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=40.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"35\")) //ME 5th semester\n {\n text2.setText(\"Mechanical Measurements and Metrology\"); //measurements\n butt.setOnClickListener(new View.OnClickListener() { //IC marks entered\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Trubomachines\"); //turbo\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Dynamics of Machinery\"); //machinery\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Thermal Engineering - I\"); //Thermal Eng1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Design of Machine Elements - I\"); //machine elements\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Measurements and Metrology LAB\"); //Measurements lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Fluid Mechanics and Turbomachinery LAB\"); //fluid lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Dynamics of Machine LAB\"); //dynamics LAB\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=41.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"36\")) //ME 6th semester\n {\n text2.setText(\"Mechatronics\"); //mechatronics\n butt.setOnClickListener(new View.OnClickListener() { //IC marks entered\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Automobile Engineering\"); //automobile\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Refrigeration\"); //refrigeration\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Thermal Engineering - II\"); //Thermal Eng2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Design of Machine Elements - II\"); //machine elements2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Mechatronics LAB\"); //Mechatronics lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Automobile Engineering LAB\"); //automobile lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Thermal Engineering LAB\"); //thermal LAB\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=41.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"37\")) //ME 7th semester\n {\n text2.setText(\"HSS Elective\"); //hss\n butt.setOnClickListener(new View.OnClickListener() { //IC marks entered\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Industrial Engineering and Operations Reaserch\"); //insudtrial\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"CAD/CAM\"); //cad\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Departmental Elective - I\"); //de1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Departmental Elective - II\"); //de2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"CAD/CAM LAB\"); //cad lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project Work - I\"); //project1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=34.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"38\")) //ME 8th semester\n {\n text2.setText(\"HSS Elective\"); //hss\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - III\"); //de3\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Department Elective - IV\"); //de4\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Open Elective\"); //oe\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project Work - II\"); //project\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(9*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=31.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"43\")) //EE 3rd semester\n {\n text2.setText(\"Network Analysis\"); //na\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Semiconductor Device and Circuits\"); //sdc\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Analog Circuits\"); //AC\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Maths\"); //math\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"HSS Elective\"); //hss\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Network Analysis LAB\"); //na lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Semiconductor Device LAB\"); //sdc lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Analog Circuits LAB\"); //ac lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=37.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"44\")) //EE 4th semester\n {\n text2.setText(\"Numerical Methods\"); //numerical\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Electronics\"); //ac\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Measurements and Instrumentation\"); //ee\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Signals and System\"); //signals\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electrical Machines - I\"); //machines\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Digital Electronics LAB\"); //de lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electrical Machines LAB\"); //machines lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Measurement and Instrumentation LAB\"); //instrumentation lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=41.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"45\")) //EE 5th semester\n {\n text2.setText(\"Power Electronics\"); //power\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electrical Machines - II\"); //machines\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Transmission and Distribution\"); //transmission\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Control System\"); //systems\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electromagnetic Field\"); //electromagnetic feild\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Electrical Machines - II LAB\"); //machines lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Power Electronics LAB\"); //power lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Numerical Methods LAB\"); //numericals lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"46\")) //EE 6th semester\n {\n text2.setText(\"Microprocessors and Applications\"); //microprocessors\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Power System Protection\"); //power system\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Advanced Control System\"); //advanced control\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Renewable Energy Resources\"); //Resources\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Communication System\"); //communication\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Microprocessor LAB\"); //microprocessors lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Power System LAB\"); //power lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Control System LAB\"); //control lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"47\")) //EE 7th semester\n {\n text2.setText(\"High Voltage Engineering\"); //voltage\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Power System Analysis\"); //power system\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Elective - I\"); //elective1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Elective - II\"); //elective2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Renewable Energy LAB\"); //renewable lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project - I\"); //project\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] += (6 * obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total /= 39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"48\")) //EE 8th semester\n {\n text2.setText(\"Power System Operation and Control\"); //power\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Elective - III\"); //elective3\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Open Elective\"); //op\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"HSS Elective - IV\"); //hss4\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project - II\"); //project2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total /= 39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"53\")) //CE 3rd semester\n {\n text2.setText(\"Mathematics\"); //maths\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Solid Mechanics\"); //sm\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Engineering Geology\"); //geology\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Civil Engineering Materials\"); //materials\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Surveying\"); //survey\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Civil Engineering Materials LAB\"); //Civil Engineering Materials lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Surveying LAB\"); //Surveying lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Building Drawing and CAD LAB\"); //Building Drawing and CAD lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=42.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"54\")) //CE 4th semester\n {\n text2.setText(\"Numerical Methods\"); //numerical\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Structural Analysis - I\"); //Structural Analysis I\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Environmental Engineering - I\"); //Environmental Engineering I\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Geotechnical Engineering - I\"); //Geotechnical Engineering I\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Hydrology and Water Resources Engineering\"); //Hydrology and Water Resources Engineering\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Environmental Engineering LAB\"); //Environmental Engineering lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Geotechnical Engineering - I LAB\"); //Geotechnical Engineering lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=38.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"55\")) //CE 5th semester\n {\n text2.setText(\"Structural Analysis II\"); //power\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Environmental Engineering II\"); //machines\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Geotechnical Engineering II\"); //transmission\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Fluid Mechanics\"); //systems\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Reinforced Concrete Design\"); //electromagnetic feild\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Geotechnical Engineering - II LAB\"); //machines lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Fluid Mechanics LAB\"); //power lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"56\")) //CE 6th semester\n {\n text2.setText(\"HSS - II\"); //microprocessors\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Transportation Engineering - I\"); //power system\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Construction Technology and Management\"); //advanced control\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Design of Steel Structures\"); //Resources\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(8*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Hydraulics and Hydraulic Structures\"); //communication\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Transportation Engineering - I LAB\"); //microprocessors lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Hydraulics and Hydraulic Structures LAB\"); //power lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total/=39.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"57\")) //CE 7th semester\n {\n text2.setText(\"HSS - III\"); //voltage\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(4*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Transportation Engineering - II\"); //power system\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Elective - I\"); //elective1\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Elective - II\"); //elective2\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Open Elective - I\"); //renewable lab\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(3*obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Computational LAB\"); //project\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] += (3 * obj.pract(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total /= 31.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n });\n }\n if(branch[0].equals(\"58\")) //CE 8th semester\n {\n text2.setText(\"Departmental Elective - III\"); //power\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Departmental Elective IV\"); //elective3\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Open Elective - II\"); //op\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(6*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n edit.setText(\"\");\n text2.setText(\"Project\"); //hss4\n butt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n marks[0] +=(9*obj.theo(Integer.valueOf(String.valueOf(edit.getText()))));\n double total = marks[0];\n total /= 27.0;\n Intent intent = new Intent(MainActivity.this, Marks.class);\n intent.putExtra(\"Marks\", Math.round(total * 100.0) / 100.0);\n startActivity(intent);\n finish();\n }\n });\n }\n });\n }\n });\n }\n });\n }\n\n }",
"@Override\r\n\tpublic void update() {\r\n\t}",
"void updateLandmarks() {\n\n\t\t\tregisterUpdateLandmarksTimer();\n\n\t\t\tint m = 2;\n\t\t\tfinal int expectedLandmarks = NumberOfLandmarks + m;\n\t\t\tIterator<Long> ier = pendingHSHLandmarks.keySet().iterator();\n\n\t\t\tSet<AddressIF> tmpList = new HashSet<AddressIF>(1);\n\t\t\tLong curRecord = null;\n\n\t\t\t// get a non-empty list of landmarks\n\t\t\twhile (ier.hasNext()) {\n\t\t\t\tLong nxt = ier.next();\n\t\t\t\tif (pendingHSHLandmarks.get(nxt).IndexOfLandmarks != null\n\t\t\t\t\t\t&& pendingHSHLandmarks.get(nxt).IndexOfLandmarks.size() > 0) {\n\t\t\t\t\ttmpList\n\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(nxt).IndexOfLandmarks);\n\t\t\t\t\tcurRecord = nxt;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if empty, we need to update landmarks immediately\n\t\t\tif (tmpList.size() == 0) {\n\t\t\t\t// remove the record\n\t\t\t\tif (curRecord != null) {\n\t\t\t\t\tpendingHSHLandmarks.get(curRecord).clear();\n\t\t\t\t\tpendingHSHLandmarks.remove(curRecord);\n\t\t\t\t} else {\n\t\t\t\t\t// null curRecord\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfinal Long Timer = curRecord;\n\t\t\t\t// ping landmarks, if several of them fails, p percentage p=0.2\n\t\t\t\t// , we remove the records, and restart the landmark process\n\t\t\t\t// =================================================================\n\t\t\t\tfinal List<AddressIF> aliveLandmarks = new ArrayList<AddressIF>(\n\t\t\t\t\t\t1);\n\n\t\t\t\tNNManager.collectRTTs(tmpList, new CB2<Set<NodesPair>, String>() {\n\t\t\t\t\tprotected void cb(CBResult ncResult, Set<NodesPair> nps,\n\t\t\t\t\t\t\tString errorString) {\n\t\t\t\t\t\t// send data request message to the core node\n\t\t\t\t\t\tlong timer=System.currentTimeMillis();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (nps != null && nps.size() > 0) {\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"\\n==================\\n Alive No. of landmarks: \"\n\t\t\t\t\t\t\t\t\t\t\t+ nps.size()\n\t\t\t\t\t\t\t\t\t\t\t+ \"\\n==================\\n\");\n\n\t\t\t\t\t\t\tIterator<NodesPair> NP = nps.iterator();\n\t\t\t\t\t\t\twhile (NP.hasNext()) {\n\t\t\t\t\t\t\t\tNodesPair tmp = NP.next();\n\t\t\t\t\t\t\t\tif (tmp != null && tmp.rtt >= 0) {\n\n\t\t\t\t\t\t\t\t\tAddressIF peer = (AddressIF)tmp.endNode;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//====================================================\n\t\t\t\t\t\t\t\t\tif (!ncManager.pendingLatency.containsKey(peer)) {\n\t\t\t\t\t\t\t\t\t\tncManager.pendingLatency.put(peer,\n\t\t\t\t\t\t\t\t\t\t\t\tnew RemoteState<AddressIF>(peer));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tncManager.pendingLatency.get(peer).addSample(tmp.rtt, timer);\n\t\t\t\t\t\t\t\t\t//=====================================================\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!pendingHSHLandmarks.containsKey(Timer)\n\t\t\t\t\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Timer).IndexOfLandmarks == null) {\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tint index = pendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t\t.indexOf(peer);\n\n\t\t\t\t\t\t\t\t\tif (index < 0) {\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// found the element, and it is smaller\n\t\t\t\t\t\t\t\t\t\t// than\n\t\t\t\t\t\t\t\t\t\t// rank, i.e., it is closer to the\n\t\t\t\t\t\t\t\t\t\t// target\n\t\t\t\t\t\t\t\t\t\taliveLandmarks.add(peer);\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// wrong measurements\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// empty\n\t\t\t\t\t\t\t// all nodes fail, so there are no alive nodes\n\t\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// some landmarks are offline, we clear records and\n\t\t\t\t\t\t// start\n\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\n\t\t\t\t\t\t\tif (aliveLandmarks.size() < 0.8 * expectedLandmarks) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// the landmarks are healthy, so we can sleep\n\t\t\t\t\t\t\t\t// awhile\n\t\t\t\t\t\t\t\t// TODO: remove dead landmarks, and resize the\n\t\t\t\t\t\t\t\t// landmarks\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.addAll(aliveLandmarks);\n\n\t\t\t\t\t\t\t\t// pendingHSHLandmarks.get(Timer).readyForUpdate=false;\n\t\t\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(\n\t\t\t\t\t\t\t\t\t\t1);\n\n\t\t\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Timer).IndexOfLandmarks);\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).readyForUpdate = true;\n\n\t\t\t\t\t\t\t\t//update the rtts\n\t\t\t\t\t\t\t\t updateRTTs(Timer.longValue(),nodes, new\n\t\t\t\t\t\t\t\t CB1<String>(){ protected void cb(CBResult\n\t\t\t\t\t\t\t\t ncResult, String errorString){ switch\n\t\t\t\t\t\t\t\t (ncResult.state) { case OK: {\n\t\t\t\t\t\t\t\t System.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t System.out.println();\n\t\t\t\t\t\t\t\t if(errorString.length()<=0){\n\t\t\t\t\t\t\t\t pendingHSHLandmarks\n\t\t\t\t\t\t\t\t .get(Timer).readyForUpdate=true; }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break; } case ERROR: case TIMEOUT: { break; }\n\t\t\t\t\t\t\t\t } nodes.clear(); } });\n\t\t\t\t\t\t\t\t \n\n\t\t\t\t\t\t\t\treturn;\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\n\t\t\t}\n\n\t\t\t// ==================================================================\n\n\t\t\t// expected landmarks, K+m\n\n\t\t\tfinal Set<AddressIF> pendingNodes = new HashSet<AddressIF>(1);\n\n\t\t\tgetRandomNodes(pendingNodes, expectedLandmarks);\n\n\t\t\t// remove myself\n\t\t\tif (pendingNodes.contains(Ninaloader.me)) {\n\t\t\t\tpendingNodes.remove(Ninaloader.me);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"$: HSH: Total number of landmarks are: \"\n\t\t\t\t\t+ pendingNodes.size());\n\n\t\t\tif (pendingNodes.size() == 0) {\n\t\t\t\tString errorString = \"$: HSH no valid nodes\";\n\t\t\t\tSystem.out.println(errorString);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tBarrier barrierUpdate = new Barrier(true);\n\t\t\tfinal StringBuffer errorBuffer = new StringBuffer();\n\n\t\t\tfinal long TimeStamp = System.currentTimeMillis();\n\n\t\t\tfor (AddressIF addr : pendingNodes) {\n\t\t\t\tseekLandmarks(TimeStamp, addr, barrierUpdate,\n\t\t\t\t\t\tpendingHSHLandmarks, errorBuffer);\n\t\t\t}\n\n\t\t\tEL.get().registerTimerCB(barrierUpdate, new CB0() {\n\t\t\t\tprotected void cb(CBResult result) {\n\t\t\t\t\tString errorString;\n\t\t\t\t\tif (errorBuffer.length() == 0) {\n\t\t\t\t\t\terrorString = new String(\"Success\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorString = new String(errorBuffer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// finish the landmark seeking process\n\n\t\t\t\t\tif (!pendingHSHLandmarks.containsKey(Long\n\t\t\t\t\t\t\t.valueOf(TimeStamp))\n\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks == null) {\n\t\t\t\t\t\tSystem.out.println(\"$: NULL elements! \");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks\n\t\t\t\t\t\t\t.size() < (0.7 * expectedLandmarks)) {\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp))\n\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\tpendingHSHLandmarks.remove(Long.valueOf(TimeStamp));\n\t\t\t\t\t\tSystem.out.println(\"$: not enough landmark nodes\");\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp)).readyForUpdate = true;\n\t\t\t\t\t\tSystem.out.println(\"$: enough landmark nodes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(1);\n\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks);\n\t\t\t\t\t\tupdateRTTs(Long.valueOf(TimeStamp), nodes, new CB1<String>() {\n\t\t\t\t\t\t\tprotected void cb(CBResult ncResult, String errorString) {\n\t\t\t\t\t\t\t\tswitch (ncResult.state) {\n\t\t\t\t\t\t\t\tcase OK: {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase ERROR:\n\t\t\t\t\t\t\t\tcase TIMEOUT: {\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\t}\n\t\t\t\t\t\t\t\tnodes.clear();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}",
"public void update() {\n\t\tupdate(1);\n\t}",
"@Override\r\n\tpublic void update(String[] getdata) {\n\r\n\t}",
"private void mark(int i) {\r\n // naechster Praesentationsschritt\r\n if (beforeAlgo) {\r\n beforeAlgo = false;\r\n lang.nextStep(\"Algorithm\");\r\n } else {\r\n lang.nextStep();\r\n }\r\n if (i != 0)\r\n code.unhighlight(i - 1);\r\n code.highlight(i); // neuen Code markieren\r\n explain.setText(\"\", null, null);\r\n if (lastT != null)\r\n colorObject(lastT, textColor);\r\n if (lastP != null)\r\n colorObject(lastP, edgeColor);\r\n\r\n }",
"@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"public void update() {}",
"public void clearMarks() {\r\n markBoard = new boolean[squareDimension][squareDimension];\r\n }",
"public int[] getMarks(){\n return marks;\n }",
"final void updateSpan(){\n setEdited();\n if (this instanceof Document){\n ((Document)this).updateDoc();\n } else {\n getParent().updateParent();\n }\n }",
"private void updateArrayListCoordinates() {\n this.coordinates = makeCoordinatesFromCenterCoordinate(centerPointCoordinate);\n }"
] |
[
"0.7795355",
"0.6965126",
"0.68165755",
"0.6462779",
"0.64090353",
"0.6281524",
"0.6160444",
"0.60880864",
"0.6060493",
"0.59753966",
"0.59254164",
"0.586238",
"0.5860912",
"0.58573025",
"0.58525646",
"0.5840174",
"0.582433",
"0.5787382",
"0.5766138",
"0.5725747",
"0.571041",
"0.5699952",
"0.5698928",
"0.56952834",
"0.56952834",
"0.5690961",
"0.5680609",
"0.5668873",
"0.56486636",
"0.5644214",
"0.56305116",
"0.562658",
"0.5619603",
"0.56072664",
"0.5605951",
"0.5583691",
"0.55717576",
"0.55717576",
"0.55717576",
"0.55717576",
"0.5570864",
"0.5550347",
"0.5550347",
"0.5550347",
"0.55260843",
"0.55260843",
"0.55238026",
"0.5513927",
"0.5511297",
"0.5470685",
"0.54687613",
"0.54687613",
"0.54687613",
"0.54687613",
"0.54687613",
"0.54573774",
"0.5456219",
"0.54528844",
"0.54519695",
"0.54504126",
"0.5442076",
"0.54388374",
"0.5426131",
"0.5425954",
"0.542578",
"0.5419966",
"0.5409224",
"0.54019046",
"0.53991956",
"0.539546",
"0.5383511",
"0.5377641",
"0.53766775",
"0.53724",
"0.5369005",
"0.53681874",
"0.53659445",
"0.5364956",
"0.5364942",
"0.5364942",
"0.5364942",
"0.5364942",
"0.5364942",
"0.5364942",
"0.53640884",
"0.53600144",
"0.535711",
"0.5349605",
"0.5344698",
"0.5342302",
"0.5337972",
"0.53378826",
"0.53353435",
"0.53349805",
"0.532849",
"0.532849",
"0.53261703",
"0.53232473",
"0.5319666",
"0.53169423",
"0.5316461"
] |
0.0
|
-1
|
cancel all the marks
|
public void marksCancel(View view) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void cancel() {\n\t}",
"public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel(){\n cancelled = true;\n }",
"public synchronized void cancel() {\n }",
"public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"public void cancel()\n\t{\n\t}",
"public void cancel() {\n\t\tcancel(false);\n\t}",
"public void cancel(){\n\t\tstartTime = -1;\n\t\tplayersFinished = new ArrayList<>();\n\t\tplayersFinishedMarked = new ArrayList<Player>();\n\t\tDNFs = new ArrayList<>();\n\t\ttempNumber = 0;\n\t\tmarkedNum = 0;\n\t\t//normally we'd mark started racers as such, but we are don't know how many started.\n\t}",
"public void cancelButton() {\n this.setMultQuestionSet(null);\n this.setSingleQuestionSet(null);\n this.setTextQuestionSet(null);\n this.setDateQuestionSet(null);\n System.out.println(\"Done pressing cancel button\");\n }",
"public void cancel() {\n\t\tcancelled = true;\n\t}",
"@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}",
"public void clearMark()\n {\n mark = false;\n }",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"public void cancel() {\n btCancel().push();\n }",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"public boolean cancel();",
"void cancelOriginal();",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"public void cancelAll() {\n this.disposables.dispose();\n }",
"@Override\n\tpublic void cancel() {\n\t\t\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n public void reset() {\n cancelAll();\n }",
"@Override\n public void cancel() {\n\n }",
"@Action\n public void acCancel() {\n setChangeObj(false);\n }",
"@Action\n public void acCancel() {\n setChangeObj(false);\n }",
"@Override\n public void cancel() {\n\n }",
"public void cancel() {\r\n\t\tbStop = true;\r\n\t}",
"abstract protected void cancelCommands();",
"private void cancelAllTasks() {\n if(artistTask != null) {\n artistTask.cancel(true);\n artistTask = null;\n }\n }",
"public void cancel();",
"public void cancel() {\n cancelSoftwareAnimations();\n }",
"@Override\n public void cancel() {\n }",
"public void cancel() {\n writeData(ESC.CMD_CANCEL);\n }",
"@Override\n public void cancel() {\n }",
"public void cancelCurrentComputation(){\n\t\tft.cancel(true);\n\t}",
"public void killTarea() {\r\n\t\tsuper.cancel();\r\n\t}",
"public void cancel() {\n ei();\n this.fd.eT();\n this.oJ.b(this);\n this.oM = Status.CANCELLED;\n if (this.oL != null) {\n this.oL.cancel();\n this.oL = null;\n }\n }",
"private void onCancelButtonPressed() {\r\n disposeDialogAndCreateNewGame(); // Reset board,\r\n game.setCanPlaceMarks(false); // But don't start a new game.\r\n }",
"public abstract boolean cancel();",
"public void doCancel() {\n\t\tannotationManager.removeAllProviders();\n\t}",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"public void cancel()\n {\n Enumeration en = m_rounds.keys();\n while (en.hasMoreElements())\n {\n PaxosRound tmp = (PaxosRound) m_rounds.get(en.nextElement());\n tmp.abort();\n }\n }",
"protected void cancelChanges() {\n }",
"public void cancelState() {\n if (isQuestionEditMode) {\n //deleteAllQuestionInputTextAreas();\n //addCurrentQuestionsToView();\n }\n }",
"void cancelSelectMode();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcancel();\n\t\t\t}",
"public void cancel() {\n this.currentCompactedKVs = this.totalCompactingKVs = 0;\n }",
"public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }",
"public void clearmarks ()\n\t// clear all marks in the current node\n\t{\n\t\tgetinformation();\n\t\tundonode();\n\t\tListElement la = Pos.node().actions(), lan;\n\t\tAction a;\n\t\twhile (la != null)\n\t\t{\n\t\t\ta = (Action)la.content();\n\t\t\tlan = la.next();\n\t\t\tif (a.type().equals(\"M\") || a.type().equals(\"L\")\n\t\t\t\t|| a.type().equals(\"MA\") || a.type().equals(\"SQ\")\n\t\t\t\t|| a.type().equals(\"SL\") || a.type().equals(\"CR\")\n\t\t\t\t|| a.type().equals(\"TR\") || a.type().equals(\"LB\"))\n\t\t\t{\n\t\t\t\tPos.node().removeaction(la);\n\t\t\t}\n\t\t\tla = lan;\n\t\t}\n\t\tsetnode();\n\t\tshowinformation();\n\t\tcopy();\n\t}",
"protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }",
"private void cancel() {\n recoTransaction.cancel();\n }",
"public void cancelar() {\n setCancelado(true);\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onAnimationCancel(Animator animation) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"static void ClearMarks() {\n\t\tif (pop != null)\n\t\t{\n\t\t\tpop.clear();\n\t\t}\n\t\tClearDraw();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\t}",
"@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }",
"public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\t\t\tpublic void setCanceled(boolean value) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void onAnimationCancel(Animator animation) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\tpublic void onAnimationCancel(Animator animation) {\n\n\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onAnimationCancel(Animator animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void cancelAll() {\n terminateScheduleTask();\n for (CancellableCommand request : outstandingRequests) {\n request.onCancelled();\n }\n outstandingRequests.clear();\n }",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"public void cancel_process() {\n\n Button cancel = (Button) findViewById(R.id.cancel_type4);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Uncheck all checkbox\n clear_data();\n\n // toast message will be show to user clear data\n Toast.makeText(Product_Details_Page_Type_4.this, \"Clear data\", Toast.LENGTH_LONG).show();\n }\n });\n }",
"public void onCancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }",
"public void i() {\n if (this.e != null) {\n this.e.cancel();\n this.e = null;\n }\n if (this.d != null) {\n this.d.cancel();\n this.d.purge();\n this.d = null;\n }\n }",
"@Override\n\tpublic void cancelCalendar(CalendarEdit edit) {\n\t\t\n\t}",
"private void cancel() {\n\t\tfinish();\n\t}",
"public void onCancel();",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance().executeCommand(\n\t\t\t\t\tnew GraphicElementEditCancelCommand(model, dialog.getGraphicElement(), previousShapes));\n\t\t\tGraphicElementInvoker.getInstance().abortSession();\n\t\t\tdialog.setVisible(false);\n\t\t}",
"public void cancelSelect(View v){\n isCancel = true;\n isStart = false;\n mySave.setVisibility(View.INVISIBLE);\n myCancel.setVisibility(View.INVISIBLE);\n myEdit.setVisibility(View.VISIBLE);\n myViewFilter.setVisibility(View.VISIBLE);\n adapter.notifyDataSetChanged();\n }",
"public void cancel ()\r\n\t{\r\n\t\tmyFrame.dispose();\r\n\t}",
"void cancel(long inId);",
"@Override \n\t public void onCanceled(List<HyjModel> objects) {\n\t super.onCanceled(objects);\n\t }",
"@Override \n\t public void onCanceled(List<HyjModel> objects) {\n\t super.onCanceled(objects);\n\t }",
"void onCancel();",
"private void cancelPressed() {\n\t\tVideoPlayer.mediaPlayer.stop();\n\t\tl.clear();\n\t\tpaths.clear();\n\t\tsizes.clear();\n\t\tcancelPlayingList.setEnabled(false);\n\t\tplayTheList.setEnabled(true);\n\t}",
"@Override public void onAnimationCancel(Animator arg0) {\n\n }",
"private void actionCancel() {\n\t\tselectedDownload.cancel();\n\t\tupdateButtons();\n\t}",
"public void onCancel() {\n\t\t\t\t\t}",
"default void cancel() {\n\t\tcancelOriginal();\n\t\tFutureStream.super.cancel();\n\n\t}",
"public void cancel() { Common.exitWindow(cancelBtn); }",
"@Override\n public void setCancelOp(boolean cancel) {\n cancelOp = cancel;\n }"
] |
[
"0.70664287",
"0.70420647",
"0.703949",
"0.703949",
"0.703949",
"0.703949",
"0.703949",
"0.703949",
"0.70326823",
"0.7012701",
"0.7007853",
"0.6981415",
"0.69809246",
"0.6935723",
"0.69053316",
"0.6902927",
"0.68683",
"0.6857023",
"0.68231916",
"0.6813287",
"0.6805232",
"0.6805232",
"0.6805232",
"0.6805232",
"0.6805232",
"0.6786065",
"0.67573684",
"0.673686",
"0.67332256",
"0.67169255",
"0.67169255",
"0.67169255",
"0.67067164",
"0.66880125",
"0.6675287",
"0.6675287",
"0.6675287",
"0.6668409",
"0.66548234",
"0.66395926",
"0.66395926",
"0.66321445",
"0.6630402",
"0.65786636",
"0.6572382",
"0.65598404",
"0.65400386",
"0.65361804",
"0.65352774",
"0.6529344",
"0.6523383",
"0.6497542",
"0.64834964",
"0.64773",
"0.64624673",
"0.6461466",
"0.6447452",
"0.6421646",
"0.6419348",
"0.6383155",
"0.6382503",
"0.63698715",
"0.6353287",
"0.6296477",
"0.6290965",
"0.62838423",
"0.6249264",
"0.6240738",
"0.6222331",
"0.62050176",
"0.6198699",
"0.6184699",
"0.6168822",
"0.61590046",
"0.6144189",
"0.6144077",
"0.6140547",
"0.61375463",
"0.61375463",
"0.61208683",
"0.6110579",
"0.6109115",
"0.61029583",
"0.6102709",
"0.6094956",
"0.6094718",
"0.6081054",
"0.6080324",
"0.6068217",
"0.60471165",
"0.6047099",
"0.6047099",
"0.604709",
"0.6043464",
"0.6042857",
"0.60381633",
"0.6037137",
"0.6025731",
"0.6022197",
"0.601941"
] |
0.721762
|
0
|
Created by tanaphatdev on 20/5/2559.
|
@Repository
public interface FaresRepository extends JpaSpecificationExecutor<Fares>, JpaRepository<Fares,Long>,PagingAndSortingRepository<Fares,Long>,CrudRepository<Fares,Long> {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private stendhal() {\n\t}",
"protected boolean func_70814_o() { return true; }",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"private void m50366E() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void nadar() {\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}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void mo12628c() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\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\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void method_4270() {}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private void m50367F() {\n }",
"public void mo6081a() {\n }",
"@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\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"public void mo21877s() {\n }",
"public void mo21779D() {\n }",
"private void strin() {\n\n\t}",
"@Override\n public void init() {\n }",
"@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\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"public void mo3376r() {\n }",
"@Override\n protected void init() {\n }",
"public void skystonePos4() {\n }",
"static void feladat4() {\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"protected void mo6255a() {\n }",
"static void feladat9() {\n\t}",
"public void m23075a() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void mo21825b() {\n }",
"@Override\r\n\tpublic void init() {}",
"public abstract void mo70713b();",
"@Override\n public void init() {}",
"@Override\n\tpublic void init() {\n\t}",
"public void mo12930a() {\n }",
"public void mo21878t() {\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"public final void mo91715d() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"public void skystonePos6() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void mo115190b() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"static void feladat7() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n void init() {\n }"
] |
[
"0.58712214",
"0.57705426",
"0.5722799",
"0.5716781",
"0.568973",
"0.5665707",
"0.5664472",
"0.5661142",
"0.56542253",
"0.5651658",
"0.5651658",
"0.56170434",
"0.5616207",
"0.5615755",
"0.5608331",
"0.5599423",
"0.55769336",
"0.55666196",
"0.55657566",
"0.5551318",
"0.5551318",
"0.5551318",
"0.5551318",
"0.5551318",
"0.55242574",
"0.55206966",
"0.5501722",
"0.55004954",
"0.54980713",
"0.54784167",
"0.54439414",
"0.54296744",
"0.54257214",
"0.5422652",
"0.5418525",
"0.54150677",
"0.5410865",
"0.5405022",
"0.54041284",
"0.54041284",
"0.54041284",
"0.54041284",
"0.54041284",
"0.54041284",
"0.54041284",
"0.5398639",
"0.53960675",
"0.53960675",
"0.5394098",
"0.5381794",
"0.5379674",
"0.5375842",
"0.53735644",
"0.53588426",
"0.5356883",
"0.5356883",
"0.5356883",
"0.53499496",
"0.53499496",
"0.53499496",
"0.5349782",
"0.5336049",
"0.5334979",
"0.5329354",
"0.5322802",
"0.5322802",
"0.5322802",
"0.53220654",
"0.5319303",
"0.53121215",
"0.5310664",
"0.53094196",
"0.53060853",
"0.53049845",
"0.53049845",
"0.53040344",
"0.53019464",
"0.5300887",
"0.529903",
"0.529887",
"0.52981126",
"0.52964544",
"0.5295436",
"0.52936965",
"0.52871853",
"0.52851874",
"0.52838963",
"0.52829903",
"0.52763176",
"0.5268499",
"0.52628267",
"0.52618825",
"0.5260161",
"0.52594376",
"0.52589846",
"0.5258676",
"0.52532667",
"0.5252928",
"0.52500284",
"0.52460057",
"0.52438605"
] |
0.0
|
-1
|
first enforce that there is only one landscape per CCFMaster
|
@Override
public void create(Landscape context) {
checkSingleLandscapeConstraint();
checkParticipantKinds(context);
try {
Resource resource = applicationContext
.getResource(getCcfCoreZipFileLocation());
File ccfLandscapeDirectory = new File(getCcfHome(),
LANDSCAPE_DIRECTORY_PREFIX + context.getId());
FileUtils.forceMkdir(ccfLandscapeDirectory);
unzip(resource.getFile(), ccfLandscapeDirectory);
File landscapePropertyFile = new File(ccfLandscapeDirectory,
getImmutableLandscapePropertyFileName());
createProperties(context, landscapePropertyFile);
if (context.getVersion() != null) {
createFieldMappingLandscapeTemplates(context, new File(
ccfLandscapeDirectory, FIELDMAPPING_BASE_DIRECTORY));
}
} catch (IOException e) {
throw new CoreConfigurationException(
"Could not properly extract core for landscape "
+ context.getName() + ": " + e.getMessage(), e);
} catch (JAXBException e) {
throw new CoreConfigurationException(
"Could not parse Mapping Rule template for given landscape "
+ context.getName() + ": " + e.getMessage(), e);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private boolean isLandscapeOrientation(){\n return getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; \n }",
"boolean getLandscape();",
"public boolean isAutoRotateLandscape() {\n return autoRotateLandscape;\n }",
"public interface UseLandscape {\n}",
"public boolean isLandscape() {\n WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n Display display = wm.getDefaultDisplay();\n return display.getWidth() > display.getHeight();\n }",
"public void onLayoutOrientationChanged(boolean isLandscape);",
"public abstract boolean isPrimary();",
"public boolean isMasterDetailFlow();",
"public void checkRep()\n {\n assert (x>=0 && x<=19 && y >=0 && y<=19 && (orientation == 0 || orientation == 90 || orientation == 180 || orientation == 270));\n }",
"public void setAutoRotateLandscape(boolean value) {\n this.autoRotateLandscape = value;\n }",
"private boolean isLandscape(int orientationDegrees) {\n return (orientationDegrees == Constants.LANDSCAPE_90 ||\n orientationDegrees == Constants.LANDSCAPE_270);\n }",
"void setLandscape(boolean ls);",
"boolean getNoOrientation();",
"public void chechPortaitAndLandSacpe() {\n if (CompatibilityUtility.isTablet(BecomeHostLoginActivity.this)) {\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n } else {\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n }\n }",
"public void chechPortaitAndLandSacpe() {\n if (CompatibilityUtility.isTablet(BecomeHostActivity.this)) {\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n } else {\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n }\n }",
"@Override\n public boolean isKeepsOrientation() {\n return keepsOrientation;\n }",
"public final void accept(OnLandscapeCleanModeEvent pVar) {\n if (pVar.mo117801a()) {\n C29661a aVar = C29661a.f101034a;\n ConstraintLayout constraintLayout = (ConstraintLayout) this.f98827a.findViewById(R.id.one_container);\n C32569u.m150513a((Object) constraintLayout, C6969H.m41409d(\"G7F8AD00DF13FA52CD90D9F46E6E4CAD96C91\"));\n aVar.mo121384a((View) constraintLayout, false);\n C29661a aVar2 = C29661a.f101034a;\n AudioLinkContainer audioLinkContainer = (AudioLinkContainer) this.f98827a.findViewById(R.id.audio_link_container);\n C32569u.m150513a((Object) audioLinkContainer, C6969H.m41409d(\"G7F8AD00DF131BE2DEF01AF44FBEBC8E86A8CDB0EBE39A52CF4\"));\n aVar2.mo121384a((View) audioLinkContainer, false);\n C29661a aVar3 = C29661a.f101034a;\n View findViewById = this.f98827a.findViewById(R.id.view_landscape_top_bg);\n C32569u.m150513a((Object) findViewById, C6969H.m41409d(\"G7F8AD00DF126A22CF1319C49FCE1D0D46893D025AB3FBB16E409\"));\n aVar3.mo121384a(findViewById, false);\n C29661a aVar4 = C29661a.f101034a;\n View findViewById2 = this.f98827a.findViewById(R.id.view_landscape_bottom_bg);\n C32569u.m150513a((Object) findViewById2, C6969H.m41409d(\"G7F8AD00DF126A22CF1319C49FCE1D0D46893D025BD3FBF3DE903AF4AF5\"));\n aVar4.mo121384a(findViewById2, false);\n } else {\n C29661a aVar5 = C29661a.f101034a;\n ConstraintLayout constraintLayout2 = (ConstraintLayout) this.f98827a.findViewById(R.id.one_container);\n C32569u.m150513a((Object) constraintLayout2, C6969H.m41409d(\"G7F8AD00DF13FA52CD90D9F46E6E4CAD96C91\"));\n aVar5.mo121384a((View) constraintLayout2, true);\n C29661a aVar6 = C29661a.f101034a;\n AudioLinkContainer audioLinkContainer2 = (AudioLinkContainer) this.f98827a.findViewById(R.id.audio_link_container);\n C32569u.m150513a((Object) audioLinkContainer2, C6969H.m41409d(\"G7F8AD00DF131BE2DEF01AF44FBEBC8E86A8CDB0EBE39A52CF4\"));\n aVar6.mo121384a((View) audioLinkContainer2, true);\n C29661a aVar7 = C29661a.f101034a;\n View findViewById3 = this.f98827a.findViewById(R.id.view_landscape_top_bg);\n C32569u.m150513a((Object) findViewById3, C6969H.m41409d(\"G7F8AD00DF126A22CF1319C49FCE1D0D46893D025AB3FBB16E409\"));\n aVar7.mo121384a(findViewById3, true);\n C29661a aVar8 = C29661a.f101034a;\n View findViewById4 = this.f98827a.findViewById(R.id.view_landscape_bottom_bg);\n C32569u.m150513a((Object) findViewById4, C6969H.m41409d(\"G7F8AD00DF126A22CF1319C49FCE1D0D46893D025BD3FBF3DE903AF4AF5\"));\n aVar8.mo121384a(findViewById4, true);\n }\n FDManager.f98997a.mo119906b(pVar.mo117801a());\n }",
"private static boolean isLandscapePortraitValue(String pageSizeChunk) {\n return CssConstants.LANDSCAPE.equals(pageSizeChunk) || CssConstants.PORTRAIT.equals(pageSizeChunk);\n }",
"private boolean checkOrientation(int testedOrientation) {\n int orientation = getNavigationView().getContext().getResources().getConfiguration().orientation;\n return orientation == testedOrientation;\n }",
"public boolean isIsPrimary();",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t// Verifica la orientación\n\t\tcheckOrientation();\n\t}",
"private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }",
"@Test\n public final void testIsOrientation() {\n boolean result = ship.isOrientation();\n assertTrue(result);\n this.ship.setOrientation(false);\n result = ship.isOrientation();\n assertFalse(result);\n }",
"private boolean isGameMaster() {\n return mIsGameMaster;\n }",
"public static boolean isLandscape(Configuration configuration) {\n return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE;\n }",
"public boolean isRoomCenter() {\n\t\treturn roomCenter; \n\t}",
"@Before\n public void rotate(){\n onView(isRoot()).perform(orientationLandscape());\n }",
"public abstract float doLandscapeLayout(float screenWidth, float screenHeight);",
"@Override\n public boolean validate()\n {\n return inRSArea(TUTORIAL_ISLAND_ACC_CREATOR);\n }",
"public String orientation()\n {\n int height = cat.getWidth();\n int width = cat.getHeight();\n\n if (height >= width)\n {\n return \"landscape\";\n }\n else \n {\n return \"portrait\";\n\n }\n }",
"public boolean isHorizontalMode() throws PDFNetException {\n/* 627 */ return IsHorizontalMode(this.a);\n/* */ }",
"int getMinRotation();",
"public boolean isPrimary() {\n return false;\n }",
"public boolean isPrimary() {\n return false;\n }",
"boolean hasMajorFragmentId();",
"public boolean isPrimary()\r\n\t{\treturn this.primary;\t}",
"static boolean m6825a(Context context) {\n return context.getResources().getConfiguration().orientation == 2;\n }",
"public Orientation getOrientation(){return this.orientation;}",
"public int getOrientation(){ return mOrientation; }",
"public int getParentLayoutOrientation()\n {\n return parentOrientation;\n }",
"public void rotateShip(){\n if (this.orientation == false){\n this.orientation = true;\n }else\n orientation = false;\n \n return;\n }",
"private boolean orientationChange(HashMap<String, Float> orientation) {\n int variance = 10;\n\n if(!FunUtils.numberTollerance(orientation.get(\"azimuth\"), this.orientation.get(\"azimuth\"), variance)){\n return true;\n }\n\n if(!FunUtils.numberTollerance(orientation.get(\"pitch\"), this.orientation.get(\"pitch\"), variance)){\n return true;\n }\n // This used to be an 'if', But this is the asme as what i had, but with a few lines less code.\n if(!FunUtils.numberTollerance(orientation.get(\"roll\"), this.orientation.get(\"roll\"), variance)){\n return true;\n }\n return false;\n\n }",
"protected void allowRotation()\n\t{\n\t\tthis.rotationAllowed = true;\n\t}",
"public abstract void setRequestedOrientation(int requestedOrientation);",
"public void onSetOrientation() {\n }",
"public boolean getIsPrimary();",
"public boolean isOrientationCorrected() {\n\t\treturn orientationCorrection;\n\t}",
"private boolean multiview(){\n\t\treturn this.LOCAL_PIECE != null;\n\t}",
"protected void setPrimary(boolean primary)\r\n\t{\tthis.primary = primary;\t}",
"@Override\n\tpublic void setOrientation(float orientation) {\n\t\t\n\t}",
"@Override\n public void setKeepsOrientation(boolean value) {\n this.keepsOrientation = value;\n }",
"void setOrientation(int orientation) {\n }",
"public void setPreferredHorizontalOrientation(@HorizontalOrientation int orientation) {\n mPreferredHorizontalOrientation = orientation;\n }",
"public boolean isIsPrimary() {\r\n return isPrimary;\r\n }",
"@Override\n\tpublic boolean vender(Coche c) {\n\t\tif(c.getMarca()== coche1.getMarca()) {\n\t\t\tcoche1 = null;\n\t\t\treturn true;\n\t\t}else if(c.getMarca()== coche2.getMarca()) {\n\t\t\tcoche2 = null;\n\t\t\treturn true;\n\t\t}else if(c.getMarca()== coche2.getMarca()) {\n\t\t\tcoche2 = null;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"Landscape(int scl_, int w_, int h_) {\n scl = scl_;\n w = w_;\n h = h_;\n cols = w/scl;\n rows = h/scl;\n z = new float[cols][rows];\n }",
"void setNoOrientation(boolean orientation);",
"private void mLockScreenRotation()\n {\n switch (this.getResources().getConfiguration().orientation)\n {\n case Configuration.ORIENTATION_PORTRAIT:\n this.setRequestedOrientation(\n \t\tActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n break;\n case Configuration.ORIENTATION_LANDSCAPE:\n this.setRequestedOrientation(\n \t\tActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n break;\n }\n }",
"@Override\n public void onConfigurationChanged(Configuration config) {\n super.onConfigurationChanged(config);\n\n if (config.orientation == Configuration.ORIENTATION_PORTRAIT) {\n\n } else if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {\n\n }\n }",
"@Override // com.android.server.wm.WindowContainer\n public int getOrientation() {\n int orientation;\n if (DisplayContent.this.isStackVisible(3) || ((!HwFreeFormUtils.isFreeFormEnable() && DisplayContent.this.isStackVisible(5)) || (this.mDisplayContent != null && this.mWmService.mAtmService.mHwATMSEx.isSplitStackVisible(this.mDisplayContent.mAcitvityDisplay, -1)))) {\n TaskStack taskStack = this.mHomeStack;\n if (taskStack == null || !taskStack.isVisible() || !DisplayContent.this.mDividerControllerLocked.isMinimizedDock() || ((DisplayContent.this.mDividerControllerLocked.isHomeStackResizable() && this.mHomeStack.matchParentBounds()) || (orientation = this.mHomeStack.getOrientation()) == -2)) {\n return -1;\n }\n return orientation;\n }\n int orientation2 = super.getOrientation();\n if (this.mWmService.mContext.getPackageManager().hasSystemFeature(\"android.hardware.type.automotive\")) {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(DisplayContent.TAG, \"Forcing UNSPECIFIED orientation in car for display id=\" + DisplayContent.this.mDisplayId + \". Ignoring \" + orientation2);\n }\n return -1;\n } else if (orientation2 == -2 || orientation2 == 3) {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(DisplayContent.TAG, \"No app is requesting an orientation, return \" + DisplayContent.this.mLastOrientation + \" for display id=\" + DisplayContent.this.mDisplayId);\n }\n return DisplayContent.this.mLastOrientation;\n } else {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(DisplayContent.TAG, \"App is requesting an orientation, return \" + orientation2 + \" for display id=\" + DisplayContent.this.mDisplayId);\n }\n return orientation2;\n }\n }",
"public boolean isExplicitUniqueCheckRequired();",
"@Test\n public void needPortraitTest() {\n // TODO: test needPortrait\n }",
"void validateColocation(Cache cache) {\n if (colocatedRegionName == null) {\n return;\n }\n if (cache != null) {\n Region<?, ?> region = cache.getRegion(colocatedRegionName);\n if (region == null) {\n throw new IllegalStateException(\n \"Region specified in 'colocated-with' is not present. It should be created before setting 'colocated-with' to this region.\");\n }\n if (!(region instanceof PartitionedRegion)) {\n throw new IllegalStateException(\n \"Setting the attribute 'colocated-with' is supported only for PartitionedRegions\");\n }\n PartitionedRegion colocatedRegion = (PartitionedRegion) region;\n if (getTotalNumBuckets() != colocatedRegion.getPartitionAttributes()\n .getTotalNumBuckets()) {\n throw new IllegalStateException(\n \"Current PartitionedRegion's TotalNumBuckets should be same as TotalNumBuckets of colocated PartitionedRegion\");\n }\n if (getRedundancy() != colocatedRegion.getPartitionAttributes().getRedundantCopies()) {\n throw new IllegalStateException(\n \"Current PartitionedRegion's redundancy should be same as the redundancy of colocated PartitionedRegion\");\n }\n }\n }",
"public void setIsPrimary(boolean isPrimary);",
"public boolean hasIdentity() { return true; }",
"public boolean hasIdentity() { return true; }",
"public boolean isPortrait() {\n return mState.isPortrait;\n }",
"public boolean winner() {\n for(int i = 0; i < Landmarks.size(); i++) {\n if (Landmarks.get(i).getConstructed() == false) {\n return false;\n }\n }\n return true;\n }",
"public void setParentLayoutOrientation(int orientation)\n {\n parentOrientation = orientation;\n }",
"public boolean isMaster();",
"public void setOrientation(int orientation){\n //save orientation of phone\n mOrientation = orientation;\n }",
"public void onResume() {\n if (getRequestedOrientation() != 0) {\n setRequestedOrientation(0);\n }\n super.onResume();\n }",
"@java.lang.Override\n public boolean hasMajor() {\n return instance.hasMajor();\n }",
"private void checkPartitions(Affinity testAff, Affinity aff) {\n for (ClusterNode n : nodes()) {\n checkEqualIntArray(testAff.allPartitions(n), aff.allPartitions(n));\n\n checkEqualIntArray(testAff.backupPartitions(n), aff.backupPartitions(n));\n\n checkEqualIntArray(testAff.primaryPartitions(n), aff.primaryPartitions(n));\n }\n }",
"public T caseOrientation(Orientation object)\n {\n return null;\n }",
"public boolean isCube(){\n\t\treturn !cubeDetectorL.get() && !cubeDetectorR.get();\n\t}",
"boolean hasInstructor(){\n\t\treturn instructor == null ? false : true;\n\t}",
"public boolean hasOnlyOneCar(){\n\t\treturn this.cars.size()==1;\n\t}",
"public boolean isNeedMirrorSelfie() {\n return true;\n }",
"private boolean invariant() {\n\t\treturn (true);\n\t}",
"private int check(int tiles_per_cam_width) {\r\n\t\tif( left_map_scroll >= left_map_width) {\r\n\t\t\ttotal_maps++;\r\n\t\t\tmap[l()].dispose();\r\n\t\t\tleft_map = r();\r\n\t\t\tint random_map = (int)Math.round(2+Math.random()*14);\r\n\t\t\tif( left_map == 1 )\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\telse //for later\r\n\t\t\t\t_load(r(), random_map );\r\n\t\t\tint left_map_width_return = left_map_width;\r\n\t left_map_scroll -= left_map_width;\r\n\t\t\tleft_map_width = map[l()].\r\n\t\t\t\t\tgetProperties().get(\"width\", Integer.class);\r\n\t\t\tscrollCam( tiles_per_cam_width );\r\n\t\t\treturn left_map_width_return;\r\n\t\t}\r\n\t\tscrollCam( tiles_per_cam_width );\r\n\t\treturn 0;\r\n\t}",
"public boolean isMaybeSingleAllocationSite() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null && newSet(getObjectSourceLocations()).size() == 1;\n }",
"public boolean isScalene() {\n\t\t\tif(sideOne != sideTwo && sideTwo != sideThree && sideOne != sideThree) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public boolean getOrientationChanged(){ return mOrientationChange; }",
"boolean hasHotelCenter();",
"public void setNewOrientation(int value) {\n this.newOrientation = value;\n }",
"default void onOrientationChange(int orientation) { }",
"public void setOrientation(Orientation orientation)\n {\n this.orientation = orientation;\n }",
"private int calcDisplayOrientation(int screenOrientationDegrees) {\n if (mCameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {\n return (360 - (mCameraInfo.orientation + screenOrientationDegrees) % 360) % 360;\n } else { // back-facing\n return (mCameraInfo.orientation - screenOrientationDegrees + 360) % 360;\n }\n }",
"public void commonBeforeLogic()\n {\n int liApplID = 0;\n\n // Default Application ID\n if (getAPPL_ID() == 0)\n {\n try\n {\n liApplID = AMSStringUtil.convertStringToInt(AMSParams.msPrimaryApplication);\n\n // Let value stay null if not valid\n if (liApplID > 0)\n {\n setAPPL_ID(liApplID);\n }\n }\n catch (Exception foException)\n {\n liApplID = 0;\n }\n } // end if (getAPPL_ID() == 0)\n }",
"static void determineOrientation(Triangulator triRef, int ind) {\n\tdouble area;\n\n\t// compute the polygon's signed area, i.e., its orientation.\n\tarea = polygonArea(triRef, ind);\n\n\t// adjust the orientation (i.e., make it CCW)\n\tif (area < 0.0) {\n\t triRef.swapLinks(ind);\n\t triRef.ccwLoop = false;\n\t}\n\n }",
"@Override\n public void onConfigurationChanged(Configuration newConfig) {\n try {\n super.onConfigurationChanged(newConfig);\n if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n\n } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public boolean isScalene() {\n\t\t\tif (this.sideOne != this.sideTwo && this.sideOne != this.sideThree && this.sideTwo != this.sideThree) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public boolean hasSplitScreenPrimaryStack() {\n return getSplitScreenPrimaryStack() != null;\n }",
"boolean hasIdentity();",
"protected boolean isOnSameScreenAsChildren() {\n return true;\n }",
"String getLockOrientationPref();",
"@Override\r\n\tpublic void majMemoireIA() {\r\n\t}",
"public void checkCubeInRobot() {\n\t\tRobotMap.pinThree.set(!RobotMap.cubeInRobot.get());\n\t}",
"public String getOrientation() {\n\n if(getResources().getDisplayMetrics().widthPixels > \n getResources().getDisplayMetrics().heightPixels) { \n return \"LANDSCAPE\";\n } else {\n return \"PORTRAIT\";\n } \n \n }"
] |
[
"0.60432357",
"0.58882153",
"0.5618269",
"0.5606888",
"0.5571672",
"0.52892745",
"0.52746713",
"0.524888",
"0.52243084",
"0.5208113",
"0.5192791",
"0.5186229",
"0.5158134",
"0.51490456",
"0.5144361",
"0.5135751",
"0.51199037",
"0.5115518",
"0.51145464",
"0.5099499",
"0.5096338",
"0.50544417",
"0.4976579",
"0.49224696",
"0.49159917",
"0.49157196",
"0.48838007",
"0.48763642",
"0.48724404",
"0.48469722",
"0.48419338",
"0.483145",
"0.47995713",
"0.47995713",
"0.47948238",
"0.4782952",
"0.47795066",
"0.47756556",
"0.47608778",
"0.47499105",
"0.47433513",
"0.47390607",
"0.47322336",
"0.47272062",
"0.47116095",
"0.46921897",
"0.46897635",
"0.46896544",
"0.46887285",
"0.46812358",
"0.4675811",
"0.4648613",
"0.46399054",
"0.46223998",
"0.46081135",
"0.46077797",
"0.460252",
"0.46013853",
"0.4586183",
"0.45857477",
"0.45841852",
"0.45802015",
"0.45762017",
"0.45756784",
"0.45741233",
"0.45741233",
"0.45710054",
"0.45663348",
"0.4550819",
"0.45460343",
"0.45458317",
"0.45445883",
"0.45427725",
"0.45339552",
"0.4531347",
"0.4530294",
"0.45302537",
"0.45087868",
"0.45069548",
"0.45033446",
"0.45013252",
"0.450086",
"0.44955927",
"0.44944876",
"0.44939634",
"0.44924927",
"0.44904637",
"0.4490385",
"0.44893718",
"0.44889942",
"0.44826594",
"0.44823825",
"0.4480153",
"0.44785342",
"0.44746816",
"0.4470272",
"0.4469843",
"0.4469371",
"0.4465173",
"0.4461762"
] |
0.5037137
|
22
|
figure out whether templates directory exist
|
private void createFieldMappingLandscapeTemplatesForDirection(
Landscape context, File parentDirectory, Directions direction)
throws IOException, JAXBException {
File fieldMappingTemplatesDirectory = new File(parentDirectory,
FIELD_MAPPING_LANDSCAPE_TEMPLATE_DIRECTORY_NAME);
if (fieldMappingTemplatesDirectory.isDirectory()) {
for (String child : fieldMappingTemplatesDirectory.list()) {
File childDirectory = new File(fieldMappingTemplatesDirectory,
child);
if (childDirectory.isDirectory()) {
createFieldMappingLandscapeTemplate(context,
childDirectory, direction);
}
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean hasTemplates() {\n\t\treturn loader.<TemplateController>getController().hasTemplates();\n\t}",
"public boolean sourceExists(String name) {\n \treturn mTemplates.containsKey(name);\n }",
"private boolean directoryExists() {\n if (Meta.getInstance().containDirectory(dirName))\n return true;\n else\n return false;\n }",
"boolean hasDirName();",
"public Boolean isExist() {\n\t\tif(pfDir.exists())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean sourceExists(String name) {\n return mTemplateMap.containsKey(name);\n }",
"private boolean isSourceDirectory(Project project, String sourceDirectory) {\r\n\t\tboolean result=false;\r\n\t\tif(sourceDirectory!=null&&(!sourceDirectory.equals(\"gen\"))){\r\n\t\t\tresult=true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"boolean hasSrcPath();",
"boolean hasInodeDirectory();",
"boolean hasFileLocation();",
"@Override\n\tpublic boolean pathExists(String path) {\n\t\treturn false;\n\t}",
"private boolean allSourcePathsExist(List<String> sourcePath) {\n\t\tfor (Iterator<String> ii = sourcePath.iterator(); ii.hasNext();) {\n\t\t\tString dirName = ii.next();\n\t\t\tFile dir = new File(getDirectory().getAbsolutePath() + \"/\"\n\t\t\t\t\t+ dirName);\n\t\t\tif (!dir.exists())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean directoryExists(String path) throws IOException;",
"@Override\n public boolean isEmailTemplateExists(String templateTypeDisplayName, String locale, String tenantDomain)\n throws I18nEmailMgtException {\n String normalizedTemplateName = I18nEmailUtil.getNormalizedName(templateTypeDisplayName);\n String path = EMAIL_TEMPLATE_PATH + PATH_SEPARATOR + normalizedTemplateName +\n PATH_SEPARATOR + locale.toLowerCase();\n\n try {\n Resource template = resourceMgtService.getIdentityResource(path, tenantDomain);\n return template != null;\n } catch (IdentityRuntimeException e) {\n String error = String.format(\"Error when retrieving email templates of %s tenant.\", tenantDomain);\n throw new I18nEmailMgtServerException(error, e);\n }\n }",
"boolean hasSessionTemplate();",
"public boolean exists(String path);",
"public boolean isDirectory();",
"private static boolean doesPathExist(final Path path, final FileContext context) throws AccessControlException, UnsupportedFileSystemException, IOException {\n\t\ttry {\n\t\t\tFileStatus status = context.getFileStatus(path);\n\t\t\treturn status.isFile() || status.isDirectory();\n\t\t} catch (FileNotFoundException e) {\n\t\t\treturn false; \n\t\t}\t\t\n\t}",
"@Override\n\tpublic boolean exists() {\n\t\treturn Files.exists(this.path);\n\t}",
"boolean hasFileLoc();",
"public static boolean checkAppFileDirectory(Context context) {\n\t\ttry {\n\t\t\tfinal String imageDir = getAppFilesDirByData(context);\n\t\t\tfinal File imageFileDir = new File(imageDir);\n\t\t\tif (!imageFileDir.exists()) {\n\t\t\t\tfinal boolean isMkdirs = imageFileDir.mkdirs();\n\t\t\t\treturn isMkdirs;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\n\t}",
"boolean hasFilePath();",
"public void checkTemplateOnPath(PartialPath path) throws MetadataException {\n String[] nodeNames = path.getNodes();\n IMNode cur = root;\n IMNode child;\n\n if (cur.getSchemaTemplateId() != NON_TEMPLATE) {\n throw new MetadataException(\"Template already exists on \" + cur.getFullPath());\n }\n\n for (int i = 1; i < nodeNames.length; i++) {\n child = cur.getChild(nodeNames[i]);\n if (child == null) {\n return;\n }\n cur = child;\n if (cur.getSchemaTemplateId() != NON_TEMPLATE) {\n throw new MetadataException(\"Template already exists on \" + cur.getFullPath());\n }\n if (cur.isMeasurement()) {\n return;\n }\n }\n\n checkTemplateOnSubtree(cur);\n }",
"public static boolean createDirIfNotExists(SourceFile sourceFile) throws IOException {\n return createDirIfNotExists(sourceFile.getPath(), sourceFile.getSourceType());\n }",
"public String getTemplatePath() {\n this.defaultPath = defaultPath.endsWith(File.separator) ? defaultPath : defaultPath + File.separator;\n\n if (Paths.get(defaultPath).toFile().mkdirs()) {\n //Throw exception, couldn't create directories\n }\n\n return defaultPath + (defaultName != null ? defaultName + \".\" + extensionPattern : \"\");\n }",
"public boolean exists() {\n\t\t\n\t\tFile temp = new File(this.path);\n\t\treturn temp.exists();\n\t}",
"public boolean isDir() { return _entry==null; }",
"private boolean doesCVSDirectoryExist() {\n \t\tShell shell = null;\n \t\tif (getContainer() != null) {\n \t\t\tshell = getContainer().getShell();\n \t\t}\n \t\tfinal boolean[] isCVSFolder = new boolean[] { false };\n \t\ttry {\n \t\t\tCVSUIPlugin.runWithRefresh(shell, new IResource[] { project }, new IRunnableWithProgress() {\n \t\t\t\tpublic void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n \t\t\t\t\ttry {\n \t\t\t\t\t\tICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);\n \t\t\t\t\t\tFolderSyncInfo info = folder.getFolderSyncInfo();\n \t\t\t\t\t\tisCVSFolder[0] = info != null;\n \t\t\t\t\t} catch (final TeamException e) {\n \t\t\t\t\t\tthrow new InvocationTargetException(e);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}, null);\n \t\t} catch (InvocationTargetException e) {\n \t\t\tCVSUIPlugin.openError(shell, null, null, e);\n \t\t} catch (InterruptedException e) {\n \t\t}\n \t\treturn isCVSFolder[0];\n \t}",
"@Override\n public boolean isEmailTemplateTypeExists(String templateTypeDisplayName, String tenantDomain)\n throws I18nEmailMgtException {\n String normalizedTemplateName = I18nEmailUtil.getNormalizedName(templateTypeDisplayName);\n String path = EMAIL_TEMPLATE_PATH + PATH_SEPARATOR + normalizedTemplateName;\n\n try {\n Resource templateType = resourceMgtService.getIdentityResource(path, tenantDomain);\n return templateType != null;\n } catch (IdentityRuntimeException e) {\n String error = String.format(\"Error when retrieving email templates of %s tenant.\", tenantDomain);\n throw new I18nEmailMgtServerException(error, e);\n }\n }",
"@Test\r\n\tpublic void checkGetTemplates() throws MalformedURLException, IOException {\r\n\r\n\t\tITemplate temp = general.getTemplate(\"specific\");\r\n\t\tassertEquals(\"generalTemplate\", temp.toString());\r\n\r\n\t\tString secondTemp = AbstractDresdenOclTest\r\n\t\t\t\t.getFile(\"/resources/templates/testSpecific.stg\",\r\n\t\t\t\t\t\tTemplateTestPlugin.ID).getAbsolutePath();\r\n\t\tITemplateGroup testSuper1 = null;\r\n\t\ttry {\r\n\t\t\ttestSuper1 = TemplatePlugin.getTemplateGroupRegistry()\r\n\t\t\t\t\t.addDefaultTemplateGroup(\"TestSuper1\", general);\r\n\t\t\ttestSuper1.addFile(secondTemp);\r\n\t\t} catch (TemplateException e) {\r\n\t\t\tfail(\"Can't set TemplateGroup testSuper1\");\r\n\t\t}\r\n\r\n\t\ttemp = testSuper1.getTemplate(\"specific\");\r\n\t\tassertEquals(\"specificTemplate\", temp.toString());\r\n\r\n\t\ttemp = general.getTemplate(\"specific2\");\r\n\t\tassertNull(temp);\r\n\r\n\t\tITemplateGroup testSuper2 = null;\r\n\t\ttry {\r\n\t\t\ttestSuper2 = TemplatePlugin.getTemplateGroupRegistry()\r\n\t\t\t\t\t.addDefaultTemplateGroup(\"TestSuper2\", testSuper1);\r\n\t\t\ttestSuper2.addFile(AbstractDresdenOclTest\r\n\t\t\t\t\t.getFile(\"/resources/templates/testGeneral.stg\",\r\n\t\t\t\t\t\t\tTemplateTestPlugin.ID).getAbsolutePath());\r\n\t\t} catch (TemplateException e) {\r\n\t\t\tfail(\"Can't set TemplateGroup testSuper2\");\r\n\t\t}\r\n\r\n\t\ttemp = testSuper2.getTemplate(\"specific2\");\r\n\t\tassertNotNull(temp);\r\n\t\tassertEquals(\"specificTemplate\", temp.toString());\r\n\r\n\t}",
"private boolean isFileExist() {\n File check_file = getFilesDir();\n File[] file_check_array = check_file.listFiles();\n for (File current : file_check_array) {\n boolean user_file = isValidName(current.getName());\n if (user_file) {\n return true;\n }\n }\n return false;\n }",
"public boolean hasTaskContext() {\n\t\tFile folder = new File(folderPath);\n\t\t\n\t\tFile[] zipFiles = folder.listFiles(zipfilter);\n\t\t\n\t\tif ((zipFiles.length > 0)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean checkFileExists(String file) {\n boolean exist = false;\n File tmpFile = new File(\"./levels/\" + file);\n if (tmpFile.exists()) {\n // file exists\n exist = true;\n }\n return exist;\n }",
"boolean exists(String path) throws IOException;",
"public boolean exists() {\n return Files.exists(path);\n }",
"boolean shouldAllowMissingSourceDir() {\n return allowMissingSourceDir;\n }",
"private boolean IsCfgExisted()\n {\n File f = new File(strCfgPath);\n if(f.exists())\n return true;\n return false;\n }",
"boolean isDoNotRegenerateJspFiles();",
"protected abstract boolean pathExists(@NonNull String path, T context);",
"public boolean isDir() { return false; }",
"public boolean cacheExist(){\n\t\tFile f = new File(\"./cache.txt\");\n\t\tif(f.exists() && !f.isDirectory()){\n\t\t\t//if the cache is exist\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void testThemeDirectoryAccessible() {\n File file = new File(rootBlog.getRoot(), \"theme\");\n assertEquals(file, new File(rootBlog.getThemeDirectory()));\n assertFalse(file.exists());\n }",
"public boolean exist() {\n\t\treturn false;\n\t}",
"private boolean fileExists(Path p) {\n\t\treturn Files.exists(p);\n\t}",
"@Override\n public boolean isDir() { return true; }",
"boolean existsPath(String requestedUrl);",
"@Override\n public URL getTemplateLocation() {\n try {\n String[] candidates = getDirectoryCandidates();\n for (int i = 0; i < candidates.length; i++) {\n if (Activator.getDefault().getBundle().getEntry(candidates[i]) != null) {\n URL candidate = new URL(getInstallURL(), candidates[i]);\n return candidate;\n }\n }\n } catch (MalformedURLException e) { // do nothing\n }\n return null;\n }",
"abstract public boolean exists( String path )\r\n throws Exception;",
"public abstract boolean doesExist();",
"public static boolean alreadyExistCheck(String filePath) {\n File f = new File(filePath);\n return f.exists() && !f.isDirectory();\n }",
"@Override\n public boolean isDirectory(File directory) {\n\treturn false;\n }",
"private boolean createGitletDirectory(){\n File dir = new File(Utils.GITLET_DIR);\n\n if(!dir.exists()){\n dir.mkdir();\n\n } else {\n System.out.println(\"A gitlet version-control system already exists in the current directory.\");\n return false;\n }\n\n File commitDir = Utils.join(Utils.GITLET_DIR, Utils.COMMIT_DIR);\n\n if(!commitDir.exists()){\n commitDir.mkdir();\n }\n\n File blobDir = Utils.join(Utils.GITLET_DIR, Utils.BLOBS_DIR);\n\n if (!blobDir.exists()){\n blobDir.mkdir();\n }\n return true;\n }",
"static boolean isXMLTemplate(String name) {\n if (name == null) {\n return false;\n }\n name = name.toLowerCase();\n return name.matches(\"msxml\\\\d*\\\\.xsltemplate.*\");\n }",
"boolean getWorkfileExists();",
"public boolean isGlobalPolicyKeyTemplateExists(GlobalPolicy policy) throws APIManagementException {\n return apiMgtDAO.isKeyTemplatesExist(policy);\n }",
"protected boolean resourceExists() {\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tif (workspace == null)\n\t\t\treturn false;\n\t\treturn RodinDB.getTarget(workspace.getRoot(), this.getPath()\n\t\t\t\t.makeRelative(), true) != null;\n\t}",
"public boolean pathExists (String path) {\n\n File file = new File(path);\n\n if (!file.exists()) {\n return false;\n }\n return true;\n }",
"private boolean exists(String pathName)\n {\n if(new File(pathName).exists())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"static boolean m1(Path path) {\n\t\tif (Files.exists(path))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"private boolean indexDirIsEmpty(File indexDir) {\n if (!indexDir.exists()) {\n // dir doesn't even exist yet. Create the parents and return true\n indexDir.mkdirs();\n return true;\n }\n\n // Empty directory is okay, but a directory with any files\n // implies index corruption.\n\n File[] files = indexDir.listFiles();\n\n // if files is null here, we are likely running into file permission issue\n // log a WARN and return false\n if (files == null) {\n ZimbraLog.index.warn(\"Could not list files in directory \" + indexDir.getAbsolutePath());\n return false;\n }\n\n int numFiles = 0;\n for (int i = 0; i < files.length; i++) {\n File f = files[i];\n String fname = f.getName();\n if (f.isDirectory() && (fname.equals(\".\") || fname.equals(\"..\")))\n continue;\n numFiles++;\n }\n return (numFiles <= 0);\n }",
"public final boolean isDirectory() {\n\t return m_fileStatus == FileStatus.DirectoryExists ? true : false;\n\t}",
"boolean isDirectory() throws IOException;",
"public static boolean pathExists(String path){\n\t\treturn( (new File(path)).exists() );\n\t}",
"@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}",
"boolean fileExists(String path) throws IOException;",
"boolean hasUpdateInodeDirectory();",
"public boolean isDirectory()\n\t{\n\t\tFile temp = new File(this.path);\n\t\treturn temp.isDirectory();\n\t}",
"public static boolean checkFileDirectory() {\n\t\ttry {\n\t\t\tfinal File dir = new File(FINAL_SAVE_MEDIA_PATH);\n\t\t\tif (!dir.exists()) {\n\t\t\t\tfinal boolean isMkdirs = dir.mkdirs();\n\t\t\t\treturn isMkdirs;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isSetStaticWorkingDir() {\n return this.staticWorkingDir != null;\n }",
"protected abstract boolean isDirectory(@NonNull String path, T context);",
"@Override\r\n\tpublic boolean isDir(String path) {\n\t\treturn false;\r\n\t}",
"boolean isTemplated() {\n\t\treturn this.templated;\n\t}",
"private static boolean checkDirectory() {\n File baseDir = new File(Environment.getExternalStorageDirectory(), \"Andevindo\");\n mImageDir = new File(baseDir.getPath() + File.separator + \"Images\");\n mVideoDir = new File(baseDir.getPath() + File.separator + \"Videos\");\n mMiscDir = new File(baseDir.getPath() + File.separator + \"Misc\");\n if (!baseDir.exists()) {\n if (!baseDir.mkdirs()) {\n\n return false;\n } else {\n\n\n if (!mImageDir.exists()) {\n if (!mImageDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mVideoDir.exists()) {\n if (!mVideoDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mMiscDir.exists()) {\n if (!mMiscDir.mkdirs()) {\n\n return false;\n }\n }\n\n }\n }\n return true;\n }",
"@Override\n public boolean exists(File file) {\n\treturn false;\n }",
"boolean hasFileInfo();",
"boolean hasFileInfo();",
"private void checkIfLocationExists() {\n try {\n File file = new File(saveLocation);\n if(!file.exists()) file.mkdirs();\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }",
"public boolean isFileExists(String fileName) {\n return profilesMap.containsKey(fileName);\n }",
"Path getHasPath();",
"public void checkIfXslCreated() {\n final File extStore = Environment.getExternalStorageDirectory();\n File myFile = new File(extStore.getAbsolutePath() + \"/backup/\" + fileName);\n\n if (myFile.exists()) {\n Log.d(\"YES\", \"YES\");\n } else {\n Log.d(\"NO\", \"NO\");\n }\n }",
"private boolean touchFileExists() {\n File f = new File(touchFile);\n return f.exists();\n }",
"public Object findTemplateSource(String name)\r\n/* 33: */ throws IOException\r\n/* 34: */ {\r\n/* 35:67 */ if (this.logger.isDebugEnabled()) {\r\n/* 36:68 */ this.logger.debug(\"Looking for FreeMarker template with name [\" + name + \"]\");\r\n/* 37: */ }\r\n/* 38:70 */ Resource resource = this.resourceLoader.getResource(this.templateLoaderPath + name);\r\n/* 39:71 */ return resource.exists() ? resource : null;\r\n/* 40: */ }",
"private boolean hasTFoot() {\r\n\t\treturn null != this.getTFoot();\r\n\t}",
"@Override\n\tpublic boolean isInit() {\n\t\tFile path = new File(initService.defaultAddr);\n\t\tif(!path.exists()) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tFile set = new File(initService.defaultAddr+initFile);\n\t\tif(!set.exists()) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean isPackageDir(WebFile aFile)\n {\n if (!aFile.isDir())\n return false;\n if (aFile.getName().indexOf('.') > 0)\n return false;\n String path = aFile.getPath();\n if (isIgnorePath(path))\n return false;\n return true;\n }",
"public final boolean fileExists() {\n\t if ( m_fileStatus == FileStatus.FileExists || m_fileStatus == FileStatus.DirectoryExists)\n\t return true;\n\t return false;\n\t}",
"public boolean isDirectory(String path);",
"@Test\n public void testTemplate1() throws Exception {\n TemplateWebApplication webApp = new TemplateWebApplication(\"src/main/template1\");\n webApp.initialize();\n webApp.start();\n\n TemplateHttpServletRequest request = new TemplateHttpServletRequest();\n request.setWebApplication(webApp);\n request.setContextPath(\"\");\n request.setServletPath(\"/faces\");\n request.setPathInfo(\"/notfound.html\");\n\n TemplateHttpServletResponse response = new TemplateHttpServletResponse();\n TemplateServletOutputStream outputStream = new TemplateServletOutputStream();\n response.setOutputStream(outputStream);\n outputStream.setResponse(response);\n\n webApp.service(request, response);\n\n assertEquals(404, response.getStatus());\n }",
"public boolean isNoDirs(String path) {\r\n\t\t// We setup the path to search.\r\n\t\tFile file = new File(path);\r\n\t\tFile[] files = file.listFiles(File::isDirectory);\r\n\r\n\t\t// We check how many directories we find.\r\n\t\tif (files.length == 0) {\r\n\t\t\t// We find 0, so we return true.\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t// We find some, so we return false.\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"boolean hasInodeDirectoryIdGenerator();",
"@Test\n public void testFileInDirectoryFileDoesNotExists() {\n\n assertFalse(parent.fileInDirectory(\"file1\"));\n }",
"public boolean serviceDirectoryIsEmpty(String serviceID){\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n return listOfFiles.length == 0;\n }\n \n return true;\n \n }",
"private boolean isDir(String fileName) {\n return !fileName.contains(\".\");\n }",
"public static boolean isSameTemplate(String templateName) {\n return trialWizardPreferences.get(CURRENT_TEMPLATE, \"__\").equals(templateName);\n }",
"public boolean fileExists(String name){\r\n try{\r\n new BufferedReader(new FileReader(\"../profiles/\" + name + \".profile\"));\r\n return true;\r\n }\r\n catch(FileNotFoundException e){\r\n return false;\r\n }\r\n }",
"private void checkTemplateOnSubtree(IMNode node) throws MetadataException {\n if (node.isMeasurement()) {\n return;\n }\n IMNode child;\n IMNodeIterator iterator = store.getChildrenIterator(node);\n while (iterator.hasNext()) {\n child = iterator.next();\n\n if (child.isMeasurement()) {\n continue;\n }\n if (child.getSchemaTemplateId() != NON_TEMPLATE) {\n throw new MetadataException(\"Template already exists on \" + child.getFullPath());\n }\n checkTemplateOnSubtree(child);\n }\n }",
"public boolean exists() {\n return _file.exists();\n }",
"private static boolean fileExists(String filename) {\n return new File(filename).exists();\n }",
"boolean hasDocument(String path);",
"public boolean hasTaskContextModel() {\n\t\tFile folder = new File(folderPath);\n\t\t\n\t\tFile[] jsonFiles = folder.listFiles(jsonfilter);\n\t\t\n\t\tif ((jsonFiles.length >0)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean canFinish() {\n ITemplateSection[] sections = fSelectionPage.getSelectedTemplates();\n for (int i = 0; i < sections.length; i++) {\n int pageCount = sections[i].getPageCount();\n for (int j = 0; j < pageCount; j++) {\n WizardPage page = sections[i].getPage(j);\n if (page != null && !page.isPageComplete())\n return false;\n }\n }\n return true;\n }"
] |
[
"0.70473444",
"0.65756303",
"0.6331129",
"0.6161675",
"0.61286026",
"0.60858643",
"0.59930384",
"0.5862262",
"0.5839819",
"0.5835473",
"0.58353585",
"0.58305246",
"0.5826317",
"0.5806152",
"0.5791035",
"0.5790846",
"0.57687527",
"0.5739653",
"0.56972426",
"0.56892365",
"0.5686069",
"0.5653252",
"0.5648854",
"0.5636674",
"0.56280816",
"0.5600866",
"0.5588576",
"0.5584078",
"0.55761987",
"0.55605125",
"0.5556905",
"0.5540159",
"0.55208755",
"0.55178976",
"0.5511361",
"0.54819834",
"0.547441",
"0.5469564",
"0.5464443",
"0.5430658",
"0.5401088",
"0.53939885",
"0.53901887",
"0.5389414",
"0.5379382",
"0.5365541",
"0.5353711",
"0.5348972",
"0.53409696",
"0.53396183",
"0.53363234",
"0.53257483",
"0.5316428",
"0.5311088",
"0.5309633",
"0.53020656",
"0.52979046",
"0.52943605",
"0.52839893",
"0.52762604",
"0.52741724",
"0.52736604",
"0.52679473",
"0.5267598",
"0.5254406",
"0.5252451",
"0.5250714",
"0.5250024",
"0.52483696",
"0.52458066",
"0.52385384",
"0.5231791",
"0.52309436",
"0.52253973",
"0.5195658",
"0.5195658",
"0.51882297",
"0.5174668",
"0.5171028",
"0.5165698",
"0.5155367",
"0.5133067",
"0.5129484",
"0.5120358",
"0.51203424",
"0.51123327",
"0.5109517",
"0.5104954",
"0.51033443",
"0.5102376",
"0.5101215",
"0.50970966",
"0.5093368",
"0.50928026",
"0.5092604",
"0.5085852",
"0.5083318",
"0.5081545",
"0.50759107",
"0.50752735",
"0.5074563"
] |
0.0
|
-1
|
check for correct answer first
|
@Override
public void onClick(View view) {
if(choicesRG.getCheckedRadioButtonId() == questionList.get(currentQuestionIndex).getAnswerIndex())
correctAnswers++;
Log.d("test", "Submitted: " + Integer.toString(choicesRG.getCheckedRadioButtonId()));
currentQuestionIndex++;
if(currentQuestionIndex < questionList.size()) {
loadQuestion(questionList.get(currentQuestionIndex));
}
else{
//go to stats activity
Intent statsIntent = new Intent(TriviaActivity.this, StatsActivity.class);
Log.d("test", "Initiate Stats Activity");
//Log.d("test", "Correct Answers: " + correctAnswers + "/" + questionList.size());
statsIntent.putExtra(MainActivity.PERCENT_KEY, (double)correctAnswers/(double)questionList.size());
Log.d("test", "Sending double: " + (double)correctAnswers/(double)questionList.size());
statsIntent.putExtra(MainActivity.QUESTION_LIST_KEY, questionList);
finish();
startActivity(statsIntent);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"boolean hasCorrectAnswer();",
"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}",
"boolean hasCorrect();",
"java.lang.String getCorrectAnswer();",
"@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}",
"int getWrongAnswers();",
"boolean getCorrect();",
"private void detectCorrectAnswer() {\n switch (chapterSection) {\n case 5:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\")) {\n ansCorrect = true;\n }\n break;\n case 6:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\")) {\n ansCorrect = true;\n }\n break;\n case 7:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\")) {\n ansCorrect = true;\n }\n break;\n case 8:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\")) {\n ansCorrect = true;\n }\n break;\n }\n }",
"public void checkAnswer(int answer) {\n int correctAns = Integer.MIN_VALUE;\n \n switch (currentOperator) {\n case PLUS: correctAns = leftNumPanel.num + rightNumPanel.num; break;\n case MINUS: correctAns = leftNumPanel.num - rightNumPanel.num; break;\n case TIMES: correctAns = leftNumPanel.num * rightNumPanel.num; break;\n case DIVIDE: correctAns = leftNumPanel.num / rightNumPanel.num;\n }\n \n boolean gotItRight = (answer == correctAns);\n feedbackPanel.showFeedback(gotItRight);\n if (gotItRight) {\n setNewNumbers();\n score++;\n \n switch (currentOperator) {\n case PLUS: correctCount[0]++; break;\n case MINUS: correctCount[1]++; break;\n case TIMES: correctCount[2]++; break;\n case DIVIDE: correctCount[3]++; break;\n }\n \n if (inGame) {\n clockPanel.giveBonusTime();\n }\n \n } else {\n // got it wrong\n if (inGame) {\n clockPanel.takeOffTime();\n }\n }\n }",
"public void checkAnswer() {\n }",
"public void checkCorrect() {\n\t\t \n\t\t if(rb1.isSelected()) {\n\t\t\t if(rb1.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb2.isSelected()) {\n\t\t\t if(rb2.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb3.isSelected()) {\n\t\t\t if(rb3.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb4.isSelected()) {\n\t\t\t if(rb4.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t }",
"protected int checkIfCorrect(String answer, String correctAns)\r\n {\r\n if (correctAns.equals(answer))\r\n {\r\n System.out.println(\"Awsome job!\");\r\n return score++;\r\n }\r\n else \r\n { \r\n System.out.println(\"opps\"); \r\n return score;\r\n }\r\n \r\n }",
"private boolean checkAnswered(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If no option selected, the question hasn't been answered\n if (checkedRadioButtonId == -1) {\n return false;\n }\n // If an option is selected, the question as been answered\n else{\n return true;\n }\n }",
"protected boolean guessAnswer(String answer) {\n if (answer.equals(correctAnswer)) {\n currentScore++;\n nextQuestion();\n return true;\n } else {\n nextQuestion();\n return false;\n }\n }",
"private void checkAnswer()\r\n\t{\r\n\t\t//Submission to the model and getting 'true' if correct and 'false' otherwise\r\n\t\tboolean response = quizModel.isCorrect(group.getSelection().getActionCommand());\r\n\t\t\r\n\t\t//Updating score label based on result\r\n\t\tif (response == true)\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Correct answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Incorrect answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t}",
"public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}",
"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 }",
"private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}",
"private void checkAsk(FyQuestion q, FyAnswer a) {\n\t\treturn;\r\n\t}",
"public void checkAnswer(View view) {\n TextView tv=findViewById(R.id.question);\n String question=tv.getText().toString();\n\n //split the question into numbers\n String [] numbers=question.split(\"X\");\n\n\n //convert the numbers into integer\n Integer num1, num2;\n num1=Integer.valueOf(numbers[0]);\n num2=Integer.valueOf(numbers[1]);\n\n\n user=findViewById(R.id.printAns);\n ans=findViewById(R.id.answer);\n Integer uer=Integer.parseInt(ans.getText().toString());\n\n\n\n int total=uer;\n\n\n if (num1*num2==total){\n user.setText(\"Your answer is correct\");\n\n }else{\n user.setText(\"Try Again\");\n }\n\n\n\n }",
"Boolean getPartiallyCorrect();",
"private boolean hasAnswereredCorrectly(int optionId) {\n boolean answeredCorrectly = false;\n QuestionModel questionModel = mGameModel.getQuestion();\n for(OptionModel option : questionModel.getOptions()) {\n if(option.getOptionId() == optionId) {\n answeredCorrectly = option.isCorrectAnswer();\n break;\n }\n }\n if(answeredCorrectly) {\n Toast.makeText(getApplicationContext(), \"Correct Answer!\", Toast.LENGTH_LONG).show();\n if(isGameMaster()) {\n mGameModel.getGameMaster().setScore(mGameModel.getGameMaster().getScore() + 1);\n } else {\n mGameModel.getGameSlave().setScore(mGameModel.getGameSlave().getScore() + 1);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Wrong Answer!\", Toast.LENGTH_LONG).show();\n }\n return answeredCorrectly;\n }",
"Boolean getCompletelyCorrect();",
"private boolean isCorrect() {\n return !console.getTrueFalse(\"Is this correct?>>> \");\n }",
"public void checkAnswer(){\n int selectedRadioButtonId = radioTermGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioSelected = findViewById(selectedRadioButtonId);\n\n String term = radioSelected.getText().toString();\n String definition = tvDefinition.getText().toString();\n\n if (Objects.equals(termsAndDefinitionsHashMap.get(term), definition)) {\n correctAnswers += 1;\n Toast.makeText(ActivityQuiz.this, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(ActivityQuiz.this, \"Incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n tvCorrectAnswer.setText(String.format(\"%s\", correctAnswers));\n }",
"public void checkAnswerOne() {\n RadioGroup ans1 = findViewById(R.id.radio_gr_q1);\n int radioButtonId = ans1.getCheckedRadioButtonId();\n\n if (radioButtonId == R.id.a2_q1) {\n points++;\n }\n }",
"public void checkIfCorrect(Note answer){\n Note tmpNote = answer;\n Tone tmpTone = tmpNote.getTone();\n boolean isSharp = tmpNote.isSharp();\n String checkCorrect = \"\";\n\n //Normal Keys\n if(tmpTone.equals(Tone.A) && !isSharp)\n checkCorrect = \"A\";\n else if(tmpTone.equals(Tone.B) && !isSharp)\n checkCorrect = \"B\";\n else if(tmpTone.equals(Tone.C) && !isSharp)\n checkCorrect = \"C\";\n else if(tmpTone.equals(Tone.D) && !isSharp)\n checkCorrect = \"D\";\n else if(tmpTone.equals(Tone.E) && !isSharp)\n checkCorrect = \"E\";\n else if(tmpTone.equals(Tone.F) && !isSharp)\n checkCorrect = \"F\";\n else if(tmpTone.equals(Tone.G) && !isSharp)\n checkCorrect = \"G\";\n\n //Sharp Keys\n else if(tmpTone.equals(Tone.A) && isSharp)\n checkCorrect = \"A#\";\n else if(tmpTone.equals(Tone.C) && isSharp)\n checkCorrect = \"C#\";\n else if(tmpTone.equals(Tone.D) && isSharp)\n checkCorrect = \"D#\";\n else if(tmpTone.equals(Tone.F) && isSharp)\n checkCorrect = \"F#\";\n else if(tmpTone.equals(Tone.G) && isSharp)\n checkCorrect = \"G#\";\n\n checkCorrectHelper(checkCorrect);\n\n }",
"public void checkAnswers(View view){\n int result = 0;\n\n if (checkRadioButtonAnswer(R.id.first_answer, R.id.first_answer3)){\n result = result + 1;\n }\n\n if (checkTextViewAnswer(R.id.second_answer, \"lions\")){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.third_answer, R.id.third_answer1)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fourth_answer, R.id.fourth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fifth_answer, R.id.fifth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.sixth_answer, R.id.sixth_answer2)){\n result = result + 1;\n }\n\n if (checkCheckBoxAnswer(R.id.seventh_answer1, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer2, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer3, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer4, false)){\n result = result + 1;\n }\n\n /**\n * A toast message is shown which represents the scored points out of the total 7.\n */\n Toast.makeText(this, \"Result: \" + Integer.toString(result) + \"/7\", Toast.LENGTH_SHORT).show();\n }",
"protected void checkScore () {\n if (mCurrentIndex == questions.length-1) {\n NumberFormat pct = NumberFormat.getPercentInstance();\n double result = (double) correct/questions.length;\n Toast res = new Toast(getApplicationContext());\n res.makeText(QuizActivity.this, \"Your score: \" + pct.format(result), Toast.LENGTH_LONG).show();\n correct = 0; // resets the score when you go back to first question.\n }\n }",
"public boolean checkAnswer(Answer userResponse) {\n\t\t// Check if userResponse is in choices \n\t\tString urStr = userResponse.toString(); \n\t\tif(correctAnswer.toString().equals(urStr)) {\n\t\t\treturn true; \n\t\t}\n\t\treturn false; \n\t}",
"public void q1Submit(View view) {\n\n EditText editText = (EditText) findViewById(R.id.q1enterEditText);\n String q1answer = editText.getText().toString().trim();\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if ((q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck1))) || (q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck2)))) {\n if (isNotAnsweredQ1) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ1 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }",
"public int answerCheck() {\n int score = -36; // 36 squares already filled in game.\n char[][] userAnswer = new char[9][9];\n \n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n userAnswer[i][j] = index[i][j].getText().charAt(0);\n }\n }\n \n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if(answer[i][j] == userAnswer[i][j]){\n score++;\n }\n }\n }\n return score;\n }",
"public static boolean userCorrect(int correctAnswer,int userAnswer)\n {\n return userAnswer == correctAnswer;\n }",
"private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }",
"public static void resultOfPlayAllCorrect() {\n\t\tString mark=\"null\";\n\t\ttry {\n\t\t\tmark=PlayTrivia.playAllRightAnswers();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tif(mark==\"Sucsses\") {\n\t\t\tSystem.out.println(\"Test end page has:\" + mark + \" Test pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Test end page - failed\");\n\t\t}\n\t}",
"private boolean checkType() {\r\n if (CorrectAnswer.getText().equals(\"\") || typeQuestion.getValue() == null) {\r\n if (typeQuestion.getValue() == null)\r\n errorMsg += \"Which type of question do you want?\\n\";\r\n\r\n if (CorrectAnswer.getText().equals(\"\"))\r\n errorMsg += \"There is no Correct Answer\\n\";\r\n\r\n return false;\r\n } else {\r\n switch ((String) typeQuestion.getValue()) {\r\n\r\n // case TrueFalse : it must true or false\r\n case \"TrueFalse\" : {\r\n if(CorrectAnswer.getText().equalsIgnoreCase(\"true\") || CorrectAnswer.getText().equalsIgnoreCase(\"false\"))\r\n return true;\r\n\r\n errorMsg += \"The answer has to be True or False\\n\";\r\n return false;\r\n }\r\n\r\n // case MCQ : the answer has to be in the list of the different proposed answers\r\n case \"MCQ\" :\r\n // each answer is different from the others\r\n if(TextAnswer1.getText().equals(TextAnswer2.getText())\r\n || TextAnswer1.getText().equals(TextAnswer3.getText())\r\n || TextAnswer2.getText().equals(TextAnswer3.getText())) {\r\n errorMsg += \"You can not have multiple times the same answer !!!\\n\";\r\n return false;\r\n }\r\n\r\n if(CorrectAnswer.getText().equals(TextAnswer1.getText())\r\n || CorrectAnswer.getText().equals(TextAnswer2.getText())\r\n || CorrectAnswer.getText().equals(TextAnswer3.getText()))\r\n return true;\r\n\r\n errorMsg += \"There must be a Correct Answer !\\n\";\r\n return false;\r\n\r\n // case ShortAnswer : if there is an answer it is good\r\n default:\r\n return true;\r\n }\r\n }\r\n }",
"private boolean validateAnswer() {\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n int checkboxSelected = 0;\n\n if (checkbox1.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox2.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox3.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n\n if (checkboxSelected == 2) {\n return true;\n }\n else{\n Toast.makeText(this, getString(R.string.message_two_correct), Toast.LENGTH_SHORT).show();\n return false;\n }\n }",
"private void checkCorrectHelper(String checkCorrect){\n //may need to add curr later\n\n if(correct.equals(checkCorrect)){//right\n addCorrect++;\n if(addCorrect == 8){\n score++;\n scoreView.setText(\"Score: \"+score);\n addPoint();\n addCorrect = 0;\n }\n arrowTracker[currentNote].setImageResource(R.drawable.arrow_purple);\n currentNote++;\n if(currentNote < 8 && !currentNotes[currentNote].equals(\"\")) {\n correct = currentNotes[currentNote];\n arrowTracker[currentNote].setImageResource(R.drawable.arrowgreen);\n\n } else if (currentNote == 8 || currentNotes[currentNote].equals(\"\")) {\n if(setSong().length == notePointer){//no more notes\n finishPlayAlong();\n }else{\n currentNote = 0;//reset currentNote\n setNotes(setSong());\n correct = currentNotes[currentNote];\n arrowTracker[currentNote].setImageResource(R.drawable.arrowgreen);\n }\n }\n } else {//wrong\n if (lives > 0) {\n lives--;\n userList.addUserAttempt();\n decrementLife(lives);\n } else {//lives == 0\n finishPlayAlong();\n }\n }\n }",
"private int checkAnswer(String title, String artist) {\n boolean titleCorrect = (title.toLowerCase()).equals(mSong.getTitle().toLowerCase());\n boolean artistCorrect = (artist.toLowerCase()).equals(mSong.getArtist().toLowerCase());\n\n if (titleCorrect && artistCorrect) {\n return 1;\n } else {\n if (titleCorrect) {\n return 2;\n } else {\n if (artistCorrect) {\n return 3;\n } else {\n return 4;\n }\n }\n }\n }",
"public static boolean checkAnswer(int rnd){\r\n\t\t//depending on the random number and what is clicked on by the user, return true or false\r\n\t\t if (rnd==0&&(x>413&&x<703)&&(y>748&&y<838))\r\n\t\t {\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else if (rnd==1&&(x>406&&x<695)&&(y>558&&y<646))\r\n\t\t {\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else if (rnd==2&&(x>90&&x<381)&&(y>557&&y<647))\r\n\t\t {\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else if (rnd==3&&(x>90&&x<381)&&(y>748&&y<838))\r\n\t\t {\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t return false;\r\n\t\t }\r\n\t}",
"private void checkAnswer(String input) {\n\t\tif(counter==0)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"moo\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==1)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"neigh\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==2)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"oink\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==3)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"baa\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==4)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"quack\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\t\n\t}",
"@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}",
"private void checkAnswer() {\n this.convertAnswerString();\n\n StringBuilder answer = new StringBuilder(currentAnswer);\n\n if (answer.toString().equals(selectedWord)) {\n gameOver = true;\n Toast toast = Toast.makeText(getApplicationContext(), \"You Win!!!\", Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (currentAnswer.length() == this.selectedLength && !gameOver) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Sorry! Wrong Answer!\", Toast.LENGTH_LONG);\n toast.show();\n }\n }",
"public boolean replyResult(int answer){\n \t_numberOfChoice = answer;\r\n return false;\r\n }",
"public int searchCorrectAnswer() {\n\t\tint correctAnswerNum = 0; \n\t\tboolean correctAnswer = false;\n\t\tfor(int answerNum = 1; answerNum < 5; answerNum++) {\n\t\t\tcorrectAnswer = testGenerator.isAnswerCorrect(questionNo, answerNum);\n\t\t\tif(correctAnswer) {\n\t\t\t\tcorrectAnswerNum = answerNum;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn correctAnswerNum;\n\t}",
"@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}",
"private void determineButtonPress(boolean answer){\n boolean expectedAnswer = currentQuestion.isAnswer();\n String result;\n if (answer == expectedAnswer){\n result=\"Correct\";\n score++;\n txtScore.setText(\"Score: \" + score);\n } else {\n result=\"False\";\n }\n //call this function to display the result to the player\n answerResultAlert(result);\n\n }",
"public static void main(String[] args) {\n\n Scanner key = new Scanner(System.in);\n System.out.println(\"Enter yes or no\");\n String answer = key.next();\n\n boolean valid = answer.equalsIgnoreCase(\"yes\") || answer.equalsIgnoreCase(\"no\");\n\n int i = 1;\n while (!valid) {\n System.out.println(\"re=enter\");\n answer = key.next();\n i++;\n\n if (i == 3) {\n answer = answer.equalsIgnoreCase(\"yes\") ? \"you entered yes\" : \"you entered no\";\n if (!valid) {\n System.out.println(\"you have entered wrong answer 3 times. Try again later\");\n break;\n }\n }\n\n\n }\n if (answer.equalsIgnoreCase(\"yes\")) {\n System.out.println(\"you entered yes\");\n }\n if (answer.equalsIgnoreCase(\"no\")) {\n System.out.println(\"you entered no\");\n }\n\n\n }",
"static boolean isCorrectAnswer(int questionNum, char userAnswer) {\n\t //true if matched, false otherwise\n\t boolean rightAnswer = (userAnswer + \"\").equalsIgnoreCase(multiChoice[questionNum][ANSWER]);\n\t //equivalent to if rightAnswer is true then display \"Correct\", else, display \"Incorrect\"\n\t System.out.println(rightAnswer ? \"Correct!\\n\" : \"Incorrect!\\n\");\n\n\t return rightAnswer;\n\t}",
"@Override\n\tpublic Boolean isCorrect(){\n\t\t\n\t\tif (super.question instanceof TfQuestion){\n\t\t\tif(this.answer.equals(super.question.getAnswer())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void Correct(View view) {\n\n TextView textview = (TextView) findViewById(R.id.textViewer);\n CharSequence text = textview.getText();\n String temp = text.toString(); //extracting the number from question string\n String[] s = temp.split(\" \");\n String n = s[0];\n int prime = Integer.parseInt(n);\n\n Context context = getApplicationContext();\n\n int i, flag = 0;\n if (prime == 1) {\n flag = 1;\n }\n for (i = 2; i <= prime / 2; ++i) {\n // condition for nonprime number\n if (prime % i == 0) {\n flag = 1;\n break;\n }\n }\n\n if(flag==0 && pressed>=1 && clicked>=1)\n {\n Toast.makeText(context, \"Correct but you have taken hint and cheated\", Toast.LENGTH_SHORT).show();\n }\n else if (flag == 0 && pressed>=1) {\n\n Toast.makeText(context, \"Correct but you have taken hint\", Toast.LENGTH_SHORT).show();\n }\n\n else if(flag==0 && clicked>=1)\n {\n Toast.makeText(context, \"Correct but you have cheated\", Toast.LENGTH_SHORT).show();\n }\n else if(flag==0)\n {\n Toast.makeText(context, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n\n else if(flag==1 && clicked>=1 && pressed>=1)\n {\n Toast.makeText(context, \" Not Correct but you have taken hint and cheated\", Toast.LENGTH_SHORT).show();\n }\n\n else if (flag == 1 && pressed>=1) {\n\n Toast.makeText(context, \" Not Correct but you have taken hint\", Toast.LENGTH_SHORT).show();\n }\n\n else if(flag==1 && clicked>=1)\n {\n Toast.makeText(context, \" Not Correct but you have cheated\", Toast.LENGTH_SHORT).show();\n }\n\n\n else if(flag==1)\n {\n Toast.makeText(context, \" Not Correct\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void q3Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q3option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ3) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ3 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private static boolean KawigiEdit_RunTest(int testNum, int[] p0, boolean hasAnswer, int p1) {\n System.out.print(\"Test \" + testNum + \": [\" + \"{\");\n for (int i = 0; p0.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(p0[i]);\n }\n System.out.print(\"}\");\n System.out.println(\"]\");\n EllysAndXor obj;\n int answer;\n obj = new EllysAndXor();\n long startTime = System.currentTimeMillis();\n answer = obj.getMax(p0);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.println(\"\\t\" + p1);\n }\n System.out.println(\"Your answer:\");\n System.out.println(\"\\t\" + answer);\n if (hasAnswer) {\n res = answer == p1;\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }",
"public void checkAnswer() {\n if (pendingTransition)\n return;\n\n final MatchStackFragmentAdapter adapter = (MatchStackFragmentAdapter)getAdapter();\n\n MatchStackFragment topFragment = (MatchStackFragment)adapter.getSavedFragment(getCurrentItem());\n\n if (topFragment.getBottomViewPager().isAnswerCorrect()) {\n adapter.processCorrectAnswer(topFragment.getWordInformation());\n\n // Check if we've finished\n if (getCurrentItem() + 1 == adapter.getCount()) {\n adapter.markAsFinished();\n }\n\n // Transition to next question\n setCurrentItem(getCurrentItem() + 1);\n } else {\n adapter.processIncorrectAnswer(topFragment.getWordInformation());\n\n // Show correct answer\n topFragment.getBottomViewPager().setToCorrectItem();\n\n // Transition to next question after 1 second\n pendingTransition = true;\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n // Check if we've finished\n if (getCurrentItem() + 1 == adapter.getCount()) {\n adapter.markAsFinished();\n }\n\n // Transition to next question\n setCurrentItem(getCurrentItem() + 1);\n\n pendingTransition = false;\n }\n }, CORRECTED_ANSWER_DISPLAY_TIME);\n }\n }",
"public static boolean getAndCheckStudentAnswer(int hardness) {\n\t\t\t\tint number1 = (int)(Math.random()*hardness);\n\t\t\t\tint number2 = (int)(Math.random()*hardness);\n\t\t\t\tSystem.out.print(\"Add \" + number1 + \" and \" + number2 +\": \");\n\t\t\t\t//Scanner input = new Scanner(System.in);\n\t\t\t\t//int studentAnswer = input.nextInt();\n\t\t\t\tScanner get = new Scanner(System.in);\n\t\t\t\tint studentAnswer = get.nextInt();\n\t\t\t\tif(studentAnswer == (number1 + number2)){\n\t\t\t\t\tSystem.out.print(\"Correct. \");\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Nice try, but the correct answer was \" \n\t\t\t\t\t\t\t+ (number1 + number2) + \".\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"public abstract AnswerStatus checkAnswer(String answer) throws SyntaxException;",
"private void checkAnswers() {\n\n //fetch the SolutionInts\n String[] solutionTags = currentTask.getSolutionStringArray();\n\n //fetch the userInput\n String[] userSolution = new String[solutionTags.length];\n for (int i = 0; i < solutionTags.length; i++) {\n LinearLayout linearLayout = currentView.findViewWithTag(i);\n userSolution[i] = (String) linearLayout.getChildAt(0).getTag();\n }\n\n Log.i(\"M_ORDER\",\"solutiontags: \"+ Arrays.toString(solutionTags) +\" usertags:\"+ Arrays.toString(userSolution));\n Date ended;\n if (Arrays.equals(solutionTags, userSolution)) {\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_RIGHT\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(true);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: true\");\n } else {\n Log.i(\"ANSWER\", \" was wrong\");\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_WRONG\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(false);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: false\");\n }\n }",
"public boolean isAnswerCorrect(String attempt){\n\t\t\tif (answer.equals(attempt)) return true;\n\t\t\telse return false;\n\t\t}",
"public void q6Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q6option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ6) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ6 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"public boolean answerQuestion() {\n if (inputAnswer.equals(\"\") || inputAnswer == null)\n throw new EmptyStringException();\n for (String s : answer) {\n if (SpellingsCheck.checkAnswer(inputAnswer, s, mistakesAllowed)) {\n return true;\n }\n }\n return false;\n }",
"private boolean checkAnswerOne() {\n CheckBox correctAnswer1Q1 = findViewById(R.id.qs1Ans1);\n CheckBox correctAnswer2Q1 = findViewById(R.id.qs1Ans3);\n correctAnswer1Q1.setTextColor(Color.parseColor(\"green\"));\n correctAnswer2Q1.setTextColor(Color.parseColor(\"green\"));\n return ((correctAnswer1Q1.isChecked()) && (correctAnswer2Q1.isChecked()));\n }",
"public boolean isAnswerCorrect() {\n\t\treturn isElementPresent(By.xpath(\"//body/div[5]\"));\n\t}",
"public void solver(View view) {\n int value = a + b;\n int val = arr[Integer.parseInt(view.getTag().toString())];\n if (val == value){\n response.setText(\"Correct :)\");\n correct++;\n }else{\n response.setText(\"Wrong :(\");\n }\n total++;\n updateScoreCard();\n setQuestion();\n }",
"public boolean isCorrect() {\n\t\treturn this.isCorrect;\n\t}",
"public int isnanswercorrect(int M, int userin) {\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint random = rand.nextInt(4);\n\t\t\t\t\tif(userin == M) {\n\t\t\t\t\t\t//display a random positive message if the student provides a correct response\n\t\t\t\t\t\tdisplayCorrectResponse(random);\n\t\t\t\t\t\tj = 1;\n\t\t\t\t\t\treturn j;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//display a random negative message if the student provides an incorrect response\n\t\t\t\t\t\tdisplayInorrectResponse(random);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\t}",
"private void getAllQuestion(){\r\n\r\n if(ques.getText().toString().equals(\"\")||opt1.getText().toString().equals(\"\")||opt2.getText().toString().equals(\"\")||\r\n opt3.getText().toString().equals(\"\")||correct.getText().toString().equals(\"\")){\r\n Toast.makeText(getBaseContext(), \"Please fill all fields\", Toast.LENGTH_LONG).show();\r\n }\r\n else{\r\n\r\n int c = Integer.parseInt((correct.getText().toString()));\r\n if (c > 3) {\r\n Toast.makeText(getBaseContext(), \"Invalid Correct answer\", Toast.LENGTH_LONG).show();\r\n } else {\r\n\r\n setQuestions();\r\n }\r\n finishQuiz();\r\n }\r\n }",
"public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}",
"private int getScoreMultiple(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n Vector givenAnswers = givenAnswer.getRelatedNodes(\"mcanswers\");\n Vector goodAnswers = questionNode.getRelatedNodes(\"mcanswers\");\n\n // First check if all the given answers are correct\n for (int i=0; i<givenAnswers.size(); i++) {\n if (((MMObjectNode)givenAnswers.get(i)).getIntValue(\"correct\") != 1) {\n return 0;\n }\n }\n\n // Secondly check if all the correct answers are given\n for (int i=0; i<goodAnswers.size(); i++) {\n if (((MMObjectNode)goodAnswers.get(i)).getIntValue(\"correct\") == 1) {\n if (!givenAnswers.contains(goodAnswers.get(i))) {\n return 0;\n }\n }\n }\n\n // ALl tests succeeded: answer is correct\n return 1;\n }",
"public void q2Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q2option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ2) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ2 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private boolean getUserInput(int amountOfAnswers, int positionCorrectAnswer, Question curentQuestion) {\n int userAnswer = Tastatur.intInput();\n //Checks if the user input is valid\n while (userAnswer < 1 || userAnswer > amountOfAnswers) {\n System.out.println(\"Invalide Antwort\");\n userAnswer = Tastatur.intInput();\n }\n //checks if the users input is correct\n if (userAnswer == positionCorrectAnswer + 1) {\n System.out.println(\"Korrekt!\\n\");\n return true;\n // If the user uses the joker\n } else if (joker && userAnswer == 5) {\n //gets one wrong answer\n String wrongAnswer = curentQuestion.joker(positionCorrectAnswer);\n List<String> wrongAnswers = new ArrayList<>();\n wrongAnswers.add(wrongAnswer);\n //Creates a new Question Object\n Question question = new Question(curentQuestion.getQuestion(), 0, curentQuestion.getCorrectAnswer(), wrongAnswers);\n joker = false;\n //Ask the question again with only two answer possibilities\n return askQuestion(question, level);\n\n } else {\n System.out.println(\"Falsch\\n\");\n return false;\n }\n }",
"public void q7Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q7option4);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ7) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ7 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"public void correctAnswer(View view) {\n\n // Update correct count\n deck.getCard(deckPos).setNumCorrect(deck.getCard(deckPos).getNumCorrect() + 1);\n\n // Update points\n float p = Float.valueOf(deck.getCard(deckPos).getRating()) * 10;\n quiz.setPoints((int) (quiz.getPoints() + p));\n points.setText(String.valueOf(quiz.getPoints()));\n\n // Set to question and update counter\n isQuestion = true;\n deckPos ++;\n\n // If not last card - Update card\n if(!(deckPos == deck.deckLength)) {\n displayCard(deck.getCard(deckPos), isQuestion);\n } else {\n finishQuiz();\n }\n\n // Set quiz counts\n quiz.setCorrectCount(quiz.getCorrectCount() + 1);\n }",
"private boolean validateInputs() {\n question = txtQuestion.getText().trim();\n option1 = txtOption1.getText().trim();\n option2 = txtOption2.getText().trim();\n option3 = txtOption3.getText().trim();\n option4 = txtOption4.getText().trim();\n correctOption = jcCorrectAns.getSelectedItem().toString();\n //System.out.println(correctOption);\n if(question.isEmpty() || option1.isEmpty() || option2.isEmpty() || \n option3.isEmpty() || option4.isEmpty() || correctOption.isEmpty()){\n return false;\n }\n return true;\n }",
"public boolean isValidateAnswer(Question question, String answer) {\r\n\r\n\t\t// Check for the single select type of questions.\r\n\t\tif (question.getType().equalsIgnoreCase(\"Single Select\")\r\n\t\t\t\t&& question.getChoices().contains(answer)) {\r\n\t\t\tSystem.out.println(EvaluateQuestionAnswers.numberOfSingleSelectQuestions + \" dasd\" + i);\r\n\t\t\tif (i < EvaluateQuestionAnswers.numberOfSingleSelectQuestions) {\r\n\t\t\t\tquestions.add(new OverallRating(question));\r\n\t\t\t}\r\n\t\t\tquestions.get(\r\n\t\t\t\t\ti % EvaluateQuestionAnswers.numberOfSingleSelectQuestions)\r\n\t\t\t\t\t.singleSelectReport(answer);\r\n\t\t\ti++;\r\n\t\t\treturn true;\r\n\t\t} else if (question.getType().equalsIgnoreCase(\"Multi Select\")) {\r\n\t\t\t// Check for the multi select type of questions.\r\n\t\t\tSet<String> setOfQuestion = new TreeSet<String>(\r\n\t\t\t\t\tString.CASE_INSENSITIVE_ORDER);\r\n\t\t\tsetOfQuestion.addAll(question.getChoices());\r\n\t\t\tif (!answer.contains(\"/\") && setOfQuestion.contains(answer)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t// splits the answer if two fields are selected.\r\n\t\t\tString[] multiAnswer = answer.split(\"/\");\r\n\t\t\tfor (String s : multiAnswer) {\r\n\t\t\t\tif (!setOfQuestion.contains(s)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\r\n\t\t} else if (question.getType().equalsIgnoreCase(\"Number\")) {\r\n\t\t\t// Check for the number type of questions.\r\n\t\t\ttry {\r\n\t\t\t\tInteger.parseInt(answer);\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} else if (question.getType().equalsIgnoreCase(\"Text\")) {\r\n\t\t\t// Check for the Text type of questions.\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"static void askQuestion() {\n\t\t// Setting up a Scanner to get user input\n\t\tScanner userInput = new Scanner(System.in);\n\n\t\t// Declaring variables\n\t\tdouble num1, num2, answer, userAnswer;\n\n\t\t// GENERATING QUESTION\n\n\t\t// Getting two new random numbers, rounded to one decimal place (with numbers generation from 0 to 50)\n\t\tnum1 = Math.round((Math.random() * 50)*10.0)/10.0;\n\t\tnum2 = Math.round((Math.random() * 50)*10.0)/10.0;\n\n\t\t// Generating a random number between 1 and 4 to randomize the math operation. A switch case is used to calculate the answer based on the math operation that gets generated.\n\t\tswitch ((int) Math.round(Math.random() * 3 + 1)) {\n\t\t\tcase 1: // Similar structure for each case (and the default case), structured as follows\n\t\t\t\tSystem.out.print(num1 + \" + \" + num2 + \" = \"); // Printing the question (based on the generated operation)\n\t\t\t\tanswer = num1 + num2; // Calculating the answer (based on the generated operation)\n\t\t\t\tbreak; // Exit the switch statement\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(num1 + \" - \" + num2 + \" = \");\n\t\t\t\tanswer = num1 - num2;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(num1 + \" / \" + num2 + \" = \");\n\t\t\t\tanswer = num1 / num2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.print(num1 + \" * \" + num2 + \" = \");\n\t\t\t\tanswer = num1 * num2;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tanswer = Math.round(answer * 10.0) / 10.0; // Rounding the answer to one decimal place\n\t\tuserAnswer = userInput.nextDouble(); // Getting the user's answer\n\n\t\tif (answer == userAnswer) System.out.println(\"That's right. Good Job!\\n\"); // If the answers match, the user is correct and the staetment is printed accordingly.\n\t\telse System.out.println(\"Incorrect. The correct answer was \" + answer + \".\\n\"); // Otherwise, show that the user's answer is incorrect and output an according statement.\n\t}",
"public boolean isMultiple()\n {\n \tif (questionNumber == 0) {\n \t\treturn false;\n \t}\n int counter = 0;\n List<Answer> answers = test.getQuestions().get(questionNumber-1).getAnswers();\n for (Answer answer : answers) {\n if (answer.getCorrect()) {\n ++counter;\n if (counter > 1) {\n return true;\n }\n }\n }\n return false;\n }",
"public boolean validateAnswer()\r\n\t{\r\n\t\treturn (group.getSelection() != null);\r\n\t}",
"public boolean hasCorrectAnswer() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public static void main(String[] args) {\n \n // Declare the scanner and tell it to take inputs\n Scanner myScanner;\n myScanner = new Scanner(System.in);\n \n // Declare the variable\n char yesNo;\n \n // Prompt user to think of a number\n System.out.println(\"Think of a number between 1 and 10 inclusive.\");\n \n // Ask the first question\n System.out.print(\"Is your number even? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Ask the next question\n System.out.print(\"Is it divisible by 3? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')){\n // Guess the number 6\n System.out.print(\"Is your number 6? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Ask the next question\n System.out.print(\"Is it divisible by 4? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Ask the next question\n System.out.print(\"Is the number divided by 4 greater than 1? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Guess the number 8\n System.out.print(\"Is your number 8? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Guess the number 4\n System.out.print(\"Is your number 4? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Ask the next question\n System.out.print(\"Is it divisible by 5? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Guess the number 10\n System.out.print(\"Is your number 10? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Guess the number 2\n System.out.print(\"Is your number 2? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return; \n }\n }\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Ask the next question\n System.out.print(\"Is it divisible by 3? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Ask the next question\n System.out.print(\"When divided by 3 is the result greater than 1?? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Guess the number 9\n System.out.print(\"Is your number 9? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n } \n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Guess the number 3\n System.out.print(\"Is your number 3? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n } \n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return; \n }\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Ask the next question\n System.out.print(\"Is it greater than 6? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Guess the number 7\n System.out.print(\"Is your number 7? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n } \n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Ask the next question\n System.out.print(\"Is it less than 3? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n // Guess the number 1\n System.out.print(\"Is your number 1? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n // Guess the number 5\n System.out.print(\"Is your number 5? \");\n yesNo = myScanner.next().charAt(0);\n if ((yesNo == 'Y') || (yesNo == 'y')) {\n System.out.println(\"Yay!\");\n }\n else if ((yesNo == 'N') || (yesNo == 'n')) {\n System.out.println(\"A question was answered wrong. Please try again.\");\n return;\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return; // Leaves the program/the prograem terminates\n }\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return;\n }\n }\n else {\n System.out.println(\"Sorry, that is not a valid input.\");\n return; // Leaves the program/the prograem terminates\n }\n }",
"public abstract boolean isGuessCorrect(String guess);",
"public void ifElseCalculation(){\n String[] separated = solutions[counter].split(\":\");\n\n //Ask whether String 1 is right and then look whether String 2 is also right\n //This function is limited to two out of four answers\n //all answer in StringArray are saved in order A|B|C|D\n if (separated[0].equals(\"A\") & checkedA){\n if(separated[1].equals(\"B\") & checkedB){\n rightAnswer(); //A+B\n } else if(separated[1].equals(\"C\") & checkedC){\n rightAnswer(); //A+C\n } else if(separated[1].equals(\"D\") & checkedD){\n rightAnswer(); //A+D\n }else{\n wrongAnswer();\n }\n }else if(separated[0].equals(\"B\") & checkedB){\n if(separated[1].equals(\"C\") & checkedC){\n rightAnswer();\n } else if(separated[1].equals(\"D\") & checkedD){\n rightAnswer();\n } else {\n wrongAnswer();\n }\n }else if(separated[0].equals(\"C\") & checkedC){\n if(separated[1].equals(\"D\") & checkedD){\n rightAnswer();\n }\n }else{\n wrongAnswer();\n }\n\n counter += 1;\n }",
"@Override\n public void verifyResult() {\n assertThat(calculator.getResult(), is(4));\n }",
"public boolean formResult()\r\n {\r\n if (operator.equals(\"+\") && validOperands())\r\n {\r\n add();\r\n }\r\n else if (operator.equals(\"-\") && validOperands())\r\n {\r\n subtract();\r\n }\r\n else if (operator.equals(\"\\u00D7\") && validOperands())\r\n {\r\n multiply();\r\n }\r\n else if (operator.equals(\"\\u00F7\") && validOperands())\r\n {\r\n String[] test = rightOperand.split(\"\\\\+|-\");\r\n \r\n if (test[0].equals(\"0\")) {\r\n clear();\r\n return false;\r\n }\r\n divide();\r\n }\r\n return true;\r\n }",
"@Override\n public boolean isCorrect() {\n //if we're ignoring spaces, remove them from the accepted answers as well when checking\n for(String correctAnswer: correctAnswers) {\n if(ignoreSpace) {\n //create a regex based on this possible correct answer.\n final StringBuilder regexBuilder = new StringBuilder();\n //split up the answer between the 'words'\n String[] splitAnswer = correctAnswer.split(\"\\\\s+\"); //split on spaces (on ignorable spaces)\n for(String part: splitAnswer) {\n regexBuilder.append(Pattern.quote(part)).append(\" *\");\n }\n regexBuilder.setLength(regexBuilder.length()-2); //cut last unnecessary \" *\"\n String answerRegexString = regexBuilder.toString().replaceAll(DO_NOT_IGNORE_SPACE, \" \");\n //compile regex pattern\n Pattern answerRegex;\n if(ignoreCase) {\n answerRegex = Pattern.compile(answerRegexString, Pattern.CASE_INSENSITIVE);\n } else {\n answerRegex = Pattern.compile(answerRegexString);\n }\n //possible case insensitivity is taken care of\n if(answerRegex.matcher(enteredAnswer).matches()) return true;\n } else {\n if(ignoreCase) {\n if(correctAnswer.equalsIgnoreCase(enteredAnswer)) return true;\n } else {\n if(correctAnswer.equals(enteredAnswer)) return true;\n }\n }\n }\n return false;\n }",
"public void correct() {\n\n\n }",
"double scoreAnswer(Question question, Answer answer);",
"private int taking_test(File quiz_file){\n int total_marks=-1;\n Scanner read_question=null;\n \n try{\n count++;\n read_question= new Scanner(quiz_file);\n }catch(FileNotFoundException e){\n System.out.println(\"There is no database of questions for the choosen chapter\");\n if(count<3){\n total_marks=taking_test(quiz_file);\n return total_marks;\n }else{\n System.out.println(\"The system is experiencing some problem loading the questions. Please try again later!\");\n return total_marks;\n }\n \n }\n String question= read_question.nextLine();\n while(question.charAt(0)!='*'){\n question=read_question.nextLine();\n }\n String answer;\n System.out.println(\"########################################################################\");\n System.out.println(\" Starting the Test.\");\n System.out.println(\"########################################################################\");\n question=read_question.nextLine();\n while(question!=null){\n System.out.println(\"Question:-\");\n System.out.println(question);\n System.out.println(\"Options:-\");\n question= read_question.nextLine();\n while(!(question.contains(\"Correct Answer\"))){\n System.out.println(question);\n question= read_question.nextLine();\n \n }\n System.out.println(\"Enter your answer\");\n while(true){\n try{\n answer=input.next().toUpperCase();\n if(answer.equals(\"B\")||answer.equals(\"A\")||answer.equals(\"C\")||answer.equals(\"D\")){\n break;\n }else{\n System.out.println(\"Enter a valid choice from (A/B/C/D)\");\n }\n \n }catch(InputMismatchException e){\n System.out.println(\"Invalid Input. Please Enter your choice again.\");\n input.nextLine();\n }\n }\n if(answer.equals(question.substring(15))){\n total_marks+=2;\n }\n question=read_question.nextLine();\n System.out.println(question);\n if(read_question.hasNextLine()){\n question=read_question.nextLine();\n }else{\n break;\n }\n \n\n }\n\n read_question.close();\n return total_marks;\n }",
"public boolean isCorrect(String str);",
"private void checkAnswer(boolean userPressedTrue) {\n boolean answerIsTrue = questions[mCurrentIndex].isAnswerTrue();\n int messageResId = 0;\n if (answerIsTrue == userPressedTrue) {\n messageResId = R.string.correct_toast;\n correct++;\n } else {\n messageResId = R.string.incorrect_toast;\n }\n Toast.makeText(QuizActivity.this, messageResId, Toast.LENGTH_SHORT).show();\n }",
"public int getCorrectans()\n\t{\n\t\treturn correctAns;\n\t}",
"public void wrongClick(View view) {\n if (roundOne[questionId].getCorrect_answer().equals(\"False\")) {\n Toast.makeText(getApplicationContext(), \"Juiste Antwoord\",\n Toast.LENGTH_SHORT).show();\n score += 5;\n } else {\n Toast.makeText(getApplicationContext(), \"Foute Antwoord\",\n Toast.LENGTH_SHORT).show();\n }\n questionId++;\n setQuestion(questionId);\n }",
"public double testQuiz(Quiz quiz) {\n\t\t// System.out.println(\"Testing quiz: \" + quiz + \"\\n\" +\n\t\t// quiz.display() + \"\\nwith QuizTester: \" + id\n\t\t// + \" SearchString: \" + searchString);\n\t\tdouble score = 0;\n\t\tfor (Question question : quiz.getQuestionList()) {\n\t\t\tboolean guess = question.getPrompt().contains(searchString);\n\t\t\tif (question.isAnswer() == guess) {\n\t\t\t\t++score;\n\t\t\t}\n\t\t}\n\t\t// System.out.println(\"Completed testing quiz: \" + quiz + \"\\nFinal Score: \" +\n\t\t// score + \" / \" + quiz.getQuestionList().size() + \" AKA: \" + (score /\n\t\t// quiz.getQuestionList().size()) );\n\t\treturn score / quiz.getQuestionList().size();\n\t}",
"public void checkResult(){\n\t\tif(throwNum == 0){\n\t\t\tthis.firstThrow = this.sumOfDice;\n\t\t}\n\n\t\tif((this.sumOfDice == 7 || this.sumOfDice==11) && throwNum==0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse if(this.sumOfDice ==2 || this.sumOfDice== 3 ||this.sumOfDice==12){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.game == gameStatus.CONTINUE && this.sumOfDice == 7)){\n\t\t\tthis.game = gameStatus.LOST;\n\t\t}\n\t\telse if((this.sumOfDice== this.firstThrow) && throwNum!=0){\n\t\t\tthis.game = gameStatus.WON;\n\t\t}\n\t\telse{\n\t\t\tthis.game = gameStatus.CONTINUE;\n\t\t}\n\t}",
"private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }",
"private boolean isCorrectAnswer(ArrayList<Character> studentAnswers){\n\t\tArrayList<Character> correctAnswers = q.getCorrectAnswers();\n\t\tif(correctAnswers.size() != studentAnswers.size()){\n\t\t\treturn false;\n\t\t}\n\t\tfor(Character c: studentAnswers){\n\t\t\tif(!correctAnswers.contains(c)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public static int ResultfromNavAnswer (String answer, int[] r1) {\r\n\r\n Scanner keyboard = new Scanner(System.in);\r\n // expects North, East, South, or West as an answer\r\n boolean validAnswer = false;\r\n while (validAnswer == false) {\r\n\r\n // if the Answer is NORTH\r\n if (answer.toUpperCase().equals(\"NORTH\")) {\r\n if (r1[0] == 0) {\r\n System.out.println(\"You cannot go that way\");\r\n answer = keyboard.nextLine();\r\n } else if (r1[0] >= 1) {\r\n validAnswer = true;\r\n return r1[0];\r\n }\r\n }\r\n // if the Answer is EAST\r\n else if (answer.toUpperCase().equals(\"EAST\")) {\r\n if (r1[1] == 0) {\r\n System.out.println(\"You cannot go that way\");\r\n answer = keyboard.nextLine();\r\n } else if (r1[1] >= 1) {\r\n validAnswer = true;\r\n return r1[1];\r\n }\r\n }\r\n // if the Answer is SOUTH\r\n else if (answer.toUpperCase().equals(\"SOUTH\")) {\r\n if (r1[2] == 0) {\r\n System.out.println(\"You cannot go that way\");\r\n answer = keyboard.nextLine();\r\n } else if (r1[2] >= 1) {\r\n validAnswer = true;\r\n return r1[2];\r\n }\r\n }\r\n // if the Answer is WEST\r\n else if (answer.toUpperCase().equals(\"WEST\")) {\r\n if (r1[3] == 0) {\r\n System.out.println(\"You cannot go that way\");\r\n answer = keyboard.nextLine();\r\n } else if (r1[3] >= 1) {\r\n validAnswer = true;\r\n return r1[3];\r\n }\r\n }\r\n\r\n // if the Answer is anything but NORTH, EAST, SOUTH, or WEST\r\n else {\r\n return -1;\r\n }\r\n }\r\n\r\n\r\n return 1;\r\n }",
"public static boolean test(Arithmetic ques){\n Scanner in = new Scanner(System.in);\n String operator = new String();\n int count = 0;\n\n\n //get different operation based on level\n if (ques instanceof Level1Addition || ques instanceof Level2Addition){\n operator = \" + \";\n }\n else{\n operator = \" - \";\n }\n\n //starting question\n System.out.println(\"what is \" + ques.getNum1() + operator + ques.getNum2() + \" = ?\");\n System.out.print(\"Enter answer : \");\n int ans = in.nextInt();\n if (ans == ques.getAnswer()) {\n System.out.print(\"Correct! \");\n return true;\n }\n System.out.print(\"Wrong answer... \");\n return false;\n }",
"public void q5Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q5option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ5) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ5 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private boolean checkTextViewAnswer(int resourceId, String correctAnswer){\n TextView textView = findViewById(resourceId);\n return textView.getText().toString().equals(correctAnswer);\n }",
"public boolean test_entry() {\n\t\tboolean t = false;\n\t\tdouble val = Double.parseDouble(numericfield.getText());\n\n\t\tif (val == opt) {\n\t\t\tt = true;\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Vous avez trouvé le bon parametre pour ce remede\");\n\t\t}\n\t\t// case init > opt ---> on doit diminuer la valeur !!!!\n\t\tif (init > opt) {\n\t\t\tif (init > val && val > opt)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"Vous allez dans le bon sens , continuez\");\n\t\t\tif (init > val && opt > val)\n\t\t\t\tJOptionPane\n\t\t\t\t\t\t.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\" Vous avez raté le parametre optimale et vous allez dans le mauvais sens\");\n\t\t\tif (val > init)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\" Vous allez dans le mauvais sens\");\n\t\t}\n\n\t\t// case init < opt ---> on doit augmenter la valeur !!!!\n\t\tif (init < opt) {\n\t\t\tif (init < val && val < opt)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\"Vous allez dans le bon sens , continuez\");\n\t\t\tif (init < val && opt < val)\n\t\t\t\tJOptionPane\n\t\t\t\t\t\t.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\" Vous avez raté le parametre optimale et vous allez dans le mauvais sens\");\n\t\t\tif (val < init)\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\" Vous allez dans le mauvais sens\");\n\t\t}\n\t\treturn t;\n\t}"
] |
[
"0.8031933",
"0.7652088",
"0.7641093",
"0.7449566",
"0.7357962",
"0.73461694",
"0.7185443",
"0.71091914",
"0.6992513",
"0.6983918",
"0.6952704",
"0.69487834",
"0.6886084",
"0.68566495",
"0.68565917",
"0.6855447",
"0.68415064",
"0.6808569",
"0.6748464",
"0.67237973",
"0.6685578",
"0.6660033",
"0.66511565",
"0.66488016",
"0.6593162",
"0.6582497",
"0.6579948",
"0.6564293",
"0.65385",
"0.6530536",
"0.6502117",
"0.64943814",
"0.64682925",
"0.64633065",
"0.6462873",
"0.6446029",
"0.64238185",
"0.64186233",
"0.64149207",
"0.6407865",
"0.63922936",
"0.6376959",
"0.63749444",
"0.6343577",
"0.6333995",
"0.63271344",
"0.6310346",
"0.6283537",
"0.6274099",
"0.6262329",
"0.6249662",
"0.6248638",
"0.62405235",
"0.622953",
"0.6228543",
"0.6223317",
"0.62219477",
"0.6207437",
"0.6205452",
"0.6200545",
"0.61970025",
"0.6189112",
"0.6188369",
"0.6187104",
"0.61741865",
"0.61641264",
"0.6160688",
"0.61594975",
"0.6142665",
"0.6137481",
"0.61280423",
"0.61222976",
"0.6117672",
"0.6110138",
"0.6104741",
"0.60985565",
"0.60890555",
"0.6084546",
"0.60702586",
"0.60667175",
"0.60660696",
"0.6065715",
"0.6058758",
"0.6046516",
"0.60373783",
"0.60270244",
"0.60262614",
"0.6025906",
"0.6021918",
"0.6020982",
"0.6013058",
"0.6009684",
"0.60087603",
"0.59942305",
"0.5985189",
"0.5984218",
"0.59812933",
"0.5979619",
"0.5976063",
"0.59759396",
"0.59725267"
] |
0.0
|
-1
|
Log.d("test", "Checked: " + checked);
|
@Override
public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"@Override \r\n public void onCheckedChanged(CompoundButton buttonView, \r\n boolean isChecked) {\n if(isChecked){ \r\n Log.d(TAG, \"Selected\");\r\n }else{ \r\n Log.d(TAG, \"NO Selected\");\r\n } \r\n }",
"public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n answer = isChecked;\n Log.d(\"Notification-debug\", answer+\"\");\n }",
"boolean getIsChecked();",
"public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n\n // Set the appropriate text for the Checkbox\n cb.setText(\"This checkbox is: checked\");\n\n // Log checked message\n Log.i(TAG, \"onCheckedChanged: This checkbox is: checked\");\n\n } else { // If the Checkbox isn't checked ...\n\n // Set the appropriate text for the Checkbox\n cb.setText(\"This checkbox is: unchecked\");\n\n // Log unchecked message\n Log.i(TAG, \"onCheckedChanged: This checkbox is: unchecked\");\n\n }\n }",
"boolean isChecked();",
"boolean isChecked();",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if(isChecked) {\n Toast.makeText(SettingsActivity.this, getString(R.string.gpu_on), Toast.LENGTH_LONG).show();\n }\n else {\n Toast.makeText(SettingsActivity.this, getString(R.string.gpu_off), Toast.LENGTH_LONG).show();\n }\n\n Log.v(\"GPU=\", \"\" + isChecked);\n }",
"public Boolean isChecked(){\n return aSwitch.isChecked();\n }",
"public Object getCheckedValue();",
"public Integer getChecked() {\n return checked;\n }",
"public boolean isChecked() {\n return checked;\n }",
"@Override\n\tpublic boolean isChecked() {\n\t\treturn checked;\n\t}",
"@Override\n\tpublic boolean isChecked() {\n\t\treturn ischecked;\n\t}",
"public void toppingChecked(View view) {\n Log.d(\"Method\", \"toppingChecked()\");\n displayQuantity();\n }",
"public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.LED1:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED1 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED1 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED2:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED2 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED2 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED3:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED3 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED2 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED4:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED4 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED4 OFF\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n // TODO: Veggie sandwich\n }\n }",
"public boolean isChecked()\n\t{\n\t\treturn checked;\n\t}",
"public final String getCheckedAttribute() {\n return getAttributeValue(\"checked\");\n }",
"@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n if (isChecked) {\n Toast.makeText(MainActivity.this, item[which], Toast.LENGTH_SHORT).show();\n }\n }",
"public void setChecked()\n\t{\n\t\tchecked = true;\n\t}",
"boolean isCheckedOut();",
"boolean getCheckState();",
"@Override\n public void onCheckedChanged(RadioGroup group, @IdRes int checkedId) {\n RadioButton rb = (RadioButton)group.findViewById(checkedId);\n Log.d(TAG, \"onCheckedChanged: \"+rb.getText().toString());\n identify = rb.getText().toString();\n variable_quantity.identify = rb.getText().toString();\n// if(rb.getText().toString()==\"学生\"){\n// variable_quantity.identify = \"学生\";\n// identify = \"学生\";\n// variable_quantity.ifStudent = true;\n// Log.d(TAG, \"login: \"+variable_quantity.ifStudent);\n// }\n// else{\n// variable_quantity.identify = \"商家\";\n// identify = \"商家\";\n// variable_quantity.ifStudent = false;\n// }\n }",
"static void log(Boolean s) {\n System.out.println(String.valueOf(true));\n }",
"public boolean isChecked() {\n\t\treturn checked;\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n }",
"@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\n\t}",
"@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\n\t}",
"public void setChecked(Integer checked) {\n this.checked = checked;\n }",
"@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n RadioButton rEnCours=(RadioButton)findViewById(checkedId);\n\n Toast.makeText(Circonstance_Activity.this,rEnCours.getText(), Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }",
"@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n if (checkedId == R.id.radio_us) {\n Toast.makeText(getApplicationContext(), \"choice: US\",\n Toast.LENGTH_SHORT).show();\n } else if (checkedId == R.id.radio_canada) {\n Toast.makeText(getApplicationContext(), \"choice: CANADA\",\n Toast.LENGTH_SHORT).show();\n }\n }",
"public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch (view.getId()) {\n case R.id.cb_cod:\n if (cb_cod.isChecked()) {\n cod = \"1\";\n } else {\n cod = \"0\";\n }\n\n\n break;\n }\n }",
"@Override\n public void onClick(View v) {\n StringBuilder stringBuilder= new StringBuilder();\n if(milkbox.isChecked()) {\n String value= milkbox.getText().toString();\n stringBuilder.append(value+\" is ordered\\n\");\n\n }\n if(sugarbox.isChecked()) {\n String value= sugarbox.getText().toString();\n stringBuilder.append(value+\" is ordered\\n\");\n\n }\n if(waterbox.isChecked()) {\n String value= waterbox.getText().toString();\n stringBuilder.append(value+\" is ordered\\n\");\n\n }\n resulttextview.setText(stringBuilder);\n }",
"void onCheckedTriStateChanged(TriStateCheckBox triStateCheckBox, State state);",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n RowData data = (RowData) viewHolder.chkBox.getTag();\n if (isChecked) {\n\n checkBoxState.set(data.position, true);\n Log.i(tag, \"cursor.getPosition(true) with onChecked Listener : \" + data.position);\n }\n else {\n checkBoxState.set(data.position, false);\n Log.i(tag, \"cursor.getPosition(false) with onChecked Listener : \" + data.position);\n }\n }",
"@Override\n public void onClick(View v) {\n boolean checked = ((Switch)v).isChecked();\n if(checked){\n // when the switch is checked send the state 1 and value of progress to the server\n light_value=\"1\";\n SetData(MainActivity.URL+\"/mobile/set.php?token=\"+token,\"24\",light_value, String.valueOf(seekBar_light_bedroom2.getProgress()));\n }else {\n // when the switch is unchecked send the state 0 and value of progress to the server\n light_value=\"0\";\n SetData(MainActivity.URL+\"/mobile/set.php?token=\"+token,\"24\",light_value, String.valueOf(seekBar_light_bedroom2.getProgress()));\n }\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n\n } else {\n\n }\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n\n\n\n }",
"@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\t\t\n\t}",
"@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n int childCount = group.getChildCount();\n for (int x = 0; x < childCount; x++) {\n RadioButton btn = (RadioButton) group.getChildAt(x);\n\n if (btn.getId() == checkedId) {\n\n persongender = btn.getText().toString();\n\n }\n\n }\n\n Log.e(\"Gender\", persongender);\n System.out.println(\"gender::\" + persongender);\n }",
"void onCheckedChanged(Chip chip, boolean isChecked);",
"@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }",
"public String getDateChecked() {\n\t\treturn dateChecked + \"\\\"\";\n\t}",
"public void displayResult(View view){\n countPoints();\n String quantity;\n String player;\n boolean checked = ((CheckBox) findViewById(R.id.nickname)).isChecked();\n\n if (checked == true) {\n player = \"Anonymous\";\n } else {\n player = ((EditText) findViewById(R.id.name)).getText().toString();\n }\n /*\n method to show toast message with result\n */\n if (points > 1) {\n quantity = \" points!\";\n } else {\n quantity = \" point!\";\n }\n Toast.makeText(FlagQuiz.this, player + \", your score is: \" + points + quantity, Toast.LENGTH_LONG).show();\n }",
"void setCheckedOut(boolean checkedOut);",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(Test.this, Boolean.toString(tagButton.getStatus()), Toast.LENGTH_SHORT).show();\n\t\t\t}",
"public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n \t if(!isChecked ){\n \t\t \n \t\tposi = 0; \n \t\ts.setValues(0);\n \t\tche = 1;\n \t \tsharedPreferences.edit().putInt(\"oncreate_key\", che).commit();\n \t \tsw1 = sharedPreferences.getInt(\"oncreate_key\", 0);\n \t \tToast.makeText(context, \"sw1 : \"+sw1, Toast.LENGTH_SHORT).show();\t\t\n \t }else{\n \t \t\n \t \tposi = 1;\n \t \ts.setValues(1);\n \t \n \t }\n }",
"@Test\n public void onKgsRBTNClicked(){\n onView(withId(R.id.kgsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.lbsRBTN)).check(matches(isNotChecked()));\n }",
"@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {\n if (!isChecked) {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_off));\n state[0] = 0;\n } else {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_on));\n state[0] = 255;\n }\n // If the values are modified while the user does not check/unckeck the checkbox, then we update the value from the controller.\n int exist = mode.getPayload().indexOf(c);\n if (exist != -1) {\n mode.getPayload().get(exist).setV(state[0]);\n }\n }",
"public void setCheckedName(String name) {\n \n boolean checked = true;\n setCheckedName(name, checked);\n }",
"public void onCheckboxClicked(View view, ScoutFormData sfd) {\n // Is the view now checked?\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.eCheck_StackYellow:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSYELLOW_COLUMN(\"1\");\n sfd.setEBONUSYELLOW_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSYELLOW_COLUMN(\"0\");\n sfd.setEBONUSYELLOW_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_StackTop:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOP_COLUMN(\"1\");\n sfd.setEBONUSTOP_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOP_COLUMN(\"0\");\n sfd.setEBONUSTOP_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_StackBottom:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSBOTTOM_COLUMN(\"1\");\n sfd.setEBONUSBOTTOM_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSBOTTOM_COLUMN(\"0\");\n sfd.setEBONUSBOTTOM_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_AbleCollect:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN(\"1\");\n sfd.setEHPCOLLECT_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN(\"0\");\n sfd.setEHPCOLLECT_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Stacker:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPSTACKER_COLUMN(\"1\");\n sfd.setEHPSTACKER_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPSTACKER_COLUMN(\"0\");\n sfd.setEHPSTACKER_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Herder:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPHERDER_COLUMN(\"1\");\n sfd.setEHPHERDER_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPHERDER_COLUMN(\"0\");\n sfd.setEHPHERDER_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_BinSpecialist:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPBIN_COLUMN(\"1\");\n sfd.setEHPBIN_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPBIN_COLUMN(\"0\");\n sfd.setEHPBIN_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_NoodleSpecialist:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPNOODLE_COLUMN(\"1\");\n sfd.setEHPNOODLE_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPNOODLE_COLUMN(\"0\");\n sfd.setEHPNOODLE_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Inbound:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPINBOUND_COLUMN(\"1\");\n sfd.setEHPINBOUND_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPINBOUND_COLUMN(\"0\");\n sfd.setEHPINBOUND_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Other:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPOTHER_COLUMN(\"1\");\n sfd.setEHPOTHER_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPOTHER_COLUMN(\"0\");\n sfd.setEHPOTHER_COLUMN(\"0\");\n }\n break;\n }\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n LoginActivity.this.isChecked=isChecked;\n if(isChecked){\n\n }else{\n\n }\n }",
"public void checkClicked(View v)\n {\n CheckBox checkbox = (CheckBox) v;\n Log.d(\"potato\", \"checkClicked: \");\n String get_name = checkbox.getText().toString();\n\n // use string name resource for the id of the image\n resID_from_name = getResources().getIdentifier(get_name, \"id\", getPackageName()); //google power\n\n // check if checkbox is checked. And show or don't shown image accordingly\n if(checkbox.isChecked() == false)\n {\n image = findViewById(resID_from_name);\n image.setVisibility(View.INVISIBLE);\n }\n\n else\n {\n image = findViewById(resID_from_name);\n image.setVisibility(View.VISIBLE);\n }\n }",
"public String getCheckFlag() {\r\n return checkFlag;\r\n }",
"@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n\n// UIHelper.toastMessage(getContext(),checkedId+\"\");\n\n if (checkedId == R.id.card_yes) {\n checked = true;\n } else {\n\n checked = false;\n merge(0);\n }\n\n }",
"@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n Log.v(\"라디오버튼\"+checkedId+\"이고\",\"designer 값은 \"+R.id.designer+\"이다.\");\n\n }",
"public Boolean getIsCheck()\r\n\t{\r\n\t\treturn isCheck;\r\n\t}",
"public String getCheckFlag() {\n return checkFlag;\n }",
"@Override\n\tpublic void setChecked(boolean checked) {\n\t\tthis.checked = checked;\n\t}",
"@When(\"I click on checkboxradio\")\n public void i_click_on_checkboxradio() {\n System.out.println(\"checkbox\");\n }",
"public boolean getValue() {\n\t\treturn _checked;\n\t}",
"@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tif(sw.isChecked())\n\t\t\t{\n\t\t\t\tpartybool=true;\n\t\t\t\tDnDlevel=2;\n\t\t\t\tToast.makeText(con,\"\"+DnDlevel+\" \"+partybool,Toast.LENGTH_LONG).show();\n\t\t\t\tsb.setProgress(100);\n\t\t\t}\n\t\t}",
"public interface OnCheckedListener {\n void onCheck(boolean isChecked);\n}",
"public void onChecked(View check, View emailTxt, View passwordTxt) {\n\n email = ((EditText) emailTxt).getText().toString();\n password = ((EditText) passwordTxt).getText().toString();\n CheckBox checkbox = ((CheckBox) check);\n\n if (checkbox.isChecked() && (!email.isEmpty() && !password.isEmpty())) {\n new SharedPreference_Login(activity).saveDetail(email, password);\n } else {\n new SharedPreference_Login(activity).removeDetails();\n checkbox.setChecked(false);\n// Toast.makeText(activity,\"please checking arrivals!!!\",Toast.LENGTH_LONG).show();\n }\n\n\n }",
"@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n Log.d(\"signin\",checkedId+\"\");\n role = checkedId - 2131230788;\n /*\n switch (checkedId){\n case 0:\n role = 0;\n break;\n case 1:\n role = 1;\n break;\n case 2:\n role = 2;\n break;\n default:\n break;\n }*/\n }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_23.setVisibility(View.INVISIBLE);\r\n item23_t= item23;\r\n item23 = 0;\r\n Log.i(TAG,\"item23\" + item23);\r\n }else{\r\n spinner_item_23.setVisibility(View.VISIBLE);\r\n item23 = item23_t;\r\n Log.i(TAG,\"item23\" + item23);\r\n }\r\n }",
"public void onCheckboxClicked(View view) {\n myDb = new DatabaseHelper(this);\n boolean checked = ((CheckBox) view).isChecked(); // Is the view now checked?\n\n switch (view.getId()) {\n case R.id.CB0:\n if (checked) {\n myDb.insertData(\"bread\", defaultAmount);\n Toast.makeText(VegUser.this,\"Bread Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB1:\n if (checked) {\n myDb.insertData(\"pasta\", defaultAmount);\n Toast.makeText(VegUser.this,\"Pasta Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB2:\n if (checked) {\n myDb.insertData(\"rice\", defaultAmount);\n Toast.makeText(VegUser.this,\"Rice Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB3:\n if (checked) {\n myDb.insertData(\"eggs\", defaultAmount);\n Toast.makeText(VegUser.this,\"Eggs Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB4:\n if (checked) {\n myDb.insertData(\"yogurt\", defaultAmount);\n Toast.makeText(VegUser.this,\"Yogurt Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB5:\n if (checked) {\n myDb.insertData(\"broccoli\", defaultAmount);\n Toast.makeText(VegUser.this,\"Broccoli Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB6:\n if (checked) {\n myDb.insertData(\"olive Oil\", defaultAmount);\n Toast.makeText(VegUser.this,\"Olive Oil Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB7:\n if (checked) {\n myDb.insertData(\"canola Oil\", defaultAmount);\n Toast.makeText(VegUser.this,\"Canola Oil Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB8:\n if (checked) {\n myDb.insertData(\"lettuce\", defaultAmount);\n Toast.makeText(VegUser.this,\"Lettuce Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n case R.id.CB9:\n if (checked) {\n myDb.insertData(\"carrots\", defaultAmount);\n Toast.makeText(VegUser.this,\"Carrots Inserted\",Toast.LENGTH_LONG).show();\n break;\n }\n }\n\n finishedButton = findViewById(R.id.finishButton);\n finishedButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) { //upon click, pantry will be filled and list of items will be shown\n Intent goToPantry = new Intent(VegUser.this, ListPantry.class);\n startActivity(goToPantry); //needs to go to pantry so preference activity refreshes\n }\n });\n }",
"public interface CheckedListener {\n void onChecked(View v, boolean checked);\n}",
"@Test\n public void onLbsRBTNClicked(){\n onView(withId(R.id.lbsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.kgsRBTN)).check(matches(isNotChecked()));\n }",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\t\t\t\tprefs.edit().putBoolean(\"silentOnCall\", silentToall.isChecked()).commit();\n\t\t\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n mSparseBooleanArray.put((Integer) buttonView.getTag(), isChecked);\n }",
"@Test\n public void onMaleRBTNClicked(){\n onView(withId(R.id.maleRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.femaleRBTN)).check(matches(isNotChecked()));\n }",
"public void setTutorial(boolean checked){\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putBoolean(\"TUTORIAL_CHECKED\", checked);\n editor.commit();\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == Constants.DATA_ENTERED) { //check if data entered\n if (resultCode == RESULT_OK) { //if the result code is ok\n boolean checked = data.getBooleanExtra(Constants.SELECT, false); //checked or not checked boolean\n\n //if checkbox is checked\n if (checked) {\n Toast.makeText(ActivityOne.this, Constants.AGREE, Toast.LENGTH_LONG).show(); //display toast on activity one\n } else {\n Toast.makeText(this, Constants.DISAGREE, Toast.LENGTH_LONG).show(); //display toast on activity one\n }\n }\n }\n }",
"public boolean isChecked() {\r\n\t\treturn getCheck().isSelected();\r\n\t}",
"@Override\r\n\t\tpublic void onCheckedChanged(CompoundButton arg0, boolean isChecked) {\n\t\t\tif (RecordSwitchEvent == true)\r\n\t\t\t\treturn;\r\n\t\t\tif (isChecked) {\r\n\t\t\t\t// 打开\r\n\t\t\t\tif (!(\"\".equals(app.GetMtkaddr()))) {\r\n\t\t\t\t\tSendGuardMessage(\"C\" + app.GetMtkaddr() + \"CKQLY\",Const.FAILKQLY);\r\n\t\t\t\t}\r\n\t\t\t\tIsOpenRecord = true;\r\n\t\t\t} else {\r\n\t\t\t\tif (!(\"\".equals(app.GetMtkaddr()))) {\r\n\t\t\t\t\tSendGuardMessage(\"C\" + app.GetMtkaddr() + \"CGBLY\",Const.FAILGBLY);\r\n\t\t\t\t}\r\n\t\t\t\tIsOpenRecord = false;\r\n\t\t\t}\r\n\t\t\tRecordActionToggle.setEnabled(false);\r\n\t\t\tRecordActionToggle.getBackground().setAlpha(100);\r\n\t\t\tRecordActionText.setText(\"\");\r\n\t\t\tprogressDialog =ProgressDialog.show(RecordActivity.this, null, getString(R.string.all_activity_send));\r\n\t\t\t//DelayUpdateSwitch();\r\n\t\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n mSparseBooleanArray.put((Integer) buttonView.getTag(),\n isChecked);\n }",
"public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\n if(isChecked)\n {\n Log.d(\"sstaus\",\"\"+isChecked+\"\"+path_folder.get(position));\n c.setChecked(true);\n writetodb(path.get(position));\n\n }\n else\n {\n Log.d(\"sstaus\",\"\"+isChecked+\"\"+path_folder.get(position));\n c.setChecked(false);\n delfromdb(path.get(position));\n }\n }",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 4;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-4;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 4;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-4;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 4;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-4;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 4;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-4;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif(isChecked){\r\n\t //update the status of checkbox to checked\r\n\t \r\n\t checkedItem.set(p, true);\r\n\t idList.set(p,id);\r\n\t item.set(p, friend);\r\n\t nameList.set(p, name);\r\n\t }else{\r\n\t //update the status of checkbox to unchecked\r\n\t checkedItem.set(p, false);\r\n\t idList.set(p,null);\r\n\t item.set(p, null);\r\n\t nameList.set(p, null);\r\n\t }\r\n\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n sparseBooleanArray = listview.getCheckedItemPositions();\n\n ValueHolder = \"\" ;\n\n int i = 0 ;\n\n while (i < sparseBooleanArray.size()) {\n\n if (sparseBooleanArray.valueAt(i)) {\n\n ValueHolder += goodlist [ sparseBooleanArray.keyAt(i) ] + \",\";\n }\n\n i++ ;\n }\n\n ValueHolder = ValueHolder.replaceAll(\"(,)*$\", \"\");\n\n Toast.makeText(listforcar.this, \"ListView Selected Values = \" + ValueHolder, Toast.LENGTH_LONG).show();\n\n }",
"@Override\r\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\r\n\t}",
"void printCheck();",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 7;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-7;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\r\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\tswitch(checkedId){\r\n\t\t\tcase R.id.add_device_actvity_checkbox_lamp:{\r\n\t\t\t\ttypeDevice = 0;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase R.id.add_device_actvity_checkbox_fan:{\r\n\t\t\t\ttypeDevice = 1;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase R.id.add_device_actvity_checkbox_garage:{\r\n\t\t\t\ttypeDevice = 2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase R.id.add_device_actvity_checkbox_camera:{\r\n\t\t\t\ttypeDevice = 3;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase R.id.add_device_actvity_checkbox_tv:{\r\n\t\t\t\ttypeDevice = 4;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_22.setVisibility(View.INVISIBLE);\r\n item22_t= item22;\r\n item22 = 0;\r\n Log.i(TAG,\"item22\" + item22);\r\n }else{\r\n spinner_item_22.setVisibility(View.VISIBLE);\r\n item22 = item22_t;\r\n Log.i(TAG,\"item22\" + item22);\r\n }\r\n }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_26.setVisibility(View.INVISIBLE);\r\n item26_t= item26;\r\n item26 = 0;\r\n Log.i(TAG,\"item26\" + item26);\r\n }else{\r\n spinner_item_26.setVisibility(View.VISIBLE);\r\n item26 = item26_t;\r\n Log.i(TAG,\"item26\" + item26);\r\n }\r\n }",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n li.setChecked(false);\n }\n //do something else\n kgButton = true;\n }",
"private boolean checkboxQuestion() {\n CheckBox detectiveCheck = (CheckBox) findViewById(R.id.greatest_detective);\n CheckBox greatestCheck = (CheckBox) findViewById(R.id.dark_knight);\n CheckBox boyWonderCheck = (CheckBox) findViewById(R.id.boy_wonder);\n CheckBox manOfSteelCheck = (CheckBox) findViewById(R.id.man_of_steel);\n\n boolean detectiveCheckChecked = detectiveCheck.isChecked();\n boolean greatestCheckChecked = greatestCheck.isChecked();\n boolean boyWonderCheckChecked = boyWonderCheck.isChecked();\n boolean manOfSteelCheckChecked = manOfSteelCheck.isChecked();\n\n return detectiveCheckChecked && greatestCheckChecked && !boyWonderCheckChecked && !manOfSteelCheckChecked;\n\n }",
"@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n\n }",
"@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n\n }",
"public String getType() { return \"Checking\"; }",
"@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n }"
] |
[
"0.7525838",
"0.74896336",
"0.74240625",
"0.6658514",
"0.65108395",
"0.6440869",
"0.6351837",
"0.6296398",
"0.6296398",
"0.62059975",
"0.61943346",
"0.6193375",
"0.618302",
"0.61804146",
"0.61709017",
"0.61164546",
"0.6042878",
"0.60394496",
"0.6033244",
"0.6001267",
"0.59826887",
"0.59708977",
"0.5956689",
"0.593736",
"0.5930601",
"0.59171295",
"0.5895038",
"0.58409816",
"0.5814532",
"0.5814532",
"0.5781331",
"0.57528466",
"0.57458544",
"0.57206196",
"0.56922096",
"0.565543",
"0.5640812",
"0.5622775",
"0.5621528",
"0.5621367",
"0.56197727",
"0.5600199",
"0.5576933",
"0.554008",
"0.5528281",
"0.55281",
"0.55269253",
"0.55139136",
"0.5505963",
"0.5502959",
"0.5493329",
"0.5491867",
"0.5484833",
"0.54812926",
"0.5476515",
"0.54749405",
"0.5469096",
"0.54679877",
"0.5462384",
"0.54555833",
"0.5454603",
"0.54535085",
"0.5446477",
"0.5441209",
"0.5432949",
"0.54307115",
"0.542533",
"0.5412619",
"0.54107034",
"0.5408023",
"0.53986865",
"0.5379995",
"0.53739464",
"0.5360505",
"0.5354464",
"0.53542966",
"0.53464615",
"0.5331416",
"0.5331233",
"0.5331002",
"0.532753",
"0.5319667",
"0.5315815",
"0.5315815",
"0.5315815",
"0.5315815",
"0.53088653",
"0.529185",
"0.5289197",
"0.5283272",
"0.5281491",
"0.5280149",
"0.52778435",
"0.5276165",
"0.5275124",
"0.52695227",
"0.5269345",
"0.5269345",
"0.5262414",
"0.525992"
] |
0.53507423
|
76
|
timer.setText("Time's Up!"); go to stats activity
|
public void onFinish() {
Intent statsIntent = new Intent(TriviaActivity.this, StatsActivity.class);
Log.d("test", "Initiate Stats Activity");
//Log.d("test", "Correct Answers: " + correctAnswers + "/" + questionList.size());
statsIntent.putExtra(MainActivity.PERCENT_KEY, (double)correctAnswers/(double)questionList.size());
Log.d("test", "Sending double: " + (double)correctAnswers/(double)questionList.size());
statsIntent.putExtra(MainActivity.QUESTION_LIST_KEY, questionList);
finish();
startActivity(statsIntent);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void updateCountdownText() {\r\n int minutes = (int) (timeLeftInMillis / 1000) / 60;\r\n int seconds = (int) (timeLeftInMillis / 1000) % 60;\r\n\r\n String timeFormatted = String.format(Locale.getDefault(), \"%02d:%02d\", minutes, seconds);\r\n\r\n mTimer.setText(timeFormatted);\r\n }",
"@Override\n public void run() {\n textTimer.setText(String.valueOf(currentTime));\n }",
"private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }",
"public void updateTimer( int secondsLeft ) {\n int minutes = secondsLeft / 60;\n int seconds = secondsLeft - (minutes * 60);\n\n String secondsString = Integer.toString(seconds);\n\n if(seconds <= 9) {\n secondsString = \"0\" + secondsString;\n }\n\n timerTextView.setText(Integer.toString(minutes) + \":\" + secondsString);\n// getRandomQuestion();\n }",
"void hp_counter()\n {\n T=new Timer();\n T.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //decrement the HP by delay of a second\n if(hp_value>0) {\n redball.setText(hp_value + \"\");\n hp_value--;\n }\n //you have lost and the game will reset\n else if(hp_value<=0)\n {\n //Here's a funny toast for all Sheldon's fans\n toast.setView(lost);\n toast.show();\n //\n resetValues();\n }\n }\n });\n }\n }, 1000, 1000);\n\n }",
"private void updateCountDownText() {\n int minutes = (int)(timeLeftInMillis / 1000) / 60 % 60;\n int seconds = (int)(timeLeftInMillis / 1000) % 60;\n\n String timeFormatted = String.format(Locale.getDefault(),\"%02d:%02d\",minutes,seconds);\n textViewCountDown.setText(timeFormatted);\n\n if (timeLeftInMillis < 10000) {\n textViewCountDown.setTextColor(Color.RED);\n } else {\n textViewCountDown.setTextColor(textColorDefaultCd);\n }\n }",
"public void resetClick (View view){\n \tstopped = false;\n \t((TextView)findViewById(R.id.timer)).setText(\"00:00:00\"); \t\n }",
"@Override\n public void onChanged(Long aLong) {\n String newText= MainActivity.this.getResources().getString(R.string.seconds, aLong);\n ((TextView) findViewById(R.id.timer_textview)).setText(newText);\n }",
"@Override\n public void onTick(long leftTimeInMilliseconds) {\n long seconds = leftTimeInMilliseconds / 1000;\n if(counter == 15){\n pgBarCountDown.setProgress(100);\n }\n else {\n pgBarCountDown.setProgress(counter * 6);\n }\n\n tv_timer_text.setText(counter+\" \" +\"Sec\");\n // format the textview to show the easily readable format\n counter++;\n\n }",
"public void setTimerTextLabel(String s) {\r\n labeltimer.setText(s);\r\n }",
"private void showTime()\n {\n showText(\"Time: \" + time, 700, 25);\n }",
"private void updateCountTV()\n {\n TextView countTextview = (TextView) findViewById(R.id.countTV);\n countTextview.setText(\"Counting Jelly Beans gives me \" + countJB);\n }",
"private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }",
"private void setTime() {\n \n new Timer(0, new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n Date d=new Date();\n SimpleDateFormat time=new SimpleDateFormat(\"hh:mm:ss a\");\n lblTime.setText(time.format(d));\n }\n }).start();\n \n \n }",
"public void showTimer(){\n mTimerProgressBar.setVisibility(View.VISIBLE);\n mTimerText.setVisibility(View.VISIBLE);\n }",
"void change(Label elapsedTimer) {\r\n\r\n if (seconds == 60) {\r\n mins++;\r\n seconds = 0;\r\n }\r\n if (mins == 60) {\r\n hours++;\r\n mins = 0;\r\n }\r\n \r\n elapsedTimer.setText(\r\n (((hours / 10) == 0) ? \"0\" : \"\") + hours + \":\"\r\n + (((mins / 10) == 0) ? \"0\" : \"\") + mins + \":\"\r\n + (((seconds / 10) == 0) ? \"0\" : \"\") + seconds++);\r\n\r\n }",
"void start_timer(){\n tv_verify_downtime.setVisibility(View.VISIBLE);\n countDownTimer.start();\n }",
"public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }",
"private void startTimer(long noOfMinutes) {\n countDownTimer = new CountDownTimer(noOfMinutes, 1000) {\n public void onTick(long millisUntilFinished) {\n millis = millisUntilFinished;\n //Convert milliseconds into hour,minute and seconds\n String hms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(millis), TimeUnit.MILLISECONDS.toMinutes(millis) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)), TimeUnit.MILLISECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)));\n tvTestTime.setText(hms);//set text\n }\n\n public void onFinish() {\n /*AlertDialog.Builder alertDialog= new AlertDialog.Builder(PracticeTestQAActivity.this);\n alertDialog.setTitle(getString(R.string.title_TestDurationExpired));\n alertDialog.setMessage(getString(R.string.msg_TestDurationExpired));\n alertDialog.setIcon(R.drawable.information);\n alertDialog.setPositiveButton(\"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n countDownTimer = null;//set CountDownTimer to null\n stopCountdown();\n }\n });\n alertDialog.show();\n*/\n countDownTimer = null;//set CountDownTimer to null\n stopCountdown();\n tvTestTime.setText(\"finish\");\n // tvTestTime.setText(\"TIME'S UP!!\"); //On finish change timer text\n\n tvTestTime.setVisibility(View.GONE);\n //goToResultActivity();\n }\n }.start();\n\n }",
"private void updateTime()\n {\n time++;\n this.timeTextField.setText(\"\" + time);\n }",
"public void time() {\n System.out.println(\"Enter the time you wish to free up\");\n }",
"private void SetTime() {\r\n\t\t timelbl.setText(second/3600+\":\"+((second/60)%60)+\":\"+(second%60));\r\n\t}",
"@Override\n public void run() {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"hh:mm aa\",\n Locale.getDefault());\n String formattedTime = sdf.format(System.currentTimeMillis());\n tvAlarmTime.setText(formattedTime);\n\n tvAlarmTitle.setText(R.string.snoozed_alarm);\n }",
"public static void startTimerLabel()\n {\n {\n if (timeline != null) {\n timeline.stop();\n }\n timeSeconds.set(STARTTIME);\n //timeLabel.setText(timeSeconds.toString());\n timeline = new Timeline();\n //timeline.setCycleCount(timeline.INDEFINITE); // need this?\n\n timeline.getKeyFrames().add(\n new KeyFrame(Duration.seconds(STARTTIME+1),\n new EventHandler<ActionEvent>() {\n public void handle(ActionEvent event) {\n //System.out.println(\"Got Timer timeout.\");\n if (cancel == false) {\n SceneResultsTimed.updatePlayerScore();\n localStage.setScene(SceneMgr.getScene(SceneMgr.IDX_RESULTSTIMED));\n }\n }\n },\n new KeyValue(timeSeconds, 0)));\n timeline.playFromStart();\n }\n }",
"private void advanceTime() {\r\n myCurrentTimeLabel.setText(DateFormat.getDateTimeInstance().format(new Date()));\r\n }",
"public void updateTimerDisplay(){\n int seconds = timeCounter / 60;\n setImage(new GreenfootImage(\"Time: \"+timeElapsed + \": \" + seconds, 24, Color.BLACK, Color.WHITE));\n }",
"private void countdown(){\n timer = new CountDownTimer(timeLeft, 1000) {\n @Override\n public void onTick(long millisUntilFinished) {\n timeLeft = millisUntilFinished;\n updateTimerView();\n }\n @Override\n public void onFinish() {\n timeLeft = 0;\n updateTimerView();\n checkAnswer();\n }\n }.start();\n }",
"@FXML\r\n\t void countDownMessage() throws InterruptedException {\n\t\t \tdisplayMessage.setText(\"3\"); \r\n\t\t \ttext = displayMessage.getText();\r\n\t\t timeSeconds = Integer.parseInt(text);\r\n\t\t \r\n\t\t Timer clock = new Timer();\r\n\t\t clock.scheduleAtFixedRate(new TimerTask() {\r\n\t\t public void run() {\r\n\t\t if(timeSeconds >= 0)\r\n\t\t {\r\n\t\t \tdisplayMessage.setText(Integer.toString(timeSeconds));\r\n\t\t timeSeconds--; \r\n\t\t }\r\n\t\t else {\r\n\t\t clock.cancel();\r\n\t\t displayMessage.setText(\"GO!\");\r\n\t\t try {\r\n\t\t\t\t\t\t\t\tcountDown();\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t \r\n\t\t //do something here after says GO!\r\n\t\t wordCount.setVisible(true);\r\n\t\t wordMax.setVisible(true);\r\n\t\t slash.setVisible(true);\r\n\t\t counterBox.setVisible(true);\r\n\t\t }\r\n\t\t }\r\n\t\t }, 1000,1000);\r\n }",
"public void startTimer()\n {\n\n timeVal = 0;\n timer = new Timer();\n\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n timeVal++;\n timeText.setText(\"Time: \" + timeVal);\n }\n }, 0, 1000);\n }",
"public void update() {\r\n\t\tlabel.setText(time / 60 + \":\" + ((time % 60 <= 9)? (\"0\" + time % 60) : (time % 60)));\r\n\t}",
"public void countDown() {\n makeTimer();\n int delay = 100;\n int period = 30;\n timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n tick();\n updatePlayerHealthUI();\n }\n }, delay, period);\n }",
"@Override\n public void onTick(long millisUntilFinished) {\n mCurrentTimer -= 1000;\n mTimer.setText(String.valueOf((int) (millisUntilFinished / 1000)));\n }",
"public void updateUI(){\n\t\t\n\t\ttimeTV.setText(\"\"+String.format(\"\" + gameClock%10));\n\t\ttimeTV2.setText(\"\"+ gameClock/10+\".\");\n\t\tif (currentGameEngine!=null) {\n\t\t\tmultLeft.setText(\"multiplier: \"+currentGameEngine.getMultiplier()+\"X\");\n\t\t\tscoreTV.setText(\"\"+currentGameEngine.getScore());\n\t\t} else {\n\t\t\tscoreTV.setText(\"0\");\n\t\t}\n\n\t\t//errorTV.setText(\"\"+mFrameNum);\n\t\t\n\t\t\n\t}",
"@Override\n public void updateTimer(int time) {\n if (isEnglish) {\n String temp = TIME_LEFT + time;\n painterTextViewTime.setText(temp);\n } else {\n String temp = TIME_LEFT_CHINESE + time;\n painterTextViewTime.setText(temp);\n }\n }",
"public void onTick(long millisUntilFinished) {\n tvTimer.setText(\"\"+String.format(\"%d min, %d sec\",\n TimeUnit.MILLISECONDS.toMinutes( millisUntilFinished),\n TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) -\n TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished))));\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.minute_text_view);\n quantityTextView.setText(\"\" + number);\n\n }",
"private void updateUI() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n if(timer_count==5) {\n\n //Animation Starts by Singing Si\n animateReceiveMoney();\n animateSendMoney();\n PlayIntoSound(siID);\n\n tvSiOut.setVisibility(View.VISIBLE);\n tvSiIn.setVisibility(View.VISIBLE);\n tvDoIn.setVisibility(View.VISIBLE);\n tvDoOut.setVisibility(View.VISIBLE);\n tvSIDO.setVisibility(View.VISIBLE);\n tvSIDO.setText(\"SI\");\n }\n\n else if(timer_count==20){\n //Animation Ends by Singing Do\n PlayIntoSound(doID);\n\n //dISPLAY DO TEXT\n tvSIDO.setText(\"SIDO\");\n\n\n }\n\n else if(timer_count==25){\n\n //DISPLAY mONEY TRANSFER TEXT\n tvMoneyTransfer.setVisibility(View.VISIBLE);\n\n }\n\n }\n });\n }",
"public void update()\n\t{\n\t\tmyTimer = new Timer(10, new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tremove(countDown);\n\t\t\t\ttimeElapsed = timeElapsed + 0.01;\n\t\t\t\tif(completed == myTokens.size())\n\t\t\t\t{\n\t\t\t\t\tmyTimer.stop();\n\t\t\t\t\tcountDown.setText(\"Thank you for playing!\");\n\t\t\t\t\tadd(countDown);\n\t\t\t\t}\n\t\t\t\ttime.setText(\"time: \" + String.format(\"%.2f\", timeElapsed));\n\t\t\t\tscore.setText(\"score: \" + userScore);\n\t\t\t\trepaint();\n\t\t\t}\n\t\t});\n\t\tmyTimer.setInitialDelay(5000);\n\t\tmyTimer.start();\n\t}",
"private void updateTurnInfo(){\n String info = players[blackPlayer] + \" plays Black\";\n turnInfo.setText(info);\n }",
"public void timer()\n {\n timer += .1; \n }",
"public void resetTimer() {\n button.setText(\"Notify Me!\");\n timerSeekBar.setProgress(60);\n timerSeekBar.setEnabled(true);\n timerText.setText(\"1:00\");\n counter.cancel();\n counterActive = false;\n }",
"private void setTimeCaption() {\n //System.out.println(\"currtime\"+currTimeProgressValue);\n int value=currTimeProgressValue/1000; // seconds representation\n int hours=value/(3600);\n int minutes=(value%(3600))/60;\n int seconds=(value%(3600))%60;\n this.lblTimeCaption.setText(Integer.toString(hours)+\" hours \"+Integer.toString(minutes)+\n \" minutes \"+Integer.toString(seconds)+\" seconds \");\n \n }",
"public void display(int counterMessage) {\n TextView textView = (TextView) findViewById(R.id.pointsValue);\n textView.setText(\"\" + counterMessage);\n }",
"@Override\n\tpublic void run() {\n\t\t((Activity)context).runOnUiThread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tString string = context.getString(R.string.message_timer, MainActivity.TIMER_TASK_PERIOD / 1000);\n\t\t\t\tToast.makeText(context, string, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void run() {\n sec++;\n if (sec > 9) {\n sec = 0;\n min++;\n }\n timer.setText(String.format(\"%02d\", sec) + \":\" + String.format(\"%02d\", min));\n handler.postDelayed(this, 1000);\n }",
"private void updateUI() {\n handler_.post(new Runnable() {\n public void run() {\n bar_.setProgress(time_);\n String remTimeStr = \"\" + (maxTime_ - time_);\n timeRemaining_.setText(REM_STRING.replace(\"?\", remTimeStr));\n }\n });\n }",
"@Override\n public void run() {\n\n secs++;\n if (secs == 10) {\n tens++;\n secs = 0;\n }\n if (tens == 6) {\n mins++;\n tens = 0;\n secs = 0;\n }\n time = mins + \":\" + tens + \"\" + secs;\n timePlayed.setText(\"Time: \" + time);\n }",
"public void timeTick()\r\n\t{\r\n\t\tnumberDisplay1.increment();\r\n\t}",
"@Override\n public void run() {\n if (!started) {\n timerTxt.setText(\"00:00:00\");\n }\n else {\n long currentTime = System.currentTimeMillis() - startTime;\n updateTime = currentTime;\n int secs = (int) (updateTime / 1000);\n int mins = secs / 60;\n int hours = mins / 60;\n secs %= 60;\n timerTxt.setText(\"\" + String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", mins) + \":\" + String.format(\"%02d\", secs), TextView.BufferType.EDITABLE);\n handler.post(this);\n }\n }",
"public final void setJam(){\nActionListener taskPerformer = new ActionListener() {\n\npublic void actionPerformed(ActionEvent evt) {\nString nol_jam = \"\", nol_menit = \"\",nol_detik = \"\";\n\njava.util.Date dateTime = new java.util.Date();\nint nilai_jam = dateTime.getHours();\nint nilai_menit = dateTime.getMinutes();\nint nilai_detik = dateTime.getSeconds();\n\nif(nilai_jam <= 9) nol_jam= \"0\";\nif(nilai_menit <= 9) nol_menit= \"0\";\nif(nilai_detik <= 9) nol_detik= \"0\";\n\nString jam = nol_jam + Integer.toString(nilai_jam);\nString menit = nol_menit + Integer.toString(nilai_menit);\nString detik = nol_detik + Integer.toString(nilai_detik);\n\nlblwktu.setText(jam+\":\"+menit+\":\"+detik+\"\");\n}\n};\nnew Timer(1000, taskPerformer).start();\n}",
"public void updateTimer(int timeElapsed){\n mTimerText.setText(\n String.format(\"TIME LEFT: %ds\",10 - timeElapsed));\n mTimerProgressBar.setProgress((int)((timeElapsed/10.0)*100.0));\n }",
"@Override\n public void onClick(View v) {\n mSec = 0;\n mins = 0;\n seconds = 0;\n updateTime = 0L;\n timeBuff = 0L;\n startTime = 0L;\n mSecTime = 0L;\n\n timer.setText(\"00:00:00\");\n\n //this clears the list view\n TimeList.clear();\n\n //notifyDataSetChanged method notifies the adapter that the data\n // has been changed and it needs to do a refresh\n adapter.notifyDataSetChanged();\n }",
"private void updateCounterView(String text) {\n final String txt = text;\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if(txt!=null) {\n pointsLeftView.setText(txt);\n } else {\n pointsLeftView.setText(Integer.toString(counter));\n }\n }\n });\n }",
"@FXML\r\n\t void countDownMessage2() throws InterruptedException {\n\t\t \tdisplayMessage.setText(\"3\"); \r\n\t\t \ttext = displayMessage.getText();\r\n\t\t timeSeconds = Integer.parseInt(text);\r\n\t\t \r\n\t\t Timer clock = new Timer();\r\n\t\t clock.scheduleAtFixedRate(new TimerTask() {\r\n\t\t public void run() {\r\n\t\t if(timeSeconds >= 0)\r\n\t\t {\r\n\t\t \tdisplayMessage.setText(Integer.toString(timeSeconds));\r\n\t\t timeSeconds--; \r\n\t\t }\r\n\t\t else {\r\n\t\t clock.cancel();\r\n\t\t displayMessage.setText(\"DupMe!\");\r\n\t\t try {\r\n\t\t\t\t\t\t\t\tcountDown2();\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t \r\n\t\t //do something here after says GO!\r\n\t\t wordCount.setVisible(true);\r\n\t\t wordMax.setVisible(true);\r\n\t\t slash.setVisible(true);\r\n\t\t counterBox.setVisible(true);\r\n\t\t yourPattern.setVisible(true);\r\n\t\t lastPattern.setVisible(true);\r\n\t\t }\r\n\t\t }\r\n\t\t }, 1000,1000);\r\n }",
"public void startClock() {\n Timer timer = new Timer(100, new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n String dateTime = new Date().toString();\n \n clockLabel.setText(dateTime);\n \n }\n });\n timer.start();\n }",
"private void startCountdown(int Seconds, final TextView tv){\n\n countDownTimer = new CountDownTimer(Seconds* 1000 + 1000, 1000) {\n\n public void onTick(long millisUntilFinished) {\n int seconds = (int) (millisUntilFinished / 1000);\n int minutes = seconds / 60;\n seconds = seconds % 60;\n tv.setText(String.format(\"%01d\", seconds));\n }\n\n public void onFinish() {\n tv.setText(\"0\");\n Toast.makeText(getApplicationContext(), R.string.msgTimeExpired, Toast.LENGTH_LONG).show();\n authReject(tv);\n }\n }.start();\n }",
"public void actionPerformed(ActionEvent event) {\r\n\r\n\t\t\t\tsetTimer += 1;\r\n\t\t\t\tif (setTimer > maxTime) {\r\n\t\t\t\t\ttimer.stop();\r\n\t\t\t\t\tsetTimer = maxTime;\r\n\t\t\t\t\ttime.setText(\"fi \" + fmt.format(setTimer));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttime.setText(fmt.format(setTimer));\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"private void countTime()\n {\n time--;\n showTime();\n if (time == 0)\n {\n showEndMessage();\n Greenfoot.stop();\n }\n }",
"public void currentTime() {\n Thread clock = new Thread() {\n public void run() {\n for (;;) {\n Calendar cal = new GregorianCalendar();\n int second = cal.get(Calendar.SECOND);\n int minute = cal.get(Calendar.MINUTE);\n int hour = cal.get(Calendar.HOUR);\n \n txtKluar.setText(hour + \":\" + minute + \":\" + second + \" \");\n try {\n sleep(1000);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }\n }\n };\n clock.start();\n }",
"private void setStatTextViews() {\n TextView numLives = findViewById(R.id.lives);\n numLives.setText(String.valueOf(player.getLives()));\n\n TextView multiplier = findViewById(R.id.currMultiply);\n multiplier.setText(String.valueOf(player.getMultiplier()));\n\n TextView totalPoint = findViewById(R.id.currScore);\n totalPoint.setText(String.valueOf(player.getPoints()));\n }",
"public void updateP1(String stats)\r\n\t{\r\n\t\tp1.setText(stats);\r\n\t}",
"@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}",
"@Override\n\t\t\tpublic void onTick(long millisUntilFinished) {\n\t\t\t\tbtn_countdowntime.setText((millisUntilFinished / 1000)\n\t\t\t\t\t\t+ \"秒后可重发\");\n\t\t\t}",
"public void setTime()\n \t{\n \t\tif( !paused )\n \t\t{\n\t \t\tlong playingTime = System.currentTimeMillis() - startTime;\n\t \t\tlong timeLeft = 180000 - playingTime;\n\t \t\tlong min = timeLeft / 60000;\n\t \t\tlong sec = ( timeLeft - ( min * 60000 ) ) / 1000L;\n\t \t\t\n\t \t\tif( timeLeft < 0 )\n\t \t\t{\n\t \t\t\t//Game over!\n\t \t\t\tgameOver();\n\t \t\t\treturn;\n\t \t\t}\n\t \t\t\n\t \t\tString s = \"Time: \";\n\t \t\ts += Integer.toString( (int)min ) + \":\";\n\t \t\tif( sec >= 10 )\n\t \t\t\ts += Integer.toString( (int)sec );\n\t \t\telse\n\t \t\t\ts += \"0\" + Integer.toString( (int)sec );\n\t \t\t\n\t \t\ttimerLabel.setText( s );\n \t\t}\n \t}",
"public void onTick(long millisUntilFinished) {\n\n timeleftTextview.setText(\"seconds remaining: \" + millisUntilFinished / 1000);\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\ttimeLeft--;\n\t\ttimerText.setText(timeLeft + \" seconds\");\n\t\ttimerText.repaint();\n\t\tif (timeLeft == 0) {\n\t\t\twindow.displayHS();\n\t\t\twindow.write();\n\t\t\tdispose();\n\t\t}\n\t}",
"@Override\n\t public void run()\n\t {\n\t \ttv_sys_uptime.setText(getUptime()); \n\t mHandler.postDelayed(this, 1000);\n\t }",
"public void onTick(long millisUntilFinished) {\n time=millisUntilFinished;\n tvtimer.setText(\"\" + TimeUnit.MILLISECONDS.toHours(millisUntilFinished) + \" : \" + String.format(FORMAT_2, TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millisUntilFinished))) + \" : \" + String.format(FORMAT_2, TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished))));\n }",
"private void statButtonClicked()\n {\n lblSTRValue.setText(dice.statRoll() + \"\");\n lblCONValue.setText(dice.statRoll() + \"\");\n lblDEXValue.setText(dice.statRoll() + \"\");\n lblAGIValue.setText(dice.statRoll() + \"\");\n lblINTValue.setText(dice.statRoll() + \"\");\n lblWISValue.setText(dice.statRoll() + \"\");\n lblCHAValue.setText(dice.statRoll() + \"\");\n lblPERValue.setText(dice.statRoll() + \"\");\n displayPowers();\n }",
"private void updateTimer()\r\n {\n if (timeLeft > 0)\r\n {\r\n frameCounter++;\r\n \r\n // if a second has passed\r\n if (frameCounter >= frameRate)\r\n {\r\n // reset the frame counter\r\n frameCounter = 0;\r\n \r\n // update the secondsElapsed var\r\n totalSecondsElapsed++;\r\n \r\n // subtract a second from the timer\r\n timeLeft--;\r\n \r\n // change the time into mins & seconds\r\n int minsLeft = timeLeft / 60;\r\n int secondsLeft = timeLeft % 60;\r\n \r\n // update the time display (min:sec)\r\n String timerDisplay = minsLeft + \":\" + getLeadingZero(secondsLeft, 10) + secondsLeft;\r\n timerText.text = timerDisplay;\r\n timerText.updateText();\r\n }\r\n }\r\n else\r\n {\r\n endGame();\r\n }\r\n }",
"public void ButtonStartClick(View view){\n\n final MyCountDownTimer cdt = new MyCountDownTimer(180000, 1000);\n\n cdt.start();\n }",
"private void setTxtTimeTotal()\n {\n SimpleDateFormat dinhDangGio= new SimpleDateFormat(\"mm:ss\");\n txtTimeTotal.setText(dinhDangGio.format(mediaPlayer.getDuration()));\n //\n skSong.setMax(mediaPlayer.getDuration());\n }",
"private void setTimeText(int minutes, TextView textTime) {\n String timeString = String.format(\"%d minutes\", minutes +\n convertProgressToMeters(PROGRESS_MIN));\n textTime.setText(timeString);\n }",
"@Override\n public void onClick(View v) {\n userTurn = 0;\n\n //compScore = compTurn+compScore;\n compTurn=0;\n\n\n\n TextView scores = (TextView) findViewById(R.id.scoreStatement);\n scoreStatementjava = \"User holds. Computer's turn. Your score: \" + userScore + \". Computer score: \" + compScore + \". Your turn score is: \" + userTurn;\n //scoreStatementjava = \"User holds. Computer's turn.\";\n scores.setText(scoreStatementjava);\n\n computerTurn();\n }",
"public void onClickSaveTimer(View view){\r\n\t\t\r\n\t\t//Minute value\r\n\t\tEditText timerTextView1 = (EditText) findViewById(R.id.timerEntry);\r\n\t\t//Second Value\r\n\t\tEditText timerTextView2 = (EditText) findViewById(R.id.timerEntry2);\r\n\t\t\r\n\t\tif (timerTextView1.getText().toString() == \"\")\r\n\t\t{\r\n\t\t\ttimerTextView1.setText(\"0\");\r\n\t\t}\r\n\t\tif (timerTextView2.getText().toString() == \"\")\r\n\t\t{\r\n\t\t\ttimerTextView2.setText(\"0\");\r\n\t\t}\r\n\t\t\r\n\t\t//Parse the two string values to ints.\r\n\t\tint localTimerMin = Integer.parseInt(timerTextView1.getText().toString());\r\n\t\tint localTimerSec = Integer.parseInt(timerTextView2.getText().toString());\r\n\r\n\t\tint theTime = (localTimerMin * 60) + localTimerSec;\r\n\t\t\r\n\t\tthis.setTotalTimer(theTime);\r\n\t\t\r\n\t\t//Return to user activity screen.\r\n\t\tIntent returnUserIntent = new Intent( this, FlashBuddyStudyDecksActivity.class );\r\n\t\t\r\n\t\tIntent carryUsername = getIntent();\r\n\t\tString username = carryUsername.getStringExtra(FlashBuddy.USERNAME_MESSAGE);\r\n\t\treturnUserIntent.putExtra( FlashBuddy.USERNAME_MESSAGE, username );\r\n\t\t\r\n \tstartActivity(returnUserIntent);\r\n\t\t\r\n\t}",
"private void startTimer()\n {\n if (timer == null)\n {\n timer = new CountDownTimer(TIMER_MILLI_SEC, 1000)\n {\n @Override\n public void onTick(long l)\n {\n timerText.setText(\"\" + l / 1000);\n }\n\n @Override\n public void onFinish()\n {\n // Let P2 play\n if (secondPlayer instanceof IAPlayer)\n {\n ((IAPlayer) secondPlayer).playRandom();\n }\n // Animations and full results\n announceRoundResult();\n\n // Hide timer\n timerText.setVisibility(View.GONE);\n gameControlButton.setVisibility(View.VISIBLE);\n }\n };\n }\n\n // Clean UI state\n gameControlButton.setVisibility(View.INVISIBLE);\n timerText.setVisibility(View.VISIBLE);\n\n drawIcon.setVisibility(View.INVISIBLE);\n firstCup.setVisibility(View.INVISIBLE);\n secondCup.setVisibility(View.INVISIBLE);\n\n // Reset users actions\n resetActionButtonsState();\n firstPlayer.resetLastAction();\n secondPlayer.resetLastAction();\n\n // First player plays first\n if (firstPlayer instanceof IAPlayer)\n {\n ((IAPlayer) firstPlayer).playRandom();\n }\n\n // Start count down\n timer.start();\n }",
"void startUpdateTimer();",
"TimerStatus onTimer();",
"private void startTime()\n {\n timer.start();\n }",
"private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }",
"public Main() {\n initComponents();\n setUser();\n\n Timer dongho = new Timer(1000, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n Calendar lich = Calendar.getInstance();\n int gio = lich.get(Calendar.HOUR);\n int phut = lich.get(Calendar.MINUTE);\n int giay = lich.get(Calendar.SECOND);\n jtfCurrent.setText(\" \" + gio + \" : \" + phut + \" : \" + giay);\n }\n });\n dongho.start();\n }",
"@Override\n public void run() {\n if (!MainActivity.pause) {\n MainActivity.fetch = MainActivity.fetch - 1;\n MainActivity.cpbProgress.setProgress(MainActivity.fetch);\n if (MainActivity.fetch < 10) {\n MainActivity.tvTimer.setText(Constant.ZERO + MainActivity.fetch + \"\");\n } else {\n MainActivity.tvTimer.setText(MainActivity.fetch + \"\");\n }\n if (MainActivity.fetch == 0) {\n /*Toast t=Toast.makeText(MainActivity.act, \"Sorry time is Up....\",4000);//////..........not working............///////\n t.show();*/\n finish();\n System.exit(0);\n }\n } else {\n i--;\n }\n }",
"public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView tdate=(TextView)findViewById(R.id.textview_time);\n long date=System.currentTimeMillis();\n SimpleDateFormat sdf=new SimpleDateFormat(\"hh-mm a\");\n String dateString=sdf.format(date);\n tdate.setText(dateString);\n }\n });\n }",
"public void setTimer() {\n\t\t\n\t}",
"public void fillText(View view){\n if(running==true){\n\n\n latestOp=false;\n for(int i = 0; i<9; i++)\n if(i==win&&idOfViews[i]==view.getId()) {\n score++;\n sec=sec+3;\n latestOp=true;\n }\n\n //Defining the score\n total++;\n scoret.setText(\" \"+score+\" /\"+total);\n\n //Setting the message about the latest one.\n resultT.setText(\"Missed\");\n if(latestOp==true)\n resultT.setText(\"Correct!\");\n\n\n //Calling a new screen\n newScreen();\n }\n\n\n }",
"public void showTimeLeft(int time, String state);",
"private void gameTimerOnTick(long millisUntilFinished) {\n gameTimeLeftYet = millisUntilFinished;\n String currentTimeLeft = String.format(\"%02d:%02d\",\n TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished) -\n TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millisUntilFinished)), // The change is in this line\n TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) -\n TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished)));\n gameTimerTv.setText(currentTimeLeft);\n }",
"public void updateTime()\n {\n lblStatus.setText(\"Up: \" + time);\n\n if (time.getTimeRan() >= 60)\n {\n lblRPM.setText(\"Avg RPM: \"\n + (int) (recoveryAttempts\n / (time.getTimeRan() / 60)));\n ti.setToolTip(\"AR v4 - \"\n + (int) (recoveryAttempts\n / (time.getTimeRan() / 60)) + \" rpm\");\n }\n }",
"public void onFinish() {\n //set button text to teatype ready\n mStopButton.setText(teatype + \" \" + getResources().getString(R.string.ready));\n //start alarm and vibration\n startAlarm();\n //display toast\n Toast toast = Toast.makeText(context, teatype + \" \" + getResources().getString(R.string.ready), Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL, 0, 50);\n toast.show();\n //replace countdown timer with Ready!\n mTextField.setText(R.string.ready);\n }",
"public void drawTimer(Graphics art)\n\t{\n\t\tcounter++;\n\t\tif(counter % 60 == 0)\n\t\t{\n\t\t\tseconds++;\n\t\t}\n\t\tart.drawString(\"Time =\"+seconds, 50, 120);\n\t}",
"private void startTimer() {\n\n //call renewWord function once the timer is on\n renewWord();\n countDownTimer = new MyCountDown(totalTimeCountInMilliseconds, 50);\n countDownTimer.start();\n }",
"public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }",
"protected void timer_tick(ActionEvent e) {\n\t\thour = time / 3600;\r\n\t\tminute = time % 3600 / 60;\r\n\t\tsecond = time % 3600 % 60;\r\n\t\tlblCountDown.setText(\"剩余时间:\" + stringTime(hour) + \":\" + stringTime(minute) + \":\" + stringTime(second));\r\n\t\tif (time == 0) {\r\n\t\t\ttimer.stop();\r\n\t\t\ttimeOut();\r\n\t\t}\r\n\t\ttime--;\r\n\t}",
"public void start() {timer.start();}",
"public void startCountDown() {\r\n\t\ttimerLabel = new TextField();\r\n\t\tif(timer!=null){timer.cancel();}\r\n\t\ttimer = new Timer();\r\n\t\ttimerLabel.setStyle(\"-fx-text-fill:white\");\r\n\t\ttimerLabel.setFont(Font.font(\"Verdana\", FontWeight.BOLD, 15));\r\n\t\ttimerLabel.setBackground(Background.EMPTY);\r\n\t\ttimerLabel.setAlignment(Pos.TOP_RIGHT);\r\n\t\ttimerLabel.setEditable(false);\r\n\t\ttowersRegion.getChildren().add(2, timerLabel);\r\n\t\tcountDownRunning = true; // indicate that counting down started\r\n\t\t\t\r\n\t\ttimer.schedule(new TimerTask() { // timer task to update the seconds\r\n\t\t\t@Override\r\n\t\t public void run() {\r\n\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t \t timerLabel.setText(\"Time left: \" + countDown);\r\n\t\t countDown--;\r\n\t\t if (countDown < 0){timer.cancel();}\r\n\t\t\t}});}}, 1000, 1000); //Every 1 second\r\n\t\t \r\n\t\t timeline = new Timeline(new KeyFrame( // create a time line to remove the special brick effect after 7 seconds\r\n\t\t\t\t \t\tDuration.seconds(7), ae -> { removeEffectFromSpecialBrick();})); // lambda style\r\n\t\t timeline.play();\r\n\t}",
"public void onClick(View v) {\n lbl.setText(\"Hola jose\");\n }",
"public void setTimer(View view) {\n Intent intent = new Intent(this, CreateTimer.class);\n }",
"public void setPlayerTurnName(){\n game.setPlayerTurn();\n String playerTurnName = game.getPlayerTurnName();\n playerturntextID.setText(playerTurnName + \" : Turn !!\");\n }",
"public void timePassed() {\r\n\r\n }",
"private void setTimer(){\n\n //initialize the time variable\n int time = 10;\n\n //calculate the totaltime\n totalTimeCountInMilliseconds = time * 1000;\n\n //set the maximum time of the progress bar timer\n mProgressBar1.setMax( time * 1000);\n }",
"private void displaySnoozedInfo() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // Simply show current time and \"Snoozed Alarm\" as title\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"hh:mm aa\",\n Locale.getDefault());\n String formattedTime = sdf.format(System.currentTimeMillis());\n tvAlarmTime.setText(formattedTime);\n\n tvAlarmTitle.setText(R.string.snoozed_alarm);\n }\n });\n }"
] |
[
"0.6960367",
"0.68350405",
"0.67811614",
"0.6751295",
"0.6731554",
"0.664781",
"0.6643857",
"0.6620795",
"0.6603536",
"0.659849",
"0.65820146",
"0.6573851",
"0.65010595",
"0.64999306",
"0.64901286",
"0.64702153",
"0.64592975",
"0.6449666",
"0.6448288",
"0.6443707",
"0.6441179",
"0.64259154",
"0.6417086",
"0.6416229",
"0.6408778",
"0.6394482",
"0.63893235",
"0.63758767",
"0.63356745",
"0.63270235",
"0.63106316",
"0.6269226",
"0.625718",
"0.6247332",
"0.6244108",
"0.62429947",
"0.623962",
"0.6225754",
"0.6206344",
"0.61675787",
"0.6165998",
"0.6158867",
"0.6150427",
"0.614771",
"0.6143535",
"0.6130348",
"0.6129328",
"0.612699",
"0.61214983",
"0.61092865",
"0.6107888",
"0.6097755",
"0.60945815",
"0.60802716",
"0.60801077",
"0.6074457",
"0.606179",
"0.60606205",
"0.60588664",
"0.6058072",
"0.60556006",
"0.6046387",
"0.6031377",
"0.60274476",
"0.6017862",
"0.6016354",
"0.60121626",
"0.6007696",
"0.60068965",
"0.60043913",
"0.6001531",
"0.60013443",
"0.59999806",
"0.5981231",
"0.5975923",
"0.5970978",
"0.59690475",
"0.5954072",
"0.5952483",
"0.5949711",
"0.5947951",
"0.59460634",
"0.59396696",
"0.5939146",
"0.5931258",
"0.5927334",
"0.5927297",
"0.59234715",
"0.59204745",
"0.5918472",
"0.59164596",
"0.59138227",
"0.590865",
"0.5906185",
"0.5905772",
"0.5901249",
"0.59003615",
"0.58950645",
"0.5892954",
"0.58889794",
"0.58886695"
] |
0.0
|
-1
|
Draw a line from the old location to the new location
|
@Override
public void changed(ObservableValue<? extends Duration> observable, Duration oldValue, Duration newValue) {
// skip starting at 0/0
if( oldValue == Duration.ZERO)
return;
// get current location
double x = pen.getTranslateX();
double y = pen.getTranslateY();
// initialize the location
if( oldLocation == null) {
oldLocation = new Location();
oldLocation.x = x;
oldLocation.y = y;
return;
}
// draw line
gc.setStroke(Color.BLUE);
gc.setFill(Color.YELLOW);
gc.setLineWidth(7);
gc.strokeLine(oldLocation.x, oldLocation.y, x, y);
// update old location with current one
oldLocation.x = x;
oldLocation.y = y;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void drawLine(int x, int y, int x2, int y2, int color);",
"public void drawLine(int x1, int y1, int x2, int y2);",
"public abstract void lineTo(double x, double y);",
"protected abstract void lineTo(final float x, final float y);",
"public void lineTo(int x, int y){\n paint.setColor(Color.parseColor(\"#000000\"));\n //ToDo: implement line drawing here\n\n canvas.drawLine(lastX, lastY, x, y, paint);\n lastX = x;\n lastY = y;\n Log.d(\"Canvas Element\", \"drawing line from: \" + lastX + \", \" + lastY +\",\" + \" to: \" + x +\", \" + y);\n }",
"public void drawLine(float x, float y, float x2, float y2, float width, float u, float v, float texW, float texH) {\n throw new NotImplementedException(); // TODO Implement\n }",
"public void lineTo(double x, double y)\n {\n\tPoint2D pos = transformedPoint(x,y);\n\tdouble tx = pos.getX();\n\tdouble ty = pos.getY();\n\t\n\tLine line = new Line(_currentx, _currenty, tx, ty);\n\n\tSystem.out.println(\"+Line: \" + line.toString());\n\t_currentPath.add(line);\n\t_currentx = tx;\n\t_currenty = ty;\n }",
"private void drawLine(double x1, double y1, double x2, double y2) {\r\n\t\tGLine line = new GLine(x1,y1,x2,y2);\r\n\t\tadd(line);\r\n\t}",
"public void draw()\n {\n drawLine(x1, y1, x2, y2);\n }",
"private void drawLine(GraphicsContext canvas, Point start, Point end) {\n canvas.strokeLine(\n start.X, start.Y,\n end.X, end.Y\n );\n }",
"@Override\n public void lineTo(double x, double y) {\n graphicsEnvironmentImpl.lineTo(canvas, x, y);\n }",
"void addLine(int index, Coordinate start, Coordinate end);",
"public void drawLine(float x, float y, float x2, float y2, float width) {\n throw new NotImplementedException(); // TODO Implement\n }",
"public void drawTo(Point that) {\r\n /* DO NOT MODIFY */\r\n StdDraw.line(this.x, this.y, that.x, that.y);\r\n }",
"public static void writeLine(Model model, int x1, int y1, int x2, int y2, char colour) {\n int xLength = model.getWidth();\n int yLength = model.getHeight();\n\n if (x1 > xLength || x2 > xLength || y1 > yLength || y2 > yLength) {\n System.out.println(String.format(\"Couldn't create line inside current simpleCanvas width: %d, height: %d\", xLength, yLength));\n return;\n }\n\n // Simple optimization if the line are orthogonal x or y.\n if (x1 == x2 || y1 == y2) {\n for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++)\n for (int j = Math.min(y1, y2); j <= Math.max(y1, y2); j++)\n model.set(i, j, colour);\n } else {\n // try to draw line from left to write\n // To do this we should find min x coordinate\n int startx, starty, endx, endy;\n if (x1 < x2) {\n startx = x1;\n starty = y1;\n endx = x2;\n endy = y2;\n } else {\n startx = x2;\n starty = y2;\n endx = x1;\n endy = y1;\n }\n\n model.set(startx, starty, colour);\n model.set(endx, endy, colour);\n\n if (y1 < y2) {\n // Find line equation of the line\n // (y - y1)/(y2-y1) = (x - x1)/(x2 - x1)\n // y - y1 = (x - x1)(y2-y1)/(x2 - x1)\n // y = y1 + (x - x1)(y2-y1)/(x2 - x1)\n int newX = startx;\n int newY = starty;\n while (newX < endx && newY <= endy) {\n //TODO optimize coefficient\n double newYcompare = findY(newX + 1, startx, starty, endx, endy);\n\n if (newYcompare == newY + 1) {\n newY++;\n newX++;\n model.set(newX, newY, colour);\n model.set(newX, newY - 1, colour);\n } else if (newYcompare < newY + 1) {\n newX++;\n model.set(newX, newY, colour);\n } else {\n newY++;\n model.set(newX, newY, colour);\n }\n }\n } else {\n // Find line equation of the line\n // (x - x1)/(x2 - x1) = (y - y1)/(y2-y1)\n // (x - x1) = (y - y1)(x2 - x1)/(y2-y1)\n // x = x1 + (y - y1)(x2 - x1)/(y2-y1)\n int newX = startx;\n int newY = starty;\n while (newX <= endx && newY > endy) {\n //TODO optimize coefficient\n double newXcompare = findX(newY - 1, startx, starty, endx, endy);\n\n if (newXcompare == newX + 1) {\n newY--;\n newX++;\n model.set(newX, newY, colour);\n // array[newX - 2][newY - 1] = colour;\n model.set(newX, newY + 1, colour);\n } else if (newXcompare < newX + 1) {\n newY--;\n model.set(newX, newY, colour);\n } else {\n newX++;\n model.set(newX, newY, colour);\n }\n }\n }\n }\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"public void drawTo(Point that) {\n /* DO NOT MODIFY */\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"private void moveTurtleImageAndDraw(Point2D locOrig, Point2D locNew) {\n\t\tthis.updateTurtleOnView();\n\t\t\n\t\tif (this.myPenHandler.getPenStatus() == 1)\n\t\t{\n\t\t\tthis.myLineView.drawLine(locOrig, locNew);\n\t\t\t\n\t\t\t// draw line design considerations / discussion - see analysis document\n\t\t}\n\n\t}",
"public void drawLine(int i, int y1, int j, int y2, Paint paint) {\n\t\t\n\t}",
"public void drawLine(int x, int y, int x2, int y2, int color){\n int dy = y - y2;\n int dx = x - x2;\n int fraction, stepx, stepy;\n\n if(dy < 0){\n dy = -dy;\n stepy = -1;\n }else{\n stepy = 1;\n }\n if(dx < 0){\n dx = -dx;\n stepx = -1;\n }else{\n stepx = 1;\n }\n dy <<= 1;\n dx <<= 1;\n\n set(x, y, color);\n\n if(dx > dy){\n fraction = dy - (dx >> 1);\n while(x != x2){\n if(fraction >= 0){\n y += stepy;\n fraction -= dx;\n }\n x += stepx;\n fraction += dy;\n set(x, y, color);\n }\n }else{\n fraction = dx - (dy >> 1);\n while(y != y2){\n if(fraction >= 0){\n x += stepx;\n fraction -= dy;\n }\n y += stepy;\n fraction += dx;\n set(x, y, color);\n }\n }\n }",
"public void drawTo(Point that) {\n StdDraw.line(this.x, this.y, that.x, that.y);\n }",
"private void drawLine(Graphics g, int x1, int y1, int x2, int y2) {\n int d = 0;\n\n int dx = Math.abs(x2 - x1);\n int dy = Math.abs(y2 - y1);\n\n int dx2 = 2 * dx; // slope scaling factors to\n int dy2 = 2 * dy; // avoid floating point\n\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n int x = x1;\n int y = y1;\n\n if (dx >= dy) {\n while (true) {\n plot(g, x, y);\n if (x == x2)\n break;\n x += ix;\n d += dy2;\n if (d > dx) {\n y += iy;\n d -= dx2;\n }\n }\n } else {\n while (true) {\n plot(g, x, y);\n if (y == y2)\n break;\n y += iy;\n d += dx2;\n if (d > dy) {\n x += ix;\n d -= dy2;\n }\n }\n }\n }",
"public void drawLine(double startx, double starty, double endx, double endy, Color color) {\n\t\tgc.setStroke(color);\n\t\tgc.strokeLine(startx,starty,endx,endy);\n\t}",
"public void drawLine(int x0, int y0, int x1, int y1) {\n \t\tmyCanvas.drawLine(x0, y0, x1, y1, myPaint);\n \t}",
"private void redrawLines()\n {\n for(int i =0; i<currentRide;i++)\n {\n rides[i].moveTogether(650,60 + 40*i);//move all elemetnts of ride lines\n \n }\n }",
"public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}",
"public void goToXY(float x, float y) {\n float oldX, oldY;\n oldX = pos.x;\n oldY = pos.y; \n pos.x = x; \n pos.y = y;\n if (penDown) {\n pen.beginDraw();\n pen.line(oldX,oldY,pos.x,pos.y);\n pen.endDraw();\n }\n }",
"void touch_move_draw(float event_x, float event_y) {\n path.lineTo(event_x,event_y);\n cur_x = event_x;\n cur_y = event_y;\n\n // Add point to list\n addPoint();\n }",
"private static void lineTo(float x, float y) {\n setPenDown();\n mPivotX = mPenX = x;\n mPivotY = mPenY = y;\n mPath.lineTo(x * mScale, y * mScale);\n elements.add(\n new PathElement(ElementType.kCGPathElementAddLineToPoint, new Point[] {new Point(x, y)}));\n }",
"public void drawLine(Point2D startPoint, Point2D endPoint, double lineStroke, int EndType);",
"public void addPolyLine() {\n abstractEditor.drawNewShape(new ELineDT());\n }",
"public void drawLine(int x1, int y1, int x2, int y2){\n int a1 = new Coordinate2D(x1, y1).getPixelPointX();\n int b1 = new Coordinate2D(x1, y1).getPixelPointY();\n int a2 = new Coordinate2D(x2, y2).getPixelPointX();\n int b2 = new Coordinate2D(x2, y2).getPixelPointY();\n graphics2D.drawLine(a1, b1, a2, b2);\n }",
"private void setPathLine(Position prevPos, Position newPos) {\n\t\t//Grid coordinates\n\t\tint xStart = prevPos.getX();\n\t\tint yStart = prevPos.getY();\n\t\tint xEnd = newPos.getX();\n\t\tint yEnd = newPos.getY();\n\t\t\n\t\t//Set width/height in pixels of screen dimension\n\t\tfloat xF = (xEnd*PIXEL_WIDTH);\n\t\tfloat yF = (yEnd*PIXEL_HEIGHT);\n\t\t\n\t\t//Check that this grid IS free (ie 0) to draw a path\n\t\tif (checkPathCo(newPos) == 0) {\n\t\t\tsPath.lineTo(xF, yF);\n\t\t\tsetPathCo(newPos,1);\n\t\t\twhile (xStart != xEnd)\n\t\t\t{ //set everything in between as 1 ie undroppable\n\t\t\t\tPosition tmpPos = new Position(xStart, yEnd);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tif (xStart < xEnd)\n\t\t\t\t\txStart++;\n\t\t\t\telse\n\t\t\t\t\txStart--;\n\t\t\t}\n\t\t\t\n\t\t\twhile(yStart < yEnd)\n\t\t\t{ //same as x above\n\t\t\t\tPosition tmpPos = new Position(xEnd,yStart);\n\t\t\t\tsetPathCo(tmpPos,1);\n\t\t\t\tyStart++;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void draw(Graphics g) {\r\n g.drawLine(line.get(0).getX() + 4, line.get(0).getY() + 4, line.get(4).getX() + 4, line.get(4).getY() + 4);\r\n }",
"public void lineDraw(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2) {\n Line l = new Line((int) l1.data.xCo, (int) l1.data.yCo, (int) l2.data.xCo, (int) l2.data.yCo);\n l.setTranslateX(mapImage.getLayoutX());\n l.setTranslateY(mapImage.getLayoutY());\n ((Pane) mapImage.getParent()).getChildren().add(l);\n }",
"public void drawLine(float[] line) {\n\t\tparent.line(line[0], line[1], line[2], line[3]);\n\t}",
"private void drawLine(Vector3 point1, Vector3 point2, Node n) {\n\n Node nodeForLine= new Node();\n nodeForLine.setName(LINE_STRING);\n //First, find the vector extending between the two points and define a look rotation\n //in terms of this Vector.\n final Vector3 difference = Vector3.subtract(point1, point2);\n final Vector3 directionFromTopToBottom = difference.normalized();\n final Quaternion rotationFromAToB =\n Quaternion.lookRotation(directionFromTopToBottom, Vector3.up());\n MaterialFactory.makeTransparentWithColor(getApplicationContext(), new Color(this.colorLine.x, this.colorLine.y, this.colorLine.z,this.alphaColor))\n .thenAccept(\n material -> {\n /* Then, create a rectangular prism, using ShapeFactory.makeCube() and use the difference vector\n to extend to the necessary length. */\n ModelRenderable model = ShapeFactory.makeCube(\n new Vector3(this.sizeLine, this.sizeLine, difference.length()),\n Vector3.zero(), material);\n /* Last, set the world rotation of the node to the rotation calculated earlier and set the world position to\n the midpoint between the given points . */\n\n nodeForLine.setParent(n);\n\n\n nodeForLine.setRenderable(model);\n nodeForLine.setWorldPosition(Vector3.add(point1, point2).scaled(.5f));\n nodeForLine.setWorldRotation(rotationFromAToB);\n }\n );\n\n }",
"private void drawLine(int x1, int y1, int x2, int y2)\n {\n System.out.println(\"Draw a line from x of \" + x1 + \" and y of \" + y1);\n System.out.println(\"to x of \" + x2 + \" and y of \" + y2);\n System.out.println(\"The line color is \" + lineColor);\n System.out.println(\"The width of the line is \" + lineWidth);\n System.out.println(\"Then length of the line is \" + df.format(getLength()) + \"\\n\" );\n }",
"protected void drawLineFromPointToPrevPoint(PointFloat[] points, int index, int thickness, Color c)\n\t{\n\t\t\tint x1 = (int) (points[index].x * drawnPlot.getScale().x + drawnPlot\n\t\t\t\t\t.getOffset().x);\n\t\t\tint y1 = (int) (-points[index].y * drawnPlot.getScale().y + drawnPlot\n\t\t\t\t\t.getOffset().y);\n\t\t\tint x2 = (int) (points[index - 1].x * drawnPlot.getScale().x + drawnPlot\n\t\t\t\t\t.getOffset().x);\n\t\t\tint y2 = (int) (-points[index - 1].y * drawnPlot.getScale().y + drawnPlot\n\t\t\t\t\t.getOffset().y);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg.setColor(c);\n\t\t\tg2.setStroke(new BasicStroke(thickness));\n\t\t\tg.drawLine(x1, y1, x2, y2);\n\t}",
"public void mouseDragged(MouseEvent e) {\n currX = e.getX();\r\n currY = e.getY();\r\n\r\n if(g2 != null) {\r\n // Draw line if g2 context is not null\r\n g2.drawLine(oldX, oldY, currX, currY);\r\n // Refresh draw area to repaint\r\n repaint();\r\n // Stores current coordinates x,y as old x,y\r\n oldX = currX;\r\n oldY = currY;\r\n }\r\n }",
"public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}",
"public void updateCoords() {\n line.setLine(parent.getFullBounds().getCenter2D(), child.getFullBounds().getCenter2D());\n Rectangle2D r = line.getBounds2D();\n // adding 1 to the width and height prevents the bounds from\n // being marked as empty and is much faster than createStrokedShape()\n setBounds(r.getX(), r.getY(), r.getWidth() + 1, r.getHeight() + 1);\n invalidatePaint();\n }",
"public void paintLine(Point2D pt1, Point2D pt2, Graphics graphics) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // the line connecting the segments\n OMLine cLine = new OMLine((float) pt1.getY(), (float) pt1.getX(), (float) pt2.getY(), (float) pt2.getX(), lineType);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the line for rendering\n cLine.generate(proj);\n // render the line graphic\n cLine.render(g);\n }\n }",
"public void drawLine(int x1, int y1, int x2, int y2) {\n canvas.drawLine(x1, y1, x2, y2, paint);\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n float eventX = event.getX();\n float eventY = event.getY();\n\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n // Set a new starting point\n path.moveTo(eventX, eventY);\n return true;\n case MotionEvent.ACTION_MOVE:\n // Connect the points\n path.lineTo(eventX, eventY);\n break;\n default:\n return false;\n }\n\n // Makes our view repaint and call onDraw\n invalidate();\n return true;\n }",
"@Override\n\tpublic void drawLine(Vector3f from, Vector3f to, Vector3f color) {\n\n\t\tfloat[] positions = new float[6];\n\t\tpositions[0] = from.x;\n\t\tpositions[1] = from.y;\n\t\tpositions[2] = from.z;\n\n\t\tpositions[3] = to.x;\n\t\tpositions[4] = to.y;\n\t\tpositions[5] = to.z;\n\n\t\t// Create a rawmodel to store the line\n\t\tRawModel model = Globals.getLoader().loadToVAO(positions, 3);\n\n\t\tshader.start();\n\t\tshader.loadProjectionMatrix(Globals.getRenderer().getProjectionMatrix());\n\t\tshader.loadViewMatrix(Globals.getActiveCamera());\n\t\tGL30.glBindVertexArray(model.getVaoID());\n\n\t\tGL20.glEnableVertexAttribArray(0);\n\t\tGL11.glDrawArrays(GL11.GL_LINES, 0, 6);\n\t\tGL20.glDisableVertexAttribArray(0);\n\t\tGL30.glBindVertexArray(0);\n\t\tshader.stop();\n\t\tmodel.cleanUp();\n\n\t}",
"public void lineTo(int x1, int y1, int c1) {\n\n if (lineToOrigin) {\n if (x1 == sx0 && y1 == sy0) {\n // staying in the starting point\n return;\n }\n\n // not closing the path, do the previous lineTo\n lineToImpl(sx0, sy0, scolor0, joinToOrigin);\n lineToOrigin = false;\n } else if (x1 == x0 && y1 == y0) {\n return;\n } else if (x1 == sx0 && y1 == sy0) {\n lineToOrigin = true;\n joinToOrigin = joinSegment;\n joinSegment = false;\n return;\n }\n\n lineToImpl(x1, y1, c1, joinSegment);\n joinSegment = false;\n }",
"public void drawLine(Position scanPos, Position mypos)// in\n \t\t// ver�nderter\n \t\t// Form von\n \t\t// http://www-lehre.informatik.uni-osnabrueck.de\n \t\t\t{\n \t\t\t\tint x, y, error, delta, schritt, dx, dy, inc_x, inc_y;\n \n \t\t\t\tx = mypos.getX(); // \n \t\t\t\ty = mypos.getY(); // As i am center\n \n \t\t\t\tdx = scanPos.getX() - x;\n \t\t\t\tdy = scanPos.getY() - y; // Hoehenzuwachs\n \n \t\t\t\t// Schrittweite\n \n \t\t\t\tif (dx > 0) // Linie nach rechts?\n \t\t\t\t\tinc_x = 1; // x inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach links\n \t\t\t\t\tinc_x = -1; // x dekrementieren\n \n \t\t\t\tif (dy > 0) // Linie nach oben ?\n \t\t\t\t\tinc_y = 1; // y inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach unten\n \t\t\t\t\tinc_y = -1; // y dekrementieren\n \n \t\t\t\tif (Math.abs(dy) < Math.abs(dx))\n \t\t\t\t\t{ // flach nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dx); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dy); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (x != scanPos.getX())\n \t\t\t\t\t\t\t{\n \n \t\t\t\t\t\t\t\tif (x != mypos.getX())\n \t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY()); // Fuer\n \t\t\t\t\t\t\t\t\t\t// jede\n \t\t\t\t\t\t\t\t\t\t// x-Koordinate\n \t\t\t\t\t\t\t\t\t\t// System.out.println(\"inc pos \"+ (x +\n \t\t\t\t\t\t\t\t\t\t// mypos.getX()));\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\tx += inc_x; // naechste x-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Spalte erreicht?\n \t\t\t\t\t\t\t\t\t\ty += inc_y; // y-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t} else\n \t\t\t\t\t{ // steil nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dy); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dx); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (y != scanPos.getY())\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tif (y != mypos.getY())\n \t\t\t\t\t\t\t\t\t{// fuer jede y-Koordinate\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY());\n \t\t\t\t\t\t\t\t\t}// setze\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\ty += inc_y; // naechste y-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Zeile erreicht?\n \t\t\t\t\t\t\t\t\t\tx += inc_x; // x-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\tif ((x != scanPos.getX() && y != scanPos.getY()))\n \t\t\t\t\t{\n \t\t\t\t\t\tdecPix(scanPos.getX() + x, scanPos.getY() + y);\n \t\t\t\t\t}\n \t\t\t}",
"@Override\n public void draw(Graphics g) {\n g.setColor(Color.BLACK);\n g.drawLine(startingPoint.x, startingPoint.y, endingPoint.x, endingPoint.y);\n }",
"public void drawLine(double x0, double y0, double x1, double y1, int red, int green, int blue){\n\t\tif( x0 > x1 ) {\n\t\t\tdouble xt = x0 ; x0 = x1 ; x1 = xt ;\n\t\t\tdouble yt = y0 ; y0 = y1 ; y1 = yt ;\n\t\t}\n\t\t\n\t\tdouble a = y1-y0;\n\t\tdouble b = -(x1-x0);\n\t\tdouble c = x1*y0 - x0*y1;\n\n\t\t\tif(y0<y1){ // Octant 1 or 2\n\t\t\t\tif( (y1-y0) <= (x1-x0) ) { //Octant 1\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y+0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or SE\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { // Octant 2\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y+1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go SE or S\t\t\t\t\t\n\t\t\t\t\twhile(y<=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){\n\t\t\t\t\t\t\td = d+b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y+1;\n\t\t\t\t\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} else { // Octant 7 or 8\n\t\t\t\tif( (y0-y1) <= (x1-x0) ) { // Octant 8\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y-0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or NE\t\t\t\t\t\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){ \n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { //Octant 7\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y-1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go NE or N\n\t\t\t\t\twhile(y>=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d-b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y-1;\n\t\t\t\t\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}",
"private void drawLine( Graphics2D g2, Point2D.Double p1, Point2D.Double p2, Color colour, Stroke strk )\r\n {\r\n double x1 = translateX( p1.getX() );\r\n double y1 = translateY( p1.getY() );\r\n \r\n double x2 = translateX( p2.getX() );\r\n double y2 = translateY( p2.getY() );\r\n \r\n Line2D.Double line = new Line2D.Double( x1, y1, x2, y2 );\r\n \r\n g2.setStroke( strk );\r\n \r\n g2.setColor( colour );\r\n g2.draw( line );\r\n }",
"public void drawLine(float[] line) {\n\t\tline(line[0], line[1], line[2], line[3]);\n\t}",
"public Line(Point startingPoint, Point endingPoint) {\n this.startingPoint = startingPoint;\n this.endingPoint = endingPoint;\n }",
"public void drawOneLine(float x1, float y1,float x2,float y2){\n \tGL11.glBegin(GL11.GL_LINES);\n \tGL11.glVertex2f(x1,y1);\n \tGL11.glVertex2f(x2,y2);\n \tGL11.glEnd();\n }",
"public void drawLine(int x1, int y1, int x2, int y2 , Graphics g) {\r\n \tfloat dY, dX;\r\n \tfloat x,y;\r\n \tdX = x2-x1;\r\n \tdY = y2-y1;\r\n \tx = x1;\r\n \ty = y1;\r\n \t\t\t\r\n \tfloat range = Math.max(Math.abs(dX), Math.abs(dY));\r\n \tdY = dY/range;\r\n \tdX = dX/range;\r\n \t\r\n \tfor (int i =0 ; i < range ; i++ ) { \r\n \t\tg.drawRect(Math.round(x), Math.round(y),1,1);\r\n \t\tx = x + dX;\r\n \t\ty = y + dY;\r\n \t}\r\n\r\n \t\r\n }",
"public Polyline drawLine(Star one, Star two)\r\n\t{\t\t\r\n\t\treturn lang.newPolyline(new Offset[] { getStarPosition(one.x, one.y), getStarPosition(two.x, two.y) }, \"line\" + one.toString() + two.toString(), null, connectionLines);\r\n\t}",
"private void drawLine( Graphics2D g2, Point2D.Double p1, Point2D.Double p2, Color colour )\r\n {\r\n drawLine( g2, p1, p2, colour, DEFAULT_STROKE );\r\n }",
"private void drawLine(Vector2 vt1, Vector2 vt2, GLayerGroup pGroup){\n DrawLineLaser.DrawLine(vt1,vt2);\n\n }",
"@Override\n\tpublic void move(float x, float y) {\n\t\tsuper.move(x, y);\n\t\tpath.lineTo(x, y);\n\t}",
"public void paint( java.awt.Graphics g )\n {\n super.paint( g ); // Ord gave us this\n\n canvasWidth = canvas.getWidth(); // Update original\n canvasHeight = canvas.getHeight(); // canvas dimensions\n\n double newHLineY = hLineProportion * canvas.getHeight();\n double newVLineX = vLineProportion * canvas.getWidth();\n\n hLine.setEndPoints(0, newHLineY, canvasWidth, newHLineY);\n vLine.setEndPoints(newVLineX, 0, newVLineX, canvasHeight);\n\n hLineMoved = vLineMoved = true;\n }",
"public void markLine(int x1, int y1, int x2, int y2) {\n for (int row = y1 - 1; row <= y2 - 1 && row < height; row++) {\n for (int col = x1 - 1; col <= x2 - 1 && col < width; col++) {\n pixels[row][col] = DRAWING_CHAR;\n }\n }\n }",
"private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}",
"public GLGraphics drawLine(float x, float y, float x2, float y2) {\n\t\tstats.incLine();\n\t\tgl.glBegin(GL.GL_LINES);\n\t\tgl.glVertex3f(x, y, z);\n\t\tgl.glVertex3f(x2, y2, z);\n\t\tgl.glEnd();\n\t\treturn this;\n\t}",
"static public void polyline(Polyline polyline,float dx,float dy){\n polyline.setVertices(translate(polyline.getVertices(),dx,dy));\n }",
"@Override\n public boolean drawPathLine(Location loc1, Location loc2) {\n if (loc1.distanceTo(loc2) < DRAW_LINE_THRESHOLD_METERS) {\n return false;\n }\n Polyline line = new Polyline();\n List<GeoPoint> points = Arrays.asList(MapUtils.makeGeoPoint(loc1), MapUtils.makeGeoPoint(loc2));\n line.setPoints(points);\n line.setColor(Color.RED);\n line.setWidth(2.0f);\n mMap.getOverlayManager().add(line);\n\n mPathLines.add(line);\n return true;\n }",
"public static void drawLine(PixelWriter writer, Color color, int startX, int endX, int startY, int endY) {\n\t\tdouble stepY;\n\t\tdouble stepX;\n\t\tdouble yLength = (double) endY - startY;\n\t\tdouble xLength = (double) endX - startX;\n\t\tif (xLength < yLength) {\n\t\t\tstepY = 1;\n\t\t\tstepX = yLength == 0 ? 0 : (xLength / yLength);\n\t\t} else {\n\t\t\tstepX = 1;\n\t\t\tstepY = xLength == 0 ? 0 : (yLength / xLength);\n\t\t}\n\n\t\tdouble y = startY;\n\t\tdouble x = startX;\n\t\tdo {\n\t\t\tdo {\n\t\t\t\twriter.setColor((int) x, (int) y, color);\n\t\t\t\tx += stepX;\n\t\t\t} while (x < endX);\n\t\t\ty += stepY;\n\t\t} while (y < endY);\n\t}",
"@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean arrow, boolean screenCoords) {\n if(screenCoords) {\n start = convToImageCoords(start);\n end = convToImageCoords(end);\n }\n Line l = new Line(id, start, end, weight, color, arrow);\n lineMap.put(id, l);\n render();\n }",
"private void addPointToStroke(float x, float y)\n\t{\n\t\tstrokePointCount++;\n\t\tlatestStroke.triangleStrip.addPoint(this, x, y, true);\n\t}",
"public void draw() {\r\n /* DO NOT MODIFY */\r\n StdDraw.point(x, y);\r\n }",
"public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n }\n System.out.println(\"\");\n }",
"public void setLine(int x1, int y1, int x2, int y2){\n\t\tint slope = 0;\n\t\tboolean vert = true;\n\t\t\n\t\tif((x2 - x1) != 0){\n\t\t\tslope = (y2 - y1) / (x2 - x1);\n\t\t\tvert = false;\n\t\t}\n\t\tif(!vert){\n\t\t\tfor(int a = 0; a < Math.abs(x2 - x1) + 1; a++){\n\t\t\t\tif(a >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tif((x2 - x1) < 0){\n\t\t\t\t\tpathX[a] = x1 - a;\n\t\t\t\t\tpathY[a] = y1 - (a * slope);\n\t\t\t\t}\n\t\t\t\telse if((x2 - x1) > 0){\n\t\t\t\t\tpathX[a] = x1 + a;\n\t\t\t\t\tpathY[a] = y1 + (a * slope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(vert && (y2 - y1) < 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){\n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 - b;\n\t\t\t}\n\t\t}\n\t\telse if(vert && (y2 - y1) > 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){ \n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 + b;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t\t\n\t}",
"Line createLine();",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"@Override\r\n public void onLocationChanged(Location location) {\n LatLng latLng_Now = new LatLng(location.getLatitude(), location.getLongitude());\r\n CameraPosition cameraPosition = new CameraPosition.Builder()\r\n .target(latLng_Now) // Sets the center of the map to LatLng (refer to previous snippet)\r\n .zoom(17) // Sets the zoom\r\n .bearing(90) // Sets the orientation of the camera to east\r\n .tilt(30) // Sets the tilt of the camera to 30 degrees\r\n .build(); // Creates a CameraPosition from the builder\r\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n if(latLng_Prev == null){\r\n latLng_Prev = latLng_Now;\r\n }\r\n //draw line between two locations:\r\n Polyline line = mMap.addPolyline(new PolylineOptions()\r\n .add(latLng_Prev, latLng_Now)\r\n .width(5)\r\n .color(Color.RED));\r\n latLng_Prev=latLng_Now;\r\n }",
"public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void updatePolyLine(LatLng latLng) {\n\t\tList<LatLng> points = polyLine.getPoints();\n\t\tpoints.add(latLng);\n\t\tpolyLine.setPoints(points);\n\t}",
"public void renderLine (Graphics g)\r\n {\r\n if (glyph.getContourBox()\r\n .intersects(g.getClipBounds())) {\r\n getLine(); // To make sure the line has been computed\r\n\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStart(),\r\n (int) Math.rint(line.yAt((double) getStart()))),\r\n null);\r\n Point stop = glyph.getLag()\r\n .switchRef(\r\n new Point(\r\n getStop() + 1,\r\n (int) Math.rint(line.yAt((double) getStop() + 1))),\r\n null);\r\n g.drawLine(start.x, start.y, stop.x, stop.y);\r\n }\r\n }",
"void markLine() {\n lineMark = cursor;\n }",
"public void button2Pushed(ActionEvent event)\r\n {\n GraphicsContext gc = canvas.getGraphicsContext2D();\r\n \r\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\r\n \r\n //draw line from 0,0 to lower right\r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(start, canvas.getHeight()-start, canvas.getWidth(), canvas.getHeight());\r\n \r\n \r\n for (int start = 0; start <= canvas.getWidth(); start += 20)\r\n gc.strokeLine(0, 0, start, canvas.getHeight()-start);\r\n \r\n }",
"private void drawLineSeg(int entryNum, GPoint from, GPoint to) {\n\t\tGLine line = new GLine(from.getX(), from.getY(),\n\t\t\t\t\t\t\t to.getX(), to.getY());\n\t\tline.setColor(getColor(entryNum));\n\t\tadd(line);\n\t}",
"@Override\r\n public final void draw(final Line l, final BufferedImage paper) {\n int x1 = l.getxStart();\r\n int x2 = l.getxFinish();\r\n int y1 = l.getyStart();\r\n int y2 = l.getyFinis();\r\n\r\n if (x1 == x2) {\r\n if (y1 < y2) {\r\n for (int i = y1; i <= y2; i++) {\r\n if (checkBorder(x1, i, paper)) {\r\n paper.setRGB(x1, i, l.getColor().getRGB());\r\n }\r\n }\r\n } else {\r\n for (int i = y2; i <= y1; i++) {\r\n if (checkBorder(x1, i, paper)) {\r\n paper.setRGB(x1, i, l.getColor().getRGB());\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n \r\n int deltaX = Math.abs(x2 - x1);\r\n int deltaY = Math.abs(y2 - y1);\r\n int s1 = (int) (Math.signum(x2 - x1) * 1);\r\n int s2 = (int) (Math.signum(y2 - y1) * 1);\r\n\r\n boolean interchanged = false;\r\n if (deltaY > deltaX) {\r\n int aux = deltaX;\r\n deltaX = deltaY;\r\n deltaY = aux;\r\n interchanged = true;\r\n }\r\n\r\n int error = 2 * deltaY - deltaX;\r\n\r\n for (int i = 0; i <= deltaX; i++) {\r\n if (x1 >= 0 && y1 >= 0 && x1 < paper.getWidth() && y1 < paper.getHeight()) {\r\n\r\n paper.setRGB(x1, y1, l.getColor().getRGB());\r\n }\r\n while (error > 0) {\r\n if (interchanged) {\r\n x1 = x1 + s1;\r\n } else {\r\n y1 = y1 + s2;\r\n }\r\n error = error - 2 * deltaX;\r\n }\r\n\r\n if (interchanged) {\r\n y1 = y1 + s2;\r\n } else {\r\n x1 = x1 + s1;\r\n }\r\n\r\n error = error + 2 * deltaY;\r\n }\r\n }",
"@Override\n public void draw(GraphicsContext gc){\n for(int i = 1; i < path.size(); i++) {\n Point2D from = path.get(i-1);\n Point2D to = path.get(i);\n gc.strokeLine(from.getX(), from.getY(), to.getX(), to.getY());\n }\n }",
"void drawLine(int startx,int starty,int endx,int endy,ImageView imageView){\n imageView.setVisibility(View.VISIBLE);\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStrokeWidth(20);\n paint.setStyle(Paint.Style.STROKE);\n\n canvas.drawLine(startx,starty,endx,endy,paint);\n\n //animates the drawing to fade in\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(4000);\n imageView.startAnimation(animation);\n }",
"private void updatePolyLine(LatLng latLng) {\n List<LatLng> points = polyLine.getPoints();\n points.add(latLng);\n polyLine.setPoints(points);\n }",
"private void moveLineOn() {\n getScroller().startScroll(getOffsetX(),getOffsetY(),0,getLineHeight(),0);\n }",
"@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean screenCoords) {\n drawLine(id, start, end, weight, color, false, screenCoords);\n }",
"public void mouseDragged(MouseEvent e) // When mouse is dragged:\n {\n Location pt = new Location(e.getX(),e.getY());\n\n dragDx = pt.getX() - lastPt.getX();\n dragDy = pt.getY() - lastPt.getY();\n\n // If H Line was grabbed and drag is within the margins:\n if(hLineGrabbed && pt.getY() >= MARGIN_HORIZONTAL && // If hLine grabbed\n pt.getY() <= canvasHeight - MARGIN_HORIZONTAL) // and drag is in\n { // the margins:\n hLine.setEndPoints(0, (hLine.getStart()).getY() + dragDy,\n canvasWidth,\n (hLine.getStart()).getY() + dragDy);// Move hLine\n\n if(lastPt != pt) // If new point is\n { // different (moved):\n hLineMoved = true; // hLine was moved\n }\n\n else // If new point is\n { // same (not moved):\n hLineMoved = false; // hLine not moved\n }\n }\n\n // If V Line was grabbed and drag is within the margins:\n if(vLineGrabbed && pt.getX() >= MARGIN_VERTICAL && // If vLine grabbed\n pt.getX() <= canvasWidth - MARGIN_VERTICAL) // and drag is in\n { // the margins:\n vLine.setEndPoints((vLine.getStart()).getX() + dragDx, 0,\n (vLine.getStart()).getX() + dragDx, \n canvasHeight); // Move vLine\n\n if(lastPt != pt) // If new point is\n { // different (moved):\n vLineMoved = true; // vLine was moved\n }\n\n else // If new point is\n { // same (not moved):\n vLineMoved = false; // vLine not moved\n }\n }\n\n hLineProportion = (hLine.getStart()).getY() / canvasHeight;\n vLineProportion = (vLine.getStart()).getX() / canvasWidth;\n\n lastPt = pt; // Set the point to\n dragDx = dragDy = 0; // Reset drag delta\n }",
"public void setLine (int Line);",
"public static void renderLine(double startx , double starty , double endx , double endy) {\n\t\t//Find out what rendering mode to use\n\t\tif (! Settings.Android && Settings.Video.OpenGL)\n\t\t\t//Render a line using OpenGL\n\t\t\tBasicRendererOpenGL.renderLine(startx , starty , endx , endy);\n\t\telse if (! Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Java\n\t\t\tBasicRendererJava.renderLine(startx , starty , endx , endy);\n\t\telse if (Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Android\n\t\t\tBasicRendererAndroid.renderLine(startx , starty , endx , endy);\n\t}",
"private void routeDrawing(Location location) {\n\n // validity check in case the first point does not have a previous point\n if (previousLocation == null) {\n // copy the current location to the previous point\n previousLocation = location;\n }\n double lat = location.getLatitude();\n double lon = location.getLongitude();\n\n latitude = lat;\n longitude = lon;\n latList.add(latitude);\n lonList.add(longitude);\n\n // previous coordinates\n //System.out.println(\"previous Location: \" + previousLocation.getLatitude() + \" \" + previousLocation.getLongitude());\n // current coordinates\n //System.out.println(\"Current Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n\n // Polyline Options differ from\n PolylineOptions lineOptions = new PolylineOptions();\n // set the option of each part of polyline\n // 0.03 is the location update interval also the drawing interval\n vdraw = (GetDistance(previousLocation.getLatitude(), previousLocation.getLongitude(), location.getLatitude(), location.getLongitude()))/0.3;\n System.out.println(\"vdraw: \"+vdraw);\n if (vdraw<0.01){\n\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.slow))\n .width(30);\n System.out.print(\"I am running slow\");\n }\n if (vdraw>=0.008 && vdraw<=0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.commen))\n .width(30);\n System.out.print(\"I am running normally\");\n }\n if (vdraw>0.03){\n lineOptions.add(new LatLng(previousLocation.getLatitude(), previousLocation.getLongitude()))\n .add(new LatLng(location.getLatitude(), location.getLongitude()))\n // This needs to be beautified\n .color(getResources().getColor(R.color.fast))\n .width(30);\n System.out.print(\"I am running fast\");\n }\n\n // add the polyline to the map\n Polyline partOfRunningRoute = mMap.addPolyline(lineOptions);\n // set the zindex so that the poly line stays on top of my tile overlays\n partOfRunningRoute.setZIndex(1000);\n // add the poly line to the array so they can all be removed if necessary\n runningRoute.add(partOfRunningRoute);\n // add the latlng from this point to the array\n points.add(location);\n // store current location as previous location in the end\n previousLocation = location;\n }",
"private ShapeDrawable addPointToShapeDrawablePath(float x, float y, android.graphics.Path path){\n path.lineTo(x,y);\n\n // make local copy of path and store in new ShapeDrawable\n android.graphics.Path currPath = new android.graphics.Path(path);\n\n ShapeDrawable shapeDrawable = new ShapeDrawable();\n float[] color = {40,100,100};\n shapeDrawable.getPaint().setColor(Color.HSVToColor(color));//Color.MAGENTA);\n shapeDrawable.getPaint().setStyle(Paint.Style.STROKE);\n shapeDrawable.getPaint().setStrokeWidth(10);\n shapeDrawable.getPaint().setStrokeJoin(Paint.Join.ROUND);\n shapeDrawable.getPaint().setStrokeCap(Paint.Cap.ROUND);\n shapeDrawable.getPaint().setPathEffect(new CornerPathEffect(30));\n shapeDrawable.getPaint().setAntiAlias(true); // set anti alias so it smooths\n shapeDrawable.setIntrinsicHeight(displayManager.getHeight());\n shapeDrawable.setIntrinsicWidth(displayManager.getWidth());\n shapeDrawable.setBounds(0, 0, displayManager.getWidth(), displayManager.getHeight());\n\n shapeDrawable.setShape(new PathShape(currPath,displayManager.getWidth(),displayManager.getHeight()));\n\n return shapeDrawable;\n}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tif(clicks % 2 != 0) {\n\t\t\tend = new Point2D(e.getX(), e.getY());\n\t\t\tline.setEndPoint(end);\n\t\t}\n\t}",
"void showLine(int[] xy1, int[] xy2, int width, char col) {\r\n\t\tgc.setStroke(colFromChar(col)); // set the stroke colour\r\n\t\tgc.setLineWidth(width);\r\n\t\tgc.strokeLine(xy1[0], xy1[1], xy2[0], xy2[1]); // draw line\r\n\t}",
"@Override\n public void onDrag(MouseEvent e, GraphicsContext g) {\n g.lineTo(e.getX(), e.getY());\n g.setLineWidth(1);\n g.stroke();\n }",
"public void drawLineTo(int oth, float goodness) {\n\t\t\tif (headless) return;\n\t\t\t//Done.\n\t\t\tboolean trans = transparentCountdown>0;\n\t\t\tif (!trans) {\n\t\t\t\tif (showLines && distances[oth]<SHOW_LINES) {\n\t\t\t\t\tstrokeWeight(2);\n\t\t\t\t\tstrokeColors(distances[oth]);\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tsetStroke(goodness, distances[oth]);\n\t\t\t}\n\n\t\t\tdrawLineTo0(oth, goodness);\n\t\t}"
] |
[
"0.73939246",
"0.72140574",
"0.71581185",
"0.71546495",
"0.7073262",
"0.7032689",
"0.6977481",
"0.6917675",
"0.6889241",
"0.68838114",
"0.68755805",
"0.6847281",
"0.68255204",
"0.674238",
"0.6710859",
"0.6709989",
"0.6709989",
"0.6709989",
"0.6709989",
"0.66775316",
"0.66718405",
"0.6666438",
"0.6662762",
"0.66131335",
"0.6612159",
"0.6585938",
"0.65828365",
"0.6568437",
"0.65550494",
"0.6543797",
"0.65414137",
"0.6528803",
"0.65139097",
"0.6498974",
"0.6484513",
"0.6454468",
"0.6425579",
"0.64213073",
"0.64024806",
"0.638521",
"0.63475823",
"0.633769",
"0.63339716",
"0.632957",
"0.63014495",
"0.6295314",
"0.6288245",
"0.6279932",
"0.6270202",
"0.6265414",
"0.62514496",
"0.62488365",
"0.6245936",
"0.6244608",
"0.6239617",
"0.62341136",
"0.623401",
"0.6227689",
"0.62051815",
"0.61918545",
"0.6186537",
"0.61807555",
"0.61675036",
"0.6161071",
"0.61411065",
"0.6138624",
"0.61135644",
"0.61016494",
"0.61014366",
"0.6099086",
"0.60909027",
"0.6088525",
"0.60838467",
"0.60700595",
"0.6067004",
"0.6067004",
"0.6067004",
"0.6067004",
"0.6065897",
"0.6050801",
"0.604586",
"0.60422754",
"0.60415107",
"0.6037709",
"0.6032286",
"0.6031509",
"0.60166466",
"0.60164857",
"0.60138386",
"0.60121155",
"0.601078",
"0.60079736",
"0.59853673",
"0.5980428",
"0.5961853",
"0.59555846",
"0.5952081",
"0.5938601",
"0.59345573",
"0.59215355"
] |
0.67376685
|
14
|
Picasso.with(ListActivity.this).load(url) .placeholder(android.R.drawable.star_big_on) .error(android.R.drawable.stat_notify_error) .resize(1600, 1200) .centerCrop() .into(imageView);
|
@Override
public void loadImage(String url, ImageView imageView) {
ImageLoader.getInstance().displayImage(url, imageView);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onError() {\n Picasso.with(context)\n .load(uri).fit().centerCrop()\n .placeholder(R.drawable.ic_menu_gallery)\n .error(R.drawable.ic_menu_gallery)\n .into(imageView);\n }",
"@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(profileModel.getDriverPhoto())\n .error(R.drawable.profile)\n .resize(0, 200)\n .into(driverImg, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n Log.v(\"Picasso\",\"Could not fetch image\");\n }\n });\n }",
"@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(f.getItemImage())\n .error(R.drawable.placeholder)\n .into(foodItemHolder.imageView, new Callback() {\n @Override\n public void onSuccess() {\n Log.d(\"IMAGE LOAD\", \"LOADED FROM INTERNET\");\n }\n\n @Override\n public void onError() {\n Log.v(\"Picasso\",\"Could not fetch image\");\n }\n });\n }",
"@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(s)\n .resize(height, height)\n .centerCrop()\n .error(R.drawable.background_default)\n .placeholder(R.drawable.loading)\n .into(viewHolder.profileimage, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n // vs.Icon.setImageResource(R.drawable.groupchat_icon_48dp);\n }\n });\n }",
"@Override\n public void onError(Exception e) {\n Picasso.get().load(image)\n .placeholder(R.drawable.default_profile_picture)\n .resize(900, 900)\n .centerInside()\n .into(settingProfileImage);\n }",
"@Override\n public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {\n final String changedUrl = official.getPhotoURL().replace(\"http:\", \"https:\");\n picasso.load(changedUrl)\n .error(R.drawable.brokenimage)\n .placeholder(R.drawable.placeholder)\n .into(imageView);\n }",
"@Override\n public void onSuccess(Uri uri) {\n Picasso.get().load(uri).fit().centerCrop().into(someimage);\n }",
"@Override\n public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {\n final String changedUrl = photoUrl.replace(\"http:\", \"https:\");\n picasso.load(changedUrl)\n .error(R.drawable.brokenimage)\n .placeholder(R.drawable.holder)\n .into(imageTV);\n\n }",
"@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(s)\n .error(R.drawable.background_default)\n .placeholder(R.drawable.loading)\n .into(foodimageone, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n // vs.Icon.setImageResource(R.drawable.groupchat_icon_48dp);\n }\n });\n }",
"@Override\n public void onError() {\n Picasso.with(getApplicationContext())\n .load(images[pos])\n .error(R.drawable.downloderror)\n .placeholder(R.drawable.epaper_error)\n .into(imageView, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n\n }\n });\n }",
"@Override\n public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\n if(bitmap.getHeight()>bitmap.getWidth()){\n\n progressBar.setVisibility(View.INVISIBLE);\n //load to imageview and set scale type to center crop\n imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n imageView.setImageBitmap(bitmap);\n\n }else {\n\n progressBar.setVisibility(View.INVISIBLE);\n //load to imageview and set scale type to fitxy\n imageView.setScaleType(ImageView.ScaleType.FIT_XY);\n imageView.setImageBitmap(bitmap);\n\n }\n\n }",
"@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(s)\n .error(R.drawable.background_default)\n .placeholder(R.drawable.loading)\n .into(viewHolder.profileimage, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n // vs.Icon.setImageResource(R.drawable.groupchat_icon_48dp);\n }\n });\n }",
"@Override\r\n public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {\n final String changedUrl = bean.getArticle_urlToImage().replace(\"http:\", \"https:\");\r\n picasso.load(changedUrl).error(R.drawable.brokenimage)\r\n .placeholder(R.drawable.placeholder)\r\n .into(imgNewsArticleImage);\r\n }",
"public void ImageCreate(){\n Picasso.get().load(url).into(imageView);\n }",
"public void bindItem(ItemList1_Structure item) {\n\n /*Bitmap icon = BitmapFactory.decodeResource(Resources.getSystem(), item.getImage());\n\n iv_image.setImageBitmap(icon);*/\n\n iv_image.setImageResource(item.getImage());\n\n tv_title.setText(item.getTitle());\n tv_subtitle.setText(item.getSubtitle());\n\n\n //LIBRERIA PICASSO\n //CON IMAGENES DEMASIADO GRANDES LANZA UN ERROR EN LA CLASE ROUNDEDIMAGEVIEW...algun conflicto al convertir a bitmap\n Picasso.with(context)\n .load(\"http://whosbehindmask.weebly.com/uploads/2/8/3/6/28365549/5831103_orig.jpg\") //http://viralandscdn.net/posts/13668/image-sg3SqUON.jpg\n .into(iv_image2);\n\n //MUESTRA UN INDICADOR EN LA ESQUINA SUPERIOR IZQUIERDA CON COLOR INDICANDO DE DONDE PROVIENE LA IMAGEN:\n // ROJO = NETWORK, AZUL = DISK, VERDE = MEMORY\n Picasso.with(context).setIndicatorsEnabled(true);\n\n /*** //EJEMPLO LIBRERIA PICASSO, LEER IMAGEN DE INTERNET, LEER DEL HOLDER, ASIGNAR IMAGEN DE ERROR, REDIMENSIONAR IMAGEN Y ROTAR IMAGEN\n Picasso.with(this)\n .load(\"YOUR IMAGE URL HERE\")\n .placeholder(R.drawable.ic_placeholder) // optional\n .error(R.drawable.ic_error_fallback) // optional\n .resize(250, 200) // optional\n .rotate(90) // optional\n .into(imageView);\n *///\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n int poster_path_index = cursor.getColumnIndex(MovieContract.MovieDetailsEntry.COLUMN_POSTER_PATH);\n String poster_path = cursor.getString(poster_path_index);\n String baseURL = \"http://image.tmdb.org/t/p/w185\" + poster_path;\n ImageView imageView = (ImageView) view.findViewById(R.id.imageView);\n\n\n if (baseURL.contains(\"null\")) {\n Picasso.with(context).load(R.drawable.poster_not_available)\n .resize(185, 200)\n .into(imageView);\n\n } else {\n\n if(isNetworkAvailable()) {\n Picasso.with(context).load(baseURL).into(imageView);\n// Picasso.with(context).load(\"http://i.imgur.com/DvpvklR.png\").into(imageView\n }else{\n Picasso.with(context)\n .load(baseURL)\n .networkPolicy(NetworkPolicy.OFFLINE)\n .placeholder(R.drawable.error_loading)\n .into(imageView);\n\n }\n }\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n Picasso.get().load(\"https://media.wired.com/photos/5b17381815b2c744cb650b5f/master/w_1164,c_limit/GettyImages-134367495.jpg\").into(image);\n }",
"@BindingAdapter({\"bind:imageUrlWithPlaceHolder\"})\n public static void loadImage(ImageView view, String imageUrl) {\n Context context = view.getContext();\n Glide.with( context ).load( imageUrl )\n .diskCacheStrategy( DiskCacheStrategy.ALL ).placeholder( R.drawable.ic_launcher_background ).dontAnimate().into( view );\n }",
"@Override\n public void onBindViewHolder(RecyclerView.ViewHolder vh, final int position) {\n\n if(vh instanceof ViewHolder_item) {\n\n final ViewHolder_item viewHolder = (ViewHolder_item) vh;\n\n /* Transformation transformation = new Transformation() {\n\n\n @Override\n public Bitmap transform(Bitmap source) {\n int targetWidth =viewHolder.m_Image.getWidth();\n\n double aspectRatio = (double) source.getHeight() / (double) source.getWidth();\n int targetHeight = (int) (targetWidth * aspectRatio);\n Bitmap result = Bitmap.createScaledBitmap(source, targetWidth, targetHeight, false);\n if (result != source) {\n // Same bitmap is returned if sizes are the same\n source.recycle();\n }\n return result;\n }\n\n @Override\n public String key() {\n return \"transformation\" + \" desiredWidth\";\n }\n };\n*/\n\n Picasso.with(viewHolder.m_Image.getContext()).\n\n load(Utils.BASE_IMAGE_URL+\n viewHolder.m_Image.getContext().getResources().getString(R.string.phone_size)+\n mList.get(position).getPoster_path())\n //.transform(transformation)\n .into(viewHolder.m_Image);\n }else {\n ((ProgressViewHolder)vh).progressBar.setIndeterminate(true);\n }\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n float a = (float) viewHolder.img2.getWidth() / (float) loadedImage.getWidth();\n viewHolder.img2.setImageBitmap(resize(loadedImage, a));\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n float a = (float) viewHolder.img2.getWidth() / (float) loadedImage.getWidth();\n viewHolder.img2.setImageBitmap(resize(loadedImage, a));\n }",
"@Override\n public void onSuccess(Uri uri) {\n ImageView imgProfile=(ImageView)findViewById(R.id.img_header_bg);\n Glide.with(MainActivity.this).load(uri)\n .crossFade()\n .thumbnail(0.5f)\n .bitmapTransform(new CircleTransform(MainActivity.this))\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgProfile);\n\n\n }",
"@Override\n public void onError(Exception e) {\n Picasso.get()\n .load(data.getString(INDEX_MOVIE_POSTER_PATH))\n .placeholder(R.drawable.user_placeholder)\n .error(R.drawable.user_placeholder_error)\n .into(mImageDetail);\n }",
"public void ImageTransform(){\n imageView.clearAnimation();\n Picasso.get()\n .load(url)\n .resize(150, 150)\n .centerCrop()\n .into(imageView);\n }",
"private void loadImage(final String url) {\n\t\tnew AsyncTask<Void, Void, Drawable>() {\n\t\t\t@Override\n\t\t\tprotected Drawable doInBackground(Void... none) {\n\t\t\t\treturn NetHelper.getDrawableFromUrl(url);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onPostExecute(Drawable drawable) {\n\t\t\t\tImageView thumbnail = (ImageView) findViewById(R.id.details_image_view_thumbnail);\n\t\t\t\tthumbnail.setImageDrawable(drawable);\n\t\t\t}\n\t\t}.execute();\n\t}",
"private void loadImage(Context context,\n String imageUrl,\n ImageView imageView,\n @Nullable Drawable placeholder) {\n if (imageUrl.equals(imageView.getTag())) {\n // We already have the image, no need to load it again.\n return;\n }\n //If we don't clear the tag, Glide will crash as Glide do not want us to have tag on image view\n // Clear the current tag and load the new image, The new tag will be set on success.\n imageView.setTag(null);\n Glide.with(context)\n .load(imageUrl)\n .centerCrop()\n .thumbnail(GlideConfigModule.SIZE_MULTIPLIER)\n .placeholder(placeholder)\n .dontAnimate()\n .listener(new RequestListener<String, GlideDrawable>() {\n @Override\n public boolean onException(Exception e,\n String model,\n Target<GlideDrawable> target,\n boolean isFirstResource) {\n return false;\n }\n\n @Override\n public boolean onResourceReady(GlideDrawable resource,\n String model,\n Target<GlideDrawable> target,\n boolean isFromMemoryCache,\n boolean isFirstResource) {\n // Set the image URL as a tag so we know that the image with this URL has\n // successfully loaded\n imageView.setTag(imageUrl);\n return false;\n }\n })\n .into(imageView);\n }",
"public void ErrorDog(){\n Picasso.get()\n .load(url)\n .into(imageView, new Callback() {\n @Override\n public void onSuccess() {\n anim = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n anim.setInterpolator(new LinearInterpolator());\n anim.setRepeatCount(Animation.INFINITE);\n anim.setDuration(7000);\n imageView.startAnimation(anim);\n Toast.makeText(MainActivity.this, \"Success Dog\", Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onError(Exception e) {\n Toast.makeText(MainActivity.this, \"Error Dog\", Toast.LENGTH_LONG).show();\n }\n });\n }",
"public static void setPreviewImage(final AppCompatActivity context, String url, ImageView imageView, final ProgressView progressView){\n\n //Show loading view.\n progressView.show(context.getSupportFragmentManager(), \"\");\n\n Picasso.with(context).load(url).resize(1600,1200).centerCrop().into(imageView, new Callback() {\n @Override\n public void onSuccess() {\n progressView.dismiss();\n }\n\n @Override\n public void onError() {\n\n }\n });\n\n }",
"@Override\n public void onSuccess(Uri uri){\n Glide.with(getActivity()).load(uri.toString()).placeholder(R.drawable.round_account_circle_24).dontAnimate().into(profilepic);\n }",
"private void loadUserImage() {\n Target target = new Target() {\n @Override\n public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\n ImageView imageView = new ImageView(getApplicationContext());\n imageView.setImageBitmap(bitmap);\n Drawable image = imageView.getDrawable();\n mToolbar.setLogo(image);\n }\n\n @Override\n public void onBitmapFailed(Drawable errorDrawable) {\n\n }\n\n @Override\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n\n }\n };\n\n Picasso.with(this).load(mUser.getPictureUrl()).into(target);\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n Glide.with(mContext)\n .applyDefaultRequestOptions(new RequestOptions()\n .placeholder(R.drawable.r2d2_mid)) // image being used is: https://avatars3.githubusercontent.com/u/6271?s=400&v=4\n .asBitmap()\n .load(mData[position])\n .into(holder.myImageView);\n }",
"@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n\n GlideApp.with(mContext)\n .load(data.get(position).getFilePath())\n .thumbnail(0.5f)\n //.override(200,200)\n //.crossFade()\n //.diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(((ViewHolder) holder).mImg);\n\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n }",
"@BindingAdapter({\"bind:url\", \"bind:articleUrl\"})\n public static void loadThumbnailImage(ImageView imageView, String url, String articleUrl) {\n Context context = imageView.getContext();\n if (url == null) {\n String iconUrl = \"https://besticon-demo.herokuapp.com/icon?url=%s&size=80..120..200\";\n url = String.format(iconUrl, Uri.parse(articleUrl).getAuthority());\n }\n GlideApp.with(imageView)\n .load(url)\n .apply(NewsGlideModule.roundedCornerImage(new RequestOptions(), imageView.getContext(), 4))\n .placeholder(context.getResources().getDrawable(R.color.cardBackground))\n .into(imageView);\n }",
"public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage);",
"private void fetchdriverimg(String result) throws IOException, JSONException {\n\n String url = \"http://www.mucaddam.pk/abdullah/vanapp/\" + result;\n Picasso.with(this).load(url).placeholder(R.drawable.driverico).error(R.drawable.driverico).into(dri_img, new com.squareup.picasso.Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n }\n });\n\n }",
"@Override\r\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n \tLog.v(\"catch\",view+\"\");\r\n \ttry{\r\n if (loadedImage != null && view!=null) { \r\n ImageView imageView = (ImageView) view; \r\n // imageView.setImageBitmap(loadedImage);\r\n // 是否第一次显示 \r\n boolean firstDisplay = !displayedImages.contains(imageUri); \r\n if (firstDisplay) { \r\n // 图片淡入效果 \r\n FadeInBitmapDisplayer.animate(imageView, 800); \r\n displayedImages.add(imageUri); \r\n \r\n/* \t ViewGroup.LayoutParams params = imageView.getLayoutParams(); \r\n \t params.height =loadedImage.getHeight(); \r\n \t ((MarginLayoutParams)params).setMargins(10, 10, 10, 10);\r\n \t imageView.setLayoutParams(params);*/ \r\n } \r\n } \r\n \t}catch(Exception e){\r\n \t\tLog.v(\"catch1\",e.getMessage());\r\n \t}\r\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.setMessage(\"Please wait\");\n progressDialog.dismiss();\n Task<Uri> downloadUrl = taskSnapshot.getStorage().getDownloadUrl();\n image = downloadUrl.toString();\n //Toast.makeText(StudententryActivity.this, \"image path\"+image, Toast.LENGTH_SHORT).show();\n Log.e(\"path\",\"path\"+downloadUrl);\n // Picasso.get().load(downloadUrl).into(imageview);\n Glide.with(context).load(downloadUrl).placeholder(R.mipmap.ic_launcher).into(imageview);\n //imageview.setBackground();\n Toast.makeText(StudententryActivity.this, \"Student Image Set Success\", Toast.LENGTH_SHORT).show();\n\n }",
"private void loadImg(final ImageView imageView,String url) {\n OkHttpUtils.get(url)\n .tag(this)\n .execute(new BitmapCallback()\n {\n @Override\n public void onSuccess(Bitmap bitmap, okhttp3.Call call, Response response) {\n imageView.setImageBitmap(bitmap);\n }\n });\n }",
"private static void setPicasso(@NonNull Context context, RemoteViews views, int viewId, @NonNull String imageUrl) {\n\n try {\n //java.lang.IllegalArgumentException: Path must not be empty\n if (imageUrl.length() > 0) {\n Bitmap logoBitmap = Picasso.with(context).load(Utils.builtURI(imageUrl)).get();\n views.setImageViewBitmap(viewId, logoBitmap);\n } else {\n views.setImageViewResource(viewId, R.drawable.ic_launcher);\n }\n\n } catch (IOException | IllegalArgumentException e) {\n views.setImageViewResource(viewId, R.drawable.ic_launcher);\n e.printStackTrace();\n }\n\n }",
"@Override\n public void onSuccess(Uri uri) {\n Picasso.with(getActivity()).load(uri).into(image);\n }",
"public static void setThumbnailImage(final Context context, String url, ImageView imageView){\n\n Picasso.with(context).load(url).placeholder(R.drawable.placeholder_thumbnail).fit().into(imageView);\n\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n Log.d(TAG, \"#onLoadingComplete imageUri = \"+imageUri + \" loadedImage = \"+loadedImage + \" width = \"+loadedImage.getWidth() + \" height = \"+loadedImage.getHeight());\n if (mPhotoView != null)\n mPhotoView.setImageBitmap(loadedImage);\n }",
"@Override\n public void onBindViewHolder(@NonNull RecyclerViewHolder holder, int position) {\n String name=dataList.get(position).getName();\n if(name!=null&&!name.isEmpty()) {\n holder.mNameTextView.setText(name);\n }\n String str=dataList.get(position).getPhotoUrl();\n if(str !=null&&!str.isEmpty()) {\n Uri uri = Uri.parse(str);\n Picasso.get().load(uri).into(holder.mDataImageView);\n }\n }",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n mImageUri = data.getData();\r\n if (requestCode == GALLERY_REQUEST && resultCode == Activity.RESULT_OK) {\r\n mImageUri = data.getData();\r\n if (data.getData() == null) {\r\n Toast.makeText(this, \"Failed to load Image,try again\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n try {\r\n outputUri =new getFileName(context).getDataFilesThumbnailUriPath(String.valueOf(System.currentTimeMillis()),context);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n CropImage.activity(mImageUri)\r\n .setGuidelines(CropImageView\r\n .Guidelines.ON)\r\n .setAspectRatio(1, 1)\r\n .setBackgroundColor(getApplicationContext().getResources().getColor(R.color.background))\r\n .setActivityMenuIconColor(getApplicationContext().getResources().getColor(R.color.colorPrimary))\r\n .setOutputUri(outputUri)\r\n .start(this);\r\n }\r\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\r\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\r\n if (resultCode == RESULT_OK) {\r\n resultUri =Uri.fromFile(new File(new CompressingImage5kb(String.valueOf(System.currentTimeMillis()),context).compressImage(String.valueOf(result.getUri()),\"\",true)));\r\n mCircleImageView.setImageURI(resultUri);\r\n } else if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\r\n Exception error = result.getError();\r\n }\r\n }\r\n }",
"@Override\n public void onSuccess(Uri uri) {\n Picasso.get().load(uri.toString()).into(image);\n }",
"public static void displayImageFromUrlWithPlaceHolder(final Context context, final String url,\n final ImageView imageView,\n int placeholderResId) {\n RequestOptions myOptions = new RequestOptions()\n .dontAnimate()\n .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)\n .placeholder(placeholderResId);\n\n Glide.with(context)\n .load(url)\n .apply(myOptions)\n .into(imageView);\n }",
"@Override\n public void onSuccess(Uri uri) {\n Picasso.with(getApplicationContext()).load(uri.toString()).into(profilePhoto);\n }",
"public void drawImage() {\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n imageView.setVisibility(View.VISIBLE);\n Glide.with(MainActivity.this).load(iURI).fitCenter().into(imageView);\n }",
"@Override\n public void UpdateUI(Context context, int position, Advert data) {\n\n Glide\n .with(context)\n .load(data.img_path)\n .centerCrop()\n .placeholder(R.mipmap.jiazai)\n .error(R.mipmap.jiazai)\n// .override(screenWidth,banner_height)\n .dontAnimate()\n .into(imageView);\n }",
"@Override\n public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {\n ((ViewHolder)holder).email_user.setText(muserPictures.get(position).getUserEmail());\n ((ViewHolder) holder).location_user.setText(muserPictures.get(position).getUserLocation());\n\n //set the image\n RequestOptions requestOptions = new RequestOptions()\n .error(R.drawable.ic_launcher_background);\n\n Glide.with(mContext)\n .setDefaultRequestOptions(requestOptions)\n .load(muserPictures.get(position).getImageUrl())\n .into(((ViewHolder) holder).imageView);\n\n\n }",
"@Override\n public void onBindViewHolder(FlickrImageViewHolder holder, int position) {\n\n Photo item = photoList.get(position);\n Picasso.with(context).load(item.getImage())\n .error(R.drawable.placeholder)\n .placeholder(R.drawable.placeholder)\n .into(holder.thumbnail);\n\n holder.title.setText(item.getTitle());\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n\n MemoryCache cache = ImageLoader.getInstance().getMemoryCache();\n cache.put(imageUri, loadedImage);\n holder.img.setImageBitmap(loadedImage);\n }",
"private void displayImage(String url, ImageView image){\n Ion.with(image)\n .placeholder(R.drawable.fgclogo)\n .error(R.drawable.fgclogo)\n .load(url);\n }",
"@Override\n public void imageLoad(ImageView imageView, Bitmap bitmap) {\n imageView.setImageBitmap(bitmap);\n //item.picture = bitmap;\n }",
"@BindingAdapter({\"bind:urlToImage\", \"bind:articleUrl\"})\n public static void loadImage(ImageView imageView, String url, String articleUrl) {\n Context context = imageView.getContext();\n if (url == null) {\n String iconUrl = \"https://besticon-demo.herokuapp.com/icon?url=%s&size=80..120..200\";\n url = String.format(iconUrl, Uri.parse(articleUrl).getAuthority());\n }\n GlideApp.with(imageView)\n .load(url)\n .apply(NewsGlideModule.roundedCornerImage(new RequestOptions(), imageView.getContext(), 0))\n .placeholder(context.getResources().getDrawable(R.color.cardBackground))\n .into(imageView);\n }",
"@Override\n public void loadFullScreenImage(ImageView iv, String imageUrl, int width, LinearLayout bgLinearLayout) {\n if (!TextUtils.isEmpty(imageUrl)) {\n Picasso.with(iv.getContext())\n .load(imageUrl)\n .resize(width, 0)\n .into(iv);\n } else {\n iv.setImageDrawable(null);\n }\n }",
"@Override\n public void onLoadingFailed(String arg0, View arg1, FailReason arg2) {\n holder.imageView.setVisibility(View.GONE);\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void imageLoaded(Drawable imageDrawable, String imageUrl) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tImageView imgViewByTag = (ImageView) (listView.findViewWithTag(imageUrl + index));\n\t\t\t\t\t\t\t\t\t\tif(imgViewByTag != null){\n\t\t\t\t\t\t\t\t\t\t\timgViewByTag.setImageDrawable(imageDrawable);\n\t\t\t\t\t\t\t\t\t\t\tlist.get(index).put(\"drawable\", imageDrawable);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\t\tif (holder1.imageView != null && imageDrawable != null) {\n//\t\t\t\t\t\t\t\t\t\t\tif(holder1.imageView.getTag() != null && holder1.imageView.getTag().equals(urlString))\n//\t\t\t\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\t\t\t list.get(index).put(\"drawable\", imageDrawable);\n//\t\t\t\t\t\t\t\t\t\t\t holder1.imageView.setImageDrawable(imageDrawable);\n//\t\t\t\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\t\t\t// Log.e(\"在回调里面设置好图片\", \"liushuai\");\n//\t\t\t\t\t\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\t\t\t\t\t\t\tholder1.imageView.setImageResource(R.drawable.sync);\n//\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}",
"@BindingAdapter({ \"productimageurl\" })\n public static void loadImage(ImageView imageView, String imageURL) {\n Glide.with(imageView.getContext())\n .load(imageURL)\n .placeholder(R.drawable.bisleri_bottle_img)\n .into(imageView);\n }",
"@Override\n public void onSuccess(Uri uri) {\n Uri downloadURIofImage = uri;\n\n // Pass the URI and ImageView to Picasso\n Picasso.get().load(downloadURIofImage).into(resultImageView);\n }",
"@Override\n public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n holder.imageView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onLoadingFailed(String imageUri, View view, FailReason failReason) {\n }",
"public void onLoadingFailed(String imageUri, View view);",
"private void setImage(String downloaderUri, String thubo) {\n blogImageView = mView.findViewById(R.id.postView_image_post);\n\n //request optional to assign temporary image appear before while loading the image from db.\n RequestOptions requestOptions = new RequestOptions();\n requestOptions.placeholder(R.drawable.postlist);\n\n //Glide.with(context).applyDefaultRequestOptions(requestOptions).load(thubo).into(blogImageView);\n Glide.with(context).applyDefaultRequestOptions(requestOptions).load(downloaderUri).thumbnail(\n Glide.with(context).load(thubo)\n ).into(blogImageView);\n\n }",
"public static void loadTakenImage(Bitmap takenImage, ImageView imageView, Context context) {\n RequestOptions circleProp = new RequestOptions();\n circleProp = circleProp.transform(new CircleCrop());\n Glide.with(context)\n .load(takenImage)\n .apply(circleProp)\n .into(imageView);\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.image_pinch);\r\n\r\n\t\tIntent intent = getIntent();\r\n\t\tString imageUrl = intent.getStringExtra(\"ImageUrl\");\r\n\r\n\t\tTouchImageView imageView = (TouchImageView) findViewById(R.id.imageView);\r\n\r\n\t\ttry {\r\n\t\t\tPicasso.with(this) //\r\n\t\t\t\t\t.load(imageUrl) //\r\n\t\t\t\t\t.placeholder(R.drawable.scan_chexs_logo) //\r\n\t\t\t\t\t.error(R.drawable.app_icon) //\r\n\t\t\t\t\t.into(imageView);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void onCompleted(GraphResponse response) {\n try {\n JSONObject data = response.getJSONObject().getJSONObject(\"data\");\n\n String url = data.getString(\"url\");\n Picasso.with(mView.getContext()).load(url).into(mImageView);\n Log.d(\"FriendsViewHolder\", \"image:success\");\n\n }catch (JSONException ioe){\n Log.d(\"FriendsViewHolder\", \"jsonparse:IO Exception\"+ioe.getMessage());\n }\n\n }",
"public void loadImageToImageView(MyViewHolder holder, int position) {\n String imageUrl = listOfArticles.get(position).getImage().getImageUrl();\n if (getBitmapFromMemCache(imageUrl) != null) {\n holder.imageView.setImageBitmap(mLruCache.get(imageUrl));\n }\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n BitmapDrawable background = new BitmapDrawable(loadedImage);\n ll.setBackgroundDrawable(background);\n }",
"void bindImage(final Messages c){\n\n Picasso.get().load(c.getMessage()).placeholder(R.drawable.placeholder).into(messageImage);\n }",
"@Override\n public void onBindViewHolder(@NonNull FlickrImageViewHolder flickrImageViewHolder, int position) {\n if((photoList == null)|| (photoList.size() == 0)){\n flickrImageViewHolder.thumbnail.setImageResource(R.drawable.placeholder);\n flickrImageViewHolder.title.setText((R.string.empty_search));\n }\n else {\n Photo photoItem = photoList.get(position);\n Log.d(TAG, \"onBindViewHolder: \" + photoItem.getTitle() + \" --> \" + position);\n Picasso.get().load(photoItem.getImage())\n .error(R.drawable.placeholder)\n .placeholder(R.drawable.placeholder)\n .into(flickrImageViewHolder.thumbnail);\n flickrImageViewHolder.title.setText(photoItem.getTitle());\n }\n\n\n }",
"@Override\n protected Bitmap doInBackground(String... params) {\n imageUrl = params[0];\n ImageView thumbnail = imageViewReference.get();\n try {\n InputStream is = (InputStream) new URL(imageUrl).getContent();\n Bitmap bitmap = ImageCommons.decodeSampledBitmapFromInputStream(is, thumbnail.getWidth(), thumbnail.getHeight());\n addBitmapToMemoryCache(imageUrl, bitmap);\n return bitmap;\n } catch (IOException e) {\n e.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n Log.d(\"myLog\", getClass().getSimpleName() + \" Erro ao fazer download de imagem\");\n return ImageCommons.decodeSampledBitmapFromResource(context.getResources(), R.drawable.ic_launcher, 70, 70);\n }",
"private void setProfileImage() {\n if(mCurrentUser!= null && mCurrentUser.getProfileImageUrl() != null) {\n //Glide.with(getContext()).load(mCurrentUser.getProfileImageUrl())\n // .placeholder(R.drawable.ic_photo)\n // .error(R.drawable.ic_camera)\n // .fitCenter()\n // .into(mIvComposeUserProfilePicture);\n\n Picasso.with(getContext()).load(mCurrentUser.getProfileImageUrl())\n .transform(new RoundedCornersTransformation(2,2))\n .placeholder(R.drawable.ic_photo)\n .error(R.drawable.ic_camera)\n .into(mIvComposeUserProfilePicture);\n }\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id)\n {\n\n Ion.with(getContext())\n .load(classi_images.get(position))\n .withBitmap()\n .placeholder(R.raw.loading)\n .error(R.drawable.error)\n .animateLoad(R.anim.zoom_in)\n .animateIn(R.anim.fade_in)\n .intoImageView(clasified_image);\n }",
"@Override\n public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\n SharePhoto photo = new SharePhoto.Builder()\n .setBitmap(bitmap)\n .build();\n if(ShareDialog.canShow(SharePhotoContent.class)){\n SharePhotoContent content = new SharePhotoContent.Builder()\n .addPhoto(photo)\n .build();\n shareDialog.show(content);\n }\n\n }",
"public static void displayRoundImageFromUrl(final Context context, final String url, final ImageView imageView) {\n RequestOptions myOptions = new RequestOptions()\n .centerCrop()\n .dontAnimate();\n\n Glide.with(context)\n .asBitmap()\n .apply(myOptions)\n .load(url)\n .into(new BitmapImageViewTarget(imageView) {\n @Override\n protected void setResource(Bitmap resource) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(context.getResources(), resource);\n circularBitmapDrawable.setCircular(true);\n imageView.setImageDrawable(circularBitmapDrawable);\n }\n });\n }",
"public void onBindViewHolder(MyViewHolder holder, int position) {\n\n byte[] originalPhoto = places.get(position).getPhoto();\n\n// converting the photo bytes to usable image\n Bitmap decodedPhoto = BitmapFactory.decodeByteArray(originalPhoto, 0, originalPhoto.length);\n\n\n\n\n holder.photo.setImageBitmap(decodedPhoto);\n holder.name.setText(places.get(position).getName());\n holder.des.setText(places.get(position).getDes());\n holder.selectedPlace = places.get(position);\n\n Glide.with(context).load(places.get(position).getPhoto()).into(holder.photo);\n\n holder.photo.setImageBitmap(decodedPhoto);\n holder.name.setText(places.get(position).getName());\n holder.des.setText(places.get(position).getDes());\n holder.selectedPlace = places.get(position);\n Glide.with(context).load(places.get(position).getPhoto()).into(holder.photo);\n\n Toast.makeText(context, places.get(position).getPhoto().toString(), Toast.LENGTH_SHORT).show();\n\n\n }",
"public void buildPicasso() {\n OkHttpClient client = new OkHttpClient.Builder()\n .addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request newRequest = chain.request().newBuilder()\n .addHeader(\"Authorization\", \"Token \" + token)\n .build();\n return chain.proceed(newRequest);\n }\n })\n .build();\n Picasso.Builder picassoBuilder = new Picasso.Builder(context)\n .downloader(new OkHttp3Downloader(client));\n picasso = picassoBuilder.build();\n isPicasso = true;\n }",
"@Override\n public void onSuccess(Uri uri) {\n Log.i(\"update\", uri.toString());\n Glide.with(context).load(uri.toString()).circleCrop().into(ivIcon);\n ivIcon.setVisibility(View.VISIBLE);\n }",
"private void setupUserProfilePicImageView() {\n if (prismUser.getProfilePicture() != null) {\n Glide.with(context)\n .asBitmap()\n .thumbnail(0.05f)\n .load(prismUser.getProfilePicture().getLowResProfilePicUri())\n .into(new BitmapImageViewTarget(userProfilePicture) {\n @Override\n protected void setResource(Bitmap resource) {\n int imageViewPadding = (int) (1 * Default.scale);\n RoundedBitmapDrawable profilePictureDrawable =\n BitmapHelper.createCircularProfilePicture(\n context,\n userProfilePicture,\n prismUser.getProfilePicture().isDefault(),\n resource,\n imageViewPadding);\n userProfilePicture.setImageDrawable(profilePictureDrawable);\n }\n });\n }\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n imageViewUIL.setImageBitmap(loadedImage);\n imageViewUIL.setAnimation(anim);\n }",
"public void setImageUrl(String url){\n\n Glide.with(getContext()).load(url)\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(ivImg);\n }",
"@Override\n public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\n SharePhoto photo = new SharePhoto.Builder()\n .setBitmap(bitmap)\n .build();\n if (ShareDialog.canShow(SharePhotoContent.class))\n {\n SharePhotoContent content = new SharePhotoContent.Builder()\n .addPhoto(photo)\n .build();\n shareDialog.show(content);\n\n }\n\n\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(StudententryActivity.this, \"Image Not Set. Please Try Again....\", Toast.LENGTH_SHORT).show();\n\n }",
"public void setSmallImg(String path){\n Picasso.with(context).load(SMALL+path).into(imageView);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if (requestCode == 100) {\n if(resultCode == Activity.RESULT_OK){\n String url =data.getStringExtra(\"result\");\n\n imageUrlIfProfileNotUploaded = url;\n\n Glide.with(AddInterviewExperienceActivity.this)\n .load(url)\n .apply(new RequestOptions()\n .placeholder(R.drawable.user_avtar)\n .fitCenter())\n .into(mPhotoPickerButton);\n }\n }\n }",
"@BindingAdapter(\"bind:imageUrl\")\n public static void setImageUrl(ImageView imageView, String url) {\n Context context = imageView.getContext();\n Glide.with( context ).load( url ).into( imageView );\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n holder.mName.setText(places.get(position).getTitle());\n\n // Set the image\n RequestOptions defaultOptions = new RequestOptions()\n .error(R.drawable.ic_launcher_background);\n Glide.with(context)\n .setDefaultRequestOptions(defaultOptions)\n .load(places.get(position).getImageUrl())\n .into(holder.mImage);\n }",
"public static void displayImageFromUrl(final Context context, final String url,\n final ImageView imageView, Drawable placeholderDrawable, RequestListener listener) {\n RequestOptions myOptions = new RequestOptions()\n .dontAnimate()\n .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)\n .placeholder(placeholderDrawable);\n\n if (listener != null) {\n Glide.with(context)\n .load(url)\n .apply(myOptions)\n .listener(listener)\n .into(imageView);\n } else {\n Glide.with(context)\n .load(url)\n .apply(myOptions)\n .listener(listener)\n .into(imageView);\n }\n }",
"@Override\n public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {\n holder.mName.setText(nicePlaces.get(position).getTitle());\n\n //Set the image\n RequestOptions defaultOptions = new RequestOptions()\n .error(R.drawable.ic_launcher_background);\n Glide.with(context)\n .setDefaultRequestOptions(defaultOptions)\n .load(nicePlaces.get(position).getImageUrl())\n .into(holder.mImage);\n\n //holder.mName.setText(newsArticles.get(position).getTitle());\n }",
"@SuppressWarnings(\"deprecation\")\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void onLoadingComplete(String imageUri,\r\n\t\t\t\t\t\t\t\tView view, Bitmap loadedImage) {\n\t\t\t\t\t\t\tLog.e(\"loadImage\", \"onLoadingComplete \");\r\n\r\n\t\t\t\t\t\t\t// TODO UPDATE CODE HERE SHIHAB\r\n\t\t\t\t\t\t\t// relative_restaurent_info\r\n\t\t\t\t\t\t\t// .setBackground(new BitmapDrawable(\r\n\t\t\t\t\t\t\t// loadedImage));\r\n\t\t\t\t\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Movie mymovie= (Movie) getItem(position);\n LayoutInflater inflater = (LayoutInflater) parent.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View row;\n row = inflater.inflate(R.layout.movie_item,parent,false);\n mImg = (ImageView)row.findViewById(R.id.cover_image);\n String url= new StringBuilder()\n .append(BASE_POSTER_URL)\n .append(IMAGE_SIZE)\n .append(mymovie.getPosterPath().trim())\n .toString();\n Picasso.with(ctx)\n .load(url)\n .placeholder(R.mipmap.ic_load)\n .error(R.mipmap.ic_error)\n .into(mImg);\n return row;\n }",
"@Override\n public void onLoadingFailed(String imageUri, View view, FailReason failReason) {\n }",
"@Override\n public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int i) {\n // Set the name of the 'NicePlace'\n ((ViewHolder)viewHolder).mName.setText(mNicePlace.get(i).getTitle());\n\n// set the image\n RequestOptions defaultOptions = new RequestOptions()\n .error(R.drawable.ic_launcher_background);\n Glide.with(mContext)\n .setDefaultRequestOptions(defaultOptions)\n .load(mNicePlace.get(i).getImgUrl())\n .into(((ViewHolder)viewHolder).mImage);\n }",
"@Override\n protected void onPostExecute(Bitmap result) {\n progressBar.setVisibility(View.INVISIBLE);\n if(result!=null)\n imageView.setImageBitmap(result);\n else\n Toast.makeText(DisplayItem.this, \"Image Does Not exist or Network Error\", Toast.LENGTH_SHORT).show();\n }",
"@Override\r\n\t\t\tpublic void onLoaded(ImageView imageView, Bitmap loadedDrawable, String url, boolean loadedFromCache) {\n\r\n\t\t\t\tif (loadedDrawable == null) // 아이콘을 로드하지 못한 경우\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\timageView.setImageBitmap(loadedDrawable);\r\n\t\t\t}",
"@Override\n public void onSuccess(Uri uri) {\n Glide.with(getApplicationContext()).load(uri).into(profilePicture);\n\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n Picasso.get().load(mDataset[position].getImgUrl()).into(holder.imageView);\n }",
"public void loadImage(String url, ImageView imageView) {\n Bitmap bitmap = null;\n if (mImageCache != null) {\n bitmap = mImageCache.get(url);\n }\n if (bitmap != null) {\n imageView.setImageBitmap(bitmap);\n return;\n } else {\n if (LoadImageUrlTask.cancelPotentialDownload(url, imageView)) {\n LoadImageUrlTask task = new LoadImageUrlTask(imageView, mImageCache);\n final DownLoadedDrawable downLoadedDrawable = new DownLoadedDrawable(mContext.getResources(),\n ImageUtils.decodeSampledBitmapFromResource(mContext.getResources(), loadingBgResId), task);\n imageView.setImageDrawable(downLoadedDrawable);\n task.execute(url);\n }\n }\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n Movie movie = movies.get(position);\n holder.tvTitle.setText(movie.getTitle());\n holder.tvOverview.setText(movie.getOverview());\n //Ligne sa pral gen pou l kreye lien pou Poster Image yo\n String theSize = config.getPosterSize();\n if(theSize != null){\n String imageUrl = config.getImageUrl(theSize, movie.getPosterPath());\n Glide.with(context).load(imageUrl).into(holder.ivPosterImage);\n }\n\n // Load image using Glide\n\n int radius = 30; // corner radius, higher value = more rounded\n int margin = 10; // crop margin, set to 0 or corners with no crop\n\n// Glide.with(context).load(movie.getPosterPath()).into(holder.ivPosterImage);\n\n }"
] |
[
"0.80103517",
"0.79626393",
"0.78527594",
"0.77973473",
"0.77395964",
"0.7680962",
"0.76758",
"0.76509506",
"0.75960207",
"0.75551337",
"0.75010437",
"0.74969345",
"0.7462056",
"0.7380945",
"0.71470547",
"0.7073237",
"0.7065198",
"0.7039671",
"0.6985807",
"0.69154084",
"0.6909586",
"0.68823403",
"0.68062735",
"0.67862403",
"0.6767553",
"0.6752866",
"0.6722923",
"0.67042905",
"0.669055",
"0.66621214",
"0.6640761",
"0.66370136",
"0.66352475",
"0.6607675",
"0.6571971",
"0.6557976",
"0.65432465",
"0.65381634",
"0.6530033",
"0.6529498",
"0.6529241",
"0.6521514",
"0.6516783",
"0.6484724",
"0.6479617",
"0.6463729",
"0.64574176",
"0.6449469",
"0.642721",
"0.6426269",
"0.6424088",
"0.64195",
"0.6390381",
"0.6374402",
"0.6373957",
"0.6368577",
"0.63599026",
"0.6351082",
"0.6346995",
"0.6308678",
"0.6306572",
"0.6288122",
"0.62830305",
"0.6271469",
"0.62679917",
"0.6267508",
"0.6267031",
"0.62662965",
"0.62553674",
"0.6250114",
"0.62453824",
"0.62251836",
"0.62114805",
"0.6179898",
"0.6173393",
"0.6166615",
"0.6163915",
"0.6163908",
"0.6156724",
"0.6145094",
"0.61436737",
"0.61351854",
"0.6124852",
"0.61221844",
"0.612028",
"0.6111281",
"0.61100256",
"0.6105662",
"0.6103945",
"0.60987884",
"0.6087045",
"0.60846096",
"0.608325",
"0.6079877",
"0.6077152",
"0.60684305",
"0.6066348",
"0.60602725",
"0.6059526",
"0.6040878",
"0.6039486"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public List<SprintTo> getSprintsForProjectByStatus(String projectId,
int status) {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void updateSprintStatus(String card_id, String box_id, String user) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public SprintTo getCurrentSprint(String projectId) {
return sprintDao.getCurrentSprint(projectId,new Date());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public List<TreeNodeTo> prepareSprintTreeNodes(String projectId) {
TreeNodeTo rootNode=prepareRootNode();
List sprintNodes=new ArrayList<TreeNodeTo>();
sprintNodes.add(rootNode);
List<SprintTo> sprints=sprintDao.getSprintForProject(projectId);
if(sprints!=null&&sprints.size()>0){
for(SprintTo sprint : sprints){
TreeNodeTo node=new TreeNodeTo();
node.setId(sprint.getId());
node.setName("<Strong>"+sprint.getName()+"</Strong>"+" : "+dateFormat.format(sprint.getStartTime())+"--"+dateFormat.format(sprint.getEndTime()));
if(sprint.getParentSprint()==null){
node.setpId("0");
node.setOpen(true);
}
else {
node.setpId(sprint.getParentSprint().getId());
node.setOpen(false);
}
sprintNodes.add(node);
}
}
return sprintNodes;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public TreeNodeTo createSprintNode(SprintTo sprint, String projectId,String sprintId) {
sprint=createSprint(sprint, projectId, sprintId);
TreeNodeTo node=new TreeNodeTo();
node.setId(sprint.getId());
node.setName("<Strong>"+sprint.getName()+"</Strong>"+" : "+dateFormat.format(sprint.getStartTime())+"--"+dateFormat.format(sprint.getEndTime()));
if(sprint.getParentSprint()==null){
node.setpId("0");
node.setOpen(true);
}
else {
node.setpId(sprint.getParentSprint().getId());
node.setOpen(false);
}
return node;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public List<SprintTo> getSprintWithNoChildrenForProject(String projectId) {
return sprintDao.getSprintWithNoChildrenForProject(projectId);
}
|
{
"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
|
An interface for objects which dispatch pages, used to avoid a circular dependency between WWWDataSource and PageProcessor and to enable testing with the easymock library.
|
public interface PageDispatcher {
/**
* Process a webpage
* @param url The URL to process
* @param link The link that was followed to get there
*/
public void dispatch(URL url, Weblink link, long delay);
/**
* Register a redirect
* @param oldURL The URL that was redirected
* @param newURL The URL it was redirected to
* @param delay The number of milliseconds to wait before loading the page
*/
public void registerRedirect(String oldURL, String newURL);
/**
* Remove all traces of having crawled a URL
* @param url the URL to remove
*/
public void undispatchURL(String url);
/**
* Notify the dispatcher that a page has been parsed
* @param page The final version of the page
* @param link The link that was followed to reach the page
*/
public void notifyPage(Webpage page, Weblink link);
/**
* Send a command to the Builders
* @param cmd The Command to send
*/
public void sendCommand(Command cmd);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface PageConnector {\n void onLastPage();\n void onNormalPage();\n}",
"public interface ResponsePostprocessor {\r\n String postprocess(Page page, String postprocess);\r\n}",
"public interface IPage {\r\n\r\n\t/**\r\n\t * Gets the url.\r\n\t *\r\n\t * @return the url\r\n\t */\r\n\tUrl getUrl();\r\n\r\n\t/**\r\n\t * Seek.\r\n\t *\r\n\t * @param skip the skip\r\n\t * @return the int\r\n\t */\r\n\tint seek(int skip);\r\n\r\n\t/**\r\n\t * Back to.\r\n\t *\r\n\t * @param s the s\r\n\t * @return true, if successful\r\n\t */\r\n\tboolean backTo(char s);\r\n\r\n\t/**\r\n\t * Seek.\r\n\t *\r\n\t * @param s the s\r\n\t * @return true, if successful\r\n\t */\r\n\tboolean seek(String s);\r\n\r\n\t/**\r\n\t * Seek.\r\n\t *\r\n\t * @param s the s\r\n\t * @param inlen the inlen\r\n\t * @return true, if successful\r\n\t */\r\n\tboolean seek(String s, int inlen);\r\n\r\n\t/**\r\n\t * Gets the attribute.\r\n\t *\r\n\t * @param name the name\r\n\t * @return the attribute\r\n\t */\r\n\tString getAttribute(String name);\r\n\r\n\t/**\r\n\t * Mark.\r\n\t */\r\n\tvoid mark();\r\n\r\n\t/**\r\n\t * Reset.\r\n\t */\r\n\tvoid reset();\r\n\r\n\t/**\r\n\t * Clear mark.\r\n\t */\r\n\tvoid clearMark();\r\n\r\n\t/**\r\n\t * Gets the text.\r\n\t *\r\n\t * @return the text\r\n\t */\r\n\tString getText();\r\n\r\n\t/**\r\n\t * Gets the word in.\r\n\t *\r\n\t * @param schar the schar\r\n\t * @param echar the echar\r\n\t * @return the word in\r\n\t */\r\n\tString getWordIn(String schar, String echar);\r\n\r\n\t/**\r\n\t * Gets the text.\r\n\t *\r\n\t * @param name the name\r\n\t * @return the text\r\n\t */\r\n\tString getText(String name);\r\n\r\n\t/**\r\n\t * Sets the cached.\r\n\t *\r\n\t * @param b the new cached\r\n\t */\r\n\tvoid setCached(boolean b);\r\n\r\n\t/**\r\n\t * Gets the request.\r\n\t *\r\n\t * @return the request\r\n\t */\r\n\tUrl getRequest();\r\n\r\n\t/**\r\n\t * Gets the status line.\r\n\t *\r\n\t * @return the status line\r\n\t */\r\n\tStatusLine getStatusLine();\r\n\r\n\t/**\r\n\t * Gets the headers.\r\n\t *\r\n\t * @return the headers\r\n\t */\r\n\tHeader[] getHeaders();\r\n\r\n\t/**\r\n\t * Gets the context.\r\n\t *\r\n\t * @return the context\r\n\t */\r\n\tString getContext();\r\n\r\n\t/**\r\n\t * Gets the urls.\r\n\t *\r\n\t * @return the urls\r\n\t */\r\n\tList<Url> getUrls();\r\n\r\n\t/**\r\n\t * Size.\r\n\t *\r\n\t * @return the int\r\n\t */\r\n\tint size();\r\n\r\n\t/**\r\n\t * Release.\r\n\t */\r\n\tvoid release();\r\n\r\n\t/**\r\n\t * Gets the.\r\n\t *\r\n\t * @param url the url\r\n\t * @return the string\r\n\t */\r\n\tString get(String url);\r\n\r\n\t/**\r\n\t * Format.\r\n\t *\r\n\t * @param href the href\r\n\t * @return the url\r\n\t */\r\n\tUrl format(String href);\r\n\r\n}",
"public interface Page {\n\n public int getSize();\n public Container getContainer();\n public void setContainer(Container containerss);\n\n public String getName();\n public String getDisplayName();\n public PageComponent[] getPageComponents();\n\n public void putPageComponentsPlayerHotbar(Player player);\n\n public void showGui(Player player);\n public void addComponent(PageComponent pageComponent);\n public void addComponent(PageComponent pageComponent, int index);\n\n public Inventory getInventory();\n\n public boolean hasFreeSlot();\n public void clearComponents();\n public void removeComponent(String name);\n\n public void updateComponents();\n\n}",
"PageAgent getPage();",
"public interface WebPage<T> {\n\n\n /**\n * Return the number of frame/iframe in the current page\n *\n * @return the number of frames\n */\n int getNumberFrames();\n\n /**\n * Change the way of processing the WebElement.\n *\n * @param processWebElement\n */\n public void setProcessWebElement(ProcessWebElement<T> processWebElement);\n\n\n /**\n * Find a autObject element in the page and sub-frames\n * Stop the research after the first found.\n *\n * @param autObject\n * The {@code AutObject} to search for\n *\n * @return a {@code Optional} of a T element\n */\n Optional<T> stopAfterFirstElementPresentInPage(AutObject autObject) ;\n\n\n /**\n * From a {@code AutObject} we find all T elements in the page and sub-frames.\n *\n * @param autObject\n * The {@code AutObject} to search for\n *\n * @return a {@code List} of the T element\n */\n List<T> findElementsInPage(AutObject autObject) ;\n\n\n /**\n * Get a map of {@code AutObject} associated with a list of T found in the page and sub-frames.\n * Stop the research after the first found.\n *\n * @param autObjects\n * A list of {@code AutObject} to search for\n *\n * @return a {@code Optional} of the T element associated to an the first {@code AutObject} found\n */\n Optional<Pair<AutObject, T>> stopAfterFirstElementPresentInPage(List<AutObject> autObjects) ;\n\n /**\n * Get a map of {@code AutObject} associated with a list of {@code WebElement} in the page and sub-frames.\n *\n * @param autObjects\n * A list of {@code AutObject} to search for\n *\n * @return a {@code Map} of T elements associated to {@code AutObject}\n */\n Map<AutObject, List<T>> findElementsInPage(List<AutObject> autObjects);\n\n\n /**\n * Return the metrics of the current page.\n * Basically return the number of elements filtered and unfiltered.\n *\n * @return Metrics\n */\n Metrics getMetrics();\n\n\n /**\n * Set a limit to stop searching in the page if the limit is reached.\n * By default it's 0 that means no limit.\n */\n WebPage limit(int limit);\n\n}",
"public interface IViewPageInterface {\n public void ViewPageDone(int viewid);\n public void ViewPageStart(int viewid);\n public void EventInPage(int viewid,String eventname,Object object);\n\n}",
"public interface Page {\n\n public abstract String createTitle();\n public abstract Markup createMarkup();\n}",
"public abstract void pageDisplayed();",
"public interface PageResourceMapper {\n}",
"Page getPage();",
"public interface TestPage<D> {\r\n\tpublic TestPage<D> getParent();\r\n\r\n\tpublic PageLocator getPageLocator();\r\n\r\n\t/***\r\n\t * This method check for existence of page in browser so we can proceed\r\n\t * further with page functionality.\r\n\t * \r\n\t * @param args\r\n\t * optional arguments required to identify page.\r\n\t * @return\r\n\t */\r\n\tpublic boolean isPageActive(PageLocator loc, Object... args);\r\n\r\n\t/**\r\n\t * selenium base instance to provide selenium\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic UiTestBase<D> getTestBase();\r\n\r\n\t/**\r\n\t * Returns the body text of the current page\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String getText();\r\n\r\n\t/**\r\n\t * Use only launchPage method to load a page. For more usability you can\r\n\t * overload this method in your page class but make sure to call this method\r\n\t * within it to load page. eg:\r\n\t * \r\n\t * <pre>\r\n\t * <code>\r\n\t * void launchPage(){\r\n\t * \t\tlaunchPage(null)\r\n\t * }\r\n\t * OR\r\n\t * void launchPage(String locator){\r\n\t * \t\tlaunchPage(new DefaultPageLocator(locator));\r\n\t * }\r\n\t * </code>\r\n\t * </pre>\r\n\t * \r\n\t * @param locator\r\n\t * to locate page on parent page.\r\n\t * <p>\r\n\t * This locator will be passed to other fw methods for example\r\n\t * {@link #isPageActive(PageLocator, Object...)}\r\n\t * @param args\r\n\t * optional page identifiers to verify is this page for what we\r\n\t * aspect? for example: view details page for specific user or\r\n\t * item, you can identify page by user or item id/name\r\n\t * <p>\r\n\t * This args will be passed to other fw methods for example\r\n\t * {@link #isPageActive(PageLocator, Object...)}\r\n\t */\r\n\tpublic void launchPage(PageLocator locator, Object... args);\r\n\r\n\t/**\r\n\t * You can specify launch behavior before launching the page by calling this\r\n\t * method.\r\n\t * \r\n\t * @param strategy\r\n\t * launch strategy.\r\n\t */\r\n\tpublic void setLaunchStrategy(LaunchStrategy strategy);\r\n\r\n\tpublic enum LaunchStrategy {\r\n\t\t/**\r\n\t\t * To specify that even if the page is active, launch page form the\r\n\t\t * parent page.\r\n\t\t */\r\n\t\talwaysRelaunchFromParent,\r\n\t\t/**\r\n\t\t * To specify that even if the page or its parent page is active, launch\r\n\t\t * form the root by navigating entire hierarchy.\r\n\t\t */\r\n\t\talwaysRelaunchFromRoot,\r\n\t\t/**\r\n\t\t * To specify that launch the page if it is not active.\r\n\t\t */\r\n\t\tonlyIfRequired;\r\n\t}\r\n\r\n}",
"public interface ICollectPageInterface {\n void OnGetCollectListSuccess(List<CollectBean> datas);\n void OnGetCollectListFail();\n}",
"public interface WelfarePresenter {\n void getData(int page);\n}",
"public interface PageContext<E> {\n public static final int DEFAULT_PAGE_SIZE = 20;\n\n public long getPageCount();\n\n public Page<E> getPage(int index);\n\n public int getPageSize();\n\n public long getTotal();\n}",
"public interface InterfaceWebRequest {\n void dispatchRequest();\n}",
"public interface IPageView extends IBaseView {\n\n void showList(List<PageBean> list);\n}",
"public interface PageResponseEnricher {\n\n void enrich(HttpPageResponse pageResponseDetails, ServerHttpResponse httpResponse);\n\n}",
"static BasePage getPageInstance(String page_name,HttpServletRequest request,\n HttpServletResponse response,HttpServlet servlet){\n HttpSession session = request.getSession();\n BasePage page = (BasePage)session.getAttribute(page_name);\n if(page == null){\n page = (BasePage)createInstance(page_name);\n session.setAttribute(page_name,page);\n if(page == null)\n System.err.println(\"Could not create \" + page_name);\n } //if\n page.request = request;\n page.session = session;\n page.servlet = servlet;\n if(!page.$isLoaded())\n page.fillDom();\n return page;\n}",
"@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}",
"public interface Controller {\r\n Object handle(WebRequest request);\r\n}",
"public interface IStoreable {\n void store(Good page);\n}",
"public interface HasPages {\n\n void setPageNumberChangedHandler(@Nonnull HasPagination.PageNumberChangedHandler pageNumberChangedHandler);\n\n int getPageNumber();\n\n void setPageNumber(int pageNumber);\n\n void setPageCount(int pageCount);\n\n void setElementCount(long elementCount);\n}",
"public interface DecoratablePage\n{\n public String getTitle();\n public String getMetaProperty(String key);\n public String getBodyTagProperty(String key);\n public String getPageProperty(String key);\n public void writeHead(Writer writer);\n public void writeBody(Writer writer);\n\n interface ParsedHead\n {\n String getTitle();\n String getMetaProperty(String key);\n }\n\n interface ParsedBody\n {\n String getBodyTagProperty(String key);\n String getPageProperty(String key);\n }\n}",
"public interface Fetcher {\n\n\tFetchedPage fetch(URI pageUri) throws FetchingException;\n\n}",
"public interface WizardScenePage {\n int pageBack = -1;\n int pageHere = -1;\n int pageNext = -1;\n\n abstract public boolean allowsPageBack();\n\n abstract public boolean allowsPageNext();\n\n abstract public boolean isPageValidate();\n\n abstract public void doCanceled();\n\n abstract public void doFinished();\n\n abstract public void doPageBack();\n\n abstract public void doPageHelp();\n\n abstract public void doPageNext();\n}",
"public interface IHttpResponseHandler {\n\n public void updateResultPage(HttpResponse response);\n}",
"public PageData createPageBean( HttpServletRequest request, Object actionResult ) throws ServletException;",
"public interface RendererLogic {\n\n /**\n * The `execute` function will render the supplied HTML page to the supplied GUI and will\n * retrieve any necessary external resources using the supplied external resource logic.\n *\n * @param htmlPage The HTML page to load into the supplied GUI.\n * @param gui The GUI to load the supplied HTML page into.\n * @throws IOException when unable to retrieve a resource.\n * @throws UnsupportedEncodingException when unable to proxy a link through\n * `http://127.0.0.1/?url=` to prevent immediate DNS look\n * ups.\n * @throws BadLocationException when unable to tokenize the supplied HTML.\n */\n void execute(HtmlPage htmlPage, Gui gui)\n throws IOException, UnsupportedEncodingException, BadLocationException;\n\n}",
"public interface URLProcessingService {\n\n public PresentationDocument process(String url);\n\n}",
"@Override\n\tpublic void process(Page page) {\n\t\t\n\t}",
"PageResolver getPageResolver();",
"@Override\r\n\tpublic void visit(Page page) {\r\n\t\t// Some business logic I won't expose here\r\n\t\t// My boss won't be happy ;-)\r\n\t}",
"public abstract Page value();",
"public interface IFirstPageView {\n\n void getHomeListSuccess(FirstPageResponse response);\n\n\n void getHomeListFailed();\n}",
"@Override\n protected void init(PageDto page, HttpServletRequest request, HttpServletResponse response, Model model) {\n\n }",
"Pages getPages();",
"public abstract void addCustomPages();",
"public interface Page358InterfaceB {\n public void something();\n}",
"public interface IWebEngine {\n\n /**\n * Executes the specified JavaScript Command\n *\n * @param command The command to execute\n * @return The object returned by the script (if any).\n */\n public Object executeScript(String command);\n\n /**\n * Gets a worked which will be notified when a web page has finished\n * loading.\n *\n * @return The worker\n */\n public Worker<Void> getLoadWorker();\n\n /**\n * Loads the specified URL\n *\n * @param url The URL to load in the engine.\n */\n public void load(String url);\n\n}",
"public interface PaginationLoader\n{\n\n\tpublic abstract boolean isLoading();\n\n\tpublic abstract void loadMore();\n\n\tpublic abstract void onDetach();\n\n\tpublic abstract void onStart();\n\n\tpublic abstract void onStop();\n\n\tpublic abstract void reload();\n\n\tpublic abstract void setFilters(Set set);\n\n\tpublic abstract void setListener(PaginationLoaderListener paginationloaderlistener);\n}",
"public interface RequestController {\n\n void onCreate();\n\n void setUsePagingRefreshDelegate();\n\n void requestData();\n}",
"List<? extends Page> getPages();",
"public interface Action {\r\n\r\n /**\r\n * Execute the Action based on http request and response\r\n *\r\n * @param req the request\r\n * @param res the response\r\n * @return the jsp page to redirect the user\r\n */\r\n String execute(HttpServletRequest req, HttpServletResponse res);\r\n}",
"boolean canHandlePageClass(Class<? extends Page> pageClazz, PageParameters pageParameters);",
"public interface WebResource {\n public String getName();\n\n public URL getBaseURL() throws MalformedURLException;\n\n public WebPageIterator getIterator();\n}",
"public interface TDgapWsDailyStatProvider extends BaseProvider<TDgapWsDailyStat> {\n PageInfo<Map<String, Object>> list(Map<String, Object> params);\n\n public int stateDailyLog(Date time);\n\n public void testPageHelper();\n\n}",
"public void dispatch();",
"public interface Spider {\n /**\n * 获取当前页面的title\n * */\n String getHtmlTitle(Document doc);\n /**\n * 获取当前新闻的title\n * */\n String getTitle(Document doc);\n /**\n * 获取当前新闻的time\n * */\n Date getTime(Document doc);\n\n /**\n * 获取当前新闻的title\n * */\n String getTitle(Element element);\n\n /**\n * 获取当前新闻的content\n * */\n String getContent(Element element);\n /**\n * 获取当前新闻的time\n * */\n Date getTime(Element element);\n /**\n * 获取当前新闻的url\n * */\n String getUrl(Element element);\n\n /**\n * 获取当前新闻的url\n * */\n String getResourceUrl(Element element);\n\n Elements getElements(Document doc,String cssQuery);\n\n void getNewsContents(NewsExPage news);\n\n List<NewsExPage> getNews(Document doc);\n\n}",
"@Override\r\n\tpublic Type getRequestType() {\n\t\treturn Type.PAGE;\r\n\t}",
"public OnPageFact(Class<? extends PageObject> pageObjectClass) {\n if (pageObjectClass == null) {\n throw new NullPointerException(\"You must specify a valid page object class.\");\n }\n this.pageObjectClass = pageObjectClass;\n }",
"public interface AjaxPaginationService {\n /**\n *\n * @param pageNow 当前页\n * @param data 传入数据\n * @return List<String> [0]放入分页内容[1]放入分页页码列表\n */\n public List<String> getPagination(Integer pageNow, Object data);\n}",
"public interface HasContextActions extends Page {\n\n List<Action> getContextActions();\n\n interface ContextActionListener {\n void onUpdate();\n }\n}",
"public interface LoadImagePresenter extends FetchData {\n\n void fetchPresenter(FetchData fetchData,int spage,String nextpagetoken);\n\n}",
"public interface PageSwapper {\n public List<Student> getPage(int currentPage, int ammountOfRecords);\n public int getAmountOfRecords();\n}",
"public Object navigate(Class<? extends Page> pageObject) {\n\n Page page;\n\n try {\n page = pageObject.getConstructor(WebDriver.class).newInstance(driver.get());\n driver.get().navigate().to(page.getURL());\n//\t\t\tdriver.get().navigate().to(System.getProperty(\"APPLICATION_URL\"));\n return page;\n\n } catch (InstantiationException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (IllegalAccessException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (IllegalArgumentException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (InvocationTargetException\n e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (NoSuchMethodException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n } catch (SecurityException e) {\n LOGGER.log(Level.SEVERE,\n \"ERROR loading pageObject\", e);\n return null;\n }\n }",
"public interface PageParameters {\n\n String getStringParameter(String param);\n\n int getIntParameter(String param);\n\n HttpServletRequest getRequest();\n\n HttpServletResponse getResponse();\n\n String getMode();\n\n int getItemsPerPage();\n\n int getPageNumber();\n\n int getParentId();\n\n String getEditMode();\n\n int getEditId();\n\n PrintWriter getOut();\n\n ItemType getEditItemType();\n}",
"public OnPageFact(PageObject pageObject) {\n if (pageObject == null) {\n throw new NullPointerException(\"You must specify a valid page object.\");\n }\n this.pageObject = pageObject;\n }",
"public Page getPage() {return page;}",
"public void setPage(Page page) {this.page = page;}",
"public interface PagingAgent extends OperationAgent {\r\n\r\n\t/**\r\n\t * Move to specified page index.\r\n\t * @param pageIndex index of page, starts from 0 (1st page)\r\n\t */\r\n\tpublic void moveTo(int pageIndex);\r\n}",
"public interface OnboardPage\n{\n\n public static final int DK_PAGE_ID = 0x7f0d0055;\n public static final int DK_PAGE_INFO = 0x7f0d0056;\n\n public abstract OnboardPageInfo getPageInfo();\n\n public abstract void setOnboardHostControl(OnboardHostControl onboardhostcontrol);\n\n}",
"protected interface Dispatcher {\n\n /**\n * Invokes the proxied action.\n *\n * @param argument The arguments provided.\n * @return The return value.\n * @throws Throwable If any error occurs.\n */\n @MaybeNull\n Object invoke(Object[] argument) throws Throwable;\n\n /**\n * Implements this dispatcher in a generated proxy.\n *\n * @param methodVisitor The method visitor to implement the method with.\n * @param method The method being implemented.\n * @return The maximal size of the operand stack.\n */\n int apply(MethodVisitor methodVisitor, Method method);\n\n /**\n * A dispatcher that performs an instance check.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForInstanceCheck implements Dispatcher {\n\n /**\n * The checked type.\n */\n private final Class<?> target;\n\n /**\n * Creates a dispatcher for an instance check.\n *\n * @param target The checked type.\n */\n protected ForInstanceCheck(Class<?> target) {\n this.target = target;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return target.isInstance(argument[0]);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitVarInsn(Opcodes.ALOAD, 1);\n methodVisitor.visitTypeInsn(Opcodes.INSTANCEOF, Type.getInternalName(target));\n methodVisitor.visitInsn(Opcodes.IRETURN);\n return 1;\n }\n }\n\n /**\n * A dispatcher that creates an array.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForContainerCreation implements Dispatcher {\n\n /**\n * The component type.\n */\n private final Class<?> target;\n\n /**\n * Creates a dispatcher for an array creation.\n *\n * @param target The component type.\n */\n protected ForContainerCreation(Class<?> target) {\n this.target = target;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return Array.newInstance(target, (Integer) argument[0]);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitVarInsn(Opcodes.ILOAD, 1);\n methodVisitor.visitTypeInsn(Opcodes.ANEWARRAY, Type.getInternalName(target));\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return 1;\n }\n }\n\n /**\n * A dispatcher that returns a fixed value.\n */\n enum ForDefaultValue implements Dispatcher {\n\n /**\n * A dispatcher for a {@code void} type.\n */\n VOID(null, Opcodes.NOP, Opcodes.RETURN, 0),\n\n /**\n * A dispatcher for a {@code boolean} type.\n */\n BOOLEAN(false, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code boolean} type that returns {@code true}.\n */\n BOOLEAN_REVERSE(true, Opcodes.ICONST_1, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code byte} type.\n */\n BYTE((byte) 0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code short} type.\n */\n SHORT((short) 0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code char} type.\n */\n CHARACTER((char) 0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for an {@code int} type.\n */\n INTEGER(0, Opcodes.ICONST_0, Opcodes.IRETURN, 1),\n\n /**\n * A dispatcher for a {@code long} type.\n */\n LONG(0L, Opcodes.LCONST_0, Opcodes.LRETURN, 2),\n\n /**\n * A dispatcher for a {@code float} type.\n */\n FLOAT(0f, Opcodes.FCONST_0, Opcodes.FRETURN, 1),\n\n /**\n * A dispatcher for a {@code double} type.\n */\n DOUBLE(0d, Opcodes.DCONST_0, Opcodes.DRETURN, 2),\n\n /**\n * A dispatcher for a reference type.\n */\n REFERENCE(null, Opcodes.ACONST_NULL, Opcodes.ARETURN, 1);\n\n /**\n * The default value.\n */\n @MaybeNull\n private final Object value;\n\n /**\n * The opcode to load the default value.\n */\n private final int load;\n\n /**\n * The opcode to return the default value.\n */\n private final int returned;\n\n /**\n * The operand stack size of default value.\n */\n private final int size;\n\n /**\n * Creates a new default value dispatcher.\n *\n * @param value The default value.\n * @param load The opcode to load the default value.\n * @param returned The opcode to return the default value.\n * @param size The operand stack size of default value.\n */\n ForDefaultValue(@MaybeNull Object value, int load, int returned, int size) {\n this.value = value;\n this.load = load;\n this.returned = returned;\n this.size = size;\n }\n\n /**\n * Resolves a fixed value for a given type.\n *\n * @param type The type to resolve.\n * @return An appropriate dispatcher.\n */\n protected static Dispatcher of(Class<?> type) {\n if (type == void.class) {\n return VOID;\n } else if (type == boolean.class) {\n return BOOLEAN;\n } else if (type == byte.class) {\n return BYTE;\n } else if (type == short.class) {\n return SHORT;\n } else if (type == char.class) {\n return CHARACTER;\n } else if (type == int.class) {\n return INTEGER;\n } else if (type == long.class) {\n return LONG;\n } else if (type == float.class) {\n return FLOAT;\n } else if (type == double.class) {\n return DOUBLE;\n } else if (type.isArray()) {\n if (type.getComponentType() == boolean.class) {\n return OfPrimitiveArray.BOOLEAN;\n } else if (type.getComponentType() == byte.class) {\n return OfPrimitiveArray.BYTE;\n } else if (type.getComponentType() == short.class) {\n return OfPrimitiveArray.SHORT;\n } else if (type.getComponentType() == char.class) {\n return OfPrimitiveArray.CHARACTER;\n } else if (type.getComponentType() == int.class) {\n return OfPrimitiveArray.INTEGER;\n } else if (type.getComponentType() == long.class) {\n return OfPrimitiveArray.LONG;\n } else if (type.getComponentType() == float.class) {\n return OfPrimitiveArray.FLOAT;\n } else if (type.getComponentType() == double.class) {\n return OfPrimitiveArray.DOUBLE;\n } else {\n return OfNonPrimitiveArray.of(type.getComponentType());\n }\n } else {\n return REFERENCE;\n }\n }\n\n /**\n * {@inheritDoc}\n */\n @MaybeNull\n public Object invoke(Object[] argument) {\n return value;\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n if (load != Opcodes.NOP) {\n methodVisitor.visitInsn(load);\n }\n methodVisitor.visitInsn(returned);\n return size;\n }\n\n /**\n * A dispatcher for returning a default value for a primitive array.\n */\n protected enum OfPrimitiveArray implements Dispatcher {\n\n /**\n * A dispatcher for a {@code boolean} array.\n */\n BOOLEAN(new boolean[0], Opcodes.T_BOOLEAN),\n\n /**\n * A dispatcher for a {@code byte} array.\n */\n BYTE(new byte[0], Opcodes.T_BYTE),\n\n /**\n * A dispatcher for a {@code short} array.\n */\n SHORT(new short[0], Opcodes.T_SHORT),\n\n /**\n * A dispatcher for a {@code char} array.\n */\n CHARACTER(new char[0], Opcodes.T_CHAR),\n\n /**\n * A dispatcher for a {@code int} array.\n */\n INTEGER(new int[0], Opcodes.T_INT),\n\n /**\n * A dispatcher for a {@code long} array.\n */\n LONG(new long[0], Opcodes.T_LONG),\n\n /**\n * A dispatcher for a {@code float} array.\n */\n FLOAT(new float[0], Opcodes.T_FLOAT),\n\n /**\n * A dispatcher for a {@code double} array.\n */\n DOUBLE(new double[0], Opcodes.T_DOUBLE);\n\n /**\n * The default value.\n */\n private final Object value;\n\n /**\n * The operand for creating an array of the represented type.\n */\n private final int operand;\n\n /**\n * Creates a new dispatcher for a primitive array.\n *\n * @param value The default value.\n * @param operand The operand for creating an array of the represented type.\n */\n OfPrimitiveArray(Object value, int operand) {\n this.value = value;\n this.operand = operand;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return value;\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitInsn(Opcodes.ICONST_0);\n methodVisitor.visitIntInsn(Opcodes.NEWARRAY, operand);\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return 1;\n }\n }\n\n /**\n * A dispatcher for a non-primitive array type.\n */\n @HashCodeAndEqualsPlugin.Enhance\n protected static class OfNonPrimitiveArray implements Dispatcher {\n\n /**\n * The default value.\n */\n @HashCodeAndEqualsPlugin.ValueHandling(HashCodeAndEqualsPlugin.ValueHandling.Sort.IGNORE)\n private final Object value;\n\n /**\n * The represented component type.\n */\n private final Class<?> componentType;\n\n /**\n * Creates a new dispatcher for the default value of a non-primitive array.\n *\n * @param value The default value.\n * @param componentType The represented component type.\n */\n protected OfNonPrimitiveArray(Object value, Class<?> componentType) {\n this.value = value;\n this.componentType = componentType;\n }\n\n /**\n * Creates a new dispatcher.\n *\n * @param componentType The represented component type.\n * @return A dispatcher for the supplied component type.\n */\n protected static Dispatcher of(Class<?> componentType) {\n return new OfNonPrimitiveArray(Array.newInstance(componentType, 0), componentType);\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) {\n return value;\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitInsn(Opcodes.ICONST_0);\n methodVisitor.visitTypeInsn(Opcodes.ANEWARRAY, Type.getInternalName(componentType));\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return 1;\n }\n }\n }\n\n /**\n * A dispatcher for invoking a constructor.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForConstructor implements Dispatcher {\n\n /**\n * The proxied constructor.\n */\n private final Constructor<?> constructor;\n\n /**\n * Creates a dispatcher for invoking a constructor.\n *\n * @param constructor The proxied constructor.\n */\n protected ForConstructor(Constructor<?> constructor) {\n this.constructor = constructor;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) throws Throwable {\n return INVOKER.newInstance(constructor, argument);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n Class<?>[] source = method.getParameterTypes(), target = constructor.getParameterTypes();\n methodVisitor.visitTypeInsn(Opcodes.NEW, Type.getInternalName(constructor.getDeclaringClass()));\n methodVisitor.visitInsn(Opcodes.DUP);\n int offset = 1;\n for (int index = 0; index < source.length; index++) {\n Type type = Type.getType(source[index]);\n methodVisitor.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);\n if (source[index] != target[index]) {\n methodVisitor.visitTypeInsn(Opcodes.CHECKCAST, Type.getInternalName(target[index]));\n }\n offset += type.getSize();\n }\n methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL,\n Type.getInternalName(constructor.getDeclaringClass()),\n MethodDescription.CONSTRUCTOR_INTERNAL_NAME,\n Type.getConstructorDescriptor(constructor),\n false);\n methodVisitor.visitInsn(Opcodes.ARETURN);\n return offset + 1;\n }\n }\n\n /**\n * A dispatcher for invoking a static proxied method.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForStaticMethod implements Dispatcher {\n\n /**\n * The proxied method.\n */\n private final Method method;\n\n /**\n * Creates a dispatcher for invoking a static method.\n *\n * @param method The proxied method.\n */\n protected ForStaticMethod(Method method) {\n this.method = method;\n }\n\n /**\n * {@inheritDoc}\n */\n @MaybeNull\n public Object invoke(Object[] argument) throws Throwable {\n return INVOKER.invoke(method, null, argument);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n Class<?>[] source = method.getParameterTypes(), target = this.method.getParameterTypes();\n int offset = 1;\n for (int index = 0; index < source.length; index++) {\n Type type = Type.getType(source[index]);\n methodVisitor.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);\n if (source[index] != target[index]) {\n methodVisitor.visitTypeInsn(Opcodes.CHECKCAST, Type.getInternalName(target[index]));\n }\n offset += type.getSize();\n }\n methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC,\n Type.getInternalName(this.method.getDeclaringClass()),\n this.method.getName(),\n Type.getMethodDescriptor(this.method),\n this.method.getDeclaringClass().isInterface());\n methodVisitor.visitInsn(Type.getReturnType(this.method).getOpcode(Opcodes.IRETURN));\n return Math.max(offset - 1, Type.getReturnType(this.method).getSize());\n }\n }\n\n /**\n * A dispatcher for invoking a non-static proxied method.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForNonStaticMethod implements Dispatcher {\n\n /**\n * Indicates a call without arguments.\n */\n private static final Object[] NO_ARGUMENTS = new Object[0];\n\n /**\n * The proxied method.\n */\n private final Method method;\n\n /**\n * Creates a dispatcher for invoking a non-static method.\n *\n * @param method The proxied method.\n */\n protected ForNonStaticMethod(Method method) {\n this.method = method;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) throws Throwable {\n Object[] reduced;\n if (argument.length == 1) {\n reduced = NO_ARGUMENTS;\n } else {\n reduced = new Object[argument.length - 1];\n System.arraycopy(argument, 1, reduced, 0, reduced.length);\n }\n return INVOKER.invoke(method, argument[0], reduced);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n Class<?>[] source = method.getParameterTypes(), target = this.method.getParameterTypes();\n int offset = 1;\n for (int index = 0; index < source.length; index++) {\n Type type = Type.getType(source[index]);\n methodVisitor.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);\n if (source[index] != (index == 0 ? this.method.getDeclaringClass() : target[index - 1])) {\n methodVisitor.visitTypeInsn(Opcodes.CHECKCAST, Type.getInternalName(index == 0\n ? this.method.getDeclaringClass()\n : target[index - 1]));\n }\n offset += type.getSize();\n }\n methodVisitor.visitMethodInsn(this.method.getDeclaringClass().isInterface() ? Opcodes.INVOKEINTERFACE : Opcodes.INVOKEVIRTUAL,\n Type.getInternalName(this.method.getDeclaringClass()),\n this.method.getName(),\n Type.getMethodDescriptor(this.method),\n this.method.getDeclaringClass().isInterface());\n methodVisitor.visitInsn(Type.getReturnType(this.method).getOpcode(Opcodes.IRETURN));\n return Math.max(offset - 1, Type.getReturnType(this.method).getSize());\n }\n }\n\n /**\n * A dispatcher for an unresolved method.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForUnresolvedMethod implements Dispatcher {\n\n /**\n * The message for describing the reason why the method could not be resolved.\n */\n private final String message;\n\n /**\n * Creates a dispatcher for an unresolved method.\n *\n * @param message The message for describing the reason why the method could not be resolved.\n */\n protected ForUnresolvedMethod(String message) {\n this.message = message;\n }\n\n /**\n * {@inheritDoc}\n */\n public Object invoke(Object[] argument) throws Throwable {\n throw new IllegalStateException(\"Could not invoke proxy: \" + message);\n }\n\n /**\n * {@inheritDoc}\n */\n public int apply(MethodVisitor methodVisitor, Method method) {\n methodVisitor.visitTypeInsn(Opcodes.NEW, Type.getInternalName(IllegalStateException.class));\n methodVisitor.visitInsn(Opcodes.DUP);\n methodVisitor.visitLdcInsn(message);\n methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL,\n Type.getInternalName(IllegalStateException.class),\n MethodDescription.CONSTRUCTOR_INTERNAL_NAME,\n Type.getMethodDescriptor(Type.VOID_TYPE, Type.getType(String.class)),\n false);\n methodVisitor.visitInsn(Opcodes.ATHROW);\n return 3;\n }\n }\n }",
"public HomePageActions() {\n\t\tPageFactory.initElements(driver,HomePageObjects.class);\n\t}",
"void startPage(RequestContextHolder request);",
"protected abstract DataPage getDataPage(PageId pageId);",
"String urlFor(Class<? extends Page> pageClazz, PageParameters params);",
"public interface OnChangePageButtonClick {\n void selectPage(int page);\n}",
"public interface INewsPresenter {\n void loadNews(int type,int startPage);\n}",
"public void invokePageHandler(WebPageDescriptor p_thePageDescriptor,\n HttpServletRequest p_theRequest, HttpServletResponse p_theResponse,\n ServletContext p_context)\n throws ServletException,\n IOException,\n EnvoyServletException\n {\n dispatchJSP(p_thePageDescriptor, p_theRequest, p_theResponse, p_context);\n super.invokePageHandler(p_thePageDescriptor, p_theRequest, \n p_theResponse, p_context);\n }",
"@Override\nprotected void doPage(Frame frame,Circuit circuit, IPlug plug, PageContext ctx) {\n\t\n}",
"public interface OnLoadNextPageListener {\n\n void loadNextPage(int age);\n}",
"public BasePageObject() {\n this.driver = BrowserManager.getInstance().getDriver();\n this.wait = BrowserManager.getInstance().getWait();\n PageFactory.initElements(driver, this);\n }",
"public interface FacebookLinkHandler{\n public void openFacebookPage(String facebookAppURI, String facebookWebURL);\n public void openInstagramPage(String instagramAppURI, String instagramWebURL);\n}",
"@View(navigation = NavigationMode.REDIRECT, viewParams = ViewParameterMode.INCLUDE)\n@Folder(name = \"pages/\")\npublic interface WebRoot extends ViewConfig {\n\n\t@View\n\tclass index implements WebRoot { // br\n\t}\n\n\t@Folder(name = \"lazy\")\n\tinterface Lazy extends WebRoot {\n\t\t@View\n\t\t@ViewControllerRef(Testbean.class)\n\t\tclass audilazy implements Lazy { // br\n\t\t}\n\n\t\t@View\n\t\t@ViewControllerRef(Testbean2.class)\n\t\tclass bmwlazy implements Lazy { // br\n\t\t}\n\t}\n\n\n}",
"public interface RespondentService {\n\n Page<List<Respondent>> search(RespondentSearchCondition condition);\n void download(RespondentSearchCondition condition, OutputStream outputStream);\n}",
"@Service\npublic interface InstrumentAdapter {\n Page get(String url);\n void quit();\n String getPageSource();\n void fillLoginForm(Page page);\n void sendKeys(LoginForm form);\n}",
"public interface FocusablePageObjectFactory extends PageObjectFactory {\n /**\n * Sets focus on the page object window.\n *\n * @param pageObject the page object to set focus on its window\n * @param <T> the type of the page object\n * @return the page object given as an argument\n */\n @Nonnull\n <T> T focus(@Nonnull T pageObject);\n}",
"@Step(\"Waiting for page load\")\n public abstract PageBase load();",
"public interface NewsPresenter {\n\n void loadNews(int type, int page);\n\n}",
"public interface CreatePageMarker {\n}",
"public interface Handler {\n boolean supports(HttpServletRequest request);\n\n void handle(HttpServletRequest request, HttpServletResponse response);\n}",
"public interface CarResultsPage {\n\n String getDesignId();\n\n Boolean isDiscountNoteDisplayed();\n\n boolean isNoResultsMessageDisplayed();\n\n boolean isWhatIsHotRateModuleDisplayed();\n\n LegalNotesFragment getLegalNotesFragment();\n\n boolean isNearbyAirportModuleDisplayed();\n\n String getStartLocation();\n\n CarSolutionFragmentsList<CarSolutionFragment> getResult();\n\n boolean isIntentMediaElementsExisting();\n\n boolean isMeSoBannersDisplayed();\n}",
"private static MockPageManager createPageManager()\r\n {\r\n return new MockPageManager();\r\n }",
"public interface CrawlerService {\n\n void processUrl(String url) throws IOException;\n}",
"public interface PageChangedCallback {\n\n /**\n * 获取上一页的时候调用\n *\n * @return 获取结果\n */\n TurnStatus toPrevPage();\n\n /**\n * 获取下一页的时候调用\n *\n * @return 获取结果\n */\n TurnStatus toNextPage();\n}",
"public interface HTMLGetter {\n public Document get(String url) throws Exception;\n}",
"public interface IHomeView extends BaseIView {\n /**\n * 加载页面\n * @param status\n */\n void loadView(int status);\n}",
"lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPage();",
"public interface WebContentCallBack {\n\tvoid webContentCallBack(Site site, String content) throws Exception;\n}",
"public void invoke(HttpRequest request, HttpResponse response) throws IOException, ServletException {\n Processor servletProcessor = new ServletProcessor();\n Processor staticProcessor = new StaticResourceProcessor();\n Processor defaultProcessor = new DefaultProcessor();\n staticProcessor.setProcessor(defaultProcessor);\n servletProcessor.setProcessor(staticProcessor);\n servletProcessor.process(request, response);\n }",
"public interface Refreshable extends PageFactoryEventListenener {\n void invalidate();\n void refresh();\n void setParent(Refreshable refreshable);\n}",
"Page createPage();",
"public interface IBasePresent {\n\n void getInfoList(String ctl,int pageSize,String open);\n\n void getLoadMoreInfoList(String ctl,int pageSize,String open);\n\n}",
"public interface ICrawlControllerBuilder {\r\n\t/**\r\n\t * Builds a pages crawling controller given a set of parameters\r\n\t * @throws Exception \r\n\t */\r\n\tCrawlController build(CrawlParameters parameters) throws Exception;\r\n}",
"public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);",
"public ProcessPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t \n\n\t}",
"public interface HomePresenter {\n void loadData();\n void loadMore();\n void requestHomeTimeLine();\n void requestUserTimeLine();\n}",
"@Override\n\tpublic void process(Page page){\n\n\t CollectTemplate collectTemplate = templateService.getCollectTemplateById(templateId);\n\t String currentUrl=page.getUrl().toString();\n\t String nextUrlXpath=collectTemplate.getNextUrlXpath();\n \tString contentUrlXpath=collectTemplate.getContentUrlXpath();\n \tString listUrlRegex=collectTemplate.getListUrlRegex();\n \tString contentUrlRegex=collectTemplate.getContentUrlRegex();\n \tList<CollectTemplateField> fields=collectTemplate.getFields();\n \ttry {\n\t \t\t\n\t \tHtml currentHtml= page.getHtml();\n\n\t\t\t//判断是否是列表页\n\t if (currentUrl.matches(listUrlRegex)) {\n\n\t\t\t\t//处理列表页\n\t\t\t\tString nextPageUrl=\"\";\n\t\t\t\ttry{\n\t\t\t\t\tnextPageUrl=currentHtml.xpath(nextUrlXpath).toString();\n\t\t\t\t\tif (nextPageUrl==null||StringUtils.isEmpty(nextPageUrl)){\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e){\n\t\t\t\t\tXpath2Selector xpath2Selector = new Xpath2Selector(nextUrlXpath);\n\t\t\t\t\tnextPageUrl = xpath2Selector.select(page.getRawText());\n\n\t\t\t\t\tif (nextPageUrl!=null&&nextPageUrl.startsWith(\"/\")){\n\t\t\t\t\t\tnextPageUrl = \"http://\"+site.getDomain()+nextPageUrl;\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t \tif (StringUtils.isNotEmpty(nextPageUrl)) {\n\n\t \t\tRequest request=new Request();\n\t \t\trequest.setUrl(nextPageUrl);\n\t \t\trequest.setPriority(-1);\n\t \t\t\n\t \t\tpage.addTargetRequest(request);\n\n\t \t\tlogService.info(projectId,\"get the next page link \"+nextPageUrl+\" and add it to the queue\");\n\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get the next page link\");\n\n\t\t\t\t}\n\t \tList<String> detailPagesUrl;\n\t \ttry{\n\t\t\t\t\tdetailPagesUrl = currentHtml.xpath(contentUrlXpath).all();\n\n\t\t\t\t}catch (Exception e){\n\n\t\t\t\t\tXpath2Selector xpath2Selector2 = new Xpath2Selector(contentUrlXpath);\n\t\t\t\t\tdetailPagesUrl = xpath2Selector2.selectList(currentHtml.getDocument().text());\n\t\t\t\t}\n\n\n\n\t \tif (detailPagesUrl!=null&&detailPagesUrl.size()!=0) {\n\t\t\t\t\t//添加详情页\n\t\t\t\t\tpage.addTargetRequests(detailPagesUrl, 1);\n\n\t\t\t\t\tlogService.info(projectId,\"get \"+detailPagesUrl.size()+\" detail pages\");\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get detail page\");\n\n\t\t\t\t}\n\t\t\t}else if (StringUtils.isEmpty(contentUrlRegex)||currentUrl.matches(contentUrlRegex)) {\n\t \t//处理详情页\n\t\t\t\tcontentPageProcessService.setProjectId(projectId);\n\t\t\t\tcontentPageProcessService.progressContentPage(page,fields);\n\t\t\t}\n\t \t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t \n\t }",
"public interface Action {\n String execute(HttpServletRequest request);\n}"
] |
[
"0.7147283",
"0.6867538",
"0.68108356",
"0.64120525",
"0.6399308",
"0.63850605",
"0.63768435",
"0.63613063",
"0.63003486",
"0.62954485",
"0.6140332",
"0.61073196",
"0.607918",
"0.60749775",
"0.6061695",
"0.60195994",
"0.59987015",
"0.59941596",
"0.59853387",
"0.59658414",
"0.59115493",
"0.59068054",
"0.58756745",
"0.58722025",
"0.5861104",
"0.5843095",
"0.5833435",
"0.58308893",
"0.57940966",
"0.5785834",
"0.5783985",
"0.5773587",
"0.57502705",
"0.573663",
"0.57213986",
"0.5698316",
"0.5698014",
"0.5683858",
"0.5682573",
"0.56819093",
"0.5674441",
"0.5666279",
"0.5645604",
"0.5644743",
"0.56439143",
"0.5641271",
"0.56357896",
"0.5626615",
"0.5626068",
"0.56195855",
"0.56165147",
"0.56147015",
"0.56137156",
"0.5594764",
"0.5592778",
"0.5586439",
"0.5556529",
"0.55476576",
"0.5542909",
"0.55396855",
"0.55242854",
"0.55187446",
"0.54989845",
"0.54986334",
"0.5488244",
"0.5466466",
"0.5461435",
"0.5457084",
"0.5449738",
"0.5444685",
"0.5437629",
"0.543326",
"0.5428854",
"0.54164964",
"0.5408573",
"0.54032946",
"0.539837",
"0.5391645",
"0.53903687",
"0.53889537",
"0.53813225",
"0.5381151",
"0.5373352",
"0.53731537",
"0.5371691",
"0.5360692",
"0.53581035",
"0.5358057",
"0.53572965",
"0.5355903",
"0.5351798",
"0.5341181",
"0.5319825",
"0.5316469",
"0.5315677",
"0.5308526",
"0.53056407",
"0.530491",
"0.5294213",
"0.52903455"
] |
0.78094226
|
0
|
Remove all traces of having crawled a URL
|
public void undispatchURL(String url);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// Log.v(\"DLasync.cleanCollected\", \" from CollectedLinks, just cleaned: \" + thisURL);\n// Log.v(\".cleanCollected\", \" collected set is now:\" + collectedLinks.toString());\n }\n }\n\n }",
"private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }",
"void removeWebWideTrackingException(ExceptionInformation args);",
"@Override\n public boolean shouldVisit(Page referringPage, WebURL url) {\n String href = url.getURL().toLowerCase();\n LOGGER.trace(\"Determining if clear web crawler should visit: \" + href);\n return !FILTERS.matcher(href).matches() && url.getURL().toLowerCase().startsWith(\"https://www.reddit.com\");\n }",
"List<WebURL> Filter(List<WebURL> urls){\n return null;\n }",
"public void removeAllOfficialArtistWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALARTISTWEBPAGE);\r\n\t}",
"void unsetSites();",
"private void ExtractURLs(String line)\n {\n String matchedURL = \"\";\n Matcher urlMatcher = urlPattern.matcher(line);\n\n while (urlMatcher.find())\n {\n matchedURL = urlMatcher.group();\n\n if (!distinctURLs.containsKey(matchedURL))\n {\n distinctURLs.put(matchedURL,matchedURL);\n }\n }\n }",
"private String filterOutURLFromTweet(final Status status) {\n\t\tfinal String tweet = status.getText();\n\t\tfinal URLEntity[] urlEntities = status.getURLEntities();\n\t\tint startOfURL;\n\t\tint endOfURL;\n\t\tString truncatedTweet = \"\";\n\t\tif(urlEntities.length > 0)\n\t\t{\n\t\t\tfor(final URLEntity urlEntity: urlEntities){\n\t\t\t\tstartOfURL = urlEntity.getStart();\n\t\t\t\tendOfURL = urlEntity.getEnd();\n\t\t\t\ttruncatedTweet += tweet.substring(0, startOfURL) + tweet.substring(endOfURL);\n\t\t\t}\n\t\t\treturn truncatedTweet;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn tweet;\n\t\t}\n\n\t}",
"@Override\r\n public boolean shouldVisit(WebURL url) {\r\n String href = url.getURL().toLowerCase();\r\n return !FILTERS.matcher(href).matches() && href.startsWith(\"http://fksis.bsuir.by/\");\r\n// \"http://www.ics.uci.edu/\");\r\n }",
"public void removeAllOfficialFileWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALFILEWEBPAGE);\r\n\t}",
"void removeHadithUrl(Object oldHadithUrl);",
"private void urlUnset() {\n switch (status) {\n case SERVER_UP:\n logger.debug(\"Status changing from \" + status + \" to \"\n + Status.URL_UNSET);\n broadcastMessage(formatError(\"Dataserver does not have URL configured in chat server.\"));\n status = Status.URL_UNSET;\n default:\n logger.debug(\"UrlUnset: Status not changed from \" + status);\n // no action since we don't want to spam with error messages\n break;\n }\n }",
"private String fetchUrl() {\n\t\tString url;\n\t\tint depth;\n\t\tdo\n\t\t{\n\t\t\tLandingPage lp = this.pagesToVisit.remove(0);\n\t\t\turl = lp.getUrl();\n\t\t\tdepth = lp.getDepth();\n\t\t\t\n\t\t}while(this.pagesVisited.containsKey(url) || !(isvalidURL(url)));\n\t\tthis.pagesVisited.put(url,depth);\n\t\treturn url;\n\t}",
"public void clearBrowsingHistory()\n {\n\t this.browseHistory = null;\n }",
"protected synchronized void clearURLLoader() {\r\n currentLoader = null;\r\n }",
"private void clearLinks() {\n links_ = emptyProtobufList();\n }",
"public void clearVisited()\n {\n visited = false;\n }",
"void clearLinks();",
"public void removeAllOfficialAudioSourceWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALAUDIOSOURCEWEBPAGE);\r\n\t}",
"private static List<PwPair> removeDuplicateSiteUrls(List<PwPair> allPwPairs) {\n List<PwPair> filteredPwPairs = new ArrayList<>();\n Set<String> siteUrls = new HashSet<>();\n for (PwPair pwPair : allPwPairs) {\n String siteUrl = pwPair.getPwsResult().getSiteUrl();\n if (!siteUrls.contains(siteUrl)) {\n siteUrls.add(siteUrl);\n filteredPwPairs.add(pwPair);\n }\n }\n return filteredPwPairs;\n }",
"public static void traceOff() {\r\n\t\ttraceOn = false;\r\n\r\n\t}",
"public void crawl(String url) {\n Queue<String> queue = new LinkedList<>();\n queue.add(url);\n this.visited_urls.put(url, 1);\n Set<String> urls;\n\n while (!queue.isEmpty()) {\n String link = queue.remove();\n try {\n urls = WebCrawlerUtil.getLinks(link);\n } catch (IOException e) {\n logger.debug(\"unable to parse link \" + link);\n continue;\n }\n System.out.println(WebCrawlerUtil.formatOutput(link, urls));\n for (String neighbor : urls) {\n if (!this.visited_urls.containsKey(neighbor)) {\n this.visited_urls.put(neighbor, 1);\n queue.add(neighbor);\n }\n }\n }\n }",
"public void exitCollectWeb() {\n mActivity.mHolder.mWebLayout.setVisibility(View.GONE);\n isCollectWebPage = false;\n }",
"public void unsetUrlName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(URLNAME$12, 0);\r\n }\r\n }",
"public void checkRedirect(String url){\n if (url.contains(\"?attredirects=0\")){\n String new_url = url.replaceAll(\"\\\\battredirects=0\\\\b\", \"\");\n images.set(current_image, new_url);\n }\n }",
"@Override\n public boolean shouldVisit(Page referringPage, WebURL url) {\n\t String href = url.getURL();\n\t allUrlsObject.visitAllUrls(referringPage,url);\n\t // to keep track of all the urls extracted\n\t urlsExtracted++;\n\t uniqueUrlsExtracted.add(href);\n\t return href.startsWith(\"http://www.nytimes.com/\");\n}",
"public void removeAllLinks() {\n\t\tfor (int i=0; i<links.size(); i++){\n\t\t\tlinks.remove(i);\n\t\t}\n\t}",
"private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }",
"public void crawl(String url);",
"public static void main(String[] args) throws IOException {\n Deque<String> urlsToVisit = new ArrayDeque<String>();\n // Keep track of which URLs we have visited, so we don't get ourselves stuck in a loop.\n List<String> visitedUrls = new ArrayList<String>();\n // Keep track of how we got to each page, so that we can find our trace back to the BEGIN_URL.\n Hashtable<String, String> referrers = new Hashtable<String, String>();\n boolean pathFound = false;\n\n // Begin with the BEGIN_URL\n urlsToVisit.push(BEGIN_URL);\n\n while(!urlsToVisit.isEmpty() && !pathFound) {\n String currentUrl = urlsToVisit.pop();\n visitedUrls.add(currentUrl);\n\n Elements paragraphs = wf.fetchWikipedia(BASE_URL + currentUrl);\n List<String> pageUrls = new ArrayList<String>();\n\n for (Element p : paragraphs) {\n pageUrls.addAll(getLinksFromParagraph(p));\n }\n\n // Reverse the order of all page urls so that when we're done pushing all the URLS\n // to the stack, the first URL in the page will be the first URL in the current page.\n Collections.reverse(pageUrls);\n\n // Add all the URLs to the list of URLs to visit.\n for (String newUrl : pageUrls) {\n if(!visitedUrls.contains(newUrl)) {\n urlsToVisit.push(newUrl);\n // Record how we ended up at newUrl.\n referrers.put(newUrl, currentUrl);\n\n // Check if one of the links in this page is the END_URL; which means we'll be done!\n if (newUrl.equals(END_URL)) {\n pathFound = true;\n }\n }\n }\n }\n\n if (pathFound) {\n System.out.println(\"=================\");\n System.out.println(\"Path found!\");\n System.out.println(\"=================\");\n\n // Back trace how we ended up at END_URL.\n String backtraceUrl = END_URL;\n System.out.println(backtraceUrl);\n while(backtraceUrl != BEGIN_URL) {\n String referrerUrl = referrers.get(backtraceUrl);\n System.out.println(referrerUrl);\n backtraceUrl = referrerUrl;\n }\n } else {\n System.out.println(\"=================\");\n System.out.println(\"No path found :(\");\n System.out.println(\"=================\");\n }\n }",
"public Object[] chechEarlyLink(String url) {\n\t\tString mostRecentHTML = \"\";\n\t\tboolean success;\n\t\tprocessor.printSys(\"Original URL of Early Link: \" + url);\n\t\ttry {\n\t\t\tHttpURLConnection con = settings.isUsingProxy() ? (HttpURLConnection)(new URL(url).openConnection(proxyBuilder.getProxy())) : (HttpURLConnection)(new URL(url).openConnection());\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setConnectTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.connect();\n\t\t\tString location = con.getHeaderField(\"Location\");\n\t\t\tprocessor.printSys(\"Response Code: \" + con.getResponseCode() + \", Early Link Redirected to: \" + location);\n\t\t\tmostRecentHTML = connectionToString(con);\n\t\t\tsuccess = location == null; //if the redirect location was null, this worked\n\t\t} catch (MalformedURLException e) {\n\t\t\tsuccess = false;\n\t\t} catch (IOException e) {\n\t\t\tsuccess = false;\n\t\t}\n\n\t\treturn new Object[]{success, mostRecentHTML};\n\t}",
"public static void invertedIndex(String URL){\n //if the url set already contains this url, it means this url has already been processed, so return\n if(urlSet.contains(URL)){\n return;\n }\n else{\n //first add this unprocessed url to url list\n urlSet.add(URL);\n try{\n //connect this url and get its content\n URL url = new URL(URL);\n URLConnection urlCon = url.openConnection();\n BufferedReader in = new BufferedReader(new InputStreamReader(urlCon.getInputStream()));\n String urlString = \"\";\n String current;\n while((current = in.readLine()) != null)\n {\n urlString += current;\n }\n\n //by filtering the link label to get all the links in this page\n String[] urlList = urlString.split(\"<a href=\\\"\");\n\n //define regex expression to filter script label\n String scriptFilter=\"<script[^>]*?>[\\\\s\\\\S]*?<\\\\/script>\";\n\n //define regex expression to filter style label\n String styleFilter=\"<style[^>]*?>[\\\\s\\\\S]*?<\\\\/style>\";\n\n //define regex expression to filter html label\n String htmlFilter=\"<[^>]+>\";\n\n //filter all the useless labels\n Pattern scriptP=Pattern.compile(scriptFilter,Pattern.CASE_INSENSITIVE);\n Matcher scriptM=scriptP.matcher(urlString);\n urlString=scriptM.replaceAll(\"\");\n\n Pattern styleP=Pattern.compile(styleFilter,Pattern.CASE_INSENSITIVE);\n Matcher styleM=styleP.matcher(urlString);\n urlString=styleM.replaceAll(\"\");\n\n Pattern htmlP=Pattern.compile(htmlFilter,Pattern.CASE_INSENSITIVE);\n Matcher htmlM=htmlP.matcher(urlString);\n urlString=htmlM.replaceAll(\"\");\n\n //transfer content to a word array\n String[] words = urlString.split(\" \");\n for(int i = 0; i < words.length; i++){\n //System.out.println(words[i]);\n //if the hashmap doesn't contain this word, so put this word and its url pair into the hashmap\n if(!index.containsKey(words[i])){\n HashSet<String> str = new HashSet<String>();\n str.add(URL);\n index.put(words[i],str);\n }\n //if the hashmap already contains this word, update its record\n else{\n HashSet<String> str = index.get(words[i]);\n str.add(URL);\n index.put(words[i],str);\n }\n }\n //System.out.println(urlString);\n\n for(int i = 1; i < urlList.length;i++){\n //get each url in this page and transfer it to valid url, after that process each url\n int endpos = urlList[i].indexOf(\"\\\"\");\n String Url = getValidUrl(urlList[i].substring(0, endpos));\n //System.out.println(Url);\n if(Url != null){\n invertedIndex(Url);\n }\n }\n }catch(Exception e){\n System.out.println(\"can't process url : \" + URL);\n }\n }\n }",
"public void resetVisited() {\n\t\tthis.visited = new HashSet<Point>();\n\t}",
"public void cancelLoadUrl() {\n\t\t\n\t}",
"public void disableCurlLogging() {\n curlConfiguration = null;\n }",
"private Set<String> extracLinks(String url, LinkFilter filter) {\n\n\t\tSet<String> links = new HashSet<String>();\n\t\ttry {\n\t\t\tParser parser = new Parser(url);\n\t\t\tparser.setEncoding(\"UTF-8\");\n\t\t\t// linkFilter filter <a> tag\n\t\t\tNodeClassFilter linkFilter = new NodeClassFilter(LinkTag.class);\n\t\t\t// get all filtered links\n\t\t\tNodeList list = parser.extractAllNodesThatMatch(linkFilter);\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tNode tag = list.elementAt(i);\n\t\t\t\tif (tag instanceof LinkTag)// <a> tag\n\t\t\t\t{\n\t\t\t\t\tLinkTag link = (LinkTag) tag;\n\t\t\t\t\tString linkUrl = link.getLink();// url\n\t\t\t\t\tif (filter.accept(linkUrl)) {\n\t\t\t\t\t\t// change bbsdoc to bbstdoc\n\t\t\t\t\t\tString stlink = linkUrl.replace(\"bbsdoc\", \"bbstdoc\");\n\t\t\t\t\t\tlinks.add(stlink);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParserException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn links;\n\t}",
"private static void stripUnlikelyCandidates(Document doc) {\n if (true) {\n return; // Temporarily disabled; see comment above.\n }\n\n for (Element child : doc.select(\"body\").select(\"*\")) {\n String className = child.className().toLowerCase();\n String id = child.id().toLowerCase();\n if (ExtractionHelpers.NEGATIVE_CSS_CLASSES_AND_IDS.matcher(className).find() || ExtractionHelpers.NEGATIVE_CSS_CLASSES_AND_IDS.matcher(id).find()) {\n Log.printAndRemove(child, \"stripUnlikelyCandidates\");\n }\n }\n }",
"public static void fixTextView(TextView tv) {\n SpannableString current = (SpannableString) tv.getText();\n URLSpan[] spans =\n current.getSpans(0, current.length(), URLSpan.class);\n\n for (URLSpan span : spans) {\n int start = current.getSpanStart(span);\n int end = current.getSpanEnd(span);\n\n current.removeSpan(span);\n current.setSpan(new DefensiveURLSpan(span.getURL()), start, end,\n 0);\n }\n }",
"public sparqles.avro.discovery.DGETInfo.Builder clearURL() {\n URL = null;\n fieldSetFlags()[2] = false;\n return this;\n }",
"private static void stripTrivialCycles(CFG cfg) {\n\t\tCollection<SDGEdge> toRemove = new LinkedList<SDGEdge>();\n\t\tfor (SDGEdge e : cfg.edgeSet()) {\n\t\t\tif (e.getSource().equals(e.getTarget())) {\n\t\t\t\ttoRemove.add(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcfg.removeAllEdges(toRemove);\n\t}",
"public void clearLinkRemovalTags() {\n\tfor (Link l : allLinks)\n\t l.clearRemovalTag();\n }",
"private Set<String> findNewUrls(Document doc) {\n Set<String> newUrlSet = new HashSet<>();\n\n for (Element ah : doc.select(\"a[href]\")) {\n String href = ah.attr(\"abs:href\");\n\n if (!urlSet.contains(href) // Check if this is a new URL\n && href.contains(domain) // Check if the URL is from the same domain\n && isValidExtension(href) // Check that the file extension is not in the list of excluded extensions\n && !href.contains(\"mailto:\") // Check that the href is not an email address\n ) {\n newUrlSet.add(href);\n }\n\n }\n\n processNewUrls(newUrlSet);\n return newUrlSet;\n }",
"@Override\n\tpublic Collection<URL> getUrlsToFilter() {\n\t\tSet<URL> filterSet = new HashSet<URL>();\n\t\tString url=\"http://www.infoq.com/news/2012/11/Panel-WinRT-Answers;jsessionid=91AB81A159E85692E6F1199644E2053C \";\n\t\tfilterSet.add(URL.valueOf(url));\n\t\treturn filterSet;\n\t}",
"public void crawlAndIndex(String url) throws Exception {\r\n\t\t// TODO : Add code here\r\n\t\tQueue<String> queue=new LinkedList<>();\r\n\t\tqueue.add(url);\r\n\t\twhile (!queue.isEmpty()){\r\n\t\t\tString currentUrl=queue.poll();\r\n\t\t\tif(internet.getVisited(currentUrl)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tArrayList<String> urls = parser.getLinks(currentUrl);\r\n\t\t\tArrayList<String> contents = parser.getContent(currentUrl);\r\n\t\t\tupdateWordIndex(contents,currentUrl);\r\n\t\t\tinternet.addVertex(currentUrl);\r\n\t\t\tinternet.setVisited(currentUrl,true);\r\n\t\t\tfor(String u:urls){\r\n\t\t\t\tinternet.addVertex(u);\r\n\t\t\t\tinternet.addEdge(currentUrl,u);\r\n\t\t\t\tqueue.add(u);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private String cleanupText(String text){\n return text.replaceAll(\"http[s]*[:](//)[^ ]+\", \"URL\");\n }",
"private String removeAllLinks(String commentstr)\n {\n String urlPattern = \"((https?|ftp|gopher|telnet|file|Unsure|http):((//)|(\\\\\\\\))+[\\\\w\\\\d:#@%/;$()~_?\\\\+-=\\\\\\\\\\\\.&]*)\";\n Pattern p = Pattern.compile(urlPattern,Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(commentstr);\n int i = 0;\n while (m.find()) {\n commentstr = commentstr.replaceAll(m.group(i),\"\").trim();\n i++;\n }\n return commentstr;\n }",
"private void removeAllCallbacksWithURL(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"removeAllCallbacksWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n Firebase myChildRef = new Firebase(strURL);\n//myChildRef.removeEventListener(listener);\n//myChildRef.removeEventListener(listener);//.removeEventListener(myChildRef.);\n PluginResult pluginResult = new PluginResult(Status.OK);\n mCallbackContext.sendPluginResult(pluginResult);\n }",
"public boolean remove(URL url) {\n return super.remove(normalize(url));\n }",
"public HashSet<String> findTheUrlsBasicCrawler( URL url, Integer depth ) {\n\t\tcrawlerBasic.getLinks().clear();\n\t\t\n\t\tcrawlerBasic.setDesiredDepth(depth);\n\t\t\n\t\t//Use the methods to crawl through the site searching for links\n\t\tcrawlerBasic.getPageLinks(url.toString(), 1);\n\t\t\n\t\treturn crawlerBasic.getLinks();\n\t\t\n\t}",
"public static void removeHighlightsAllFrames(WebContents webContents) {\n List<RenderFrameHost> renderFrameHosts =\n webContents.getMainFrame().getAllRenderFrameHosts();\n\n for (RenderFrameHost renderFrameHost : renderFrameHosts) {\n TextFragmentReceiver producer =\n renderFrameHost.getInterfaceToRendererFrame(TextFragmentReceiver.MANAGER);\n producer.removeFragments();\n }\n }",
"public int tryRemoveURLs(String urlHash) {\r\n // this tries to delete an index from the cache that has this\r\n // urlHash assigned. This can only work if the entry is really fresh\r\n // and can be found in the RAM cache\r\n // this returns the number of deletion that had been possible\r\n return dhtInCache.tryRemoveURLs(urlHash) | dhtOutCache.tryRemoveURLs(urlHash);\r\n }",
"public void clearCallLogs();",
"private void clearDownloadListStatus() {\r\n /* reset ip waittimes only for local ips */\r\n ProxyController.getInstance().removeIPBlockTimeout(null, true);\r\n /* reset temp unavailble times for all ips */\r\n ProxyController.getInstance().removeHostBlockedTimeout(null, false);\r\n for (final DownloadLink link : DownloadController.getInstance().getAllDownloadLinks()) {\r\n /*\r\n * do not reset if link is offline, finished , already exist or pluginerror (because only plugin updates can fix this)\r\n */\r\n link.getLinkStatus().resetStatus(LinkStatus.ERROR_FATAL | LinkStatus.ERROR_PLUGIN_DEFECT | LinkStatus.ERROR_ALREADYEXISTS, LinkStatus.ERROR_FILE_NOT_FOUND, LinkStatus.FINISHED);\r\n }\r\n }",
"private void clearVisited(){\r\n\t\tfor(int i=0; i<graphSize; i++){\r\n\t\t\tmyGraph[i].visited = false;\r\n\t\t\tAdjVertex vert = myGraph[i].adjVertexHead;\r\n\t\t\twhile(vert != null){\r\n\t\t\t\tvert.visited = false;\r\n\t\t\t\tvert= vert.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static boolean isUnknownSource(String url) {\n return false;\n }",
"public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }",
"String checkAndTrimUrl(String url);",
"@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability = new Readability(getDoc(url)); // URL\n readability.init();\n String cleanHtml = readability.outerHtml();\n System.out.println(cleanHtml);\n }",
"public NameValue<String, String> removeSourceURL() {\n return removeURL(mSourceMap);\n }",
"private String stripURL( String inputLine )\n\t{\n\t\tint fromIndex = inputLine.indexOf( \"<img \" ) + \"<img \".length();\n\t\tint beginIndex = inputLine.indexOf( \"src=\\\"\", fromIndex ) + \"src=\\\"\".length();\n\t\tint endIndex = inputLine.indexOf( \"\\\"\", beginIndex );\n\t\treturn inputLine.substring( beginIndex, endIndex );\n\t}",
"private static String removeQuery(String url) {\n if (url == null) {\n return null;\n }\n int query = url.indexOf('?');\n String noQuery = url;\n if (query != -1) {\n noQuery = url.substring(0, query);\n }\n return noQuery;\n }",
"public ApiResponse setExcludeFromSpider(String url) {\n try {\n return api.spider.excludeFromScan(Pattern.quote(Pattern.compile(url).pattern()) + \".*\");\n } catch (Exception e) {\n LogManager.suitLogger.error(\"Failed to add regex to exclude from spider scan !\", e);\n }\n return null;\n }",
"public URLSpout() {\n \tURLSpout.activeThreads = new AtomicInteger();\n \tlog.debug(\"Starting URL spout\");\n \t\n \ttry { \t\t\n\t\t\treader = new BufferedReader(new FileReader(\"URLDisk.txt\"));\n\t\t\tint num_lines = XPathCrawler.getInstance().getFileCount().get();\n\t\t\tfor (int i = 0; i < num_lines; i++) {\n\t\t\t\treader.readLine(); //set reader to latest line\n\t\t\t}\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public static String removeProtocal(String url) {\n String u = url;\n int in = u.indexOf(\"://\");\n if (in > 0) { \n u = u.substring(in + 3);\n }\n return u;\n }",
"void removeSWFURL(String toRemove);",
"public synchronized void cleanUpLogCache(int clearance){\n \tif(logs.size() + clearance >= logSize && logs.size() >= TEXT_HEIGHT)\n \t\t((VisibleArrayList<?>)logs).removeRange(1, logs.size() - (logs.size()-TEXT_HEIGHT));\n }",
"public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\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\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException 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\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}",
"public static String removeFilterFromUrlIfPresent(String url) {\r\n\t\t\r\n\t\tString afterLastSlash = url.substring(url.lastIndexOf(\"/\") + 1);\r\n\t\t\r\n\t\tif (afterLastSlash.contains(\"filter\"))\r\n\t\t\turl = url.substring(0, url.lastIndexOf(\"/\"));\r\n\t\r\n\t\treturn url;\r\n\t}",
"public boolean deferCrawl(String site) { return false; }",
"ObservableList<Link> getUnfilteredLinkList();",
"public void removeEntry(final String url){\n if(url==null){\n return;\n }\n\n synchronized (mBitmapCache) {\n mBitmapCache.remove(url);\n }\n }",
"public void removeAllHighlights() {}",
"public String cleanURL(String url) {\n\t\treturn this.removeQueryString(this.removeExtension(url));\n\t}",
"private void removeOrphanClasspaths() {\n Set<String> allRecordedRemotePaths = new HashSet<String>(localPathTranslation.keySet());\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n allRecordedRemotePaths.remove(remotePath);\n }\n localPathTranslation.keySet().removeAll(allRecordedRemotePaths);\n\n // Now add new translations\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n if (!localPathTranslation.containsKey(remotePath)) {\n localPathTranslation.put(remotePath, UNDEFINED);\n }\n }\n }",
"@Override\n public WebResourceResponse shouldInterceptRequest(WebView view, String url) {\n if (url.contains(\"dc.services.visualstudio.com/\") || url.endsWith(\".png\") ||\n url.endsWith(\".ico\") || url.endsWith(\".css\")){\n Log.v(\"shouldInterceptRequest\", \" intercepted a request to: \" + url);\n return null;\n }\n return super.shouldInterceptRequest(view, url);\n }",
"@Test(priority = 1)\n public void printBrokenLinks() {\n\t HttpURLConnection httpCon;\n\t /*\n\t * filter all the anchor tags whose href attribute is empty/broken/third party domain link and are commented.\n\t */\n\t List<WebElement> anchorElem = driver.findElements(By.tagName(\"a\")).stream().filter(elem->elem.getAttribute(\"href\")!=null || elem.getAttribute(\"href\").startsWith(\"javaScript:void(0)\")).\n\t\t\t filter(elem-> !elem.getAttribute(\"href\").isBlank() ||\n\t\t\t !elem.getAttribute(\"href\").isEmpty() ||\n\t\t\t !elem.getAttribute(\"href\").startsWith(baseUrl)).collect(Collectors.toList());\n\t for (WebElement anchor : anchorElem) {\n\t\tString url = anchor.getAttribute(\"href\");\n\t\t/*Get the http connection. connect to link and get response code\n\t\t * Use HEAD request method. GET can be used. But, we need only response code.\n\t\t * \n\t\t */\n\t\ttry {\n\t\t\tSystem.out.println(url);\n\t\t\thttpCon = (HttpURLConnection) new URL(url).openConnection();\n\t\t\thttpCon.setRequestMethod(\"HEAD\");\n\t\t\thttpCon.connect();\n\t\t\tint respCode = httpCon.getResponseCode();\n\t\t\tif(respCode >= 400) {\n\t\t\t\tSystem.out.println(url+\" is a broken link.\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}finally {\n\t\t\t\n\t\t}\n\t}\n\t\t\t\t\t\n\t\t\t \n\t \n }",
"public void unsetUrlValue()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(URLVALUE$2);\r\n }\r\n }",
"private void setAtomsToUnVisited(IMolecule molecule) {\n\t\tfor (int i = 0; i < molecule.getAtomCount(); i++) {\n\t\t\tmolecule.getAtom(i).setFlag(CDKConstants.VISITED, false);\n\t\t}\n\t}",
"protected boolean isTraced(HttpServletRequest httpServletRequest) {\n if (skipPattern != null) {\n int contextLength =\n httpServletRequest.getContextPath() == null\n ? 0\n : httpServletRequest.getContextPath().length();\n String url = httpServletRequest.getRequestURI().substring(contextLength);\n return !skipPattern.matcher(url).matches();\n }\n\n return true;\n }",
"private void hitURL(String URL){\n Log.v(\".hitURL\", \" now crawling at: \" + URL);\n String refinedURL = NetworkUtils.makeURL(URL).toString();\n visitedLinks.add(refinedURL);\n browser.loadUrl(refinedURL);\n\n\n // OR, you can also load from an HTML string:\n// String summary = \"<html><body>You scored <b>192</b> points.</body></html>\";\n// webview.loadData(summary, \"text/html\", null);\n // ... although note that there are restrictions on what this HTML can do.\n // See the JavaDocs for loadData() and loadDataWithBaseURL() for more info.\n }",
"private static Set<String> scrapeHTML(String html) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tint skipLength = 0;\n\t\tint counter = 0;\n\t\t// the subtraction of 15 is because of the number of characters in \n\t\t// \"<a href=\\\"/wiki/\", to avoid a index out of bounds error\n\t\tfor(int i = 0; i < html.length()-15; i++) {\n\t\t\tif(html.substring(i, i+15).equals(\"<a href=\\\"/wiki/\")) {\n\t\t\t\t// if format matches starts to check the following characters\n\t\t\t\t// to check if it does not contain a : or a #\n\t\t\t\tchar ch = html.charAt(i+15);\n\t\t\t\tString str = \"\";\n\t\t\t\tint count = 0;\n\t\t\t\twhile(html.charAt(i+count+15) != '\"'){\n\t\t\t\t\tif(html.charAt(i+count+15) == ':' || html.charAt(i+count+15) == '#') {\n\t\t\t\t\t\tstr = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tch = html.charAt(count+i+15);\n\t\t\t\t\tstr += ch;\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t// adds if the page name is not empty\n\t\t\t\tif(str != \"\")\n\t\t\t\tset.add(str);\n\t\t\t\tskipLength = str.length();\n\t\t\t\tcount = 0;\n\t\t}\n\t\t\ti += skipLength;\n\t\t\tskipLength = 0;\n\t\t\tcounter++;\n\t\n\t}\n\treturn set;\n}",
"public void clearLoci() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"public void removeAllCommercialInformationURL() {\r\n\t\tBase.removeAll(this.model, this.getResource(), COMMERCIALINFORMATIONURL);\r\n\t}",
"private void killWebJunk()\n\t{\n\t\tLogger.i(\"Killing all webview cache.\");\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)\n\t\t{\n\t\t\tCookieManager.getInstance().removeAllCookies(null);\n\t\t\tCookieManager.getInstance().removeSessionCookies(null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCookieSyncManager.createInstance(Application.provider().context());\n\t\t\tCookieManager.getInstance().removeAllCookie();\n\t\t\tCookieManager.getInstance().removeSessionCookie();\n\t\t}\n\n\t\tApplication.provider().context().deleteDatabase(\"webview.db\");\n\t\tApplication.provider().context().deleteDatabase(\"webviewCookiesChromium.db.db\");\n\t}",
"public void clear() {\n\t\tvisited = false;\n\t}",
"private void updateStack(String url)\r\n\t{\r\n\t\tStack temp = new Stack(SIZE);\r\n\t\tObject temp2 = ' ';\r\n\t\tint count = 0;\t\t\t\t\t\t\t//keeps track of how many elements are pushed into temp\r\n\t\t\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t{\r\n\t\t\tif (!url.equals(chronological.peek()))\r\n\t\t\t{\r\n\t\t\t\ttemp.push(chronological.pop());\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttemp2 = chronological.pop();\r\n\t\t\t\tbreak;\t\t\t\t\t\t//break out of the loop\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < count; i++)\t\t//move the elements in temp back into the stack\r\n\t\t\tchronological.push(temp.pop());\r\n\t\tchronological.push(temp2);\r\n\t}",
"private void clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000001);\n url_ = getDefaultInstance().getUrl();\n }",
"static List<WebURL> ExtractUrl(Page page){\n // TODO: reference to parser to extractor urls from the web content\n return null;\n }",
"private void removeRecurrentResponses(Map<BbRef, BallotResponse> ballots) {\n ballots.entrySet().stream()\n .collect(groupingBy(e -> e.getValue().response.getKey(), // Group by resp key\n mapping(e -> e, toCollection(() -> new TreeSet<>(this::compare)))))\n .values().stream().filter(e -> e.size() > 1) // Having only colliding entries\n .flatMap(es -> es.stream().skip(1)) // Skip the first in sorted set as earliest\n .forEach(e -> { // Process the others as the recurring ones\n helper.report(e.getKey(), Result.REG_RESP_NOT_UNIQUE);\n ballots.remove(e.getKey());\n });\n }",
"@Override\r\n\tpublic void unvisit() {\n\r\n\t}",
"public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }",
"public void clearLocusLocus() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"void removeHadithBookUrl(Object oldHadithBookUrl);",
"private void clearUrl() {\n bitField0_ = (bitField0_ & ~0x00000002);\n url_ = getDefaultInstance().getUrl();\n }",
"private static void cleanTunnelCache(RouterContext ctx, Map<HashPair, TunnelInfo> tc) {\n for (Iterator<Map.Entry<HashPair, TunnelInfo>> iter = tc.entrySet().iterator(); iter.hasNext(); ) {\n Map.Entry<HashPair, TunnelInfo> entry = iter.next();\n HashPair k = entry.getKey();\n TunnelInfo tunnel = entry.getValue();\n // This is a little sneaky, but get the _from back out of the \"opaque\" hash key\n if (!ctx.tunnelManager().isValidTunnel(k.sh, tunnel))\n iter.remove();\n }\n }",
"void removeAddressHistory(int i);",
"public void clearLociLocus() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"public void unsetObservedLobeAnalysis() {\n this.observedLobeAnalysis = null;\n }",
"public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}"
] |
[
"0.6735716",
"0.5579229",
"0.54485905",
"0.53842217",
"0.5368928",
"0.5365341",
"0.53517926",
"0.53211856",
"0.5315881",
"0.52046657",
"0.5182496",
"0.51755804",
"0.5158638",
"0.5157234",
"0.51491725",
"0.513548",
"0.510864",
"0.510442",
"0.5087401",
"0.5083034",
"0.5082786",
"0.50603133",
"0.50600994",
"0.5049625",
"0.50467396",
"0.50114286",
"0.50071883",
"0.4981158",
"0.4973996",
"0.4956794",
"0.49515125",
"0.494966",
"0.49402133",
"0.49401963",
"0.49270168",
"0.49240744",
"0.49238238",
"0.49124175",
"0.48949522",
"0.48902115",
"0.48811033",
"0.48777437",
"0.48743036",
"0.48709038",
"0.48485368",
"0.4840012",
"0.4825028",
"0.48065597",
"0.47945493",
"0.47861668",
"0.47777182",
"0.4761998",
"0.47609174",
"0.4750709",
"0.47500628",
"0.4747866",
"0.47397542",
"0.47394612",
"0.47379756",
"0.47376555",
"0.4729998",
"0.47173798",
"0.4716341",
"0.47097534",
"0.47092175",
"0.4709159",
"0.47086158",
"0.47033438",
"0.47017556",
"0.4697681",
"0.469747",
"0.46912804",
"0.46902382",
"0.46868718",
"0.46719143",
"0.46708786",
"0.46684673",
"0.46645364",
"0.46625024",
"0.46602765",
"0.46591148",
"0.46556446",
"0.46455795",
"0.46376672",
"0.46331948",
"0.4625865",
"0.4617039",
"0.4615477",
"0.4613071",
"0.46108577",
"0.46097976",
"0.46082744",
"0.46059167",
"0.46041754",
"0.4602373",
"0.4601911",
"0.4598023",
"0.45949182",
"0.45920148",
"0.45912534"
] |
0.5198253
|
10
|
Notify the dispatcher that a page has been parsed
|
public void notifyPage(Webpage page, Weblink link);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface PageDispatcher {\n\t/**\n\t * Process a webpage\n\t * @param url The URL to process\n\t * @param link The link that was followed to get there\n\t */\n\tpublic void dispatch(URL url, Weblink link, long delay);\n\t\n\t/**\n\t * Register a redirect\n\t * @param oldURL The URL that was redirected\n\t * @param newURL The URL it was redirected to\n\t * @param delay The number of milliseconds to wait before loading the page\n\t */\n\tpublic void registerRedirect(String oldURL, String newURL);\n\t\n\t/**\n\t * Remove all traces of having crawled a URL\n\t * @param url the URL to remove\n\t */\n\tpublic void undispatchURL(String url);\n\t\n\t/**\n\t * Notify the dispatcher that a page has been parsed\n\t * @param page The final version of the page\n\t * @param link The link that was followed to reach the page\n\t */\n\tpublic void notifyPage(Webpage page, Weblink link);\n\t\n\t/**\n\t * Send a command to the Builders\n\t * @param cmd The Command to send\n\t */\n\tpublic void sendCommand(Command cmd);\n}",
"@Override\n public void onPourSoupRaised() {\n }",
"public void thePageIsLoaded() {\r\n this.page.isLoaded();\r\n }",
"@Override\n public void run() {\n mHunterSeeker.onFinishPage(emailsOnPage, lastHtmlResult);\n onSendUpdate(\"RegexUtils.purify returned \" + emailsOnPage.size() + \" items\");\n }",
"@Override\n\tprotected void load() {\n\t\tisPageLoaded = true;\n\t}",
"public void run() {\n\t\t\t\t\t\tif (__delayCounter == _delayCounter[0]) {\r\n\t\t\t\t\t\t\t_pageBook.showPage(__page);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public void run() {\n getPage(page + 1, false);\n }",
"public interface iOnParse {\n\tvoid onParse(String htmlEle);\n}",
"@Override\n\tpublic void process(Page page) {\n\t\t\n\t}",
"public void process(Page page) {\n\t\t\t\tgetContent(page);\n\t\t\t}",
"public void notifySavedStructuresPageLoaded(StructuresPage page) {\n if(LoadStructureGui.instance != null) {\n LoadStructureGui.instance.onPageLoaded(page);\n }\n }",
"@Override\n public void PageFistLoad() {\n }",
"public abstract void pageDisplayed();",
"private void firePageChangedEvent() {\r\n\t\tfor (PaginatorListener listener : listeners) {\r\n\t\t\tlistener.pageChanged(new PageChangedEvent(this, page, getStartIndex(), getTotalPages(), pageSize));\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void visit(Page page) {\r\n\t\t// Some business logic I won't expose here\r\n\t\t// My boss won't be happy ;-)\r\n\t}",
"private void gotoCompletePage() {\n WebkitUtil.forward(mWebView, AFTER_PRINT_PAGE);\n }",
"@Override\r\n\tpublic void run()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\t//System.out.println(\"beginning of Parser code\");\r\n\t\t\t\r\n\t\t\t//pull a page from the page que\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tpageText = SharedPage.getNextPage();\r\n\t\t\t\t//System.out.println(\"Parser Page Pulled\");\r\n\t\t\t} \r\n\t\t\tcatch (InterruptedException e) \r\n\t\t\t{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for all links in anchor (<a href=\"\") elements\r\n\t\t\t\r\n\t\t\t//Regex\r\n\t\t\t//loop will execute for each link found\r\n\t\t\tPattern pattern = Pattern.compile(\"href=\\\"(http:.*?)\\\"\");\r\n\t\t\tMatcher matcher = null;\r\n\t\t\t\r\n\t\t\t//Some pages are returning null values\r\n\t\t\tif(pageText != null)\r\n\t\t\t{\r\n\t\t\t\tmatcher = pattern.matcher(pageText);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add each link found to the link queue\r\n\t\t\t\r\n\t\t\t//sometimes matcher is returning null values\r\n\t\t\twhile(matcher != null && matcher.find())\r\n\t\t\t{\r\n\t\t\t\tString link = matcher.group(1);\r\n\t\t\t\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tSharedLink.addLink(link);\r\n\t\t\t\t} \r\n\t\t\t\tcatch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for keywords specified by the user of the webcrawler\r\n\t\t\tArrayList<String> keywords = WebCrawlerConsole.getKeywords();\r\n\t\t\t\r\n\t\t\t\tfor(String word : keywords)\r\n\t\t\t\t{\r\n\t\t\t\t\t//cannot split pageText if it is null\r\n\t\t\t\t\tif(pageText != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString[] keywordSearch = pageText.split(word);\r\n\t\t\t\t\t\tfor(int i=0; i < keywordSearch.length; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tWebCrawlerConsole.keywordHit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"end of Parser code\");\r\n\t\t}\r\n\t}",
"public void observeRenderView(\n @Observes @RenderView(controller = MessageLabelController.class) final RenderViewEvent event) {\n onLoadPage();\n }",
"public void loadPage() {\n\t\tLog.i(TAG, \"MyGardenListActivity::LoadPage ! Nothing to do anymore here :)\");\n\t}",
"@Override\n public void process(Page page) {\n PageStore.prePage = page.getHtml().toString();\n }",
"public void parsePage() {\n seen = true;\n int first = id.indexOf('_', 0);\n int second = id.indexOf('_', first + 1);\n String firstDir = \"result_\" + id.substring(0, first);\n String secondDir = id.substring(0, second);\n String fileName = id + \".page\";\n String wholePath = pagePath + firstDir + File.separator + secondDir\n + File.separator + fileName;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(wholePath));\n String line = null;\n while((line = reader.readLine()) != null) {\n if (line.equals(\"#ThisURL#\")) {\n url = reader.readLine();\n }\n// else if (line.equals(\"#Length#\")) {\n// length = Integer.parseInt(reader.readLine());\n// }\n else if (line.equals(\"#Title#\")) {\n title = reader.readLine();\n }\n else if (line.equals(\"#Content#\")) {\n content = reader.readLine();\n lowerContent = content.toLowerCase();\n break;\n }\n }\n reader.close();\n if (content == null) {\n return;\n }\n valid = true;\n } catch (IOException e) {\n// System.out.println(\"Parse page \" + id + \" not successful\");\n }\n }",
"@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}",
"void startPage(RequestContextHolder request);",
"private void waitForFirstPageToBeLoaded() {\n IdlingResource idlingResource = new ElapsedTimeIdlingResource(LATENCY_IN_MS + 1000);\n IdlingRegistry.getInstance().register(idlingResource);\n\n //Check that first item has been loaded\n onView(withItemText(\"POPULAR MOVIE #1 (1999)\")).check(matches(isDisplayed()));\n\n //Clean up\n IdlingRegistry.getInstance().unregister(idlingResource);\n }",
"public void notifyLoaded();",
"@Step(\"Waiting for page load\")\n public abstract PageBase load();",
"public ProcessPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t \n\n\t}",
"protected void page () throws HTMLParseException {\r\n while (block.restSize () == 0) {\r\n switch (nextToken) {\r\n case END:\r\n return;\r\n case LT:\r\n lastTagStart = tagStart;\r\n tagmode = true;\r\n match (LT);\r\n tag (lastTagStart);\r\n break;\r\n case COMMENT:\r\n //block.addToken (new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n match (COMMENT);\r\n break;\r\n case SCRIPT:\r\n //block.addToken (new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n addTokenCheck(new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n match (SCRIPT);\r\n break;\r\n case STRING:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n break;\r\n case MT:\r\n if(!tagmode) {\r\n scanString();\r\n }\r\n default:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n }\r\n }\r\n }",
"public interface ContentReadyListener {\n void contentReady(String content);\n}",
"public boolean isPageComplete();",
"public interface PageConnector {\n void onLastPage();\n void onNormalPage();\n}",
"@Override\n\tpublic void postParse() {\n\t}",
"@Override\n\tpublic void postParse() {\n\t}",
"public void crawlPage() {\n\t\tlogger.info(\"Starting to crawl \" + page.getLink());\n\t\tconsoleLogger.info(\"Starting to crawl \" + page.getLink());\n\n\t\tDocument document = fetchContent(page);\n\t\tif (document == null)\n\t\t\treturn;\n\n\t\tif (shouldSavePage) {\n\t\t\tsavePage(document, page.getLink());\n\t\t}\n\n\t\tlogger.info(\"Done crawling \" + page.getLink());\n\t}",
"@Override\n\tpublic void run() {\n\t\t\t\t\n\t\tString codigo = null;\n\t\ttry {\n\t\t\tcodigo = page.get();\n\t\t} catch (InterruptedException e) {\n\t\t\t//e.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t\n\t\tif(codigo != null)\n\t\t{\n\t\t\ttrabalharCodigo(codigo);\t\t\t\n\t\t\t\t\n\t\t\tadapter = new NoticiaAdapter(getApplicationContext(),noticias);\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tmsg = new Message();\n\t\tmsg.arg1 = 1;\n\t\thandler.sendMessage(msg);\n\t\t\n\t}",
"public interface OnLoadNextPageListener {\n\n void loadNextPage(int age);\n}",
"public void incPagesCrawled() {\n pagesCrawled++;\n }",
"@Override\n public void textFileLoaded(File file, int wc, String contents)\n {\n cur_file = file;\n this.action_panel.setWordCount(wc);\n \n new Thread(new MarkdownProcessor(file, this)).start();\n }",
"public void onPageSelected(int pageSelected) {\n\t\t\t}",
"protected void updatePageCompletion() {\r\n boolean pageComplete = determinePageCompletion();\r\n setPageComplete(pageComplete);\r\n if (pageComplete) {\r\n setErrorMessage(null);\r\n }\r\n }",
"@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}",
"@Override\n protected void onNextPageRequested(int page) {\n\n }",
"@Override\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t\t\t\t\n \t\t\t\tupdatePageComplete();\n \t\t\t}",
"public void ajaxListener() {\n System.out.println(\"!ttttt \" );\n }",
"public void run() {\n\t\t\tString html = \"\";\n\t\t\ttry {\n\t\t\t\thtml = HTTPFetcher.fetchHTML(this.url);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\tSystem.out.println(\"Unknown host\");\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"IOException\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(html != null) {\n\t\t\t\t\tthis.newLinks = LinkParser.listLinks(new URL(this.url), html);\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t}\n\t\t\tif(newLinks != null) {\n\t\t\t\tfor(URL theURL : newLinks) {\n\t\t\t\t\tif(!(urls.contains(theURL))) {\n\t\t\t\t\t\tsynchronized(urls) {\n\t\t\t\t\t\t\turls.add(theURL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinnerCrawl(theURL, limit);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInvertedIndex local = new InvertedIndex();\n\t\t\t\tString no_html = HTMLCleaner.stripHTML(html.toString());\n\t\t\t\tString[] the_words = WordParser.parseWords(no_html);\n\t\t\t\tlocal.addAll(the_words, this.url);\n\t\t\t\tindex.addAll(local);\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void requestNews() {\n\t\tSystem.out.println(\"xiaoming-requestNews\");\n\t}",
"public void loadStartPage()\n\t{\n\t}",
"public void waitForContentLoad() {\n // TODO implement generic method to wait until page content is loaded\n\n // wait.until(...);\n // ...\n }",
"@When(\"Hotels List page has finished loading\")\n public void listpage_i_am_on_list_page() {\n listPage = new HotelsListPage(driver);\n listPage.check_page_title();\n }",
"protected void postParse(T fileParsed) {\n\t}",
"@Override\r\n public void visit(Page page) {\r\n String url = page.getWebURL().getURL();\r\n System.out.println(\"URL: \" + url);\r\n\r\n if (page.getParseData() instanceof HtmlParseData) {\r\n HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\r\n String text = htmlParseData.getText();\r\n String html = htmlParseData.getHtml();\r\n List<WebURL> links = htmlParseData.getOutgoingUrls();\r\n\r\n System.out.println(\"Text length: \" + text.length());\r\n System.out.println(\"Html length: \" + html.length());\r\n System.out.println(\"Number of outgoing links: \" + links.size());\r\n\r\n try {\r\n Configuration config = new Configuration();\r\n System.setProperty(\"HADOOP_USER_NAME\", \"admin\");\r\n FileSystem fileSystem = FileSystem.get(new URI(\"hdfs://192.168.51.116:8022/\"), config);\r\n FSDataOutputStream outStream = fileSystem.append(new Path(\"/user/admin/crawler-results.txt\"));\r\n\r\n IOUtils.write(text.replace('\\n', ' '), outStream);\r\n outStream.flush();\r\n IOUtils.closeQuietly(outStream);\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n throw new RuntimeException(ex);\r\n }\r\n }\r\n }",
"public void waitForContentLoad() {\n verifyPageIsOpened(currentPage.get(), \"Please open some page before the waiting for content to load.\");\n currentPage.get().waitLoadFinished();\n }",
"void retrievePageContents()\n\t{\n\t\tStringBuilder longString = new StringBuilder();\n\t\tfor (int i = 0; i < pageContents.size(); i++)\n\t\t{\n\t\t\tlongString.append(pageContents.get(i));\n\t\t}\n\t\tString pageMarkup = longString.toString().toLowerCase();\n\t\textractComments(pageMarkup);\n\n\t}",
"@Override\n\tpublic void process(Page page){\n\n\t CollectTemplate collectTemplate = templateService.getCollectTemplateById(templateId);\n\t String currentUrl=page.getUrl().toString();\n\t String nextUrlXpath=collectTemplate.getNextUrlXpath();\n \tString contentUrlXpath=collectTemplate.getContentUrlXpath();\n \tString listUrlRegex=collectTemplate.getListUrlRegex();\n \tString contentUrlRegex=collectTemplate.getContentUrlRegex();\n \tList<CollectTemplateField> fields=collectTemplate.getFields();\n \ttry {\n\t \t\t\n\t \tHtml currentHtml= page.getHtml();\n\n\t\t\t//判断是否是列表页\n\t if (currentUrl.matches(listUrlRegex)) {\n\n\t\t\t\t//处理列表页\n\t\t\t\tString nextPageUrl=\"\";\n\t\t\t\ttry{\n\t\t\t\t\tnextPageUrl=currentHtml.xpath(nextUrlXpath).toString();\n\t\t\t\t\tif (nextPageUrl==null||StringUtils.isEmpty(nextPageUrl)){\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e){\n\t\t\t\t\tXpath2Selector xpath2Selector = new Xpath2Selector(nextUrlXpath);\n\t\t\t\t\tnextPageUrl = xpath2Selector.select(page.getRawText());\n\n\t\t\t\t\tif (nextPageUrl!=null&&nextPageUrl.startsWith(\"/\")){\n\t\t\t\t\t\tnextPageUrl = \"http://\"+site.getDomain()+nextPageUrl;\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t \tif (StringUtils.isNotEmpty(nextPageUrl)) {\n\n\t \t\tRequest request=new Request();\n\t \t\trequest.setUrl(nextPageUrl);\n\t \t\trequest.setPriority(-1);\n\t \t\t\n\t \t\tpage.addTargetRequest(request);\n\n\t \t\tlogService.info(projectId,\"get the next page link \"+nextPageUrl+\" and add it to the queue\");\n\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get the next page link\");\n\n\t\t\t\t}\n\t \tList<String> detailPagesUrl;\n\t \ttry{\n\t\t\t\t\tdetailPagesUrl = currentHtml.xpath(contentUrlXpath).all();\n\n\t\t\t\t}catch (Exception e){\n\n\t\t\t\t\tXpath2Selector xpath2Selector2 = new Xpath2Selector(contentUrlXpath);\n\t\t\t\t\tdetailPagesUrl = xpath2Selector2.selectList(currentHtml.getDocument().text());\n\t\t\t\t}\n\n\n\n\t \tif (detailPagesUrl!=null&&detailPagesUrl.size()!=0) {\n\t\t\t\t\t//添加详情页\n\t\t\t\t\tpage.addTargetRequests(detailPagesUrl, 1);\n\n\t\t\t\t\tlogService.info(projectId,\"get \"+detailPagesUrl.size()+\" detail pages\");\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get detail page\");\n\n\t\t\t\t}\n\t\t\t}else if (StringUtils.isEmpty(contentUrlRegex)||currentUrl.matches(contentUrlRegex)) {\n\t \t//处理详情页\n\t\t\t\tcontentPageProcessService.setProjectId(projectId);\n\t\t\t\tcontentPageProcessService.progressContentPage(page,fields);\n\t\t\t}\n\t \t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t \n\t }",
"public void loadPage() { \n\t \n\t if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {\n\t \tnew DownloadXmlTask().execute(URL);\n\t }\n\t else if ((sPref.equals(WIFI)) && (wifiConnected)) {\n\t new DownloadXmlTask().execute(URL);\n\t } else {\n\t // show error\n\t } \n\t }",
"@Override\n\tpublic void onRefresh() {\n\t\tpage = 1;\n\t\tSystem.out.println(\"onRefresh1\");\n\t\tmyList.clear();\n\t\tSystem.out.println(\"onRefresh2\");\n\t\tgetData();\n\t}",
"@Override\n public void waitUntilPageObjectIsLoaded() {\n }",
"public void run()\r\n {\n\ttopLevelSearch=FIND_TOP_LEVEL_PAGES;\r\n\ttopLevelPages=new Vector();\r\n\tnextLevelPages=new Vector();\r\n \r\n\t// Check to see if a proxy is being used. If so then we use IP Address rather than host name.\r\n\tproxyDetected=detectProxyServer();\r\n\t \r\n\tstartSearch();\r\n \r\n\tapp.enableButtons();\r\n\tapp.abort.disable();\r\n \r\n\tif(hitsFound == 0 && pageOpened == true)\r\n\t app.statusArea.setText(\"No Matches Found\");\r\n else if(hitsFound==1)\r\n\t app.statusArea.setText(hitsFound+\" Match Found\");\r\n else app.statusArea.setText(hitsFound+\" Matches Found\");\r\n }",
"@Override\n public void visit(Page page) {\n\t visitObject.visitUrls(page);\n\t String url = page.getWebURL().getURL();\n\t System.out.println(\"URL: \" + url);\n\t if (page.getParseData() instanceof HtmlParseData) {\n\t\t HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\t\t String text = htmlParseData.getText();\n\t\t String html = htmlParseData.getHtml();\n\t\t Set<WebURL> links = htmlParseData.getOutgoingUrls();\n\t\t System.out.println(\"Text length: \" + text.length());\n\t\t System.out.println(\"Html length: \" + html.length());\n\t\t System.out.println(\"Number of outgoing links: \" + links.size());\n\t\t }\n }",
"public interface PageLoadListener {\n void onLoadSuccess(JSONArray array);\n void onLoadFailure();\n}",
"@Override\n public void storeParsedText() {\n parsedHtmlPages.parallelStream().forEach(parsedHtmlPage -> {\n FileUtility.writeToFile(parsedHtmlPage, FILE_DIRECTORY_NAME + FILE_SEPARATOR + parsedHtmlPage.getTitle());\n });\n }",
"@Override\n\tpublic void onLoad() {\n\t\thandler.postDelayed(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcount=pagerlistener.setpage();\n//\t\t\t\t initNewDatas(count);//得到新数据\n\t\t\t\tfightermessageadapter.notifyDataSetChanged();//刷新ListView;\n\t\t\t\ttopNewsMoreLV.loadCompleted();\n\t\t\t}\n\t\t}, 2000);\n\t}",
"@Override\n public void xhtmlSuccess(String xhtml)\n {\n cur_html = xhtml;\n markdown_failed = false;\n refreshDisplay();\n }",
"@Override\r\n\tpublic boolean isPageLoaded() {\n\t\treturn false;\r\n\t}",
"public interface ContentCallBack {\n void onLoadContent(String content);\n}",
"public interface WebContentCallBack {\n\tvoid webContentCallBack(Site site, String content) throws Exception;\n}",
"@Override\n\t\tpublic void onPageSelected(int arg0)\n\t\t{\n\t\t\t\n\t\t}",
"@Override\n\tpublic void process(Task task, Page page) {\n\t\t\n\t}",
"private void notifyPageInit() {\n\t\tString nativeNotificationCallback = JS_NOTIFICATION_FROM_NATIVE;\n\t\tString notificationArgument = \"\" + SmartConstants.NATIVE_EVENT_PAGE_INIT_NOTIFICATION;\n\t\tnotifyToJavaScript(nativeNotificationCallback, notificationArgument);\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\t\tlistonResponse(arg0);\r\n\t\t\t\t\t\trefreshView.onRefreshComplete();\r\n\t\t\t\t\t}",
"@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {\n Log.v(\"WVClient.onReceiveError\", \" receieved an error\" + error);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onSendUpdate(\"WVClient has received an error!\");\n }\n });\n\n //do what would be done in processHTML but avoid anything to do with scraping, move onto next page\n crawlComplete = false;\n\n if (masterEmailSet.size() > 20){\n //if more than twenty emails have been discovered, the crawl is done\n crawlComplete = true;\n }\n\n if (masterEmailSet.size() > 0 && !searchTerm.equals(\"\")){\n //if at least one email with the search term has been found, crawl is done\n crawlComplete = true;\n }\n\n\n if (collectedLinks.iterator().hasNext() && !crawlComplete){\n //if there's another link and crawl isn't deemed complete, hit next URL\n browser.post(new Runnable() {\n @Override\n public void run() {\n Log.v(\"processHTML\", \" loading page on browser:\" + collectedLinks.iterator().next());\n visitedLinks.add(collectedLinks.iterator().next());\n browser.loadUrl(collectedLinks.iterator().next());\n }\n });\n }\n }",
"@Override\n\tpublic void onMyLoadMore() {\n\t\t\n\t}",
"@Override\n\tpublic void onMyLoadMore() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\n\t\t\t}",
"@Override\n\tpublic void checkPage() {\n\t}",
"protected void notifyImagePageEvents(long duration) {\n notifyPageImageLoadedEvent(duration, image == null);\r\n // check to see if we're done loading and all we were waiting on was\r\n // the completion of this image load.\r\n if (parentPage != null && imageIndex == parentPage.getImageCount() &&\r\n parentPage.isPageInitialized() && parentPage.isPagePainted()) {\r\n notifyPageLoadingEnded();\r\n }\r\n }",
"public void onStartPage(PdfWriter writer, Document document){}",
"@Override\n public void onRefresh() {\n _page_number = 1;\n callGetNotifListWS();\n\n }",
"@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t\t\n\t\t\t}",
"public void parse() {\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tgetResultByKeyword(page);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tgetResultByKeyword(page);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tcount=pagerlistener.setpage();\n//\t\t\t\t initNewDatas(count);//得到新数据\n\t\t\t\tfightermessageadapter.notifyDataSetChanged();//刷新ListView;\n\t\t\t\ttopNewsMoreLV.loadCompleted();\n\t\t\t}",
"@Override\n public void visit(Page page) {\n String url = page.getWebURL().getURL();\n System.out.println(\"URL: \" + url);\n\n try {\n if (page.getParseData() instanceof HtmlParseData) {\n HtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\n final Document document = Jsoup.parse(htmlParseData.getHtml());\n\n Transformer transformer = TransformerFactory.newInstance()\n .newTransformer(new StreamSource(getClass().getResourceAsStream(xslPath)));\n\n Writer write = new StringWriter();\n transformer.transform(new DOMSource(new W3CDom().fromJsoup(document)), new StreamResult(write));\n\n String xml = write.toString();\n\n // XML 1.1\n // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n String xml11pattern = \"[^\"\n + \"\\u0001-\\uD7FF\"\n + \"\\uE000-\\uFFFD\"\n + \"\\ud800\\udc00-\\udbff\\udfff\"\n + \"]+\";\n\n // remove invalid character in xml\n xml = xml.replaceAll(xml11pattern, \"\");\n\n JAXBContext jc = JAXBContext.newInstance(ProxyListDTO.class);\n\n Unmarshaller unmarshaller = jc.createUnmarshaller();\n ProxyListDTO data = (ProxyListDTO) unmarshaller.unmarshal(new StringReader(xml));\n data.getProxies().forEach(p -> p.setSource(source));\n\n\n result.addAll(data.getProxies());\n }\n } catch (Exception e) {\n logger.error(\"fail to visit \" + url, e);\n }\n }",
"public void startPage() {\n\t\tthis.dataComposer.startPage();\n\t}",
"private void loadPage() {\n \t\n if (((sPref.equals(ANY)) && (wifiConnected || mobileConnected))\n || ((sPref.equals(WIFI)) && (wifiConnected))) {\n // AsyncTask subclass\n \t\n new DownloadXmlTask().execute(URL);\n } else {\n showErrorPage();\n }\n }",
"@Override\r\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t}",
"protected void doAdditionalPageInitialization(IPage page) {\n }",
"@Override\n\tpublic void onLoadMore() {\n\t\tpage++;\n\t\texecutorService.submit(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tgetResultByKeyword(page);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"private void refreshXML() {\n\t\t// Build a new thread to handle the request, since fetching files from\n\t\t// a remove server shouldn't block screen drawing.\n\t\tToast.makeText(\n\t\t\t\tthis,\n\t\t\t\tgetString(R.string.xml_requested_from) + \": \"\n\t\t\t\t\t\t+ PreferencesManager.getXmlUri(this), Toast.LENGTH_LONG)\n\t\t\t\t.show();\n\t\t// We use a separate runnable class instead of an anonymous inner class\n\t\t// so that when the async request is completed, it can signal the viewer\n\t\t// to toast.\n\t\tFetchThread ft = new FetchThread(this);\n\t\tft.start();\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n viewModule(request, response);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void visit(Page page) {\n\t\tint docid = page.getWebURL().getDocid();\n\t\tString url = page.getWebURL().getURL();\n\t\tString domain = page.getWebURL().getDomain();\n\t\tString path = page.getWebURL().getPath();\n\t\tString subDomain = page.getWebURL().getSubDomain();\n\t\tString parentUrl = page.getWebURL().getParentUrl();\n\n\t\tSystem.out.println(\"Docid: \" + docid);\n\t\tSystem.out.println(\"URL: \" + url);\n\t\tSystem.out.println(\"Domain: '\" + domain + \"'\");\n\t\tSystem.out.println(\"Sub-domain: '\" + subDomain + \"'\");\n\t\tSystem.out.println(\"Path: '\" + path + \"'\");\n\t\tSystem.out.println(\"Parent page: \" + parentUrl);\n\n\t\tif(page.getParseData() instanceof JavaScriptParseData) {\n\t\t\tSystem.out.println(\"Got an instance of JS Parse DATA!!!!\");\n\t\t\tSystem.out.println(\"Parent Page of JS data is : \" + page.getWebURL().getParentUrl());\n\n\t\t\tJavaScriptParseData jsParseData = (JavaScriptParseData) page.getParseData();\n\t\t\tString jsText = jsParseData.getJs();\n\n\t\t\ttry {\n\t\t\t\tif(DomainTrackerParser.containsTracker(jsText)){\n\t\t\t\t\tdomainTrackerSet.add(url);\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\n\t\tif (page.getParseData() instanceof HtmlParseData) {\n\t\t\tHtmlParseData htmlParseData = (HtmlParseData) page.getParseData();\n\t\t\tString text = htmlParseData.getText();\n\t\t\tString html = htmlParseData.getHtml();\n\t\t\tList<WebURL> links = htmlParseData.getOutgoingUrls();\n\n\t\t\tSystem.out.println(\"Text length: \" + text.length());\n\t\t\tSystem.out.println(\"Html length: \" + html.length());\n\t\t\tSystem.out.println(\"Number of outgoing links: \" + links.size());\n\n\t\t\tfor(WebURL webUrl : links) {\n\t\t\t\tString urlString = webUrl.getURL().toString();\n\n\t\t\t\ttry {\n\t\t\t\t\tif(urlString != null && DomainTrackerParser.containsTracker(urlString)) {\n\t\t\t\t\t\tSystem.out.println(\"added a tracker to the set : \" + urlString);\n\t\t\t\t\t\tdomainTrackerSet.add(urlString);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"Outgoing URL : \" + webUrl);\n//\t\t\t\tSystem.out.println(domainTrackerSet);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"=============\");\n\t}",
"public static void give() {\r\n\t\t\r\n\t\tif (ths.page == 6) {\r\n\t\t\tths.page++;\r\n\t\t\tths.updates1 = updates;\r\n\t\t}\r\n\t}",
"void startCrawler() throws ParserConfigurationException, SAXException, IOException;",
"@Override\n\tpublic void onRefresh() {\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\t\t\n\t\tmAdapterView.setRefreshTime(sdf.format(new Date()));\n\t\tmAdapterView.stopRefresh();\n\t\tFindHttpPost();\n\t\tpage = 1;\n\t\t\n\t\tif(mLocationClient.isStarted()){\n\t\t\tmLocationClient.stop();\n\t\t}else{\n\t\t\tmLocationClient.start();\n\t\t\tmLocationClient.requestLocation();\n\t\t}\n\t}",
"private void processAllPages(final HtmlPage page, final HashMap<String, Object> metaData) {\n int pageNumber = 1;\n\n HtmlPage actualPage = page;\n\n while (actualPage!= null && isPageValid(actualPage)) {\n if (actualPage.getWebResponse().getStatusCode() != HTTP_SUCCESS_CODE) {\n logger.error(\"Received non-200 status code while trying to read from {}.\", actualPage.getUrl());\n throw new UnrecoverableException(\"Crawling failed due to non-200 HTTP response.\");\n }\n\n logger.info(\"Processing page #{}\", pageNumber);\n publishTenders(actualPage, metaData);\n\n logger.debug(\"Data extracted, moving to next page.\");\n pageNumber++;\n\n actualPage = getNextPage(actualPage, pageNumber);\n }\n }",
"void onPagesAdded(List<Integer> pageList);",
"@Override\n\tpublic void onLoadMore() {\n\t\tif (onRefresh_number) {\n\t\t\tpage = page + 1;\n\n\t\t\tonRefresh_number = false;\n\t\t\tgetData();\n\n\t\t\t// if (Tools.isConnect(getApplicationContext())) {\n\t\t\t// onRefresh_number = false;\n\t\t\t// getData();\n\t\t\t// } else {\n\t\t\t// onRefresh_number = true;\n\t\t\t// handler.sendEmptyMessage(2);\n\t\t\t// }\n\t\t} else {\n\t\t\thandler.sendEmptyMessage(3);\n\t\t}\n\t}",
"@Override\n public void onPageChanged(int page, int pageCount) {\n }"
] |
[
"0.62124383",
"0.59856915",
"0.58459437",
"0.5844248",
"0.5824353",
"0.57798827",
"0.57716346",
"0.5763689",
"0.57255393",
"0.5689225",
"0.56635606",
"0.5630171",
"0.56120175",
"0.56070554",
"0.5594109",
"0.55863994",
"0.5576627",
"0.557513",
"0.55364",
"0.5448537",
"0.54397625",
"0.542984",
"0.54017025",
"0.5390856",
"0.53664607",
"0.535688",
"0.5356774",
"0.5349549",
"0.53429705",
"0.5337451",
"0.5324342",
"0.53166384",
"0.53166384",
"0.5290511",
"0.52876383",
"0.52683306",
"0.5251751",
"0.5246535",
"0.5223435",
"0.5218928",
"0.52181005",
"0.5199353",
"0.51913947",
"0.51864165",
"0.5178341",
"0.51702833",
"0.51637936",
"0.5162813",
"0.5148307",
"0.51340795",
"0.51314193",
"0.5129574",
"0.5123416",
"0.5119332",
"0.51179206",
"0.511699",
"0.51145405",
"0.5102973",
"0.51016057",
"0.510017",
"0.5091574",
"0.5090722",
"0.5088753",
"0.5088257",
"0.5079342",
"0.50789964",
"0.5078923",
"0.50567347",
"0.50554734",
"0.505499",
"0.5054978",
"0.5053967",
"0.5053967",
"0.5049964",
"0.5031065",
"0.50297916",
"0.50296235",
"0.5023411",
"0.50146145",
"0.50146145",
"0.5011594",
"0.50105757",
"0.50105757",
"0.4995584",
"0.49940377",
"0.49928638",
"0.49910724",
"0.49888542",
"0.49829292",
"0.49810055",
"0.49789214",
"0.4974913",
"0.49610397",
"0.49610046",
"0.49537826",
"0.49507737",
"0.4945275",
"0.494414",
"0.4939889",
"0.49396873"
] |
0.5874107
|
2
|
Send a command to the Builders
|
public void sendCommand(Command cmd);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void sendCommand(CommandEvent event);",
"private void sendCommand(int recipient, int action, int parameter,\r\n\t\t\tint options) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + parameter + \";\"\r\n\t\t\t\t+ options + \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(command);\r\n\t\tlogger.debug(\"Senden des Kommandos beendet\");\r\n\r\n\t}",
"private void sendCommand(int recipient, int action) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + \"0\" + \";\" + \"0\"\r\n\t\t\t\t+ \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(command);\r\n\t\tlogger.debug(\"Senden des Kommandos beendet\");\r\n\t}",
"private void sendGameCommand(){\n\n }",
"private void sendCommand(int recipient, int action, int parameter) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + parameter + \";\"\r\n\t\t\t\t+ \"0\" + \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(command);\r\n\t\tlogger.debug(\"Senden des Kommandos beendet\");\r\n\t}",
"public void sendCommands(String command) {\n try {\n printStream.print(command);\n }\n catch (Exception e){\n\n }\n\n\n }",
"public void goToSendCommand(View view){\n Log.i(tag, \"About to launch SendCommand\");\n Intent i = new Intent(this, SendCommand.class);\n startActivity(i);\n }",
"public static void UI_send_command(int com, Object... params){\n\t\t//Create the packet\n\t\tCalicoPacket p;\n\t\tif(params!=null){\n\t\t\tp=CalicoPacket.getPacket(com, params);\n\t\t}\n\t\telse{\n\t\t\tp=CalicoPacket.getPacket(com);\n\t\t}\n\t\t\n\t\tp.rewind();\n\t\t//Send the packet locally\n\t\tPacketHandler.receive(p);\n\t\t\n\t\t//Send the packet to the network (server)\n//\t\tNetworking.send(p);\t\n\t}",
"int send(final Command command) throws ZigBeeException;",
"private void sendCommand(CommandItem command) {\n sendCommand(command.data, command.advTimeout);\n }",
"@Override\n\tpublic String execute() throws Exception {\n\t\treturn \"send\";\n\t}",
"public Simulator send(String cmd) {\n //robotEntities.robotAgent.receive(cmd);\n return this;\n }",
"public void command(byte[] cmdMessage) throws SAPIException{\r\n\t\t\t\t//sends command to RBNB\r\n\t\t\t\t\r\n\t\t\t\tsrcMap.PutDataAsByteArray(srcMap.GetIndex(getParameterToStringById(\"sourceChannelCommandName\")), cmdMessage); //cmds channel\t \t\r\n\t \tsrc.Flush(srcMap); \t\r\n\t\t}",
"Result command(@NotNull CommandSender sender, List<String> args);",
"@Command\n\tpublic void buscar() {\n\t}",
"@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}",
"private Command(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"@Override\n\t\t\tpublic void Execute()\n\t\t\t{\n\t\t\tSquare square = (Square) receiver;\n\t\t\t// The args for SpawnBuildingCommand are the X,Y coordinate for the Building used by the factory, \n\t\t\tIAsteroidGameFactory factory = GameBoard.Instance().GetFactory();\n\t\t\tSystem.out.println(\"Spawning Building at (\" + args[0] + \",\" + args[1] + \")\");\n\t\t\tsquare.Add(factory.MakeBuilding());\n\t\t\tGameBoard.Instance().IncrementBuildingCount();\n\t\t}",
"public interface CommandSender \n{\n /**\n * Handle a respond from the robot.\n * @param result The result.\n * @param originalCommand The command which was sent to the robot.\n */\n public void handleResponse(byte[] result, Command originalCommand);\n \n /**\n * Handle an error that occured when communicating to the robot.\n * @param code The error code that was sent by the robot.\n */\n public void handleError(int code);\n \n /**\n * Needed when sending a command repetitively to the robot.\n * @return The command string that should be used.\n */\n public Command getCurrentCommand();\n \n}",
"public void sendCommand(String command){\n sendCommand(command, true);\n fromPlugin = false;\n\n }",
"Commands createCommands();",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"public void sendCommand(short b) {\n\t\tsendCommand(new short[] {b});\n\t}",
"public abstract void execute(CommandSender sender, String[] args);",
"public void sendGroupCommand(CommandMessage command){\n\n\t\tMessageCreator mc = new MessageCreator(command);\n\n\t\tsendGroupMessage(mc.toXML());\n\n\t}",
"protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);",
"Command createCommand();",
"public void setCommand(String command) {\n this.command = command;\n }",
"public Button(String command, String name)\n {\n //command that will activate the infrared remote on the pi when this is sent to the command line\n this.command = \"irsend SEND_ONCE \" + name + \" KEY_\" + command.toUpperCase(); \n }",
"public void execute(Command command){\n command.run(field);\n }",
"public void addCommand(Object cmd) {\n Message msg = this.handler.obtainMessage(0);\n msg.obj = cmd;\n this.handler.sendMessage(msg);\n }",
"public Builder setCommand(\n network.message.PlayerResponses.Command.Builder builderForValue) {\n if (commandBuilder_ == null) {\n response_ = builderForValue.build();\n onChanged();\n } else {\n commandBuilder_.setMessage(builderForValue.build());\n }\n responseCase_ = 2;\n return this;\n }",
"public abstract void doCommand(String command);",
"public interface Command {\n\n\n}",
"public void send() {\n\t}",
"public void send(String command)\n {\n if (connected) { \n writer.println(command + \";\");\n }\n }",
"public MethodBuilder command(String command) {\n\t\tif (!command.endsWith(\";\")) {\n\t\t\tcommand += \";\";\n\t\t}\n\t\tcommands.add(command);\n\t\treturn this;\n\t}",
"private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsShow.class)).build();\r\n\r\n CommandSpec addBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.add\")\r\n .description(Text.of(\"Add a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsAdd.class)).build();\r\n\r\n CommandSpec removeBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.remove\")\r\n .description(Text.of(\"Remove a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsRemove.class)).build();\r\n\r\n CommandSpec banpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints\")\r\n .description(Text.of(\"Show the Banpoints help menu\")).arguments(GenericArguments.none())\r\n .child(showBanpoints, \"show\").child(addBanpoints, \"add\").child(removeBanpoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, banpoints, \"banpoints\", \"bp\");\r\n\r\n CommandSpec showMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.show\")\r\n .description(Text.of(\"Show how many Mutepoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsShow.class)).build();\r\n\r\n CommandSpec addMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsAdd.class)).build();\r\n\r\n CommandSpec removeMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsRemove.class)).build();\r\n\r\n CommandSpec mutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints\")\r\n .description(Text.of(\"Show the Mutepoints help menu\")).arguments(GenericArguments.none())\r\n .child(showMutepoints, \"show\").child(addMutepoints, \"add\").child(removeMutepoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, mutepoints, \"mutepoints\", \"mp\");\r\n\r\n CommandSpec playerInfo = CommandSpec.builder().permission(\"dtpunishment.playerinfo\")\r\n .description(Text.of(\"Show your info \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.optionalWeak(GenericArguments.requiringPermission(\r\n GenericArguments.user(Text.of(\"player\")), \"dtpunishment.playerinfo.others\"))))\r\n .executor(childInjector.getInstance(CommandPlayerInfo.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, playerInfo, \"pinfo\", \"playerinfo\");\r\n\r\n CommandSpec addWord = CommandSpec.builder().permission(\"dtpunishment.word.add\")\r\n .description(Text.of(\"Add a word to the list of banned ones \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.string(Text.of(\"word\"))))\r\n .executor(childInjector.getInstance(CommandWordAdd.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, addWord, \"addword\");\r\n\r\n CommandSpec unmute = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Unmute a player immediately (removing all mutepoints)\"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandUnmute.class)).build();\r\n\r\n CommandSpec reloadConfig = CommandSpec.builder().permission(\"dtpunishment.admin.reload\")\r\n .description(Text.of(\"Reload configuration from disk\"))\r\n .executor(childInjector.getInstance(CommandReloadConfig.class)).build();\r\n\r\n CommandSpec adminCmd = CommandSpec.builder().permission(\"dtpunishment.admin\")\r\n .description(Text.of(\"Admin commands for DTPunishment\")).child(reloadConfig, \"reload\")\r\n .child(unmute, \"unmute\").build();\r\n\r\n Sponge.getCommandManager().register(this, adminCmd, \"dtp\", \"dtpunish\");\r\n }",
"@Override\n public void sendCommand(String command, Object... args) {\n sendQuietly(command, args);\n }",
"@JavascriptInterface\n public void sendCommand(String array) {\n Log.d(TAG, \"sendCommand: \" + array);\n if (!connected) {\n Log.e(TAG, \"Attempting to send M2 a command while its not connected: \" + array);\n return;\n }\n try {\n JSONArray json = new JSONArray(array);\n byte[] data = new byte[json.length()];\n for (int i = 0; i < data.length; i++) {\n data[i] = (byte) json.getInt(i);\n }\n EventBus.getDefault().post(new M2Command(data));\n }\n catch (JSONException e) {\n Log.e(TAG, \"Invalid command: \" + array);\n }\n }",
"@Override\r\n public void execute(Command command) {\n\r\n }",
"public Command run() {\n Worm enemyWormSpecial = getFirstWormInRangeSpecial();\n if (enemyWormSpecial != null) {\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n if (gameState.myPlayer.worms[1].bananaBombs.count > 0) {\n return new BananaBombCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n if (gameState.myPlayer.worms[2].snowballs.count > 0) {\n return new SnowballCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n\n //PRIORITAS 2: NORMAL ATTACK (Shoot)\n Worm enemyWorm = getFirstWormInRange();\n if (enemyWorm != null) {\n Direction direction = resolveDirection(currentWorm.position, enemyWorm.position);\n return new ShootCommand(direction);\n }\n\n //PRIORITAS 3: MOVE (Karena sudah opsi serang tidak memungkinkan)\n\n //Ambil semua koordinat di cell Worm saat ini selain current cell\n List<Cell> surroundingBlocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n \n\n //Kalau Worm saat ini adalah Commander, masuk ke algoritma move khusus Commander\n if(gameState.currentWormId == 1){\n\n //Commander akan memprioritaskan untuk bergerak menuju Technician (Worm yang memiliki Snowball)\n Worm technicianWorm = gameState.myPlayer.worms[2];\n\n\n //Mencari cell yang akan menghasilkan jarak terpendek menuju Worm tujuan\n Cell shortestCellToTechnician = getShortestPath(surroundingBlocks, technicianWorm.position.x, technicianWorm.position.y);\n \n //Commander akan bergerak mendekati Technician sampai dengan jarak dia dan Technician paling dekat adalah 3 satuan\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, technicianWorm.position.x, technicianWorm.position.y) > 3) {\n if(shortestCellToTechnician.type == CellType.AIR) {\n return new MoveCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }else if (shortestCellToTechnician.type == CellType.DIRT) {\n return new DigCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }\n }\n\n //Apabila Commander dan Technician sudah berdekatan, maka Commander akan bergerak mencari musuh terdekat untuk melancarkan serangan\n int min = 10000000;\n Worm wormMusuhTerdekat = opponent.worms[0];\n for (Worm calonMusuh : opponent.worms) {\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y) < min) {\n min = euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y);\n wormMusuhTerdekat = calonMusuh;\n }\n }\n\n //Mencari cell yang paling dekat ke musuh yang sudah ditemukan\n Cell shortestCellToEnemy = getShortestPath(surroundingBlocks, wormMusuhTerdekat.position.x, wormMusuhTerdekat.position.y);\n if(shortestCellToEnemy.type == CellType.AIR) {\n return new MoveCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }else if (shortestCellToEnemy.type == CellType.DIRT) {\n return new DigCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }\n }\n\n //Command move untuk worm selain Commando. Worm selain commando akan mendekat menuju posisi worm Commando\n Worm commandoWorm = gameState.myPlayer.worms[0];\n \n //Selama Commando masih hidup, maka Worm lainnya akan mendekat menuju Commando\n if (commandoWorm.health > 0) {\n //Cell cellCommandoWorm = surroundingBlocks.get(0);\n\n //Mencari cell yang membuat jarak menuju Commando paling dekat\n Cell shortestCellToCommander = getShortestPath(surroundingBlocks, commandoWorm.position.x, commandoWorm.position.y);\n\n if(shortestCellToCommander.type == CellType.AIR) {\n return new MoveCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }else if (shortestCellToCommander.type == CellType.DIRT) {\n return new DigCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }\n }\n\n // PRIORITAS 4: Bergerak secara acak untuk memancing musuh mendekat\n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell block = surroundingBlocks.get(cellIdx);\n if (block.type == CellType.AIR) {\n return new MoveCommand(block.x, block.y);\n } else if (block.type == CellType.DIRT) {\n return new DigCommand(block.x, block.y);\n }\n // Kalau udah enggak bisa ngapa-ngapain.\n return new DoNothingCommand();\n \n }",
"void writeCommand(CommProtocolCommands command, Object ... params) throws IOException;",
"public interface Command {\n\t public String execute(String[] request);\n}",
"public void registerCommands() {\n\t CommandSpec cmdCreate = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdCreate.getInstance())\n\t .permission(\"blockyarena.create\")\n\t .build();\n\n\t CommandSpec cmdRemove = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdRemove.getInstance())\n\t .permission(\"blockyarena.remove\")\n\t .build();\n\n\t CommandSpec cmdJoin = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"mode\")))\n\t )\n\t .executor(CmdJoin.getInstance())\n\t .build();\n\n\t CommandSpec cmdQuit = CommandSpec.builder()\n\t .executor(CmdQuit.getInstance())\n\t .build();\n\n\t CommandSpec cmdEdit = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t GenericArguments.optional(onlyOne(GenericArguments.string(Text.of(\"param\"))))\n\t )\n\t .executor(CmdEdit.getInstance())\n\t .permission(\"blockyarena.edit\")\n\t .build();\n\n\t CommandSpec cmdKit = CommandSpec.builder()\n\t .arguments(onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdKit.getInstance())\n\t .build();\n\n\t CommandSpec arenaCommandSpec = CommandSpec.builder()\n\t .child(cmdEdit, \"edit\")\n\t .child(cmdCreate, \"create\")\n\t .child(cmdRemove, \"remove\")\n\t .child(cmdJoin, \"join\")\n\t .child(cmdQuit, \"quit\")\n\t .child(cmdKit, \"kit\")\n\t .build();\n\n\t Sponge.getCommandManager()\n\t .register(BlockyArena.getInstance(), arenaCommandSpec, \"blockyarena\", \"arena\", \"ba\");\n\t }",
"public abstract void exec(CommandSender sender, String[] args);",
"java.lang.String getCommand();",
"public network.message.PlayerResponses.Command.Builder getCommandBuilder() {\n return getCommandFieldBuilder().getBuilder();\n }",
"public Command click() {\r\n\t\treturn command;\r\n\t}",
"public Builder setCommand(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCommandIsMutable();\n command_.set(index, value);\n onChanged();\n return this;\n }",
"public static void sendMessage(int command) {\n\t\tfindWindow();\n\t\t\n\t\tuser32.SendMessageA(handle, IUser32.WM_COMMAND, command, 0x00000000);\n\t}",
"public AutoLowBarToGoalCmd() {\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=PARAMETERS\n // Add Commands here:\n // e.g. addSequential(new Command1());\n // addSequential(new Command2());\n // these will run in order.\n\n // To run multiple commands at the same time,\n // use addParallel()\n // e.g. addParallel(new Command1());\n // addSequential(new Command2());\n // Command1 and Command2 will run in parallel.\n\n // A command group will require all of the subsystems that each member\n // would require.\n // e.g. if Command1 requires chassis, and Command2 requires arm,\n // a CommandGroup containing them would require both the chassis and the\n // arm.\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=COMMAND_DECLARATIONS\n //addSequential(new LowerIntakeCmd());\n \taddSequential(new ShiftDownCmd());\n \taddParallel(new LowerIntakeCmd());\n addSequential(new DriveStraightCmd(.95,9000.));\n addSequential(new TurnToAngleCmd(56.));\n //addParallel(new BumpIntakeUpCmd());\n addSequential(new DriveStraightCmd(0.9, 4700.));\n \n addSequential(new AutoEjectBallCmd());\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=COMMAND_DECLARATIONS\n \n }",
"public void command() {\n List<String> commands = new ArrayList<>();\n commands.add(\": start\");\n commands.add(\": exit\");\n commands.add(\": help\");\n commands.add(\": commands\");\n\n for (String command : commands) {\n System.out.println(command);\n }\n System.out.println();\n }",
"public Builder setCommand(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n command_ = value;\n onChanged();\n return this;\n }",
"public void sendCommandToClient(ServerCommand serverCommand) {\r\n \t\tCollection<RoMClient> clientsToSend = this.clients.getClients();\r\n \r\n \t\tthis.sendCommandToClient(clientsToSend, serverCommand);\r\n \t}",
"public void sendIndividualCommand(String userID, CommandMessage command){\n\n\t\tMessageCreator mc = new MessageCreator(command);\n\n\t\tsendMessage(userID, mc.toXML());\n\n\t}",
"@Override\n\tpublic void command(List<Commande> commandes) {\n\t\t\n\t}",
"private static void command() {\n Scanner reader = new Scanner(System.in);\n System.out.print(\"Write action (buy, fill, take):\\n> \");\n String input = reader.next();\n\n switch (input) {\n case \"buy\" :\n buy();\n break;\n case \"fill\" :\n fill();\n break;\n case \"take\" :\n take();\n break;\n default:\n System.out.println(\"not accepted command\");\n }\n }",
"private interface Command {\n public void execute();\n }",
"private UCommands(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder setCommand(network.message.PlayerResponses.Command value) {\n if (commandBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n response_ = value;\n onChanged();\n } else {\n commandBuilder_.setMessage(value);\n }\n responseCase_ = 2;\n return this;\n }",
"Command createCommandWith(CommandCreator creator);",
"public boolean test(CommandSender sender, MCommand command);",
"private CommandBrocker() {}",
"@Test\n\tpublic void execute() {\n\t\tcommand.execute(request);\n\t}",
"public abstract void onCommand(MessageEvent context) throws Exception;",
"public abstract void setCommand(String cmd);",
"public Builder setCommand(int value) {\n bitField0_ |= 0x00000004;\n command_ = value;\n onChanged();\n return this;\n }",
"public void broadcastBuild(CellView buildPosition, Card godPower) throws IOExceptionFromController {\n for (PlayerController controller : playerControllers) {\n if (controller == null) continue;\n try {\n controller.getClient().displayBuild(buildPosition, godPower);\n } catch (IOException e) {\n checkDisconnection(e, controller);\n }\n }\n }",
"public abstract boolean commandExecution(CommandSender sender, String label, String[] args);",
"public String getCommand() { return command; }",
"@Override\n public void onClick(View v) {\n byte[] bytes = command.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 100000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"String getCommand();",
"private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }",
"@Override\n\tpublic void send(SseEventBuilder builder) throws IOException {\n\t\ttry {\n\t\t\tsuper.send(builder);\n\t\t} catch (IOException e) {\n\t\t\tgestioneDisconnessione(e);\n\t\t}\n\t}",
"public void setCommand(String command)\n {\n this.command = command;\n }",
"public void sendInfo(){\r\n\t\tfor(int i = 0; i < attachedChooser.getNumberOfCommandsInChooser(); i++){\r\n\t\t\tthis.writeStringData(i + \" \" + attachedChooser.getCommand(i).toString() + \">>>\"); // >>> denoted the end of the current command to the arduino\r\n\t\t}\r\n\t\tthis.writeStringData(\"!!!\"); //denoted to arduino that we have given it all of the commands and it can do its thing \r\n\t}",
"public void sendCommandToClient(Collection<RoMClient> clientsToSend, ServerCommand serverCommand) {\r\n \t\tLogger.logMessage(\"Sending Command \\\"\" + serverCommand + \"\\\"\");\r\n \r\n \t\t// Add Command to clients MessageQueue\r\n \t\tfor (RoMClient client : clientsToSend) {\r\n \t\t\tclient.addCommandToQueue(serverCommand);\r\n \t\t}\r\n \t}",
"public Builder setCommandBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n command_ = value;\n onChanged();\n return this;\n }",
"public MethodBuilder returnCommand(String command) {\n\t\treturn command(\"return \" + command);\n\t}",
"public void run() {\n\t\texecuteCommand( client, false );\n\t}",
"public abstract String getCommand();",
"private MsgExecuteContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"protected void executeCommand() {\n // build the type string\n StringBuilder stateString = new StringBuilder();\n StringBuilder moveNamesString = new StringBuilder();\n StringBuilder basicPieceString = new StringBuilder();\n StringBuilder factionRingString = new StringBuilder();\n\n // start the state string\n stateString.append(\"emb2;Activate;2;;;2;;;2;;;;1;false;0;-24;,\");\n basicPieceString.append(\"emb2;;2;;;2;;;2;;;;;false;0;0;\");\n\n String moveImage;\n String move = newMoveList.get(0);\n String moveWithoutSpeed = move.substring(1);\n moveImage = dialHeadingImages.get(moveWithoutSpeed);\n\n String speed = move.substring(0,1);\n String moveCode = move.substring(1,2);\n String moveName = maneuverNames.get(moveCode);\n\n basicPieceString.append(\"D2e_\" + xwsShipName + \".png\");\n basicPieceString.append(\";;false;Front Plate;;;false;;1;1;true;;;\");\n\n moveNamesString.append(moveName).append(\" \").append(speed);\n // add in move names\n stateString.append(moveImage);\n stateString.append(\";empty,\"+moveNamesString);\n\n // finish the type string\n stateString.append(\";false;Chosen Move;;;false;;1;1;true;65,130\");\n Embellishment chosenMoveEmb = (Embellishment)Util.getEmbellishment(piece,\"Layer - Chosen Move\");\n Embellishment chosenSpeedEmb = (Embellishment)Util.getEmbellishment(piece, \"Layer - Chosen Speed\");\n Embellishment fullDialEmb = (Embellishment)Util.getEmbellishment(piece, \"Layer - Front Plate\");\n Embellishment ringEmb = (Embellishment)Util.getEmbellishment(piece, \"Layer - Faction Ring\");\n\n factionRingString.append(\"emb2;;2;;;2;;;2;;;;;false;0;0;DialSelect_\");\n factionRingString.append(faction);\n factionRingString.append(\".png;;false;Faction Ring;;;false;;1;1;true;;;\");\n chosenSpeedEmb.setValue(Integer.parseInt(speed)+1);\n\n String injectDialString = \"\";\n int count=0;\n for(String moveItem : newMoveList) {\n count++;\n injectDialString+= moveItem;\n if(count!=newMoveList.size()) injectDialString+=\",\";\n }\n piece.setProperty(\"dialstring\",injectDialString);\n piece.setProperty(\"shipID\", associatedShipID);\n\n // chosen move embellishment looks like: emb2;Activate;2;;;2;;;2;;;;1;false;0;-24;,mFW.png;empty,move;false;Chosen Move;;;false;;1;1;true;65,130;;\n // chosen speed embell looks like: emb2;;2;;;2;;;2;;;;1;false;0;24;kimb5.png,,kimb0.png,kimb1.png,kimb2.png,kimb3.png,kimb4.png;5,empty,0,1,2,3,4;false;Chosen Speed;;;false;;1;1;true;;;\n // basic piece face plate looks like: emb2;;2;;;2;;;2;;;;;false;0;0;D2e_arc170starfighter.png;;false;Front Plate;;;false;;1;1;true;;;\n // faction ring looks like: emb2;;2;;;2;;;2;;;;;false;0;-6;DialSelect_rebelalliance.png;;false;Faction Ring;;;false;;1;1;true;;;\n\n chosenMoveEmb.mySetType(stateString.toString());\n chosenMoveEmb.setValue(1);\n\n fullDialEmb.mySetType(basicPieceString.toString());\n ringEmb.mySetType(factionRingString.toString());\n }",
"public String getCommand(){\n return command;\n }",
"String createCommand(String commandType, AttributeList properties);",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"private MessageUpdateMonsterByCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public String Command() {\n\treturn command;\n }",
"private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed\n String str = requestCommand.getText();\n sC.sendCommand(str); \n requestCommand.requestFocus();\n }",
"public void sendCommand(String command, Object... args) {\n if (args.length > 0) {\n command = MessageFormat.format(command, args);\n }\n qtellProgrammers(\" - {0}\", command);\n sendQuietly(command);\n }",
"private ActionCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private Command(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public void setCommand(String command) {\n _command = command;\n }",
"public void sendCommand(short[] commandBytes) {\n\t\tshort[] toSend = new short[commandBytes.length + 1];\n\t\ttoSend[0] = IAC;\n\t\tSystem.arraycopy(commandBytes, 0, toSend, 1, commandBytes.length);\n\t\toutWriter.write(toSend);\n\t}",
"private Command builder(Command command) {\n if (command.getArgCount() == 0) {\n return command; }\n else if (command.getClass().getName().equals(USER_COMMAND)) {\n return createUserCommand(command); }\n else if (command.getClass().getName().equals(LIST_START)) {\n return groupBuilder(new ListBody(), LIST_END); }\n else if (command.getClass().getName().equals(GROUP_START)) {\n command = this.commands.get(0);\n this.commands = this.commands.subList(1, this.commands.size());\n return groupBuilder(command, GROUP_END); }\n else if (this.commands.size() < command.getArgCount()) {\n return new Error(\"Not enough parameters for command \" + command.toString()); }\n else {\n for (int i = 0; i < command.getArgCount(); i++) {\n command.addParameter(getCommandTree());\n }\n return command;\n }\n }",
"boolean onCommand(CommandSender sender, String command, String[] args, Object... objects);",
"protected void execute() {\n command.start();\n }",
"private void SendCommandOrKeys(int viewID, String data)\n\t{\n\t\tif (mCommandManager == null)\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tif (viewID == VIEW_ID_COMMAND)\n\t\t{\n // In put case, select file\n if (data.contains(\"!put\"))\n {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"*/*\");\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n mPutCommand = data;\n\n try\n {\n startActivityForResult(Intent.createChooser(intent, \n\t\t\t\t\t\t\"Select a File\"), CHOOSE_FILE_TO_UPLOAD);\n } catch (android.content.ActivityNotFoundException ex)\n {\n ex.printStackTrace();\n }\n\n return ;\n }\n\n\t\t\tmCommandManager.SendCommand(data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAddMsgToKeyView(viewID, \"remote> \" + data + \"\\n\");\n\n if (data.equals(\"!autotest\"))\n {\n // Run android autotest\n AddMsgToKeyView(viewID, \"remote> wait until the test ends\\n\");\n RunAutoTest();\n }\n else if (data.equals(\"!pintest\"))\n {\n // Run android autotest\n AddMsgToKeyView(viewID, \"remote> wait until the test ends\\n\");\n RunPinTest();\n }\n else if (data.equals(\"!stoptest\"))\n {\n mStopTest = true;\n }\n else\n {\n mCommandManager.SendKey(data);\n }\n\t\t}\t\t\n\t}"
] |
[
"0.647401",
"0.64128816",
"0.62879467",
"0.6281284",
"0.62587386",
"0.6246814",
"0.61941546",
"0.6167285",
"0.6166969",
"0.6163471",
"0.61080575",
"0.609401",
"0.6082151",
"0.60425264",
"0.6010284",
"0.5994171",
"0.5964534",
"0.58982575",
"0.5833635",
"0.58258134",
"0.57999533",
"0.5796743",
"0.57949036",
"0.5789896",
"0.57614225",
"0.5752539",
"0.5725307",
"0.5723838",
"0.57223356",
"0.570846",
"0.570515",
"0.5702525",
"0.5692287",
"0.5670443",
"0.56694555",
"0.565486",
"0.56481344",
"0.5644463",
"0.5628489",
"0.562533",
"0.5619086",
"0.5605067",
"0.5597049",
"0.55847484",
"0.5583279",
"0.55721706",
"0.5564348",
"0.55590105",
"0.5543567",
"0.5531073",
"0.55171746",
"0.55138236",
"0.5505266",
"0.55004394",
"0.54962087",
"0.54859334",
"0.5485509",
"0.54823166",
"0.5466673",
"0.54661137",
"0.54636765",
"0.5459733",
"0.5456771",
"0.54550576",
"0.54535407",
"0.5448317",
"0.5424311",
"0.5422787",
"0.5422206",
"0.541997",
"0.54181075",
"0.5417917",
"0.54106134",
"0.53983474",
"0.5397505",
"0.53948015",
"0.53864914",
"0.5377118",
"0.5371217",
"0.53561324",
"0.5354134",
"0.535157",
"0.5351546",
"0.5347109",
"0.53452754",
"0.53395575",
"0.5336901",
"0.5336901",
"0.5336182",
"0.5333832",
"0.533279",
"0.5332074",
"0.532867",
"0.5328424",
"0.53212446",
"0.5318952",
"0.53179616",
"0.531297",
"0.5304399",
"0.53033274"
] |
0.7264593
|
0
|
TODO Autogenerated method stub
|
@Override
public int getMovingRange() {
return MAX_MOVE_RANGE;
}
|
{
"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
|
Creates new form UsersInF
|
public UsersInF() {
initComponents();
dao = new UsersDAO();
loadTableUsers(dao.readAll());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\tif (!name.equals(empty) && !lastName.equals(empty) && !id.equals(empty) && !username.equals(empty)\n\t\t\t\t&& !password.equals(empty)) {\n\t\t\tcreateSystemUser(name, lastName, id, username, password);\n\t\t\ttxtUserNames.setText(\"\");\n\t\t\ttxtUserSurnames.setText(\"\");\n\t\t\ttxtUserId.setText(\"\");\n\t\t\ttxtUserUsername.setText(\"\");\n\t\t\tPfUserPassword.setText(\"\");\n\t\t\t// labelUserMessage.setText(\"The user has been created\");\n\t\t} else if (name.equals(empty) && lastName.equals(empty) && id.equals(empty) && username.equals(empty)\n\t\t\t\t&& password.equals(empty)) {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public NewUser() {\n initComponents();\n }",
"public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}",
"@FXML\n private void openCreateUser(ActionEvent event) {\n CreateUserController createusercontroller = new CreateUserController();\n User user = createusercontroller.openCreateUser(event, roleTap);\n\n if (user != null) {\n userList.add(user);\n UsermanagementUtilities.setFeedback(event, user.getName().getFirstName()+LanguageHandler.getText(\"userCreated\"), true);\n } else {\n UsermanagementUtilities.setFeedback(event, LanguageHandler.getText(\"userNotCreated\"), false);\n\n }\n }",
"@RequestMapping(value = \"/addNewUser.html\", method = RequestMethod.GET)\n\tpublic ModelAndView addNewUser() {\n\n\t\treturn new ModelAndView(\"newUser\", \"form\", new FbUser());\n\n\t}",
"@RequestMapping(\"/newAppusers\")\n\tpublic ModelAndView newAppusers() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"appusers\", new Appusers());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"appusers/editAppusers.jsp\");\n\n\t\treturn mav;\n\t}",
"private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }",
"@RequestMapping(value = {\"/register\"}, method = RequestMethod.GET)\n public String newUser(ModelMap model) {\n User user = new User();\n Customer customer = new Customer();\n List<UserProfile> userProfileList = new ArrayList();\n user.setCustomer(customer);\n user.setUserProfileList(userProfileList);\n model.addAttribute(\"user\", user);\n model.addAttribute(\"edit\", false);\n model.addAttribute(\"action\", \"newuser\");\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n return \"registration\";\n }",
"@RequestMapping(value = { \"/new\" }, method = RequestMethod.GET)\r\n public String newuser(ModelMap model) {\r\n User user = new User();\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", false);\r\n return \"registration\";\r\n\r\n }",
"@GetMapping(\"/userAddForm\")\n\tpublic String userAddForm(Model theModel) {\n\t\tUser theUser = new User();\n\t\ttheModel.addAttribute(\"user\", theUser);\n\t\treturn \"registration-form\";\n\t}",
"@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"abc@xyz.com\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}",
"public NewUsers() {\n initComponents();\n currentTimeDate();\n }",
"public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}",
"public void newuserclicked(View view) {\n Intent myuserIntent = new Intent(this, UserCreation.class);\n startActivity(myuserIntent);\n }",
"private void newUser() {\n // TODO: Initial layout\n LayoutInflater layoutInflater = LayoutInflater.from(getActivity());\n View form = layoutInflater.inflate(R.layout.form_user, null);\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n alertDialogBuilder.setTitle(\"Thêm tài khoản\");\n alertDialogBuilder.setView(form);\n\n // TODO: Add controls\n editTextPhone = form.findViewById(R.id.editTextPhoneOnUserForm);\n editTextUsername = form.findViewById(R.id.editTextUsernameOnUserForm);\n editTextPassword = form.findViewById(R.id.editTextPasswordOnUserForm);\n editTextPassword2 = form.findViewById(R.id.editTextPassword2OnUserForm);\n\n // TODO: Add events\n alertDialogBuilder.setPositiveButton(\"Lưu\", null);\n alertDialogBuilder.setNegativeButton(\"Hủy\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n final AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.setOnShowListener(new DialogInterface.OnShowListener() {\n @Override\n public void onShow(final DialogInterface dialog) {\n Button buttonSave = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);\n buttonSave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final User user = getUser();\n if (user != null) {\n tableUser.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.child((user.getId())).exists()) {\n Toast.makeText(getActivity(), \"Số điện thoại đã tồn tại, xin nhập số khác\", Toast.LENGTH_LONG).show();\n } else {\n tableUser.child(user.getId()).setValue(user);\n dialog.dismiss();\n Toast.makeText(getActivity(), \"Thêm thành công\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n }\n }\n });\n }\n });\n alertDialog.show();\n }",
"@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}",
"@GetMapping(\"/showAddFormUser\")\n\tpublic String showAddForm(Model model) {\n\t\tUser user = new User();\n\t\tmodel.addAttribute(\"user\", user);\n\t\t\n\t\t// add page title\n\t\tmodel.addAttribute(\"pageTitle\", \"Add User\");\n\t\treturn \"user-form\";\n\t}",
"public adduser() {\n initComponents();\n }",
"@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}",
"@RequestMapping(value = \"/createUser\", method = RequestMethod.GET)\n\tpublic ModelAndView createUser(ModelMap model) throws CustomException {\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\t\tCollection<EndUser> endUsers = endUserDAOImpl.getList();\n\t\tList<Role> roles = endUserDAOImpl.findAll();\n\t\tmodel.put(\"roles\", roles);\n\n\t\tmodel.put(\"endUsers\", endUsers);\n\t\treturn new ModelAndView(\"createUser\", \"model\", model);\n\t}",
"@RequestMapping(value = { \"/newuser\" }, method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String newUser(ModelMap model) {\n\t\tUser user = new User();\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\treturn \"registration\";\n\t}",
"public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}",
"public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}",
"public UserForm(){ }",
"private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }",
"public void createUtilisateur(UtilisateurBean u) {\n\t}",
"private void submitNewUser() {\n\t\tboolean validationFlag = true;\n\t\tArrayList<HashMap<String, String>> signUpFields = new ArrayList<HashMap<String, String>>();\n\t\tint size = lnr_form.getChildCount();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tLinearLayout v = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tHashMap<String, String> field = (HashMap<String, String>) v.getTag();\n\n\t\t\tIjoomerEditText edtValue = null;\n\t\t\tSpinner spnrValue = null;\n\n\t\t\tif (field != null) {\n\t\t\t\tif (field.get(TYPE).equals(TEXT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEdit)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditArea)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditMap)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(\"type\").equals(LABEL)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrLabel)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\n\t\t\t\t\tif (edtValue.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\tif (!IjoomerUtilities.birthdateValidator(edtValue.getText().toString().trim())) {\n\t\t\t\t\t\t\tedtValue.setFocusable(true);\n\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_invalid_birth_date));\n\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\t\t\t\tif (field.get(TYPE).equals(TIME)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\n\t\t\t\tif (field.get(TYPE).equals(SELECT)) {\n\t\t\t\t\tspnrValue = (Spinner) ((LinearLayout) v.findViewById(R.id.lnrSpin)).findViewById(R.id.txtValue);\n\t\t\t\t\tfield.put(VALUE, spnrValue.getSelectedItem().toString());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Retype Password\")) {\n\t\t\t\t\tint len = lnr_form.getChildCount();\n\t\t\t\t\tfor (int j = 0; j < len; j++) {\n\t\t\t\t\t\tLinearLayout view = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) view.getTag();\n\t\t\t\t\t\tif (row.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Password\")) {\n\t\t\t\t\t\t\tString password = ((IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue)).getText().toString();\n\t\t\t\t\t\t\tif (password.equals(edtValue.getText().toString())) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_password_not_match));\n\t\t\t\t\t\t\t\tvalidationFlag = false;\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} else if (edtValue != null && edtValue.getText().toString().trim().length() <= 0 && (field.get(REQUIRED).equals(\"1\"))) {\n\t\t\t\t\tedtValue.setError(getString(R.string.validation_value_required));\n\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.put(VALUE, edtValue.getText().toString().trim());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validationFlag) {\n\t\t\tfinal SeekBar proSeekBar = IjoomerUtilities.getLoadingDialog(getString(R.string.dialog_loading_register_newuser));\n\t\t\tnew IjoomerRegistration(this).submitNewUser(signUpFields, new WebCallListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgressUpdate(int progressCount) {\n\t\t\t\t\tproSeekBar.setProgress(progressCount);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n\t\t\t\t\tif (responseCode == 200) {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile), getString(R.string.registration_successfully), getString(R.string.ok),\n\t\t\t\t\t\t\t\tR.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\"clearStackActivity\");\n\t\t\t\t\t\t\t\t\t\tintent.setType(\"text/plain\");\n\t\t\t\t\t\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\t\t\t\t\t\tIjoomerWebService.cookies = null;\n\n\t\t\t\t\t\t\t\t\t\tloadNew(IjoomerLoginActivity.class, IPropertyRegistrationActivity.this, true);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile),\n\t\t\t\t\t\t\t\tgetString(getResources().getIdentifier(\"code\" + responseCode, \"string\", getPackageName())), getString(R.string.ok), R.layout.ijoomer_ok_dialog,\n\t\t\t\t\t\t\t\tnew CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\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}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"public AddUser() {\n initComponents();\n }",
"public AddUser() {\n initComponents();\n }",
"public AddUser() {\n initComponents();\n }",
"@RequestMapping( method = RequestMethod.GET )\n\tpublic String showUserForm( ModelMap model, HttpServletRequest request ) {\n\t\tUsuario usuario = new Usuario();\n\t\tmodel.addAttribute( \"usuario\", usuario );\n\t\treturn \"Formulario\";\n\t}",
"public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}",
"public void new_user(){\n }",
"public void createAndAddUser(String fName, String lName){\n ModelPlayer user = new ModelPlayer(fName, lName);\n user.setUserID(this.generateNewId());\n userListCtrl.addUser(user);\n }",
"private void initialize(CurrentProfile newUser) {\n\t\tfrmSignUp = new JFrame();\n\t\tfrmSignUp.setResizable(false);\n\t\t//frmSignUp.setAlwaysOnTop(true);\n\t\tfrmSignUp.setTitle(\"SIGN UP (1/6)\");\n\t\tfrmSignUp.setBounds(100, 100, 557, 483);\n\t\tfrmSignUp.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmSignUp.getContentPane().setLayout(null);\n\t\tfrmSignUp.setVisible(true);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(12, 12, 531, 432);\n\t\tfrmSignUp.getContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\t//allfield[0] = new JTextField();\n\t\t//allfield[0].setBounds(165, 60, 246, 20);\n\t\t//panel.add(allfield[0]);\n\t\t\n\t\tJLabel lblName = new JLabel(\"NAME\");\n\t\tlblName.setBounds(33, 67, 46, 14);\n\t\tpanel.add(lblName);\n\t\t\n\t\tJLabel lblDob = new JLabel(\"D.O.B\");\n\t\tlblDob.setBounds(33, 121, 46, 14);\n\t\tpanel.add(lblDob);\n\t\t\n\t\tJLabel lblFatherName = new JLabel(\"FATHER'S NAME\");\n\t\tlblFatherName.setBounds(33, 167, 109, 14);\n\t\tpanel.add(lblFatherName);\n\t\t\n\t\tJLabel lblEmail = new JLabel(\"EMAIL\");\n\t\tlblEmail.setBounds(33, 222, 46, 14);\n\t\tpanel.add(lblEmail);\n\t\t\n\t\tJLabel lblSex = new JLabel(\"SEX\");\n\t\tlblSex.setBounds(33, 271, 46, 14);\n\t\tpanel.add(lblSex);\n\t\t\n\t\tJLabel lblPicture = new JLabel(\"PICTURE\");\n\t\tlblPicture.setBounds(33, 332, 74, 14);\n\t\tpanel.add(lblPicture);\n\t\t\n\t\tJLabel lblUid = new JLabel(\"UID\");\n\t\tlblUid.setBounds(384, 22, 107, 16);\n\t\tlblUid.setText(Integer.toString(newUser.uid));\n\t\tpanel.add(lblUid);\n\t\t\n\t\ttxtName1 = new JTextField();\n\t\ttxtName1.setBounds(158, 64, 163, 20);\n\t\tpanel.add(txtName1);\n\t\ttxtName1.setColumns(10);\n\t\t\n\t\tJRadioButton rdbtnMale = new JRadioButton(\"Male\");\n\t\trdbtnMale.setBounds(153, 267, 109, 23);\n\t\tpanel.add(rdbtnMale);\n\t\t\n\t\tJRadioButton rdbtnFemale = new JRadioButton(\"Female\");\n\t\trdbtnFemale.setBounds(356, 267, 109, 23);\n\t\tpanel.add(rdbtnFemale);\n\t\t\n\t\tButtonGroup group = new ButtonGroup();\n\t\tgroup.add(rdbtnMale);\n\t\tgroup.add(rdbtnFemale);\n\t\t\n\t\ttxtDate = new JTextField();\n\t\ttxtDate.setText(\"DD-MM-YYYY\");\n\t\ttxtDate.setBounds(158, 118, 333, 20);\n\t\tpanel.add(txtDate);\n\t\ttxtDate.setColumns(10);\n\t\t\n\t\ttxtFather = new JTextField();\n\t\ttxtFather.setBounds(160, 164, 331, 20);\n\t\tpanel.add(txtFather);\n\t\ttxtFather.setColumns(10);\n\t\t\n\t\ttxtEmail = new JTextField();\n\t\ttxtEmail.setBounds(158, 216, 333, 20);\n\t\tpanel.add(txtEmail);\n\t\ttxtEmail.setColumns(10);\n\t\t\n\t\tJButton btnSelect = new JButton(\"SELECT IMAGE\");\n\t\tbtnSelect.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\ttxtPhoto.setText(\"\");\n\t\t\t\tJFileChooser filechooser = new JFileChooser();\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\n\t\t\t\t \"Images\", \"jpg\",\"JPG\",\"GIF\", \"gif\",\"JPEG\",\"png\",\"PNG\");\n\t\t\t\tfilechooser.setFileFilter(filter);\n\t\t\t\t//ThumbNailView thumbsView = new ThumbNailView();\n\t\t\t\t//filechooser.setAccessory(new ImagePreview(filechooser));\n\t\t\t\tint returnVal = filechooser.showDialog(null,\"select an image\");\n\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION){\n\t\t\t\t\tfile = filechooser.getSelectedFile();\n\t\t\t\t\ttxtPhoto.setText(file.getPath());\n\t\t\t\t\tnewUser.picLoc=file.getPath();\n\t\t\t\t//\tnewUser.picName=file.getName();\n\t\t\t\t\tnewUser.picLoc=newUser.picLoc.replace(\"\\\\\", \"\\\\\\\\\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnSelect.setBounds(374, 326, 124, 26);\n\t\tpanel.add(btnSelect);\n\t\t\n\t\tJButton btnNext = new JButton(\">>\");\n\t\tbtnNext.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t//String name,father,dob,email,photo;\n\t\t\t\t\n\t\t\t\tboolean f=false;\n\t\t\t\t\n\t\t\t\tdo{\n\t\t\t\t\tnewUser.nameFirst=txtName1.getText();\n\t\t\t\t\tnewUser.nameLast=txtName2.getText();\n\t\t\t\t\n\t\t\t\t\tnewUser.father=txtFather.getText();\n\t\t\t\t\tnewUser.dob=txtDate.getText();\n\t\t\t\t\tnewUser.email=txtEmail.getText();\n\t\t\t\t\tnewUser.picLoc=file.getPath();//.getAbsolutePath();\n\t\t\t\t\t\n\t\t\t\t\tif(rdbtnFemale.isSelected()){\n\t\t\t\t\t\tnewUser.sex='f';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(rdbtnMale.isSelected()){\n\t\t\t\t\t\tnewUser.sex='m';\n\t\t\t\t\t}\n\t\t\t\t\tif(newUser.nameFirst.length()!=0&&newUser.father.length()!=0&&newUser.dob.length()!=0&&newUser.email.length()!=0&&newUser.picLoc.length()!=0&&newUser.sex!=0){\n\t\t\t\t\t\tf=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"enter every details!!!\");\n\t\t\t\t\t}\n\t\t\t\t}while(!f);\n\t\t\t\t/*try {\n\t\t\t\t\tf=newUser.l1Tableinsert();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"database connection error !!!\\t\"+e1);\n\t\t\t\t}\n\t\t\t\tif(!f)\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"database connection error !!!\\t\");\n\t\t\t\t*/\n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSignL2Panel window = new SignL2Panel(newUser);\n\t\t\t\t\t\t\twindow.frmSignUp2.setVisible(true);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tfrmSignUp.dispose();\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\tbtnNext.setBounds(433, 406, 98, 26);\n\t\tpanel.add(btnNext);\n\t\t\n\t\ttxtPhoto = new JTextField();\n\t\ttxtPhoto.setBounds(158, 329, 204, 20);\n\t\tpanel.add(txtPhoto);\n\t\ttxtPhoto.setColumns(10);\n\t\t\n\t\ttxtName2 = new JTextField();\n\t\ttxtName2.setBounds(333, 64, 158, 20);\n\t\tpanel.add(txtName2);\n\t\ttxtName2.setColumns(10);\n\t\t\n\t\t\n\t//\tpanel.setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{textField, datePicker, lblName, lblDob, lblFatherName, lblEmail, lblSex, lblPicture, rdbtnMale, rdbtnFemale}));\n\t\t//allfield[0].setColumns(10);\n\t\t\n\t}",
"protected void addUser(ActionEvent ae) {\n\t\tAddUsersFrm auf=new AddUsersFrm();\n\t\tauf.setVisible(true);\n\t\tdesktopPane.add(auf);\n\t}",
"public UserDialog(JFrame parent){\n\t\t\tsuper(parent, \"New user\");\n\t\t\tadd(new JPanel(), BorderLayout.NORTH);\n\t\t\tadd(new UserDatapanel(),BorderLayout.CENTER);\n\t\t\tadd(getButtonPanel(),BorderLayout.SOUTH);\n\t\t\tsetSize(500,300);\n\t\t}",
"public void createPersonalInfos(JFrame jFrame, ControllerAdmin controllerAdminPersonalInfos){\n JLabel jLabelAcount = new JLabel(\"Compte\");\n jLabelAcount.setBounds(20, 20, 100, 28);\n\n JLabel jLabelId = new JLabel(\"Identifiant :\");\n jLabelId.setBounds(40, 50, 300, 28);\n JTextField jTextFieldId = new JTextField(controllerAdminPersonalInfos.getUser().getId());\n jTextFieldId.setBounds(40, 80, 300, 28);\n\n JLabel jLabelLastName = new JLabel(\"Nom :\");\n jLabelLastName.setBounds(40, 110, 300, 28);\n JTextField jTextFieldLastName = new JTextField(controllerAdminPersonalInfos.getUser().getLastName());\n jTextFieldLastName.setBounds(40, 140, 300, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Prenom :\");\n jLabelFirstName.setBounds(40, 170, 300, 28);\n JTextField jTextFieldFirstName = new JTextField(controllerAdminPersonalInfos.getUser().getFirstName());\n jTextFieldFirstName.setBounds(40, 200, 300, 28);\n\n JLabel jLabelEmail = new JLabel(\"Email :\");\n jLabelEmail.setBounds(40, 230, 300, 28);\n JTextField jTextFieldEmail = new JTextField(controllerAdminPersonalInfos.getUser().getEmail());\n jTextFieldEmail.setBounds(40, 260, 300, 28);\n\n JLabel jLabelPassword = new JLabel(\"Mot de passe :\");\n jLabelPassword.setBounds(40, 290, 300, 28);\n JPasswordField jPasswordFieldPassword = new JPasswordField(controllerAdminPersonalInfos.getUser().getPassword());\n jPasswordFieldPassword.setBounds(40, 320, 300, 28);\n\n JButton jButtonModifPassword = new JButton(\"Modifier le mot de passe\");\n jButtonModifPassword.setBounds(350, 320, 200, 28);\n\n //set editabilite\n jTextFieldId.setEditable(false);\n jTextFieldLastName.setEditable(false);\n jTextFieldFirstName.setEditable(false);\n jTextFieldEmail.setEditable(false);\n jPasswordFieldPassword.setEditable(false);\n\n // Ajout des element à la JFrame\n jFrame.add(jLabelAcount);\n jFrame.add(jLabelId);\n jFrame.add(jTextFieldId);\n jFrame.add(jLabelLastName);\n jFrame.add(jTextFieldLastName);\n jFrame.add(jLabelFirstName);\n jFrame.add(jTextFieldFirstName);\n jFrame.add(jLabelEmail);\n jFrame.add(jTextFieldEmail);\n jFrame.add(jLabelPassword);\n jFrame.add(jButtonModifPassword);\n jFrame.add(jPasswordFieldPassword);\n\n jButtonModifPassword.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createModifPassword(jFrame, controllerAdminPersonalInfos);\n jFrame.repaint();\n }\n });\n\n jFrame.setLayout(null);\n jFrame.setVisible(true);\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public void onCreationEvent(UserCreateEvent event){\n user = new UserBean(event.getUser());\n }",
"public AddUserView() {\n initComponents();\n }",
"private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }",
"public frmUsuarios() {\n initComponents();\n mostrar(\"\");\n inhabilitar();\n }",
"public CreateProfile() {\n initComponents();\n }",
"public void newUser(User user);",
"@FXML\r\n\tvoid openCreateUser(ActionEvent event) {\r\n\t\tParent root = null;\r\n\t\tnewWindow = new Stage();\r\n\t\ttry {\r\n\t\t\troot = FXMLLoader.load(getClass().getResource(\"3.1-AddISUsersScreen.fxml\"));\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tISUsers = new Scene(root);\r\n\t\tnewWindow.setTitle(\"Create IS User\");\r\n\t\tnewWindow.setScene(ISUsers);\r\n\t\tnewWindow.setResizable(false);\r\n\t\tnewWindow.initOwner((Stage) ((Node) event.getSource()).getScene().getWindow());\r\n\t\tnewWindow.initModality(Modality.WINDOW_MODAL);\r\n\t\tnewWindow.show();\r\n\t}",
"public static createNewUser newInstance() {\n createNewUser fragment = new createNewUser();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public void newUserClicked(View view) {\r\n Intent intent = new Intent(this, SignUpActivity.class);\r\n startActivity(intent);\r\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tvista.FormInsertarUsuario formInsertarUser = new FormInsertarUsuario();\r\n\t\t\t\tformInsertarUser.main();\r\n\t\t\t}",
"private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"public VentanaDialogRegister(ListadoUsuarios listadoUsuarios) {\n\t\tgetContentPane().setLayout(null);\n\t\t\n\t\tthis.listadoUsuarios = listadoUsuarios;\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(new Color(0, 139, 139));\n\t\tpanel.setBounds(0, 0, 444, 271);\n\t\tgetContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\ttxtContrasea = new JPasswordField();\n\t\ttxtContrasea.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtContrasea.setBounds(183, 114, 113, 23);\n\t\tpanel.add(txtContrasea);\n\t\ttxtContrasea.setColumns(10);\n\t\t\n\t\ttxtNombreDeUsuario = new JTextField();\n\t\ttxtNombreDeUsuario.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtNombreDeUsuario.setBounds(183, 73, 113, 30);\n\t\tpanel.add(txtNombreDeUsuario);\n\t\ttxtNombreDeUsuario.setColumns(10);\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Registrar\");\n\t\t\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\n\t\t\t\t\tauxUsuario = listadoUsuarios.buscarUnUsuario(txtNombreDeUsuario.getText());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(auxUsuario==null){\n\t\t\t\t\tauxUsuario= new Usuario();\n\t\t\t\t\tauxUsuario.setAdmin(false);\n\t\t\t\t\tauxUsuario.setNombreU(txtNombreDeUsuario.getText());\n\t\t\t\t\tauxUsuario.setClave(txtContrasea.getText());\n\t\t\t\t\tlistadoUsuarios.agregarUsuario(auxUsuario);\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"USUARIO REGISTRADO\");\n\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"ERROR! ESE NOMBRE DE USUARIO YA EXISTE\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(172, 205, 124, 30);\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"REGISTRO DE USUARIOS\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tlblNewLabel.setBounds(134, 11, 196, 37);\n\t\tpanel.add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Nombre de Usuario:\");\n\t\tlblNewLabel_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1.setBounds(54, 76, 128, 23);\n\t\tpanel.add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"Clave:\");\n\t\tlblNewLabel_1_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1_1.setBounds(119, 113, 79, 23);\n\t\tpanel.add(lblNewLabel_1_1);\n\t}",
"private void createUser(String username) {\n if (TextUtils.isEmpty(username)) {\n Toast.makeText(this, \"Username Field Required!\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser();\n String userID = current_user.getUid();\n User user = new User(et_username.getText().toString(), et_gender.getText().toString(), \"Newbie\", \"Online\", \"Active\", userID, \"default_url\");\n mRef.child(mAuth.getCurrentUser().getUid()).setValue(user);\n }\n }",
"public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }",
"public CreateAccount() {\n initComponents();\n selectionall();\n }",
"@PostMapping(\"/users\")\n public UsersResponse createNewUser(@RequestBody NewUserRequest request) {\n User user = new User();\n user.setName(request.getName());\n user.setAge(request.getAge());\n user = userRepository.save(user);\n return new UsersResponse(user.getId(), user.getName() + user.getAge());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n lblPhoto = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n cbxRole = new javax.swing.JComboBox<>();\n txtUserID = new javax.swing.JTextField();\n txtUserName = new javax.swing.JTextField();\n txtPhone = new javax.swing.JTextField();\n txtEmail = new javax.swing.JTextField();\n btnChangePhoto = new javax.swing.JButton();\n btnClear = new javax.swing.JButton();\n btnCreate = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n txtPassword = new javax.swing.JPasswordField();\n txtConfirmPassword = new javax.swing.JPasswordField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel2.setText(\"Creating New User\");\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"User ID:\");\n\n lblPhoto.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n lblPhoto.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setText(\"Password:\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setText(\"User Name:\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel6.setText(\"Role:\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel7.setText(\"Phone:\");\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel8.setText(\"Email:\");\n\n cbxRole.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n txtUserID.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n txtUserName.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n txtPhone.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n txtEmail.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n btnChangePhoto.setText(\"Change Photo\");\n btnChangePhoto.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnChangePhotoActionPerformed(evt);\n }\n });\n\n btnClear.setText(\"Clear\");\n btnClear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnClearActionPerformed(evt);\n }\n });\n\n btnCreate.setText(\"Create\");\n btnCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateActionPerformed(evt);\n }\n });\n\n btnCancel.setText(\"Cancel\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel9.setText(\"Confirm Password:\");\n\n txtPassword.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n txtConfirmPassword.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(lblPhoto, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(btnChangePhoto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(txtUserName))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(txtUserID, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtConfirmPassword)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(cbxRole, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(txtEmail)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btnCreate)\n .addGap(18, 18, 18)\n .addComponent(btnClear)\n .addGap(18, 18, 18)\n .addComponent(btnCancel)\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtUserID, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(15, 15, 15)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtConfirmPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cbxRole, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnCreate, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnClear, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(lblPhoto, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnChangePhoto, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(18, Short.MAX_VALUE))\n );\n\n pack();\n }",
"@RequestMapping(value = \"/user/registrationForm\", method = RequestMethod.GET)\n\tpublic ModelAndView registrationForm(HttpServletRequest request) {\n\t\tlog.debug(\"User registration\");\n\t\tString communityId = \"-1\";\n\t\tModelAndView model=new ModelAndView(\"form/registration\",\"command\",new User()); \n\t\tmodel.addObject(\"selectedCommunity\", communityId);\n\t\treturn model; \n\t}",
"@RequestMapping(value = \"/addNewUser.html\", method = RequestMethod.POST)\n\tpublic String newUser(@Valid FbUser user, BindingResult bindingResult) {\n\t\t\n\t\tuserData.save(user);\n\t\treturn (\"redirect:/listUsers.html\");\n\n\t}",
"private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"ram@gmail.com\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"seth@gmail.com\", 50), new User(\"Sita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"ganesh@gmail.com\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"ram@gmail.com\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"seth@gmail.com\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"ganesh@gmail.com\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}",
"public void createUser(String name, String password, Boolean uBtn, Boolean eBtn){\n\t\t\n\t\tif(eBtn) {\n\t\t\tif(password.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter Password\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No password entered \" , \"Empty Password\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else if(name.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter UserName\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No UserName entered \" , \"Empty UserName\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else {\n\t\t\t\tEmployee e1 = new Employee(name);\n//\t\t\t\te1.setName(name);\n\t\t\t\t\n\t\t\t\tonlinestore.employeeList.put(e1, password);\n\t\t\t\tSystem.out.println(\"New Employee Created, Please login\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"New Employee Created. PLease Login Again\" , \"new Employee\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\n\t\t\t\tbuildEmployeeLoginGUI();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif(uBtn) {\n\t\t\t\n\t\t\tif(password.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter Password\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No password entered \" , \"Empty Password\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else if(name.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"Please enter UserName\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No UserName entered \" , \"Empty UserName\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"User radio button pressed\");\n\t\t\t\tCustomer c1 = new Customer(name);\n\t\t\t\t//c1.setName(name);\n\t\t\t\t\n\t\t\t\tonlinestore.customerList.put(c1, password);\n\t\t\t\t//System.out.println(\"New Customer Created, Please Login\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"New Customer Created. Please Login Again \" , \"new Customer\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tbuildCustomerLoginGUI();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}",
"public CambioUserN() {\n initComponents();\n }",
"public ProfilsFIForm() {\r\n\t\tsuper();\r\n\t}",
"private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}",
"public void register(String form /* should be a Form from GUI */){\n String email = \"email\";\n String nome_completo = \"full_name\";\n Date data_nascimento = new Date(1996-10-21);\n String password = getMd5(\"password\");\n String nif = \"nif\";\n String morada = \"morada\";\n String telemovel = \"telemovel\";\n User user = new User(email);\n if (!user.exists()){\n user.setNome_completo(nome_completo);\n user.setData_nascimento(data_nascimento);\n user.setPassword(password);\n user.setNif(nif);\n user.setMorada(morada);\n user.setTelemovel(telemovel);\n user.setAdmin(FALSE);\n //System registers person\n //db.register(user)\n }\n }",
"@RequestMapping(\"Home1\")\r\n\tpublic String createUser1(Model m) \r\n\t{\n\t\tm.addAttribute(\"employee\",new Employee());\r\n\t\treturn \"register\";//register.jsp==form action=register\r\n\t}",
"public ListOfUsers() {\n initComponents();\n }",
"@RequestMapping(value = \"/create\", method = { RequestMethod.POST })\r\n\tpublic ModelAndView create(HttpServletRequest request,\r\n\t\t\t@Valid @ModelAttribute(\"registerForm\") final UserRegisterForm form, final BindingResult errors,\r\n\t\t\tfinal @RequestParam CommonsMultipartFile[] fileUpload) {\r\n\t\tthis.userValidator.validate(form, errors);\r\n\t\tif (errors.hasErrors()) {\r\n\t\t\treturn register(form);\r\n\t\t}\r\n\t\t/*\r\n\t\t * Recoger los datos\r\n\t\t */\r\n\t\tInteger idTipo = null;\r\n\t\tString avatarTipo = \"\";\r\n\t\ttry {\r\n\t\t\tavatarTipo = request.getParameter(\"avatar_tipo\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tavatarTipo = \"0\";\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tidTipo = Integer.valueOf(avatarTipo);\r\n\t\t} catch (NumberFormatException ex) {\r\n\t\t\tidTipo = 0;\r\n\t\t}\r\n\t\t/*\r\n\t\t * Crear el usuario\r\n\t\t */\r\n\t\tUser user = us.createUser(form.getTelf(), form.getEmail(), form.getCity(), form.getCountry(), form.getCode(),\r\n\t\t\t\tform.getUsername(), passwordEncoder.encode(form.getPassword()), form.getDireccion(), idTipo, \"\",\r\n\t\t\t\tfileUpload, form.getLat(), form.getLon());\r\n\t\t/*\r\n\t\t * Comprovar el login del usuario\r\n\t\t */\r\n\t\tboolean login = false;\r\n\t\ttry {\r\n\t\t\tlogin = autoLogin(form.getUsername(), form.getPassword(), request);\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn (new ModelAndView(\"error\"))\r\n\t\t\t\t\t.addObject(\"body\",\r\n\t\t\t\t\t\t\tmessageSource.getMessage(\"error.403.title\", null, LocaleContextHolder.getLocale()))\r\n\t\t\t\t\t.addObject(\"title\",\r\n\t\t\t\t\t\t\tmessageSource.getMessage(\"error.403.body\", null, LocaleContextHolder.getLocale()));\r\n\t\t}\r\n\t\tif (login) {\r\n\t\t\treturn new ModelAndView(\"redirect:/users/\" + user.getUserId());\r\n\t\t}\r\n\t\treturn new ModelAndView(\"redirect:/users/login\");\r\n\t}",
"public eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser addNewCreateUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser target = null;\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().add_element_user(CREATEUSER$0);\n return target;\n }\n }",
"public void registerUser(RegisterForm form) throws DAOException;",
"@FXML void saveUser(ActionEvent e) {\n\t\tString userName = userNameTxt.getText().trim();\n\t\t\n\t\tif(userName.isEmpty()) {\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setContentText(\"User name cannot be blank.\");\n alert.showAndWait();\n\t\t}else {\n\t\t\t/*if(userList.contains(user)) {\n\t\t\t\t//give error\n\t\t\t\tuserNameTxt.clear();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tuserList.add(user);\n\t\t\t\tSystem.out.println(userList.toString());\n\t\t\t\tuserNameTxt.clear();\n\t\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\t//userList.add(user);\n\t\t\t\n\t\t\t//checks if user is in list\n\t\t\tif(userInList(userName)) {\n\t\t\t\t\n\t\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t alert.setTitle(\"Error\");\n\t alert.setContentText(\"User name already exists.\");\n\t alert.showAndWait();\n\t\t\t\tuserNameTxt.clear();\n\t\t\t}else {\n\t\t\t\tUser user = new User(userName);\n\t\t\t\tuserList.add(user);\n\t\t\t\tuserNameTxt.clear();\n\t\t\t\t//userListView.refresh();\n\t\t\t\tuserListView.setItems(userList);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\thideAdditionElements();\n\t}",
"public ConfirmUser(TextField tfUserName, TextField tfEmail,\r\n TextField tfFirstName, TextField tfLastName, PasswordField pfPassword) {\r\n\r\n this.txtUserName.setText(String.valueOf(tfUserName.getText()));\r\n this.txtEmail.setText(String.valueOf(tfEmail.getText()));\r\n this.txtFirstName.setText(String.valueOf(tfFirstName.getText()));\r\n this.txtLastName.setText(String.valueOf(tfLastName.getText()));\r\n this.txtPassword.setText(String.valueOf(pfPassword.getText()));\r\n }",
"public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}",
"public void createUser(User user) {\n\n\t}",
"public AbsenFrm() {\n initComponents();\n setLocationRelativeTo(null);\n loadUser();\n \n \n \n }",
"void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }",
"@GetMapping(\"/registration\")\n public String registration(Model model) {\n \t\n model.addAttribute(\"userForm\", new User());\n\n return \"registration\";\n }",
"public void creatUser(String name, String phone, String email, String password);",
"public signup() {\n initComponents();\n }",
"public NewUserPanel() throws Exception {\n\t\tdatabase = new Database();\n\t\t\n\t\ttxtEmailAddress = new JTextField();\n\t\ttxtEmailAddress.setText(\"Email Address\");\n\t\ttxtEmailAddress.setColumns(10);\n\t\ttxtEmailAddress.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n txtEmailAddress.setText(\"\");\n }\n });\n\t\t\n\t\ttxtPassword = new JTextField();\n\t\ttxtPassword.setText(\"Password\");\n\t\ttxtPassword.setColumns(10);\n\t\ttxtPassword.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \ttxtPassword.setText(\"\");\n }\n });\n\t\t\n\t\ttxtConfirmPassword = new JTextField();\n\t\ttxtConfirmPassword.setText(\"Confirm Password\");\n\t\ttxtConfirmPassword.setColumns(10);\n\t\ttxtConfirmPassword.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \ttxtConfirmPassword.setText(\"\");\n }\n });\n\t\t\n\t\ttxtBirthdayxxxxxxxx = new JTextField();\n\t\ttxtBirthdayxxxxxxxx.setText(\"Birthday (YYYY-MM-DD)\");\n\t\ttxtBirthdayxxxxxxxx.setColumns(12);\n\t\ttxtBirthdayxxxxxxxx.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \ttxtBirthdayxxxxxxxx.setText(\"\");\n }\n });\n\t\t\n\t\ttxtDisplayName = new JTextField();\n\t\ttxtDisplayName.setText(\"Display Name\");\n\t\ttxtDisplayName.setColumns(10);\n\t\ttxtDisplayName.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \ttxtDisplayName.setText(\"\");\n }\n });\n\t\t\n\t\tJCheckBox chckbxMusicArtist = new JCheckBox(\"Music Artist\");\n\t\t\n\t\tJCheckBox chckbxProducer = new JCheckBox(\"Producer\");\n\t\t\n\t\tJButton btnNext = new JButton(\"Next ->\");\n\t\tbtnNext.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) { \n\t\t\t //Check booleans\n\t\t\t\tif (chckbxMusicArtist.isSelected() && !chckbxProducer.isSelected()) {\n\t\t\t\t\t//Music artist only\n\t\t\t\t\tString recordCompany = JOptionPane.showInputDialog(getParent(),\n\t\t\t\t\t\t \"Who is your record company? (Leave blank if not signed).\");\n\t\t\t\t\t\n\t\t\t\t\tString password = txtPassword.getText();\n\t\t\t\t\tString copyPassword = txtConfirmPassword.getText();\n\t\t\t\t\tif (password.equals(copyPassword)) {\n\t\t\t\t\t\t// Creating normal user\n\t\t\t\t\t\tString email = txtEmailAddress.getText();\n\t\t\t\t\t\tString displayName = txtDisplayName.getText();\n\t\t\t\t\t\tString dob = txtBirthdayxxxxxxxx.getText();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tConnection con = database.getConnection();\n\t\t\t\t\t\t\tPreparedStatement insert = con.prepareStatement(\"INSERT INTO User VALUES ('\"+email+\"', '\"+password+\"', '\"+displayName+\"', '\"+ dob +\"');\");\t\t\t\t\t\t\t\t\tinsert.executeUpdate();\n\t\t\t\t\t\t\tinsert.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception error) {\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tConnection con = database.getConnection();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPreparedStatement insertArt = con.prepareStatement(\"INSERT INTO Artist VALUES ('\" + email + \"', '\" + recordCompany + \"');\");\n\t\t\t\t\t\t\tinsertArt.executeUpdate();\n\t\t\t\t\t\t\t// Display Finished Screen\n\t\t\t\t\t\t\tFinishedNewUserPanel finish = new FinishedNewUserPanel();\n\t\t\t\t\t\t\tJFrame frame = (JFrame) getTopLevelAncestor();\n\t\t\t\t\t\t\tframe.setContentPane(finish);\n\t\t\t\t\t\t\tframe.repaint();\n\t\t\t\t\t\t\tframe.printAll(frame.getGraphics());\n\t\t\t\t\t\t} catch (Exception error) {\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(getParent(),\n\t\t\t\t\t\t\t \"Passwords do not match.\");\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else if (!chckbxMusicArtist.isSelected() && chckbxProducer.isSelected()) {\n\t\t\t\t\t//Producer only\n\t\t\t\t\tString companyName = JOptionPane.showInputDialog(getParent(),\n\t\t\t\t\t\t \"What is your company name?\");\n\t\t\t\t\tString contactInfo = JOptionPane.showInputDialog(getParent(), \n\t\t\t\t\t\t\t\"Contact Information?\");\n\t\t\t\t\t\n\t\t\t\t\tString password = txtPassword.getText();\n\t\t\t\t\tString copyPassword = txtConfirmPassword.getText();\n\t\t\t\t\tif (password.equals(copyPassword)) {\n\t\t\t\t\t\t// Creating normal user\n\t\t\t\t\t\tString email = txtEmailAddress.getText();\n\t\t\t\t\t\tString displayName = txtDisplayName.getText();\n\t\t\t\t\t\tString dob = txtBirthdayxxxxxxxx.getText();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tConnection con = database.getConnection();\n\t\t\t\t\t\t\tPreparedStatement insert = con.prepareStatement(\"INSERT INTO User VALUES ('\"+email+\"', '\"+password+\"', '\"+displayName+\"', '\"+ dob +\"');\");\t\t\t\t\t\t\t\t\tinsert.executeUpdate();\n\t\t\t\t\t\t\tinsert.executeUpdate();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception error) {\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tConnection con = database.getConnection();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPreparedStatement insertPro = con.prepareStatement(\"INSERT INTO Producer VALUES ('\" + email + \"', '\" + companyName + \"', '\" + contactInfo + \"');\");\n\t\t\t\t\t\t\tinsertPro.executeUpdate();\n\t\t\t\t\t\t\t// Display Finished Screen\n\t\t\t\t\t\t\tFinishedNewUserPanel finish = new FinishedNewUserPanel();\n\t\t\t\t\t\t\tJFrame frame = (JFrame) getTopLevelAncestor();\n\t\t\t\t\t\t\tframe.setContentPane(finish);\n\t\t\t\t\t\t\tframe.repaint();\n\t\t\t\t\t\t\tframe.printAll(frame.getGraphics());\n\t\t\t\t\t\t} catch (Exception error) {\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(getParent(),\n\t\t\t\t\t\t\t \"Passwords do not match.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (chckbxMusicArtist.isSelected() && chckbxProducer.isSelected()) {\n\t\t\t\t\t//Both\n\t\t\t\t\tJOptionPane.showMessageDialog(getParent(), \"Cannot be both a artist and a producer\");\n\t\t\t\t} else {\n\t\t\t\t\t//None\n\t\t\t\t\tString password = txtPassword.getText();\n\t\t\t\t\tString copyPassword = txtConfirmPassword.getText();\n\t\t\t\t\tif (password.equals(copyPassword)) {\n\t\t\t\t\t\t// Creating normal user\n\t\t\t\t\t\tString email = txtEmailAddress.getText();\n\t\t\t\t\t\tString displayName = txtDisplayName.getText();\n\t\t\t\t\t\tString dob = txtBirthdayxxxxxxxx.getText();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tConnection con = database.getConnection();\n\t\t\t\t\t\t\tPreparedStatement insert = con.prepareStatement(\"INSERT INTO User VALUES ('\"+email+\"', '\"+password+\"', '\"+displayName+\"', '\"+ dob +\"');\");\t\t\t\t\t\t\t\t\tinsert.executeUpdate();\n\t\t\t\t\t\t\tinsert.executeUpdate();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Display Finished Screen\n\t\t\t\t\t\t\tFinishedNewUserPanel finish = new FinishedNewUserPanel();\n\t\t\t\t\t\t\tJFrame frame = (JFrame) getTopLevelAncestor();\n\t\t\t\t\t\t\tframe.setContentPane(finish);\n\t\t\t\t\t\t\tframe.repaint();\n\t\t\t\t\t\t\tframe.printAll(frame.getGraphics());\n\t\t\t\t\t\t} catch (Exception error) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(getParent(),\n\t\t\t\t\t\t\t\t \"This email address has already been registered!\");\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(getParent(),\n\t\t\t\t\t\t\t \"Passwords do not match.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJLabel lblNewUser = new JLabel(\"New User\");\n\t\t\n\t\tJButton button = new JButton(\"<- Back\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) { \n\t\t\t //Return back to Login Screen\n\t\t\t\tLoginPanel back;\n\t\t\t\ttry {\n\t\t\t\t\tback = new LoginPanel();\n\t\t\t\t\tJFrame frame = (JFrame) getTopLevelAncestor();\n\t\t\t\t\tframe.setContentPane(back);\n\t\t\t\t\tframe.repaint();\n\t\t\t\t\tframe.printAll(frame.getGraphics());\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\t\n\t\tGroupLayout groupLayout = new GroupLayout(this);\n\t\tgroupLayout.setHorizontalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addContainerGap(230, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(button)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(btnNext)\n\t\t\t\t\t.addContainerGap())\n\t\t\t\t.addGroup(Alignment.LEADING, groupLayout.createSequentialGroup()\n\t\t\t\t\t.addGap(35)\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(lblNewUser)\n\t\t\t\t\t\t.addComponent(chckbxProducer)\n\t\t\t\t\t\t.addComponent(chckbxMusicArtist)\n\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t.addComponent(txtDisplayName, Alignment.LEADING)\n\t\t\t\t\t\t\t.addComponent(txtBirthdayxxxxxxxx, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(txtConfirmPassword, Alignment.LEADING)\n\t\t\t\t\t\t\t.addComponent(txtPassword, Alignment.LEADING)\n\t\t\t\t\t\t\t.addComponent(txtEmailAddress, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 371, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t.addContainerGap(44, Short.MAX_VALUE))\n\t\t);\n\t\tgroupLayout.setVerticalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addGap(20)\n\t\t\t\t\t.addComponent(lblNewUser)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(txtEmailAddress, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(txtPassword, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(txtConfirmPassword, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(txtBirthdayxxxxxxxx, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(txtDisplayName, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(chckbxMusicArtist)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(chckbxProducer)\n\t\t\t\t\t\t\t.addContainerGap(36, Short.MAX_VALUE))\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 189, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(btnNext)\n\t\t\t\t\t\t\t\t.addComponent(button))\n\t\t\t\t\t\t\t.addContainerGap())))\n\t\t);\n\t\tsetLayout(groupLayout);\n\n\t}",
"public Sign_Up() {\n initComponents();\n }",
"public void addNewUserEntry(View v){\n Intent invoer;\n invoer = new Intent(getBaseContext(),InvoerActivity.class);\n startActivity(invoer);\n }",
"UserCreateResponse createUser(UserCreateRequest request);",
"@Override\n\tpublic String createUser(User users) {\n\t\tuserRepository.save(users);\n\t\treturn \"Save Successful\";\n\t}",
"public Sign_up() {\n initComponents();\n }",
"public void createUser(User user);",
"public void gotoCreateUser(){\n try {\n FXMLCreateUserController verCreateUser = (FXMLCreateUserController) replaceSceneContent(\"FXMLCreateUser.fxml\");\n verCreateUser.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public FormInserir() {\n initComponents();\n }",
"@GetMapping(\"/registration\")\n\t public String registration(Model model) {\n\t model.addAttribute(\"userForm\", new User());\n\t return \"registration\";\n\t }",
"@GetMapping(\"register\")\n public String registerForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"register_form\";\n }",
"private void addUser(HttpServletRequest req) throws PolygonException {\n //int id = Integer.parseInt(req.getParameter(\"id\"));\n String username = (String) req.getParameter(\"username\");\n String password = (String) req.getParameter(\"password\");\n String password2 = (String) req.getParameter(\"password2\");\n String email = (String) req.getParameter(\"email\");\n String type = (String) req.getParameter(\"type\");\n if (username.length() > 0 && password.length() > 0 && password.equals(password2) && type.length() > 0) {\n User user = new User(username, password, email, type);\n UsersMapper.insertUser(user);\n } else {\n String msg = \"Udfyld alle krævede felter\";\n throw new PolygonException(msg);\n }\n }",
"@RequestMapping(value = \"/displayUserForm\", method = RequestMethod.GET)\n public String displayUserForm(Model model) {\n User user = new User();\n model.addAttribute(\"user\", user);\n return \"admin/addUser\";\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\", \"deprecation\" })\r\n\tprotected void btnCreateactionPerformed() {\n\t\tif ((confirmpasswordcreatejTextField.getText()).equals(passwordcreatejPasswordField.getText()))\r\n\t\t{\r\n\t\t\tjava.sql.Connection conObj = JdbcConnect.createConnection();\r\n\t\t\tjava.sql.ResultSet rs = null;\r\n\t\t\ttry {\r\n\t\t\t\trs = JdbcSelectUname.selectRecordFromTable(conObj,usrname);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"Internal Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif (rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\t\tString role = (String) rolecreatejComboBox.getSelectedItem();\r\n\t\r\n\t\t\t\t\t\tjava.util.Vector add_rows = new java.util.Vector();\r\n\t\t\t\t\t\t//adding new user details to the Vector_add_rows\r\n\t\t\t\t\t\tadd_rows.add(unamecreatejTextField.getText());\r\n\t\t\t\t\t\tadd_rows.add(passwordcreatejPasswordField.getText());\r\n\t\t\t\t\t\tadd_rows.add(passHintTextField.getText());\r\n\t\t\t\t\t\tadd_rows.add(role);\r\n\t\r\n\t\t\t\t\t\tint i = JdbcCreateUser.insertRecords(conObj,add_rows);\r\n\t\r\n\t\t\t\t\t\tif (i!=1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"User@\"+unamecreatejTextField.getText()+\" not created\\nPlease try again...\", \"User@\"+unamecreatejTextField.getText()+\" error\", javax.swing.JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"User@\"+unamecreatejTextField.getText()+\" added to the system\", \"User@\"+unamecreatejTextField.getText()+\" success message\", javax.swing.JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}//rs.next() if statement;\r\n\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Access denied! User@\"+usrname+\" not granted to create new users\", \"User@\"+usrname+\" authentication error\", javax.swing.JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t} catch (HeadlessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\telse {\r\n\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Access Denied! The given password do not match\", \"Mismatch error\", javax.swing.JOptionPane.ERROR_MESSAGE);\t\t\t\t\t\t\r\n\t\t}\t\t\t\t\r\n\t}",
"public SignUp() {\n initComponents();\n }",
"public SignUp() {\n initComponents();\n }",
"public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"void onFragmentAddNewUser();",
"public SignUpForm(Context ctx) {\n super(ctx);\n init();\n }",
"public void addUser(ArrayList<User> users) {\n comboCreateBox.removeAllItems();\n for (User usr : users) {\n comboCreateBox.addItem(usr.getUsername());\n }\n }",
"@RequestMapping(value = \"/join\", method = RequestMethod.POST)\n public String createUser(@RequestBody UserDto userDto, Model model) {\n if (userDto == null) {\n return \"user1\";\n }\n User user = new User();\n user.setEmail(userDto.getEmail());\n user.setPass(userDto.getPass());\n userService.createUser(user);\n model.addAttribute(\"email\", user.getEmail());\n model.addAttribute(\"pass\", user.getPass());\n return \"one_product\";\n }"
] |
[
"0.6824466",
"0.6777332",
"0.67661583",
"0.6722817",
"0.6607376",
"0.6595028",
"0.65728056",
"0.6534276",
"0.65245336",
"0.64884037",
"0.64635247",
"0.6435986",
"0.64056903",
"0.64035034",
"0.6379527",
"0.6373228",
"0.6336719",
"0.63277465",
"0.63275003",
"0.63198805",
"0.6316876",
"0.62998056",
"0.6289118",
"0.628782",
"0.623225",
"0.62116206",
"0.6190689",
"0.6186104",
"0.618593",
"0.618593",
"0.618593",
"0.6174288",
"0.61651504",
"0.61489576",
"0.61390465",
"0.6121162",
"0.6120003",
"0.6117076",
"0.6098059",
"0.6088121",
"0.6082741",
"0.60825396",
"0.6060487",
"0.60586995",
"0.60449773",
"0.6016793",
"0.5982598",
"0.59702295",
"0.59510124",
"0.59489375",
"0.5936904",
"0.5933598",
"0.59323484",
"0.59207577",
"0.5920119",
"0.59113425",
"0.5911149",
"0.5907057",
"0.59057987",
"0.59052414",
"0.58986574",
"0.58957875",
"0.5893997",
"0.58805454",
"0.5880544",
"0.5878101",
"0.5868144",
"0.586648",
"0.58634317",
"0.5855855",
"0.5855481",
"0.58489084",
"0.5847631",
"0.5841183",
"0.58404875",
"0.5827185",
"0.58258086",
"0.58065295",
"0.5800453",
"0.5800364",
"0.5785981",
"0.5778836",
"0.5771036",
"0.57656366",
"0.5764179",
"0.57629836",
"0.5758511",
"0.5756579",
"0.57549983",
"0.57497615",
"0.574529",
"0.57296187",
"0.57259244",
"0.57223296",
"0.57223296",
"0.5717759",
"0.5713028",
"0.5710604",
"0.5701989",
"0.5700502"
] |
0.5983658
|
46
|
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
|
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
txtId = new javax.swing.JTextField();
txtUsersName = new javax.swing.JTextField();
txtPassword = new javax.swing.JTextField();
txtRoleId = new javax.swing.JTextField();
btnCreate = new javax.swing.JButton();
btnRefresh = new javax.swing.JButton();
btnUpdate = new javax.swing.JButton();
btnDelete = new javax.swing.JButton();
spnMain = new javax.swing.JScrollPane();
tblMain = new javax.swing.JTable();
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Users"));
jLabel1.setText("Id :");
jLabel2.setText("UsersName :");
jLabel3.setText("Password :");
jLabel4.setText("RoleId :");
btnCreate.setText("Create");
btnCreate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCreateActionPerformed(evt);
}
});
btnRefresh.setText("Refresh");
btnRefresh.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRefreshActionPerformed(evt);
}
});
btnUpdate.setText("Update");
btnUpdate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnUpdateActionPerformed(evt);
}
});
btnDelete.setText("Delete");
btnDelete.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDeleteActionPerformed(evt);
}
});
tblMain.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
tblMain.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tblMainMouseClicked(evt);
}
});
spnMain.setViewportView(tblMain);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(spnMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(60, 60, 60)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4))
.addGap(48, 48, 48)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(txtId, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
.addComponent(txtUsersName)
.addComponent(txtPassword)
.addComponent(txtRoleId)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(88, 88, 88)
.addComponent(btnCreate)
.addGap(46, 46, 46)
.addComponent(btnRefresh)
.addGap(50, 50, 50)
.addComponent(btnUpdate)
.addGap(38, 38, 38)
.addComponent(btnDelete))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(28, 28, 28)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtUsersName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(25, 25, 25)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(22, 22, 22)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(txtRoleId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(65, 65, 65)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnCreate)
.addComponent(btnRefresh)
.addComponent(btnUpdate)
.addComponent(btnDelete))
.addGap(80, 80, 80)
.addComponent(spnMain, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Oddeven() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public kunde() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] |
[
"0.73191476",
"0.72906625",
"0.72906625",
"0.72906625",
"0.72860986",
"0.7248112",
"0.7213479",
"0.72078276",
"0.7195841",
"0.71899796",
"0.71840525",
"0.7158498",
"0.71477973",
"0.7092748",
"0.70800966",
"0.70558053",
"0.69871384",
"0.69773406",
"0.69548076",
"0.69533914",
"0.6944929",
"0.6942576",
"0.69355655",
"0.6931378",
"0.6927896",
"0.69248974",
"0.6924723",
"0.69116884",
"0.6910487",
"0.6892381",
"0.68921053",
"0.6890637",
"0.68896896",
"0.68881863",
"0.68826133",
"0.68815064",
"0.6881078",
"0.68771756",
"0.6875212",
"0.68744373",
"0.68711984",
"0.6858978",
"0.68558776",
"0.6855172",
"0.6854685",
"0.685434",
"0.68525875",
"0.6851834",
"0.6851834",
"0.684266",
"0.6836586",
"0.6836431",
"0.6828333",
"0.68276715",
"0.68262815",
"0.6823921",
"0.682295",
"0.68167603",
"0.68164384",
"0.6809564",
"0.68086857",
"0.6807804",
"0.6807734",
"0.68067646",
"0.6802192",
"0.67943805",
"0.67934304",
"0.6791657",
"0.6789546",
"0.6789006",
"0.67878324",
"0.67877173",
"0.6781847",
"0.6765398",
"0.6765197",
"0.6764246",
"0.6756036",
"0.6755023",
"0.6751404",
"0.67508715",
"0.6743043",
"0.67387456",
"0.6736752",
"0.67356426",
"0.6732893",
"0.6726715",
"0.6726464",
"0.67196447",
"0.67157453",
"0.6714399",
"0.67140275",
"0.6708251",
"0.6707117",
"0.670393",
"0.6700697",
"0.66995865",
"0.66989213",
"0.6697588",
"0.66939527",
"0.66908985",
"0.668935"
] |
0.0
|
-1
|
Constructor for private EMPTY member. Complies with Java8.
|
private Optional() {
this.value = null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public EmptyType() {\n super(\"<EMPTY>\");\n }",
"public Member() {\n //Empty constructor!\n }",
"public Member() {}",
"public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }",
"private NullSafe()\n {\n super();\n }",
"public None()\n {\n \n }",
"private Default()\n {}",
"Member() {}",
"@SuppressWarnings(\"unused\")\n public Item() {\n }",
"public Member() {\r\n\t}",
"@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}",
"public StructMember() { }",
"private EmptySet() {}",
"private EmptySortedSet() {\n }",
"public Person()\n {\n //intentionally left empty\n }",
"private Helper() {\r\n // empty\r\n }",
"default Empty getEmptyObject() {\n return null;\n }",
"public EmptyException() {\n super();\n }",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"public Pleasure() {\r\n\t\t}",
"private Value() {\n\t}",
"private Helper() {\r\n // do nothing\r\n }",
"public Holder() {\n }",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"private InternalStorage() {}",
"private PropertyHolder() {\n }",
"private Message(){\n // default constructor\n }",
"public Generic(){\n\t\tthis(null);\n\t}",
"@Override\n\tpublic void setEmpty() {\n\t\t\n\t}",
"static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }",
"protected abstract T _createEmpty(DeserializationContext ctxt);",
"private Node() {\n // Start empty.\n element = null;\n }",
"private NoValue(K key) {\n this.key = key;\n }",
"private Tuples() {\n // prevent instantiation.\n }",
"private Node() {\n\n }",
"O() { super(null); }",
"private Public() {\n super(\"public\", null);\n }",
"public Builder()\n {\n this(\"\", \"\");\n }",
"void setEmpty() {\n this.lo = 1;\n this.hi = 0;\n }",
"private Builder()\n {\n }",
"private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }",
"public static NonpositiveRequiredCapabilityMatch newEmptyMatch() {\r\n return new Mutable(null, null, null, null);\r\n }",
"public EpMember() {\n this(\"ep_member\", null);\n }",
"public void setEmpty(){this.empty = true;}",
"MyEncodeableWithoutPublicNoArgConstructor() {}",
"defaultConstructor(){}",
"private SingleObject()\r\n {\r\n }",
"private E() {}",
"private Rekenhulp()\n\t{\n\t}",
"public Pair() {\n // nothing to do here\n }",
"void DefaultConstructor(){}",
"public Data() {}",
"public Pitonyak_09_02() {\r\n }",
"private Item(){}",
"private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"private Zeroes() {\n // This space intentionally left blank.\n }",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"public Basic() {}",
"private Sequence() {\n this(\"<Sequence>\", null, null);\n }",
"public Pair() {\r\n\t}",
"public Q1PrivateStudent() {\n\t\tthis(\"No Name\", 000, \"Not Set\");\n\t}",
"public AllDifferent()\n {\n this(0);\n }",
"private Const() {\n }",
"public BabbleValue() {}",
"public abstract void makeEmpty();",
"public EmptyBinarySearchTree()\n {\n\n }",
"public void makeEmpty();",
"public void makeEmpty();",
"private SingleObject(){}",
"public GenericElement() {\n\t}",
"public Method() {\n }",
"private R() {\n\n }",
"public EmptyMessageProcessor() {\n\n }",
"private AccessList() {\r\n\r\n }",
"private Builder() {}",
"private Builder() {\n }",
"private Builder() {\n }",
"private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}",
"private Composite() {\n }",
"private Utility() {\n\t}",
"public State()\n {\n this(\"\");\n }",
"public D() {}",
"@SuppressWarnings(\"unused\")\n private Booking() {\n }",
"private CommonMethods() {\n }",
"public Dot() {\n super(SOME, NONE); // a deliberate lie\n }",
"public NullUnit() {\n super(1, 0, new InvalidLocation(), 0);\n }",
"public Member() {\n this(DSL.name(\"member\"), null);\n }",
"public Stat()\n {\n // empty constructor\n }",
"@Unreachable\n private Enums()\n {\n // Empty default ctor, defined to override access scope.\n }",
"public C23317d() {\n }",
"public BasicElementList() {\n\t}",
"private Token () { }",
"private Ex() {\n }",
"public Vector() {\n construct();\n }",
"public Potencial() {\r\n }",
"public MultiChannelMessageImpl() {\n }",
"public static DefaultExpression empty() { throw Extensions.todo(); }",
"public EmptySea() {\r\n\t\tsuper(EmptySea.length);\r\n\t\t\r\n\t}"
] |
[
"0.7471902",
"0.7148086",
"0.6582324",
"0.6581496",
"0.65684706",
"0.6513132",
"0.65100795",
"0.645179",
"0.64463353",
"0.64217657",
"0.63730204",
"0.63604236",
"0.6315945",
"0.6309433",
"0.62610203",
"0.623052",
"0.62208015",
"0.6207874",
"0.61654216",
"0.6164931",
"0.6160282",
"0.614986",
"0.6145998",
"0.61355835",
"0.6112597",
"0.609436",
"0.6085304",
"0.6072984",
"0.6060617",
"0.60393023",
"0.60211223",
"0.60199296",
"0.60081464",
"0.60072535",
"0.6003526",
"0.5999375",
"0.5987279",
"0.59710246",
"0.59686965",
"0.5960274",
"0.5948946",
"0.59354556",
"0.5921129",
"0.5917119",
"0.5913425",
"0.5911821",
"0.59059405",
"0.5901668",
"0.5900354",
"0.5899973",
"0.58960086",
"0.5887263",
"0.5884726",
"0.5881365",
"0.5880897",
"0.5858718",
"0.58500224",
"0.5849657",
"0.5844336",
"0.5831062",
"0.581471",
"0.5812914",
"0.5811556",
"0.5811123",
"0.5809459",
"0.58014166",
"0.57987195",
"0.5795042",
"0.57938683",
"0.57938683",
"0.5793659",
"0.57921225",
"0.5791156",
"0.57868373",
"0.5780168",
"0.5776027",
"0.57752866",
"0.5771019",
"0.5771019",
"0.5769824",
"0.5767066",
"0.5763608",
"0.57633406",
"0.57606655",
"0.57585365",
"0.5756374",
"0.57545304",
"0.574339",
"0.5742909",
"0.5740322",
"0.57401675",
"0.5735124",
"0.573427",
"0.5729546",
"0.5726469",
"0.5726083",
"0.57214427",
"0.57183105",
"0.57055706",
"0.5702154"
] |
0.5761963
|
83
|
Creates a new optional with a value.
|
private Optional(T value) {
this.value = Objects.requireNonNull(value);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static <T> Optional <T> of(T value) {\r\n\t\treturn new Optional<>(value);\r\n\t}",
"private OptionalValue(final Value value) {\n this.value = value;\n }",
"static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }",
"public Builder setOptionalValue(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n optionalValue_ = value;\n onChanged();\n return this;\n }",
"private Optional() {\r\n\t\tthis.value = null;\r\n\t}",
"public Builder setOptionalValueBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n optionalValue_ = value;\n onChanged();\n return this;\n }",
"public static <T> Optional <T> ofNullable(T value) {\r\n\t\tif (value == null)\r\n\t\t\treturn empty();\r\n\t\treturn of(value);\r\n\t}",
"public static <V> Some<V> some(V value) {\n return new Some<>(value);\n }",
"static <V> Value<V> of(V value) {\n return new ImmutableValue<>(value);\n }",
"java.lang.String getOptionalValue();",
"static <V> Value<V> of(Value<V> value) {\n return new ImmutableValue<>(value.get());\n }",
"public Result(Optional<T> value) {\n this.status = Status.SUCCESS;\n this.message = \"\";\n this.value = value;\n }",
"public NullableResponse(T value) {\n\t\tthis.value = value;\n\t}",
"public Builder clearOptionalValue() {\n bitField0_ = (bitField0_ & ~0x00000800);\n optionalValue_ = getDefaultInstance().getOptionalValue();\n onChanged();\n return this;\n }",
"NullValue createNullValue();",
"NullValue createNullValue();",
"Optional<T> toOptional();",
"public Builder setVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) {\n if (valBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n val_ = value;\n } else {\n valBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public Value() {}",
"com.google.protobuf.ByteString\n getOptionalValueBytes();",
"public abstract Optional<A> val();",
"static Value<String> of(String value) {\n return new ImmutableValue<>((value == null || value.isEmpty()) ? null : value);\n }",
"default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }",
"public Builder setVal(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n val_ = value;\n onChanged();\n return this;\n }",
"protected static ParameterDef createOptionalParameter(final String param, final Value defaultValue) {\n return new ParameterDef(new Variable(param), ParameterType.READ_ONLY, new ValueExpr(defaultValue));\n }",
"public Value(){}",
"public com.google.protobuf.ByteString\n getOptionalValueBytes() {\n java.lang.Object ref = optionalValue_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n optionalValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static void createOptionals() {\n String nullString = null;\n String emptyString = \"\";\n\n Optional.ofNullable(nullString);\n Optional.of(emptyString);\n try {\n Optional.of(nullString);\n } catch (NullPointerException e) {\n }\n Optional.empty();\n }",
"public com.google.protobuf.ByteString\n getOptionalValueBytes() {\n java.lang.Object ref = optionalValue_;\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 optionalValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n value_ = value;\n onChanged();\n return this;\n }",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n value_ = value;\n onChanged();\n return this;\n }",
"public Option(String code, String labelText, String labelCode, Object value) {\n \tthis(code, labelText, labelCode, value, null);\n }",
"public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }",
"default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }",
"@Override\n public Validation create(Validation value) {\n return null;\n }",
"public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }",
"public static Optional<Cuenta> crearCuenta001() {\n return Optional.of(new Cuenta(1L, \"Cristian\", new BigDecimal(\"1000\")));\n }",
"CsticValueModel createInstanceOfCsticValueModel(int valueType);",
"public Builder setExtra(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n extra_ = value;\n onChanged();\n return this;\n }",
"com.google.protobuf.Value getDefaultValue();",
"<C> UnspecifiedValueExp<C> createUnspecifiedValueExp();",
"public Builder setVal(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n val_ = value;\n onChanged();\n return this;\n }",
"@JacksonXmlProperty(isAttribute = true, localName = \"value\")\n public Builder value(String value) {\n this.value = value;\n return this;\n }",
"@CheckReturnValue\n default T setFieldIfPresent(String field, @Nullable Object value) {\n if (value != null) {\n //noinspection ResultOfMethodCallIgnored\n setField(field, value);\n }\n //noinspection unchecked\n return (T)this;\n }",
"public Option build() {\n if (description == null) {\n description = \"Description is not available for this option\";\n }\n return new Option(this);\n }",
"public static VariableValue createValueObject(boolean value) {\n\t\treturn new BooleanValue(value);\n\t}",
"public static Value createValue(Object val) {\n if (val instanceof String) {\n return new NominalValue((String) val);\n } else if (val instanceof Double) {\n return new NumericValue((Double) val);\n }\n return UnknownValue.getInstance();\n }",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\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 optionalValue_ = s;\n }\n return s;\n }\n }",
"public Version createVersion(String versionValue);",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n value_ = value;\n onChanged();\n return this;\n }",
"public static ValueResolvingBuilder valueResolving() {\n return new ValueResolvingBuilder();\n }",
"public Builder setExtra(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n extra_ = value;\n onChanged();\n return this;\n }",
"public static VariableValue createValueObject(String value) {\n\t\tif (value == null)\n\t\t\treturn null;\n\t\treturn new StringValue(value);\n\t}",
"public Builder setOptions(go.micro.runtime.RuntimeOuterClass.CreateOptions value) {\n if (optionsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n options_ = value;\n onChanged();\n } else {\n optionsBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public VariableCreateOrUpdateProperties withValue(String value) {\n this.value = value;\n return this;\n }",
"default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }",
"T getOrElse(T value);",
"public Optional<T> create(T obj) {\n\t\tif (null == obj) {\n\t\t\treturn Optional.empty();\n\t\t}\n\n\t\t// if Object has an id\n\t\tif (null != obj.getId()) {\n\n\t\t\t// return value if key already exists, otherwise empty\n\t\t\tif (map.containsKey(obj.getId())) {\n\t\t\t\treturn Optional.of(map.get(obj.getId()));\n\t\t\t} else {\n\t\t\t\treturn Optional.empty();\n\t\t\t}\n\n\t\t}\n\n\t\t// generate id\n\t\tint aId = id.getAndIncrement();\n\n\t\tobj.setId(aId);\n\t\tmap.put(aId, obj);\n\n\t\treturn Optional.of(obj);\n\n\t}",
"public static Acceptor optional(Acceptor a) {\n\t\treturn new Optional(a);\n\t}",
"public static Value.Builder newBuilder(Value other) {\n return new Value.Builder(other);\n }",
"public static Value.Builder newBuilder() {\n return new Value.Builder();\n }",
"private ConfigurationObject createParam(int num, String type, String value) throws Exception {\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param\" + num);\r\n param.setPropertyValue(PROPERTY_TYPE, type);\r\n param.setPropertyValue(PROPERTY_VALUE, value);\r\n\r\n return param;\r\n }",
"public Proposal(String value, String display) {\n this.value = value;\n this.display = display;\n if (this.value == null || this.value.length() == 0) {\n this.value = EMPTY;\n }\n if (this.display != null && this.display.length() == 0) {\n this.display = null;\n }\n }",
"boolean hasOptionalValue();",
"public Builder mergeVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) {\n if (valBuilder_ == null) {\n if (((bitField0_ & 0x00000001) != 0) &&\n val_ != null &&\n val_ != build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance()) {\n getValBuilder().mergeFrom(value);\n } else {\n val_ = value;\n }\n } else {\n valBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"T getDefaultValue();",
"@NonNull\n public static Version create(int major, int minor, int patch, @NonNull String description) {\n return new AutoValue_Version(major, minor, patch, description);\n }",
"public Builder setValBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n val_ = value;\n onChanged();\n return this;\n }",
"public Value() {\n }",
"@NotNull\n @Contract(\"!null -> new\")\n static CellValue newInstance(@Nullable Object originalValue) {\n if (originalValue == null) {\n return NULL;\n } else {\n return new CellValue(originalValue);\n }\n }",
"public Builder setValue(org.apache.calcite.avatica.proto.Common.TypedValue value) {\n if (valueBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n value_ = value;\n onChanged();\n } else {\n valueBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public Proposal(String value) {\n this(value, null);\n }",
"com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder();",
"public abstract T newEmptyValue(long timeMillis);",
"Argument<T> optional(boolean optional);",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n optionalValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Option() {\n }",
"public void setElseValue(Object pValue);",
"public Builder setIfNotExist(boolean value) {\n\n ifNotExist_ = value;\n onChanged();\n return this;\n }",
"public Builder setIfNotExist(boolean value) {\n\n ifNotExist_ = value;\n onChanged();\n return this;\n }",
"Builder addTimeRequired(String value);",
"public Builder setType(fi.kapsi.koti.jpa.nanopb.Nanopb.FieldType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n type_ = value;\n onChanged();\n return this;\n }",
"static Object missingValue(Class type) {\n if (!OptionalParameter.class.isAssignableFrom(type)) {\n return null;\n } else if (type == OptString.class) {\n return OptString.theMissingValue;\n } else if (type == OptBoolean.class) {\n return OptBoolean.theMissingValue;\n } else if (type == OptInteger.class) {\n return OptInteger.theMissingValue;\n } else if (type == OptDouble.class) {\n return OptDouble.theMissingValue;\n } else {\n return null;\n }\n }",
"public Builder name(@Nullable String value) {\n object.setName(value);\n return this;\n }",
"default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }",
"public AddressWithOptional build() {\n return address;\n }",
"public static CommandElement optional(CommandElement element) {\n return new OptionalCommandElement(element, null, false);\n }",
"Object setValue(Object value) throws NullPointerException;",
"public Option(final int code, final byte[] value) {\n this.code = code;\n this.value = value;\n }",
"private Optional optionalToOptional(ElementOptional optional) throws SemQAException {\n\t\tElement elm = optional.getOptionalElement();\r\n\t\tGraphPattern gp;\r\n\t\tValueConstraint vc;\r\n\t\tif (elm instanceof ElementGroup) {\r\n\t\t\tList<Element> children = ((ElementGroup) elm).getElements();\r\n\t\t\tSet<GraphPattern> childSemQA = new LinkedHashSet<GraphPattern>();\r\n\t\t\tSet<Optional> optionals = new LinkedHashSet<Optional>();\r\n\t\t\tSet<ElementFilter> filters = new LinkedHashSet<ElementFilter>();\r\n\t\t\tfor (Element child : children) {\r\n\t\t\t\tif (child instanceof ElementFilter) {\r\n\t\t\t\t\tfilters.add((ElementFilter) child);\r\n\t\t\t\t}\r\n\t\t\t\telse if (child instanceof ElementOptional) {\r\n\t\t\t\t\t// if child is an optional, need to get the graph pattern for the optional\r\n\t\t\t\t\t// and add it to the list of optional graph patterns\r\n\t\t\t\t\toptionals.add(optionalToOptional((ElementOptional) child));\r\n//\t\t\t\t\tchildSemQA.add(optionalToOptional((ElementOptional) child));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tchildSemQA.add(sparqlToSemQA(child));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGraphPattern baseGp = convertSetToJoin(childSemQA);\r\n\t\t\tif (childSemQA.size() == 0) {\r\n\t\t\t\tthrow new SemQAException(\"semQA: OPTIONAL without non-optional side not supported.\");\r\n\t\t\t}\r\n\t\t\tif (optionals.size() > 0) {\r\n\t\t\t\t// if there are optional elements, create a left join\r\n\t\t\t\t// convert the non-filter non-optional graph patterns to a Join if necessary\r\n\t\t\t\t// then, each optional element is part of a left join\r\n\t\t\t\tgp = new LeftJoin(baseGp, optionals);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// no optionals, just return the join of the graph patterns\r\n\t\t\t\tgp = baseGp;\r\n\t\t\t}\r\n\t\t\tif (filters.size() > 0) {\r\n\t\t\t\tvc = getConstraintFromFilters(filters);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvc = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgp = sparqlToSemQA(elm); // if it is not a group\r\n\t\t\tvc = null;\r\n\t\t}\r\n\t\treturn new Optional(gp, vc);\r\n\t\t\r\n\t}",
"public Object fromOpenValue(Object value) throws InvalidObjectException {\n if (value == null) {\n return null;\n } else {\n return fromNonNullOpenValue(value);\n }\n }",
"public ByValue() {}",
"public static VariableValue createValueObject(int value) {\n\t\treturn new IntegerValue(value);\n\t}",
"public Builder setValue(String value) {\n _value = value;\n return this;\n }",
"public static By value(String valueText)\n\t{\n\t return new FindByValue(valueText);\n\t}",
"public Holder(/* @Nullable */ final T value) {\n this.value = value;\n }",
"public Builder setValueBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n value_ = value;\n onChanged();\n return this;\n }",
"public Builder setValue(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n value_ = value;\n onChanged();\n return this;\n }",
"public BwValue mkValue() {\n\t\treturn new BwValue(this.sT);\n\t}",
"ObjectValue createObjectValue();"
] |
[
"0.75442606",
"0.73222166",
"0.6955791",
"0.6401831",
"0.628866",
"0.6243929",
"0.60631144",
"0.5969985",
"0.5814315",
"0.578769",
"0.5693271",
"0.5607916",
"0.554904",
"0.55106425",
"0.55072683",
"0.55072683",
"0.54744744",
"0.54139906",
"0.53473747",
"0.53441757",
"0.52822787",
"0.5279755",
"0.5274877",
"0.52744573",
"0.5245015",
"0.52320075",
"0.5230576",
"0.51865095",
"0.51671946",
"0.51622564",
"0.51622564",
"0.512897",
"0.5119375",
"0.51097095",
"0.50869",
"0.5078566",
"0.50641304",
"0.50621593",
"0.5019716",
"0.5018566",
"0.49770364",
"0.49618432",
"0.49541974",
"0.49489343",
"0.4939283",
"0.49279732",
"0.4926101",
"0.4921332",
"0.49186534",
"0.49153763",
"0.4911142",
"0.49071857",
"0.48987186",
"0.48893118",
"0.48817053",
"0.4874345",
"0.48703286",
"0.48675597",
"0.48609185",
"0.48496443",
"0.48483753",
"0.48473603",
"0.48400074",
"0.48398617",
"0.4830997",
"0.4830889",
"0.4828807",
"0.48241585",
"0.48194355",
"0.48165807",
"0.480536",
"0.47833008",
"0.47768298",
"0.47688943",
"0.47496685",
"0.47256586",
"0.47209075",
"0.47158676",
"0.471059",
"0.471059",
"0.47081557",
"0.47061738",
"0.46885988",
"0.46854886",
"0.46831164",
"0.46783835",
"0.4666446",
"0.4666446",
"0.46629795",
"0.46556708",
"0.46550125",
"0.46526837",
"0.4650775",
"0.46431336",
"0.46410754",
"0.46305153",
"0.46253902",
"0.46210077",
"0.46207386",
"0.46200606"
] |
0.71620655
|
2
|
Returns an empty Optional instance.
|
@SuppressWarnings("unchecked")
public static <T> Optional <T> empty() {
return (Optional<T>) EMPTY;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Optional<T> toOptional();",
"default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }",
"private Optional() {\r\n\t\tthis.value = null;\r\n\t}",
"@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}",
"default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }",
"public Builder clearOptionalValue() {\n bitField0_ = (bitField0_ & ~0x00000800);\n optionalValue_ = getDefaultInstance().getOptionalValue();\n onChanged();\n return this;\n }",
"public static void createOptionals() {\n String nullString = null;\n String emptyString = \"\";\n\n Optional.ofNullable(nullString);\n Optional.of(emptyString);\n try {\n Optional.of(nullString);\n } catch (NullPointerException e) {\n }\n Optional.empty();\n }",
"public static <T> Optional <T> of(T value) {\r\n\t\treturn new Optional<>(value);\r\n\t}",
"static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }",
"public static DefaultExpression empty() { throw Extensions.todo(); }",
"default Empty getEmptyObject() {\n return null;\n }",
"public static Query empty() {\n return new Query();\n }",
"public static NonpositiveRequiredCapabilityMatch newEmptyMatch() {\r\n return new Mutable(null, null, null, null);\r\n }",
"public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }",
"public static Acceptor optional(Acceptor a) {\n\t\treturn new Optional(a);\n\t}",
"public Boolean getOptional() {\n return this.optional;\n }",
"public static Value makeNone() {\n return theNone;\n }",
"public abstract Optional<A> val();",
"protected abstract Optional<T> getSingleSelection();",
"public static Scope empty(){\n return EMPTY;\n }",
"public static CommandElement optional(CommandElement element) {\n return new OptionalCommandElement(element, null, false);\n }",
"public static CommandElement none() {\n return NONE;\n }",
"public Optional<MimeHelper> getOptionalMimeHelper() {\n return Optional.empty();\n }",
"public boolean isOptional() {\n return isOptional;\n }",
"public boolean isOptional() {\n return optional;\n }",
"protected boolean isOptional()\n {\n return false;\n }",
"Optional<X> elem();",
"public Optional<String> getMailOptional()\n {\n return Optional.ofNullable(mail);\n }",
"public AddressWithOptional build() {\n return address;\n }",
"java.lang.String getOptionalValue();",
"public Boolean isOptional() {\n return this.optional;\n }",
"public static UserRegistryImposition none() {\n return of(Registry.empty());\n }",
"com.google.protobuf.ByteString\n getOptionalValueBytes();",
"public boolean isOptional() {\n return m_optional;\n }",
"public Option<E> safeUncons() {\n return safeRemove(0);\n }",
"Optional<T> show();",
"private Optional(T value) {\r\n\t\tthis.value = Objects.requireNonNull(value);\r\n\t}",
"public IUser getEmpty() {\n\t\treturn User.get()\n\t\t\t\t\t.setPerson(Person.get()\n\t\t\t\t\t\t\t\t\t.setFirstname(\"\")\n\t\t\t\t\t\t\t\t\t.setLastname(\"\")\n\t\t\t\t\t\t\t\t\t.setEmail(\"\")\n\t\t\t\t\t\t\t\t\t.build()\n\t\t\t\t\t\t\t\t\t.setMiddlename(\"\")\n\t\t\t\t\t\t\t\t\t.setPhonenumber(\"\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.setAccount(Account.get()\n\t\t\t\t\t\t\t\t\t.setLogin(\"\")\n\t\t\t\t\t\t\t\t\t.setPassword(\"\")\n\t\t\t\t\t\t\t\t\t.setRole(\"\")\n\t\t\t\t\t\t\t\t\t.setStatus(\"\")\n\t\t\t\t\t\t\t\t\t.setCommunity(\"\")\n\t\t\t\t\t\t\t\t\t.build()\n\t\t\t\t\t\t\t\t\t.setData(\"\")\n\t\t\t\t\t\t\t\t\t.setRegisterNumber(\"\")\n\t\t\t\t\t\t\t\t\t.setRegistratorNumber(\"\")\n\t\t\t\t\t\t\t\t\t.setVolumeNumber(\"\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.build()\n\t\t\t\t\t.setAddress(Address.get()\n\t\t\t\t\t\t\t.setRegion(\"\")\n\t\t\t\t\t\t\t.setDistrict(\"\")\n\t\t\t\t\t\t\t.setCity(\"\")\n\t\t\t\t\t\t\t.setStreet(\"\")\n\t\t\t\t\t\t\t.setBuilding(\"\")\n\t\t\t\t\t\t\t.setFlat(\"\")\n\t\t\t\t\t\t\t.setPostcode(\"\")\n\t\t\t\t\t\t\t)\n\t\t\t\t\t.setPassport(Passport.get()\n\t\t\t\t\t\t\t.setSeria(\"\")\n\t\t\t\t\t\t\t.setNumber(\"\")\n\t\t\t\t\t\t\t.setPublished(\"\")\n\t\t\t\t\t\t\t);\n\t}",
"public boolean isOptional() {\n\t\treturn _optional;\n\t}",
"protected E getEmptyObject() {\n try {\n ParameterizedType type = (ParameterizedType) getClass().getGenericSuperclass();\n Class<E> eClazz = (Class<E>) type.getActualTypeArguments()[0];\n\n return eClazz.newInstance();\n } catch (InstantiationException | IllegalAccessException ex) {\n return null;\n }\n }",
"public boolean isOptional() {\n\t\treturn optional;\n\t}",
"public static VehicleSlowsDownMeasurements.Match newEmptyMatch() {\n return new Mutable(null, null, null);\n }",
"public final void setOptional() {_occ.setOptional();}",
"static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"boolean isOptional();",
"@Nonnull\n public static <T> PlayList<T> empty()\n {\n return new PlayList<>();\n }",
"public None()\n {\n \n }",
"boolean optional();",
"public static ObservableMarketDataFunction none() {\n return requirements -> ImmutableMap.of();\n }",
"public static FilePath empty() {\n return EMPTY;\n }",
"public static <T> Optional <T> ofNullable(T value) {\r\n\t\tif (value == null)\r\n\t\t\treturn empty();\r\n\t\treturn of(value);\r\n\t}",
"public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }",
"public static PathAnchor none() {\n return None.INSTANCE;\n }",
"@Override\n\tpublic ISpecies getDefault() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}",
"public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }",
"public Optional<A> point(final DynamicOps<?> ops) {\n return Optional.empty();\n }",
"public Value restrictToNotAbsent() {\n checkNotUnknown();\n if (isNotAbsent())\n return this;\n Value r = new Value(this);\n r.flags &= ~ABSENT;\n if (r.var != null && (r.flags & (PRESENT_DATA | PRESENT_ACCESSOR)) == 0)\n r.var = null;\n return canonicalize(r);\n }",
"public static TracingMetadata empty() {\n return EMPTY;\n }",
"default Boolean isEmpty(){\n return builder().length() == 0;\n }",
"public static CommandElement optionalWeak(CommandElement element) {\n return new OptionalCommandElement(element, null, true);\n }",
"@Override\n public Optional<?> getNullValue(DeserializationContext ctxt) throws JsonMappingException {\n return Optional.ofNullable(_valueDeserializer.getNullValue(ctxt));\n }",
"@Nullable\n public T firstOrNull() {\n return Query.firstOrNull(iterable);\n }",
"public static DuplicateNameMatch newEmptyMatch() {\r\n return new Mutable(null, null);\r\n }",
"public static final EqualityConstraintSettings FullyInvested()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn new EqualityConstraintSettings (\n\t\t\t\tFULLY_INVESTED_CONSTRAINT,\n\t\t\t\tjava.lang.Double.NaN\n\t\t\t);\n\t\t}\n\t\tcatch (java.lang.Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}",
"public static Empty getInstance() {\n return instance;\n }",
"public static UserAggregate buildEmpty() {\n return new UserAggregate();\n }",
"public static ConstraintEvaluator emptyEvaluator()\n {\n return new ConstraintEvaluator(null, SchemaBuilder.newBuilder().build(), new Constraints(new HashMap<>(), Collections.emptyList(), Collections.emptyList(), DEFAULT_NO_LIMIT));\n }",
"static Object missingValue(Class type) {\n if (!OptionalParameter.class.isAssignableFrom(type)) {\n return null;\n } else if (type == OptString.class) {\n return OptString.theMissingValue;\n } else if (type == OptBoolean.class) {\n return OptBoolean.theMissingValue;\n } else if (type == OptInteger.class) {\n return OptInteger.theMissingValue;\n } else if (type == OptDouble.class) {\n return OptDouble.theMissingValue;\n } else {\n return null;\n }\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tif (value != null)\r\n\t\t\treturn String.format(\"Optional[%s]\", value);\r\n\t\telse\r\n\t\t\treturn \"Optional.empty\";\r\n\t}",
"@NonNull\n\t<T> Optional<T> get(@NonNull Class<T> type);",
"public THING orElseNull() {\n return directlyGetOrElse(null);\n }",
"AstroArg empty();",
"public Option() {\n }",
"public Optional<String> getFullName(){\n return Optional.ofNullable(fullName);\n }",
"Optional<Player> getHoldingPlayer();",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\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 optionalValue_ = s;\n }\n return s;\n }\n }",
"default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }",
"public Expression getExpression() {\n return optionalConditionExpression; }",
"default Optional<String> getETag() {\n return Optional.empty();\n }",
"public static <T> CollectionUpdateResult<T> noop() {\n return new CollectionUpdateResult<>(Status.NOOP, null);\n }",
"@Override\n public abstract Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingException;",
"@Override\n\tpublic Value apprise() {\n\t\treturn null;\n\t}",
"EmptyType createEmptyType();",
"public boolean getEmpty() {\n return empty;\n }",
"private Optional optionalToOptional(ElementOptional optional) throws SemQAException {\n\t\tElement elm = optional.getOptionalElement();\r\n\t\tGraphPattern gp;\r\n\t\tValueConstraint vc;\r\n\t\tif (elm instanceof ElementGroup) {\r\n\t\t\tList<Element> children = ((ElementGroup) elm).getElements();\r\n\t\t\tSet<GraphPattern> childSemQA = new LinkedHashSet<GraphPattern>();\r\n\t\t\tSet<Optional> optionals = new LinkedHashSet<Optional>();\r\n\t\t\tSet<ElementFilter> filters = new LinkedHashSet<ElementFilter>();\r\n\t\t\tfor (Element child : children) {\r\n\t\t\t\tif (child instanceof ElementFilter) {\r\n\t\t\t\t\tfilters.add((ElementFilter) child);\r\n\t\t\t\t}\r\n\t\t\t\telse if (child instanceof ElementOptional) {\r\n\t\t\t\t\t// if child is an optional, need to get the graph pattern for the optional\r\n\t\t\t\t\t// and add it to the list of optional graph patterns\r\n\t\t\t\t\toptionals.add(optionalToOptional((ElementOptional) child));\r\n//\t\t\t\t\tchildSemQA.add(optionalToOptional((ElementOptional) child));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tchildSemQA.add(sparqlToSemQA(child));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGraphPattern baseGp = convertSetToJoin(childSemQA);\r\n\t\t\tif (childSemQA.size() == 0) {\r\n\t\t\t\tthrow new SemQAException(\"semQA: OPTIONAL without non-optional side not supported.\");\r\n\t\t\t}\r\n\t\t\tif (optionals.size() > 0) {\r\n\t\t\t\t// if there are optional elements, create a left join\r\n\t\t\t\t// convert the non-filter non-optional graph patterns to a Join if necessary\r\n\t\t\t\t// then, each optional element is part of a left join\r\n\t\t\t\tgp = new LeftJoin(baseGp, optionals);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// no optionals, just return the join of the graph patterns\r\n\t\t\t\tgp = baseGp;\r\n\t\t\t}\r\n\t\t\tif (filters.size() > 0) {\r\n\t\t\t\tvc = getConstraintFromFilters(filters);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvc = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgp = sparqlToSemQA(elm); // if it is not a group\r\n\t\t\tvc = null;\r\n\t\t}\r\n\t\treturn new Optional(gp, vc);\r\n\t\t\r\n\t}",
"public static Optional<Cuenta> crearCuenta001() {\n return Optional.of(new Cuenta(1L, \"Cristian\", new BigDecimal(\"1000\")));\n }",
"@Named(\"unwrap\")\n default <T> T unwrap(Optional<T> optional) {\n return optional.orElse(null);\n }",
"public static OngoingReadingWithoutWhere optionalMatch(PatternElement... pattern) {\n\n\t\treturn Statement.builder().optionalMatch(pattern);\n\t}",
"@Override public Type make_nil(byte nil) { return make(nil,_any); }",
"@Override\npublic Boolean isEmpty() {\n\treturn null;\n}",
"public static Tag emptyTag() {\n\t\treturn new Tag(NAME, \"\");\n\t}",
"public NullableResponse() {\n\t}",
"@Override\n\tpublic Entity SelectFirstOrDefault() {\n\t\treturn null;\n\t}",
"public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}",
"com.google.protobuf.Value getDefaultValue();",
"public java.lang.CharSequence getDefaultStringEmpty() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }"
] |
[
"0.7190859",
"0.70575243",
"0.69894034",
"0.65100974",
"0.64303917",
"0.6382993",
"0.6364783",
"0.63044226",
"0.6246522",
"0.623289",
"0.61233777",
"0.60858494",
"0.60840577",
"0.6015568",
"0.5999931",
"0.5941048",
"0.58687776",
"0.5819739",
"0.5805611",
"0.5795534",
"0.578649",
"0.5775863",
"0.5724324",
"0.5714306",
"0.56978166",
"0.5677711",
"0.565966",
"0.5651041",
"0.56492645",
"0.56454223",
"0.5630365",
"0.5599033",
"0.55904406",
"0.5575855",
"0.5532385",
"0.5514109",
"0.54785377",
"0.5462176",
"0.54471266",
"0.544086",
"0.5439058",
"0.5420534",
"0.54176813",
"0.54148763",
"0.5406308",
"0.5406308",
"0.5403891",
"0.5382233",
"0.5382229",
"0.53729004",
"0.53640544",
"0.5359069",
"0.534457",
"0.5340259",
"0.53331643",
"0.53262657",
"0.5317094",
"0.5317094",
"0.5316947",
"0.53156245",
"0.5313372",
"0.53107786",
"0.52997094",
"0.52984846",
"0.5291562",
"0.5289564",
"0.5276142",
"0.5270875",
"0.5270157",
"0.52647364",
"0.5234776",
"0.52281463",
"0.52199936",
"0.52026504",
"0.518891",
"0.5177588",
"0.5176499",
"0.51733994",
"0.51676816",
"0.51669985",
"0.5153958",
"0.5147318",
"0.5145619",
"0.5143014",
"0.51286304",
"0.50853264",
"0.5085011",
"0.50823843",
"0.50795084",
"0.5074353",
"0.504703",
"0.504413",
"0.5042373",
"0.50309855",
"0.5023127",
"0.5019344",
"0.50104755",
"0.50096375",
"0.50069064",
"0.4994875"
] |
0.79292846
|
0
|
Creates a new Optional with a value.
|
public static <T> Optional <T> of(T value) {
return new Optional<>(value);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }",
"private OptionalValue(final Value value) {\n this.value = value;\n }",
"private Optional(T value) {\r\n\t\tthis.value = Objects.requireNonNull(value);\r\n\t}",
"public static <V> Some<V> some(V value) {\n return new Some<>(value);\n }",
"public static <T> Optional <T> ofNullable(T value) {\r\n\t\tif (value == null)\r\n\t\t\treturn empty();\r\n\t\treturn of(value);\r\n\t}",
"Optional<T> toOptional();",
"public Builder setOptionalValue(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n optionalValue_ = value;\n onChanged();\n return this;\n }",
"private Optional() {\r\n\t\tthis.value = null;\r\n\t}",
"public Builder setOptionalValueBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n optionalValue_ = value;\n onChanged();\n return this;\n }",
"static <V> Value<V> of(V value) {\n return new ImmutableValue<>(value);\n }",
"java.lang.String getOptionalValue();",
"static <V> Value<V> of(Value<V> value) {\n return new ImmutableValue<>(value.get());\n }",
"public Result(Optional<T> value) {\n this.status = Status.SUCCESS;\n this.message = \"\";\n this.value = value;\n }",
"default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }",
"public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }",
"T getOrElse(T value);",
"public NullableResponse(T value) {\n\t\tthis.value = value;\n\t}",
"default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }",
"com.google.protobuf.ByteString\n getOptionalValueBytes();",
"public abstract Optional<A> val();",
"public com.google.protobuf.ByteString\n getOptionalValueBytes() {\n java.lang.Object ref = optionalValue_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n optionalValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }",
"static Value<String> of(String value) {\n return new ImmutableValue<>((value == null || value.isEmpty()) ? null : value);\n }",
"public com.google.protobuf.ByteString\n getOptionalValueBytes() {\n java.lang.Object ref = optionalValue_;\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 optionalValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static void createOptionals() {\n String nullString = null;\n String emptyString = \"\";\n\n Optional.ofNullable(nullString);\n Optional.of(emptyString);\n try {\n Optional.of(nullString);\n } catch (NullPointerException e) {\n }\n Optional.empty();\n }",
"public Builder clearOptionalValue() {\n bitField0_ = (bitField0_ & ~0x00000800);\n optionalValue_ = getDefaultInstance().getOptionalValue();\n onChanged();\n return this;\n }",
"public static Optional<Cuenta> crearCuenta001() {\n return Optional.of(new Cuenta(1L, \"Cristian\", new BigDecimal(\"1000\")));\n }",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\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 optionalValue_ = s;\n }\n return s;\n }\n }",
"NullValue createNullValue();",
"NullValue createNullValue();",
"Optional<V> get(String name);",
"default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }",
"@CheckReturnValue\n default T setFieldIfPresent(String field, @Nullable Object value) {\n if (value != null) {\n //noinspection ResultOfMethodCallIgnored\n setField(field, value);\n }\n //noinspection unchecked\n return (T)this;\n }",
"public static ValueResolvingBuilder valueResolving() {\n return new ValueResolvingBuilder();\n }",
"public Optional<T> create(T obj) {\n\t\tif (null == obj) {\n\t\t\treturn Optional.empty();\n\t\t}\n\n\t\t// if Object has an id\n\t\tif (null != obj.getId()) {\n\n\t\t\t// return value if key already exists, otherwise empty\n\t\t\tif (map.containsKey(obj.getId())) {\n\t\t\t\treturn Optional.of(map.get(obj.getId()));\n\t\t\t} else {\n\t\t\t\treturn Optional.empty();\n\t\t\t}\n\n\t\t}\n\n\t\t// generate id\n\t\tint aId = id.getAndIncrement();\n\n\t\tobj.setId(aId);\n\t\tmap.put(aId, obj);\n\n\t\treturn Optional.of(obj);\n\n\t}",
"public static Acceptor optional(Acceptor a) {\n\t\treturn new Optional(a);\n\t}",
"public Builder setVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) {\n if (valBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n val_ = value;\n } else {\n valBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n optionalValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private static String getPropertyValueOrDefault(String value) {\n return value != null ? value : \"\";\n }",
"public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }",
"public Value() {}",
"public VariableCreateOrUpdateProperties withValue(String value) {\n this.value = value;\n return this;\n }",
"public static VariableValue createValueObject(String value) {\n\t\tif (value == null)\n\t\t\treturn null;\n\t\treturn new StringValue(value);\n\t}",
"public static JCardValue single(Object value) {\n\t\treturn new JCardValue(new JsonValue(value));\n\t}",
"public Object fromOpenValue(Object value) throws InvalidObjectException {\n if (value == null) {\n return null;\n } else {\n return fromNonNullOpenValue(value);\n }\n }",
"@JacksonXmlProperty(isAttribute = true, localName = \"value\")\n public Builder value(String value) {\n this.value = value;\n return this;\n }",
"<C> UnspecifiedValueExp<C> createUnspecifiedValueExp();",
"public static Value.Builder newBuilder(Value other) {\n return new Value.Builder(other);\n }",
"protected static ParameterDef createOptionalParameter(final String param, final Value defaultValue) {\n return new ParameterDef(new Variable(param), ParameterType.READ_ONLY, new ValueExpr(defaultValue));\n }",
"public Builder setVal(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n val_ = value;\n onChanged();\n return this;\n }",
"public void setElseValue(Object pValue);",
"public AddressWithOptional build() {\n return address;\n }",
"public Value(){}",
"public Optional<T> get(String path) {\n List<String> components = getPathComponents(path);\n\n MatchTreeNode<T> node = tree.getLongestMatchingNode(components);\n if (node == null) {\n return Optional.empty();\n }\n\n T value;\n if (isExactlyMatchingPath(node, path, components)) {\n // exact match:\n value = node.value();\n if (value == null) {\n value = bestValue(node.parent());\n }\n } else {\n value = bestValue(node);\n }\n\n if (value == null) {\n return Optional.empty();\n }\n\n return Optional.of(value);\n }",
"public static Value.Builder newBuilder() {\n return new Value.Builder();\n }",
"public static By value(String valueText)\n\t{\n\t return new FindByValue(valueText);\n\t}",
"public T orElse(T other) {\r\n\t\treturn value != null ? value : other;\r\n\t}",
"@Nullable\n protected abstract T substituteDefault(@Nullable T value);",
"public Builder mergeVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) {\n if (valBuilder_ == null) {\n if (((bitField0_ & 0x00000001) != 0) &&\n val_ != null &&\n val_ != build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance()) {\n getValBuilder().mergeFrom(value);\n } else {\n val_ = value;\n }\n } else {\n valBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public Option(String code, String labelText, String labelCode, Object value) {\n \tthis(code, labelText, labelCode, value, null);\n }",
"T getDefaultValue();",
"@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\")\npublic interface Value<V> extends Supplier<V> {\n /** Creates an empty instance of Value */\n static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(V value) {\n return new ImmutableValue<>(value);\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(Value<V> value) {\n return new ImmutableValue<>(value.get());\n }\n\n /** Creates an instance of Value for the given String, treat empty strings as null */\n static Value<String> of(String value) {\n return new ImmutableValue<>((value == null || value.isEmpty()) ? null : value);\n }\n\n /** Tries to parse the integer from the String and returns the value if its found */\n static Value<Integer> parseInteger(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Integer.parseInt(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the long from the String and returns the value if its found */\n static Value<Long> parseLong(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Long.parseLong(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the double from the String and returns the value if its found */\n static Value<Double> parseDouble(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Double.parseDouble(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the float from the String and returns the value if its found */\n static Value<Float> parseFloat(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Float.parseFloat(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the short from the String and returns the value if its found */\n static Value<Short> parseShort(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Short.parseShort(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the byte from the String and returns the value if its found */\n static Value<Byte> parseByte(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Byte.parseByte(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the boolean from the String and returns the value if its found */\n static Value<Boolean> parseBoolean(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Boolean.parseBoolean(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Does the value instance contain a non null value */\n default boolean isPresent() {\n return get() != null;\n }\n\n /** Does the value instance contain a null value */\n default boolean isEmpty() {\n return get() == null;\n }\n\n /** Get the value of this instance if its present for return the argument could be null */\n default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }\n\n /** Gets the value of this instance or throw NullPointerException with the provided message */\n default V getOrThrow(String message) {\n return Conditions.nonNull(get(), message);\n }\n\n /** Gets the value of this instance or throw NullPointerException */\n default V getOrThrow() {\n return getOrThrow(\"null\");\n }\n\n /** Run a consumer instance on the value if it exists */\n default Value<V> ifPresent(Consumer<V> consumer) {\n if (isPresent()) {\n consumer.accept(get());\n }\n return this;\n }\n\n /** Run a runnable instance on the value if it exists */\n default Value<V> ifPresent(Runnable runnable) {\n if (isPresent()) {\n runnable.run();\n }\n return this;\n }\n\n /** Run a runnable instance on the value if it is empty */\n default Value<V> ifEmpty(Runnable runnable) {\n if (isEmpty()) {\n runnable.run();\n }\n return this;\n }\n}",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n value_ = value;\n onChanged();\n return this;\n }",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n value_ = value;\n onChanged();\n return this;\n }",
"public Holder(/* @Nullable */ final T value) {\n this.value = value;\n }",
"@Override\n public OptionalDeserializer withResolved(TypeDeserializer typeDeser, JsonDeserializer<?> valueDeser) {\n return new OptionalDeserializer(_fullType, _valueInstantiator,\n typeDeser, valueDeser, _cfgReadAbsentAsNull);\n }",
"public Builder setValue(org.apache.calcite.avatica.proto.Common.TypedValue value) {\n if (valueBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n value_ = value;\n onChanged();\n } else {\n valueBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public Proposal(String value) {\n this(value, null);\n }",
"com.google.protobuf.Value getDefaultValue();",
"public Proposal(String value, String display) {\n this.value = value;\n this.display = display;\n if (this.value == null || this.value.length() == 0) {\n this.value = EMPTY;\n }\n if (this.display != null && this.display.length() == 0) {\n this.display = null;\n }\n }",
"public Option build() {\n if (description == null) {\n description = \"Description is not available for this option\";\n }\n return new Option(this);\n }",
"private Optional optionalToOptional(ElementOptional optional) throws SemQAException {\n\t\tElement elm = optional.getOptionalElement();\r\n\t\tGraphPattern gp;\r\n\t\tValueConstraint vc;\r\n\t\tif (elm instanceof ElementGroup) {\r\n\t\t\tList<Element> children = ((ElementGroup) elm).getElements();\r\n\t\t\tSet<GraphPattern> childSemQA = new LinkedHashSet<GraphPattern>();\r\n\t\t\tSet<Optional> optionals = new LinkedHashSet<Optional>();\r\n\t\t\tSet<ElementFilter> filters = new LinkedHashSet<ElementFilter>();\r\n\t\t\tfor (Element child : children) {\r\n\t\t\t\tif (child instanceof ElementFilter) {\r\n\t\t\t\t\tfilters.add((ElementFilter) child);\r\n\t\t\t\t}\r\n\t\t\t\telse if (child instanceof ElementOptional) {\r\n\t\t\t\t\t// if child is an optional, need to get the graph pattern for the optional\r\n\t\t\t\t\t// and add it to the list of optional graph patterns\r\n\t\t\t\t\toptionals.add(optionalToOptional((ElementOptional) child));\r\n//\t\t\t\t\tchildSemQA.add(optionalToOptional((ElementOptional) child));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tchildSemQA.add(sparqlToSemQA(child));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGraphPattern baseGp = convertSetToJoin(childSemQA);\r\n\t\t\tif (childSemQA.size() == 0) {\r\n\t\t\t\tthrow new SemQAException(\"semQA: OPTIONAL without non-optional side not supported.\");\r\n\t\t\t}\r\n\t\t\tif (optionals.size() > 0) {\r\n\t\t\t\t// if there are optional elements, create a left join\r\n\t\t\t\t// convert the non-filter non-optional graph patterns to a Join if necessary\r\n\t\t\t\t// then, each optional element is part of a left join\r\n\t\t\t\tgp = new LeftJoin(baseGp, optionals);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// no optionals, just return the join of the graph patterns\r\n\t\t\t\tgp = baseGp;\r\n\t\t\t}\r\n\t\t\tif (filters.size() > 0) {\r\n\t\t\t\tvc = getConstraintFromFilters(filters);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvc = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgp = sparqlToSemQA(elm); // if it is not a group\r\n\t\t\tvc = null;\r\n\t\t}\r\n\t\treturn new Optional(gp, vc);\r\n\t\t\r\n\t}",
"public static VariableValue createValueObject(boolean value) {\n\t\treturn new BooleanValue(value);\n\t}",
"public Builder withValue(Optional<FileToProcess> origin) {\n this.value = origin;\n return this;\n }",
"public static <A> Try<A> success(A value) {\n return new Try<>(null, value, false);\n }",
"V getOrDefault(final K key, final V defaultValue);",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n value_ = value;\n onChanged();\n return this;\n }",
"public static CommandElement optional(CommandElement element) {\n return new OptionalCommandElement(element, null, false);\n }",
"boolean hasOptionalValue();",
"@NotNull\n @Contract(\"!null -> new\")\n static CellValue newInstance(@Nullable Object originalValue) {\n if (originalValue == null) {\n return NULL;\n } else {\n return new CellValue(originalValue);\n }\n }",
"public Builder setValue(String value) {\n _value = value;\n return this;\n }",
"default Value<V> ifPresent(Consumer<V> consumer) {\n if (isPresent()) {\n consumer.accept(get());\n }\n return this;\n }",
"public BwValue mkValue() {\n\t\treturn new BwValue(this.sT);\n\t}",
"ObjectValue createObjectValue();",
"public Builder setExtra(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n extra_ = value;\n onChanged();\n return this;\n }",
"Optional<V> get(K key);",
"public Builder setVal(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n val_ = value;\n onChanged();\n return this;\n }",
"public native final <T> Selection property(final String name, String value)\n\t/*-{\n\t\treturn this.property(name, value);\n\t}-*/;",
"static Object missingValue(Class type) {\n if (!OptionalParameter.class.isAssignableFrom(type)) {\n return null;\n } else if (type == OptString.class) {\n return OptString.theMissingValue;\n } else if (type == OptBoolean.class) {\n return OptBoolean.theMissingValue;\n } else if (type == OptInteger.class) {\n return OptInteger.theMissingValue;\n } else if (type == OptDouble.class) {\n return OptDouble.theMissingValue;\n } else {\n return null;\n }\n }",
"public static Value createValue(Object val) {\n if (val instanceof String) {\n return new NominalValue((String) val);\n } else if (val instanceof Double) {\n return new NumericValue((Double) val);\n }\n return UnknownValue.getInstance();\n }",
"CsticValueModel createInstanceOfCsticValueModel(int valueType);",
"protected abstract Optional<T> getSingleSelection();",
"public Version createVersion(String versionValue);",
"Optional<String> validate(T value);",
"public static VariableValue createValueObject(double value) {\n\t\treturn new DoubleValue(value);\n\t}",
"public static <T> T getValue(T value){\n return value;\n }",
"public static VariableValue createValueObject(int value) {\n\t\treturn new IntegerValue(value);\n\t}",
"public Builder setValue(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n value_ = value;\n onChanged();\n return this;\n }",
"public Builder setExtra(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n extra_ = value;\n onChanged();\n return this;\n }"
] |
[
"0.74119896",
"0.7380251",
"0.7290823",
"0.6562059",
"0.6542396",
"0.6260572",
"0.624624",
"0.61856663",
"0.61097",
"0.60031486",
"0.59620374",
"0.59510773",
"0.594032",
"0.59166527",
"0.5907516",
"0.56037486",
"0.5599351",
"0.55939084",
"0.5511999",
"0.5463701",
"0.5414583",
"0.54018086",
"0.53797346",
"0.5346408",
"0.5345962",
"0.5196989",
"0.5190309",
"0.5158804",
"0.51170063",
"0.51170063",
"0.5093923",
"0.5083032",
"0.50805557",
"0.50602216",
"0.505107",
"0.5031651",
"0.5008366",
"0.49976707",
"0.4945092",
"0.48804557",
"0.48771468",
"0.48610857",
"0.4859931",
"0.4848986",
"0.48460644",
"0.4814778",
"0.47968888",
"0.47708666",
"0.47553375",
"0.47480577",
"0.47454262",
"0.47406128",
"0.47345158",
"0.4734401",
"0.47258618",
"0.47114733",
"0.47097257",
"0.47037703",
"0.4703471",
"0.47024027",
"0.46945122",
"0.46913496",
"0.467908",
"0.466841",
"0.466841",
"0.46529913",
"0.4651583",
"0.4635745",
"0.46269175",
"0.46252388",
"0.46222356",
"0.46131027",
"0.4610904",
"0.460614",
"0.4600743",
"0.4591626",
"0.4575882",
"0.45695966",
"0.4569355",
"0.45545676",
"0.45515975",
"0.45490536",
"0.45350683",
"0.45277765",
"0.4527155",
"0.45241886",
"0.45233336",
"0.45224562",
"0.45223916",
"0.45130712",
"0.4507367",
"0.45052305",
"0.45027348",
"0.44921747",
"0.4490617",
"0.44819084",
"0.44809082",
"0.4478245",
"0.44774196",
"0.44656125"
] |
0.826125
|
0
|
Creates an Optional class from a value. The value can be null and if so, empty() is returned.
|
public static <T> Optional <T> ofNullable(T value) {
if (value == null)
return empty();
return of(value);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static <T> Optional <T> of(T value) {\r\n\t\treturn new Optional<>(value);\r\n\t}",
"private Optional(T value) {\r\n\t\tthis.value = Objects.requireNonNull(value);\r\n\t}",
"static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }",
"private OptionalValue(final Value value) {\n this.value = value;\n }",
"private Optional() {\r\n\t\tthis.value = null;\r\n\t}",
"Optional<T> toOptional();",
"public Builder setOptionalValue(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n optionalValue_ = value;\n onChanged();\n return this;\n }",
"java.lang.String getOptionalValue();",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic static <T> Optional <T> empty() {\r\n\t\treturn (Optional<T>) EMPTY;\r\n\t}",
"default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }",
"public static void createOptionals() {\n String nullString = null;\n String emptyString = \"\";\n\n Optional.ofNullable(nullString);\n Optional.of(emptyString);\n try {\n Optional.of(nullString);\n } catch (NullPointerException e) {\n }\n Optional.empty();\n }",
"com.google.protobuf.ByteString\n getOptionalValueBytes();",
"public Builder setOptionalValueBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n optionalValue_ = value;\n onChanged();\n return this;\n }",
"static Value<String> of(String value) {\n return new ImmutableValue<>((value == null || value.isEmpty()) ? null : value);\n }",
"public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }",
"public com.google.protobuf.ByteString\n getOptionalValueBytes() {\n java.lang.Object ref = optionalValue_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n optionalValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Result(Optional<T> value) {\n this.status = Status.SUCCESS;\n this.message = \"\";\n this.value = value;\n }",
"public com.google.protobuf.ByteString\n getOptionalValueBytes() {\n java.lang.Object ref = optionalValue_;\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 optionalValue_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Builder clearOptionalValue() {\n bitField0_ = (bitField0_ & ~0x00000800);\n optionalValue_ = getDefaultInstance().getOptionalValue();\n onChanged();\n return this;\n }",
"private static String getPropertyValueOrDefault(String value) {\n return value != null ? value : \"\";\n }",
"default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }",
"default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }",
"public NullableResponse(T value) {\n\t\tthis.value = value;\n\t}",
"static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }",
"Optional<String> validate(T value);",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\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 optionalValue_ = s;\n }\n return s;\n }\n }",
"public abstract Optional<A> val();",
"public static <V> Some<V> some(V value) {\n return new Some<>(value);\n }",
"NullValue createNullValue();",
"NullValue createNullValue();",
"@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\")\npublic interface Value<V> extends Supplier<V> {\n /** Creates an empty instance of Value */\n static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(V value) {\n return new ImmutableValue<>(value);\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(Value<V> value) {\n return new ImmutableValue<>(value.get());\n }\n\n /** Creates an instance of Value for the given String, treat empty strings as null */\n static Value<String> of(String value) {\n return new ImmutableValue<>((value == null || value.isEmpty()) ? null : value);\n }\n\n /** Tries to parse the integer from the String and returns the value if its found */\n static Value<Integer> parseInteger(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Integer.parseInt(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the long from the String and returns the value if its found */\n static Value<Long> parseLong(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Long.parseLong(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the double from the String and returns the value if its found */\n static Value<Double> parseDouble(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Double.parseDouble(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the float from the String and returns the value if its found */\n static Value<Float> parseFloat(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Float.parseFloat(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the short from the String and returns the value if its found */\n static Value<Short> parseShort(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Short.parseShort(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the byte from the String and returns the value if its found */\n static Value<Byte> parseByte(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Byte.parseByte(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the boolean from the String and returns the value if its found */\n static Value<Boolean> parseBoolean(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Boolean.parseBoolean(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Does the value instance contain a non null value */\n default boolean isPresent() {\n return get() != null;\n }\n\n /** Does the value instance contain a null value */\n default boolean isEmpty() {\n return get() == null;\n }\n\n /** Get the value of this instance if its present for return the argument could be null */\n default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }\n\n /** Gets the value of this instance or throw NullPointerException with the provided message */\n default V getOrThrow(String message) {\n return Conditions.nonNull(get(), message);\n }\n\n /** Gets the value of this instance or throw NullPointerException */\n default V getOrThrow() {\n return getOrThrow(\"null\");\n }\n\n /** Run a consumer instance on the value if it exists */\n default Value<V> ifPresent(Consumer<V> consumer) {\n if (isPresent()) {\n consumer.accept(get());\n }\n return this;\n }\n\n /** Run a runnable instance on the value if it exists */\n default Value<V> ifPresent(Runnable runnable) {\n if (isPresent()) {\n runnable.run();\n }\n return this;\n }\n\n /** Run a runnable instance on the value if it is empty */\n default Value<V> ifEmpty(Runnable runnable) {\n if (isEmpty()) {\n runnable.run();\n }\n return this;\n }\n}",
"@Override\r\n\tpublic String toString() {\r\n\t\tif (value != null)\r\n\t\t\treturn String.format(\"Optional[%s]\", value);\r\n\t\telse\r\n\t\t\treturn \"Optional.empty\";\r\n\t}",
"static Object missingValue(Class type) {\n if (!OptionalParameter.class.isAssignableFrom(type)) {\n return null;\n } else if (type == OptString.class) {\n return OptString.theMissingValue;\n } else if (type == OptBoolean.class) {\n return OptBoolean.theMissingValue;\n } else if (type == OptInteger.class) {\n return OptInteger.theMissingValue;\n } else if (type == OptDouble.class) {\n return OptDouble.theMissingValue;\n } else {\n return null;\n }\n }",
"@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}",
"static <V> Value<V> of(V value) {\n return new ImmutableValue<>(value);\n }",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n optionalValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private String getStringOrNull (String value) {\n if (value == null || value.isEmpty()) value = null;\n return value;\n }",
"static <V> Value<V> of(Value<V> value) {\n return new ImmutableValue<>(value.get());\n }",
"@Override\n public Optional<?> getNullValue(DeserializationContext ctxt) throws JsonMappingException {\n return Optional.ofNullable(_valueDeserializer.getNullValue(ctxt));\n }",
"public static Optional<String> ifNonBlank(String text) {\n if (text == null || text.isEmpty() || isBlank(text)) {\n return Optional.empty();\n }\n return Optional.of(text);\n }",
"T getOrElse(T value);",
"T getNullValue();",
"public static JCardValue single(Object value) {\n\t\treturn new JCardValue(new JsonValue(value));\n\t}",
"public Optional<T> get(String path) {\n List<String> components = getPathComponents(path);\n\n MatchTreeNode<T> node = tree.getLongestMatchingNode(components);\n if (node == null) {\n return Optional.empty();\n }\n\n T value;\n if (isExactlyMatchingPath(node, path, components)) {\n // exact match:\n value = node.value();\n if (value == null) {\n value = bestValue(node.parent());\n }\n } else {\n value = bestValue(node);\n }\n\n if (value == null) {\n return Optional.empty();\n }\n\n return Optional.of(value);\n }",
"public Builder setVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) {\n if (valBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n val_ = value;\n } else {\n valBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder();",
"public Value() {}",
"@NonNull\n\t<T> Optional<T> get(@NonNull Class<T> type);",
"com.google.protobuf.Value getDefaultValue();",
"public Proposal(String value, String display) {\n this.value = value;\n this.display = display;\n if (this.value == null || this.value.length() == 0) {\n this.value = EMPTY;\n }\n if (this.display != null && this.display.length() == 0) {\n this.display = null;\n }\n }",
"T getDefaultValue();",
"private T parse(String value)\n\t\t{\n\t\t\treturn null;\n\t\t}",
"boolean hasOptionalValue();",
"public static void main(String[] args) {\n\t\tOptional<Object> empty = Optional.empty();\r\n\t\tSystem.out.println(empty.isPresent()); // returns false, since Object is null\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t// Using the of(value) method for a String that is Not null\r\n\t\tOptional<String> helloString = Optional.of(\"Hello!\");\r\n\t\tSystem.out.println(helloString.isPresent()); // returns true, since String = \"Hello and is Not null. \r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t// orElse(other value) - returns the value if present, otherwise returns the other value\r\n\t\tString orElse = helloString.orElse(\"Howdy!\");\r\n\t\tSystem.out.println(orElse);\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Using the ofNullable(value) method for a null String\r\n\t\tOptional<String> hello = Optional.ofNullable(null);\r\n\t\thello\r\n\t\t\t.map(String::toUpperCase)\r\n\t\t\t.orElse(\"Howdy!\"); // orElse() returns the other value: String 'Howdy!'\r\n\t\tSystem.out.println(hello); \r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t// Using chain methods on helloString with map() and orElseGet() methods\r\n\t\torElse = helloString\r\n\t\t\t\t.map(String::toUpperCase)\r\n\t\t\t\t.orElseGet(() -> {\r\n\t\t\t\t\t// ..some extra computations to get the value\r\n\t\t\t\t\treturn \"world\"; // helloString is Not null, since not getting 'world'.\r\n\t\t\t\t});\r\n\t\tSystem.out.println(orElse);\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t}",
"public static <A> Try<A> success(A value) {\n return new Try<>(null, value, false);\n }",
"public Builder mergeVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) {\n if (valBuilder_ == null) {\n if (((bitField0_ & 0x00000001) != 0) &&\n val_ != null &&\n val_ != build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance()) {\n getValBuilder().mergeFrom(value);\n } else {\n val_ = value;\n }\n } else {\n valBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public static Optional<Cuenta> crearCuenta001() {\n return Optional.of(new Cuenta(1L, \"Cristian\", new BigDecimal(\"1000\")));\n }",
"public Value(){}",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"public static StringValue makeStringValue(CharSequence value) {\r\n if (value == null || value.length() == 0) {\r\n return StringValue.EMPTY_STRING;\r\n } else {\r\n return new StringValue(value);\r\n }\r\n }",
"public AddressWithOptional build() {\n return address;\n }",
"public Value restrictToFalsy() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n if (isMaybeStr(\"\"))\n r.str = \"\";\n else\n r.str = null;\n r.flags &= ~STR;\n if (r.num != null && Math.abs(r.num) != 0.0)\n r.num = null;\n r.object_labels = r.getters = r.setters = null;\n r.flags &= ~(BOOL_TRUE | STR_PREFIX | (NUM & ~(NUM_ZERO | NUM_NAN)));\n r.excluded_strings = r.included_strings = null;\n return canonicalize(r);\n }",
"public static Value makeNone() {\n return theNone;\n }",
"@Override\n public OptionalDeserializer withResolved(TypeDeserializer typeDeser, JsonDeserializer<?> valueDeser) {\n return new OptionalDeserializer(_fullType, _valueInstantiator,\n typeDeser, valueDeser, _cfgReadAbsentAsNull);\n }",
"Optional<T> show();",
"public Builder clearValue() {\n \n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"public Builder clearValue() {\n \n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"public static StringFilterDTO exact(String value) {\r\n\t\treturn value != null ? new StringFilterDTO(value, StringMatchMode.EXACT) : null;\r\n\t}",
"public Builder clearValue() {\n \n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"Optional<V> get(String name);",
"public static Value.Builder newBuilder() {\n return new Value.Builder();\n }",
"public static CommandElement optional(CommandElement element) {\n return new OptionalCommandElement(element, null, false);\n }",
"public Builder clearValue() {\n bitField0_ = (bitField0_ & ~0x00000002);\n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"public Builder clearValue() {\n bitField0_ = (bitField0_ & ~0x00000002);\n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"Optional<T> parse(@Nonnull String s);",
"private String notNull(String value) {\n return value != null ? value : \"\";\n }",
"public static Object getDefaultValue(Object value) {\n if (value instanceof String) {\n return FieldType.STRING_TYPE.getDefaultValue();\n } else if (value instanceof ActivityStreamRest) {\n return FieldType.ACTIVITY_STREAM_REST.getDefaultValue();\n } else if (value instanceof ActivityRest) {\n return FieldType.ACTIVITY_REST_TYPE.getDefaultValue();\n }\n return new HashMap<String, Object>();\n }",
"@Nullable\n protected abstract T substituteDefault(@Nullable T value);",
"public Optional<String> getMailOptional()\n {\n return Optional.ofNullable(mail);\n }",
"public Builder clearValue() {\n bitField0_ = (bitField0_ & ~0x00000001);\n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"@java.lang.Override\n public build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder getValOrBuilder() {\n return val_ == null ? build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance() : val_;\n }",
"public Holder(/* @Nullable */ final T value) {\n this.value = value;\n }",
"public com.google.protobuf.Value.Builder getDefaultValueBuilder() {\n bitField0_ |= 0x00000020;\n onChanged();\n return getDefaultValueFieldBuilder().getBuilder();\n }",
"default Empty getEmptyObject() {\n return null;\n }",
"public Builder clearValue() {\n\n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"public static String getValueOrDefault(String value, String defaultValue) {\n return value != null && !value.isEmpty() ? value : defaultValue;\n }",
"public Builder clearValue() {\n value_ = getDefaultInstance().getValue();\n onChanged();\n return this;\n }",
"public Object fromOpenValue(Object value) throws InvalidObjectException {\n if (value == null) {\n return null;\n } else {\n return fromNonNullOpenValue(value);\n }\n }",
"private Optional optionalToOptional(ElementOptional optional) throws SemQAException {\n\t\tElement elm = optional.getOptionalElement();\r\n\t\tGraphPattern gp;\r\n\t\tValueConstraint vc;\r\n\t\tif (elm instanceof ElementGroup) {\r\n\t\t\tList<Element> children = ((ElementGroup) elm).getElements();\r\n\t\t\tSet<GraphPattern> childSemQA = new LinkedHashSet<GraphPattern>();\r\n\t\t\tSet<Optional> optionals = new LinkedHashSet<Optional>();\r\n\t\t\tSet<ElementFilter> filters = new LinkedHashSet<ElementFilter>();\r\n\t\t\tfor (Element child : children) {\r\n\t\t\t\tif (child instanceof ElementFilter) {\r\n\t\t\t\t\tfilters.add((ElementFilter) child);\r\n\t\t\t\t}\r\n\t\t\t\telse if (child instanceof ElementOptional) {\r\n\t\t\t\t\t// if child is an optional, need to get the graph pattern for the optional\r\n\t\t\t\t\t// and add it to the list of optional graph patterns\r\n\t\t\t\t\toptionals.add(optionalToOptional((ElementOptional) child));\r\n//\t\t\t\t\tchildSemQA.add(optionalToOptional((ElementOptional) child));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tchildSemQA.add(sparqlToSemQA(child));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGraphPattern baseGp = convertSetToJoin(childSemQA);\r\n\t\t\tif (childSemQA.size() == 0) {\r\n\t\t\t\tthrow new SemQAException(\"semQA: OPTIONAL without non-optional side not supported.\");\r\n\t\t\t}\r\n\t\t\tif (optionals.size() > 0) {\r\n\t\t\t\t// if there are optional elements, create a left join\r\n\t\t\t\t// convert the non-filter non-optional graph patterns to a Join if necessary\r\n\t\t\t\t// then, each optional element is part of a left join\r\n\t\t\t\tgp = new LeftJoin(baseGp, optionals);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// no optionals, just return the join of the graph patterns\r\n\t\t\t\tgp = baseGp;\r\n\t\t\t}\r\n\t\t\tif (filters.size() > 0) {\r\n\t\t\t\tvc = getConstraintFromFilters(filters);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvc = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgp = sparqlToSemQA(elm); // if it is not a group\r\n\t\t\tvc = null;\r\n\t\t}\r\n\t\treturn new Optional(gp, vc);\r\n\t\t\r\n\t}",
"Optional<String> user();",
"EmptyType createEmptyType();",
"static String emptyToNull(String value) {\n if (value == null || value.trim().isEmpty())\n return null;\n return value.trim();\n }",
"public Value() {\n }",
"default Optional<ClassElement> getClassElement(Class<?> type) {\n if (type != null) {\n return getClassElement(type.getName());\n }\n return Optional.empty();\n }",
"protected Optional<T> getFirstValueOptional(List<T> list) {\n\t\treturn Optional.ofNullable(getFirstValue(list));\n\t}",
"Optional<User> get(String userName);",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Value,\n com.google.protobuf.Value.Builder,\n com.google.protobuf.ValueOrBuilder>\n getDefaultValueFieldBuilder() {\n if (defaultValueBuilder_ == null) {\n defaultValueBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Value,\n com.google.protobuf.Value.Builder,\n com.google.protobuf.ValueOrBuilder>(\n getDefaultValue(), getParentForChildren(), isClean());\n defaultValue_ = null;\n }\n return defaultValueBuilder_;\n }",
"protected abstract Optional<T> getSingleSelection();",
"public static MessageString toString(MessageValue<?> value) {\n\t\tif (value != null) {\n\t\t\tif (value instanceof MessageString) {\n\t\t\t\treturn (MessageString) value;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new MessageStringImpl(value.asString());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}"
] |
[
"0.78983533",
"0.7074783",
"0.6996195",
"0.6948386",
"0.6439045",
"0.6415457",
"0.63452184",
"0.63127035",
"0.62663746",
"0.6253182",
"0.6209024",
"0.6043227",
"0.59957",
"0.59438103",
"0.59329444",
"0.5886159",
"0.5864484",
"0.5863145",
"0.5855551",
"0.578801",
"0.57372403",
"0.57193863",
"0.5674944",
"0.56059885",
"0.5573188",
"0.5532936",
"0.5529452",
"0.55189615",
"0.54982764",
"0.54982764",
"0.5455304",
"0.53621054",
"0.5344341",
"0.5342688",
"0.5306913",
"0.5282843",
"0.52524585",
"0.5199348",
"0.51855814",
"0.51427376",
"0.5119805",
"0.508957",
"0.5026245",
"0.5013293",
"0.50096726",
"0.49731547",
"0.49724147",
"0.4923697",
"0.49220085",
"0.49185383",
"0.4914604",
"0.49050674",
"0.48834255",
"0.48559052",
"0.48548487",
"0.48505762",
"0.48448992",
"0.48444986",
"0.48317227",
"0.48317227",
"0.4770434",
"0.476677",
"0.47595054",
"0.4757848",
"0.47235525",
"0.47144145",
"0.47060063",
"0.47060063",
"0.46984306",
"0.46932578",
"0.46876195",
"0.46867898",
"0.46807346",
"0.46763268",
"0.46763268",
"0.46744412",
"0.4664676",
"0.4661997",
"0.4655303",
"0.4646237",
"0.46453258",
"0.4644681",
"0.46384856",
"0.4635758",
"0.46277335",
"0.46066976",
"0.45962343",
"0.45933494",
"0.4590022",
"0.4586461",
"0.458557",
"0.45752007",
"0.45677122",
"0.45650417",
"0.45618802",
"0.45567757",
"0.45393658",
"0.4537276",
"0.45292616",
"0.45268002"
] |
0.70624924
|
2
|
If a value is present in this Optional, returns the value, otherwise throws NoSuchElementException.
|
public T get() {
if (value == null) {
throw new NoSuchElementException("No value present");
}
return value;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public E element () throws NoSuchElementException;",
"@Override\n public Integer next() {\n if(peekedVal != null ){\n Integer next = peekedVal;\n peekedVal = null;\n return next;\n }\n if(!iter.hasNext()){\n throw new NoSuchElementException();\n }\n return iter.next();\n\n }",
"@Override\n public V next() throws NoSuchElementException {\n Object result;\n if (this.hasNext()) {\n result = myHashMap.getTable()[this.number].getValue();\n this.number++;\n } else {\n throw new NoSuchElementException(\"\");\n }\n return (V) result;\n }",
"Optional<X> elem();",
"public E next() throws NoSuchElementException{\n\t\tPosition<E> aux=actual;\n\t\tif (aux == null) \n\t\t\tthrow new NoSuchElementException();\t\t\n\t\tthis.avanzar();\n\t\treturn aux.element();\n\t}",
"public E peek() throws NoSuchElementException;",
"@Override\n public Map.Entry<K, V> next() {\n if (iter.hasNext()) {\n \n lastItemReturned = iter.next();\n return lastItemReturned;\n } else {\n throw new NoSuchElementException();\n }\n }",
"@Override\n\tpublic Entry<K,V> next() throws NoSuchElementException {\n\t\treturn null;\n\t}",
"public Integer peek() {\n if(peekedVal == null){\n if(!iter.hasNext()){\n throw new NoSuchElementException();\n }\n peekedVal = iter.next();\n }\n return peekedVal;\n }",
"@MethodContract(post = @Expression(\"result != null ? contains(result\"))\n public PropertyException getAnElement() {\n if (isEmpty()) {\n return null;\n }\n else {\n Iterator<Set<PropertyException>> iter1 = getElementExceptions().values().iterator();\n Set<PropertyException> s = iter1.next();\n Iterator<PropertyException> iter2 = s.iterator();\n return iter2.next();\n }\n }",
"@Override\n public E next() {\n this.modificationCheck();\n E result;\n if (this.position != SimpleArrayList.this.index) {\n result = (E) values[position++];\n } else {\n throw new NoSuchElementException(\"No more suitable elements!\");\n }\n return result;\n }",
"public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}",
"public E next() throws NoSuchElementException\n {\n E retElement = null;\n if(hasNext() == true)\n {\n retElement = arrayList.get(index);\n index++;\n }\n else\n { throw new NoSuchElementException(); }\n return retElement;\n }",
"public V next()\n {\n if (hasNext())\n {\n V currentEntry = arrayDictionary.dictionary[cursor].getValue();\n cursor++;\n nextEntry = currentEntry;\n return currentEntry;\n } \n else\n throw new NoSuchElementException();\n // end if\n }",
"public E next() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 &&\n position > 0 &&\n position < size) {\n E element = entries[position];\n position++;\n return element;\n } else {\n throw new NoSuchElementException(); \n } \n \n }",
"public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }",
"public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}",
"@Override\n public Integer next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Integer toReturn = next;\n next = null;\n if (peekingIterator.hasNext()) {\n next = peekingIterator.next();\n }\n return toReturn;\n }",
"public E next() {\n int index = 0;\n\n // iterating over collections\n for (Collection<E> coll : collectionList) {\n // checking if current collection contains the desired element (i.e. itrCounter falls in coll)\n if (coll.size() <= itrCounter - index)\n // desired index doesn't lie in current collection -> skipping all elements\n index += coll.size();\n // current collection contains desired element\n else {\n // finding desired element; iterating over coll\n for (E element : coll){\n // desired index found -> increment itrCounter and return element\n if (index == itrCounter) {\n itrCounter++;\n return element;\n }\n // desired index not reached yet -> increment index\n else index++;\n }\n }\n }\n // could not find next element\n throw new NoSuchElementException();\n }",
"public E poll() throws NoSuchElementException;",
"@Override\r\n\tpublic T next() throws NoSuchElementException{\n\t\tif (hasNext()) {\r\n\t\t\tT curr = next.getData();\r\n\t\t\tnext = next.getNext();\r\n\t\t\treturn curr;\r\n\t\t}\r\n\t\telse throw new NoSuchElementException();\r\n\t\t\r\n\t}",
"Object getNextElement() throws NoSuchElementException;",
"public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }",
"@Override\n public E next() {\n if (this.hasNext()) {\n curr = curr.nextNode;\n return curr.getData();\n }\n else {\n throw new NoSuchElementException();\n }\n }",
"public E peek() {\n E item;\n try {\n item = element();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }",
"public E get(int index)\n {\n if (index >= 0 && index < size)\n return data[index];\n else\n throw new NoSuchElementException();\n }",
"public E peek() {\n if(size == 0)\n throw new NoSuchElementException();\n return head.val;\n }",
"public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }",
"E find(KeyType key) {\n int position = findPosKey(key);\n if (mArray[position].state == FHhashQP.ACTIVE) {\n return mArray[findPosKey(key)].data;\n } else {\n throw new NoSuchElementException();\n }\n }",
"public ValueWrapper peek(String keyName) {\n\t\tif (!map.containsKey(keyName)) {\n\t\t\tthrow new NoSuchElementException(\"Empty stack for this key.\");\n\t\t}\n\t\treturn map.get(keyName).value;\n\t}",
"public E getElement(E data) throws NoSuchElementException {\n if (isEmpty()) return null;\n Node<E> current = head;\n while (true) {\n if (current.getData().equals(data)) return current.getData();\n if (current.getNext() != null) current = current.getNext();\n else throw new NoSuchElementException(data + \" not found in list.\");\n }\n\n }",
"default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }",
"@Override\n\tpublic Optional<Value> get(Key k) {\n\t\treturn bst.find(k);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n//\t\t\t\tT object = (T)data[cursor * numCols + pinnedColumn];\n\t\t\t\tT object = get(cursor, pinnedColumn);\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}",
"public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }",
"public Note getNote(Note note) throws NoSuchElementException;",
"@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }",
"Optional<V> get(K key);",
"public E element() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t}\r\n\t\treturn (E) data.get(0);\r\n\t}",
"T peek(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.get(0);\n\treturn answer;\n }",
"protected abstract Optional<T> getSingleSelection();",
"public Optional<T> get(String path) {\n List<String> components = getPathComponents(path);\n\n MatchTreeNode<T> node = tree.getLongestMatchingNode(components);\n if (node == null) {\n return Optional.empty();\n }\n\n T value;\n if (isExactlyMatchingPath(node, path, components)) {\n // exact match:\n value = node.value();\n if (value == null) {\n value = bestValue(node.parent());\n }\n } else {\n value = bestValue(node);\n }\n\n if (value == null) {\n return Optional.empty();\n }\n\n return Optional.of(value);\n }",
"public E next() {\n if (nextIndex >= set.count)\n throw new NoSuchElementException();\n\n canRemove = true;\n\n return set.data[nextIndex++];\n }",
"@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }",
"public abstract T next() throws NoSuchElementException;",
"@Override\r\n public ValueType get(KeyType key) throws NoSuchElementException {\r\n // if capacity is 0, throw an exception\r\n if (capacity == 0) {\r\n throw new NoSuchElementException(\"No Match Found\");\r\n }\r\n\r\n int index = hashFunction(key); // the index of the pair in the hashTable\r\n\r\n // If the linked list at the index is null, target is not exist, and throw an exception.\r\n if (hashTable[index] == null) {\r\n throw new NoSuchElementException(\"No Match Found\");\r\n }\r\n\r\n // Find the target in the linked list. If found, return the value, if not found, throw an exception.\r\n for (HashNode node : hashTable[index]) {\r\n if (node.key.equals(key)) {\r\n return node.value;\r\n }\r\n }\r\n throw new NoSuchElementException(\"No Match Found\");\r\n }",
"E head() throws NoSuchElementException;",
"private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }",
"public boolean next() {\n boolean result = true;\n try {\n element = iterator.next();\n } catch(NoSuchElementException ex) {\n result = false;\n }\n return result;\n }",
"public Option<E> safePeek() {\n return safeIndex(0);\n }",
"public void findNext() {\n\t if (value != null) {\n\t findValue();\n\t } else {\n\t find();\n\t }\n\t}",
"public abstract Optional<A> val();",
"public T remove() throws NoSuchElementException {\n T result = poll();\n if (result == null) {\n throw new NoSuchElementException(\"Priority queue is empty\");\n } else {\n return result;\n }\n }",
"public T next() {\n\t\t\tif (hasNext()) {\n\t\t\t\tT nextItem = elements[index];\n\t\t\t\tindex++;\n\t\t\t\t\n\t\t\t\treturn nextItem;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new java.util.NoSuchElementException(\"No items remaining in the iteration.\");\n\t\t\t\n\t\t}",
"@Override\r\n\t\tpublic Item next() {\r\n\t\t\tif (!hasNext()) {\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn queue[index[i++]];\r\n\t\t\t}\r\n\t\t}",
"public BSCObject next()\n {\n if (ready_for_fetch)\n {\n // the next sibling is waiting to be returned, so just return it\n ready_for_fetch = false;\n return sibling;\n }\n else if (hasNext())\n {\n // make sure there is a next sibling; if so, return it\n ready_for_fetch = false;\n return sibling;\n }\n else\n throw new NoSuchElementException();\n }",
"public int peek() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return elementData[1];\n }",
"public E next()\r\n {\r\n E valueToReturn;\r\n\r\n if (!hasNext())\r\n throw new NoSuchElementException(\"The lister is empty\");\r\n \r\n // get the string from the node\r\n valueToReturn = cursor.getData();\r\n \r\n // advance the cursor to the next node\r\n cursor = cursor.getLink();\r\n \r\n return valueToReturn;\r\n }",
"@Override\n public E element() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return (E) array[0];\n }",
"java.lang.String getOptionalValue();",
"public CourseReading get(String key) throws NoSuchElementException {\n\t\tif (containsKey(key) == true) {\r\n\t\t\tint HashKey = key.hashCode() % 31;\r\n\t\t\tif (HashKey > K.length - 1) {\r\n\t\t\t\twhile (HashKey > K.length - 1) {\r\n\t\t\t\t\tHashKey %= K.length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (String c : K[HashKey]) {\r\n\t\t\t\tif (c.equals(key)) {\r\n\t\t\t\t\treturn V[HashKey].get(K[HashKey].indexOf(key));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"Optional<V> get(String name);",
"public E choose() throws JMLNoSuchElementException {\n if (the_list != null) {\n E entry = the_list.val;\n if (entry == null) {\n //@ assume containsNull;\n return null;\n } else {\n E o = entry ;\n //@ assume o instanceof Object;\n //@ assume \\typeof(o) <: elementType;\n return o;\n }\n } else {\n throw new JMLNoSuchElementException(\"Tried to .choose() \"\n + \"with JMLObjectSet empty\");\n }\n }",
"@Override\n public E next() {\n if (hasNext() == false) {\n throw new NoSuchElementException();\n }\n return this.array[this.index++];\n }",
"default Value<V> ifPresent(Consumer<V> consumer) {\n if (isPresent()) {\n consumer.accept(get());\n }\n return this;\n }",
"@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\t\t\ttry {\n\t\t\t\tT object = (T)data[pinnedRow * numCols + cursor];\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element.\" + e.toString() );\n\t\t\t}\n\t\t}",
"public Double element() throws NoSuchElementException {\n\t\tif (arr.length > 0) {\n\t\t\treturn arr[0];\n\t\t} else {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t}",
"public Integer peek() {\n if (next != null) {\n return next;\n }\n\n if (iterator.hasNext()) {\n next = iterator.next();\n return next;\n }\n\n return null;\n }",
"public K next()\n {\n if (hasNext())\n {\n K currentEntry = arrayDictionary.dictionary[cursor].getKey();\n cursor++;\n nextEntry = currentEntry;\n return currentEntry;\n } \n else\n throw new NoSuchElementException();\n // end if\n }",
"@Override\r\n\t\tpublic E next() {\n\t\t\tcaret = caret.next();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex++;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}",
"@Override\n public Integer next() {\n if (!hasNext()) {\n throw new NoSuchElementException(\"The iteration has no more elements.\");\n }\n currentPrime = getNextPrime(currentPrime);\n counter++;\n return currentPrime;\n }",
"public T get(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"Data cannot be null.\");\n }\n if (root == null) {\n throw new NoSuchElementException(\"Element does not exist.\");\n }\n T findData = getHelper(data, root);\n if (findData != null) {\n return findData;\n } else {\n throw new NoSuchElementException(\"Element does not exist.\");\n }\n }",
"default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }",
"Optional<V> lookup(K k);",
"default boolean isPresent() {\n return get() != null;\n }",
"default boolean isPresent() {\n return get() != null;\n }",
"public E poll() {\n E item;\n try {\n item = remove();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }",
"private <X extends JsonValue> Optional<X> findByKey(String property, Class<X> expected) {\n checkNotNull(property, \"property must not be null\");\n if (asJsonObject().containsKey(property)) {\n JsonValue jsonValue = asJsonObject().get(property);\n if (!expected.isAssignableFrom(jsonValue.getClass())) {\n final ValueType valueType = JsonUtils.jsonTypeForClass(expected);\n throw new UnexpectedValueException(location.child(property), jsonValue, valueType);\n }\n return Optional.of(expected.cast(jsonValue));\n }\n return Optional.empty();\n }",
"@Override\n\t\tpublic Tuple next() throws DbException, TransactionAbortedException,\n\t\t\t\tNoSuchElementException {\n\t\t\tif(tplItr.hasNext())\n\t\t\t\treturn tplItr.next();\n\t\t\tthrow new NoSuchElementException();\n\t\t}",
"protected Tuple fetchNext() throws NoSuchElementException, TransactionAbortedException, DbException {\n\t\t// some code goes here\n\t\tTuple ret;\n\t\twhile (childOperator.hasNext()) {\n\t\t\tret = childOperator.next();\n\t\t\tif (pred.filter(ret))\n\t\t\t\treturn ret;\n\t\t}\n\t\treturn null;\n\t}",
"public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }",
"public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }",
"@Override\r\n public ValueType get(KeyType key) throws NoSuchElementException {\r\n \r\n if (!containsKey(key)) {\r\n throw new NoSuchElementException();\r\n }\r\n \r\n String bookDetails = \"\";\r\n \r\n int index = Math.abs(key.hashCode()) % this.capacity;\r\n \r\n\r\n // steps through the linked list at a given index\r\n for (int i = 0; i < array[index].size(); i++) {\r\n\r\n // if the key at the index of the linked list mathces the passed key\r\n if (array[index].get(i).getTitle().equals(key)) {\r\n\r\n\r\n return (ValueType) (bookDetails + \"ISBN: \" + array[index].get(i).getIsbn()\r\n + System.lineSeparator() + \"Author: \" + array[index].get(i).getAuthor()\r\n + System.lineSeparator() + \"CheckedIn: \" + array[index].get(i).getChekedIn()\r\n + System.lineSeparator() + \"Genre: \" + array[index].get(i).getGenre()\r\n + System.lineSeparator() + \"Description: \" + array[index].get(i).getDescription());\r\n\r\n }\r\n\r\n }\r\n return null;\r\n \r\n }",
"public T element() throws NoSuchElementException {\n if (size() == 0) {\n // throws NoSuchElementException if the heap is empty\n throw new NoSuchElementException();\n }\n\n // Root of the heap exists at the 0th index\n return heap[0];\n }",
"public E element() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t\tpublic T next() throws NoSuchElementException {\n\n\t\t\ttry {\n\n//\t\t\t\tT object = (T)data[currentRow * numCols + currentColumn];\n\t\t\t\tT object = get(currentRow, currentColumn);\n\n\t\t\t\tcurrentRow++;\n\t\t\t\tif ( currentRow == numRows ) {\n\t\t\t\t\tcurrentRow = 0;\n\t\t\t\t\tcurrentColumn++;\n\t\t\t\t}\n\n\t\t\t\tlastRet = cursor++;\n\t\t\t\treturn object;\n\t\t\t} catch ( IndexOutOfBoundsException e ) {\n\t\t\t\tthrow new NoSuchElementException( \"You have iterated past the last element. \" + e.toString() );\n\t\t\t}\n\n\t\t}",
"public static <T> T first(\r\n\t\t\t@Nonnull final Observable<? extends T> source) {\r\n\t\tCloseableIterator<T> it = toIterable(source).iterator();\r\n\t\ttry {\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\treturn it.next();\r\n\t\t\t}\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t}",
"@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }",
"@Override\n public String next() {\n if (!nextElementSet && !setNextElement()) {\n throw new NoSuchElementException();\n }\n nextElementSet = false;\n return nextElement;\n }",
"Optional<ValueType> getSingle(KeyType key);",
"public E next()\n {\n if (hasNext())\n {\n E item = currentNode.data();\n currentNode = currentNode.next();\n count--;\n return item;\n }\n else\n {\n throw new NoSuchElementException(\"There isnt another element\");\n\n }\n }",
"public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}",
"public static <T> T single(\r\n\t\t\t@Nonnull Observable<? extends T> source) {\r\n\t\tCloseableIterator<T> it = toIterable(source).iterator();\r\n\t\ttry {\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\tT one = it.next();\r\n\t\t\t\tif (!it.hasNext()) {\r\n\t\t\t\t\treturn one;\r\n\t\t\t\t}\r\n\t\t\t\tthrow new TooManyElementsException();\r\n\t\t\t}\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t}",
"public Item next() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot retrieve item from empty deque\");\n }\n Item item = current.getItem(); //item = current item to be returned\n current = current.getNext();\n return item;\n }",
"public T item() throws IOException, NoSuchElementException;",
"public DateWrapper getDate() throws NoSuchElementException {\n return this.dateWrapper.get();\n }",
"public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }",
"public T remove() throws NoSuchElementException {\n\tT result = poll();\n\tif(result == null) {\n\t throw new NoSuchElementException(\"Priority queue is empty\");\n\t} else {\n\t return result;\n\t}\n }",
"@Override\r\n public CustomProcess peekBest() {\r\n if (data[0] == null || isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty\");\r\n }\r\n return data[0];\r\n }",
"public Value find(Value key) {\n\t\tValue v = get(key);\n\t\tif (v != null)\n\t\t\treturn v;\n\t\tif (parent != null)\n\t\t\treturn parent.find(key);\n\t\treturn null;\n\t}"
] |
[
"0.60606086",
"0.59762084",
"0.59597945",
"0.59338355",
"0.5923817",
"0.5919933",
"0.583374",
"0.5829993",
"0.5744201",
"0.5743983",
"0.5738522",
"0.56269",
"0.56221163",
"0.560906",
"0.55897886",
"0.55828303",
"0.55497164",
"0.55419487",
"0.5539668",
"0.55246836",
"0.55243826",
"0.551389",
"0.5501647",
"0.54908353",
"0.54522485",
"0.54466176",
"0.54095834",
"0.5405247",
"0.5392121",
"0.53826624",
"0.53773487",
"0.53559387",
"0.5342453",
"0.53272665",
"0.5325139",
"0.5296513",
"0.52897877",
"0.5285262",
"0.5282174",
"0.52787614",
"0.5275319",
"0.52641016",
"0.5259399",
"0.5225326",
"0.52209175",
"0.5219645",
"0.5216678",
"0.51960695",
"0.5189777",
"0.5186337",
"0.5185882",
"0.5175764",
"0.5165801",
"0.51642776",
"0.51542294",
"0.5148001",
"0.5138127",
"0.512672",
"0.51205057",
"0.5117548",
"0.5117101",
"0.5111097",
"0.51103294",
"0.5086382",
"0.5083963",
"0.50836235",
"0.50661474",
"0.50422907",
"0.50376594",
"0.50374633",
"0.50365746",
"0.5031956",
"0.50307214",
"0.5026071",
"0.50240916",
"0.50240916",
"0.5023618",
"0.50181997",
"0.50110716",
"0.5007579",
"0.50074685",
"0.50059325",
"0.5005883",
"0.50042266",
"0.5003138",
"0.49998635",
"0.49928507",
"0.49882212",
"0.49853507",
"0.49832863",
"0.49790278",
"0.4975876",
"0.49624324",
"0.49615362",
"0.49563757",
"0.49535576",
"0.49413848",
"0.4939427",
"0.49359307",
"0.4932313"
] |
0.64111423
|
0
|
Return true if there is a value present, otherwise false.
|
public boolean isPresent() {
return value != null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean hasValue() {\n return value_ != null;\n }",
"default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"public boolean hasValue() {\n return result.hasValue();\n }",
"public boolean hasValue() {\n return result.hasValue();\n }",
"public boolean hasValue() {\n return valueBuilder_ != null || value_ != null;\n }",
"boolean hasVal();",
"boolean hasVal();",
"@java.lang.Override\n public boolean hasVal() {\n return val_ != null;\n }",
"public boolean hasValue() { return false; }",
"public boolean hasValue() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn false;\n\t\telse {\n\t\t\tObject value = nameValue.getValue();\n\t\t\tif (value == null)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t}",
"boolean hasVarValue();",
"boolean hasOptionalValue();",
"boolean isValue();",
"public boolean exists() {\n \t\treturn (type != UNKNOWN && isValid() && ((type == STRING) ? !sVal.equals(\"\") : true));\n \t}",
"public boolean getValuePresent() {\r\n return ValuePresent;\r\n }",
"public boolean exists() {\n \t\treturn (type != UNASKED && isValid() && ((type == STRING) ? !sVal.equals(\"\") : true));\n \t}",
"default boolean isPresent() {\n return get() != null;\n }",
"default boolean isPresent() {\n return get() != null;\n }",
"boolean containsValue(Object value) throws NullPointerException;",
"boolean hasMPValue();",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasSearchValue() {\n return searchValue_ != null;\n }",
"public boolean existsAnyMissingValue(){\r\n\t\treturn (anyMissingValue[0] || anyMissingValue[1]);\r\n\t}",
"private boolean hasValue (String s) { return s != null && s.length() != 0; }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean containsValue(Object value) {\n\t\treturn false;\r\n\t}",
"boolean hasCustomValue();",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public boolean HasOneValueInTheSpace()\n {\n return _valuesToPut.size() == 1;\n }",
"public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }",
"public boolean hasValue(Object value) {\r\n\t\tif (objectMap.containsKey(value))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"boolean hasBoolValue();",
"public boolean isValue() {\n switch(this.getType()) {\n case CONSTANT_INTEGER : \n case CONSTANT_FLOAT :\n case CONSTANT_DOUBLE : \n case CONSTANT_LONG : \n case CONSTANT_STRING:\n return true ;\n default :\n return false;\n }\n }",
"public boolean existsInputMissingValues(){\r\n\t\treturn anyMissingValue[0];\r\n\t}",
"public boolean hasValues()\r\n\t{\r\n\t\t\r\n\t\tif ((this.criteriaType != null && !this.criteriaType.trim().equals(\"\"))\r\n\t\t\t\t&& (this.criteriaValues != null && !this.criteriaValues.isEmpty()))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic boolean hasMissingValue() {\n\t\treturn false;\n\t}",
"public boolean isPresent() {\n return exists();\n }",
"boolean hasDefaultValue();",
"public boolean isValue() {\n return value;\n }",
"boolean hasStringValue();",
"boolean isSimpleValue();",
"public boolean hasValueCharacteristicId() {\n return valueCharacteristicId_ != null;\n }",
"public boolean isValue() {\n return value;\n }",
"public boolean isEmpty() {\n\t\tString v = getValue();\n\t\treturn v == null || v.isEmpty();\n\t}",
"boolean hasSearchValue();",
"@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}",
"public boolean isMaybePresent() {\n checkNotUnknown();\n if (isPolymorphic())\n return (flags & (PRESENT_DATA | PRESENT_ACCESSOR)) != 0;\n else\n return (flags & PRIMITIVE) != 0 || num != null || str != null || object_labels != null || getters != null || setters != null;\n }",
"boolean containsValue(Object value);",
"@Override\n\tpublic boolean containsValue(Object arg0) {\n\t\treturn false;\n\t}",
"public boolean isValueExists(String key, String value) {\n\t\tSystem.out.println(\"Checking for value : \" + value + \" existance\");\n\t\tboolean valueExist = false;\n\t\tMap<String, List<String>> dictMap = getDictionary();\n\t\tif (dictMap != null && dictMap.isEmpty() != true) {\n\t\t\tif (dictMap.containsKey(key)) {\n\t\t\t\tList<String> membersList = dictMap.get(key);\n\t\t\t\tif (membersList.contains(value))\n\t\t\t\t\tvalueExist = true;\n\t\t\t}\n\t\t}\n\t\treturn valueExist;\n\t}",
"public boolean isSetPresent()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(PRESENT$0) != 0;\n }\n }",
"private boolean isVal() {\n\t\treturn look.type == Tag.BOOLEAN || look.type == Tag.NUMBER\n\t\t\t\t|| look.type == Tag.STRING || look.type == Tag.NULL;\n\n\t}",
"public boolean isKnownValue() {\r\n\t\t\treturn isKnownValue;\r\n\t\t}",
"boolean getValue();",
"boolean isNilValue();",
"public boolean hasSearchValue() {\n return searchValueBuilder_ != null || searchValue_ != null;\n }",
"@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}",
"public boolean hasValueCharacteristicId() {\n return valueCharacteristicIdBuilder_ != null || valueCharacteristicId_ != null;\n }",
"public boolean isValue() {\n return false;\n }",
"public boolean hasVal() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"@Override\n\tpublic boolean hasValue(Attribute attribute) {\n\t\treturn false;\n\t}",
"boolean hasHPValue();",
"public boolean hasValidValues() {\r\n\t\treturn hasValidValues;\r\n\t}",
"public final boolean hasAttribute ()\r\n {\r\n return _value.hasAttribute();\r\n }",
"public boolean effectiveBooleanValue() {\r\n return value.length() > 0;\r\n }",
"public boolean hasVal() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean containsValue(Object value) {\n return map.containsValue(value);\n }",
"public boolean hasValue(String value) {\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(value.equals(curAttr.getVal())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean hasValueCharacteristicId();",
"public boolean isSet() {\n\t\treturn false;\n\t}",
"@Override\n public boolean isDefined()\n {\n return getValue() != null || getChildrenCount() > 0\n || getAttributeCount() > 0;\n }",
"public boolean hasVal() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"@Override\n\tpublic boolean getHasValue() {\n\t\treturn true;\n\t}",
"@Override public boolean containsValue(Object value) {\n if (value == null) {\n for (LinkedEntry<K, V> header = this.header, e = header.nxt;\n e != header; e = e.nxt) {\n if (e.value == null) {\n return true;\n }\n }\n return false;\n }\n\n // value is non-null\n for (LinkedEntry<K, V> header = this.header, e = header.nxt;\n e != header; e = e.nxt) {\n if (value.equals(e.value)) {\n return true;\n }\n }\n return false;\n }",
"boolean hasValue(PropertyValue<?, ?> value);"
] |
[
"0.8552573",
"0.84158486",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.84034085",
"0.8133319",
"0.8133319",
"0.81140256",
"0.8097756",
"0.8097756",
"0.7874179",
"0.78233534",
"0.7773696",
"0.76441777",
"0.76005477",
"0.75851446",
"0.7529883",
"0.75241035",
"0.7490964",
"0.747008",
"0.747008",
"0.74135494",
"0.7332442",
"0.72756153",
"0.72756153",
"0.7233349",
"0.7233349",
"0.7222891",
"0.720271",
"0.7183985",
"0.71775323",
"0.7164079",
"0.715713",
"0.715713",
"0.715713",
"0.71411484",
"0.71392107",
"0.7104075",
"0.7104075",
"0.7072185",
"0.706976",
"0.706178",
"0.70592993",
"0.70229656",
"0.70153564",
"0.6993602",
"0.69797695",
"0.69780993",
"0.69617915",
"0.69543815",
"0.69172287",
"0.6893551",
"0.6887922",
"0.68821615",
"0.68784606",
"0.6876782",
"0.6862385",
"0.6851468",
"0.682281",
"0.681199",
"0.68081725",
"0.679672",
"0.67911464",
"0.6771263",
"0.6766047",
"0.67567575",
"0.67519283",
"0.67472416",
"0.67466694",
"0.67348385",
"0.67300034",
"0.6684686",
"0.66688895",
"0.6668226",
"0.66613877",
"0.6646873",
"0.66335326",
"0.66215354",
"0.6619175",
"0.66109586",
"0.659805",
"0.658795",
"0.6586718",
"0.65841883",
"0.6582041",
"0.65794784",
"0.6552431",
"0.65474284",
"0.6538659"
] |
0.81547225
|
16
|
Return the value if present, otherwise return other.
|
public T orElse(T other) {
return value != null ? value : other;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }",
"public Object getElseValue();",
"T getOrElse(T value);",
"public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }",
"@Override\n\tpublic Optional<Value> get(Key k) {\n\t\treturn bst.find(k);\n\t}",
"public abstract Optional<A> val();",
"public Object getValue(String key)\n {\n if (otherDetails == null)\n {\n return null;\n }\n else\n {\n return otherDetails.get(key);\n }\n }",
"public String getAnotherValue()\n {\n return this.anotherValue;\n }",
"@Override\n\tpublic T get(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) {\n\t\t\t\treturn values[i];\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].get(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].get(elem);\n\t\t}\n\t\treturn null;\n\t}",
"Object getContainedValue();",
"default Value<V> ifPresent(Consumer<V> consumer) {\n if (isPresent()) {\n consumer.accept(get());\n }\n return this;\n }",
"public Pin getOtherPin(Pin pin) {\n if(p1.equals(pin)) {\n return p2;\n } else if(p2.equals(pin)) {\n return p1;\n }\n return null;\n }",
"public T getValue(UUID player) {\n\t\tT value = values.get(player);\n\t\tif (value == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}",
"public THING orElseNull() {\n return directlyGetOrElse(null);\n }",
"public String getOther() {\n return other;\n }",
"public String getOther() {\n return other;\n }",
"public <T> T convertGet(T value, T standard)\n\t{\n\t\treturn value != null ? value : standard;\n\t}",
"@Override\n public Possible<T> or(Possible<T> alternate) {\n AbstractDynamicPossible<T> self = this;\n return new AbstractDynamicPossible<T>() {\n @Override\n public boolean isPresent() {\n return self.isPresent() || alternate.isPresent();\n }\n\n @Override\n public T get() {\n if (self.isPresent()) {\n try {\n return self.get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent, fall through\n }\n }\n return alternate.get();\n }\n };\n }",
"public Object get(String aName, Object aDefault)\n{\n Object value = get(aName);\n return value!=null? value : aDefault;\n}",
"public getValue_result(getValue_result other) {\n if (other.isSetSuccess()) {\n this.success = other.success;\n }\n }",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"public Player getOther(Player p) {\n\t\treturn p.getName().equals(player.getName()) ? this.other : this.player;\n\t}",
"Optional<V> get(K key);",
"@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}",
"public Value joinAbsent() {\n checkNotUnknown();\n if (isMaybeAbsent())\n return this;\n Value r = new Value(this);\n r.flags |= ABSENT;\n return canonicalize(r);\n }",
"@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}",
"private V isertNullKey(K key, V value) {\n return value;\n }",
"public Value find(Value key) {\n\t\tValue v = get(key);\n\t\tif (v != null)\n\t\t\treturn v;\n\t\tif (parent != null)\n\t\t\treturn parent.find(key);\n\t\treturn null;\n\t}",
"public /* @Nullable */ T getValue() {\n return value;\n }",
"public void setElseValue(Object pValue);",
"T getOrElse(Supplier<T> fn);",
"public Change onTopOf(Change other) {\n if (platform.isPresent())\n other = other.with(platform.get());\n if (application.isPresent())\n other = other.with(application.get());\n return other;\n }",
"public Optional<V> lookup(K key) {\n Optional<V> mt = Optional.empty();\n return this.entries.foldr(((kvp, o)-> kvp.left.equals(key) ? Optional.of(kvp.right) : o) , mt);\n }",
"@Override\n @XmlElement(name = \"other\")\n public synchronized String getOther() {\n return other;\n }",
"public static Value makeAnyNumOther() {\n return theNumOther;\n }",
"public Object getKeyOrValue(Object search) {\n\t\tObject result = super.get(search);\n\t\tif ( result == null ) {\n\t\t\t// not found in <K, V> map, search <V, K> map\n\t\t\tresult = reverseLookup.get(search);\n\t\t}\n\t\treturn result;\n\t}",
"default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }",
"public Object getValue2() { return this.value2; }",
"public A getValue() { return value; }",
"Optional<V> lookup(K k);",
"public org.apache.xmlbeans.XmlObject getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(VALUE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}",
"@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}",
"Optional<V> get(String name);",
"public T getValue(Player player) {\n\t\treturn getValue(player.getUniqueId());\n\t}",
"public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}",
"public E get(int idx, E b) {\n assert idx >= 0;\n\n if(v == array[idx]){\n\t\treturn v;\n\t}\n\t\n\tif(array[idx] == null){\n\t\treturn b;\n\t}\n\treturn b;\n }",
"Vertex getOtherVertex(Vertex v) {\n\t\t\tif(v.equals(_one)) return _two;\n\t\t\telse if(v.equals(_two)) return _one;\n\t\t\telse return null;\n\t\t}",
"public T caseHasOther(HasOther object) {\n\t\treturn null;\n\t}",
"@Override\n protected <T> T replaceIfNotNull(T previousVal, T newVal) {\n return newVal;\n }",
"public Tile sameValue(Tile t) {\n for (int i=0; i<this.size(); i++) {\n if (this.get(i).getColour() == t.getColour() &&\n this.get(i).getValue() == t.getValue()) {\n return this.get(i);\n }\n }\n return null;\n\n }",
"@Override\n public V getValue() {\n Object object = this.h;\n synchronized (object) {\n return this.a().getValue();\n }\n }",
"@NotNull\n T getValue();",
"public V getIfPresent(Object key) {\n V result = null;\n MapSegment.Entry<K, V> entry = segment.getEntry(key);\n\n if (null != entry) {\n entry.setAccessTime(ticker.nextTick());\n result = entry.getValue();\n }\n return result;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T> T get(String key) {\n\t\treturn (T)other.get(key);\n\t}",
"@Override\r\n\t\tpublic V getValue() {\n\t\t\treturn pair.getSecond();\r\n\t\t}",
"Object getValueFrom();",
"private V get(K key) {\n\t\t\tif (keySet.contains(key)) {\n\t\t\t\treturn valueSet.get(keySet.indexOf(key));\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}",
"public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }",
"public T get() {\r\n\t\tif (value == null) {\r\n\t\t\tthrow new NoSuchElementException(\"No value present\");\r\n\t\t}\r\n\t\treturn value;\r\n\t}",
"double getBasedOnValue();",
"protected Object doGetValue() {\n\t\treturn value;\n\t}",
"public Object getValue(Object object) throws IllegalArgumentException, IllegalAccessException, SecurityException, InvocationTargetException, NoSuchMethodException{\n\t\tif(this.fielAncestor != null){\n\t\t\tobject = this.fielAncestor.getValue(object);\n\t\t}\n\t\tif(object != null)\n\t\t\tobject = getValueObject(object);\n\t\treturn object;\n\t}",
"public Value joinAbsentModified() {\n checkNotUnknown();\n if (isMaybeAbsent() && isMaybeModified())\n return this;\n Value r = new Value(this);\n r.flags |= ABSENT | MODIFIED;\n return canonicalize(r);\n }",
"private InputLocation getOtherLocation( Object key )\n {\n return ( locations != null ) ? locations.get( key ) : null;\n }",
"public abstract int getPreferredValue();",
"default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}",
"@Nullable\n T get(T input);",
"public @Nullable T getValue() {\n return this.value;\n }",
"public Value get(Key key) {\n if (key == null) {\n return null;\n }\n if(first.key.compareTo(key) == 0) {\n return update(first);\n }\n Node recentNode = first;\n while(recentNode != null) {\n if (recentNode.next.key.compareTo(key) == 0) {\n return update(recentNode);\n }\n recentNode = recentNode.next;\n }\n return null;\n }",
"@Override\n public T getValue() {\n return entry.getValue().getValue();\n }",
"@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}",
"public gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Other getOther()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Other target = null;\r\n target = (gov.nih.nlm.ncbi.www.SeqIdDocument.SeqId.Other)get_store().find_element_user(OTHER$18, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"public Player getOtherPlayer(Player player) {\n return (sender == player) ? recipient : sender;\n }",
"public S getValue() { return value; }",
"V get(K k) throws UndefinedException;",
"protected D getPreviousOrSame(D d) {\n\t\t\tD prev = getPrevious(d);\n\t\t\tif (prev == null) {\n\t\t\t\treturn d;\n\t\t\t}\n\t\t\treturn prev;\n\t\t}",
"protected Object getOptionalValue(Node node, int idx,\n InternalContextAdapter context)\n throws MethodInvocationException\n {\n Node target = getOptionalNode(node, idx);\n if (target == null) {\n return null;\n }\n return target.value(context);\n }",
"@Override\n\tpublic T get(MatrixCoordinate coordIn) {\n\t\tMatrixValidator.throwIfNotOnMatrix(this, coordIn);\n\t\treturn this.valueMap.getOrDefault(coordIn, this.defaultValue);\n\t}",
"private V getHelper(K key, Node p) {\n if(p == null){\n return null;\n }\n int cmp = key.compareTo(p.key);\n if(cmp == 0){\n return p.value;\n }else if(cmp < 0){\n return getHelper(key, p.left);\n }else{\n return getHelper(key, p.right);\n }\n }",
"Optional<ValueType> getSingle(KeyType key);",
"@Override\n\tprotected Object doGetValue(Object source) {\n\t\treturn null;\n\t}",
"public static <T> T getValue(T value){\n return value;\n }",
"protected abstract Optional<T> getSingleSelection();",
"String getIfElse();",
"public V get(K key) {\r\n\t\t\tif (key == null) {\r\n\t\t\t\tthrow new NullPointerException();\r\n\t\t\t} else if (find(key) == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn find(key).value;\r\n\t\t\t}\r\n\t\t}",
"public abstract Object getValue();",
"public abstract Object getValue();",
"public abstract Object getValue();",
"public V getOrDefault(T keySummary, V defaultValue) {\n // there is a possibility that the key is not present\n if (keySummary.isEmptyVS()) {\n return defaultValue;\n }\n if (!containsKey(keySummary).getGuardFor(false).isFalse()) {\n return defaultValue.restrict(keySummary.getUniverse());\n }\n\n V merger = null;\n List<V> toMerge = new ArrayList<>();\n for (GuardedValue<?> key : ValueSummary.getGuardedValues(keySummary)) {\n V val = entries.getOrDefault(key.getValue(), defaultValue);\n if (merger == null) merger = val.restrict(key.getGuard());\n toMerge.add(val.restrict(key.getGuard()));\n }\n\n assert merger != null;\n return merger.merge(toMerge);\n }",
"public abstract Value getValue();",
"V getOrDefault(final K key, final V defaultValue);",
"default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }"
] |
[
"0.6855212",
"0.68465364",
"0.6696616",
"0.6119531",
"0.5809296",
"0.5775367",
"0.57589096",
"0.5745065",
"0.5719377",
"0.5645588",
"0.5641741",
"0.554952",
"0.5536871",
"0.5497517",
"0.5485952",
"0.5485952",
"0.54692024",
"0.541353",
"0.54084903",
"0.54082096",
"0.54042643",
"0.54042643",
"0.54042643",
"0.54042643",
"0.54042643",
"0.54042643",
"0.54042643",
"0.53962415",
"0.53738815",
"0.53683513",
"0.5367453",
"0.5356851",
"0.53509253",
"0.53502315",
"0.5348347",
"0.5333148",
"0.532774",
"0.532748",
"0.5325446",
"0.5315213",
"0.5313928",
"0.53069204",
"0.5301975",
"0.5280905",
"0.5272583",
"0.526574",
"0.52553785",
"0.5241134",
"0.5241134",
"0.52364403",
"0.52190393",
"0.52173173",
"0.52127147",
"0.52123564",
"0.5203015",
"0.52025217",
"0.51967824",
"0.519003",
"0.51866674",
"0.5182313",
"0.5174857",
"0.51703215",
"0.51693934",
"0.5157436",
"0.5155888",
"0.51492584",
"0.5145107",
"0.513973",
"0.51383597",
"0.5132684",
"0.5130954",
"0.51194423",
"0.5118813",
"0.5118079",
"0.51076543",
"0.5103774",
"0.5100921",
"0.50971043",
"0.50952464",
"0.50949234",
"0.50921047",
"0.5088392",
"0.50819063",
"0.50818354",
"0.5076866",
"0.50766075",
"0.5072948",
"0.50657994",
"0.50630116",
"0.5057024",
"0.5050881",
"0.50463665",
"0.5030716",
"0.5030303",
"0.5030303",
"0.5030303",
"0.50299984",
"0.50299627",
"0.5019872",
"0.5013837"
] |
0.6993303
|
0
|
Indicates whether some other object is "equal to" this Optional. The other object is considered equal if: it is also an Optional and; both instances have no value present or; the present values are "equal to" each other via equals().
|
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!(obj instanceof Optional)) {
return false;
}
Optional <?> other = (Optional <?>) obj;
return Objects.equals(value, other.value);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }",
"public boolean eqValue(E that) {\n return this.value.compareTo(that) == 0;\n }",
"public boolean equals(Object other)\n\t{\n\t\tif (other == null || other instanceof Pair<?> == false)\n\t\t\treturn false;\n\t\t\n\t\t@SuppressWarnings(\"unchecked\") //safe cast\n\t\tPair<T> p = (Pair<T>) other;\n\t\t\n\t\tif ((first.equals(p.first) && second.equals(p.second)) || (first.equals(p.second) && second.equals(p.first)))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }",
"public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n if (other == null) {\n return false;\n }\n if (!other.getClass().equals(this.getClass())) {\n return false;\n }\n Person that = (Person) other;\n /*if (!this.name.equals(that.name))\n return false;\n if (this.info != that.info) \n return false;\n */\n return (this.name.equals(that.name) && this.info == that.info);\n }",
"public Value<?> eq(Value<?> v) {\r\n Integer cmp = compare(v);\r\n if (cmp != null) {\r\n return new ValueBoolean(cmp == 0);\r\n\r\n }\r\n\r\n return new ValueBoolean(this.value.equals(v.value));\r\n }",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.EQUALS)\n default boolean equalTo(IData other) {\n \n return notSupportedOperator(OperatorType.EQUALS);\n }",
"public boolean equals(Object other) {\n if (other == null || !(other instanceof BsPurchasePaymentDto)) { return false; }\n final BsPurchasePaymentDto otherEntity = (BsPurchasePaymentDto)other;\n if (!helpComparingValue(getPurchasePaymentId(), otherEntity.getPurchasePaymentId())) { return false; }\n return true;\n }",
"public boolean equals(final T other) {\n return equals(other, 0.0);\n }",
"public static boolean equal(Object a, Object b) {\r\n\t\tif (a == b) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn a != null && b != null && a.equals(b);\r\n\t}",
"public boolean equals(Object other) {\n return qName.equals(((NotationValue)other).qName);\n }",
"public abstract boolean equals(Object other);",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Question)) {\n return false;\n }\n Question other = (Question) object;\n if ((this.qId == null && other.qId != null) || (this.qId != null && !this.qId.equals(other.qId))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n if (key != null ? !key.equals(pair.key) : pair.key != null) return false;\n if (value != null ? !value.equals(pair.value) : pair.value != null) return false;\n return true;\n }\n return false;\n }",
"@Override\n\tpublic boolean equals(Object o) {\n\t\tif (this == o) {\n\t\t\treturn true;\n\t\t}\n\t\tif (o == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (getClass() != o.getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\tQuestion q = (Question) o;\n\t\treturn Objects.equals(question, q.question) && Objects.equals(correctAnswer, q.correctAnswer);\n\t}",
"@NeededForTesting\n public static boolean areObjectsEqual(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }",
"static public boolean areEqual(Object aThis, Object aThat) {\r\n // System.out.println(\"Object\");\r\n return aThis == null ? aThat == null : aThis.equals(aThat);\r\n }",
"public boolean equals(Object another) {\n return (this == another);\n }",
"public boolean equals(Object o);",
"@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n Org other = (Org) that;\n return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))\n && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))\n && (this.getProjlimit() == null ? other.getProjlimit() == null : this.getProjlimit().equals(other.getProjlimit()))\n && (this.getStudlimit() == null ? other.getStudlimit() == null : this.getStudlimit().equals(other.getStudlimit()))\n && (this.getUploadlimit() == null ? other.getUploadlimit() == null : this.getUploadlimit().equals(other.getUploadlimit()))\n && (this.getDocroot() == null ? other.getDocroot() == null : this.getDocroot().equals(other.getDocroot()))\n && (this.getValid() == null ? other.getValid() == null : this.getValid().equals(other.getValid()))\n && (this.getCdate() == null ? other.getCdate() == null : this.getCdate().equals(other.getCdate()))\n && (this.getMdate() == null ? other.getMdate() == null : this.getMdate().equals(other.getMdate()));\n }",
"@Override\n public boolean equals(Object other) {\n /* Check this and other refer to the same object */\n if (this == other) {\n return true;\n }\n\n /* Check other is Person and not null */\n if (!(other instanceof Person)) {\n return false;\n }\n\n Person person = (Person) other;\n\n /* Compare all required fields */\n return age == person.age &&\n Objects.equals(firstName, person.firstName) &&\n Objects.equals(lastName, person.lastName);\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Question)) {\r\n return false;\r\n }\r\n Question other = (Question) object;\r\n if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.getId().equals(other.getId()))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean equals(Object other) {\n if (this == other) {\n // Same instance passed as parameter\n return true;\n } else if (null == other) {\n return false;\n }\n\n if (!(other instanceof BigInt)) {\n // other is not a BigInt\n return false;\n }\n\n BigInt num = (BigInt)other;\n\n return (num.isPositive == isPositive && number.equals(num.number));\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof QuestionCard)) {\n return false;\n }\n\n // state check\n QuestionCard card = (QuestionCard) other;\n return this.id.getText().equals(card.id.getText())\n && this.question.equals(card.question);\n }",
"public boolean equals(Object obj) {\n // Quick same object test\n if(this == obj) {\n return true;\n }\n\n // Quick fail tests\n if(!(obj instanceof SetQuery)) {\n return false;\n }\n\n SetQuery other = (SetQuery) obj;\n\n return getOperation() == other.getOperation() &&\n EquivalenceUtil.areEqual(this.isAll(), other.isAll()) &&\n EquivalenceUtil.areEqual(this.leftQuery, other.leftQuery) &&\n EquivalenceUtil.areEqual(this.rightQuery, other.rightQuery) &&\n EquivalenceUtil.areEqual(getOrderBy(), other.getOrderBy()) &&\n EquivalenceUtil.areEqual(getLimit(), other.getLimit()) &&\n EquivalenceUtil.areEqual(getWith(), other.getWith()) &&\n sameOptionAndHint(other);\n }",
"public boolean Equal(Person other){\n\t\tboolean ret_val = true;\n\t\tint nt = 0;\n\t\tint thisAge = this.GetAge();\n\t\tint otherAge = other.GetAge();\n\t\tif (!this.Compare(thisAge,otherAge)){\n\t\t\tret_val = false ;\n\t\t} \n\t\telse { \n\t\t\tint thisSalary = this.GetSalary();\n\t\t\tint otherSalary = other.GetSalary();\n\t\t if (!this.Compare(thisSalary, otherSalary)){\n\t\t \tret_val = false ;\n\t\t } \n\t\t else {\n\t\t \tboolean thisMarried = this.GetMarried();\n\t\t \tboolean otherMarried = other.GetMarried();\n\t\t \tif (thisMarried) {\n\t\t \t\tif (!otherMarried){\n\t\t \t\t\tret_val = false;\n\t\t \t\t} \n\t\t\t \t \telse {\n\t\t\t \t \t\tnt = 0 ;\n\t\t\t \t \t}\n\t\t \t}\n\t\t\t\telse{\n\t\t\t\t\tif (otherMarried){\n\t\t\t\t\t\tret_val = false;\n\t\t\t\t\t} \n\t\t\t\t else {\n\t\t\t\t \tnt = 0 ;\n\t\t\t\t } \n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn ret_val ;\n }",
"@Override\n public boolean equals(Object o) {\n return this == o;\n }",
"public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null) {\n return false;\n }\n if (o.getClass().equals(SingleFieldKey.class)) {\n SingleFieldKey otherSingleFieldKey = (SingleFieldKey)o;\n return otherSingleFieldKey.keyField == keyField &&\n keyField.valueEqual(otherSingleFieldKey.value, value);\n }\n\n if (!Key.class.isAssignableFrom(o.getClass())) {\n return false;\n }\n Key otherKey = (Key)o;\n return keyField.getGlobType() == otherKey.getGlobType()\n && keyField.valueEqual(value, otherKey.getValue(keyField));\n }",
"public boolean equals(Object o) {\r\n\t\treturn o instanceof BooleanValue?value == ((BooleanValue) o).value:false;\r\n\t}",
"public abstract boolean equals(Object o);",
"public boolean equalsImpl(Object obj)\n {\n boolean ivarsEqual = true;\n\n final EntityTypeVP rhs = (EntityTypeVP)obj;\n\n if( ! (recordType == rhs.recordType)) ivarsEqual = false;\n if( ! (changeIndicator == rhs.changeIndicator)) ivarsEqual = false;\n if( ! (entityType.equals( rhs.entityType) )) ivarsEqual = false;\n if( ! (padding == rhs.padding)) ivarsEqual = false;\n if( ! (padding1 == rhs.padding1)) ivarsEqual = false;\n return ivarsEqual;\n }",
"public boolean equals(Object obj)\n {\n if (!super.equals(obj))\n return false;\n\n PSSearchField s2 = (PSSearchField) obj;\n\n return m_strDescription.equals(s2.m_strDescription)\n && m_strDisplayName.equals(s2.m_strDisplayName)\n && m_mnemonic.equals(s2.getMnemonic())\n && m_strFieldType.equals(s2.m_strFieldType)\n && m_strFieldName.equals(s2.m_strFieldName)\n && m_values.equals(s2.m_values)\n && m_strOperator.equals(s2.m_strOperator)\n && m_extOperator.equals(s2.m_extOperator)\n && m_sequence == s2.m_sequence\n && compare(m_choices, s2.m_choices);\n }",
"public boolean equals(Object otherObject)\n {\n boolean isEqual = super.equals(otherObject);\n\n if(isEqual)\n {\n if(getClass() == otherObject.getClass())\n {\n isEqual = true;\n }\n else\n {\n isEqual = false;\n }\n }\n\n return isEqual;\n }",
"static public boolean testEquality(Object a, Object b) {\r\n\t\tif (a == null && b == null) // undefined == undefined\r\n\t\t\treturn true;\r\n\t\tif ((a == null || b == null) && (a instanceof JSNull || b instanceof JSNull)) // undefined or null\r\n\t\t\treturn true;\r\n\t\tif ((a == null && b instanceof JSNull) || (a == null && b instanceof JSNull)) // anything == undefined\r\n\t\t\treturn true;\r\n\t\tif (a == null || b == null) // anything equals null\r\n\t\t\treturn false;\r\n\t\treturn a.equals(b);\r\n\t}",
"@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }",
"public boolean equals( Object other){\n \tif( other instanceof Person){\n \t\treturn personId == ((Person)other).getPersonId();\n \t}\n \treturn false;\n }",
"public boolean equals(Object o) {\r\n\t\tif (!(o instanceof IValuedField)) return false; //get rid of non fields\r\n\t\tIValuedField field= (IValuedField)o;\r\n\t\tboolean areEqual = type.equals(field.getType());//same type \r\n\t\tif (formal){\r\n\t\t\treturn (areEqual && field.isFormal());\r\n\t\t} else //the current field is actual\r\n\t\t\tif (((IValuedField) field).isFormal()) { //if the other is formal\r\n\t\t\t\treturn false;\r\n\t\t\t} else //if they're both actual then their values must match\r\n\t\t\t{\r\n\t\t\t\tif (varname != null) // there is a variable name\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif (!(o instanceof NameValueField))\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\telse //check that names match\r\n\t\t\t\t\t\tareEqual = (areEqual && (varname.equals(((NameValueField)field).getVarName())));\r\n\t\t\t\t\t}\r\n\t\t\t\treturn areEqual && value.equals(field.getValue()); //values are the same\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t}",
"public boolean equals(Object other) {\n\t\t\n\t\t// checks if other object is a type of ISet\n\t\tif(other instanceof ISet<?>) {\n\t\t\t\n\t\t\tISet<E> otherSet = ((ISet<E>)(other));\n\t\t\t\n \t\t// lists aren't equal if sizes don't match\n \t\tif(this.size() != otherSet.size()) {\n \t\t\treturn false;\n \t\t}\n \t\t// empty lists are equal\n \t\tif(this.size() == 0 && otherSet.size() == 0) {\n \t\t\treturn true;\n \t\t}\n \t\t\n \t\t// checks all the elements in both sets to ensure equality\n \t\tif(this.containsAll(otherSet)) {\n \t\t\treturn true;\n \t\t}\n \t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n VEqinquiry other = (VEqinquiry) that;\n return (this.getCorpcode() == null ? other.getCorpcode() == null : this.getCorpcode().equals(other.getCorpcode()))\n && (this.getCorpname() == null ? other.getCorpname() == null : this.getCorpname().equals(other.getCorpname()))\n && (this.getCorpshortname() == null ? other.getCorpshortname() == null : this.getCorpshortname().equals(other.getCorpshortname()))\n && (this.getCorptype() == null ? other.getCorptype() == null : this.getCorptype().equals(other.getCorptype()))\n && (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))\n && (this.getCorpid() == null ? other.getCorpid() == null : this.getCorpid().equals(other.getCorpid()))\n && (this.getInquirycontent() == null ? other.getInquirycontent() == null : this.getInquirycontent().equals(other.getInquirycontent()))\n && (this.getInquirydate() == null ? other.getInquirydate() == null : this.getInquirydate().equals(other.getInquirydate()))\n && (this.getAttribute1() == null ? other.getAttribute1() == null : this.getAttribute1().equals(other.getAttribute1()))\n && (this.getAttribute2() == null ? other.getAttribute2() == null : this.getAttribute2().equals(other.getAttribute2()))\n && (this.getAttribute3() == null ? other.getAttribute3() == null : this.getAttribute3().equals(other.getAttribute3()))\n && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby()))\n && (this.getCreationdate() == null ? other.getCreationdate() == null : this.getCreationdate().equals(other.getCreationdate()))\n && (this.getLastupdateby() == null ? other.getLastupdateby() == null : this.getLastupdateby().equals(other.getLastupdateby()))\n && (this.getLastupdatedate() == null ? other.getLastupdatedate() == null : this.getLastupdatedate().equals(other.getLastupdatedate()));\n }",
"public boolean _is_equivalent(Object that) {\n return equals(that) ;\n }",
"@Override\n public boolean equals(final Object obj)\n {\n return this.value.equals(obj);\n }",
"private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }",
"public boolean strictEquals(final Object that) {\n v8.checkThread();\n checkReleased();\n if (that == this) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (!(that instanceof V8Value)) {\n return false;\n }\n if (isUndefined() && ((V8Value) that).isUndefined()) {\n return true;\n }\n if (((V8Value) that).isUndefined()) {\n return false;\n }\n return v8.strictEquals(v8.getV8RuntimePtr(), getHandle(), ((V8Value) that).getHandle());\n }",
"@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }",
"@Override\n public boolean equals(Object other) {\n return this == other;\n }",
"@Override\n\tpublic boolean equals(Object other) {\n\t\tif (other instanceof DBBoolean) {\n\t\t\tDBBoolean otherDBBoolean = (DBBoolean) other;\n\t\t\treturn getValue().equals(otherDBBoolean.getValue());\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof TeamDTO)) {\n return false;\n }\n TeamDTO other = (TeamDTO) object;\n if ((this.teamID == null && other.teamID != null) || (this.teamID != null && !this.teamID.equals(other.teamID))) {\n return false;\n }\n return true;\n }",
"@Override\r\n public boolean equals(Object o){\r\n boolean equals=false;\r\n if (o!=null) {\r\n equals=(this.id==((Car)o).id)&&\r\n this.currentPosition.equals(((Car)o).currentPosition)\r\n &&this.orientation==((Car)o).orientation&&this.size==((Car)o).size;\r\n }\r\n return equals;\r\n }",
"@Override\n public boolean equals(Object o) {\n if (o instanceof Pair) {\n Pair pair = (Pair) o;\n return (this.key == pair.key && this.value == pair.value);\n } else\n return false;\n }",
"@Override\n public boolean equals(Object o) {\n return (o!=null && o.getClass().equals(this.getClass()));\n }",
"@Override\n public boolean equals(Object o) {\n return (o!=null && o.getClass().equals(this.getClass()));\n }",
"@Override\n public boolean equals(Object o) {\n return (o!=null && o.getClass().equals(this.getClass()));\n }",
"@Override\n @EnsuresNonNullIf(result = true, expression = \"#1\")\n @Pure\n public boolean equals(@GuardSatisfied VarRelation this, @GuardSatisfied @Nullable Object o) {\n if (!(o instanceof VarRelation) || (o == null)) {\n return false;\n }\n VarRelation vr = (VarRelation) o;\n return (vr.parent_ppt_name.equals(parent_ppt_name)\n && (((vr.local_variable == null) && local_variable == null)\n || ((vr.local_variable != null) && vr.local_variable.equals(local_variable))));\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return id.getText().equals(card.id.getText())\n && person.equals(card.person);\n }",
"public boolean equals(ArticulationParameter rhs) {\n boolean ivarsEqual = true;\n\n if (rhs.getClass() != this.getClass()) {\n return false;\n }\n\n if (!(parameterTypeDesignator == rhs.parameterTypeDesignator)) {\n ivarsEqual = false;\n }\n if (!(changeIndicator == rhs.changeIndicator)) {\n ivarsEqual = false;\n }\n if (!(partAttachedTo == rhs.partAttachedTo)) {\n ivarsEqual = false;\n }\n if (!(parameterType == rhs.parameterType)) {\n ivarsEqual = false;\n }\n if (!(parameterValue == rhs.parameterValue)) {\n ivarsEqual = false;\n }\n\n return ivarsEqual;\n }",
"public boolean equals(Object other) {\r\n if (other == null || !(other instanceof BsTTestplans)) { return false; }\r\n final BsTTestplans otherEntity = (BsTTestplans)other;\r\n if (!helpComparingValue(getPlanid(), otherEntity.getPlanid())) { return false; }\r\n if (!helpComparingValue(getCategory(), otherEntity.getCategory())) { return false; }\r\n if (!helpComparingValue(getName(), otherEntity.getName())) { return false; }\r\n if (!helpComparingValue(getAuthor(), otherEntity.getAuthor())) { return false; }\r\n if (!helpComparingValue(getNotes(), otherEntity.getNotes())) { return false; }\r\n if (!helpComparingValue(getTestplan(), otherEntity.getTestplan())) { return false; }\r\n return true;\r\n }",
"public static <T> boolean equals(T a, T b) {\n return (a == b) || (a != null && a.equals(b));\n }",
"@Override public boolean equals(Object o) { // since 1.3.1\n // should these ever match actually?\n return (o == this);\n }",
"@Override\n public boolean equals(Object o) {\n if(o == null){\n return false;\n }\n\n if (this == o) { return true; }\n if (getClass() != o.getClass()) { return false; }\n Query a_new = (Query) o;\n return this.requestedPosts== (a_new.getRequestedPosts()) && this.getQueryID() == a_new.getQueryID();\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Person)) {\n return false;\n }\n\n Person otherPerson = (Person) other;\n return otherPerson.getName().equals(getName())\n && otherPerson.getPhone().equals(getPhone())\n && otherPerson.getEmail().equals(getEmail())\n && otherPerson.getAddress().equals(getAddress())\n && otherPerson.getSalary().equals(getSalary())\n && otherPerson.getProjects().equals(getProjects())\n && otherPerson.getProfilePic().equals(getProfilePic())\n && otherPerson.getUsername().equals(getUsername())\n && otherPerson.getPassword().isSamePassword(getPassword())\n && otherPerson.getLeaveApplications().equals(getLeaveApplications());\n }",
"public boolean equals(Object other) {\r\n if (other == null || !(other instanceof BsTPhase)) { return false; }\r\n final BsTPhase otherEntity = (BsTPhase)other;\r\n if (!helpComparingValue(getPhaseid(), otherEntity.getPhaseid())) { return false; }\r\n if (!helpComparingValue(getPhasename(), otherEntity.getPhasename())) { return false; }\r\n if (!helpComparingValue(getPhasenotes(), otherEntity.getPhasenotes())) { return false; }\r\n if (!helpComparingValue(getPhasestyle(), otherEntity.getPhasestyle())) { return false; }\r\n if (!helpComparingValue(getStartdate(), otherEntity.getStartdate())) { return false; }\r\n if (!helpComparingValue(getEnddate(), otherEntity.getEnddate())) { return false; }\r\n if (!helpComparingValue(getPhasecontent(), otherEntity.getPhasecontent())) { return false; }\r\n return true;\r\n }",
"public final boolean equals(Object obj) {\r\n return this == obj;\r\n }",
"public boolean equals(Object other)\n {\n \t// if the *pointers* are the same, then by golly it must be the same object!\n \tif (this == other)\n \t\treturn true;\n \t\n \t// if the parameter is null or the two objects are not instances of the same class,\n \t// they can't be equal\n \telse if (other == null || this.getClass() != other.getClass())\n \t\treturn false;\n \t\n //Since this class is what the bag will use if it wants\n //to hold strings, we'll use the equals() method in the\n //String class to check for equality\n \telse if ((this.content).equals(((StringContent)other).content))\n return true;\n \t\n else return false;\n }",
"final public boolean equals (Object other)\n {\n\treturn compareTo (other) == 0;\n }",
"@Override\r\n public boolean equals(Object that) {\r\n if (this == that) {\r\n return true;\r\n }\r\n if (that == null) {\r\n return false;\r\n }\r\n if (getClass() != that.getClass()) {\r\n return false;\r\n }\r\n Mp other = (Mp) that;\r\n return (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))\r\n && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))\r\n && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))\r\n && (this.getAppSecret() == null ? other.getAppSecret() == null : this.getAppSecret().equals(other.getAppSecret()))\r\n && (this.getAppToken() == null ? other.getAppToken() == null : this.getAppToken().equals(other.getAppToken()))\r\n && (this.getAppAeskey() == null ? other.getAppAeskey() == null : this.getAppAeskey().equals(other.getAppAeskey()))\r\n && (this.getRefreshToken() == null ? other.getRefreshToken() == null : this.getRefreshToken().equals(other.getRefreshToken()))\r\n && (this.getRawId() == null ? other.getRawId() == null : this.getRawId().equals(other.getRawId()))\r\n && (this.getLogo() == null ? other.getLogo() == null : this.getLogo().equals(other.getLogo()))\r\n && (this.getAppQr() == null ? other.getAppQr() == null : this.getAppQr().equals(other.getAppQr()))\r\n && (this.getServiceType() == null ? other.getServiceType() == null : this.getServiceType().equals(other.getServiceType()))\r\n && (this.getVerifyType() == null ? other.getVerifyType() == null : this.getVerifyType().equals(other.getVerifyType()))\r\n && (this.getAtTime() == null ? other.getAtTime() == null : this.getAtTime().equals(other.getAtTime()));\r\n }",
"@Override\n boolean equals(Object other);",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof TSurveyQuestion)) {\r\n return false;\r\n }\r\n TSurveyQuestion other = (TSurveyQuestion) object;\r\n if ((this.tSurveyQuestionPK == null && other.tSurveyQuestionPK != null) || (this.tSurveyQuestionPK != null && !this.tSurveyQuestionPK.equals(other.tSurveyQuestionPK))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean equals(Object o) { return compareTo(o) == 0; }",
"public boolean equals(java.lang.Object other){\n return false; //TODO codavaj!!\n }",
"@Override\n\tpublic abstract boolean equals(Object other);",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Owner)) {\n return false;\n }\n Owner other = (Owner) object;\n if ((this.ownerId == null && other.ownerId != null) || (this.ownerId != null && !this.ownerId.equals(other.ownerId))) {\n return false;\n }\n return true;\n }",
"public boolean equals(Object object);",
"@Override\n public abstract boolean equals(Object other);",
"@Override\n public abstract boolean equals(Object other);",
"public boolean equals( Combination other ) {\n if(this.one== other.one && this.two == other.two && this.three == other.three && other != null){\n return true;\n }\n else return false;\n }",
"@Override\n\tpublic boolean equals(Object other) {\n\t\tif (other == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (this.getClass() != other.getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tCircle otherObject = (Circle) other;\n\t\treturn approx(this.radius, otherObject.radius) && \n\t\t\t\tthis.color.equals(otherObject.color) &&\n\t\t\t\tthis.position.equals(otherObject.position) &&\n\t\t\t\tthis.filled == otherObject.filled;\n\t\t\n\t}",
"public boolean equals(Object other) {\r\n if (other == null || getClass() != other.getClass() || length != ((MoneyList) other).length)\r\n return false;\r\n\r\n MoneyNode nodeThis = first;\r\n MoneyNode nodeOther = ((MoneyList) other).first;\r\n while (nodeThis != null) {\r\n // Since the two linked lists are the same length,\r\n // they should reach null on the same iteration.\r\n\r\n if (nodeThis.data != nodeOther.data)\r\n return false;\r\n\r\n nodeThis = nodeThis.next;\r\n nodeOther = nodeOther.next;\r\n } // while\r\n\r\n return true;\r\n }",
"@Override\n public boolean equals(Object other) {\n if (!(other instanceof User)) return false;\n return this.equalKeys(other) && ((User)other).equalKeys(this);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof TenderCompanyProjectDTO)) {\n return false;\n }\n TenderCompanyProjectDTO other = (TenderCompanyProjectDTO) object;\n if ((this.tenderCompanyProjectID == null && other.tenderCompanyProjectID != null) || (this.tenderCompanyProjectID != null && !this.tenderCompanyProjectID.equals(other.tenderCompanyProjectID))) {\n return false;\n }\n return true;\n }",
"public boolean equals(Object obj);",
"public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof TimeDataItem)) {\n return false;\n }\n\n TimeDataItem other = (TimeDataItem)o;\n\n if (this.time != null) {\n if (!this.time.equals(other.time)) {\n return false;\n }\n } else if (other.time != null) {\n return false;\n }\n\n if (this.value != null) {\n if (!this.value.equals(other.value)) {\n return false;\n }\n } else if (other.value != null) {\n return false;\n }\n\n return true;\n }",
"@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }",
"@Override\n public boolean equals(Object object) {\n // TODO: Warning - this method won't work in the case the id fields are not set\n if (!(object instanceof AttemptAnswer)) {\n return false;\n }\n AttemptAnswer other = (AttemptAnswer) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public synchronized boolean equals(Object obj) {\n\t\tif (null == obj)\n\t\t\treturn false;\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (!(obj instanceof IQuestionaire))\n\t\t\treturn false;\n\n\t\tIQuestionaire other = (IQuestionaire) obj;\n\n\t\tif (!getTitle().equals(other.getTitle()))\n\t\t\treturn false;\n\t\tif (!getAuthor().equals(other.getAuthor()))\n\t\t\treturn false;\n\n\t\tIQuestionIterator ours = iterator();\n\t\tIQuestionIterator others = other.iterator();\n\t\t\n\t\twhile (ours.hasNext()) {\n\t\t\tif (!others.hasNext())\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\tif (!ours.next().equals(others.next()))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (others.hasNext())\n\t\t\treturn false;\t\t\n\t\t\t\n return true;\n\t}",
"public boolean equals( Object obj );",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof CityDTO)) {\n return false;\n }\n CityDTO other = (CityDTO) object;\n if ((this.cityID == null && other.cityID != null) || (this.cityID != null && !this.cityID.equals(other.cityID))) {\n return false;\n }\n return true;\n }",
"@Override\n\tpublic boolean equals( Object other) {\n\n\t\tif( !( other instanceof BooleanStateValue)) {\n return false;\n }\n\n\t\tBooleanStateValue otherValue = (BooleanStateValue) other;\n\n\t\treturn _storage == otherValue._storage;\n\t}",
"public boolean equals(Object o) {\n if (o == this) {\n return true;\n }\n if (!(o instanceof Mapping)) {\n return false;\n }\n Mapping that = (Mapping) o;\n if (this.id != null) {\n if (this.id.equals(that.getId())) {\n }\n return false;\n }\n if (this.name != null) {\n if (this.name.equals(that.getName())) {\n }\n return false;\n }\n if (this.value == null) {\n if (that.getValue() == null) {\n return true;\n }\n } else if (this.value.equals(that.getValue())) {\n return true;\n }\n return false;\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return displayedIndex == card.getDisplayedIndex()\n && staff.equals(card.staff);\n }",
"@Override\n public boolean equals(Object other) {\n return other == this // short circuit if same object\n || (other instanceof SwitchPeriodCommand // instanceof handles nulls\n && pastDate.equals(((SwitchPeriodCommand) other).pastDate)); // state check\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Query)) {\n return false;\n }\n return id != null && id.equals(((Query) o).id);\n }",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof VersionedAssignmentList)) {\n return false;\n }\n\n VersionedAssignmentList otherVersionedAssignmentList = (VersionedAssignmentList) other;\n\n // state check\n return super.equals(otherVersionedAssignmentList)\n && assignmentListStateList.equals(otherVersionedAssignmentList.assignmentListStateList)\n && currentStatePointer == otherVersionedAssignmentList.currentStatePointer;\n }",
"public boolean equals(Object o) {\r\n\t\t// TODO and replace return false with the appropriate code.\r\n\t\tif (o == null || o.getClass() != this.getClass())\r\n\t\t\treturn false;\r\n\t\tProperty p = (Property) o;\r\n\t\treturn Arrays.deepEquals(p.positive, this.positive)\r\n\t\t\t\t&& Arrays.deepEquals(p.negative, this.negative)\r\n\t\t\t\t&& Arrays.deepEquals(p.stop, this.stop)\r\n\t\t\t\t&& p.scoringmethod == this.scoringmethod\r\n\t\t\t\t&& Math.abs(p.mindistance - this.mindistance) < 0.000001;\r\n\t}",
"@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n UserAuth other = (UserAuth) that;\n return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))\n && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))\n && (this.getIdentityType() == null ? other.getIdentityType() == null : this.getIdentityType().equals(other.getIdentityType()))\n && (this.getIdentifier() == null ? other.getIdentifier() == null : this.getIdentifier().equals(other.getIdentifier()));\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof APerson)) {\n return false;\n }\n APerson other = (APerson) object;\n if ((this.personId == null && other.personId != null) || (this.personId != null && !this.personId.equals(other.personId))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object obj) {\n return this == obj;\n }",
"public boolean equals(Object other) {\n\t\tboolean ans=false;\n\t\tif (other instanceof Address) {\n\t\t\tAddress that = (Address) other;\n\t\t\tif((this.zipCode == that.zipCode)&&(this.number==that.number)) {\n\t\t\t\tans=true;\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t\t\n\t\t\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Pqrs)) {\n return false;\n }\n Pqrs other = (Pqrs) object;\n if ((this.codigo == null && other.codigo != null) || (this.codigo != null && !this.codigo.equals(other.codigo))) {\n return false;\n }\n return true;\n }",
"public boolean equals(Object o)\n {\n UserRole ur = (UserRole) o;\n boolean theSame = super.equals(ur);\n if (theSame)\n {\n if (getRate() != null && ur.getRate() != null)\n {\n if (!getRate().equals(ur.getRate()))\n {\n theSame = false;\n }\n }\n else\n {\n if ((getRate() == null && ur.getRate() != null)\n || (getRate() != null && ur.getRate() == null))\n {\n theSame = false;\n }\n }\n }\n return theSame;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof VatCodeCompany)) {\n return false;\n }\n VatCodeCompany other = (VatCodeCompany) object;\n return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));\n }"
] |
[
"0.6113743",
"0.6026901",
"0.5949036",
"0.5942518",
"0.5932233",
"0.5918141",
"0.59176934",
"0.58961076",
"0.5865443",
"0.5842806",
"0.5837675",
"0.5830501",
"0.5798725",
"0.57805246",
"0.5776194",
"0.57597405",
"0.5750512",
"0.5748828",
"0.5740246",
"0.5740236",
"0.57261676",
"0.5711334",
"0.5709684",
"0.5705028",
"0.5699667",
"0.56975394",
"0.56920546",
"0.56771964",
"0.5677143",
"0.56761277",
"0.56698245",
"0.56629646",
"0.5657466",
"0.5654359",
"0.5651282",
"0.5648903",
"0.56461304",
"0.563562",
"0.56288356",
"0.5627619",
"0.56261396",
"0.56239045",
"0.56227344",
"0.56223226",
"0.56186354",
"0.5609235",
"0.5608546",
"0.5604103",
"0.559174",
"0.558875",
"0.558875",
"0.558875",
"0.5586974",
"0.5585882",
"0.5565337",
"0.5564157",
"0.55572516",
"0.55498874",
"0.5549446",
"0.5545635",
"0.554453",
"0.5542333",
"0.55329996",
"0.5531968",
"0.55239785",
"0.5522443",
"0.5517452",
"0.5513129",
"0.55106336",
"0.5507066",
"0.5501964",
"0.5500667",
"0.5488074",
"0.5488074",
"0.5487763",
"0.54870135",
"0.54868996",
"0.5482782",
"0.5481352",
"0.5481043",
"0.54724777",
"0.5462784",
"0.54622126",
"0.54621947",
"0.5461999",
"0.54616886",
"0.54610825",
"0.54592043",
"0.54579014",
"0.5448988",
"0.54458016",
"0.5442495",
"0.54380333",
"0.5437832",
"0.5436704",
"0.54359627",
"0.5435375",
"0.54325414",
"0.5432519",
"0.5426376"
] |
0.79386735
|
0
|
Returns the hash code value of the present value, if any, or 0 (zero) if no value is present.
|
@Override
public int hashCode() {
return Objects.hashCode(value);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"int computeHashCode(byte val);",
"public int hashcode();",
"public int hashCode() {\n if (getInternalValue() == null) {\n return -3;\n }\n else {\n return super.hashCode();\n }\n }",
"public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}",
"public int hashCode()\n {\n int code = 0;\n int i;\n int shift = 0;\n \n \t\tint byteLength = getLengthInBytes();\n for( i = 0; i < byteLength; i++)\n {\n code ^= (value[i] & 0xff)<<shift;\n shift += 8;\n if( 32 <= shift)\n shift = 0;\n }\n return code;\n }",
"int getHash();",
"public int hashCode() {\n int h = 0;\n for (int j = realSize(), i = 0, t = 0; j-- != 0; ) {\n while (((key[i]) == ((char) 0)))\n i++;\n t = (key[i]);\n t ^= (value[i]);\n h += t;\n i++;\n }\n // Zero / null keys have hash zero.\n if (containsNullKey) h += (value[n]);\n return h;\n }",
"static int getHash(int par0)\n {\n return computeHash(par0);\n }",
"public final int hashCode() {\r\n return _value;\r\n }",
"public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasCode() )\n i ^= getCode().hashCode();\n return i;\n }",
"public int hashCode()\n {\n if (this.hashValue == 0)\n {\n int result = 17;\n int wsidValue = this.getWsid() == null ? 0 : this.getWsid().hashCode();\n result = result * 37 + wsidValue;\n this.hashValue = result;\n }\n return this.hashValue;\n }",
"public int hashCode() {\n return m_value;\n }",
"public int hashCode() {\n try {\n int res = 0;\n byte[] array = getEncoded();\n for (int i=0; i<array.length; i++) {\n res += array[i] & 0xFF;\n }\n return res;\n } catch (CRLException e) {\n return 0;\n }\n }",
"public String getHashValue() {\n return hashValue;\n }",
"public int hashCode() {\n int result = 17;\n result = (37 * result)\n + ((nullCheck == null) ? 0 : nullCheck.hashCode());\n\n return result;\n }",
"@Override\n public int hashCode() {\n int hash = val;\n return hash;\n }",
"public static int safeHashcode(Object o)\n {\n if (o == null)\n {\n return 0;\n }\n else\n {\n return o.hashCode();\n }\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasHashKey() )\n i ^= getHashKey().hashCode();\n return i;\n }",
"public int hashCode() {\r\n\t\treturn this.value().hashCode();\r\n\t}",
"public int searchHash(int val) {\n\t\tint i = HashFun(val);\n\t\treturn i;\n\t}",
"public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }",
"public int hashCode(){\n \n long code;\n\n // Values in linear combination with two\n // prime numbers.\n\n code = ((21599*(long)value)+(20507*(long)n.value));\n code = code%(long)prime;\n return (int)code;\n }",
"public int hashCode(){\n int hashcode = name == null ? 0 : name.hashCode() / 2;\n return hashcode += ( value == null ? 0 : value.hashCode()/2 );\n }",
"public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"public int hashCode() {\n int result;\n result = (this.time != null ? this.time.hashCode() : 0);\n result = 29 * result + (this.value != null ? this.value.hashCode() : 0);\n return result;\n }",
"public static int nullSafeHashCode(byte[] array) {\r\n if (array == null) {\r\n return 0;\r\n }\r\n int hash = INITIAL_HASH;\r\n int arraySize = array.length;\r\n for (int i = 0; i < arraySize; i++) {\r\n hash = MULTIPLIER * hash + array[i];\r\n }\r\n return hash;\r\n }",
"@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }",
"public int getHash() {\n return hash_;\n }",
"public int hashCode() {\n if (hashCode != 0){\n return hashCode;\n }\n return hashCode = computeHash();\n }",
"public int getHash() {\n return hash_;\n }",
"public abstract int getHash();",
"public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (projectId != null ? projectId.hashCode() : 0);\n return hash;\n }",
"private int getHash(String word){\n\t\tif (word == null){\n\t\t\treturn INVALID;\n\t\t}\n\n\t\tint hash = 52;\n\t\tif ((word.charAt(0) >= 'a') && (word.charAt(0) <= 'z')){\n\t\t\thash = word.charAt(0) - 'a';\n\t\t}\n\t\telse if ((word.charAt(0) >= 'A') && (word.charAt(0) <= 'Z')){\n\t\t\thash = word.charAt(0) - 'A' + 26;\n\t\t}\n\t\treturn hash;\n\t}",
"private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }",
"public int hashWorst(String key){\n int hashVal = 1;\n return hashVal;\n }",
"private int getHash(K key) {\n return key == null ? 0 : key.hashCode();\n }",
"public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"public int hashCode() {\n\t\tlong code = 0;\n\t\tint elements = _rowCount * _columnCount;\n\n\t\tfor (int i = 0; i < elements; i++) {\n\t\t\tcode += _value[i];\n\t\t}\n\n\t\treturn (int) code;\n\t}",
"com.google.protobuf.ByteString getHash();",
"com.google.protobuf.ByteString getHash();",
"@Override\n\tpublic int hashValue(String value) {\n\t\treturn hashFunc(value);\n\t}",
"public int hashCode() {\n\t\tint h = 0, i = 0, j = count;\n\t\twhile (j-- != 0) {\n\t\t\twhile (state[i] != OCCUPIED)\n\t\t\t\ti++;\n\t\t\th += longHash2IntHash(key[i]);\n\t\t\ti++;\n\t\t}\n\t\treturn h;\n\t}",
"public HashCode() {\n mVal = SEED;\n }",
"public int hashCode() {\n if (hash == -1) {\n hash = 0;\n byte b[] = packet.getData();\n int len = b.length;\n for (int ix = 0; ix < len; ix++) {\n\thash = 31 * hash + b[ix];\n }\n hash ^= (packet.getAddress().hashCode() ^\n\t (packet.getPort() << 15) ^\n\t (packet.getLength() << 3) ^\n\t (packet.getOffset() << 8));\n }\n return hash;\n }",
"public static final int hashCode(final Object o) {\n\t\t\n\t\treturn o == null\n\t\t\t? 0\n\t\t\t: o.hashCode();\n\t}",
"String getHash();",
"String getHash();",
"@Override\n public int hashCode() {\n return value;\n }",
"public int\thashCode() { return value; }",
"public int hash1 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal += key.charAt(i);\n \n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0 ;\n }\n\n }",
"@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1; \n\t\t\n\t\t/*\n\t\t * result = 31*1 + 0(if rank is null) else rank.hashcode which calls the String implementation of the hashcode method.\n\t\t * So for example we will say: 31*1+20=51\n\t\t */\n\t\tresult = prime * result + ((rank == null) ? 0 : rank.hashCode());\n\t\tresult = prime * result + ((suit == null) ? 0 : suit.hashCode());\n\t\treturn result;\n\t}",
"public static int nullSafeHashCode(char[] array) {\r\n if (array == null) {\r\n return 0;\r\n }\r\n int hash = INITIAL_HASH;\r\n int arraySize = array.length;\r\n for (int i = 0; i < arraySize; i++) {\r\n hash = MULTIPLIER * hash + array[i];\r\n }\r\n return hash;\r\n }",
"private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }",
"public int hashCode() {\n int result = 17;\n\n if (_address != null) {\n result = 37 * result + _address.hashCode();\n }\n\n return result;\n }",
"public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }",
"int hashCode();",
"int hashCode();",
"public int hashcode(){\r\n\t\t\r\n\t\treturn last_Name.hashcode();\r\n\t}",
"static int hash(Integer key) {\n int h;\n return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);\n }",
"@Override\n public int hashCode()\n {\n return Objects.hash(value);\n }",
"@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}",
"public int getValue()\n\t{\n\t\treturn bitHolder.getValue();\n\t}",
"int _hash(int maximum);",
"public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }",
"public static int getHash(long entry) {\n return (int) (entry >>> 32);\n }",
"public int hashCode() {\n int hashCode = 0;\n\n for (int i=0; i < mag.length; i++)\n hashCode = (int)(31*hashCode + (mag[i] & LONG_MASK));\n\n return hashCode * signum;\n }",
"public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"@Override\n public int hashCode() {\n return mVal;\n }",
"public static int hash(String key) {\n int result = 1;\n\n for (int i=0; i<key.length(); ++i) {\n char c = key.charAt(i);\n int c_int = (int) c; //Gjør om ved å bruke ascii-tabellen ('A' = 65, ...\n\n result = (result*31) + c_int;\n }\n\n if (result < 0) {\n result = result * -1;\n }\n\n return result;\n }",
"public int hashCode()\r\n {\r\n if (this.hashValue == 0)\r\n {\r\n int result = 17;\r\n int purSubcateIdValue = this.getId() == null ? 0 : this.getId().hashCode();\r\n result = result * 37 + purSubcateIdValue;\r\n this.hashValue = result;\r\n }\r\n return this.hashValue;\r\n }",
"@Override\n public int hashCode()\n {\n return this.value.hashCode();\n }",
"public int hash(T input);",
"public static int hashCode(Object o) {\n return o == null ? 0 : o.hashCode();\n }",
"private int computeHash(URI location) {\n \t\treturn location.hashCode();\n \t}",
"public int hashCode()\n {\n return hash;\n }",
"@Override\n public int hashCode() {\n return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());\n }",
"public int hashCode()\n {\n return (int)(swigCPtr^(swigCPtr>>>32));\n }",
"public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getProject());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getUser());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getStatus());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getLastActivityDate());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasPiSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasDpSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasAdminSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasRequestorSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getEmailStatus());\n return (int)(hash % Integer.MAX_VALUE);\n }",
"@Override\n public int hashCode() {\n int result = 42;\n int prime = 37;\n for (char ch : key.toCharArray()) {\n result = prime * result + (int) ch;\n }\n result = prime * result + summary.length();\n result = prime * result + value;\n return result;\n }",
"@Override\n public int hashCode() {\n int i;\n int result = 17;\n if (getMasp() == null) {\n i = 0;\n } else {\n i = getMasp().hashCode();\n }\n result = 37*result + i;\n return result;\n }",
"public int hashCode() {\n int n = 0;\n int n2 = this.userName != null ? this.userName.hashCode() : 0;\n int n3 = this.date != null ? this.date.hashCode() : 0;\n int n4 = this.sys != null ? this.sys.hashCode() : 0;\n int n5 = this.dia != null ? this.dia.hashCode() : 0;\n if (this.pulse != null) {\n n = this.pulse.hashCode();\n }\n return (((n2 * 31 + n3) * 31 + n4) * 31 + n5) * 31 + n;\n }",
"@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }",
"public int getHashCode(int key){\n return key;\n }",
"private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }",
"public int hashCode()\n\t{\n\t\tint result = 17;\n\n\t\tlong tmp;\n\t\tif (_rsHeader != null && !org.castor.core.util.CycleBreaker.startingToCycle(_rsHeader))\n\t\t{\n\t\t\tresult = 37 * result + _rsHeader.hashCode();\n\t\t\torg.castor.core.util.CycleBreaker.releaseCycleHandle(_rsHeader);\n\t\t}\n\n\t\treturn result;\n\t}",
"public int hashCode() {\r\n \tif (id != null){\r\n \t\treturn id.hashCode();\r\n \t}\r\n \treturn 0;\r\n }",
"public int hashCode(String s){\r\n int length = s.length();\r\n int h = 0;\r\n for(int i = 0; i < length; i++){\r\n h = h + ((int)s.indexOf(i))*(37^(length - 1));\r\n }\r\n return h;\r\n }",
"public BigInteger getUniqueCode() {\n\t\t\n\t\tBigInteger ret = BigInteger.ZERO;\n\t\t\n\t\tBigInteger BASE = new BigInteger(\"\" + Constants.NUM_STATES_PER_ELEMENT);\n\n\t\tBigInteger TWO = new BigInteger(\"2\");\n\t\t\n\t\tfor(int i=0; i<this.table.length; i++) {\n\t\t\tfor(int j=0; j<this.table[i].length; j++) {\n\t\t\t\t\n\t\t\t\tif(table[i][j] == Constants.EMPTY) {\n\t\t\t\t\tret = ret.multiply(BASE);\n\t\t\t\t\t\n\t\t\t\t} else if(table[i][j] == Constants.P1_COLOUR) {\n\t\t\t\t\tret = ret.multiply(BASE).add(BigInteger.ONE);\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tret = ret.multiply(BASE).add(TWO);\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\treturn ret;\n\t}",
"public BigInteger getUniqueCode() {\n\t\t\n\t\tBigInteger ret = BigInteger.ZERO;\n\t\t\n\t\tBigInteger BASE = new BigInteger(\"\" + Constants.NUM_STATES_PER_ELEMENT);\n\n\t\tBigInteger TWO = new BigInteger(\"2\");\n\t\t\n\t\tfor(int i=0; i<this.table.length; i++) {\n\t\t\tfor(int j=0; j<this.table[i].length; j++) {\n\t\t\t\t\n\t\t\t\tif(table[i][j] == Constants.EMPTY) {\n\t\t\t\t\tret = ret.multiply(BASE);\n\t\t\t\t\t\n\t\t\t\t} else if(table[i][j] == Constants.P1_COLOUR) {\n\t\t\t\t\tret = ret.multiply(BASE).add(BigInteger.ONE);\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tret = ret.multiply(BASE).add(TWO);\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\treturn ret;\n\t}",
"public int hashCode() {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + ((username == null) ? 0 : username.hashCode());\r\n return result;\r\n }",
"@Override\n public int hashCode() {\n int hash = 0;\n hash += (idLibro != null ? idLibro.hashCode() : 0);\n return hash;\n }",
"private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }",
"@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }",
"public int hashCode()\r\n {\r\n int hashCode = 0;\r\n hashCode = 29 * hashCode + (identificador == null ? 0 : identificador.hashCode());\r\n\r\n return hashCode;\r\n }",
"public int hash(String item);"
] |
[
"0.67143875",
"0.6581394",
"0.63790923",
"0.6353986",
"0.63425344",
"0.63212687",
"0.6308518",
"0.6281981",
"0.62607116",
"0.6226658",
"0.6166933",
"0.6132243",
"0.61143863",
"0.61029845",
"0.60755754",
"0.60454077",
"0.59567446",
"0.5953457",
"0.59456545",
"0.5935057",
"0.59188557",
"0.5906096",
"0.5890971",
"0.5883881",
"0.5883496",
"0.58756554",
"0.5870729",
"0.58509994",
"0.583978",
"0.5832624",
"0.5814377",
"0.5809539",
"0.5795588",
"0.5779591",
"0.5736939",
"0.57344973",
"0.5733927",
"0.5721931",
"0.5717956",
"0.5702248",
"0.5702248",
"0.5693563",
"0.56844527",
"0.5668357",
"0.56574625",
"0.56541085",
"0.56497025",
"0.56497025",
"0.56430733",
"0.563319",
"0.5632693",
"0.5626244",
"0.56140655",
"0.5611354",
"0.5606255",
"0.5601523",
"0.5599934",
"0.5599934",
"0.559769",
"0.55897534",
"0.5585605",
"0.55808425",
"0.5580352",
"0.55770576",
"0.55651975",
"0.55633956",
"0.5542351",
"0.5536788",
"0.5525298",
"0.5525298",
"0.5525298",
"0.5525298",
"0.5524667",
"0.55176693",
"0.55176634",
"0.55149704",
"0.55117345",
"0.55059403",
"0.5501032",
"0.5498488",
"0.54972553",
"0.5484284",
"0.54827386",
"0.5466925",
"0.5463747",
"0.54600495",
"0.5447866",
"0.54463905",
"0.5446248",
"0.54382914",
"0.54369366",
"0.54361075",
"0.54324865",
"0.54324865",
"0.542741",
"0.54269993",
"0.54227877",
"0.5418434",
"0.5409296",
"0.5407271"
] |
0.54840016
|
82
|
Returns a nonempty string representation of this Optional suitable for debugging. The exact presentation format is unspecified and may vary between implementations and versions.
|
@Override
public String toString() {
if (value != null)
return String.format("Optional[%s]", value);
else
return "Optional.empty";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String toDebugString();",
"@Override\n\tpublic String toStringDebug() {\n\t\treturn null;\n\t}",
"public String shortRepr() {\n\t\treturn \"Value of some kind.\";\n\t}",
"@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }",
"public String toString() { return stringify(this, true); }",
"@Override\n public String getDebugString() {\n return _model.toString();\n }",
"public static String debugString()\n {\n return\n \"ECSDefaults:\" + '\\n'\n + '\\t' + \"DefaultFilterState=\" + getDefaultFilterState() +'\\n'\n + '\\t' + \"DefaultFilterAttributeState=\" + getDefaultFilterAttributeState() +'\\n'\n + '\\t' + \"DefaultAttributeEqualitySign='\" + getDefaultAttributeEqualitySign() +\"'\\n\"\n + '\\t' + \"DefaultBeginStartModifier='\" + getDefaultBeginStartModifier() + \"'\\n\"\n + '\\t' + \"DefaultEndStartModifier='\" + getDefaultEndStartModifier() + \"'\\n\"\n + '\\t' + \"DefaultBeginEndModifier='\" + getDefaultBeginEndModifier() + \"'\\n\"\n + '\\t' + \"DefaultEndEndModifier='\" + getDefaultEndEndModifier() + \"'\\n\"\n + '\\t' + \"DefaultAttributeQuoteChar=\" + getDefaultAttributeQuoteChar() + '\\n'\n + '\\t' + \"DefaultAttributeQuote=\" + getDefaultAttributeQuote() +'\\n'\n + '\\t' + \"DefaultEndElement=\" + getDefaultEndElement() +'\\n'\n + '\\t' + \"DefaultCodeset='\" + getDefaultCodeset() + \"'\\n\"\n + '\\t' + \"DefaultPosition=\" + getDefaultPosition() +'\\n'\n + '\\t' + \"DefaultCaseType=\" + getDefaultCaseType() +'\\n'\n + '\\t' + \"DefaultStartTag='\" + getDefaultStartTag() + \"'\\n\"\n + '\\t' + \"DefaultEndTag='\" + getDefaultEndTag() + \"'\\n\"\n + '\\t' + \"DefaultPrettyPrint=\" + getDefaultPrettyPrint();\n }",
"public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}",
"@Override\r\n public String dumpOf ()\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n\r\n if (evaluation != null) {\r\n sb.append(String.format(\" evaluation=%s%n\", evaluation));\r\n }\r\n\r\n Shape physical = (getShape() != null) ? getShape().getPhysicalShape() : null;\r\n if (physical != null) {\r\n sb.append(String.format(\" physical=%s%n\", physical));\r\n }\r\n\r\n if (forbiddenShapes != null) {\r\n sb.append(String.format(\" forbiddenShapes=%s%n\", forbiddenShapes));\r\n }\r\n\r\n if (timeRational != null) {\r\n sb.append(String.format(\" rational=%s%n\", timeRational));\r\n }\r\n\r\n return sb.toString();\r\n }",
"public String toDebugString() {\n StringBuffer str = new StringBuffer(mySelf()+\"\\n\");\n return str.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\tif (repr == null)\n\t\t\trepr = toString(null);\n\n\t\treturn repr;\n\t}",
"public String toDebugString() {\n StringBuffer str = new StringBuffer(mySelf()+\"\\n\");\n return super.toDebugString()+str.toString();\n }",
"public String toDisplayString() {\r\n String ret = null;\r\n try {\r\n ret = this.toString(\"DMY.\");\r\n } catch (Exception ex) {/* Exception kann nicht auftreten */\r\n }\r\n return ret;\r\n }",
"public String toString() {\n StringBuilder stringBuilder = new StringBuilder(40);\n stringBuilder.append(\"property '\").append(this.getName()).append(\"' (\");\n if (this._accessorMethod != null) {\n stringBuilder.append(\"via method \").append(this._accessorMethod.getDeclaringClass().getName()).append(\"#\").append(this._accessorMethod.getName());\n } else {\n stringBuilder.append(\"field \\\"\").append(this._field.getDeclaringClass().getName()).append(\"#\").append(this._field.getName());\n }\n if (this._serializer == null) {\n stringBuilder.append(\", no static serializer\");\n } else {\n stringBuilder.append(\", static serializer of type \" + this._serializer.getClass().getName());\n }\n stringBuilder.append(')');\n return stringBuilder.toString();\n }",
"public java.lang.String toDebugString () { throw new RuntimeException(); }",
"@Override\n public String toString() {\n final Map<String, Object> augmentedToStringFields = Reflect.getStringInstanceVarEntries(this);\n augmentToStringFields(augmentedToStringFields);\n return Reflect.joinStringMap(augmentedToStringFields, this);\n }",
"public String toString() {\n\t\treturn (\"Debug: \" + booleanToString(debugMode)\n\t\t\t\t+ \"\\nFPS: \" + booleanToString(fpsDisplay)\n\t\t\t\t+ \"\\nDecals: \" + booleanToString(decalsEnabled)\n\t\t\t\t+ \"\\nDecal Limiter: \" + booleanToString(decalLimitEnabled)\n\t\t\t\t+ \"\\nSound: \" + booleanToString(soundEnabled)\n\t\t\t\t+ \"\\nSound-Ambience: \" + booleanToString(soundAmbience)\n\t\t\t\t+ \"\\nSound-Shotgun: \" + booleanToString(soundShot)\n\t\t\t\t+ \"\\nSound-Duck: \" + booleanToString(soundDuck));\n\t}",
"@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }",
"@Override\n public final String toString() {\n return asString(0, 4);\n }",
"public String toString()\n {\n return toString((Format) null);\n }",
"@Override\n public String toString() {\n return toString(false, true, true, null);\n }",
"@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\treturn this.toJSONString(0);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t}",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t}",
"public String toString() {\n if (displayString == null)\n {\n displayString = this.exchange + ':' + this.firmNumber + ':' + classKey;\n }\n return displayString;\n }",
"public String prettyPrint()\n {\n return prettyPrint(\"\");\n }",
"public String toString() {\n return toDisplayString();\n }",
"public String debugDump() {\n stringRepresentation = \"\";\n sprint(\"SIPMessage:\");\n sprint(\"{\");\n try {\n \n Field[] fields = this.getClass().getDeclaredFields();\n for (int i = 0; i < fields.length; i++) {\n Field f = fields [i];\n Class fieldType = f.getType();\n String fieldName = f.getName();\n if (f.get(this) != null &&\n Class.forName(SIPHEADERS_PACKAGE + \".SIPHeader\").\n isAssignableFrom(fieldType) &&\n fieldName.compareTo(\"headers\") != 0 ) {\n sprint(fieldName + \"=\");\n sprint(((SIPHeader)f.get(this)).debugDump());\n }\n }\n } catch ( Exception ex ) {\n InternalErrorHandler.handleException(ex);\n }\n \n \n sprint(\"List of headers : \");\n sprint(headers.toString());\n sprint(\"messageContent = \");\n sprint(\"{\");\n sprint(messageContent);\n sprint(\"}\");\n if (this.getContent() != null) {\n sprint(this.getContent().toString());\n }\n sprint(\"}\");\n return stringRepresentation;\n }",
"public String getDumpString() {\n return \"[clazz = \" + clazz + \" , name = \" + name + \" , elementType = \" + elementType + \" , primitivePointerType = \" + primitivePointerType + \"]\";\n }",
"@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }",
"public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}",
"@Override\r\n public String toString() {\r\n return (value == null) ? \"\" : value;\r\n }",
"@Override\n public String toString() {\n StringBuilder buffer = new StringBuilder();\n if (actualProperties != null) {\n synchronized (propertySyncObject) {\n Enumeration<Object> keys = actualProperties.keys();\n while (keys.hasMoreElements()) {\n String key = (String) keys.nextElement();\n String value = actualProperties.getProperty(key);\n buffer.append(key).append(\": \").append(value).append(\"\\n\");\n }\n }\n }\n return buffer.toString();\n }",
"@org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}",
"public String toString() {\n\t\treturn toString(true);\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getPhoneNumber() != null)\n sb.append(\"PhoneNumber: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getEmail() != null)\n sb.append(\"Email: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getIdentificationNumber() != null)\n sb.append(\"IdentificationNumber: \").append(getIdentificationNumber()).append(\",\");\n if (getIdentificationExpirationDate() != null)\n sb.append(\"IdentificationExpirationDate: \").append(getIdentificationExpirationDate()).append(\",\");\n if (getIdentificationIssuingOrg() != null)\n sb.append(\"IdentificationIssuingOrg: \").append(getIdentificationIssuingOrg()).append(\",\");\n if (getDevicePickupId() != null)\n sb.append(\"DevicePickupId: \").append(getDevicePickupId());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn this.toAnticipatedString();\n\t}",
"public String toString()\n\t{\n\t\treturn String.format(\"%-25s%-15s\\n%-25s%-15s\\n%-25s%-15s\\n%-25s%-15d\\n%-25s%-15s\\n%-25s$%,-13.2f\", \n\t\t\t\t \t\t \t \"Name\", this.getName(), \"Address:\", this.getAddress(), \"Telephone number:\", this.getTelephone(), \n\t\t\t\t \t\t \t \"Customer Number:\", this.getCustNum(), \"Email notifications:\", this.getSignedUp() == true ? \"Yes\" : \"No\",\n\t\t\t\t \t\t \t \"Purchase amount:\", this.getCustomerPurchase());\n\t}",
"public String toString()\n\t{\n\t\tField[] fields = this.getClass().getDeclaredFields();\n\t\tint i, max = fields.length;\n\t\tString fieldName = \"\";\n\t\tString fieldType = \"\";\n\t\tString ret = \"\";\n\t\tString value = \"\";\n\t\tboolean skip = false;\n\t\tint j = 0;\n\t\tfor(i = 0; i < max; i++)\n\t\t{\n\t\t\tfieldName = fields[i].getName().toString();\n\t\t\tfieldType = fields[i].getType().toString();\n\t\t\tif(i == 0)\n\t\t\t{\n\t\t\t\tret += \"{\";\n\t\t\t}\n\t\t\tif(fieldType.equals(\"int\") || fieldType.equals(\"long\") || fieldType.equals(\"float\") || fieldType.equals(\"double\") || fieldType.equals(\"boolean\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = fields[i].get(this).toString();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"0\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse if(fieldType.contains(\"String\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+Utility.escapeJSON((String) fields[i].get(this))+\"\\\"\";\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\tskip = true;\n\t\t\t}\n\t\t\tif(!skip)\n\t\t\t{\n\t\t\t\tif(j > 0)\n\t\t\t\t{\n\t\t\t\t\tret += \",\";\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tret += \"\\r\\n\\t\\\"\"+fieldName+\"\\\":\"+value;\n\t\t\t}\n\t\t\tif(i == max-1)\n\t\t\t{\n\t\t\t\tret += \"\\r\\n}\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}",
"public String toString(){\r\n\t\tString superString = super.toString();\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\t//Add the object to the string\r\n\t\tbuilder.append(\". \");\r\n\t\tif (this.error != null) {\r\n\t\t\tbuilder.append(error.toString());\r\n\t\t\tbuilder.append(\". \");\r\n\t\t}\r\n\t\tbuilder.append(\"Object: \");\r\n\t\tbuilder.append(object.toString());\r\n\t\tif (this.recordRoute)\r\n\t\t\tbuilder.append(\", [RECORD_ROUTE]\");\r\n\t\tif (this.reRouting) \r\n\t\t\tbuilder.append(\", [RE-ROUTING]\");\r\n\t\t//Add the masks to the string\r\n\t\tif (this.mask != null) {\r\n\t\t\tbuilder.append(\", label set: \");\r\n\t\t\tbuilder.append(mask.toString());\r\n\t\t}\r\n\t\treturn superString.concat(builder.toString());\r\n\t}",
"public String toString() {\n return String.format(mFormat,\n format(mManufacturer),\n format(mBrand),\n format(mModel),\n mResolution,\n mDensity,\n mAndroidDensity,\n mVersion,\n mSdk,\n mLanguage);\n }",
"public String toSimpleString() {\n\t\treturn null;\n\t}",
"public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }",
"public String toDebugString() {\n\t\tString text = \"[ \";\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t\ttext += data[i] + (i < data.length - 1 ? \", \" : \" ]\");\n\t\treturn text;\n\t}",
"public java.lang.String toString() {\n return this.stringValue;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getPercentTraffic() != null)\n sb.append(\"PercentTraffic: \").append(getPercentTraffic()).append(\",\");\n if (getStageVariableOverrides() != null)\n sb.append(\"StageVariableOverrides: \").append(getStageVariableOverrides()).append(\",\");\n if (getUseStageCache() != null)\n sb.append(\"UseStageCache: \").append(getUseStageCache());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\r\n\tpublic String toInfoString() {\n\t\treturn null;\r\n\t}",
"public String toString() {\n\t\tString dis =\"\";\n\t\tfor(int i=0;i<fields.size();i++) {\n\t\t\tif(i==fields.size()-1) {\n\t\t\t\tdis+=fields.toString();\n\t\t\t\t}\n\t\t\telse {\n\t\t\tdis+=fields.toString()+\" \";\n\t\t\t}\n\t\t}\t\n\t\treturn dis;\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getOptional() != null)\n sb.append(\"Optional: \").append(getOptional()).append(\",\");\n if (getKey() != null)\n sb.append(\"Key: \").append(getKey()).append(\",\");\n if (getNoEcho() != null)\n sb.append(\"NoEcho: \").append(getNoEcho()).append(\",\");\n if (getQueryable() != null)\n sb.append(\"Queryable: \").append(getQueryable()).append(\",\");\n if (getDescription() != null)\n sb.append(\"Description: \").append(getDescription());\n sb.append(\"}\");\n return sb.toString();\n }",
"@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 return new JSONSerializer().serialize(this);\n }",
"public java.lang.String toString(){\n return null; //TODO codavaj!!\n }",
"@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 String format()\n {\n StringBuilder sb = new StringBuilder(64);\n sb.append(expression).append(\" = \");\n\n if (detailExpression != null && !detailExpression.equals(value.toString()))\n {\n sb.append(\"(\").append(detailExpression).append(\") = \");\n }\n\n sb.append(value);\n if (description != null)\n {\n sb.append(\" // \").append(description);\n }\n\n return sb.toString();\n }",
"public String toString() {\n return \"[ \" + nullCheck.toString() + \" is null ]\";\n }",
"public String print() {\n\n String returnString = \"\";\n\n if (kv1 != null) {\n returnString += kv1.toString();\n }\n\n if (kv2 != null) {\n returnString += \" \" + kv2.toString();\n }\n\n return returnString;\n }",
"protected String getToStringFormat()\n {\n return getClass().getSimpleName() + \"@\"\n + Integer.toHexString(hashCode()) + \": { \"\n + \"offset = 0x\" + Integer.toHexString(offset) + \"; \"\n + \"size = \" + size + \"; \"\n + \"%s\"\n + \"value = \" + getValue() + \"; \"\n + \"isAccessible = \" + isAccessible() + \"; \"\n + \"checksum = 0x\" + Integer.toHexString(checksum()) + \"; \"\n + \"}\";\n }",
"@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn getValue() != null ? getValue().toString() : \"null\";\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getFamily() != null)\n sb.append(\"Family: \").append(getFamily()).append(\",\");\n if (getInstanceType() != null)\n sb.append(\"InstanceType: \").append(getInstanceType()).append(\",\");\n if (getRegion() != null)\n sb.append(\"Region: \").append(getRegion()).append(\",\");\n if (getDatabaseEngine() != null)\n sb.append(\"DatabaseEngine: \").append(getDatabaseEngine()).append(\",\");\n if (getDatabaseEdition() != null)\n sb.append(\"DatabaseEdition: \").append(getDatabaseEdition()).append(\",\");\n if (getDeploymentOption() != null)\n sb.append(\"DeploymentOption: \").append(getDeploymentOption()).append(\",\");\n if (getLicenseModel() != null)\n sb.append(\"LicenseModel: \").append(getLicenseModel()).append(\",\");\n if (getCurrentGeneration() != null)\n sb.append(\"CurrentGeneration: \").append(getCurrentGeneration()).append(\",\");\n if (getSizeFlexEligible() != null)\n sb.append(\"SizeFlexEligible: \").append(getSizeFlexEligible());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String toString() {\n \t\treturn null;\n \t}",
"@Override\n public String toString() {\n return new Gson().toJson(this);\n }",
"public String toString() {\n\t\treturn toString(0, 0);\n\t}",
"public String toString()\r\n\t{\r\n\t\treturn \" \" + this.value;\r\n\t}",
"public String toStr() {\r\n return value.toString();\r\n }",
"public String toString() {\n\t\treturn (getValue().toString());\r\n\t}",
"public String toString()\n\t{\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\treturn \"columnName: \" + columnName + \"\\n\" +\n\t\t\t\t\"defaultText: \" + defaultText + \"\\n\" +\n\t\t\t\tsuper.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public String print() {\n\t\tString offID = getID();\n\t\tString offName = getName();\n\t\tint offAge = getAge();\n\t\tString offState = getState();\n\t\tString data = String.format(\"ID: %-15s \\t Name: %-35s \\t Age: %-15s \\t State: %s\", offID, offName, offAge, offState);\n\t\treturn data;\n\t}",
"@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }",
"@Override\n public final String toString() {\n return this.value;\n }",
"public String toString() {\n\t\t\tif (this.getKey() == null) {\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn \"Key:\" + this.getKey() + \" Value:\" + this.getValue();\n\t\t\t}\n\t\t}",
"@Override\n public String toString() {\n return gson.toJson(this);\n }",
"public String toString() {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tthis.createSpecSection(buffer);\n\t\tthis.createOperatorSection(buffer);\n\t\treturn buffer.toString();\n\t}",
"public String toString(){\n\tString sourceName;\n\tString destinationName;\n\t// its possible the wire has no source gate so this avoids null\n\t// pointer errors\n\tif( source == null){\n\t sourceName = \"No wire source\";\n\t} else {\n\t sourceName = this.source.name;\n\t}\n\t// provides the same check for destination gates\n\tif( destination == null ){\n\t destinationName = \"No wire destination\";\n\t} else {\n\t destinationName = this.destination.name;\n\t}\n\treturn \"Wire \" + sourceName + \" \"+ srcPin + \" \" +\n\t\tdestinationName + \" \" + \" \" + dstPin\n\t\t+ \" \" + delay;\n }",
"public String toString()\n {\n return ClassHelper.getSimpleName(getClass()) +\n \"{InsertAllowed=\" + m_fInsert +\n \", ReturnRequired=\" + m_fReturn +\n \", Map=\" + m_map + '}';\n }",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n optionalValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String toString() {\n\t\treturn String.format(\"Id: %s\\nContent: %s\\nInsertion Time: %s\\nExpiration Time: %s\\nDequeue Count: %s\\nPop Receipt: %s\\nNext Visible Time: %s\\n\",\n\t\t\t\tm_MessageId,\n\t\t\t\tthis.getAsString(),\n\t\t\t\tm_InsertionTime,\n\t\t\t\tm_ExpirationTime,\n\t\t\t\tm_DequeueCount,\n\t\t\t\tm_PopReceipt,\n\t\t\t\tm_NextVisibleTime);\n\t}",
"public java.lang.String toString()\n {\n return this.stringValue;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getEnabled() != null)\n sb.append(\"Enabled: \").append(getEnabled()).append(\",\");\n if (getPostFulfillmentStatusSpecification() != null)\n sb.append(\"PostFulfillmentStatusSpecification: \").append(getPostFulfillmentStatusSpecification()).append(\",\");\n if (getFulfillmentUpdatesSpecification() != null)\n sb.append(\"FulfillmentUpdatesSpecification: \").append(getFulfillmentUpdatesSpecification()).append(\",\");\n if (getActive() != null)\n sb.append(\"Active: \").append(getActive());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }",
"public String toString() {\n StringBuffer buffer = new StringBuffer(getClass().getName());\n\n buffer.append(\": \");\t\t\t\t//NOI18N\n buffer.append(\" name: \");\t\t\t//NOI18N\n buffer.append(getName());\n buffer.append(\", logging level: \");\t//NOI18N\n buffer.append(toString(getLevel()));\n\n return buffer.toString();\n }",
"public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(objectToString(\"Id\", getId()));\n buffer.append(objectToStringFK(\"Project\", getProject()));\n buffer.append(objectToStringFK(\"User\", getUser()));\n buffer.append(objectToString(\"Status\", getStatus()));\n buffer.append(objectToString(\"LastActivityDate\", getLastActivityDate()));\n buffer.append(objectToString(\"HasPiSeen\", getHasPiSeen()));\n buffer.append(objectToString(\"HasDpSeen\", getHasDpSeen()));\n buffer.append(objectToString(\"HasAdminSeen\", getHasAdminSeen()));\n buffer.append(objectToString(\"HasRequestorSeen\", getHasRequestorSeen()));\n buffer.append(objectToString(\"EmailStatus\", getEmailStatus()));\n buffer.append(\"]\");\n\n return buffer.toString();\n }",
"@Override\n public String toString() {\n return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getDeviceName() != null)\n sb.append(\"DeviceName: \").append(getDeviceName()).append(\",\");\n if (getIops() != null)\n sb.append(\"Iops: \").append(getIops()).append(\",\");\n if (getIsBootDisk() != null)\n sb.append(\"IsBootDisk: \").append(getIsBootDisk()).append(\",\");\n if (getStagingDiskType() != null)\n sb.append(\"StagingDiskType: \").append(getStagingDiskType()).append(\",\");\n if (getThroughput() != null)\n sb.append(\"Throughput: \").append(getThroughput());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\r\n\tpublic String toString() {\n\t\tString str = \"\";\r\n\t\treturn str;\r\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getId() != null)\n sb.append(\"Id: \").append(getId()).append(\",\");\n if (getLastModifiedTime() != null)\n sb.append(\"LastModifiedTime: \").append(getLastModifiedTime()).append(\",\");\n if (getContinuousDeploymentPolicyConfig() != null)\n sb.append(\"ContinuousDeploymentPolicyConfig: \").append(getContinuousDeploymentPolicyConfig());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn toStringBuilder(new StringBuilder()).toString();\n\t}",
"public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}",
"public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}",
"public String toString() {\n\t\tString s1,s2,s3,s4;\r\n\t\ts1 = \"{FIR ID: \"+id + \"\\nname= \" + name + \", phone number=\" + phone_no \r\n\t\t\t\t+\"\\nDate: \"+filing_date+\", Address: \" +address\r\n\t\t\t\t+\"\\nFIR Category: \"+category;\r\n\t\t\r\n\t\tif(statement_uploaded) {\r\n\t\t\ts2 = \", Statement Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts2 = \", Statement Not Uploaded\";\r\n\t\t}\r\n\t\tif(id_proof_uploaded) {\r\n\t\t\ts3 = \", ID Proof Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts3 = \", ID Proof Not Uploaded\";\r\n\t\t}\r\n\t\ts4 = \"\\nStatus : \"+status+\"}\";\r\n\t\treturn s1+s2+s3+s4;\r\n\t}",
"public String toString() {\n return (UUID + \" \" + name + \" \" + type + \" \" + universityName + \" \" + disabled);\n }",
"@Override\n public String toString() {\n StringBuilder b = new StringBuilder();\n boolean any = false;\n if (isUnknown()) {\n b.append(\"?\");\n any = true;\n } else if (isPolymorphic()) {\n b.append(\"^(\").append(var).append('[');\n if (isMaybeAbsent()) {\n b.append(\"absent\");\n any = true;\n }\n if (isMaybePresent()) {\n if (any)\n b.append('|');\n b.append(\"present\");\n }\n b.append(\"])\");\n any = true;\n } else {\n if (isMaybeUndef()) {\n b.append(\"Undef\");\n any = true;\n }\n if (isMaybeNull()) {\n if (any)\n b.append('|');\n b.append(\"Null\");\n any = true;\n }\n if (isMaybeAnyBool()) {\n if (any)\n b.append('|');\n b.append(\"Bool\");\n any = true;\n } else if (isMaybeTrueButNotFalse()) {\n if (any)\n b.append('|');\n b.append(\"true\");\n any = true;\n } else if (isMaybeFalseButNotTrue()) {\n if (any)\n b.append('|');\n b.append(\"false\");\n any = true;\n }\n if (isMaybeAnyNum()) {\n if (any)\n b.append('|');\n b.append(\"Num\");\n any = true;\n } else {\n if (num == null && isMaybeZero() && !isMaybeNumUIntPos()) {\n if (any)\n b.append('|');\n b.append(\"Zero\");\n any = true;\n } else if (!isMaybeZero() && isMaybeNumUIntPos()) {\n if (any)\n b.append('|');\n b.append(\"UIntPos\");\n any = true;\n } else if (isMaybeNumUInt()) {\n if (any)\n b.append('|');\n b.append(\"UInt\");\n any = true;\n }\n if (isMaybeNumOther()) {\n if (any)\n b.append('|');\n b.append(\"NotUInt\");\n any = true;\n }\n if (isMaybeNaN()) {\n if (any)\n b.append('|');\n b.append(\"NaN\");\n any = true;\n }\n if (isMaybeInf()) {\n if (any)\n b.append('|');\n b.append(\"Inf\");\n any = true;\n }\n if (num != null) {\n if (any)\n b.append('|');\n b.append(num);\n any = true;\n }\n }\n if (excluded_strings != null || included_strings != null) {\n if (any)\n b.append('|');\n b.append('(');\n any = false;\n }\n if (isMaybeAnyStr()) {\n if (any)\n b.append('|');\n b.append(\"Str\");\n any = true;\n } else {\n if (isMaybeStrUInt()) {\n if (any)\n b.append('|');\n b.append(\"UIntStr\");\n any = true;\n }\n if (isMaybeStrOtherNum()) {\n if (any)\n b.append('|');\n b.append(\"NotUIntStr\"); // TODO: change to OtherNumStr?\n any = true;\n }\n if (isMaybeStrIdentifier()) {\n if (any)\n b.append('|');\n b.append(\"IdentStr\");\n any = true;\n }\n if (isMaybeStrOtherIdentifierParts()) {\n if (any)\n b.append('|');\n b.append(\"OtherIdentPartsStr\");\n any = true;\n }\n if (isMaybeStrOther()) {\n if (any)\n b.append('|');\n b.append(\"OtherStr\");\n any = true;\n }\n if (isStrJSON()) {\n if (any)\n b.append(\"|\");\n b.append(\"JSONStr\");\n any = true;\n }\n if (isMaybeStrPrefix()) {\n if (any)\n b.append('|');\n b.append(\"PrefixStr[\").append(Strings.escape(str)).append(']');\n any = true;\n } else if (str != null) {\n if (any)\n b.append('|');\n b.append('\"').append(Strings.escape(str)).append('\"');\n any = true;\n }\n }\n if (excluded_strings != null || included_strings != null) {\n b.append(')');\n if (excluded_strings != null)\n b.append(\"\\\\{\").append(excluded_strings.stream().sorted().map(s -> '\"' + Strings.escape(s) + '\"').collect(java.util.stream.Collectors.joining(\",\"))).append(\"}\");\n if (included_strings != null)\n b.append(\"{\").append(included_strings.stream().sorted().map(s -> '\"' + Strings.escape(s) + '\"').collect(java.util.stream.Collectors.joining(\",\"))).append(\"}\");\n any = true;\n }\n if (object_labels != null) {\n if (any)\n b.append('|');\n b.append(object_labels);\n any = true;\n }\n if (getters != null) {\n if (any)\n b.append('|');\n b.append(\"getter \").append(getters);\n any = true;\n }\n if (setters != null) {\n if (any)\n b.append('|');\n b.append(\"setter \").append(setters);\n any = true;\n }\n if (isMaybeAbsent()) {\n if (any)\n b.append('|');\n b.append(\"absent\");\n any = true;\n }\n if (functionPartitions != null) {\n if (any)\n b.append(',');\n b.append(\"functionPartitions=\").append(functionPartitions);\n any = true;\n }\n if (functionTypeSignatures != null) {\n if (any)\n b.append(',');\n b.append(\"functionTypeSignatures=\").append(functionTypeSignatures);\n // any = true;\n }\n }\n if (!any)\n b.append(\"<no value>\");\n// if (isMaybeModified())\n// b.append(\"%\");\n return b.toString();\n }",
"public String toString() {\n \t\tStringBuffer retval = new StringBuffer();\r\n \t\tretval.append(address.toString());\r\n \t\tif ( parameters.size() != 0 ) retval.append(\";\").append(parameters.toString());\r\n \t\treturn retval.toString();\r\n \t}",
"public String toString() {\n\t\treturn toString(this);\n\t}",
"public String toString()\n {\n StringBuilder builder = new StringBuilder();\n builder.append( \"origin=\" );\n builder.append( origin.toString() );\n builder.append( \",color=\" );\n builder.append( \n color == null ? \n \"null\" : \n String.format(\"#%02x%02x%02x\", color.getRed(), color.getGreen(), color.getBlue() ) \n );\n \n return builder.toString();\n }",
"@Override\n public final String toString()\n {\n StringBuilder sb = new StringBuilder(64);\n appendDesc(sb);\n return sb.toString();\n }",
"public String toString() {\n\t\tString result = Constants.EMPTY_STRING;\n\t\tresult = getDescription();\n\t\treturn result;\n\t}",
"public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }"
] |
[
"0.7047674",
"0.70365584",
"0.6971504",
"0.6899422",
"0.68854547",
"0.68404484",
"0.6821638",
"0.68148905",
"0.68068516",
"0.6766533",
"0.67425954",
"0.6733731",
"0.66990685",
"0.6698959",
"0.6652784",
"0.6633637",
"0.6628306",
"0.66210026",
"0.66169816",
"0.658354",
"0.6581055",
"0.65806377",
"0.65629536",
"0.65629536",
"0.65281594",
"0.65170336",
"0.65162486",
"0.6507176",
"0.6503581",
"0.64950204",
"0.6494608",
"0.64732444",
"0.6467286",
"0.64668244",
"0.6451445",
"0.6450265",
"0.6414105",
"0.64139616",
"0.6388534",
"0.6368225",
"0.63669384",
"0.63645554",
"0.63529706",
"0.6345049",
"0.6333565",
"0.63287055",
"0.63284135",
"0.6311116",
"0.6310542",
"0.63084805",
"0.62978107",
"0.6285351",
"0.62407714",
"0.6238965",
"0.6236433",
"0.62312716",
"0.6228783",
"0.62208486",
"0.621511",
"0.62100405",
"0.6205923",
"0.620487",
"0.62017095",
"0.619755",
"0.6194633",
"0.6191248",
"0.61886346",
"0.6188066",
"0.6187759",
"0.6183476",
"0.6183411",
"0.6181275",
"0.6180464",
"0.617559",
"0.6174409",
"0.61738765",
"0.6173735",
"0.61693275",
"0.61683655",
"0.61670786",
"0.616539",
"0.6163907",
"0.6163771",
"0.61636657",
"0.6162887",
"0.6158463",
"0.61572814",
"0.61550456",
"0.6154766",
"0.6154649",
"0.6154649",
"0.6152402",
"0.61488825",
"0.614564",
"0.6141636",
"0.6136504",
"0.6133005",
"0.6128417",
"0.6121235",
"0.6120801"
] |
0.7152991
|
0
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
int number = 32841;
int temp = 32841;
/*
* int number = 32814; int temp = 32814;
*/
// 14823
// 12843
ArrayList<Integer> listOfNumbers = new ArrayList<Integer>();
ArrayList<Integer> newList = new ArrayList<Integer>();
while (temp > 0) {
int digit = temp % 10;
temp = temp / 10;
listOfNumbers.add(digit);
}
int i = 0;
int j = i + 1;
// Checking the asecending order
for (i = 0; i < listOfNumbers.size() - 1; i++) {
if (listOfNumbers.get(j) < listOfNumbers.get(i)) {
System.out.println(listOfNumbers.get(i + 1));
System.out.println(i + 1);
break;
}
System.out.println(j);
j++;
}
// j = 0;
// replacing the 2 and 4
for (int m = 0; m < listOfNumbers.size() - 1; m++) {
if ((Integer) listOfNumbers.get(m) > (Integer) listOfNumbers.get(i + 1)) {
System.out.println(" i = " + i);
System.out.println("value at m is " + listOfNumbers.get(m));
System.out.println("value at i is " + listOfNumbers.get(i + 1));
int swap = listOfNumbers.get(m);
listOfNumbers.set(m, listOfNumbers.get(i + 1));
listOfNumbers.set(i + 1, swap);
break;
}
}
// getting the sub list and sorting them
List<Integer> subList = listOfNumbers.subList(0, i + 1);
Collections.sort(subList);
Collections.reverse(subList);
// creating a new list wit the next higher number
for (int k = listOfNumbers.size(); k > i + 1; k--) {
newList.add(listOfNumbers.get(k - 1));
}
for (int k = 0; k < subList.size(); k++) {
newList.add(subList.get(k));
}
for (int k = 0; k < newList.size(); k++) {
System.out.print(newList.get(k));
}
}
|
{
"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
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.id
|
public Integer getId() {
return id;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Integer getActivityId() {\n\t\treturn activityId;\n\t}",
"public Integer getActivityId() {\n return activityId;\n }",
"public int getC_Activity_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Activity_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public int getC_Activity_ID();",
"public String getACTIVITY_ID() {\n return ACTIVITY_ID;\n }",
"public String getActivityId() {\n return activityId;\n }",
"CmsActivity selectByPrimaryKey(String activityId);",
"public int getAD_Tree_Activity_ID() {\n\t\tInteger ii = (Integer) get_Value(\"AD_Tree_Activity_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public Integer getActivitytypeid() {\n return activitytypeid;\n }",
"UserActivityTable getUserActivityById(int id) {\n return daoInterface.getUserActivityById(id);\n\n }",
"@Transient\r\n\tpublic static Long getIdActivida() {\r\n\t\treturn idActivida;\r\n\t}",
"public void setActivityId(Integer activityId) {\n this.activityId = activityId;\n }",
"public static Long translateActivityId(String activityId) {\r\n\t\tif(activityId == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif(NodeDAO.DELETE_ACTIVITY_VALUE.equals(activityId)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn Long.parseLong(activityId);\r\n\t}",
"public void setActivityId(Integer activityId) {\n\t\tthis.activityId = activityId;\n\t}",
"public Long getActid() {\r\n return actid;\r\n }",
"TestActivityEntity selectByPrimaryKey(Integer id);",
"public Integer getId()\r\n\t\t{ return mapping.getId(); }",
"public Integer getACTIVITY_SEQ_ID() {\n return ACTIVITY_SEQ_ID;\n }",
"public long getId() {\n return ctTableColumn.getId();\n }",
"public long getId() {\n\t\treturn getTo(true).getId();\n\t}",
"public IntColumn getId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"id\", IntColumn::new) :\n getBinaryColumn(\"id\"));\n }",
"public IntColumn getId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"id\", IntColumn::new) :\n getBinaryColumn(\"id\"));\n }",
"public void setActivityId(String activityId) {\n this.activityId = activityId;\n }",
"public int getId() {\n return parameter.getId();\n }",
"public Integer getId() {\n return aao.getId();\n }",
"@Override\n\tpublic long getActuacionId() {\n\t\treturn model.getActuacionId();\n\t}",
"public int getAuditId();",
"public Integer getActivityName() {\n return activityName;\n }",
"public StrColumn getId() {\n return delegate.getColumn(\"id\", DelegatingStrColumn::new);\n }",
"public StrColumn getId() {\n return delegate.getColumn(\"id\", DelegatingStrColumn::new);\n }",
"public StrColumn getId() {\n return delegate.getColumn(\"id\", DelegatingStrColumn::new);\n }",
"public StrColumn getId() {\n return delegate.getColumn(\"id\", DelegatingStrColumn::new);\n }",
"@NotNull\r\n String getColumnId();",
"private String getRowIdColumn(ConnectorTableMetadata meta)\n {\n String rowIdColumn = AccumuloTableProperties.getRowId(meta.getProperties());\n if (rowIdColumn == null) {\n rowIdColumn = meta.getColumns().get(0).getName();\n }\n return rowIdColumn.toLowerCase();\n }",
"JzAct selectByPrimaryKey(Integer actId);",
"public StrColumn getEntryId() {\n return delegate.getColumn(\"entry_id\", DelegatingStrColumn::new);\n }",
"public StrColumn getEntryId() {\n return delegate.getColumn(\"entry_id\", DelegatingStrColumn::new);\n }",
"public StrColumn getEntryId() {\n return delegate.getColumn(\"entry_id\", DelegatingStrColumn::new);\n }",
"io.dstore.values.IntegerValue getCampaignId();",
"io.dstore.values.IntegerValue getCampaignId();",
"public StrColumn getGoId() {\n return delegate.getColumn(\"go_id\", DelegatingStrColumn::new);\n }",
"public Integer getId(){\n\t\treturn id;\n\t}",
"public Integer getId()\n\t{\n\t\treturn this.id; \n\t}",
"public Integer getId() { return this.id; }",
"public Integer getId() {\n return (Integer) get(\"id\");\n }",
"public String getID() {\r\n return insertMode ? null : stringValue(CONTACTS_ID);\r\n }",
"public String getColumnID()\n\t{\n\t\treturn this.columnID;\n\t}",
"public Integer getId() {\r\n return this.id;\r\n }",
"public Integer getId() \r\n\t{\r\n\t\treturn id;\r\n\t}",
"public StrColumn getEntityId() {\n return delegate.getColumn(\"entity_id\", DelegatingStrColumn::new);\n }",
"@JsonIgnore\r\n public String getRedeemActivityId() {\r\n return OptionalNullable.getFrom(redeemActivityId);\r\n }",
"@Override\n\tpublic ActivityAbstractInfo getActivityById(int id) {\n\t\treturn activityAbstractInfoMapper.selectByPrimaryKey(id);\n\t}",
"public Long getId(){\n\t\treturn id;\n\t}",
"public Long id() { return this.id; }",
"public Integer getId() {\n return this.id;\n }",
"public Integer getId() {\n return this.id;\n }",
"public Integer getId() { return id; }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n return id;\r\n }",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId() {\n\t\treturn this.id;\n\t}",
"public Integer getId() {\n return id.get();\n }"
] |
[
"0.701232",
"0.69133323",
"0.68249273",
"0.66598773",
"0.6566843",
"0.6399289",
"0.63984185",
"0.6207174",
"0.618652",
"0.61303926",
"0.58964753",
"0.58771986",
"0.5810961",
"0.578783",
"0.57547575",
"0.5669789",
"0.56220734",
"0.5586559",
"0.5573493",
"0.5568126",
"0.5556105",
"0.5556105",
"0.5555754",
"0.555463",
"0.5537268",
"0.55332464",
"0.55154324",
"0.5510134",
"0.55076545",
"0.55076545",
"0.55076545",
"0.55076545",
"0.5501671",
"0.54990965",
"0.54649997",
"0.544589",
"0.544589",
"0.544589",
"0.54434323",
"0.54434323",
"0.53945124",
"0.53884983",
"0.5370149",
"0.53629804",
"0.53613895",
"0.53574556",
"0.5352999",
"0.5329579",
"0.5329278",
"0.53201306",
"0.53174317",
"0.53084576",
"0.53021336",
"0.5301512",
"0.52967864",
"0.52967864",
"0.5296233",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52956223",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52941144",
"0.52880627",
"0.52802855"
] |
0.0
|
-1
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.id
|
public void setId(Integer id) {
this.id = id;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setC_Activity_ID (int C_Activity_ID);",
"public void setActivityId(Integer activityId) {\n this.activityId = activityId;\n }",
"public void setActivityId(String activityId) {\n this.activityId = activityId;\n }",
"public void setActivityId(Integer activityId) {\n\t\tthis.activityId = activityId;\n\t}",
"public final void setTest_Activity(com.mendix.systemwideinterfaces.core.IContext context, ugs.proxies.Test test_activity)\n\t{\n\t\tif (test_activity == null)\n\t\t\tgetMendixObject().setValue(context, MemberNames.Test_Activity.toString(), null);\n\t\telse\n\t\t\tgetMendixObject().setValue(context, MemberNames.Test_Activity.toString(), test_activity.getMendixObject().getId());\n\t}",
"public void setC_Activity_ID(int C_Activity_ID) {\n\t\tif (C_Activity_ID <= 0)\n\t\t\tset_Value(\"C_Activity_ID\", null);\n\t\telse\n\t\t\tset_Value(\"C_Activity_ID\", new Integer(C_Activity_ID));\n\t}",
"public Integer getActivityId() {\n\t\treturn activityId;\n\t}",
"public void setACTIVITY_ID(String ACTIVITY_ID) {\n this.ACTIVITY_ID = ACTIVITY_ID == null ? null : ACTIVITY_ID.trim();\n }",
"public Integer getActivityId() {\n return activityId;\n }",
"public void setAD_Tree_Activity_ID(int AD_Tree_Activity_ID) {\n\t\tif (AD_Tree_Activity_ID <= 0)\n\t\t\tset_ValueNoCheck(\"AD_Tree_Activity_ID\", null);\n\t\telse\n\t\t\tset_ValueNoCheck(\"AD_Tree_Activity_ID\", new Integer(\n\t\t\t\t\tAD_Tree_Activity_ID));\n\t}",
"public static void setIdActivida(Long idActivida) {\r\n\t\tNotaActividad.idActivida = idActivida;\r\n\t}",
"UserActivityTable getUserActivityById(int id) {\n return daoInterface.getUserActivityById(id);\n\n }",
"CmsActivity selectByPrimaryKey(String activityId);",
"public String getACTIVITY_ID() {\n return ACTIVITY_ID;\n }",
"public int getC_Activity_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Activity_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public String getActivityId() {\n return activityId;\n }",
"public void setActivitytypeid(Integer activitytypeid) {\n this.activitytypeid = activitytypeid;\n }",
"public void setId(int id)\r\n {\r\n this.mId = id;\r\n }",
"public final void setActivityName(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String activityname)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.ActivityName.toString(), activityname);\n\t}",
"private void setId(Integer id) { this.id = id; }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setACTIVITY_SEQ_ID(Integer ACTIVITY_SEQ_ID) {\n this.ACTIVITY_SEQ_ID = ACTIVITY_SEQ_ID;\n }",
"public void setId(long id) {\n id_ = id;\n }",
"public void setActid(Long actid) {\r\n this.actid = actid;\r\n }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"public int getC_Activity_ID();",
"public void setId( Integer id )\n {\n this.id = id ;\n }",
"public void setId (long id)\r\n {\r\n _id = id;\r\n }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setId( Integer id ) {\n this.id = id ;\n }",
"public void setId( Integer id ) {\n this.id = id ;\n }",
"public void setId( Integer id ) {\n this.id = id ;\n }",
"public void setId( Integer id ) {\n this.id = id ;\n }",
"public void setId( Integer id ) {\n this.id = id ;\n }",
"public void setId( Integer id ) {\n this.id = id ;\n }",
"public void setId( Integer id ) {\n this.id = id ;\n }",
"public void setId(Integer id){\n\t\tthis.id = id;\n\t}",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Long id){\n this.id = id;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setId(int value) {\r\n this.id = value;\r\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"public void setID(int id){\n this.id=id;\n }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"public void setId(Long id) \r\n {\r\n this.id = id;\r\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"public void setId(int id){ this.id = id; }",
"public void setId( Long id ) {\n this.id = id ;\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"public void setId(long id) {\r\n this.id = id;\r\n }",
"public void setId(Long id){\n\t\tthis.id = id;\n\t}",
"public void setId(Long id){\n\t\tthis.id = id;\n\t}",
"public void setId(Long id){\n\t\tthis.id = id;\n\t}",
"public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}",
"public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Long id)\r\n {\r\n this.id = id;\r\n }",
"public void setId(int id){\n\t\tthis.id = id;\n\t}",
"public void setId(int id) {\r\n\t\t_id = id;\r\n\t}",
"public final void setTest_Activity(ugs.proxies.Test test_activity)\n\t{\n\t\tsetTest_Activity(getContext(), test_activity);\n\t}"
] |
[
"0.6789075",
"0.673917",
"0.6620175",
"0.66105175",
"0.6233814",
"0.6207462",
"0.61045015",
"0.6083227",
"0.59694445",
"0.5916037",
"0.5833987",
"0.58052784",
"0.5676296",
"0.5671187",
"0.56087",
"0.5597917",
"0.5524143",
"0.5473364",
"0.54249465",
"0.5394207",
"0.53860736",
"0.5378941",
"0.5376502",
"0.5363",
"0.53378797",
"0.53378797",
"0.5326215",
"0.5318666",
"0.5317799",
"0.53102756",
"0.5306774",
"0.5306774",
"0.5301716",
"0.5301716",
"0.5301716",
"0.5301716",
"0.5301716",
"0.5301716",
"0.5301716",
"0.5293302",
"0.52892125",
"0.52892125",
"0.5278969",
"0.5278969",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.52773523",
"0.5264131",
"0.52611434",
"0.52481604",
"0.52478975",
"0.52411187",
"0.52364606",
"0.52361715",
"0.5235016",
"0.52338797",
"0.5230182",
"0.52297777",
"0.52297777",
"0.52297777",
"0.52297777",
"0.5222738",
"0.521704",
"0.52110744",
"0.52110744",
"0.52110744",
"0.5208681",
"0.5207092",
"0.5200418",
"0.5183189",
"0.51732135",
"0.51726073",
"0.5171513"
] |
0.0
|
-1
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.student_name
|
public String getStudentName() {
return studentName;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@AutoEscape\n\tpublic String getStudentName();",
"public String getName() \r\n {\r\n return studentName;\r\n }",
"public String getStudentName() {\r\n\t\treturn studentName;\r\n\t}",
"public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}",
"public static String findStudentname(String student_id) throws SQLException\n\t{\n\t\tResultSet student;\n\t\tString full_name;\n\t\tList<String> first_name;\n\t\tList<String> middle_name;\n\t\tList<String> last_name;\n\t\tstudent = test.readDatabase(\"select distinct First_name, Middle_name, Last_name from class_2016 where Banner_Id = '\"+student_id+\"'\");\n\t\tfirst_name = test.writeResultSet(student, \"First_name\");\n\t\tstudent = test.readDatabase(\"select distinct First_name, Middle_name, Last_name from class_2016 where Banner_Id = '\"+student_id+\"'\");\n\t\tmiddle_name = test.writeResultSet(student, \"Middle_name\");\n\t\tstudent = test.readDatabase(\"select distinct First_name, Middle_name, Last_name from class_2016 where Banner_Id = '\"+student_id+\"'\");\t\t\n\t\tlast_name = test.writeResultSet(student, \"Last_name\");\n\t\t//System.out.println(first_name);\n\t\tfull_name = last_name.get(0) +\", \"+ first_name.get(0) + \" \" + middle_name.get(0);\n\t\treturn full_name;\n\t}",
"public String getStudentName() {\n\t\treturn studentName;\n\t}",
"public String getStudentFirstName(){\r\n return studentFirstName.get();\r\n }",
"public String getStudent(){\n\t\t\n\t\treturn this.student;\n\t}",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"public String getData(){\n try{\n \n String query = \"SELECT * from student\";\n rs = st.executeQuery(query);\n rs.next();\n String name = rs.getString(\"studentName\");\n return dName = name;\n \n }catch(Exception ex){\n System.out.println(ex);\n return null;\n }\n \n }",
"public String getName(){\n\t\t\treturn columnName;\n\t\t}",
"public void getStudentNameStudentAsc()\n\t{\n\t\tDatabaseHandler db = new DatabaseHandler(getApplicationContext());\n\n\t\tstudent_name_studname_asc = db.getStudentNameAllEnquiryStudentAsc();\n\t\tIterator itr = student_name_studname_asc.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t}",
"public void getStudentNameStudentDsc()\n\t{\n\t\tDatabaseHandler db = new DatabaseHandler(getApplicationContext());\n\n\t\tstudent_name_list_studname_dsc = db.getStudentNameAllEnquiryStudentDsc();\n\t\tIterator itr = student_name_list_studname_dsc.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t}",
"public void setSql_getStudent(String sql_getStudent) {\n\t\tthis.sql_getStudent = sql_getStudent;\n\t}",
"public String getName() {\n return columnName;\n }",
"@Override\n\tpublic String concatnames() {\n\t\tString name1=stu.stream().map(emp->emp.getStuName()).collect(Collectors.joining(\"\"));\n\t\treturn name1;\n\t}",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"private static String searchStudent ( int studentId){\n for (Student s : studentDB) {\n if (s.getID() == studentId) {\n return s.getName();\n }\n }\n return \"\";\n }",
"String getStudentJID()\n{\n return student_jid;\n}",
"@Override\n\tpublic String toString() {\n\t\treturn \" \" + getStudentId() + \":\" + getStudentName();\n\t}",
"public String getFullSampleName(int column);",
"public String getName(){\r\n\t\tString s=\"\";\r\n\r\n\t\tif(getPersonId() != null && getPersonId().length() != 0)\r\n\t\t\ts += \" \" + getPersonId();\r\n\t\t\r\n\t\tif(getStudySubjectId() != null && getStudySubjectId().length() != 0)\r\n\t\t\ts += \" \" + getStudySubjectId();\r\n\r\n\t\tif(getSecondaryId() != null && getSecondaryId().length() != 0)\r\n\t\t\ts += \" \" + getSecondaryId();\r\n\r\n\t\treturn s;\r\n\t}",
"public String getAttributeName(){\n if(field.getAnnotation(Column.class) != null){\n return field.getAnnotation(Column.class).column();\n }\n if( field.getAnnotation(PrimaryKey.class) !=null){\n return field.getAnnotation(PrimaryKey.class).name();\n }\n return null;\n }",
"public int getStudentId() { // changed to string\n return studentId;\n }",
"public String getStudentnames() {\r\n return studentnames;\r\n }",
"public String getStudentId() {\n\treturn this.studentId;\n }",
"public java.lang.String getStudent_contactName() {\n\t\treturn _primarySchoolStudent.getStudent_contactName();\n\t}",
"public String getNameOf(Participant participant) {\n String userId = participant.getId();\n List<User> userList = _userDataSource.getEntry(DatabaseHelper.USER_COLUMN_ID + \" = '\" + userId + \"'\");\n\n String participantName = \"\";\n\n if (userList.size() > 0) {\n participantName = userList.get(0).getEntryName();\n }\n\n return participantName;\n }",
"public static String findStudent(String name) throws SQLException\n\t{\n\t\tString[] split = name.split(\"\\\\s+\");\n\t\tResultSet student_id;\n\t\tList<String> id;\n\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where First_name = '\"+split[0]+\"' and Middle_name = '\"+split[1]+\"' and Last_name = '\"+split[2]+\"'\");\n\t\tid = test.writeResultSet(student_id,\"Banner_id\");\n\t\treturn id.get(0); \n\t}",
"public String getName() { return _sqlName; }",
"public String getColumnName(int columnIndex){\r\n\t\t\tif (Person.getFieldColumn(columnIndex) != null)\r\n\t\t\t\treturn Person.getFieldColumn(columnIndex);\r\n\t\t\treturn \"\";\r\n\t\t}",
"@Override\n\tpublic String toString() {\n\t\treturn name + \" \" + studentID;\n\t}",
"public String getStudentid() {\n return studentid;\n }",
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"public String getStudentName(){\n return studentName.getText().trim();\n }",
"String getColumnName();",
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"public String getStudentId() {\r\n return studentId;\r\n }",
"public String getColumnName(int columnIndex) {\n return resource.getString(columnNames.get(columnIndex));\n }",
"public static String getStudentName(int rollNum) {\r\n\t\tMap<Integer,Student> map = getStudentMap();\r\n\t\tif(map.containsKey(rollNum)) { \r\n\t\t\tStudent st = map.get(rollNum);\r\n\t\t\treturn st.getName();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public StrColumn getName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"name\", StrColumn::new) :\n getBinaryColumn(\"name\"));\n }",
"public int getStudentId();",
"public String getFirstname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT firstname FROM user WHERE id=?;\";\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getFirstname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"firstname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getFirstname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"@Override\n\tpublic Map<String, Object> getStudent() {\n\t\treturn getSession().selectOne(getNamespace() + \"getStudent\");\n\t}",
"@Override\r\n\tpublic List<Student> selectStudent(String name, String alias) {return null;\r\n\t}",
"public String getName(){\n\n //returns the value of the name field\n return this.name;\n }",
"java.lang.String getEmployeeName();",
"public void setStudentName(String studentName) {\n\t\tthis.studentName = studentName;\n\t}",
"public String getName (){\r\n return firstName + \" \" + lastName;\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"student ID --> \"+this.studentID+\", Name --> \"+this.studentName;\n\t}",
"@Override\n public String getColumnName(int aColumn) {\n return model.getColumnName(aColumn); \n }",
"public String getName(){\n\t\treturn this.firstName + \" \" + this.surname;\r\n\t}",
"public String getStudentLastName(){\r\n return studentLastName.get();\r\n}",
"public String getStudentID(){\r\n return studentID.get();\r\n }",
"public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }",
"public abstract String getDatabaseColumnName(String entityName, String propertyName);",
"@Column(name = \"name\")\n public String getName() {\n return name;\n }",
"java.lang.String getCourseName();",
"public java.lang.String getFirstName();",
"public String getColumnName() {\n return columnName; \n }",
"@Override\n public java.lang.String getSecondLastName() {\n return _entityCustomer.getSecondLastName();\n }",
"public String getId() { return studentId; }",
"public String getStudentID() {\r\n\t\treturn studentID;\r\n\t}",
"@Column(length = 50, nullable = false)\n public String getFirstName() {\n return firstName;\n }",
"@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }",
"@Override\n public String toString()\n {\n return mi_name;\n }",
"@Override\n public String toString()\n {\n return mi_name;\n }",
"@Override\n public String getColumnName(int column) {\n return colName[column];\n }",
"public String toString()\n {\n return \"Student(\" + studentName + \", \" + currentPhone + \")\";\n }",
"String getCustomerLastName(String bookingRef);",
"public String getSQLName(){\n\t\tif(source==null){\n\t\t\t//no source predicate is associated with this pred\n\t\t\treturn name;\n\t\t}\n\t\treturn source.getSQLName();\n\t}",
"public String getColumnName();",
"public static String getEmployeeName(String id){\n return \"select e_fname from employee where e_id = '\"+id+\"'\";\n }",
"public JExpr getNameExpr() { return _nameExpr; }",
"public Student setStudentName(String studentName) {\n this.studentName = studentName;\n return this;\n }",
"public void setStudentName(String studentName);",
"public String getFirstName(){\n return(this.firstName);\n }",
"public String getStudents(){\n\t\treturn this.students;\n\t}",
"public String getNameBySID(int sid) {\n String query = \"SELECT \"+DBHelper.STORES_SNAME+\" FROM \"+DBHelper.TABLE_STORES+\" WHERE \"+DBHelper.STORES_ID+\" =?\";\n String[] arg = new String[]{String.valueOf(sid)};\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, arg);\n\n if(cursor.moveToNext()) {\n String sname = cursor.getString(cursor.getColumnIndex(DBHelper.STORES_SNAME));\n db.close();\n return sname;\n }\n else{\n return null;\n }\n }",
"@Override\n\tpublic String getUserName() {\n\t\t\n\t\ttry {\n\t\t\treturn UserLocalServiceUtil.getUser(_dataset.getUserId()).getScreenName();\n\t\t} catch (PortalException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SystemException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\treturn \"ERROR\";\n\t\t}\n\t}",
"public String getLastname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT lastname FROM user WHERE id=?;\";\t\t\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getLastname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"lastname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getLastname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"@Override\n\t@Column(name = \"leadTypeName\", length = 5, nullable = false)\n\tpublic String getName()\n\t{\n\t\treturn super.getName();\n\t}",
"public int getStudentId() {\n return studentId;\n }",
"@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }",
"@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}",
"public com.demo.springprotobuff.Demoproto.Student getStudent(int index) {\n\t\t\t\tif (studentBuilder_ == null) {\n\t\t\t\t\treturn student_.get(index);\n\t\t\t\t} else {\n\t\t\t\t\treturn studentBuilder_.getMessage(index);\n\t\t\t\t}\n\t\t\t}",
"public String getAttributeName() {\n\n if (getAD_Column_ID() == 0) {\n return super.getAttributeName();\n }\n\n // We have a column\n String\tattribute\t= super.getAttributeName();\n\n if ((attribute != null) && (attribute.length() > 0)) {\n return attribute;\n }\n\n setAttributeName(getColumn().getColumnName());\n\n return super.getAttributeName();\n\n }",
"public void setStudentName(String studentName) {\n this.studentName = studentName == null ? null : studentName.trim();\n }",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"public void setStudentName() {\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(\"Name Of The Student : \"+studentName);}",
"@Override\n\tpublic String getColumnName(int column) {\n\t\treturn names[column];\n\t}",
"public String getFirstName()\n\t{\n\t\treturn getFirstName( getSession().getSessionContext() );\n\t}",
"public String getFirstName()\n\t{\n\t\treturn getFirstName( getSession().getSessionContext() );\n\t}"
] |
[
"0.67264473",
"0.64833754",
"0.6410157",
"0.6401574",
"0.63403225",
"0.63084185",
"0.6014555",
"0.59872955",
"0.59821486",
"0.5863173",
"0.5807263",
"0.58060914",
"0.57705045",
"0.5768543",
"0.5752497",
"0.57173306",
"0.5706702",
"0.5706702",
"0.56999254",
"0.5692849",
"0.5683411",
"0.56704336",
"0.5623234",
"0.560977",
"0.5584385",
"0.5543774",
"0.5535988",
"0.5529095",
"0.55262893",
"0.55217916",
"0.5517707",
"0.5493554",
"0.5475483",
"0.547361",
"0.54646677",
"0.54621285",
"0.5461464",
"0.54529893",
"0.54529893",
"0.544638",
"0.54213786",
"0.5391812",
"0.53828824",
"0.5376849",
"0.5368756",
"0.5364849",
"0.5362039",
"0.53612703",
"0.53562665",
"0.53417116",
"0.53401387",
"0.5336082",
"0.53244114",
"0.5316816",
"0.5312268",
"0.52918017",
"0.52651477",
"0.5262441",
"0.52616227",
"0.52549565",
"0.5253487",
"0.5218771",
"0.5218625",
"0.5213603",
"0.5212682",
"0.5203281",
"0.51986665",
"0.5194155",
"0.5194155",
"0.51932645",
"0.519241",
"0.5188205",
"0.5187863",
"0.5182295",
"0.51766795",
"0.51753646",
"0.5175114",
"0.51743966",
"0.51670504",
"0.5162599",
"0.5160281",
"0.51592714",
"0.5152883",
"0.5151257",
"0.5148822",
"0.5146141",
"0.5146141",
"0.51460713",
"0.5143999",
"0.51289636",
"0.5121111",
"0.5112933",
"0.5106946",
"0.5106946",
"0.5106946",
"0.5103307",
"0.5103199",
"0.5098798",
"0.5098798"
] |
0.63936484
|
5
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.student_name
|
public void setStudentName(String studentName) {
this.studentName = studentName == null ? null : studentName.trim();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setStudentName(String studentName);",
"public void setStudentFirstName(String studentFirstName){\r\n this.studentFirstName.set(studentFirstName);\r\n }",
"public void setStudentName() {\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(\"Name Of The Student : \"+studentName);}",
"public void setStudentName(String studentName) {\n\t\tthis.studentName = studentName;\n\t}",
"public void setName(String studentName) \r\n {\r\n if (isEmpty(studentName)) \r\n {\r\n throw new IllegalArgumentException(\"Student name cannot be blank.\");\r\n } \r\n else \r\n {\r\n this.studentName = studentName;\r\n }\r\n\r\n }",
"public void setStudent_name(java.lang.String student_name) {\n\t\t_primarySchoolStudent.setStudent_name(student_name);\n\t}",
"public void setStudentLastName(String studentLastName){\r\n this.studentLastName.set(studentLastName);\r\n }",
"@Override\npublic void studentName(String name) {\n\tthis.name = name;\n\tSystem.out.println(\"student name is \" +name);\n\t\n}",
"public Student setStudentName(String studentName) {\n this.studentName = studentName;\n return this;\n }",
"public void setFirstname(String firstname) throws SQLException\r\n\t{\r\n\t\tif (firstname == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET firstname =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, firstname);\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setFirstname(String \"+ firstname + \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public void setStudentID(int studentName) {\r\n switch (studentName) {\r\n case 1:\r\n studentID = \"Ada\";\r\n break;\r\n case 2:\r\n studentID = \"Bobby\";\r\n break;\r\n case 3:\r\n studentID = \"Cathy\";\r\n break;\r\n case 4:\r\n studentID = \"Daniel\";\r\n break;\r\n case 5:\r\n studentID = \"Emily\";\r\n break;\r\n case 6:\r\n studentID = \"Frank\";\r\n break;\r\n case 7:\r\n studentID = \"Gilbert\";\r\n break;\r\n case 8:\r\n studentID = \"Hailey\";\r\n break;\r\n case 9:\r\n studentID = \"Josh\";\r\n break;\r\n default:\r\n studentID = \"Chelsea\";\r\n }\r\n }",
"public void setStudentID(String studentID){\r\n this.studentID.set(studentID);\r\n }",
"@AutoEscape\n\tpublic String getStudentName();",
"@Update(\"UPDATE student SET name = #{name}, gpa = #{gpa} WHERE npm = #{npm}\")\n\tvoid updateStudent(StudentModel student);",
"public void setStudent(Student s) {\r\n student = s;\r\n }",
"public String getStudentName() {\r\n\t\treturn studentName;\r\n\t}",
"public void setStudent(Student student) {\r\n\t\tthis.student = student;\r\n\t}",
"public void setLastname(String lastname) throws SQLException\r\n\t{\r\n\t\tif (lastname == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET lastname =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, lastname);\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setLastname(String \"+ lastname + \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public String getStudentName() {\n return studentName;\n }",
"public String getStudentName() {\n return studentName;\n }",
"public String getStudentName() {\n\t\treturn studentName;\n\t}",
"public void setStudentId(int studentId);",
"public void setSql_getStudent(String sql_getStudent) {\n\t\tthis.sql_getStudent = sql_getStudent;\n\t}",
"public Query_UpdateStudent(DataSource ds) {\n\t\t\tsuper.setDataSource(ds);\n\t\t\tsetSql(sql_updateStudent);\n\t\t\tdeclareParameter(new SqlParameter(\"id\", Types.INTEGER));\n\t\t\tdeclareParameter(new SqlParameter(\"matnr\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"firstname\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"lastname\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"email\", Types.VARCHAR));\n\t\t}",
"public void editStudentLastName(Student changeStudent, String name)\n\t{\n\t\tchangeStudent.setStrNameLast (name);\n\t\tthis.saveNeed = true;\n\n\n\t}",
"public void SetStudent(Student inStudent) {\n selStudent = inStudent;\n\n }",
"public void setStudent(String students) {\n\t\tthis.students = students;\n\t}",
"@Override\n\tpublic void update(Student student) {\n\t\tString query=\"update student set name='\"+student.getName()+\"',age='\"+student.getAge()+\"' where id='\"+student.getId()+\"'\";\n\t\tint result=jdbcTemplate.update(query);\n\t\tSystem.out.println(result+\" updated successfully\");\n\t}",
"public String getName() \r\n {\r\n return studentName;\r\n }",
"public Student(String name) {\n this.nameProp.set(name);\n }",
"public void setStudent(Student s) {\n\t\tStudent = s;\n\t\tsetWelcomeText(s.getFirstName() , s.getLastName());//update the \"welcome, name!\" JLabel\n\t}",
"public void setStudentId(String studentId) {\r\n this.studentId = studentId;\r\n }",
"public void setStudentID(long studentID);",
"public void setName(final java.lang.String name) {\r\n this.name = name;\r\n this.values.put(UserInfoTable.NAME, name);\r\n }",
"public void setStudent_contactName(java.lang.String student_contactName) {\n\t\t_primarySchoolStudent.setStudent_contactName(student_contactName);\n\t}",
"Student(String name){\n this.name = name;\n }",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"@Override\n\t/**\n\t * 修改数据\n\t * update mwfj_jdbc.Student set paramr=? where id=?\n\t */\n\tpublic void updateStudent(Student student) {\n\t\t\n\t}",
"public void setFirstName(java.lang.String newFirstName);",
"public void setSql_updateStudent(String sql_updateStudent) {\n\t\tthis.sql_updateStudent = sql_updateStudent;\n\t}",
"Employee setFirstname(String firstname);",
"private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }",
"public void setStudentnames(String studentnames) {\r\n this.studentnames = studentnames;\r\n }",
"public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }",
"public void setName(String s) {\n this.name = s;\n }",
"public void setColumnName (String ColumnName);",
"public void setFirstName(String newFirstName)\r\n {\r\n firstName = newFirstName;\r\n }",
"public void setFirst_name(String first_name);",
"public void setStudentId(int studentId) {\n\t\tStudentId = studentId;\n\t}",
"public void setFirstName(String fname){ firstName.set(fname); }",
"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 }",
"public void setName(String new_name){\n this.name=new_name;\n }",
"@Override\n\tpublic String updateUser(User studentObject) {\n\t\tjdbcTemplate.execute(\"update student set name='\"+studentObject.getName()+\"',address='\"+studentObject.getAddress()+\"'where id=\"+studentObject.getId()); \n\t\treturn \"updated sucess\";\n\t}",
"public void setNameString(String s) {\n nameString = s;\r\n }",
"public void setName(final String value)\n\t{\n\t\tsetName( getSession().getSessionContext(), value );\n\t}",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"public Student(String name) {\n\n this.name = name;\n }",
"public void setName(String name) {\n fName= name;\n }",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$26);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"@Test\r\n public void testSetlName() {\r\n System.out.println(\"setlName\");\r\n String lName = \"\";\r\n Student instance = new Student();\r\n instance.setlName(lName);\r\n \r\n }",
"public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}",
"public void setFirstName(final String value)\n\t{\n\t\tsetFirstName( getSession().getSessionContext(), value );\n\t}",
"public void setFirstName(final String value)\n\t{\n\t\tsetFirstName( getSession().getSessionContext(), value );\n\t}",
"public void editStudentFirstName(Student changeStudent, String firstName)\n\t{\n\t\tchangeStudent.setStrNameFirst (firstName);\n\t\tthis.saveNeed = true;\n\n\n\t}",
"public static void setFirstName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyFName, name);\n }",
"public void setStudentID(String studentID) {\r\n\t\tthis.studentID = studentID;\r\n\t}",
"public void setName(java.lang.CharSequence value) {\n this.name = value;\n }",
"public void setName(String name){\r\n gotUserName = true;\r\n this.name = name;\r\n }",
"public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$2);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }",
"public void setRegisteredStudent(int registeredStudent)\r\n\t{\r\n\t\tthis.registeredStudent = registeredStudent;\r\n\t}",
"public String getStudent(){\n\t\t\n\t\treturn this.student;\n\t}",
"public Query_InsertStudent(DataSource ds) {\n\t\t\tsuper.setDataSource(ds);\n\t\t\tsetSql(sql_insertStudent);\n\t\t\tdeclareParameter(new SqlParameter(\"matnr\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"firstname\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"lastname\", Types.VARCHAR));\n\t\t\tdeclareParameter(new SqlParameter(\"email\", Types.VARCHAR));\n\t\t}",
"public Student(String name) {\n this.name = name;\n }",
"public static void setLastName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyLName,name);\n }",
"public void setColumnName(java.lang.String columnName) {\r\n this.columnName = columnName;\r\n }",
"public void changeFirstNameCellEvent(CellEditEvent edittedCell) {\r\n Student personSelected = tableView.getSelectionModel().\r\n getSelectedItem();\r\n personSelected.setFirstName(edittedCell.getNewValue().toString());\r\n }",
"void lastName( String key, String value ){\n developer.lastName = value;\n }",
"public void updateStudent(Student theStudent) {\n\t\tConnection myConn=null;\n\t\tPreparedStatement myStmt=null;\n\t\t\n\t\t//get db connection\n\t\ttry {\n\t\tmyConn=dataSource.getConnection();\n\t\t// create the sql update statement\n\t\tString sql=\"update student \"+\"set first_name=?,last_name=?,email=? \"+\"where id=?\";\n\t\t\n\t\t//prepare statement\n\t\tmyStmt=myConn.prepareStatement(sql);\n\t\t\n\t\t//set params\n\t\tmyStmt.setString(1, theStudent.getFirstName());\n\t\tmyStmt.setString(2, theStudent.getLastName());\n\t\tmyStmt.setString(3, theStudent.getEmail());\n\t\tmyStmt.setInt(4, theStudent.getId());\n\t\t\n\t\t//execte SQL\n\t\tmyStmt.execute();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t// JDBC object clean Up\n\t\t\tclose(myConn,myStmt,null);\n\t\t}\n\t}",
"public void setName(java.lang.String value) {\n this.name = value;\n }",
"@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }",
"public void setUser_name(String user_name);",
"public void setField(StudentThrift studentThrift){\n id = studentThrift.getId();\n setTextID(FIRST_NAME, studentThrift.getFirstName());\n setTextID(LAST_NAME, studentThrift.getLastName());\n if (studentThrift.getMiddleName() != null){\n setTextID(MIDDLE_NAME, studentThrift.getMiddleName());\n }\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date birthDate = null;\n try {\n birthDate = format.parse(studentThrift.getDateOfBirth());\n } catch (ParseException e) {\n MainWindow.logger.error(\"Not valid date\");\n MainWindow.logger.trace(e);\n }\n jDateChooser.setDate(birthDate);\n setTextID(ADDRESS, studentThrift.getHomeAddress());\n group.setSelectedIndex\n (Arrays.asList(studentGroupArray).indexOf(studentThrift.getStudentGroup().getName()));\n }",
"void setFirstName(String firstName);",
"public void setName(String value) {\n this.name = value;\n }",
"@Override\r\n\tpublic List<Student> selectStudent(String name, String alias) {return null;\r\n\t}",
"public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}",
"public void setCourseName( String name )\n {\n courseName = name; // store the course name\n }",
"public void setFirstName(java.lang.CharSequence value) {\n this.first_name = value;\n }",
"private static void editStudent () {\n System.out.println(\"Here is a list of Students..\");\n showStudentDB();\n System.out.println(\"Enter Id of student you want to edit: \");\n int studentId = input.nextInt();\n input.nextLine();\n Student student = null;\n\n for(Student s: studentDB) {\n if(s.getID() == studentId) {\n student = s;\n }\n }\n\n if(student != null) {\n System.out.println(\"Enter New Name\");\n String str = input.nextLine();\n student.setName(str);\n System.out.println(\"Name is changed!\");\n System.out.println(\"Id: \" + student.getID() + \"\\n\" + \"Name: \" + student.getName() );\n } else {\n System.out.println(\"Invalid Person!\");\n }\n }",
"public void setName(String inName)\n {\n name = inName;\n }",
"@Override\npublic void studentId(int id) {\n\tthis.myId=id;\n\tSystem.out.println(\"student Id is \" +name);\n}",
"public void setSname(String sname) {\n this.sname = sname == null ? null : sname.trim();\n }",
"public void setName(String firstName, String lastName)\n {\n this.name = firstName +\" \"+ lastName;\n\n }",
"public void setFirstName(String newFirstName) {\n this.firstName = newFirstName;\n }",
"public String getStudentFirstName(){\r\n return studentFirstName.get();\r\n }",
"public void setColumnName(String columnName);",
"public String getStudentId() {\r\n return studentId;\r\n }",
"public void setStudents(StudentDataBase students) {\n this.students = students;\n }"
] |
[
"0.6871886",
"0.6479796",
"0.6340254",
"0.6230289",
"0.61619186",
"0.61557823",
"0.6105076",
"0.59944224",
"0.5940124",
"0.5935154",
"0.5862858",
"0.5850301",
"0.5822478",
"0.57966137",
"0.5795158",
"0.5767603",
"0.57125014",
"0.56695443",
"0.5663473",
"0.5663473",
"0.56575966",
"0.5655118",
"0.5599708",
"0.55770135",
"0.55681926",
"0.55648637",
"0.550648",
"0.5476545",
"0.54674715",
"0.54667515",
"0.54582214",
"0.54547477",
"0.54352355",
"0.54339683",
"0.54218507",
"0.54174817",
"0.540777",
"0.54071856",
"0.5387013",
"0.537892",
"0.5375707",
"0.5365176",
"0.5327468",
"0.53212965",
"0.53174466",
"0.52849996",
"0.5274729",
"0.5264044",
"0.5260236",
"0.52578354",
"0.5244445",
"0.5244445",
"0.5244445",
"0.52341163",
"0.522415",
"0.5223938",
"0.5222898",
"0.5211882",
"0.52029395",
"0.51923734",
"0.5187783",
"0.51857316",
"0.518443",
"0.51835775",
"0.51835775",
"0.517622",
"0.5168668",
"0.5166074",
"0.5160283",
"0.5155957",
"0.5146688",
"0.5145642",
"0.514114",
"0.5138297",
"0.51378274",
"0.5135225",
"0.51347727",
"0.51320934",
"0.5131104",
"0.5129851",
"0.51287687",
"0.51279163",
"0.51275367",
"0.51237655",
"0.51230276",
"0.5121776",
"0.51210356",
"0.5120748",
"0.51130176",
"0.51067215",
"0.51043487",
"0.51014566",
"0.50970536",
"0.5095696",
"0.5092529",
"0.50912243",
"0.50908774",
"0.50871754",
"0.5085846",
"0.5083863"
] |
0.62717855
|
3
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.mobile_phone
|
public String getMobilePhone() {
return mobilePhone;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Long getMobile_phone();",
"public java.lang.String getMobilePhone() {\r\n return mobilePhone;\r\n }",
"public String getMobilePhoneNumber() {\n\t\treturn mobilePhoneNumber;\n\t}",
"public String getMobile_number() {\n return mobile_number;\n }",
"public java.lang.String getMobile_number() {\n return mobile_number;\n }",
"public String getMobileNumber() {\n return mobileNumber;\n }",
"@Override\n\tpublic String getMobileNum() {\n\t\treturn get.getMobileNum();\n\t}",
"public String getMobile() {\r\n return mobile;\r\n }",
"public String getMobile() {\r\n return mobile;\r\n }",
"public String getMobileNum() {\n return mobileNum;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getMobile() {\n return mobile;\n }",
"public String getCustomerMobile() {\n return customerMobile;\n }",
"public String getMobileNum() {\r\n\t\treturn mobileNum;\r\n\t}",
"public String getMobileCode() {\n return mobileCode;\n }",
"public Long getHome_phone();",
"public String getUserMobile() {\n return userMobile;\n }",
"public String getUserMobile() {\n return userMobile;\n }",
"public String getmobileNum() {\n\t\treturn _mobileNum;\n\t}",
"public String getMobileNum() {\n\t\treturn mobileNum;\n\t}",
"public String getMobile() {\n\t\treturn mobile;\n\t}",
"@Override\n public String provideCustomerMobilePhone( )\n {\n return _signaleur.getIdTelephone( );\n }",
"public String getMobileNumber(){\n return mobileNumber;\n }",
"public java.lang.String getMobile () {\r\n\t\treturn mobile;\r\n\t}",
"public String getCustomerMobile() {\n\t\treturn customerMobile;\n\t}",
"@XmlElement\n public String getMobilePhone() {\n return mobilePhone;\n }",
"public void setMobile_phone(Long mobile_phone);",
"public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}",
"public long getPhone() {\n return phone;\n }",
"public int getMobile() {\n\t\t\treturn Mobile;\r\n\t\t}",
"public String getUserPhone() {\r\n return userPhone;\r\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 int getMobile() {return mobile;}",
"public StringFilter getMobilePhone() {\n\t\treturn mobilePhone;\n\t}",
"@Override\n public java.lang.String getPhone() {\n return _entityCustomer.getPhone();\n }",
"public void setMobilePhone(String mobilePhone) {\n this.mobilePhone = mobilePhone;\n }",
"public String getPhone() {\n return _phone;\n }",
"public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}",
"@Column(name = \"CELL_PH_NUM\", length = 10)\n public String getCellPhoneNumber() {\n return cellPhoneNumber;\n }",
"public String getUserphone() {\n return userphone;\n }",
"public String getMobileNo() {\n return (String)getAttributeInternal(MOBILENO);\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() {\r\n return phone;\r\n }",
"public Long getPhoneId() {\n return phoneId;\n }",
"public String getPhone() {\n return phone;\n }",
"public void setMobilePhone(java.lang.String mobilePhone) {\r\n this.mobilePhone = mobilePhone;\r\n }",
"public String getPhone() {\n return mPhone;\n }",
"public String getPhone() {\n return mPhone;\n }",
"@ApiModelProperty(value = \"手机\")\n\tpublic String getPhone() {\n\t\treturn phone;\n\t}",
"@ApiModelProperty(value = \"Mobile number (if availible and allowed)\")\n public String getMobileNumber() {\n return mobileNumber;\n }",
"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 String getPhone_number() {\n return phone_number;\n }",
"public String getPhone(){\n\t\treturn phone;\n\t}",
"public String getPhone() {\n\t\treturn phone;\n\t}",
"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 final String getPhone() {\n return phone;\n }",
"java.lang.String getPhone();",
"public java.lang.String getPhone() {\n return phone;\n }",
"public String getUserPhone()\n {\n return userPhone;\n }",
"@Override\n public java.lang.String getCellPhone() {\n return _entityCustomer.getCellPhone();\n }",
"public String getMobliephone() {\n return mobliephone;\n }",
"public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}",
"public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}",
"public java.lang.String getPhone () {\n\t\treturn phone;\n\t}",
"public java.lang.String getPhone_number() {\n return phone_number;\n }",
"@Override\r\n\tpublic String getPhone() {\n\t\treturn phone;\r\n\t}",
"public String getphoneNum() {\n\t\treturn _phoneNum;\n\t}",
"public java.lang.String getTelePhone() {\r\n return telePhone;\r\n }"
] |
[
"0.7542114",
"0.69836855",
"0.689581",
"0.6885385",
"0.6843693",
"0.68010426",
"0.6698423",
"0.6682586",
"0.6682586",
"0.66804975",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.66483426",
"0.6615548",
"0.66132206",
"0.66068363",
"0.65928113",
"0.6578259",
"0.6578259",
"0.6576533",
"0.6541452",
"0.65231305",
"0.6483615",
"0.6483441",
"0.6459066",
"0.64544445",
"0.6422015",
"0.64122754",
"0.6376866",
"0.6374328",
"0.6364943",
"0.63485545",
"0.63404006",
"0.632919",
"0.63193184",
"0.6291792",
"0.6289564",
"0.6288821",
"0.62705326",
"0.6268561",
"0.6259889",
"0.62476003",
"0.6246561",
"0.6246561",
"0.6246561",
"0.6246561",
"0.6246561",
"0.6246561",
"0.62228554",
"0.62226677",
"0.6203433",
"0.61812264",
"0.61812264",
"0.6178742",
"0.6173177",
"0.61715645",
"0.61715645",
"0.6160459",
"0.6159595",
"0.61276615",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.6113211",
"0.61131686",
"0.6108388",
"0.6072751",
"0.60703534",
"0.60668856",
"0.6060114",
"0.6054952",
"0.6018452",
"0.6007177",
"0.60062724",
"0.59933525",
"0.5992609",
"0.5988095"
] |
0.6992198
|
1
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.mobile_phone
|
public void setMobilePhone(String mobilePhone) {
this.mobilePhone = mobilePhone == null ? null : mobilePhone.trim();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setMobile_phone(Long mobile_phone);",
"public void setMobilePhone(String mobilePhone) {\n this.mobilePhone = mobilePhone;\n }",
"public void setMobilePhone(java.lang.String mobilePhone) {\r\n this.mobilePhone = mobilePhone;\r\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile;\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile;\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile;\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile;\n }",
"public void setPhone(String mPhone) {\n this.mPhone = mPhone;\n }",
"public void set_phone(String Phone)\n {\n phone =Phone;\n }",
"private void setMobileNum(String mobileNum) {\n this.mobileNum = StringExtension.nullFilter(mobileNum);\n }",
"public void setMobile (java.lang.String mobile) {\r\n\t\tthis.mobile = mobile;\r\n\t}",
"public void setMobilePhoneNumber(String mobilePhoneNumber) {\n\t\tthis.mobilePhoneNumber = mobilePhoneNumber;\n\t}",
"public void setMobile(int number) {\n\t\t\tthis.Mobile = number;\r\n\t\t}",
"public void setMobile(String mobile) {\r\n this.mobile = mobile == null ? null : mobile.trim();\r\n }",
"public void setMobile(String mobile) {\r\n this.mobile = mobile == null ? null : mobile.trim();\r\n }",
"public void setPhone(String phone)\r\n/* 46: */ {\r\n/* 47:58 */ this.phone = phone;\r\n/* 48: */ }",
"public void setPhone(long phone) {\n this.phone = phone;\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }",
"public void setPhone(String phone) {\n this.mPhone = phone;\n }",
"public void setmobileNum(String mobileNum) {\n\t\t_mobileNum = mobileNum;\n\t}",
"@Override\n public void setPhone(java.lang.String phone) {\n _entityCustomer.setPhone(phone);\n }",
"public void setMobile_number(String mobile_number) {\n this.mobile_number = mobile_number;\n }",
"public void setMobileNum(String mobileNum) {\r\n\t\tthis.mobileNum = mobileNum;\r\n\t}",
"public void setMobile(String mobile) {\n\t\tthis.mobile = mobile == null ? null : mobile.trim();\n\t}",
"public void setPhone(String phone);",
"public void setUserPhone( String userPhone )\n {\n this.userPhone = userPhone;\n }",
"public void setPhone(String phone) {\r\n this.phone = phone;\r\n }",
"public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\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 void setHome_phone(Long home_phone);",
"public void setPhone(String phone){\n\t\tthis.phone = phone;\n\t}",
"public void setMobilePhone(StringFilter mobilePhone) {\n\t\tthis.mobilePhone = mobilePhone;\n\t}",
"@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 }",
"public void setPhone(String phone)\n {\n this.phone = phone;\n }",
"public void setMobileNumber(String mobileNumber) {\n this.mobileNumber = mobileNumber;\n }",
"public void setMobileNum(String mobileNum) {\n\t\tthis.mobileNum = mobileNum;\n\t}",
"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 setPhone(String phone) {\n this.phone = phone;\n }",
"public void setMobile_number(java.lang.String mobile_number) {\n this.mobile_number = mobile_number;\n }",
"public void setPhone(String newPhone) {\r\n\t\tthis.phone = newPhone;\r\n\t}",
"public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }",
"public void setPhone(final String phone) {\n this.phone = phone;\n }",
"public void setPhone(java.lang.String phone) {\n this.phone = phone;\n }",
"public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }",
"void setPhone(int phone);",
"public void setPhone(String phone) {\n\t\tthis.phone = phone == null ? null : phone.trim();\n\t}",
"public Long getMobile_phone();",
"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 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 setCustomerMobile(String customerMobile) {\n this.customerMobile = customerMobile;\n }",
"public void setMobliephone(String mobliephone) {\n this.mobliephone = mobliephone;\n }",
"public void setPhone(String phone) {\n\t\tthis.phone = StringUtils.trimString( phone );\n\t}",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void setPhone (java.lang.String phone) {\n\t\tthis.phone = phone;\n\t}",
"public void setMobileCode(String mobileCode) {\n this.mobileCode = mobileCode == null ? null : mobileCode.trim();\n }",
"public String getMobilePhone() {\n return mobilePhone;\n }",
"public String getMobilePhoneNumber() {\n\t\treturn mobilePhoneNumber;\n\t}",
"public void setMobileNo(String value) {\n setAttributeInternal(MOBILENO, value);\n }",
"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 }",
"@Override\n public void setCellPhone(java.lang.String cellPhone) {\n _entityCustomer.setCellPhone(cellPhone);\n }",
"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 }",
"public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }",
"public String getMobile_number() {\n return mobile_number;\n }",
"public String getMobileNumber() {\n return mobileNumber;\n }",
"public void setPhone_number(String phone_number) {\n this.phone_number = phone_number;\n }",
"public void setContactPhone(String contactPhone) {\n this.contactPhone = contactPhone;\n }",
"public void setPhoneNumber(String phoneNumber) {\n\t\tthis.phoneNumber=phoneNumber;\r\n\t}",
"public void setUserPhone(String userPhone) {\r\n this.userPhone = userPhone == null ? null : userPhone.trim();\r\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public final void setPhone(final String phoneNew) {\n this.phone = phoneNew;\n }",
"public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}"
] |
[
"0.7421225",
"0.73284805",
"0.7203496",
"0.6831989",
"0.6831989",
"0.6831989",
"0.6831989",
"0.68235654",
"0.68093646",
"0.6746466",
"0.671592",
"0.67021936",
"0.6696834",
"0.6673144",
"0.6673144",
"0.6671646",
"0.6661692",
"0.6647172",
"0.6647172",
"0.6647172",
"0.6647172",
"0.6647172",
"0.6647172",
"0.6647172",
"0.6647172",
"0.6647172",
"0.6635954",
"0.66235995",
"0.66146433",
"0.66089803",
"0.659693",
"0.65909725",
"0.65779316",
"0.6523317",
"0.65163726",
"0.6502578",
"0.6499205",
"0.6499205",
"0.6486118",
"0.64855486",
"0.6482723",
"0.64795846",
"0.64727217",
"0.64612883",
"0.64521974",
"0.6450299",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.64305204",
"0.6422794",
"0.63465196",
"0.6343732",
"0.63312405",
"0.63183373",
"0.6316928",
"0.62880975",
"0.6287707",
"0.6272313",
"0.6265675",
"0.6265675",
"0.6265675",
"0.6265675",
"0.62580866",
"0.62580866",
"0.62580866",
"0.62580866",
"0.62580866",
"0.62580866",
"0.62580866",
"0.6244715",
"0.6231854",
"0.6208155",
"0.61982775",
"0.61982775",
"0.61979854",
"0.61922175",
"0.61858773",
"0.618052",
"0.6161398",
"0.6139005",
"0.61297965",
"0.6124801",
"0.6119302",
"0.609011",
"0.6083396",
"0.6081537",
"0.606334",
"0.6057421",
"0.60477066",
"0.6047071",
"0.6040129",
"0.6033232"
] |
0.70390505
|
3
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.email
|
public String getEmail() {
return email;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Column(length = 50, nullable = false)\n public String getEmail() {\n return email;\n }",
"public String getEmail(){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n SportPartnerDBContract.LoginDB.COLUMN_EMAIL_NAME\n };\n\n Cursor cursor = db.query(\n SportPartnerDBContract.LoginDB.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null\n );\n cursor.moveToLast();\n String email = cursor.getString(0);\n cursor.close();\n\n return email;\n }",
"public String getEmail()\r\n {\r\n return getAttribute(\"email\");\r\n }",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"public String getEmail() {\n return sp.getString(USER_EMAIL, null);\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 String getEmail() {\r\n return email;\r\n }",
"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() {\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{\n\t\treturn this.email;\n\t}",
"public java.lang.String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\n return this.email;\n }",
"public String getEmail() {\n return this.email;\n }",
"public String getEmail() {\n return this.email;\n }",
"public String getEmail() {\n return this.email;\n }",
"public String getEmail() {\n return email;\n }",
"public final String getEmail() {\n return email;\n }",
"public final String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail()\n\t{\n\t\treturn this._email;\n\t}",
"public String getEmail() {\n return userItem.getEmail();\n }",
"public String getEmail(){\n\t\treturn email;\n\t}",
"public String getEmail(){\n\t\treturn email;\n\t}",
"public String getEmailAddress() {\r\n return email;\r\n }",
"public String getEmail() {return email; }",
"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 String getEmail() {\n return _email;\n }",
"public String getEmployeeEmail(Statement stmt, String intEmployeeId){\n\t\t\tString empEmail = null;\n\t\t\tString query = \"select value from employeeAttributes where intEmployeeId =\"+ intEmployeeId + \" and attrId =17\"; \n\t\t\ttry{\n//\t\t\t\tSystem.out.println(\"Emp Email : \"+ query);\n\t\t\t\trs = stmt.executeQuery(query);\n\t\t\t\trs.next();\n\t\t\t\tempEmail = rs.getString(1);\n\t\t\t}catch(SQLException se){\n\t\t\t\tSystem.err.println(\"Error to find Employee Email\");\n\t\t\t}\n\t\t\treturn empEmail;\n\t\t}",
"public String getEmail()\r\n {\r\n return email;\r\n }",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\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\t\treturn email;\n\t}",
"public java.lang.String getEmail() {\n\t\treturn email;\n\t}",
"@Override\n public java.lang.String getEmail() {\n return _entityCustomer.getEmail();\n }",
"public String getEmailAccount() {\n return emailAccount;\n }"
] |
[
"0.65355587",
"0.65045357",
"0.6490532",
"0.6427202",
"0.6427202",
"0.6427202",
"0.6427202",
"0.6427202",
"0.6427202",
"0.6368684",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.62544924",
"0.6253773",
"0.6253773",
"0.62370956",
"0.62370956",
"0.62370956",
"0.62344193",
"0.6223075",
"0.6220618",
"0.6220618",
"0.6220618",
"0.6220618",
"0.62173873",
"0.6209233",
"0.62033355",
"0.6203183",
"0.6200175",
"0.61992747",
"0.61992747",
"0.61938995",
"0.618778",
"0.61793995",
"0.61793995",
"0.61793995",
"0.61793995",
"0.6179097",
"0.6168104",
"0.6162488",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.616137",
"0.61570466",
"0.6156085",
"0.61548173",
"0.61526704"
] |
0.0
|
-1
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.email
|
public void setEmail(String email) {
this.email = email == null ? null : email.trim();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void set_email(String Email)\n {\n email =Email;\n }",
"public void setEmail(String email)\r\n/* 36: */ {\r\n/* 37:50 */ this.email = email;\r\n/* 38: */ }",
"public void setEmail(String account, String email) throws SQLException, MessagingException {\n\t\tthis.userDao.setEmail(account,email);\r\n\t}",
"void setEmail(String email);",
"void setEmail(String email);",
"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 aEmail) {\n email = aEmail;\n }",
"@Override\n public void setEmail(java.lang.String email) {\n _entityCustomer.setEmail(email);\n }",
"@Override\n public void setEmail(String email) {\n\n }",
"private void setEmail(String email) {\n this.email = StringExtension.nullFilter(email);\n }",
"public void setEmail(String email);",
"public void setEmail( String email )\r\n {\r\n this.email = email;\r\n }",
"public void setEmail(String email){\r\n this.email = email;\r\n }",
"public void setEmail(String email) { this.email = email; }",
"public void setEmail_address(String email_address);",
"public void setEmail(final String e)\n {\n this.email = e;\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) {\r\n this.email = email;\r\n }",
"public void setEmail(String email)\n {\n this.email = email;\n }",
"public void setEmail(java.lang.String email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email)\n\t{\n\t\tthis._email=email;\n\t}",
"public void setEmail(java.lang.String value) {\n\t\tsetValue(org.jooq.example.jaxrs.db.routines.GenerateKey.EMAIL, value);\n\t}",
"public void setEmail( final String email )\n\t{\n\t\tthis.email = email;\n\t}",
"public void setEmailAddress(String email_address){\n this.email_address = email_address;\n }",
"public void setEmailAddress(String email) {\n this.email = email;\n }",
"public void setEmailId(String emailId);",
"public void setEmail(String email) {\n\t\tEMAIL = email;\n\t}",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmail(String email) {\n this.email = email;\n }",
"public void setEmailAddress(java.lang.String newEmailAddress);",
"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}",
"@Override\n\tpublic void setEmail(String email) {\n\t\tsuper.setEmail(email);\n\t}",
"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 final void setEmail(final String emailNew) {\n this.email = emailNew;\n }",
"public void setEmailAddress(EmailType newEmailAddress) {\n _emailAddress = newEmailAddress;\n }",
"public void setEmailAddress(String emailAddress);",
"public void setUserEmail(String userEmail) {\r\n this.userEmail = userEmail;\r\n }",
"public void setContact(String email){ contact = email; }",
"public void setEmailCom(String emailCom);",
"public void setEmail(String email) {\n\t\tEmail = email;\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 setEmail(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(EMAIL_PROP.get(), value);\n }",
"public void setEmail (java.lang.String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(java.lang.String param) {\n localEmailTracker = true;\n\n this.localEmail = param;\n }",
"public void setEmail(String string) {\n\t\tthis.email = string;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email == null ? null : email.trim();\n\t}",
"@Column(length = 50, nullable = false)\n public String getEmail() {\n return email;\n }",
"public void setEmail(String email) {\n Consistencia.consisteNaoNuloNaoVazio(email, \"email\");\n\n this.email = email;\n }",
"public void setEmail(String email){\n if(email == null){\n throw new IllegalArgumentException(\"E-mail de usuario igual a null\");\n }\n this.email = email;\n }",
"public void setEmail(String email) {\r\n this.email = email == null ? null : email.trim();\r\n }",
"public void setEmail(String email) {\r\n this.email = email == null ? null : email.trim();\r\n }",
"public void setEmail(String email) {\r\n this.email = email == null ? null : email.trim();\r\n }",
"public void setEmail(String email) {\r\n this.email = email == null ? null : email.trim();\r\n }",
"@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 setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(EMAIL_PROP.get(), value);\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(String email) {\n mEmailTv.setText(email);\n }"
] |
[
"0.6755468",
"0.6729223",
"0.66219807",
"0.651221",
"0.651221",
"0.6510218",
"0.6500809",
"0.6500809",
"0.6480279",
"0.6473463",
"0.6460423",
"0.6429929",
"0.641341",
"0.6406569",
"0.6370207",
"0.635057",
"0.6290287",
"0.6284852",
"0.62715316",
"0.62715316",
"0.62715316",
"0.62715316",
"0.62715316",
"0.62715316",
"0.62554437",
"0.623509",
"0.6213621",
"0.62095195",
"0.62043864",
"0.6194185",
"0.61914974",
"0.61854595",
"0.61853725",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.615917",
"0.6152021",
"0.6150867",
"0.6150867",
"0.6148685",
"0.6143526",
"0.61409163",
"0.61409163",
"0.61409163",
"0.61409163",
"0.6115501",
"0.6110976",
"0.61059177",
"0.6101686",
"0.60899746",
"0.6089222",
"0.6075638",
"0.60573775",
"0.6056885",
"0.60566324",
"0.6053954",
"0.60538155",
"0.604469",
"0.6044341",
"0.6043205",
"0.60429513",
"0.60422474",
"0.60422474",
"0.60422474",
"0.60422474",
"0.60399836",
"0.6032984",
"0.6032984",
"0.6032984",
"0.6032984",
"0.6032984",
"0.6032984",
"0.6032984",
"0.6032984",
"0.6028468",
"0.60247827",
"0.6009199"
] |
0.0
|
-1
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.parent_name
|
public String getParentName() {
return parentName;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }",
"public String getParentName() {\n return parentName;\n }",
"public String getParentName() {\n\t\treturn parentName;\n\t}",
"@JoinColumn(name = \"parentName\", referencedColumnName = \"login\")\n @ManyToOne\n public User getParentName() {\n return parentName;\n }",
"public String getParent() {\r\n return (String) getAttributeInternal(PARENT);\r\n }",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"public String getParentActivity() {\n return parentActivity;\n }",
"@Override\n\tpublic String findParentKeyColumnName()\n\t{\n\t\treturn null;\n\t}",
"public int getParent_id() {\n return this.parent_id;\n }",
"public IntColumn getParentId() {\n return delegate.getColumn(\"parent_id\", DelegatingIntColumn::new);\n }",
"public String getParentTitle() {\n return getProperty(Property.PARENT_TITLE);\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 SqlFromSubSelect getParent() {\n return parent;\n }",
"@Transient\n\tpublic String getParentTransactionId()\t{\n\t\tif (mParentTransactionIdLong > 0) \n\t\t\treturn Long.toString(mParentTransactionIdLong);\n\t\telse\n\t\t\treturn null;\n\t}",
"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 }",
"private String getParentDesc() {\n if (Objects.nonNull(parent)) {\n return String.valueOf(dataLayout.getLayout().getId());\n }\n\n // Level 0th.\n if (Objects.isNull(node.getParent())) {\n // From flat table.\n return \"flat table\";\n }\n // From data layout.\n return String.valueOf(node.getParent().getLayout().getId());\n }",
"java.lang.String getParent();",
"java.lang.String getParent();",
"public void setParentName(String name) { m_parentName = name; }",
"String getFullParentId();",
"public String getParent() {\r\n return parent;\r\n }",
"public String getParent() {\r\n return this.parent;\r\n }",
"@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();",
"public String getParent() {\n return _parent;\n }",
"@Override\n\t\tpublic String getParentPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"public String getParentLabel(){\n\t\treturn this.parentLabel;\n\t}",
"@Override\n public String dataLabel() {\n return STR_LBL_PARENT;\n }",
"public String getParentId() {\n return getParent() != null ? getParent().getId() : null;\n }",
"@DISPID(84)\r\n\t// = 0x54. The runtime will prefer the VTID if present\r\n\t@VTID(82)\r\n\tint parentID();",
"public Activity getParentActivity() {\r\n \treturn parentActivity;\r\n }",
"public String getParent() {\n return _theParent;\n }",
"public java.lang.Integer getParentId();",
"public String getParent() {\n return parent;\n }",
"public long getParentId()\n {\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 Long getParentId() {\n return parentId;\n }",
"@Override\npublic String findParentKeyColumnName()\n{\n\treturn null;\n}",
"public String getParentType() {\n return this.parentType;\n }",
"public Integer getParentid() {\n\t\treturn parentid;\n\t}",
"@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public String getParentProfile() {\n\t\treturn mParentProfile == null ? new String() : mParentProfile.getName();\n\t}",
"public int getParentId() {\r\n\t\treturn parentId;\r\n\t}",
"public String getParentCall() {\n return parentCall;\n }",
"public String getParentTitle() {\n return parentTitle;\n }",
"public Long getParentId() {\n return this.parentId;\n }",
"@Override\n\tpublic Parent selectParentByParentName(String parentName) {\n\t\treturn parentDao.selectParentByParentName(parentName);\n\t}",
"public int getParentID() {\n\t\treturn parentID;\n\t}",
"public java.lang.Long getParentId() {\n return parentId;\n }",
"public static String selectParent(ConnectionProvider connectionProvider, String cProjectId) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT (TO_CHAR(COALESCE(TO_CHAR(table1.Value), '')) || ' - ' || TO_CHAR(COALESCE(TO_CHAR(table1.Name), ''))) AS NAME FROM C_Project left join (select C_Project_ID, Value, Name from C_Project) table1 on (C_Project.C_Project_ID = table1.C_Project_ID) WHERE C_Project.C_Project_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, cProjectId);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }",
"public String getParent (JDCConnection oConn) throws SQLException {\r\n int iLevel;\r\n String sParentId;\r\n\r\n if (DebugFile.trace) {\r\n DebugFile.writeln(\"Begin Term.getParent([Connection])\");\r\n DebugFile.incIdent();\r\n }\r\n\r\n iLevel = level();\r\n\r\n Statement oStmt;\r\n ResultSet oRSet;\r\n\r\n if (1==iLevel) {\r\n sParentId = null;\r\n }\r\n else if (2==iLevel) {\r\n sParentId = getString(DB.gu_rootterm);\r\n }\r\n else {\r\n oStmt = oConn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\r\n\r\n if (DebugFile.trace)\r\n DebugFile.writeln(\"Statement.executeQuery(SELECT \" + DB.gu_term + \" FROM \" + DB.k_thesauri + \" WHERE \" + DB.id_term + String.valueOf(iLevel-2) + \"=\" + String.valueOf(getInt(DB.id_term + String.valueOf(iLevel-2))) + \" AND \" + DB.id_term + String.valueOf(iLevel-1) + \" IS NULL)\");\r\n\r\n oRSet = oStmt.executeQuery(\"SELECT \" + DB.gu_term + \" FROM \" + DB.k_thesauri + \" WHERE \" + DB.id_term + String.valueOf(iLevel-2) + \"=\" + String.valueOf(getInt(DB.id_term + String.valueOf(iLevel-2))) + \" AND \" + DB.id_term + String.valueOf(iLevel-1) + \" IS NULL\");\r\n\r\n if (oRSet.next())\r\n sParentId = oRSet.getString(1);\r\n else\r\n sParentId = null;\r\n\r\n oRSet.close();\r\n oStmt.close();\r\n\r\n if (null==sParentId)\r\n throw new SQLException (\"Parent key \" + String.valueOf(getInt(DB.id_term + String.valueOf(iLevel-2))) + \" not found\");\r\n }\r\n\r\n if (DebugFile.trace) {\r\n DebugFile.decIdent();\r\n DebugFile.writeln(\"End Term.getParent() : \" + sParentId);\r\n }\r\n\r\n return sParentId;\r\n }",
"public int getParentID() {\n\t\treturn _parentID;\n\t}",
"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 int getParentType() {\r\n return parent_type;\r\n }",
"public String getParent(String child) {\n \tif ( child.equals(TreeConstants.Object_.getString())) {\n \t\treturn TreeConstants.No_class.toString();\n \t}\n \tfor (String parent : adjacencyList.keySet()) {\n \t\tArrayList<String> listOfChildren = adjacencyList.get(parent);\n \t\tif (listOfChildren.indexOf(child) != -1) {\n \t\t\treturn parent;\n \t\t}\n \t}\n \t// This shouldn't happen\n \treturn null;\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 void setParentName(String parentName) {\n this.parentName = parentName == null ? null : parentName.trim();\n }",
"public String getParentNode()\r\n\t{\r\n\t\tif (roadBelongingType.equals(\"inbound\"))\r\n\t\t{\r\n\t\t\treturn endNode;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn startNode;\r\n\t\t}\r\n\t}",
"public long getParentCode() {\n return parentCode;\n }",
"public static String selectParentTrl(ConnectionProvider connectionProvider, String cProjectId) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT (TO_CHAR(COALESCE(TO_CHAR(table1.Value), '')) || ' - ' || TO_CHAR(COALESCE(TO_CHAR(table1.Name), ''))) AS NAME FROM C_Project left join (select C_Project_ID, Value, Name from C_Project) table1 on (C_Project.C_Project_ID = table1.C_Project_ID) WHERE C_Project.C_Project_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, cProjectId);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }",
"public Long getParentConversationId()\r\n\t{\r\n\t\treturn parentConversationId;\r\n\t}",
"public Integer getParentTid() {\r\n return parentTid;\r\n }",
"public String getHierarchyString()\n {\n if (this.hierarchy == null) {\n synchronized (this.parentTables) {\n if (this.hierarchy == null) {\n String utableName = this.getUntranslatedTableName();\n String parentHier = StringTools.join(this.getParentTables(),\"/\");\n this.hierarchy = (!StringTools.isBlank(parentHier)?(parentHier+\"/\"):\"\") + utableName;\n }\n }\n }\n return this.hierarchy; // never null\n }",
"public String getParentKey() {\n\n return this.parentKey;\n }",
"public String getParent(String anItem) { return null; }",
"public String getParent(String anItem) { return null; }",
"public String getParentParamCode() {\n return parentParamCode;\n }",
"@Override\n\tpublic List<Organization> getOrganizationParentName(int orgLevel,int locatedAtLevel)\n\t\t\tthrows Exception {\n\t\treturn organizationDAO.getOrganizationParentName(orgLevel,locatedAtLevel);\n\t\t\n\t}",
"public Integer getActivityName() {\n return activityName;\n }",
"@Override\r\n\tprotected String getParentPropertyName(Class beanClass) {\n\t\treturn null;\r\n\t}",
"@JsonProperty(\"parent\")\n @ApiModelProperty(value = \"The ID of the parent dialog node (if any).\")\n public String getParent() {\n return parent;\n }",
"public Optional<NamespaceId> getParentId() {\n return parentId;\n }",
"public java.lang.String getContainingParentLevel() {\n return containingParentLevel;\n }",
"@Override\r\n\tpublic Long getEventParentId() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Long getEventParentId() {\n\t\treturn null;\r\n\t}",
"public String getParentTypeCode() {\n return parentTypeCode;\n }",
"java.lang.String getParentId(int index);",
"public java.lang.String getContainingParentLevel() {\n return containingParentLevel;\n }",
"@VTID(7)\r\n void getParent();",
"@Override\n\tpublic Parent selectParentByParentUserName(String userName) {\n\t\treturn parentDao.selectParentByParentUserName(userName);\n\t}",
"public Integer getParentLocationId() {\n return parentLocationId;\n }",
"@XmlElement\n @Nullable\n public String getParentDocumentId() {\n return this.parentDocumentId;\n }",
"public XMLPath getParent() {\r\n return this.parent == null ? null : this.parent.get();\r\n }",
"public Integer getnParentid() {\n return nParentid;\n }",
"String getParentGroupId();",
"public int getParent();",
"public Long getParentAssignLogId() {\n return parentAssignLogId;\n }",
"public static String getAnonNameForMeFromParentContext(DIEAggregate diea) {\n\t\tDebugInfoEntry parent = diea.getHeadFragment().getParent();\n\t\tif (parent == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tDWARFProgram prog = diea.getProgram();\n\t\tint typeDefCount = 0;\n\t\tfor (DebugInfoEntry childDIE : parent.getChildren()) {\n\t\t\tDIEAggregate childDIEA = prog.getAggregate(childDIE);\n\t\t\tif (diea == childDIEA) {\n\t\t\t\treturn \"anon_\" + getContainerTypeName(childDIEA) + \"_\" + typeDefCount;\n\t\t\t}\n\t\t\tif (childDIEA.isNamedType()) {\n\t\t\t\ttypeDefCount++;\n\t\t\t}\n\t\t}\n\t\tthrow new RuntimeException(\"Could not find child in parent's list of children: child:\\n\" +\n\t\t\tdiea + \",\\nparent:\\n\" + parent);\n\t}"
] |
[
"0.6946407",
"0.6814638",
"0.6656071",
"0.6588752",
"0.65354973",
"0.6378667",
"0.62073433",
"0.62022024",
"0.6180662",
"0.61520237",
"0.6145063",
"0.6142156",
"0.61308616",
"0.60968584",
"0.60891294",
"0.60891294",
"0.60891294",
"0.60891294",
"0.60891294",
"0.60891294",
"0.60891294",
"0.60891294",
"0.60891294",
"0.60820735",
"0.6057092",
"0.6057092",
"0.6028342",
"0.60264844",
"0.59961647",
"0.5986316",
"0.5985177",
"0.59777004",
"0.5975254",
"0.5970275",
"0.5966982",
"0.5943774",
"0.5919109",
"0.5895559",
"0.5878263",
"0.5862037",
"0.58474404",
"0.5825895",
"0.5790044",
"0.5790044",
"0.5790044",
"0.5790044",
"0.5783752",
"0.5773828",
"0.5751636",
"0.5746283",
"0.5738637",
"0.5738637",
"0.5738637",
"0.57117295",
"0.56889105",
"0.5670976",
"0.56605244",
"0.56597674",
"0.5636051",
"0.56336445",
"0.5624609",
"0.5607348",
"0.56022114",
"0.5599957",
"0.55851305",
"0.5578132",
"0.557363",
"0.55727434",
"0.55553734",
"0.5534641",
"0.5526722",
"0.5517041",
"0.55155605",
"0.551351",
"0.55037206",
"0.54584783",
"0.5443787",
"0.5443787",
"0.54336536",
"0.5418602",
"0.53952354",
"0.53939855",
"0.5383644",
"0.5354355",
"0.5351108",
"0.533957",
"0.533957",
"0.53361225",
"0.5326564",
"0.5314267",
"0.5307905",
"0.5303163",
"0.5296769",
"0.5269225",
"0.5263168",
"0.5262398",
"0.52615935",
"0.5258233",
"0.5236872",
"0.5220284"
] |
0.67602915
|
2
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.parent_name
|
public void setParentName(String parentName) {
this.parentName = parentName == null ? null : parentName.trim();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setParentName(String name) { m_parentName = name; }",
"public void setParent(String parent) {\r\n this.parent = parent;\r\n }",
"public void setParent(String parent) {\n this.parent = parent;\n }",
"public void setParent(String parent) {\n _parent = parent;\n }",
"@JoinColumn(name = \"parentName\", referencedColumnName = \"login\")\n @ManyToOne\n public User getParentName() {\n return parentName;\n }",
"public void setParent(String aParent) {\n _theParent = aParent;\n }",
"public void setORM_Parent(orm.Nomenclature value) {\r\n\t\tthis.parent = value;\r\n\t}",
"public void setParent(String value) {\r\n setAttributeInternal(PARENT, value);\r\n }",
"public void setParentLabel(String parentLabel){\n\t\tthis.parentLabel = parentLabel;\n\t}",
"public String getParentName() {\n return parentName;\n }",
"void setParentDriverName(String value)\r\n throws Exception;",
"public String getParentName() {\n return parentName;\n }",
"public String getParentName() {\n\t\treturn parentName;\n\t}",
"public void setParentMenu(String name);",
"public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }",
"public void setParentCall(String parentCall) {\n this.parentCall = parentCall == null ? null : parentCall.trim();\n }",
"public void setParentComponent(String _componentName) {\r\n\t\tparentComponentName = _componentName;\r\n\t\tparentComponent = null; // Delay resolving the actual component until it is really needed\r\n\t}",
"private void createSetFKParent(){\n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n\n buffer.append(\" /**\\n\");\n buffer.append(\" * The <b><code>setFKParent</code></b> method is \");\n buffer.append(\"used to initializes Foreign\\n\");\n buffer.append(\" * Key columns within the HCYP_EVENTS table.\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @param depth how many levels to initialize.\\n\");\n buffer.append(\" * @return none\\n\");\n buffer.append(\" * @since JDK1.3\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public void setFKParent(int depth){\\n\");\n buffer.append(spacer);\n buffer.append(\" if(depth>0){\\n\");\n\n for(;enum.hasMoreElements();){\n String key=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(key);\n String fkName=object.getFkName();\n buffer.append(\" \"+fkName+\"_PARENT=get\"+fkName+\"_PARENT\");\n buffer.append(\"(depth-1);\\n\");\n }\n buffer.append(\" }\\n\");\n buffer.append(\" return;\\n\");\n buffer.append(\" }// setFKParent() ENDS\\n\");\n }",
"public void setParentKey(String parentKey) {\n\n this.parentKey = parentKey;\n }",
"public SqlFromSubSelect getParent() {\n return parent;\n }",
"@Override\n\t\tpublic String getParentPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic Parent selectParentByParentName(String parentName) {\n\t\treturn parentDao.selectParentByParentName(parentName);\n\t}",
"public void setParentId(String parentId) {\n this.parentId = parentId == null ? null : parentId.trim();\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId == null ? null : parentId.trim();\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId == null ? null : parentId.trim();\n }",
"public void setParent(MenuTree parent){\n this.parentMenuTree = parent;\n }",
"public void setParentType(String type) {\n this.parentType = type;\n }",
"public void setParent(int id);",
"public void setParentId(java.lang.Integer parentId);",
"@Override\n\tpublic String findParentKeyColumnName()\n\t{\n\t\treturn null;\n\t}",
"void setParent(TestResultTable.TreeNode p) {\n parent = p;\n }",
"public void setParentID(int parentID) {\n\t\tthis.parentID = parentID;\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 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 String getParentActivity() {\n return parentActivity;\n }",
"public void setParentCode(long value) {\n this.parentCode = value;\n }",
"void setParentInstId(String parentInstId);",
"public void setParent (com.redsaga.hibnatesample.step2.Board _parent) {\n\t\tthis._parent = _parent;\n\t}",
"public void setParentid(Integer parentid) {\n\t\tthis.parentid = parentid;\n\t}",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"@Override\n public String dataLabel() {\n return STR_LBL_PARENT;\n }",
"public int getParent_id() {\n return this.parent_id;\n }",
"public String getParent() {\r\n return (String) getAttributeInternal(PARENT);\r\n }",
"public void setParent(Node parent){\n this.parent = parent;\n }",
"public Activity getParentActivity() {\r\n \treturn parentActivity;\r\n }",
"public IntColumn getParentId() {\n return delegate.getColumn(\"parent_id\", DelegatingIntColumn::new);\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}",
"@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"public void setParentConversationId(Long parentConversationId)\r\n\t{\r\n\t\tthis.parentConversationId = parentConversationId;\r\n\t}",
"public void setParentAgentcy(String parentAgentcy) {\r\n this.parentAgentcy = parentAgentcy == null ? null : parentAgentcy.trim();\r\n }",
"public void setParentId(int parentId) {\r\n\t\tthis.parentId = parentId;\r\n\t}",
"@Override\n\tpublic Parent selectParentByParentUserName(String userName) {\n\t\treturn parentDao.selectParentByParentUserName(userName);\n\t}",
"protected void setParent(CodeItem codeItem) {\n this.parent = codeItem;\n }",
"public String getParent() {\r\n return parent;\r\n }",
"public void setParentTid(Integer parentTid) {\r\n this.parentTid = parentTid;\r\n }",
"public void setParentParamCode(String parentParamCode) {\n this.parentParamCode = parentParamCode;\n }",
"private void setParent(Node<T> parent) {\n this.parent = parent;\n }",
"@Override\n public void setParent(IStatement _statement) {\n\t this._parent = _statement;\n }",
"public void setParent(FileNode parent) {\r\n this.parent = parent;\r\n }",
"@Override\n\tpublic void setParent(WhereNode parent) {\n\t\tthis.parent = parent;\n\t}",
"public void setParentOne(int parent)\n\t{\n\t\tparentSetOne = parent;\n\t}",
"public void setParentId(Integer parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(Integer parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(Integer parentId) {\n this.parentId = parentId;\n }",
"public long getParentId()\n {\n return parentId;\n }",
"public void setParent(HtmlMap<T> parent)\n\t{\n\t\tthis.m_parent = parent;\n\t}",
"public void setParentKey(long value) {\n\t\tthis.parentKey = value;\n\t}",
"public void setParent(PafDimMember parent) {\r\n\t\tthis.parent = parent;\r\n\t}",
"public int getParentId() {\r\n\t\treturn parentId;\r\n\t}",
"public static void setParentEventId(ExtendedRecord er, ALATaxonRecord tr) {\n extractOptValue(er, DwcTerm.parentEventID).ifPresent(tr::setParentId);\n }",
"public void setParent(IAVLNode node) {\n\t\t\tthis.parent = node; // to be replaced by student code\n\t\t}",
"public void setParentCalendarPath(final String val) {\n parentCalendarPath = val;\n }",
"public String getParent() {\n return _parent;\n }",
"@Override\n\tpublic void setParent(ASTNode node) {\n\t\tthis.parent = node;\n\t\t\n\t}",
"public void setParentId(Long parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(Long parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(Long parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(Long parentId) {\n this.parentId = parentId;\n }",
"public String getParentTitle() {\n return getProperty(Property.PARENT_TITLE);\n }",
"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 Token setParent_id(int parent_id) {\n this.parent_id = parent_id;\n setParent_idIsSet(true);\n return this;\n }",
"void setParent(TreeNode<T> parent);",
"@VTID(7)\r\n void getParent();",
"@Override\npublic String findParentKeyColumnName()\n{\n\treturn null;\n}",
"public void setParent(Node parent) {\n this.parent = parent;\n }"
] |
[
"0.7034246",
"0.6399838",
"0.6302064",
"0.63003016",
"0.62556624",
"0.62368774",
"0.61796325",
"0.61638117",
"0.60124785",
"0.5972882",
"0.5920219",
"0.5893069",
"0.5790355",
"0.5784657",
"0.57670784",
"0.56793",
"0.5667624",
"0.56471795",
"0.5609804",
"0.5571891",
"0.5559901",
"0.55333054",
"0.55314416",
"0.55314416",
"0.55314416",
"0.5515339",
"0.5508655",
"0.54931927",
"0.54524237",
"0.5443466",
"0.54255706",
"0.5402929",
"0.53928494",
"0.5389636",
"0.5389636",
"0.5389636",
"0.5389636",
"0.5389636",
"0.5389636",
"0.5389636",
"0.5389636",
"0.5389636",
"0.53854907",
"0.53841287",
"0.53809685",
"0.53728944",
"0.53714025",
"0.5369765",
"0.5369765",
"0.5369765",
"0.5369765",
"0.5332795",
"0.53291965",
"0.53256977",
"0.52941436",
"0.52851826",
"0.5280973",
"0.5279669",
"0.5264096",
"0.52584",
"0.524921",
"0.5248133",
"0.52420616",
"0.5240514",
"0.52265674",
"0.5215339",
"0.52109766",
"0.5209924",
"0.52066183",
"0.5202684",
"0.51998115",
"0.51970285",
"0.51953584",
"0.5161205",
"0.5161205",
"0.5161205",
"0.5161018",
"0.5147426",
"0.51468164",
"0.5141445",
"0.5140486",
"0.5138024",
"0.5136973",
"0.51331896",
"0.5130929",
"0.51242435",
"0.51219",
"0.51219",
"0.51219",
"0.51219",
"0.511887",
"0.5115693",
"0.5115693",
"0.5115693",
"0.5115693",
"0.5113918",
"0.51116663",
"0.5110185",
"0.5105519",
"0.5092046"
] |
0.66117525
|
1
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.status
|
public String getStatus() {
return status;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }",
"public Integer getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus(){\r\n\t\treturn status;\r\n\t}",
"@ApiModelProperty(required = true, value = \"Indicates whether the schedule is currently active. The value SKIP is equivalent to ACTIVE except that the customer has requested the next normal occurrence to be skipped.\")\n @NotNull\n\n public StatusEnum getStatus() {\n return status;\n }",
"public String getStatus(){\n\t\t\n\t\treturn this.status;\n\t}",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String status() {\n return this.status;\n }",
"public String status() {\n return this.status;\n }",
"public int getStatus(){\r\n\t\treturn this.status;\r\n\t}",
"public Integer getStatus() {\r\n return status;\r\n }",
"public Integer getStatus() {\r\n return status;\r\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public Integer getStatus() {\n return status;\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public Long getStatus() {\n return this.Status;\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"@Enumerated(EnumType.STRING)\n@Column(name = \"STATUS\", length = EntityWithId.COLUMNLENGTH)\n \n @NotNull(message = \"{NotNull.gov.nih.nci.calims2.domain.administration.customerservice.BillingInformation.status}\")\n public gov.nih.nci.calims2.domain.administration.customerservice.enumeration.BillingInformationStatus getStatus() {\n return status;\n }",
"public String getStatus()\n {\n\n return status;\n }",
"public String getStatus() {\n return getProperty(Property.STATUS);\n }",
"public String getStatus () {\r\n return status;\r\n }",
"public String getStatus() {\n return _status;\n }",
"public String status() {\n return statusEnum().toString();\n }",
"public boolean getStatus(){\n return activestatus;\n }",
"public String getStatus() {\n return this.Status;\n }",
"public String getStatus() {\n return this.Status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"public int getStatus() {\n return status;\n }",
"@ApiModelProperty(value = \"Status of campaign or flow\")\r\n public String getStatus() {\r\n return status;\r\n }",
"public int getStatus()\n {\n return status;\n }",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}",
"public String getStatus() {\r\n\t\treturn status;\r\n\t}"
] |
[
"0.6646802",
"0.62968683",
"0.6286422",
"0.6286422",
"0.6286422",
"0.6269758",
"0.62691844",
"0.6266782",
"0.6251633",
"0.6251633",
"0.6251633",
"0.6251633",
"0.6251633",
"0.6251633",
"0.6251633",
"0.6243614",
"0.6243614",
"0.624001",
"0.623317",
"0.623317",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6225421",
"0.6200927",
"0.6200927",
"0.61971897",
"0.6185996",
"0.6185996",
"0.6185996",
"0.6185996",
"0.6185996",
"0.61857533",
"0.6182656",
"0.6182656",
"0.6182656",
"0.61707604",
"0.6169821",
"0.6168971",
"0.61546665",
"0.61371976",
"0.61313343",
"0.6129672",
"0.61281395",
"0.61281395",
"0.61101323",
"0.61101323",
"0.61101323",
"0.61101323",
"0.61101323",
"0.610369",
"0.6098903",
"0.6089728",
"0.6089728",
"0.6089728",
"0.6089728"
] |
0.61584747
|
81
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.status
|
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setStatus(boolean newstatus){activestatus = newstatus;}",
"public void setActiveStatus(Boolean active){ this.status = active; }",
"@IcalProperty(pindex = PropertyInfoIndex.STATUS,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true\n )\n public void setStatus(final String val) {\n status = val;\n }",
"public void setStatus(Integer status) {\r\n this.status = status;\r\n }",
"public void setStatus(Integer status) {\r\n this.status = status;\r\n }",
"public void setStatus(long status) {\r\n this.status = status;\r\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n this.status = status;\n }",
"public void setStatus(int v) \n {\n \n if (this.status != v)\n {\n this.status = v;\n setModified(true);\n }\n \n \n }",
"public void setStatus(String newStatus){\n\n //assigns the value of newStatus to the status field\n this.status = newStatus;\n }",
"public void setStatus(int status){\r\n\t\tthis.status=status;\r\n\t}",
"public void setEntitystatus(int entitystatus);",
"public void setStatus(STATUS status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\r\n\t this.status = status;\r\n\t }",
"public void setStatus(int status) {\n STATUS = status;\n }",
"public void setStatus(String status) {\r\n this.status = status;\r\n }",
"public void setStatus(String status) { this.status = status; }",
"public void setStatus(String status) {\r\n this.status = status;\r\n }",
"public void setStatus(String status) {\r\n this.status = status;\r\n }",
"public void setStatus(@NotNull Status status) {\n this.status = status;\n }",
"public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(Integer status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(int status) {\n this.status = status;\n }",
"public void setStatus(int status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setActiveStatus( String activeStatus ) {\n this.activeStatus = activeStatus;\n }",
"public void setActiveStatus( String activeStatus ) {\n this.activeStatus = activeStatus;\n }",
"public void setStatus(String status)\n {\n setValue(\"status\", status);\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n this.status = status;\n }",
"public void setStatus(Integer status)\n {\n data().put(_STATUS, status);\n }",
"public void setStatus(boolean stat) {\n\t\tstatus = stat;\n\t}",
"public void setStatus(EnumVar status) {\n this.status = status;\n }",
"public void setStatus(int status)\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(STATUS$12, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STATUS$12);\n }\n target.setIntValue(status);\n }\n }",
"@JsonProperty(\"status\")\n public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\r\n this.status = status;\r\n }",
"public void setStatus(String _status) {\n this._status = _status;\n }",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String status) {\r\n\t\tthis.status = status;\r\n\t}",
"public void setStatus(String stat)\n {\n status = stat;\n }",
"public void setStatus(final String attrStatus) {\r\n this.status = attrStatus;\r\n }",
"public void setStatus(String status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(String status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(String status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(String status) {\n\t\tthis.status = status;\n\t}",
"public void setStatus(Boolean status) {\n this.status = status;\n }",
"public void setStatus(Boolean status) {\n this.status = status;\n }",
"public void setStatus(Boolean status) {\n this.status = status;\n }",
"public void setStatus(StatusEnum status) {\n this.status = status;\n }",
"public void setStatus(TransactionStatus status) {\n this.status = status;\n }",
"@JsonSetter(\"status\")\r\n public void setStatus (String value) { \r\n this.status = value;\r\n }",
"@JsonSetter(\"status\")\r\n public void setStatus (String value) { \r\n this.status = value;\r\n }",
"void setStatus(TaskStatus status);",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(Status status) {\n this.status = status;\n }",
"public void setStatus(String status) {\n if (STATUS_ENUM.contains(status)) {\n this.status = status;\n } else {\n throw new IllegalArgumentException(\"Invalid Status value: \" + status);\n }\n }",
"public void setStatus(Status status)\n {\n this.status = status;\n }",
"public void setStatus(String Status) {\n this.Status = Status;\n }",
"public void setStatus(String Status) {\n this.Status = Status;\n }",
"public void setStatus(java.lang.String status) {\r\n this.status = status;\r\n }",
"public void setStatus(boolean status) {\n\tthis.status = status;\n }",
"public void setgetStatus()\r\n\t{\r\n\t\tthis.status = 'S';\r\n\t}",
"public void setStatus(final String status) {\n this.status = status;\n }",
"public void setStatus(int status)\r\n\t{\r\n\t\tthis.m_status = status;\r\n\t}"
] |
[
"0.6316909",
"0.61955863",
"0.6168718",
"0.6127986",
"0.6127986",
"0.60957676",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6075038",
"0.6071315",
"0.60674816",
"0.606274",
"0.60587275",
"0.60527927",
"0.60488105",
"0.6043312",
"0.60395545",
"0.6037914",
"0.6031071",
"0.6031071",
"0.59942377",
"0.5993484",
"0.5993484",
"0.59923786",
"0.59923786",
"0.59735507",
"0.59735507",
"0.5963123",
"0.5963123",
"0.5957121",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5955421",
"0.5953765",
"0.5945889",
"0.5934248",
"0.5930262",
"0.59243023",
"0.5920665",
"0.59107786",
"0.5909405",
"0.5909405",
"0.5909405",
"0.5909405",
"0.5909405",
"0.5885006",
"0.5876264",
"0.58569235",
"0.58569235",
"0.58569235",
"0.58569235",
"0.5856829",
"0.5856829",
"0.5856829",
"0.58482945",
"0.58479357",
"0.5844972",
"0.5844972",
"0.5840976",
"0.5839334",
"0.5839334",
"0.5839334",
"0.5839334",
"0.5833039",
"0.5828456",
"0.5821956",
"0.5821956",
"0.58162344",
"0.58147025",
"0.5807625",
"0.58055305",
"0.5799281"
] |
0.0
|
-1
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.parent_call
|
public String getParentCall() {
return parentCall;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setParentCall(String parentCall) {\n this.parentCall = parentCall == null ? null : parentCall.trim();\n }",
"public String getParentActivity() {\n return parentActivity;\n }",
"public int getParent_id() {\n return this.parent_id;\n }",
"public String getParentParamCode() {\n return parentParamCode;\n }",
"public Activity getParentActivity() {\r\n \treturn parentActivity;\r\n }",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();",
"public long getParentCode() {\n return parentCode;\n }",
"public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }",
"public SqlFromSubSelect getParent() {\n return parent;\n }",
"public Integer getParentid() {\n\t\treturn parentid;\n\t}",
"@DISPID(84)\r\n\t// = 0x54. The runtime will prefer the VTID if present\r\n\t@VTID(82)\r\n\tint parentID();",
"public String getParentName() {\n return parentName;\n }",
"public String getParentName() {\n return parentName;\n }",
"public String getParentName() {\n\t\treturn parentName;\n\t}",
"public String getParent() {\r\n return (String) getAttributeInternal(PARENT);\r\n }",
"public java.lang.Integer getParentId();",
"public IntColumn getParentId() {\n return delegate.getColumn(\"parent_id\", DelegatingIntColumn::new);\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 Long getParentConversationId()\r\n\t{\r\n\t\treturn parentConversationId;\r\n\t}",
"public long getParentId()\n {\n return parentId;\n }",
"@Transient\n\tpublic String getParentTransactionId()\t{\n\t\tif (mParentTransactionIdLong > 0) \n\t\t\treturn Long.toString(mParentTransactionIdLong);\n\t\telse\n\t\t\treturn null;\n\t}",
"public int getParentID() {\n\t\treturn parentID;\n\t}",
"public int getParentID() {\n\t\treturn _parentID;\n\t}",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public int getParentId() {\r\n\t\treturn parentId;\r\n\t}",
"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 String getParent() {\n return _parent;\n }",
"public String getParent() {\r\n return this.parent;\r\n }",
"@Override\r\n\tpublic Long getEventParentId() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Long getEventParentId() {\n\t\treturn null;\r\n\t}",
"private FunctionProfile getParent(Thread thread, Function function) {\n if (!function.isCallPathFunction()) {\n return null;\n }\n\n Function parentFunction = parentMap.get(function);\n if (parentFunction == null) {\n String functionName = function.getName();\n String parentName = functionName.substring(0, functionName.lastIndexOf(\"=>\"));\n parentFunction = cubeDataSource.getFunction(parentName);\n parentMap.put(function, parentFunction);\n }\n FunctionProfile parent = thread.getFunctionProfile(parentFunction);\n return parent;\n }",
"public String getParentId() {\n return getParent() != null ? getParent().getId() : null;\n }",
"public String getParentLabel(){\n\t\treturn this.parentLabel;\n\t}",
"public int getParentType() {\r\n return parent_type;\r\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 getParent() {\n return _theParent;\n }",
"@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }",
"public Integer getParentTid() {\r\n return parentTid;\r\n }",
"public Call getCurrentCall();",
"public String getParent() {\r\n return parent;\r\n }",
"public Long getParentId() {\n return this.parentId;\n }",
"public String getParentType() {\n return this.parentType;\n }",
"public Call getCall() {\n\treturn call;\n }",
"public Integer getParentLocationId() {\n return parentLocationId;\n }",
"@Override\n\t\tpublic String getParentPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"public int getParent();",
"public String getParentTypeCode() {\n return parentTypeCode;\n }",
"public String getParent() {\n return parent;\n }",
"public int getCallId() {\n return this.mCallId;\n }",
"public java.lang.Long getParentId() {\n return parentId;\n }",
"public String getParentProfile() {\n\t\treturn mParentProfile == null ? new String() : mParentProfile.getName();\n\t}",
"@Override\n\t\tpublic ParentInfo getParentInfo() {\n\t\t\treturn null;\n\t\t}",
"public Long getParentAssignLogId() {\n return parentAssignLogId;\n }",
"public Integer getnParentid() {\n return nParentid;\n }",
"public int getParentCounter(){\r\n\t\tint returning = parentCounter;\r\n\t\tparentCounter++;\r\n\t\treturn returning;\r\n\t}",
"@VTID(7)\r\n void getParent();",
"public int Parent() { return this.Parent; }",
"public String getParentNode()\r\n\t{\r\n\t\tif (roadBelongingType.equals(\"inbound\"))\r\n\t\t{\r\n\t\t\treturn endNode;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn startNode;\r\n\t\t}\r\n\t}",
"private String getParentDesc() {\n if (Objects.nonNull(parent)) {\n return String.valueOf(dataLayout.getLayout().getId());\n }\n\n // Level 0th.\n if (Objects.isNull(node.getParent())) {\n // From flat table.\n return \"flat table\";\n }\n // From data layout.\n return String.valueOf(node.getParent().getLayout().getId());\n }",
"public void setParentParamCode(String parentParamCode) {\n this.parentParamCode = parentParamCode;\n }",
"public String getCodeParent() {\n\t\treturn codeParent;\n\t}",
"@Override\n public String dataLabel() {\n return STR_LBL_PARENT;\n }",
"public GitCommit getParent() { return _par!=null? _par : (_par=getParentImpl()); }",
"public CompoundExpression getParent (){\n return _parent;\n }",
"public UUID getCallId() {\n return callId;\n }",
"public Long getParentHsCodeId() {\r\n return this.parentHsCodeId;\r\n }",
"java.lang.String getParent();",
"java.lang.String getParent();",
"@VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getParent();",
"public CompoundExpression getParent()\r\n\t\t{\r\n\t\t\treturn _parent;\r\n\t\t}",
"private int getParent(int parentIndex) {\n\t\tStatisticsLog statisticsLog = messageFlowLogs.get(parentIndex);\n\t\twhile (!statisticsLog.isOpenLog()) {\n\t\t\tstatisticsLog = messageFlowLogs.get(statisticsLog.getParentIndex());\n\t\t}\n\t\treturn statisticsLog.getCurrentIndex();\n\t}",
"public PlanNode getParent() {\n return parent;\n }",
"Id getLastDefinedParent() {\n for (Commit c : Lists.reverse(commits)) {\n if (c.isSaved()) {\n return c.id;\n }\n }\n\n throw new IllegalStateException(\"Unable to determine last defined parent.\");\n }",
"@JoinColumn(name = \"parentName\", referencedColumnName = \"login\")\n @ManyToOne\n public User getParentName() {\n return parentName;\n }",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();",
"@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();",
"@JsonProperty(\"parent\")\n @ApiModelProperty(value = \"The ID of the parent dialog node (if any).\")\n public String getParent() {\n return parent;\n }",
"public long getParentKey() {\n\t\treturn parentKey;\n\t}",
"public int getParentOne()\n\t{\n\t\treturn parentSetOne;\n\t}",
"public void setParentCode(long value) {\n this.parentCode = value;\n }",
"public CLIRequest getParent() {\n return parent;\n }",
"public Long getParentDeptId() {\n return parentDeptId;\n }"
] |
[
"0.65958506",
"0.656325",
"0.6303373",
"0.62827957",
"0.6271734",
"0.6147838",
"0.6124084",
"0.60999113",
"0.6087378",
"0.60762894",
"0.6054827",
"0.6028795",
"0.60228974",
"0.597843",
"0.59501064",
"0.5948523",
"0.5916625",
"0.5895551",
"0.58912486",
"0.58912486",
"0.58912486",
"0.58912486",
"0.58912486",
"0.58912486",
"0.58912486",
"0.58912486",
"0.58912486",
"0.58857054",
"0.58848083",
"0.5881777",
"0.5870507",
"0.5864432",
"0.5821762",
"0.5821762",
"0.5821762",
"0.57679486",
"0.5767631",
"0.5767631",
"0.5767631",
"0.5767631",
"0.57222646",
"0.5705339",
"0.5702872",
"0.5702872",
"0.5691206",
"0.56895274",
"0.56859773",
"0.5683218",
"0.5666763",
"0.5659261",
"0.5651585",
"0.5641648",
"0.5638923",
"0.56346273",
"0.5617393",
"0.5570505",
"0.55659336",
"0.55572116",
"0.5542216",
"0.55411345",
"0.5533861",
"0.55326116",
"0.5527499",
"0.5527249",
"0.5519178",
"0.5513471",
"0.5506537",
"0.5500391",
"0.5496327",
"0.5486381",
"0.5478587",
"0.5476614",
"0.5476524",
"0.5467482",
"0.5448936",
"0.5437125",
"0.53846574",
"0.5370731",
"0.537045",
"0.5365622",
"0.53597033",
"0.53597033",
"0.5355748",
"0.53408474",
"0.53385884",
"0.5331922",
"0.53314084",
"0.5318151",
"0.5316821",
"0.5316821",
"0.5316821",
"0.5316821",
"0.5291832",
"0.5291832",
"0.5282667",
"0.5280565",
"0.52729887",
"0.5266843",
"0.52654505",
"0.52492046"
] |
0.78576994
|
0
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.parent_call
|
public void setParentCall(String parentCall) {
this.parentCall = parentCall == null ? null : parentCall.trim();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getParentCall() {\n return parentCall;\n }",
"public void setParentCode(long value) {\n this.parentCode = value;\n }",
"public void setParentParamCode(String parentParamCode) {\n this.parentParamCode = parentParamCode;\n }",
"public void setParent(String parent) {\r\n this.parent = parent;\r\n }",
"public void setParent(String aParent) {\n _theParent = aParent;\n }",
"public void setParent(String parent) {\n _parent = parent;\n }",
"public void setParent(String parent) {\n this.parent = parent;\n }",
"public String getParentActivity() {\n return parentActivity;\n }",
"public void setParentid(Integer parentid) {\n\t\tthis.parentid = parentid;\n\t}",
"public Activity getParentActivity() {\r\n \treturn parentActivity;\r\n }",
"public SqlFromSubSelect getParent() {\n return parent;\n }",
"public void setORM_Parent(orm.Nomenclature value) {\r\n\t\tthis.parent = value;\r\n\t}",
"public void setParentOne(int parent)\n\t{\n\t\tparentSetOne = parent;\n\t}",
"public void setParentLabel(String parentLabel){\n\t\tthis.parentLabel = parentLabel;\n\t}",
"public void setParentID(int parentID) {\n\t\tthis.parentID = parentID;\n\t}",
"public void setParentName(String name) { m_parentName = name; }",
"public int getParent_id() {\n return this.parent_id;\n }",
"public void setParentConversationId(Long parentConversationId)\r\n\t{\r\n\t\tthis.parentConversationId = parentConversationId;\r\n\t}",
"public void setParentName(String parentName) {\n this.parentName = parentName == null ? null : parentName.trim();\n }",
"public void setParentKey(String parentKey) {\n\n this.parentKey = parentKey;\n }",
"public String getParentParamCode() {\n return parentParamCode;\n }",
"protected void setParent(CodeItem codeItem) {\n this.parent = codeItem;\n }",
"void setParentInstId(String parentInstId);",
"public void setParent(String value) {\r\n setAttributeInternal(PARENT, value);\r\n }",
"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 }",
"private void createSetFKParent(){\n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n\n buffer.append(\" /**\\n\");\n buffer.append(\" * The <b><code>setFKParent</code></b> method is \");\n buffer.append(\"used to initializes Foreign\\n\");\n buffer.append(\" * Key columns within the HCYP_EVENTS table.\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @param depth how many levels to initialize.\\n\");\n buffer.append(\" * @return none\\n\");\n buffer.append(\" * @since JDK1.3\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public void setFKParent(int depth){\\n\");\n buffer.append(spacer);\n buffer.append(\" if(depth>0){\\n\");\n\n for(;enum.hasMoreElements();){\n String key=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(key);\n String fkName=object.getFkName();\n buffer.append(\" \"+fkName+\"_PARENT=get\"+fkName+\"_PARENT\");\n buffer.append(\"(depth-1);\\n\");\n }\n buffer.append(\" }\\n\");\n buffer.append(\" return;\\n\");\n buffer.append(\" }// setFKParent() ENDS\\n\");\n }",
"public Integer getParentid() {\n\t\treturn parentid;\n\t}",
"public void setParent(State aParent);",
"public void setParent (com.redsaga.hibnatesample.step2.Board _parent) {\n\t\tthis._parent = _parent;\n\t}",
"public void setParentTid(Integer parentTid) {\r\n this.parentTid = parentTid;\r\n }",
"public void setParentKey(long value) {\n\t\tthis.parentKey = value;\n\t}",
"public static void setParentEventId(ExtendedRecord er, ALATaxonRecord tr) {\n extractOptValue(er, DwcTerm.parentEventID).ifPresent(tr::setParentId);\n }",
"public void setParent (CompoundExpression parent){\n _parent = parent;\n }",
"public void setParent(int id);",
"@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }",
"public long getParentId()\n {\n return parentId;\n }",
"public final void setIncomingRequest_RequestParent(com.mendix.systemwideinterfaces.core.IContext context, process.proxies.Request incomingrequest_requestparent)\r\n\t{\r\n\t\tif (incomingrequest_requestparent == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_RequestParent.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_RequestParent.toString(), incomingrequest_requestparent.getMendixObject().getId());\r\n\t}",
"@Override\n public void setParent(IStatement _statement) {\n\t this._parent = _statement;\n }",
"public void setParentTypeCode(String parentTypeCode) {\n this.parentTypeCode = parentTypeCode;\n }",
"void setParent(TestResultTable.TreeNode p) {\n parent = p;\n }",
"@VTID(7)\r\n void getParent();",
"public void setParentId(java.lang.Integer parentId);",
"public int getParentId() {\r\n\t\treturn parentId;\r\n\t}",
"public long getParentCode() {\n return parentCode;\n }",
"public final void setIncomingRequest_RequestParent(process.proxies.Request incomingrequest_requestparent)\r\n\t{\r\n\t\tsetIncomingRequest_RequestParent(getContext(), incomingrequest_requestparent);\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 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 void setParent (CompoundExpression parent)\r\n\t\t{\r\n\t\t\t_parent = parent;\r\n\t\t}",
"public ParseTreeNode visit(CallNode call) {\n return null;\n }",
"public int getParentID() {\n\t\treturn parentID;\n\t}",
"public IntColumn getParentId() {\n return delegate.getColumn(\"parent_id\", DelegatingIntColumn::new);\n }",
"public void setParentComponent(String _componentName) {\r\n\t\tparentComponentName = _componentName;\r\n\t\tparentComponent = null; // Delay resolving the actual component until it is really needed\r\n\t}",
"public Token setParent_id(int parent_id) {\n this.parent_id = parent_id;\n setParent_idIsSet(true);\n return this;\n }",
"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 void setParentHsCodeId(Long value) {\r\n this.parentHsCodeId = value;\r\n }",
"@Override\n\t\tpublic String getParentPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"public void setParent(PafDimMember parent) {\r\n\t\tthis.parent = parent;\r\n\t}",
"public void setParentSku(String parentSku) {\n this.parentSku = parentSku;\n }",
"public void setIsParent(Boolean isParent) {\n this.isParent = isParent;\n }",
"public void setParent(MenuTree parent){\n this.parentMenuTree = parent;\n }",
"public java.lang.Integer getParentId();",
"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 setParentId(Integer parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(Integer parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(Integer parentId) {\n this.parentId = parentId;\n }",
"@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();",
"public int getParentID() {\n\t\treturn _parentID;\n\t}",
"public void setParentType(String type) {\n this.parentType = type;\n }",
"public void setParentId(int parentId) {\r\n\t\tthis.parentId = parentId;\r\n\t}",
"public void setnParentid(Integer nParentid) {\n this.nParentid = nParentid;\n }",
"public void setParentCalendarPath(final String val) {\n parentCalendarPath = val;\n }",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"@Override\n\tpublic int updateParentInformation(Parent parent) {\n\t\treturn parentDao.updateParentInformation(parent);\n\t}",
"public void setCallTime(String callTime) {\n\t\tthis.callTime = callTime;\n\t}",
"public void setParent(Node parent){\n this.parent = parent;\n }",
"abstract public void setParent(Command cmd);",
"public String getParentName() {\n return parentName;\n }",
"public Long getParentAssignLogId() {\n return parentAssignLogId;\n }",
"public void setParent(Node parent) {\r\n//\t\tdepth = parent.depth + 1;\r\n\t\tthis.parent = parent;\r\n\t\t//return depth;\r\n\t\t\r\n\t}",
"@Override\n\tpublic void setParent(ASTNode node) {\n\t\tthis.parent = node;\n\t\t\n\t}",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"public void setParentId(String parentId) {\n this.parentId = parentId;\n }",
"private void setParent(Node<T> parent) {\n this.parent = parent;\n }",
"public int getParentType() {\r\n return parent_type;\r\n }",
"public void setCallId(String callId) throws ParseException,NullPointerException;"
] |
[
"0.6963653",
"0.6111691",
"0.6077282",
"0.6046915",
"0.597374",
"0.59645045",
"0.5959171",
"0.56865984",
"0.5682899",
"0.5656477",
"0.56472623",
"0.56284434",
"0.56273335",
"0.562563",
"0.5595407",
"0.5592841",
"0.55837166",
"0.5571515",
"0.55430627",
"0.5496019",
"0.54919666",
"0.5488638",
"0.5486604",
"0.54289156",
"0.54283655",
"0.541113",
"0.53911996",
"0.5381823",
"0.5365185",
"0.5358714",
"0.5352979",
"0.5348671",
"0.5348532",
"0.5343682",
"0.5335161",
"0.5325421",
"0.5324438",
"0.5323962",
"0.53190345",
"0.5309036",
"0.53015924",
"0.5300901",
"0.5281709",
"0.5266322",
"0.5265735",
"0.5263399",
"0.5263399",
"0.5263399",
"0.52600664",
"0.52600664",
"0.52600664",
"0.52600664",
"0.52600664",
"0.52600664",
"0.52600664",
"0.52600664",
"0.52600664",
"0.52491707",
"0.5247588",
"0.5245988",
"0.5239602",
"0.52257806",
"0.52169544",
"0.521372",
"0.521372",
"0.521372",
"0.521372",
"0.52067435",
"0.52021545",
"0.5200656",
"0.5197848",
"0.51919043",
"0.5182221",
"0.51818895",
"0.51731366",
"0.517242",
"0.517242",
"0.517242",
"0.5171265",
"0.51707065",
"0.5168729",
"0.51610684",
"0.51562047",
"0.5155409",
"0.5141071",
"0.51394194",
"0.51346135",
"0.51345503",
"0.50946146",
"0.5087601",
"0.50868815",
"0.5083823",
"0.50828165",
"0.507915",
"0.507915",
"0.507915",
"0.507915",
"0.507752",
"0.5073618",
"0.5072984"
] |
0.7573704
|
0
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.creat_time
|
public Date getCreatTime() {
return creatTime;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Long getCreatetime() {\n return createtime;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public String getCreatetime() {\r\n return createtime;\r\n }",
"public String getCreatetime() {\n return createtime;\n }",
"public String getCreatetime() {\n return createtime;\n }",
"public Timestamp getCreateTime() {\n return createTime;\n }",
"public java.sql.Timestamp getCreateTime () {\r\n\t\treturn createTime;\r\n\t}",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Long getCreateTime() {\n return createTime;\n }",
"String getCreated_at();",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Integer getCreateTime() {\r\n return createTime;\r\n }",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public long getCreateTime() {\n return this.createTime;\n }",
"public Integer getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Long getCreateDatetime() {\n return createDatetime;\n }",
"public Long getCreateDatetime() {\n return createDatetime;\n }",
"public String getCreateTime() {\r\n return createTime;\r\n }",
"public Long getCreateTime() {\n\t\treturn createTime;\n\t}",
"public java.lang.String getCreatetime () {\n\t\treturn createtime;\n\t}",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public String getCreateTime() {\n return createTime;\n }",
"public long getCreateTime() {\n return createTime_;\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getCreateTime() {\r\n return createTime;\r\n }",
"public Date getTimeCreate() {\n return timeCreate;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }",
"public Date getCreateTime() {\n return createTime;\n }"
] |
[
"0.69933015",
"0.68799937",
"0.68799937",
"0.684795",
"0.681001",
"0.681001",
"0.67431927",
"0.67360246",
"0.6732505",
"0.6732505",
"0.6732505",
"0.6715015",
"0.67076373",
"0.6705094",
"0.6705094",
"0.6705094",
"0.6705094",
"0.6705094",
"0.6705094",
"0.6705094",
"0.6705094",
"0.6680238",
"0.66621286",
"0.66621286",
"0.66559476",
"0.6644722",
"0.66224355",
"0.66134614",
"0.66134614",
"0.661057",
"0.661057",
"0.6607747",
"0.6586538",
"0.6581741",
"0.65662545",
"0.65662545",
"0.65662545",
"0.65662545",
"0.65662545",
"0.6562351",
"0.6554284",
"0.6554284",
"0.6554284",
"0.6554284",
"0.6554284",
"0.6554284",
"0.65536743",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666",
"0.65216666"
] |
0.0
|
-1
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.creat_time
|
public void setCreatTime(Date creatTime) {
this.creatTime = creatTime;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }",
"public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }",
"public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }",
"public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }",
"public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }",
"public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }",
"private void setCreatedTime(int value) {\n \n createdTime_ = value;\n }",
"private void setCreateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(CREATETIME_PROP.get(), value);\n }",
"public void setCreateTime (java.sql.Timestamp createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }",
"private void setCreateTime(long createTime) {\n this.createTime = createTime;\n }",
"public void setCreatetime(Long createtime) {\n this.createtime = createtime;\n }",
"public void setTimeCreate(Date timeCreate) {\n this.timeCreate = timeCreate;\n }",
"public Builder setCreateTime(long value) {\n\n createTime_ = value;\n onChanged();\n return this;\n }",
"public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }",
"public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }",
"public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Date getCreatetime() {\r\n return createtime;\r\n }",
"public Long getCreatetime() {\n return createtime;\n }",
"public void setCreateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(CREATETIME_PROP.get(), value);\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(createTime);\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public String getCreatetime() {\r\n return createtime;\r\n }",
"public void setCreateTime(Integer createTime) {\r\n this.createTime = createTime;\r\n }",
"public void setCreateTime (java.util.Date createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime (java.util.Date createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}",
"public void setCreateTime(java.util.Date createTime) {\r\n this.createTime = createTime;\r\n }",
"public Builder setCreatedTime(int value) {\n copyOnWrite();\n instance.setCreatedTime(value);\n return this;\n }",
"public void setCreatedTime(LocalDateTime value) {\n set(5, value);\n }",
"public void setCreateTime(Timestamp createTime) {\n this.createTime = createTime;\n }",
"public void setCreatetime (java.lang.String createtime) {\n\t\tthis.createtime = createtime;\n\t}",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }",
"public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }"
] |
[
"0.65927374",
"0.65927374",
"0.6443483",
"0.6433874",
"0.6433874",
"0.6433874",
"0.6398198",
"0.6375294",
"0.6355133",
"0.6345474",
"0.6345474",
"0.6345474",
"0.6345474",
"0.6345474",
"0.6345474",
"0.6345474",
"0.6345474",
"0.63071084",
"0.6264123",
"0.62581",
"0.6185303",
"0.61529106",
"0.61529106",
"0.6152493",
"0.6092729",
"0.6092729",
"0.60891825",
"0.60891825",
"0.60891825",
"0.60848486",
"0.60712564",
"0.60334855",
"0.60150707",
"0.60101366",
"0.60101366",
"0.60101366",
"0.60101366",
"0.60101366",
"0.60101366",
"0.60036236",
"0.60036236",
"0.60036236",
"0.60036236",
"0.60036236",
"0.60036236",
"0.60036236",
"0.60036236",
"0.59630185",
"0.5943024",
"0.59389913",
"0.59389913",
"0.59370416",
"0.59289914",
"0.59162056",
"0.5915942",
"0.5913028",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808",
"0.5908808"
] |
0.6582064
|
3
|
This method was generated by MyBatis Generator. This method returns the value of the database column t_activity.execute_time
|
public Date getExecuteTime() {
return executeTime;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public java.lang.Integer getExecutionTime() {\n return execution_time;\n }",
"public java.lang.Integer getExecutionTime() {\n return execution_time;\n }",
"public java.util.Date getLastExecuteTime()\n {\n return null;\n }",
"public long getExecutionTime() {\n return executionTime_;\n }",
"public long getExecutionTime() {\n return executionTime_;\n }",
"long getExecutionTime();",
"public String getActtime() {\r\n return acttime;\r\n }",
"public Timestamp getTransactionTime() {\r\n return (Timestamp) getAttributeInternal(TRANSACTIONTIME);\r\n }",
"public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }",
"public void setExecuteTime(Date executeTime) {\n this.executeTime = executeTime;\n }",
"public Date getOPER_TIME() {\n return OPER_TIME;\n }",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"public String getUpdatetime() {\n\t\treturn updatetime;\n\t}",
"DateTime getTransactionTime() {\n assertInTransaction();\n return TRANSACTION_INFO.get().transactionTime;\n }",
"public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}",
"public Date getLastExecutionTime() {\n\t\treturn lastExecutionTime;\n\t}",
"@DISPID(6)\r\n\t// = 0x6. The runtime will prefer the VTID if present\r\n\t@VTID(10)\r\n\tjava.util.Date executionDateTime();",
"public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }",
"public java.lang.String getActTime() {\r\n return localActTime;\r\n }",
"public int getMatchTime() {\n return getIntegerProperty(\"Time\");\n }",
"public Timestamp getStatusTime() {\n\t\treturn null;\n\t}",
"public String getInserttime() {\n\t\treturn inserttime;\n\t}",
"public Date getUpdate_time() {\n return update_time;\n }",
"public Date getUpdate_time() {\n return update_time;\n }",
"long getTimeBoltDBoltH();",
"@DISPID(15)\r\n\t// = 0xf. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.util.Date executionDateTime();",
"int getUpdateTriggerTime();",
"public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}",
"public Date getUpdatetime() {\r\n return updatetime;\r\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public Date getUpdatetime() {\n return updatetime;\n }",
"public int getTime() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getTime();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"time\"));\n }\n }",
"public long getTimeBoltDBoltH() {\n return timeBoltDBoltH_;\n }",
"public Time getTime() {\n return this.time; // returns the time associated with the task\n }",
"public String getOperTime() {\r\n\t\treturn operTime;\r\n\t}",
"public long getActivityTimestamp()\n {\n return activityTimestamp;\n }",
"public java.sql.Time getREQ_START_TIME()\n {\n \n return __REQ_START_TIME;\n }",
"public double getTime() {\n\t\treturn this.completedTime;\n\t}",
"public long getTimeBoltDBoltH() {\n return timeBoltDBoltH_;\n }",
"public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }",
"public Integer getUpdateTime() {\n return updateTime;\n }",
"public Date getAuditingTime() {\r\n return auditingTime;\r\n }",
"public Time getTime(int columnIndex) throws SQLException {\n\n try {\n debugCodeCall(\"getTime\", columnIndex);\n return get(columnIndex).getTime();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public Date getTimeUpdate() {\n return timeUpdate;\n }",
"public Date getOperatetime() {\r\n return operatetime;\r\n }",
"public final synchronized Time getTime(int parameterIndex) \n throws SQLException\n {\n return getCallableStatement().getTime(parameterIndex);\n }",
"public java.sql.Time getREQ_END_TIME()\n {\n \n return __REQ_END_TIME;\n }",
"public Date getOpTime() {\n return opTime;\n }",
"public Long getUpdateDatetime() {\n return updateDatetime;\n }",
"public Long getCreatetime() {\n return createtime;\n }",
"protected String getValueOfColumnLastUpdateTime(String databaseType) {\n String result = \"current_timestamp()\";\n if (databaseType.equalsIgnoreCase(\"DB2\")) {\n result = \"CURRENT TIMESTAMP\";\n } else if (databaseType.equalsIgnoreCase(\"ORACLE\")) {\n result = \"CURRENT_TIMESTAMP\";\n } else if (databaseType.equalsIgnoreCase(\"POSTGRES\") || databaseType.equalsIgnoreCase(\"POSTGRESQL\")) {\n result = \"CURRENT_TIMESTAMP\";\n }\n\n return result;\n }",
"public int getUserTime() {\n\t\treturn this.userTime;\n\t}",
"public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}",
"public Long getTime() {\n return time;\n }",
"public int getEventTime() {\n\t\treturn scheduledTime;\n\t}",
"@ApiModelProperty(value = \"修改时间\")\n public Date getRowUpdateTime() {\n return rowUpdateTime;\n }",
"public Date getUpdateTime()\n {\n return data.updateTime;\n }",
"public Timestamp getUpdateTime() {\n return updateTime;\n }",
"public Date getOperateTime() {\n return operateTime;\n }",
"public Date getOperateTime() {\n return operateTime;\n }",
"public Date getOperateTime() {\n return operateTime;\n }",
"public DateTime getUpdatedTimestamp() {\n\t\treturn getDateTime(\"sys_updated_on\");\n\t}",
"public Date getDateExecution() {\r\n return dateExecution;\r\n }",
"public Timestamp getStatementDate();",
"@ExecFunction(name = \"curtime\", argTypes = {}, returnType = \"DATETIME\")\n public static Expression curTime() {\n return DateTimeLiteral.fromJavaDateType(LocalDateTime.now(DateUtils.getTimeZone()));\n }",
"public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}",
"public java.sql.Time getARRIVAL_AT_LOC_TIME()\n {\n \n return __ARRIVAL_AT_LOC_TIME;\n }",
"public Integer getOnTime() {\n return onTime;\n }",
"public String getUpdateTime() {\r\n return updateTime;\r\n }",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"public Date getUpdateDatime() {\r\n return updateDatime;\r\n }",
"public Date getUpdateDatime() {\r\n return updateDatime;\r\n }",
"public int getTime() {\r\n return time;\r\n }",
"public java.sql.Time getTime(String attr) {\n return (java.sql.Time) super.get(attr);\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"public String getUpdateTime() {\n return updateTime;\n }",
"Timestamp nowDb() {\n return getJdbcOperations().queryForObject(getDialect().sqlSelectNow(), Timestamp.class);\n }",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"private long baseTime() {\n return Bytes.getUnsignedInt(row, tsdb.metrics.width());\n }",
"public Date getUpdateTimeDb() {\r\n\t\treturn updateTimeDb;\r\n\t}",
"int getEvalTm();",
"public String getTime() {\n return this.time;\n }",
"public Date getCompleteTime() {\n return completeTime;\n }",
"@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }",
"public long getExecutionTimeout() {\n \n // return it\n return executionTimeout;\n }",
"public long getScriptCompletedAt() {\n return (scriptHistory != null) ? scriptHistory.getCompletedAt() : DateTime.ERROR_TIME;\n }",
"public String getUpdateTime() {\n\t\t\treturn updateTime;\n\t\t}",
"public Date getInsertTime() {\r\n return insertTime;\r\n }",
"public Date time() {\n return _time;\n }",
"public Date time() {\n return _time;\n }",
"public java.lang.String getActRtnTime () {\n\t\treturn actRtnTime;\n\t}",
"public Timestamp getRecordStatusTime() {\n\t\treturn null;\n\t}",
"@ApiModelProperty(value = \"更新时间\")\n\tpublic Date getRowUpdateTime() {\n\t\treturn rowUpdateTime;\n\t}",
"public java.sql.Time getTime(int columnIndex) throws SQLException\n {\n return m_rs.getTime(columnIndex);\n }",
"public Date time() {\n return _time;\n }",
"public Date getOprTime() {\n return oprTime;\n }"
] |
[
"0.6555908",
"0.65509576",
"0.64888006",
"0.6437019",
"0.6413877",
"0.6239091",
"0.610971",
"0.59936035",
"0.5890289",
"0.58871573",
"0.5844516",
"0.581306",
"0.581306",
"0.58013",
"0.5800179",
"0.5788481",
"0.57782936",
"0.5734766",
"0.57326066",
"0.5685878",
"0.56855696",
"0.5673503",
"0.5672673",
"0.5672673",
"0.5667242",
"0.56663543",
"0.56558025",
"0.56511104",
"0.56418353",
"0.5633563",
"0.5633563",
"0.561624",
"0.561324",
"0.5603309",
"0.5595866",
"0.5595705",
"0.55952144",
"0.55911314",
"0.55825937",
"0.5570452",
"0.55650765",
"0.5545245",
"0.553434",
"0.5531762",
"0.5521847",
"0.55167913",
"0.5513507",
"0.5511787",
"0.5503367",
"0.55033135",
"0.549871",
"0.54954886",
"0.5490846",
"0.5489146",
"0.5477279",
"0.54757184",
"0.5475617",
"0.5475298",
"0.5475159",
"0.5475159",
"0.5475159",
"0.5475123",
"0.5466128",
"0.54581356",
"0.5456769",
"0.5454152",
"0.5453612",
"0.5452707",
"0.54515004",
"0.54501176",
"0.5443335",
"0.5443335",
"0.5436096",
"0.5425301",
"0.54243094",
"0.54243094",
"0.54243094",
"0.54243094",
"0.542427",
"0.5421775",
"0.5421775",
"0.5421775",
"0.5420862",
"0.5417936",
"0.5409444",
"0.54085517",
"0.53992784",
"0.5398589",
"0.5398579",
"0.53943604",
"0.5392647",
"0.5391968",
"0.53877693",
"0.53877693",
"0.53869295",
"0.5384301",
"0.5383862",
"0.5382612",
"0.537848",
"0.53760827"
] |
0.733259
|
0
|
This method was generated by MyBatis Generator. This method sets the value of the database column t_activity.execute_time
|
public void setExecuteTime(Date executeTime) {
this.executeTime = executeTime;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Date getExecuteTime() {\n return executeTime;\n }",
"public com.autodesk.ws.avro.Call.Builder setExecutionTime(java.lang.Integer value) {\n validate(fields()[7], value);\n this.execution_time = value;\n fieldSetFlags()[7] = true;\n return this; \n }",
"protected void setLastTimeExecute(long lastTimeExecute) {\n this.lastTimeExecute = lastTimeExecute;\n }",
"public void setExecutionTime(java.lang.Integer value) {\n this.execution_time = value;\n }",
"public void setActTime(java.lang.String param) {\r\n localActTimeTracker = param != null;\r\n\r\n this.localActTime = param;\r\n }",
"public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }",
"public java.util.Date getLastExecuteTime()\n {\n return null;\n }",
"public void setLastExecutionTime(Date lastExecutionTime) {\n\t\tthis.lastExecutionTime = lastExecutionTime;\n\t}",
"public void setTransactionTime(Timestamp value) {\r\n setAttributeInternal(TRANSACTIONTIME, value);\r\n }",
"void setLastUpdatedTime();",
"public void setActtime(String acttime) {\r\n this.acttime = acttime;\r\n }",
"public long getExecutionTime() {\n return executionTime_;\n }",
"public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}",
"public void setStatementDate (Timestamp StatementDate);",
"public void setOperTime(java.lang.String param) {\r\n localOperTimeTracker = param != null;\r\n\r\n this.localOperTime = param;\r\n }",
"public void setOperTime(java.lang.String param) {\r\n localOperTimeTracker = param != null;\r\n\r\n this.localOperTime = param;\r\n }",
"public java.lang.Integer getExecutionTime() {\n return execution_time;\n }",
"public void setActivationTime(java.util.Calendar param){\n localActivationTimeTracker = true;\n \n this.localActivationTime=param;\n \n\n }",
"public long getExecutionTime() {\n return executionTime_;\n }",
"public void setOPER_TIME(Date OPER_TIME) {\n this.OPER_TIME = OPER_TIME;\n }",
"public void setTime(){\n Date currentDate = new Date();\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putLong(\"WAIT_TIME\", currentDate.getTime() + 1800000); //30 min\n editor.commit();\n }",
"public java.lang.Integer getExecutionTime() {\n return execution_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void updateActualTime() {\n if (role.getText().equals(\"Member\")) {\n warning.setText(\"\");\n String orderNumber = orderNo.getText();\n int orderNum = 0;\n String realTime = actualTime.getText();\n int actlTime = 0;\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else if (actualTime.getText().isEmpty() || !Validation.isValidActualTime(realTime)) {\n warning.setText(invalidActualTime);\n } else {\n orderNum = Integer.parseInt(orderNo.getText());\n actlTime = Integer.parseInt(actualTime.getText());\n\n UserDAO userDAO = new UserDAO();\n User user = userDAO.getUser(logname.getText());\n PlanDAO planDAO = new PlanDAO();\n int userId = user.getId();\n Plan plan = new Plan(orderNum, actlTime);\n planDAO.editActualTime(plan, userId);\n updateTableFromDB(orderNumber);\n warning.setText(\"Actual time of order \" + orderNum + \" updated successfully \");\n }\n } else {\n warning.setText(\"Please use Update button\");\n }\n }",
"public String getActtime() {\r\n return acttime;\r\n }",
"public void setARRIVAL_AT_LOC_TIME(java.sql.Time value)\n {\n if ((__ARRIVAL_AT_LOC_TIME == null) != (value == null) || (value != null && ! value.equals(__ARRIVAL_AT_LOC_TIME)))\n {\n _isDirty = true;\n }\n __ARRIVAL_AT_LOC_TIME = value;\n }",
"public void setTime(Time time) {\n this.time = time; // assigns the time argument value to the time attribute\n }",
"public Builder setExecutionTime(long value) {\n bitField0_ |= 0x02000000;\n executionTime_ = value;\n onChanged();\n return this;\n }",
"private void setEditedTime(int value) {\n \n editedTime_ = value;\n }",
"@DISPID(6)\r\n\t// = 0x6. The runtime will prefer the VTID if present\r\n\t@VTID(10)\r\n\tjava.util.Date executionDateTime();",
"@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}",
"public void setREQ_START_TIME(java.sql.Time value)\n {\n if ((__REQ_START_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_START_TIME)))\n {\n _isDirty = true;\n }\n __REQ_START_TIME = value;\n }",
"public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }",
"private void setCreatedTime(int value) {\n \n createdTime_ = value;\n }",
"void setFetchedDate(long time);",
"public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }",
"public void setStatusTime(Timestamp statusTime) {\n\t\t\n\t}",
"private void setUpdateTriggerTime(int value) {\n bitField0_ |= 0x00000002;\n updateTriggerTime_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"public void setTime(){\r\n \r\n }",
"public void setTime(int parameterIndex, Time x) throws SQLException {\n currentPreparedStatement.setTime(parameterIndex, x);\n }",
"public void setEndTime(long value) {\r\n this.endTime = value;\r\n }",
"public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }",
"@DISPID(15)\r\n\t// = 0xf. The runtime will prefer the VTID if present\r\n\t@VTID(21)\r\n\tjava.util.Date executionDateTime();",
"public void updateTime(String columnName, Time x) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"updateTime(\" + quote(columnName) + \", x);\");\n }\n update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x));\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public void setTime( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), TIME, value);\r\n\t}",
"public static void setLastTimeRun(Context c) {\n\t\tsetLastTimeRun(c, new Date());\n\t}",
"void setTime(int index, Time value) throws SQLException;",
"public void setTime(int t){\r\n\t\t\t\ttime = t;\r\n\t\t\t}",
"private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }",
"public void setExecute(ValueExpression execute) {\n this.execute = execute;\n }",
"public void setStartTime(long value) {\r\n this.startTime = value;\r\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }",
"public void updateTime(String columnName, java.sql.Time x) throws SQLException\n {\n m_rs.updateTime(columnName, x);\n }",
"public static void setLastAction () {\n String sqlRetrieveDateTime = \"SELECT now() as date_time\";\n \n lastAction = LocalDateTime.now().minusYears(100);\n try (Connection conn = Database.getConnection();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sqlRetrieveDateTime)) {\n \n while (rs.next()) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n lastAction = LocalDateTime.parse(rs.getString(\"date_time\"), formatter); \n }\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (DateTimeParseException | NullPointerException dtpe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void setOperatetime(Date operatetime) {\r\n this.operatetime = operatetime;\r\n }",
"public void updateTime(int columnIndex, Time x) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"updateTime(\" + columnIndex + \", x);\");\n }\n update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x));\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public void setREQ_END_TIME(java.sql.Time value)\n {\n if ((__REQ_END_TIME == null) != (value == null) || (value != null && ! value.equals(__REQ_END_TIME)))\n {\n _isDirty = true;\n }\n __REQ_END_TIME = value;\n }",
"@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"private void setTime(long value) {\n \n time_ = value;\n }",
"void setReportTime(long time);",
"public void setTime(long time) {\r\n this.time = time;\r\n }",
"public void setTime(long time,int ento){ \r\n\t}",
"public void setTime(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), TIME, value);\r\n\t}",
"public void setStartTime(double startTime)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STARTTIME$22);\r\n }\r\n target.setDoubleValue(startTime);\r\n }\r\n }",
"public void setTime(long time) {\n this.time = time;\n }",
"public void setShRunAtTime(String v) {\n\n\t\tshRunAtTime = v;\n\n\t}",
"public void setTime(long time)\n {\n this.time = time;\n\n }",
"@Override\n public void setExecutionDelayTime(double delayTime)\n {\n this.executionDelayTime = delayTime;\n }",
"public void set(final long timeValue) {\n stamp = timeValue;\n }",
"public void updateTime(int columnIndex, java.sql.Time x) throws SQLException\n {\n m_rs.updateTime(columnIndex, x);\n }",
"public void setOpTime(Date opTime) {\n this.opTime = opTime;\n }",
"public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {\n currentPreparedStatement.setTime(parameterIndex, x, cal);\n\n }",
"public void setInsertTime(Date insertTime) {\r\n this.insertTime = insertTime;\r\n }",
"private void updateTestEnd() {\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tPreparedStatement pStat = dbConnection.prepareStatement(\"UPDATE runs set `id_status`=?,`time_end`=now() where `id_run` =?\");\r\n\t\t\tpStat.setInt(1, Conf.getTestStatus());\r\n\t\t\tpStat.setInt(2, Conf.getRunId());\r\n\t\t\tpStat.execute();\r\n\t\t\tpStat.close();\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}",
"void setRetrievedTime(long retrievedTime);",
"public void setTime( Date time ) {\n this.time = time;\n }",
"void setTime(final int time);",
"public void setTime(long time) {\r\n\t\tthis.time = time;\r\n\t}",
"@Command\n\t@NotifyChange(\"currentTime\")\n\tpublic void updateTime() {\n\t}",
"public static synchronized void setUpdatedTime(Context context,\n\t\t\tString tableName) throws SQLException, NullPointerException {\n\t\tQADatabaseHelper dbHelper = QADatabaseHelper.getInstance(context);\n\t\tSQLiteDatabase db = dbHelper.getWritableDatabase();\n\n\t\tFormatter formatter = new Formatter();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tformatter.format(\"%tc\", calendar);\n\t\tformatter.close();\n\t\tDate originalDate = calendar.getTime();\n\n\t\tString query = \"UPDATE \" + tableName + \" SET \" + COLUMN_NAME_UPDATED_AT\n\t\t\t\t+ \" = '\" + originalDate.toString() + \"'\";\n\n\t\tdb.execSQL(query);\n\t}",
"protected void setTimestamp(long time) \n {\n\t\tlTimestamp = time;\n\t}",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public Builder setSendTime(long value) {\n \n sendTime_ = value;\n onChanged();\n return this;\n }",
"public void setUpdateTime (java.sql.Timestamp updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}",
"@Override\n\tpublic void startExecuting() {\n\t\ttaskOwner.setAttackTarget(theTarget);\n\t\tfinal EntityLivingBase var1 = theEntityTameable.getOwner();\n\n\t\tif (var1 != null) {\n\t\t\tfield_142050_e = var1.getLastAttackerTime();\n\t\t}\n\n\t\tsuper.startExecuting();\n\t}",
"public void setCompleteTime(Date completeTime) {\n this.completeTime = completeTime;\n }",
"public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }",
"public void setTimeStamp(long t)\n\t{attributes.add(TIMESTAMP,String.valueOf(t));}",
"public void setOperateTime(Date operateTime) {\n this.operateTime = operateTime;\n }",
"public void setOperateTime(Date operateTime) {\n this.operateTime = operateTime;\n }"
] |
[
"0.6506474",
"0.62362754",
"0.6187394",
"0.6153297",
"0.6096183",
"0.5844879",
"0.5787092",
"0.56121045",
"0.5571581",
"0.55251426",
"0.5516139",
"0.5509209",
"0.5503152",
"0.5496417",
"0.5493956",
"0.5493956",
"0.54938346",
"0.5487301",
"0.548326",
"0.5465559",
"0.54471445",
"0.54222417",
"0.54130334",
"0.54130334",
"0.5391431",
"0.53519005",
"0.53340316",
"0.53020656",
"0.5268925",
"0.52659625",
"0.5242972",
"0.52425027",
"0.5240109",
"0.52007955",
"0.51979434",
"0.5186351",
"0.5185675",
"0.5176067",
"0.5172494",
"0.51670116",
"0.51670116",
"0.51670116",
"0.51658404",
"0.51650685",
"0.5162067",
"0.51604736",
"0.51603216",
"0.51565987",
"0.51476485",
"0.5131319",
"0.51272434",
"0.512596",
"0.5122406",
"0.5103168",
"0.51018435",
"0.51000035",
"0.51000035",
"0.5096831",
"0.5095909",
"0.5094578",
"0.50897753",
"0.50881433",
"0.5082956",
"0.50749725",
"0.50749725",
"0.50749725",
"0.50749725",
"0.5073541",
"0.5068816",
"0.5062045",
"0.5058278",
"0.50499207",
"0.504769",
"0.50456935",
"0.50409013",
"0.50333655",
"0.5030415",
"0.50288975",
"0.5027671",
"0.5022362",
"0.5017382",
"0.50131",
"0.5001325",
"0.499259",
"0.49906603",
"0.49892664",
"0.49884132",
"0.49858558",
"0.49795872",
"0.49756357",
"0.49756357",
"0.49756357",
"0.49746567",
"0.49666733",
"0.4964758",
"0.4964204",
"0.49559984",
"0.49511382",
"0.4950734",
"0.4950734"
] |
0.7265782
|
0
|
This method was generated by MyBatis Generator. This method corresponds to the database table t_activity
|
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", studentName=").append(studentName);
sb.append(", mobilePhone=").append(mobilePhone);
sb.append(", email=").append(email);
sb.append(", parentName=").append(parentName);
sb.append(", status=").append(status);
sb.append(", parentCall=").append(parentCall);
sb.append(", creatTime=").append(creatTime);
sb.append(", executeTime=").append(executeTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"UserActivityTable getUserActivityById(int id) {\n return daoInterface.getUserActivityById(id);\n\n }",
"public Vector listActivityTypeActivity() throws SQLException {\n Debug.print(\"Inside the getUserAndMemberId\");\n Vector vObj = new Vector();\n try {\n makeConnection();\n String slelctStr = \"SELECT A.activity_type_id,B.specification_id,B.specification_name, A.transaction_type_id FROM \"+ \n DBHelper.USEA_ACTIVITY_CATEGORY+\" A, \"+DBHelper.USEA_SPECIFICATION_MASTER+\" B \"+\n \" WHERE A.activity_type_id = B.activity_type_id AND A.activity_type_name = ? and B.active_status = ? order by B.specification_name\";\n PreparedStatement prepStmt = con.prepareStatement(slelctStr);\n prepStmt.setString(1, \"Activity\");\n prepStmt.setBoolean(2, true);\n \n rs = prepStmt.executeQuery();\n System.out.println(\"Inside the listActivityCategory \");\n while (rs.next()) {\n \n this.specificationId = rs.getString(2);\n this.specificationName = rs.getString(3);\n String txnTypeId = rs.getString(4);\n \n String [] activityList = {specificationId,specificationName,txnTypeId};\n vObj.add(activityList);\n }\n releaseConnection();\n }catch (SQLException e){\n e.printStackTrace();\n }finally {\n releaseConnection();\n }\n return vObj;\n }",
"protected List<Daily_activity_type> getDailyActivityType() {\n return super.emMain.createQuery(\"FROM Daily_activity_type WHERE dat_code <> 0 ORDER BY dat_order ASC\",\n Daily_activity_type.class).getResultList();\n }",
"CmsActivity selectByPrimaryKey(String activityId);",
"List<UserActivity> findAllUserActivityInDB() throws DataNotFoundException;",
"@Override\r\n\tpublic ArrayList<Activitat> getAll() {\r\n\t\tint i = 0;\r\n\t\tqueryString = \"SELECT * FROM \" + ACTIVITATTABLENAME;\r\n\t\tArrayList<Activitat> llistaActivitats = null;\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\tResultSet rs = s.executeQuery();\r\n\t\t\tllistaActivitats = new ArrayList<Activitat>();\r\n\t\t\tActivitatFactory af = af = new ActivitatFactory();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tCalendar cal = new GregorianCalendar();\r\n\t\t\t\tcal.setTime(rs.getDate(4));\r\n\t\t\t\t\r\n\t\t\t\tllistaActivitats.add(af.creaActivitat(rs.getString(2), rs.getString(3), cal, rs.getTimestamp(5),rs.getString(6),rs.getBoolean(7)));\r\n\t\t\r\n\t\t\t}\r\n\t\t} catch (SQLException 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 llistaActivitats;\r\n\t}",
"@SuppressWarnings({ \"all\", \"unchecked\", \"rawtypes\" })\npublic interface IXActivity extends VertxPojo, Serializable {\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.KEY</code>. 「key」- 操作行为主键\n */\n public IXActivity setKey(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.KEY</code>. 「key」- 操作行为主键\n */\n public String getKey();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.TYPE</code>. 「type」- 操作类型\n */\n public IXActivity setType(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.TYPE</code>. 「type」- 操作类型\n */\n public String getType();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.SERIAL</code>. 「serial」- 变更记录号\n */\n public IXActivity setSerial(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.SERIAL</code>. 「serial」- 变更记录号\n */\n public String getSerial();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.DESCRIPTION</code>. 「description」-\n * 操作描述信息\n */\n public IXActivity setDescription(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.DESCRIPTION</code>. 「description」-\n * 操作描述信息\n */\n public String getDescription();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.MODEL_ID</code>. 「modelId」-\n * 组所关联的模型identifier,用于描述\n */\n public IXActivity setModelId(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.MODEL_ID</code>. 「modelId」-\n * 组所关联的模型identifier,用于描述\n */\n public String getModelId();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.MODEL_KEY</code>. 「modelKey」-\n * 组所关联的模型记录ID,用于描述哪一个Model中的记录\n */\n public IXActivity setModelKey(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.MODEL_KEY</code>. 「modelKey」-\n * 组所关联的模型记录ID,用于描述哪一个Model中的记录\n */\n public String getModelKey();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.MODEL_CATEGORY</code>.\n * 「modelCategory」- 关联的category记录,只包含叶节点\n */\n public IXActivity setModelCategory(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.MODEL_CATEGORY</code>.\n * 「modelCategory」- 关联的category记录,只包含叶节点\n */\n public String getModelCategory();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.TASK_NAME</code>. 「taskName」- 任务名称\n */\n public IXActivity setTaskName(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.TASK_NAME</code>. 「taskName」- 任务名称\n */\n public String getTaskName();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.TASK_SERIAL</code>. 「taskSerial」-\n * 任务单号\n */\n public IXActivity setTaskSerial(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.TASK_SERIAL</code>. 「taskSerial」-\n * 任务单号\n */\n public String getTaskSerial();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.RECORD_OLD</code>. 「recordOld」-\n * 变更之前的数据(用于回滚)\n */\n public IXActivity setRecordOld(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.RECORD_OLD</code>. 「recordOld」-\n * 变更之前的数据(用于回滚)\n */\n public String getRecordOld();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.RECORD_NEW</code>. 「recordNew」-\n * 变更之后的数据(用于更新)\n */\n public IXActivity setRecordNew(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.RECORD_NEW</code>. 「recordNew」-\n * 变更之后的数据(用于更新)\n */\n public String getRecordNew();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.SIGMA</code>. 「sigma」- 用户组绑定的统一标识\n */\n public IXActivity setSigma(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.SIGMA</code>. 「sigma」- 用户组绑定的统一标识\n */\n public String getSigma();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.LANGUAGE</code>. 「language」- 使用的语言\n */\n public IXActivity setLanguage(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.LANGUAGE</code>. 「language」- 使用的语言\n */\n public String getLanguage();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.ACTIVE</code>. 「active」- 是否启用\n */\n public IXActivity setActive(Boolean value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.ACTIVE</code>. 「active」- 是否启用\n */\n public Boolean getActive();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.METADATA</code>. 「metadata」-\n * 附加配置数据\n */\n public IXActivity setMetadata(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.METADATA</code>. 「metadata」-\n * 附加配置数据\n */\n public String getMetadata();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.CREATED_AT</code>. 「createdAt」-\n * 创建时间\n */\n public IXActivity setCreatedAt(LocalDateTime value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.CREATED_AT</code>. 「createdAt」-\n * 创建时间\n */\n public LocalDateTime getCreatedAt();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.CREATED_BY</code>. 「createdBy」-\n * 创建人\n */\n public IXActivity setCreatedBy(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.CREATED_BY</code>. 「createdBy」-\n * 创建人\n */\n public String getCreatedBy();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.UPDATED_AT</code>. 「updatedAt」-\n * 更新时间\n */\n public IXActivity setUpdatedAt(LocalDateTime value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.UPDATED_AT</code>. 「updatedAt」-\n * 更新时间\n */\n public LocalDateTime getUpdatedAt();\n\n /**\n * Setter for <code>DB_ETERNAL.X_ACTIVITY.UPDATED_BY</code>. 「updatedBy」-\n * 更新人\n */\n public IXActivity setUpdatedBy(String value);\n\n /**\n * Getter for <code>DB_ETERNAL.X_ACTIVITY.UPDATED_BY</code>. 「updatedBy」-\n * 更新人\n */\n public String getUpdatedBy();\n\n // -------------------------------------------------------------------------\n // FROM and INTO\n // -------------------------------------------------------------------------\n\n /**\n * Load data from another generated Record/POJO implementing the common\n * interface IXActivity\n */\n public void from(IXActivity from);\n\n /**\n * Copy data into another generated Record/POJO implementing the common\n * interface IXActivity\n */\n public <E extends IXActivity> E into(E into);\n\n @Override\n public default IXActivity fromJson(io.vertx.core.json.JsonObject json) {\n setOrThrow(this::setKey,json::getString,\"KEY\",\"java.lang.String\");\n setOrThrow(this::setType,json::getString,\"TYPE\",\"java.lang.String\");\n setOrThrow(this::setSerial,json::getString,\"SERIAL\",\"java.lang.String\");\n setOrThrow(this::setDescription,json::getString,\"DESCRIPTION\",\"java.lang.String\");\n setOrThrow(this::setModelId,json::getString,\"MODEL_ID\",\"java.lang.String\");\n setOrThrow(this::setModelKey,json::getString,\"MODEL_KEY\",\"java.lang.String\");\n setOrThrow(this::setModelCategory,json::getString,\"MODEL_CATEGORY\",\"java.lang.String\");\n setOrThrow(this::setTaskName,json::getString,\"TASK_NAME\",\"java.lang.String\");\n setOrThrow(this::setTaskSerial,json::getString,\"TASK_SERIAL\",\"java.lang.String\");\n setOrThrow(this::setRecordOld,json::getString,\"RECORD_OLD\",\"java.lang.String\");\n setOrThrow(this::setRecordNew,json::getString,\"RECORD_NEW\",\"java.lang.String\");\n setOrThrow(this::setSigma,json::getString,\"SIGMA\",\"java.lang.String\");\n setOrThrow(this::setLanguage,json::getString,\"LANGUAGE\",\"java.lang.String\");\n setOrThrow(this::setActive,json::getBoolean,\"ACTIVE\",\"java.lang.Boolean\");\n setOrThrow(this::setMetadata,json::getString,\"METADATA\",\"java.lang.String\");\n setOrThrow(this::setCreatedAt,key -> {String s = json.getString(key); return s==null?null:java.time.LocalDateTime.parse(s);},\"CREATED_AT\",\"java.time.LocalDateTime\");\n setOrThrow(this::setCreatedBy,json::getString,\"CREATED_BY\",\"java.lang.String\");\n setOrThrow(this::setUpdatedAt,key -> {String s = json.getString(key); return s==null?null:java.time.LocalDateTime.parse(s);},\"UPDATED_AT\",\"java.time.LocalDateTime\");\n setOrThrow(this::setUpdatedBy,json::getString,\"UPDATED_BY\",\"java.lang.String\");\n return this;\n }\n\n\n @Override\n public default io.vertx.core.json.JsonObject toJson() {\n io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();\n json.put(\"KEY\",getKey());\n json.put(\"TYPE\",getType());\n json.put(\"SERIAL\",getSerial());\n json.put(\"DESCRIPTION\",getDescription());\n json.put(\"MODEL_ID\",getModelId());\n json.put(\"MODEL_KEY\",getModelKey());\n json.put(\"MODEL_CATEGORY\",getModelCategory());\n json.put(\"TASK_NAME\",getTaskName());\n json.put(\"TASK_SERIAL\",getTaskSerial());\n json.put(\"RECORD_OLD\",getRecordOld());\n json.put(\"RECORD_NEW\",getRecordNew());\n json.put(\"SIGMA\",getSigma());\n json.put(\"LANGUAGE\",getLanguage());\n json.put(\"ACTIVE\",getActive());\n json.put(\"METADATA\",getMetadata());\n json.put(\"CREATED_AT\",getCreatedAt()==null?null:getCreatedAt().toString());\n json.put(\"CREATED_BY\",getCreatedBy());\n json.put(\"UPDATED_AT\",getUpdatedAt()==null?null:getUpdatedAt().toString());\n json.put(\"UPDATED_BY\",getUpdatedBy());\n return json;\n }\n\n}",
"public interface UserShareActivityMapper {\n\n\n @Select(\"select count(1) from lh_share_activity_info WHERE random=#{random} AND share_user_tid=#{user_tid} AND extend_type=#{extend_type}\")\n public Integer checkSharelink(CreateShareLinkEvent event);\n\n @Insert(\"insert into lh_share_activity_info(share_user_tid,\" +\n \"random,extend_type,end_time,create_time) values(#{share_user_tid},#{random},#{extend_type},#{end_time},now())\")\n public void insertShareLink(UserShareInfo userShareInfo);\n}",
"Collection<ActivityType> getActivityTypes() throws DataAccessException;",
"public interface ActivityStatusMapper\n{\n\t//查询所有活动状态\n\tList<ActivityStatus> listAll();\n\t//修改活动状态\n\tpublic void updateStaus(ActivityStatus activityStatus);\n\n\t//根据期数查询状态\n\tpublic String queryByPeriod(String persion);\n\t//根据id查询\n\tpublic ActivityStatus queryById(String id);\n\n}",
"public void setActivityId(Integer activityId) {\n this.activityId = activityId;\n }",
"public interface ActivityEnrollmentMapper {\n @Select(\"select status from activity_enrollment where userId=${userId} and activityId=${actId} limit 1\")\n public Integer getEnrollStatus(@Param(\"userId\") Integer userId, @Param(\"actId\") Integer actId);\n\n}",
"public Auditadminbean(String name, String userid,String activity, String date) {\r\n this.name = new SimpleStringProperty(name);\r\n this.activity = new SimpleStringProperty(activity);\r\n this.role = new SimpleStringProperty(date);\r\n this.date= new SimpleStringProperty(date);\r\n this.Id = new SimpleStringProperty(userid);\r\n this.BookID = new SimpleStringProperty(userid);\r\n this.department=new SimpleStringProperty(userid);\r\n this.email=new SimpleStringProperty(\"\");\r\n }",
"public interface ActivityFeedDAO extends ActivitiesDAO\n{\n public static final int MAX_LEN_USER_ID = 255; // needs to match schema: feed_user_id, post_user_id\n public static final int MAX_LEN_SITE_ID = 255; // needs to match schema: site_network\n public static final int MAX_LEN_ACTIVITY_TYPE = 255; // needs to match schema: activity_type\n public static final int MAX_LEN_ACTIVITY_SUMMARY = 4000; // needs to match schema: activity_summary\n public static final int MAX_LEN_ACTIVITY_FORMAT = 255; // needs to match schema: activity_format\n public static final int MAX_LEN_APP_TOOL_ID = 36; // needs to match schema: app_tool\n \n public long insertFeedEntry(ActivityFeedEntity activityFeed) throws SQLException;\n \n public int deleteFeedEntries(Date keepDate) throws SQLException;\n \n public int deleteUserFeedEntries(String feedUserId, String format, Date keepDate) throws SQLException;\n \n public int deleteSiteFeedEntries(String siteId, String format, Date keepDate) throws SQLException;\n \n public List<ActivityFeedEntity> selectFeedsToClean(int maxFeedSize) throws SQLException;\n \n public List<ActivityFeedEntity> selectUserFeedEntries(String feedUserId, String format, String siteId, boolean excludeThisUser, boolean excludeOtherUsers) throws SQLException;\n \n public List<ActivityFeedEntity> selectSiteFeedEntries(String siteUserId, String format) throws SQLException;\n}",
"public final void mT__69() throws RecognitionException {\n try {\n int _type = T__69;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalIotLuaXtext.g:69:7: ( 'activity' )\n // InternalIotLuaXtext.g:69:9: 'activity'\n {\n match(\"activity\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private Resource wasGeneratedBy(Resource entity, Resource activity) {\n return createStatement(entity.getURI(),\n ProvOntology.getWasGeneratedByStartingPointPropertyFullURI(), activity.getURI());\n }",
"@Select({\n \"select\",\n \"JNLNO, TRANDATE, ACCOUNTDATE, CHECKTYPE, STATUS, DONETIME, FILENAME\",\n \"from B_UMB_CHECKING_LOG\",\n \"where JNLNO = #{jnlno,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"JNLNO\", property=\"jnlno\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"TRANDATE\", property=\"trandate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"ACCOUNTDATE\", property=\"accountdate\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CHECKTYPE\", property=\"checktype\", jdbcType=JdbcType.CHAR),\n @Result(column=\"STATUS\", property=\"status\", jdbcType=JdbcType.CHAR),\n @Result(column=\"DONETIME\", property=\"donetime\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"FILENAME\", property=\"filename\", jdbcType=JdbcType.VARCHAR)\n })\n BUMBCheckingLog selectByPrimaryKey(BUMBCheckingLogKey key);",
"public void setActivityId(Integer activityId) {\n\t\tthis.activityId = activityId;\n\t}",
"public interface BugsActivityDAO {\n\n @Insert(\"insert into firefox_bugs_activity \" +\n \"(`bugId`,`who`,`when`,`what`,`removed`,`added`,`crawledTime`) \" +\n \"values (#{bugId},#{who},#{when},#{what},#{removed},#{added},#{crawledTime})\")\n public int add(BugsActivity fireFoxBugsActivity);\n\n @Insert(\"insert into firefox_bugs_activity_html (`bugId`,`html`) \" +\"values (#{bugId},#{html})\")\n public int addHtml(BugsActivity fireFoxBugsActivity);\n}",
"public List<Activity> getAllActivities();",
"List<UserActivityTable> getListUserActivatesOfSpecificPoint(String platform) {\n return daoInterface.getListUserActivatesOfSpecificPoint(platform);\n\n }",
"public void insertActivityDetails(Activity ac){\n //Get the Data Repository in write mode\n SQLiteDatabase db = this.getWritableDatabase();\n //Create a new map of values, where column names are the keys\n ContentValues cValues = new ContentValues();\n cValues.put(KEY_ACT_NO, ac.getAct_no());\n cValues.put(KEY_USERNAME, ac.getUsername());\n cValues.put(KEY_ACT_NAME, ac.getAct_name());\n cValues.put(KEY_TIME_SET, ac.getTime_set());\n cValues.put(KEY_ACT_DESC, ac.getAct_desc());\n cValues.put(KEY_ACT_STATE, ac.isAct_complete());\n // Insert the new row, returning the primary key value of the new row\n long newRowId = db.insert(TABLE_Activitys,null, cValues);\n db.close();\n }",
"public LearningResultHasActivity[] findWhereActivityIdActivityEquals(int activityIdActivity) throws LearningResultHasActivityDaoException;",
"public interface ActivityDAO extends BaseDAO<Activity>\n{\n Activity findOne(UUID uuid);\n\n List<Activity> findBySalesMethodOrderByIndexAsc(SalesMethod salesMethod);\n\n List<Activity> findBySalesMethod(SalesMethod salesMethod);\n\n List<Activity> findByUuidIn(Collection<UUID> idList);\n\n List<Activity> findBySalesMethodAndNameCaseInsensitive(SalesMethod salesMethod, String name);\n\n void removeBySalesMethodIn(List<SalesMethod> salesMethodList);\n\n List<Activity> findByActiveSalesMethodIn(List<SalesMethod> salesMethodList);\n}",
"public interface Activity extends EJBObject {\r\n public void setLinkCondition(String linkCondition, Vector binds) throws RemoteException;\r\n\r\n public void setData(ActivityDao attrs) throws RemoteException;\r\n\r\n public ActivityDao getData() throws RemoteException;\r\n\r\n public void insert(ActivityDao attrs) throws RemoteException, DupKeyException, UserException;\r\n\r\n public void update(ActivityDao attrs) throws RemoteException, UserException;\r\n\r\n public void delete(Vector<String> actlistID) throws RemoteException, ConstraintViolatedException, UserException;\r\n\r\n public void findByPrimaryKey(ActivityDao attrs) throws RemoteException, RowNotFoundException, UserException;\r\n\r\n public void findNext(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public void findPrev(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public Collection listAll() throws RemoteException, RowNotFoundException, UserException;\r\n\r\n public Collection find(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public Collection findExact(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public String[] lookupDesc(Object[] pkKeys) throws RemoteException, RowNotFoundException;\r\n\r\n public Collection<ActivityDao> getActivityTree(String startActivityNode) throws RemoteException, RowNotFoundException, UserException;\r\n}",
"public int getC_Activity_ID();",
"public void setActivityId(String activityId) {\n this.activityId = activityId;\n }",
"JzAct selectByPrimaryKey(Integer actId);",
"public abstract String getTipoByAct(Actividad activity) throws PersistenceException, ClassNotFoundException;",
"@Insert({\r\n \"insert into OP.T_CM_SET_CHANGE_SITE_STATE (ORG_CD, WORK_SEQ, \",\r\n \"CHANGE_NO, BRANCH_CD, \",\r\n \"SITE_CD, SITE_NM, \",\r\n \"DATA_TYPE, CLOSE_DATE, \",\r\n \"REOPEN_TYPE, REOPEN_DATE, \",\r\n \"SET_TYPE, OPER_START_TIME, \",\r\n \"OPER_END_TIME, CHECK_YN, \",\r\n \"APPLY_DATE, INSERT_UID, \",\r\n \"INSERT_DATE, UPDATE_UID, \",\r\n \"UPDATE_DATE)\",\r\n \"values (#{orgCd,jdbcType=VARCHAR}, #{workSeq,jdbcType=VARCHAR}, \",\r\n \"#{changeNo,jdbcType=DECIMAL}, #{branchCd,jdbcType=VARCHAR}, \",\r\n \"#{siteCd,jdbcType=VARCHAR}, #{siteNm,jdbcType=VARCHAR}, \",\r\n \"#{dataType,jdbcType=VARCHAR}, #{closeDate,jdbcType=VARCHAR}, \",\r\n \"#{reopenType,jdbcType=VARCHAR}, #{reopenDate,jdbcType=VARCHAR}, \",\r\n \"#{setType,jdbcType=VARCHAR}, #{operStartTime,jdbcType=VARCHAR}, \",\r\n \"#{operEndTime,jdbcType=VARCHAR}, #{checkYn,jdbcType=VARCHAR}, \",\r\n \"#{applyDate,jdbcType=VARCHAR}, #{insertUid,jdbcType=VARCHAR}, \",\r\n \"#{insertDate,jdbcType=TIMESTAMP}, #{updateUid,jdbcType=VARCHAR}, \",\r\n \"#{updateDate,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(TCmSetChangeSiteState record);",
"@Override\n public void addNewActivity(Activity activity) throws SQLException {\n\n String sql = \"INSERT INTO ACTIVITY (routeId, userId, point, duration, distance) VALUES (?, ?, ?, ?, ?)\";\n\n try (Connection connection = dataSource.getConnection()) {\n statement = connection.prepareStatement(sql);\n if (activity.getRouteId() != -1 ) {\n statement.setInt(1, activity.getRouteId());\n }\n else {\n statement.setNull(1, Types.INTEGER);\n }\n statement.setInt(2, activity.getUserId());\n statement.setInt(3, activity.getPoint());\n statement.setLong(4, activity.getDuration());\n statement.setFloat(5, activity.getDistance());\n statement.executeUpdate();\n } catch (SQLException exception) {\n throw exception;\n } finally {\n close(statement, null);\n }\n insertSegments(activity);\n }",
"TestActivityEntity selectByPrimaryKey(Integer id);",
"public Resource generated(Resource activity, Resource entity) {\n wasGeneratedBy(entity, activity);\n return createStatement(activity.getURI(),\n ProvOntology.getGeneratedExpandedPropertyFullURI(), entity.getURI());\n }",
"public String getACTIVITY_ID() {\n return ACTIVITY_ID;\n }",
"public interface ActivityDao extends GenericDao<Activity> {\n /**\n * Find pageable activities in database\n *\n * @param page page of activities list\n * @param size size of page of activities list\n * @return pageable list of activities\n */\n List<Activity> findAllPageable(int page, int size);\n\n /**\n * @return number of activity records\n */\n long getNumberOfRecords();\n}",
"public Resource startedAtTime(Resource activity, Date date) {\n Statement atTime = model.createStatement(activity,\n model.createProperty(ProvOntology.getStartedAtTimeStartingPointPropertyFullURI()),\n getDateLiteral(date));\n model.add(atTime);\n return activity;\n }",
"@Override\r\n\tpublic Map<String, Integer> getActivityStatistic() {\n\t\tMap<String, Integer> result = new HashMap<String, Integer>();\r\n\t\tList<Activity> activities = activityDao.getAllActivities();\r\n\t\tfor(Activity activity:activities){\r\n\t\t\tresult.put(activity.getName(), activityRecordDao.getAttendCountById(activity.getId()));\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public void setActivityType(ActivityType activityType) {\n this.activityType = activityType;\n }",
"public void setActivityName(Integer activityName) {\n this.activityName = activityName;\n }",
"void storeActivityType(ActivityType activityType) throws DataAccessException;",
"public Vector listActivityCategory() throws SQLException {\n Debug.print(\"Inside the getUserAndMemberId\");\n Vector vObj = new Vector();\n try {\n makeConnection();\n String slelctStr = \"SELECT activity_type_id,activity_type_name FROM \"+ DBHelper.USEA_ACTIVITY_CATEGORY;\n PreparedStatement prepStmt = con.prepareStatement(slelctStr);\n rs = prepStmt.executeQuery();\n System.out.println(\"Inside the listActivityCategory \");\n while (rs.next()) {\n this.activityTypeId = rs.getString(1);\n this.activityTypeName = rs.getString(2);\n String [] activityList = {activityTypeId,activityTypeName};\n vObj.add(activityList);\n }\n releaseConnection();\n }catch (SQLException e){\n e.printStackTrace();\n }finally {\n releaseConnection();\n }\n return vObj;\n }",
"public Integer getActivityId() {\n\t\treturn activityId;\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Activity [activityName=\" + activityName + \", activityDescri=\" + activityDescri + \"]\";\r\n\t}",
"public Integer getActivityId() {\n return activityId;\n }",
"public TableInfo getTableInfoParticipantVisit()\n {\n return getSchema().getTable(\"ParticipantVisit\");\n }",
"@Override\n\t\t\tvoid saveInDb(CustomApplicationInfo cai) {\n\t\t\t\tactivitySaveInDb(cai);\n\t\t\t\t\n\t\t\t}",
"public Integer getActivitytypeid() {\n return activitytypeid;\n }",
"public interface ActivityReservationDao {\n List<ActivityReservationBo> query(Map<String,Object> map);\n int querycount();\n int queryListcount(Map<String,Object> map);\n void updatestatus(ActivityReservationBo activityReservationBo);\n ActivityReservationBo queryById(Integer id);\n\n}",
"public interface UserActivityDao {\n\n\n /**\n * Finds all userActivity in DB\n * @return List of all activities\n * @throws DataNotFoundException if connection is down, broken or unable to retrieve information for certain reasons\n */\n List<UserActivity> findAllUserActivityInDB() throws DataNotFoundException;\n\n /**\n * Finds UserActivity by userId\n * @param userId - UserActivity userId\n * @return UserActivity by userId\n * @throws DataNotFoundException if connection is down, broken or unable to retrieve information for certain reasons\n */\n UserActivity findUserActivityByUserId(int userId) throws DataNotFoundException;\n /**\n * Finds UserActivity by activityId\n * @param activityId - UserActivity activityId\n * @return UserActivity by activityId\n * @throws DataNotFoundException if connection is down, broken or unable to retrieve information for certain reasons\n */\n UserActivity findUserActivityByActivityId(int activityId) throws DataNotFoundException;\n /**\n * Adds new userActivity to DB\n * @param userActivity - userActivity to add in DB\n * @return true if operation success and false if fails\n */\n boolean addUserActivityToDB(UserActivity userActivity);\n\n /**\n * Updats userActivity in DB\n * @param userActivity - userActivity to update in DB\n * @return true if operation success and false if fails\n */\n boolean updateUserActivityInDB(UserActivity userActivity);\n\n /**\n * Deletes userActivity from DB\n * @param userActivity - UserActivity to delete from DB\n * @return true if operation success and false if fails\n */\n boolean deleteUserActivityFromDB(UserActivity userActivity);\n}",
"@Override\n\tpublic List<ActivityAbstractInfo> list(ActivityVo record) {\n\t\tActivityAbstractInfoExample example = new ActivityAbstractInfoExample();\n\t\tCriteria criteria = example.createCriteria();\n\t\t\n\t\texample.setOrderByClause(\"tms asc\");\n\t\treturn activityAbstractInfoMapper.selectByExample(example);\n\t}",
"QtActivitytype selectByPrimaryKey(Integer id);",
"public interface WarningLogMapper {\n\n @Select(\"SELECT * \"\n + \" FROM warning_log \"\n + \"where devEUI = #{devEUI} and status=#{status} \")\n List<WarningLog> queryByDevAndStatus(@Param(\"devEUI\") String devEUI,@Param(\"status\") String status);\n\n @Select(\"SELECT * \"\n + \" FROM warning_log \"\n + \"where id = #{id} \")\n WarningLog queryWarningLog(@Param(\"id\") String id);\n\n @Select(\"<script>\"\n +\"SELECT * FROM warning_log where devEUI in \"\n + \"<foreach collection=\\\"list\\\" open=\\\"(\\\" close=\\\")\\\" separator=\\\",\\\" item=\\\"uid\\\" >\"\n + \"#{uid}\"\n + \"</foreach>\"\n + \"<if test =\\\"status !=null and status!=''\\\"> and status = #{start} </if>\"\n +\" order by status asc, createTime desc \"\n +\"</script>\")\n List<WarningLog> queryWarningLogByDevIds(@Param(\"list\") List<String> list, @Param(\"status\") String status);\n\n @Insert(\"insert into warning_log (devEUI,time,fPort,gatewayCount,rssi,fCnt,loRaSNR,data,devicePath,functionCode,dataLen,status,createTime)\"\n + \" values( #{devEUI},#{time},#{fPort},#{gatewayCount},#{rssi},#{fCnt},#{loRaSNR},#{data},#{devicePath},#{functionCode},#{dataLen}, #{status},#{createTime} ) \")\n int saveWarningLog(WarningLog log);\n\n /**\n * 将故障的设备标记为已修复\n * @param status\n * @param updateTime\n * @param devEUI\n * @return\n */\n @Update(\"update warning_log set status = #{status}, updateTime = #{updateTime} where devEUI=#{devEUI} and status ='0' \")\n int updateStatus(@Param(\"status\") String status, @Param(\"updateTime\") Date updateTime, @Param(\"devEUI\") String devEUI);\n\n @Select(\"<script>\"\n +\"SELECT count(id) FROM warning_log where devEUI in \"\n + \"<foreach collection=\\\"list\\\" open=\\\"(\\\" close=\\\")\\\" separator=\\\",\\\" item=\\\"uid\\\" >\"\n + \"#{uid}\"\n + \"</foreach>\"\n + \"<if test =\\\"status !=null and status!=''\\\"> and status = #{status} </if>\"\n +\"</script>\")\n int queryFaultCount(@Param(\"list\") List<String> list, @Param(\"status\") String status);\n\n\n}",
"Integer getNumberOfUserActivity() {\n return daoInterface.getNumberOfUserActivity();\n }",
"public ActivityType getActivityType() {\n return activityType;\n }",
"public Vector listActivityTypeRegister() throws SQLException {\n Debug.print(\"Inside the getUserAndMemberId\");\n Vector vObj = new Vector();\n try {\n makeConnection();\n String slelctStr = \"SELECT B.specification_id,B.specification_name, A.transaction_type_id FROM \"+ \n DBHelper.USEA_ACTIVITY_CATEGORY+\" A, \"+DBHelper.USEA_SPECIFICATION_MASTER+\" B \"+\n \" WHERE A.activity_type_id = B.activity_type_id AND A.activity_type_name = ? and B.active_status = ? \";\n PreparedStatement prepStmt = con.prepareStatement(slelctStr);\n prepStmt.setString(1, \"Registration\");\n prepStmt.setBoolean(2 , true);\n \n rs = prepStmt.executeQuery();\n System.out.println(\"Inside the listActivityCategory \");\n while (rs.next()) { \n this.specificationId = rs.getString(1);\n this.specificationName = rs.getString(2);\n String txnTypeId = rs.getString(3);\n \n String [] activityList = {specificationId,specificationName,txnTypeId};\n Debug.print(\" Specification Id : \"+specificationId);\n Debug.print(\" specificationName : \"+specificationName);\n Debug.print(\" txnTypeId : \"+txnTypeId);\n \n vObj.add(activityList);\n }\n releaseConnection();\n }catch (SQLException e){\n e.printStackTrace();\n }finally {\n releaseConnection();\n }\n return vObj;\n }",
"public interface I_IHC_JobDataChange \n{\n\n /** TableName=IHC_JobDataChange */\n public static final String Table_Name = \"IHC_JobDataChange\";\n\n /** AD_Table_ID=1100135 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name BPJSRegistrationDate */\n public static final String COLUMNNAME_BPJSRegistrationDate = \"BPJSRegistrationDate\";\n\n\t/** Set BPJS Registration Date\t */\n\tpublic void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);\n\n\t/** Get BPJS Registration Date\t */\n\tpublic Timestamp getBPJSRegistrationDate();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name DescriptionNew */\n public static final String COLUMNNAME_DescriptionNew = \"DescriptionNew\";\n\n\t/** Set Description New\t */\n\tpublic void setDescriptionNew (String DescriptionNew);\n\n\t/** Get Description New\t */\n\tpublic String getDescriptionNew();\n\n /** Column name HC_Compensation1 */\n public static final String COLUMNNAME_HC_Compensation1 = \"HC_Compensation1\";\n\n\t/** Set Compensation 1\t */\n\tpublic void setHC_Compensation1 (BigDecimal HC_Compensation1);\n\n\t/** Get Compensation 1\t */\n\tpublic BigDecimal getHC_Compensation1();\n\n /** Column name HC_Compensation2 */\n public static final String COLUMNNAME_HC_Compensation2 = \"HC_Compensation2\";\n\n\t/** Set Compensation 2\t */\n\tpublic void setHC_Compensation2 (BigDecimal HC_Compensation2);\n\n\t/** Get Compensation 2\t */\n\tpublic BigDecimal getHC_Compensation2();\n\n /** Column name HC_Compensation3 */\n public static final String COLUMNNAME_HC_Compensation3 = \"HC_Compensation3\";\n\n\t/** Set Compensation 3\t */\n\tpublic void setHC_Compensation3 (BigDecimal HC_Compensation3);\n\n\t/** Get Compensation 3\t */\n\tpublic BigDecimal getHC_Compensation3();\n\n /** Column name HC_Compensation4 */\n public static final String COLUMNNAME_HC_Compensation4 = \"HC_Compensation4\";\n\n\t/** Set Compensation 4\t */\n\tpublic void setHC_Compensation4 (BigDecimal HC_Compensation4);\n\n\t/** Get Compensation 4\t */\n\tpublic BigDecimal getHC_Compensation4();\n\n /** Column name HC_EffectiveSeq */\n public static final String COLUMNNAME_HC_EffectiveSeq = \"HC_EffectiveSeq\";\n\n\t/** Set Effective Sequence\t */\n\tpublic void setHC_EffectiveSeq (int HC_EffectiveSeq);\n\n\t/** Get Effective Sequence\t */\n\tpublic int getHC_EffectiveSeq();\n\n /** Column name HC_Employee_ID */\n public static final String COLUMNNAME_HC_Employee_ID = \"HC_Employee_ID\";\n\n\t/** Set Employee Data\t */\n\tpublic void setHC_Employee_ID (int HC_Employee_ID);\n\n\t/** Get Employee Data\t */\n\tpublic int getHC_Employee_ID();\n\n\tpublic I_HC_Employee getHC_Employee() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade_ID = \"HC_EmployeeGrade_ID\";\n\n\t/** Set Employee Grade\t */\n\tpublic void setHC_EmployeeGrade_ID (int HC_EmployeeGrade_ID);\n\n\t/** Get Employee Grade\t */\n\tpublic int getHC_EmployeeGrade_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade() throws RuntimeException;\n\n /** Column name HC_EmployeeGrade2_ID */\n public static final String COLUMNNAME_HC_EmployeeGrade2_ID = \"HC_EmployeeGrade2_ID\";\n\n\t/** Set Employee Grade To\t */\n\tpublic void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);\n\n\t/** Get Employee Grade To\t */\n\tpublic int getHC_EmployeeGrade2_ID();\n\n\tpublic I_HC_EmployeeGrade getHC_EmployeeGrade2() throws RuntimeException;\n\n /** Column name HC_EmployeeJob_ID */\n public static final String COLUMNNAME_HC_EmployeeJob_ID = \"HC_EmployeeJob_ID\";\n\n\t/** Set Employee Job Data\t */\n\tpublic void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);\n\n\t/** Get Employee Job Data\t */\n\tpublic int getHC_EmployeeJob_ID();\n\n\tpublic I_HC_EmployeeJob getHC_EmployeeJob() throws RuntimeException;\n\n /** Column name HC_Job_ID */\n public static final String COLUMNNAME_HC_Job_ID = \"HC_Job_ID\";\n\n\t/** Set Job\t */\n\tpublic void setHC_Job_ID (int HC_Job_ID);\n\n\t/** Get Job\t */\n\tpublic int getHC_Job_ID();\n\n\tpublic I_HC_Job getHC_Job() throws RuntimeException;\n\n /** Column name HC_JobAction */\n public static final String COLUMNNAME_HC_JobAction = \"HC_JobAction\";\n\n\t/** Set Job Action\t */\n\tpublic void setHC_JobAction (String HC_JobAction);\n\n\t/** Get Job Action\t */\n\tpublic String getHC_JobAction();\n\n /** Column name HC_JobDataChange_ID */\n public static final String COLUMNNAME_HC_JobDataChange_ID = \"HC_JobDataChange_ID\";\n\n\t/** Set Job Data Change\t */\n\tpublic void setHC_JobDataChange_ID (int HC_JobDataChange_ID);\n\n\t/** Get Job Data Change\t */\n\tpublic int getHC_JobDataChange_ID();\n\n\tpublic I_HC_JobDataChange getHC_JobDataChange() throws RuntimeException;\n\n /** Column name HC_Manager_ID */\n public static final String COLUMNNAME_HC_Manager_ID = \"HC_Manager_ID\";\n\n\t/** Set Manager Name\t */\n\tpublic void setHC_Manager_ID (int HC_Manager_ID);\n\n\t/** Get Manager Name\t */\n\tpublic int getHC_Manager_ID();\n\n\tpublic I_HC_Employee getHC_Manager() throws RuntimeException;\n\n /** Column name HC_ManagerTo_ID */\n public static final String COLUMNNAME_HC_ManagerTo_ID = \"HC_ManagerTo_ID\";\n\n\t/** Set Manager To ID\t */\n\tpublic void setHC_ManagerTo_ID (int HC_ManagerTo_ID);\n\n\t/** Get Manager To ID\t */\n\tpublic int getHC_ManagerTo_ID();\n\n\tpublic I_HC_Employee getHC_ManagerTo() throws RuntimeException;\n\n /** Column name HC_Org_ID */\n public static final String COLUMNNAME_HC_Org_ID = \"HC_Org_ID\";\n\n\t/** Set HC Organization\t */\n\tpublic void setHC_Org_ID (int HC_Org_ID);\n\n\t/** Get HC Organization\t */\n\tpublic int getHC_Org_ID();\n\n\tpublic I_HC_Org getHC_Org() throws RuntimeException;\n\n /** Column name HC_Org2_ID */\n public static final String COLUMNNAME_HC_Org2_ID = \"HC_Org2_ID\";\n\n\t/** Set HC Organization To\t */\n\tpublic void setHC_Org2_ID (int HC_Org2_ID);\n\n\t/** Get HC Organization To\t */\n\tpublic int getHC_Org2_ID();\n\n\tpublic I_HC_Org getHC_Org2() throws RuntimeException;\n\n /** Column name HC_PayGroup_ID */\n public static final String COLUMNNAME_HC_PayGroup_ID = \"HC_PayGroup_ID\";\n\n\t/** Set Payroll Group\t */\n\tpublic void setHC_PayGroup_ID (int HC_PayGroup_ID);\n\n\t/** Get Payroll Group\t */\n\tpublic int getHC_PayGroup_ID();\n\n\tpublic I_HC_PayGroup getHC_PayGroup() throws RuntimeException;\n\n /** Column name HC_PreviousJob_ID */\n public static final String COLUMNNAME_HC_PreviousJob_ID = \"HC_PreviousJob_ID\";\n\n\t/** Set Job Sekarang\t */\n\tpublic void setHC_PreviousJob_ID (int HC_PreviousJob_ID);\n\n\t/** Get Job Sekarang\t */\n\tpublic int getHC_PreviousJob_ID();\n\n\tpublic I_HC_Job getHC_PreviousJob() throws RuntimeException;\n\n /** Column name HC_Reason_ID */\n public static final String COLUMNNAME_HC_Reason_ID = \"HC_Reason_ID\";\n\n\t/** Set HC Reason\t */\n\tpublic void setHC_Reason_ID (int HC_Reason_ID);\n\n\t/** Get HC Reason\t */\n\tpublic int getHC_Reason_ID();\n\n\tpublic I_HC_Reason getHC_Reason() throws RuntimeException;\n\n /** Column name HC_Status */\n public static final String COLUMNNAME_HC_Status = \"HC_Status\";\n\n\t/** Set HC Status\t */\n\tpublic void setHC_Status (String HC_Status);\n\n\t/** Get HC Status\t */\n\tpublic String getHC_Status();\n\n /** Column name HC_WorkEndDate */\n public static final String COLUMNNAME_HC_WorkEndDate = \"HC_WorkEndDate\";\n\n\t/** Set Work End Date\t */\n\tpublic void setHC_WorkEndDate (Timestamp HC_WorkEndDate);\n\n\t/** Get Work End Date\t */\n\tpublic Timestamp getHC_WorkEndDate();\n\n /** Column name HC_WorkPeriodDate */\n public static final String COLUMNNAME_HC_WorkPeriodDate = \"HC_WorkPeriodDate\";\n\n\t/** Set WorkPeriodDate\t */\n\tpublic void setHC_WorkPeriodDate (String HC_WorkPeriodDate);\n\n\t/** Get WorkPeriodDate\t */\n\tpublic String getHC_WorkPeriodDate();\n\n /** Column name HC_WorkStartDate */\n public static final String COLUMNNAME_HC_WorkStartDate = \"HC_WorkStartDate\";\n\n\t/** Set WorkStartDate\t */\n\tpublic void setHC_WorkStartDate (Timestamp HC_WorkStartDate);\n\n\t/** Get WorkStartDate\t */\n\tpublic Timestamp getHC_WorkStartDate();\n\n /** Column name HC_WorkStartDate2 */\n public static final String COLUMNNAME_HC_WorkStartDate2 = \"HC_WorkStartDate2\";\n\n\t/** Set Work Start Date Baru\t */\n\tpublic void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);\n\n\t/** Get Work Start Date Baru\t */\n\tpublic Timestamp getHC_WorkStartDate2();\n\n /** Column name IHC_JobDataChange_ID */\n public static final String COLUMNNAME_IHC_JobDataChange_ID = \"IHC_JobDataChange_ID\";\n\n\t/** Set IHC_JobDayaChange\t */\n\tpublic void setIHC_JobDataChange_ID (int IHC_JobDataChange_ID);\n\n\t/** Get IHC_JobDayaChange\t */\n\tpublic int getIHC_JobDataChange_ID();\n\n /** Column name IHC_JobDataChange_UU */\n public static final String COLUMNNAME_IHC_JobDataChange_UU = \"IHC_JobDataChange_UU\";\n\n\t/** Set IHC_JobDataChange_UU\t */\n\tpublic void setIHC_JobDataChange_UU (String IHC_JobDataChange_UU);\n\n\t/** Get IHC_JobDataChange_UU\t */\n\tpublic String getIHC_JobDataChange_UU();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name IsCancelled */\n public static final String COLUMNNAME_IsCancelled = \"IsCancelled\";\n\n\t/** Set Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic void setIsCancelled (boolean IsCancelled);\n\n\t/** Get Cancelled.\n\t * The transaction was cancelled\n\t */\n\tpublic boolean isCancelled();\n\n /** Column name NomorSK */\n public static final String COLUMNNAME_NomorSK = \"NomorSK\";\n\n\t/** Set Nomor SK\t */\n\tpublic void setNomorSK (String NomorSK);\n\n\t/** Get Nomor SK\t */\n\tpublic String getNomorSK();\n\n /** Column name NomorSK2 */\n public static final String COLUMNNAME_NomorSK2 = \"NomorSK2\";\n\n\t/** Set Nomor SK Baru\t */\n\tpublic void setNomorSK2 (String NomorSK2);\n\n\t/** Get Nomor SK Baru\t */\n\tpublic String getNomorSK2();\n\n /** Column name OriginalServiceData */\n public static final String COLUMNNAME_OriginalServiceData = \"OriginalServiceData\";\n\n\t/** Set Original Service Date\t */\n\tpublic void setOriginalServiceData (Timestamp OriginalServiceData);\n\n\t/** Get Original Service Date\t */\n\tpublic Timestamp getOriginalServiceData();\n\n /** Column name Processed */\n public static final String COLUMNNAME_Processed = \"Processed\";\n\n\t/** Set Processed.\n\t * The document has been processed\n\t */\n\tpublic void setProcessed (boolean Processed);\n\n\t/** Get Processed.\n\t * The document has been processed\n\t */\n\tpublic boolean isProcessed();\n\n /** Column name SeqNo */\n public static final String COLUMNNAME_SeqNo = \"SeqNo\";\n\n\t/** Set Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic void setSeqNo (int SeqNo);\n\n\t/** Get Sequence.\n\t * Method of ordering records;\n lowest number comes first\n\t */\n\tpublic int getSeqNo();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}",
"public interface ProductActivityDao {\n int insert(ProductActivity productActivity);\n ProductActivity existClient(ProductActivity productActivity);\n int update(ProductActivity productActivity);\n int updateByUp(ProductActivity productActivity);\n\n List<ProductActivity> getList(ProductActivityPara productActivityPara);\n long getListCount(ProductActivityPara productActivityPara);\n}",
"@Override\n\tpublic List<FarmActivity> selectActivityList(Map<String, Object> map) {\n\t\treturn null;\n\t}",
"public TblActividadFinanciamientoDet() {\n // Este lo usa Jpa para realizar los Mapping\n }",
"public void setActivitytypeid(Integer activitytypeid) {\n this.activitytypeid = activitytypeid;\n }",
"private void insertFullActivity(FormActivityDef activity, long revisionId) {\n JdbiActivity jdbiActivity = getJdbiActivity();\n JdbiActivityVersion jdbiVersion = getJdbiActivityVersion();\n ActivityI18nDao activityI18nDao = getActivityI18nDao();\n SectionBlockDao sectionBlockDao = getSectionBlockDao();\n TemplateDao templateDao = getTemplateDao();\n\n long activityId = activity.getActivityId();\n long versionId = jdbiVersion.insert(activity.getActivityId(), activity.getVersionTag(), revisionId);\n activity.setVersionId(versionId);\n\n Map<String, String> names = activity.getTranslatedNames().stream()\n .collect(Collectors.toMap(Translation::getLanguageCode, Translation::getText));\n Map<String, String> secondNames = activity.getTranslatedSecondNames().stream()\n .collect(Collectors.toMap(Translation::getLanguageCode, Translation::getText));\n Map<String, String> titles = activity.getTranslatedTitles().stream()\n .collect(Collectors.toMap(Translation::getLanguageCode, Translation::getText));\n Map<String, String> subtitles = activity.getTranslatedSubtitles().stream()\n .collect(Collectors.toMap(Translation::getLanguageCode, Translation::getText));\n Map<String, String> descriptions = activity.getTranslatedDescriptions().stream()\n .collect(Collectors.toMap(Translation::getLanguageCode, Translation::getText));\n\n List<ActivityI18nDetail> details = new ArrayList<>();\n for (var entry : names.entrySet()) {\n String isoLangCode = entry.getKey();\n String name = entry.getValue();\n details.add(new ActivityI18nDetail(\n activityId,\n isoLangCode,\n name,\n secondNames.getOrDefault(isoLangCode, null),\n titles.getOrDefault(isoLangCode, null),\n subtitles.getOrDefault(isoLangCode, null),\n descriptions.getOrDefault(isoLangCode, null),\n revisionId\n ));\n }\n\n activityI18nDao.insertDetails(details);\n activityI18nDao.insertSummaries(activityId, activity.getTranslatedSummaries());\n\n FormType formType = activity.getFormType();\n int numRows = jdbiActivity.insertFormActivity(activityId, jdbiActivity.getFormTypeId(formType));\n if (numRows != 1) {\n throw new DaoException(\"Inserted \" + numRows + \" form activity rows for activity \" + activityId);\n }\n\n sectionBlockDao.insertBodySections(activityId, activity.getSections(), revisionId);\n\n Long introductionSectionId = null;\n if (activity.getIntroduction() != null) {\n introductionSectionId = sectionBlockDao.insertSection(activityId, activity.getIntroduction(), revisionId);\n }\n\n Long closingSectionId = null;\n if (activity.getClosing() != null) {\n closingSectionId = sectionBlockDao.insertSection(activityId, activity.getClosing(), revisionId);\n }\n\n Long readonlyHintTemplateId = null;\n if (activity.getReadonlyHintTemplate() != null) {\n readonlyHintTemplateId = templateDao.insertTemplate(activity.getReadonlyHintTemplate(), revisionId);\n }\n\n Long lastUpdatedTextTemplateId = null;\n if (activity.getLastUpdatedTextTemplate() != null) {\n lastUpdatedTextTemplateId = templateDao.insertTemplate(activity.getLastUpdatedTextTemplate(), revisionId);\n }\n\n getJdbiFormActivitySetting().insert(\n activityId, activity.getListStyleHint(), introductionSectionId,\n closingSectionId, revisionId, readonlyHintTemplateId, activity.getLastUpdated(), lastUpdatedTextTemplateId,\n activity.shouldSnapshotSubstitutionsOnSubmit(), activity.shouldSnapshotAddressOnSubmit());\n }",
"private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }",
"@ManyToOne(fetch = FetchType.EAGER)\r\n @JoinColumn(name = \"CHARITABLE_ACTIVITY_ID\")\r\n @Audited\r\n public CharitableActivity getCharitableActivity() {\r\n return charitableActivity;\r\n }",
"@Insert({\n \"insert into actions_accounts (actor, permission, \",\n \"action_id)\",\n \"values (#{actor,jdbcType=VARCHAR}, #{permission,jdbcType=VARCHAR}, \",\n \"#{actionId,jdbcType=INTEGER})\"\n })\n int insert(ActionsAccounts record);",
"@Override\r\n\tpublic ArrayList<Activitat> getAllNoSenior() {\r\n\t\tint i = 0;\r\n\t\tqueryString = \"SELECT * FROM \" + ACTIVITATTABLENAME + \" WHERE SENIOR = FALSE\";\r\n\t\tArrayList<Activitat> llistaActivitats = null;\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\tResultSet rs = s.executeQuery();\r\n\t\t\tllistaActivitats = new ArrayList<Activitat>();\r\n\t\t\tActivitatFactory af = af = new ActivitatFactory();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tCalendar cal = new GregorianCalendar();\r\n\t\t\t\tcal.setTime(rs.getDate(4));\r\n\t\t\t\t\r\n\t\t\t\tllistaActivitats.add(af.creaActivitat(rs.getString(2), rs.getString(3), cal, rs.getTimestamp(5),rs.getString(6),rs.getBoolean(7)));\r\n\t\t\r\n\t\t\t}\r\n\t\t} catch (SQLException 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 llistaActivitats;\r\n\t}",
"public Resource endedAtTime(Resource activity, Date date) {\n Statement atTime = model.createStatement(activity,\n model.createProperty(ProvOntology.getEndedAtTimeStartingPointPropertyFullURI()),\n getDateLiteral(date));\n model.add(atTime);\n return activity;\n }",
"public ArrayList<Activity> GetActivitysByUsername(String username){\n SQLiteDatabase db = this.getWritableDatabase();\n ArrayList<Activity> activities = new ArrayList<>();\n String query = \"SELECT act_no, username, act_name, time_set, act_desc, act_state FROM \"\n + TABLE_Activitys +\" where username = ?\";\n Cursor cursor = db.rawQuery(query,new String[] {username});\n while (cursor.moveToNext()){\n Activity activity = new Activity();\n activity.setAct_no(cursor.getString(cursor.getColumnIndex(KEY_ACT_NO)));\n activity.setUsername(cursor.getString(cursor.getColumnIndex(KEY_ACT_NO)));\n activity.setAct_name(cursor.getString(cursor.getColumnIndex(KEY_ACT_NAME)));\n activity.setTime_set(cursor.getString(cursor.getColumnIndex(KEY_TIME_SET)));\n activity.setAct_desc(cursor.getString(cursor.getColumnIndex(KEY_ACT_DESC)));\n if(Integer.parseInt(cursor.getString(cursor.getColumnIndex(KEY_ACT_STATE))) == 1){\n activity.setAct_state(true);\n }else{\n activity.setAct_state(false);\n }\n activities.add(activity);\n }\n return activities;\n }",
"@Override\r\n public List<ActiveStatusModel> listActiveStatus() {\r\n return jdbcTemplate.query(SQL_SELECT, new ActiveStatusHelper());\r\n }",
"ActivityType loadActivityType(int id) throws DataAccessException;",
"@Override\n\tpublic String getActivityName() {\n\t\treturn ActivityName;\n\t}",
"public Resource atTime(Resource activity, Resource instantaneousEvent) {\n return createStatement(activity.getURI(), ProvOntology.getAtTimeQualifiedPropertyFullURI(),\n instantaneousEvent.getURI());\n }",
"@Dao\npublic interface UnsentChangedDao {\n\n\n @Insert\n long insertSingleChange(UnsentChange change);\n\n @Delete\n void deleteChanges(List<UnsentChange> changes);\n\n @Update\n void updateSigleChange(UnsentChange change);\n\n /**\n * Returns all unsent changed runner for given competition\n * @param competition_id ID of given competition\n */\n @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH)\n @Query(\"SELECT * FROM unsent_changes \" +\n \"JOIN changed_runners ON unsent_changes.changed_runner_id = changed_runners.id \" +\n \"WHERE changed_runners.competition_id = :competition_id\")\n List<UnsentChange> GetUnsentChangesByCompetitionId(int competition_id);\n}",
"List<SportActivity> findAll();",
"public LearningResultHasActivityPk insert(LearningResultHasActivity dto) throws LearningResultHasActivityDaoException;",
"void selectActivityName(int activity_number, Model model);",
"public Integer getActivityName() {\n return activityName;\n }",
"UserActivity findUserActivityByActivityId(int activityId) throws DataNotFoundException;",
"public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}",
"public static List<Tournament> getAllTournaments(){\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n\n CriteriaBuilder builder = session.getCriteriaBuilder();\n CriteriaQuery<Tournament> criteriaQuery = builder.createQuery(Tournament.class);\n //SELECT\n Root<Tournament> root = criteriaQuery.from(Tournament.class);\n criteriaQuery.select(root);\n //ORDER BY\n criteriaQuery.orderBy(builder.desc(root.get(\"date\")));\n\n Query<Tournament> query = session.createQuery(criteriaQuery);\n List<Tournament> result = query.getResultList();\n\n tx.commit();\n return result;\n\n } catch (Exception e) {\n if (tx != null) tx.rollback();\n throw e;\n } finally {\n session.close();\n }\n }",
"private ActivityRecord setActivityRecord() {\r\n ActivityRecord actv = new ActivityRecord();\r\n actv.setActivity(sportActivity);\r\n actv.setDistance(5);\r\n actv.setTime(45L);\r\n actv.setBurnedCalories(240);\r\n actv.setUser(user);\r\n return actv;\r\n }",
"boolean updateUserActivityInDB(UserActivity userActivity);",
"public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }",
"public void setC_Activity_ID (int C_Activity_ID);",
"AbstractList<BalanceChange> recentActivity() {\r\n\t\tArrayList<BalanceChange> activity = new ArrayList<BalanceChange>();\r\n\t\t\r\n\t\tint i=10;\r\n\t\twhile (i > 0) {\r\n\t\t\t//TODO\r\n\t\t\ti--;\r\n\t\t}\r\n\t\t\r\n\t\treturn activity;\r\n\t}",
"@Mapper\npublic interface WeChatInfoDao {\n\n\n /**\n * 插入微信信息\n * @param wechatInfo\n * @return\n */\n @Insert(\"INSERT INTO wechat_info(parentid,unionid,openid,nickname,sex,province,city,country,headImgUrl,\" +\n \"status,ticket_url,ticket,is_guide,reward) VALUES(#{parentid},#{unionid},#{openid},#{nickname},#{sex},#{province}\" +\n \",#{city},#{country},#{headImgUrl},#{status},#{ticketUrl},#{ticket},#{isGuide},#{reward})\")\n @Options(useGeneratedKeys=true, keyProperty=\"id\")\n int insert(WeChatInfoEntity wechatInfo);\n\n /**\n * 根据openID 查找用户信息\n * @param openid\n * @return\n */\n @Select(\"SELECT * FROM wechat_info WHERE openid = #{openid}\")\n @Results(\n {\n @Result(id = true, column = \"id\", property = \"ID\"),\n @Result(column = \"unionid\", property = \"unionid\"),\n @Result(column = \"parentid\", property = \"parentid\"),\n @Result(column = \"openid\", property = \"openid\"),\n @Result(column = \"ticket_url\", property = \"ticketUrl\"),\n @Result(column = \"ticket\", property = \"ticket\"),\n @Result(column = \"nickname\", property = \"nickname\"),\n @Result(column = \"is_guide\", property = \"isGuide\"),\n @Result(column = \"reward\", property = \"reward\")\n })\n WeChatInfoEntity findByOpenID(@Param(\"openid\") String openid);\n\n /**\n * 根据openID 修改二维码信息\n * @param wechatInfo\n */\n @Update(\"UPDATE wechat_info SET ticket_url=#{ticketUrl},ticket=#{ticket} WHERE openid=#{openid}\")\n void updateTicketUrlByOpenID(WeChatInfoEntity wechatInfo);\n\n /**\n * 取消关注\n * @param wechatInfo\n */\n @Update(\"UPDATE wechat_info SET status=1 WHERE openid=#{openid}\")\n void updateStatusByOpenID(WeChatInfoEntity wechatInfo);\n\n\n /**\n * 更改status 状态\n * @param wechatInfo\n */\n @SelectProvider(type=WeChatInfoSqlProvider.class, method=\"updateByOpenIdSql\")\n void updateStatus(@Param(\"wechatInfo\") WeChatInfoEntity wechatInfo);\n\n @Select(\"SELECT * FROM wechat_info WHERE id = #{ID}\")\n @Results(\n {\n @Result(id = true, column = \"id\", property = \"ID\"),\n @Result(column = \"unionid\", property = \"unionid\"),\n @Result(column = \"parentid\", property = \"parentid\"),\n @Result(column = \"openid\", property = \"openid\"),\n @Result(column = \"ticket_url\", property = \"ticketUrl\"),\n @Result(column = \"ticket\", property = \"ticket\"),\n @Result(column = \"is_guide\", property = \"isGuide\"),\n @Result(column = \"reward\", property = \"reward\")\n })\n WeChatInfoEntity selectWecahtUserByID(@Param(\"ID\")String ID);\n}",
"public long getActivityTimestamp()\n {\n return activityTimestamp;\n }",
"List<TestActivityEntity> selectByExample(TestActivityEntityExample example);",
"boolean addUserActivityToDB(UserActivity userActivity);",
"@Override\n\tpublic int getActivityInfo() {\n\t\treturn Constants.ActivityInfo.ACTIVITY_ADDWAITACTIVITY;\n\t}",
"@SuppressWarnings(\"all\")\npublic interface I_i_ordertrx_temp \n{\n\n /** TableName=i_ordertrx_temp */\n public static final String Table_Name = \"i_ordertrx_temp\";\n\n /** AD_Table_ID=1000126 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name count_order */\n public static final String COLUMNNAME_count_order = \"count_order\";\n\n\t/** Set count_order\t */\n\tpublic void setcount_order (int count_order);\n\n\t/** Get count_order\t */\n\tpublic int getcount_order();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name i_ordertrx_temp_ID */\n public static final String COLUMNNAME_i_ordertrx_temp_ID = \"i_ordertrx_temp_ID\";\n\n\t/** Set Semeru Order Temporary\t */\n\tpublic void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);\n\n\t/** Get Semeru Order Temporary\t */\n\tpublic int geti_ordertrx_temp_ID();\n\n /** Column name insert_order */\n public static final String COLUMNNAME_insert_order = \"insert_order\";\n\n\t/** Set insert_order\t */\n\tpublic void setinsert_order (boolean insert_order);\n\n\t/** Get insert_order\t */\n\tpublic boolean isinsert_order();\n\n /** Column name order_detail */\n public static final String COLUMNNAME_order_detail = \"order_detail\";\n\n\t/** Set order_detail\t */\n\tpublic void setorder_detail (String order_detail);\n\n\t/** Get order_detail\t */\n\tpublic String getorder_detail();\n\n /** Column name orders */\n public static final String COLUMNNAME_orders = \"orders\";\n\n\t/** Set orders\t */\n\tpublic void setorders (String orders);\n\n\t/** Get orders\t */\n\tpublic String getorders();\n\n /** Column name pos */\n public static final String COLUMNNAME_pos = \"pos\";\n\n\t/** Set pos\t */\n\tpublic void setpos (String pos);\n\n\t/** Get pos\t */\n\tpublic String getpos();\n\n /** Column name Result */\n public static final String COLUMNNAME_Result = \"Result\";\n\n\t/** Set Result.\n\t * Result of the action taken\n\t */\n\tpublic void setResult (String Result);\n\n\t/** Get Result.\n\t * Result of the action taken\n\t */\n\tpublic String getResult();\n\n /** Column name transaction_id */\n public static final String COLUMNNAME_transaction_id = \"transaction_id\";\n\n\t/** Set transaction_id\t */\n\tpublic void settransaction_id (int transaction_id);\n\n\t/** Get transaction_id\t */\n\tpublic int gettransaction_id();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}",
"public S(Activity activity){\n\t\tthis.activity = activity;\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n DatabaseTables = new javax.swing.JTable();\n jButtonRefresh = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextFieldActivityType = new javax.swing.JTextField();\n jButtonInsertRow = new javax.swing.JButton();\n jButtonDeleteTuple = new javax.swing.JButton();\n jButtonUpdateTuple = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jButtonClear = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTextAreaQuery = new javax.swing.JTextArea();\n jDateChooserStart = new com.toedter.calendar.JDateChooser();\n jDateChooserEnd = new com.toedter.calendar.JDateChooser();\n jLabel13 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n DatabaseTables.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null}\n },\n new String [] {\n \"activityType\", \"startDate\", \"endDate\"\n }\n ));\n jScrollPane1.setViewportView(DatabaseTables);\n\n jButtonRefresh.setText(\"Refresh\");\n jButtonRefresh.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonRefreshActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Activity Name\");\n\n jLabel3.setText(\"Activity Start Date\");\n\n jLabel4.setText(\"Activity End Date\");\n\n jButtonInsertRow.setText(\"Insert\");\n jButtonInsertRow.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonInsertRowActionPerformed(evt);\n }\n });\n\n jButtonDeleteTuple.setText(\"Delete\");\n jButtonDeleteTuple.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonDeleteTupleActionPerformed(evt);\n }\n });\n\n jButtonUpdateTuple.setText(\"Update\");\n jButtonUpdateTuple.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonUpdateTupleActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Type a query from the table and press Refresh button:\");\n\n jLabel6.setFont(new java.awt.Font(\"Lucida Grande\", 1, 12)); // NOI18N\n jLabel6.setText(\"Sports Activities Table Editing:\");\n\n jButtonClear.setText(\"Clear\");\n jButtonClear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonClearActionPerformed(evt);\n }\n });\n\n jTextAreaQuery.setColumns(20);\n jTextAreaQuery.setRows(5);\n jTextAreaQuery.setText(\"SELECT * \\nFROM ActivityType\");\n jTextAreaQuery.addAncestorListener(new javax.swing.event.AncestorListener() {\n public void ancestorAdded(javax.swing.event.AncestorEvent evt) {\n jTextAreaQueryAncestorAdded(evt);\n }\n public void ancestorMoved(javax.swing.event.AncestorEvent evt) {\n }\n public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {\n }\n });\n jScrollPane2.setViewportView(jTextAreaQuery);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(66, 66, 66)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jDateChooserEnd, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jDateChooserStart, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldActivityType, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButtonInsertRow, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButtonDeleteTuple, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButtonUpdateTuple, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jButtonClear, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(115, 115, 115)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 925, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(194, 194, 194))\n .addGroup(layout.createSequentialGroup()\n .addGap(758, 758, 758)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 496, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextFieldActivityType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jDateChooserStart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jDateChooserEnd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonInsertRow)\n .addComponent(jButtonDeleteTuple)\n .addComponent(jButtonUpdateTuple))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonClear)\n .addComponent(jButtonRefresh))\n .addGap(115, 115, 115))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addGap(6, 6, 6)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addComponent(jLabel13))\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(46, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public int getC_Activity_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Activity_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}",
"protected abstract void startMonitoring(fr.inria.phoenix.diasuite.framework.datatype.dailyactivityname.DailyActivityName activity) throws Exception;",
"public String getActivityId() {\n return activityId;\n }",
"@SqlQuery(\"select * from PLAYERSTATS\")\n List<PlayerStats> getAll();",
"@GetMapping(path=\"/showActivity\",produces = MediaType.APPLICATION_JSON_VALUE)\n public @ResponseBody Iterable<user_activity> getactivity(HttpSession session) {\n return activityService.getactivity(session.getAttribute(\"name\").toString());\n }",
"public ActivityCodeDefinition(String activityName) {\r\n\t\tsuper(activityName);\r\n\t\tmType = Type.ACTIVITY;\r\n\t}",
"@Service(\"activityConditionRelationMapper\")\npublic interface ActivityConditionRelationMapper extends BaseMapper<ActivityConditionRelation, ActivityConditionRelationCondition> {\n\tpublic ActivityConditionRelation getInfoByConditionid(@Param(\"id\")int id);\n\n\tpublic int deleteInfoByCondId(@Param(\"id\")int id);\n}"
] |
[
"0.5910497",
"0.57305235",
"0.56107545",
"0.55392545",
"0.5536522",
"0.53568655",
"0.5321965",
"0.5279741",
"0.52355665",
"0.5229351",
"0.5225539",
"0.5181333",
"0.51621234",
"0.51520663",
"0.5151841",
"0.5126113",
"0.5102486",
"0.5089619",
"0.504985",
"0.504508",
"0.50120944",
"0.50111294",
"0.5006642",
"0.49967593",
"0.49929947",
"0.49866486",
"0.49802324",
"0.4950403",
"0.4928204",
"0.49232608",
"0.4921496",
"0.4901912",
"0.4900855",
"0.4880855",
"0.48806655",
"0.4871414",
"0.48675048",
"0.48659876",
"0.48497045",
"0.4847988",
"0.48473293",
"0.4841459",
"0.4840431",
"0.48340836",
"0.4827795",
"0.48236057",
"0.4817918",
"0.48140344",
"0.48027685",
"0.47904179",
"0.4789912",
"0.47669426",
"0.47657993",
"0.47633708",
"0.47535622",
"0.47519937",
"0.47461972",
"0.47286874",
"0.472534",
"0.47223884",
"0.47219127",
"0.47105315",
"0.47061852",
"0.46901226",
"0.46848854",
"0.4681936",
"0.46736193",
"0.46647868",
"0.4651443",
"0.4651008",
"0.46458125",
"0.46345878",
"0.46300125",
"0.4628134",
"0.46242082",
"0.46215105",
"0.46119305",
"0.46111906",
"0.4610547",
"0.46078667",
"0.4592284",
"0.4579318",
"0.45702422",
"0.4568956",
"0.45643023",
"0.4557716",
"0.4537205",
"0.4534183",
"0.4530925",
"0.45228693",
"0.45138848",
"0.45082855",
"0.45063987",
"0.45060205",
"0.45053643",
"0.44851336",
"0.44851157",
"0.44837493",
"0.44826287",
"0.44824564",
"0.44823626"
] |
0.0
|
-1
|
we expect 2 agents and each agent should have a random location....
|
@Override
public void setup() {
ObjectSpace objectSpace = Blackboard.inst().getSpace(ObjectSpace.class, "object");
List<PhysicsObject> objects = objectSpace.getCognitiveAgents();
if (objects.size() != 2)
throw new RuntimeException("Need two agents in order to run PathScenario4!");
// first we determine the line between their two points.
PhysicsObject obj1 = objects.get(0);
PhysicsObject obj2 = objects.get(1);
Vec2 direction = obj1.getPPosition().sub(obj2.getPPosition());
Vec2 nDirection = new Vec2(direction);
nDirection.normalize();
float radians = (float) Math.atan2(nDirection.y, nDirection.x);
float PI = (float) Math.PI;
float PI2 = PI * 0.5f;
float perp = radians + PI2;
Vec2 v = new Vec2((float) Math.cos(perp), (float) Math.sin(perp));
Vec2 offset1 = new Vec2(obj1.getPPosition().add(v));
List<Vec2> waypoints1 = new ArrayList<Vec2>();
waypoints1.add(obj2.getPPosition());
List<Vec2> waypoints2 = new ArrayList<Vec2>();
waypoints2.add(offset1);
// Set positions and orientations
obj1.getBody().setXForm(obj1.getPPosition(), radians + (float) Math.PI);
obj2.getBody().setXForm(obj2.getPPosition(), radians);
EventManager.inst().dispatch(new SetWaypoints(waypoints1, obj1));
EventManager.inst().dispatch(new SetWaypoints(waypoints2, obj2));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}",
"public Agent generateAgent(){\r\n\r\n\t\t\tlogger.info(\"generateAgent method\");\r\n\r\n\t\t\tPatch currentPatch = randPatch();\r\n\r\n\t\t\tlogger.info(\"random patch: x = \" + currentPatch.getX()\r\n\t\t\t\t\t\t+ \" y = \" + currentPatch.getY());\r\n\r\n\r\n\t\t\tAgent agent= new Agent(currentPatch, false);\r\n\r\n\t\t\tcurrentPatch.setPerson(agent);\r\n\r\n\t\t\treturn agent;\r\n\t\t}",
"public Location randomSpawn(Match m) {\r\n\t\treturn randomSpawn(teamName.ALONE, m);\r\n\t}",
"public Location getRandomLocation(ArenaWorld world, ArenaAnimal animal, List<Location> locations) {\n int HIGH = locations.size();\n int randomIndex = 0;\n Random randomize = new Random();\n if (HIGH > 0) {\n randomIndex = randomize.nextInt(HIGH);\n return locations.get(randomIndex);\n }\n return animal.getLocation();\n }",
"public void spawnNpcOnChance(Location location) {\r\n\t\t\tif(location.isOutdoors() && Math.random() < 0.20) {\r\n\t\t\t\tthis.spawnEnemy(location);\r\n\t\t\t}\r\n\t\t}",
"private RandomLocationGen() {}",
"private void locate() {\n possibleLocations[0][0] = false;\n possibleLocations[0][1] = false;\n possibleLocations[1][0] = false;\n do {\n location.randomGenerate();\n } while (!possibleLocations[location.y][location.x]);\n }",
"private GRIDagent getTestAgent()\n {\n String agtID = \"testAgent001\",\n currentLink = \"401538273_2_r\", // 40963664_0 106292026_0 1to2 17005466_7_r\n currentIntrx = \"401538273_2_r\", // 1040921516 // 1to2\n destIntrx = \"17005466_7_r\"; // 72823276_0 99to99 24to25 401538273_2_r\n // 864162469 - 1400447055 99282649_0_r [72823276_0 problem link]\n\n GRIDagent myAgent = new GRIDagent(agtID,currentLink,currentIntrx,destIntrx, false, false);\n\n return myAgent;\n }",
"private static void spawn(Actor actor, ActorWorld world)\n {\n Random generator = new Random();\n int row = generator.nextInt(10);\n int col = generator.nextInt(10);\n Location loc = new Location(row, col);\n while(world.getGrid().get(loc) != null)\n {\n row = generator.nextInt(10);\n col = generator.nextInt(10);\n loc = new Location(row, col);\n }\n world.add(loc, actor);\n }",
"private static ResourceLocation getRandomMonster(Random rand)\n\t{\n\t\tRandomCollection<ResourceLocation> monsters = new RandomCollection<ResourceLocation>();\n\t\t\n\t\tmonsters.add(10, EntityList.getKey(EntityZombie.class));\n\t\tmonsters.add(10, EntityList.getKey(EntitySkeleton.class));\n\t\tmonsters.add(10, EntityList.getKey(EntitySpider.class));\n\t\tmonsters.add(7, EntityList.getKey(EntityGhost.class));\n\t\tmonsters.add(7, EntityList.getKey(EntityBarbarian.class));\n\t\t//monsters.add(4, EntityList.getKey(EntityBandit.class));\n\t\tmonsters.add(3, EntityList.getKey(EntityBanshee.class));\n\t\tmonsters.add(1, EntityList.getKey(EntityGolem.class));\n\t\t\n\t\treturn monsters.next(rand);\n\t}",
"public void generateNether(World world, Random random, int x, int y){\n\t}",
"private void initializeAgent() {\n if (Math.random() < PROBABILITY_START_WITH_AGENT) {\n agent = new SugarscapeAgent();\n }\n }",
"public void randomHit() throws LocationHitException{\r\n\t\t// Random ran = new Random();\r\n\t\tint x = randomX();\r\n\t\tint y = randomY();\r\n\r\n\t\tboolean newHit = false;\r\n\t\twhile (!newHit) {\r\n\t\t\tif (Player.userGrid[x][y] == 2) {\r\n\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t} else\r\n\t\t\t\tnewHit = true;\r\n\t\t}\r\n\t\tint hitCoord[] = { x, y };\r\n\t\tsetCoords(hitCoord);\r\n\t\tString coordx = Integer.toString(x);\r\n\t\tString coordy = Integer.toString(y);\r\n\t\tif (Player.userGrid[x][y] == 1) {\r\n\t\t\t// change the grid value from 1 to 2 to signify hit\r\n\t\t\tPlayer.userGrid[x][y] = 2;\r\n\t\t\t\r\n\t\t\tif(!time1) {\r\n\t\t\t\ttimea=java.lang.System.currentTimeMillis();\r\n\t\t\t\ttime1=!time1;\r\n\t\t\t}else if(!time2) {\r\n\t\t\t\ttimeb=java.lang.System.currentTimeMillis();\r\n\t\t\t\t\ttime2=!time2;\r\n\t\t\t}else {\r\n\t\t\t\tdouble t=timeb-timea;\r\n\t\t\t\tif(t<3000) {\r\n\t\t\t\t\tsetScore(20);\r\n\t\t\t\t}\r\n\t\t\t\ttime1=false;\r\n\t\t\t\ttime2=false;\r\n\t\t\t\ttimea=0;\r\n\t\t\t\ttimeb=0;\r\n\t\t\t\t\r\n\t\t\t}//if time between consecutive hit is less than 3 seconds ,then bonus score\r\n\t\t\tsetScore(10);\r\n\t\t\tPlayer.coordinatesHit.add(coordx + \",\" + coordy);\r\n\t\t\tsetReply(\"It's a Hit!!!!!\");\r\n\r\n\t\t} else if (Player.userGrid[x][y] == 0) {\r\n\t\t\tPlayer.userGrid[x][y] = 3;\r\n\t\t\tsetScore(-1);\r\n\t\t\tsetReply(\"It's a miss!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 2 || Player.userGrid[x][y] == 3) {\r\n\t\t\tsetReply(\"The location has been hit earlier\");\r\n\t\t\t //throw new LocationHitException(\"The location has been hit earlier\");\r\n\t\t}\r\n\t}",
"private void generateNether(World world, Random random, int i, int j) {\n\n\t}",
"public void action() throws Exception {\n // Cop move to another place\n move();\n\n // Search for agents nearby\n ArrayList<Position> occupiedNeighbor = this.getPosition().getOccupiedNeighborhood();\n ArrayList<Agent> arrestList = new ArrayList<>();\n for (Position neighbor : occupiedNeighbor) {\n Person person = neighbor.getOccupiedPerson();\n String className = person.getClass().getName();\n // if this is a agent and is active\n if (className.equals(Person.AGENT)) {\n if (((Agent) person).isActive()) {\n arrestList.add((Agent) person);\n }\n }\n }\n\n // If there at least one agent nearby\n if (0 != arrestList.size()) {\n // Randomly pick active agent to jail\n Random random = new Random();\n int maxIndex = arrestList.size();\n int randomIndex = random.nextInt(maxIndex);\n Agent arrestAgent = arrestList.get(randomIndex);\n int jailTerm = random.nextInt(getPersonEnvironment().getMaxJailTerm());\n arrestAgent.beArrested(jailTerm, this);\n }\n }",
"public void randomTeleport() {\n Random random = new Random(seed);\n seed = random.nextInt(10000);\n int randomY = RandomUtils.uniform(random, 0, worldHeight);\n int randomX = RandomUtils.uniform(random, 0, worldWidth);\n int randomDirection = RandomUtils.uniform(random, 0, 4);\n move(randomX, randomY);\n turn(randomDirection);\n }",
"private void createLocations( int numLocation, double offset, double sceneX, double sceneY, Random rand) {\n\n for (int k = 0; k < numLocation; k++) {\n int tmpOffSetX = (int) sceneX - ((int) offset * 2);\n int tmpOffsetY = (int) sceneY - ((int) offset * 2);\n double x = rand.nextInt(tmpOffSetX - 300);\n double y = rand.nextInt(tmpOffsetY);\n for (Location lo : locations)\n if (lo.intersects(new BoundingBox(x, y, offset * 2, offset * 2))) {\n x = rand.nextInt(tmpOffSetX - 300);\n y = rand.nextInt(tmpOffsetY);\n }\n if (x < offset) x += (offset + 10); // Attempts to buffer location from being placed off-screen.\n if (y < offset) y += (offset + 10);\n if (y > sceneY - offset) y -= (offset + 10);\n if (x > sceneX - offset) x -= (offset + 10);\n locations.add(new Location(x, y, offset, \"Location \" + k)); // adds new locations\n this.getChildren().add(locations.get(k));\n this.getChildren().add(new Text(\n locations.get(k).getCenterX() - offset,\n locations.get(k).getCenterY() + (offset * 2),\n locations.get(k).getName()));\n locations.get(k).setOnMouseClicked(locationEvent);\n }\n\n }",
"private void addRandomAsteroid() {\n ThreadLocalRandom rng = ThreadLocalRandom.current();\n Point.Double newAsteroidLocation;\n //TODO: dont spawn on top of players\n Point.Double shipLocation = new Point2D.Double(0,0);\n double distanceX, distanceY;\n do { // Iterate until a point is found that is far enough away from the player.\n newAsteroidLocation = new Point.Double(rng.nextDouble(0.0, 800.0), rng.nextDouble(0.0, 800.0));\n distanceX = newAsteroidLocation.x - shipLocation.x;\n distanceY = newAsteroidLocation.y - shipLocation.y;\n } while (distanceX * distanceX + distanceY * distanceY < 50 * 50); // Pythagorean theorem for distance between two points.\n\n double randomChance = rng.nextDouble();\n Point.Double randomVelocity = new Point.Double(rng.nextDouble() * 6 - 3, rng.nextDouble() * 6 - 3);\n AsteroidSize randomSize;\n if (randomChance < 0.333) { // 33% chance of spawning a large asteroid.\n randomSize = AsteroidSize.LARGE;\n } else if (randomChance < 0.666) { // 33% chance of spawning a medium asteroid.\n randomSize = AsteroidSize.MEDIUM;\n } else { // And finally a 33% chance of spawning a small asteroid.\n randomSize = AsteroidSize.SMALL;\n }\n this.game.getAsteroids().add(new Asteroid(newAsteroidLocation, randomVelocity, randomSize));\n }",
"public void main2() throws StaleProxyException, InterruptedException\n {\n try\n {\n AgentController Agent1=main1.createNewAgent(\"Agent1\",\"players.Agent1\",null);\n Agent1.start();\n AgentController Agent2=main1.createNewAgent(\"Agent2\",\"players.Agent2\",null);\n Agent2.start();\n AgentController Agent3=main1.createNewAgent(\"Agent3\",\"players.Agent3\",null);\n Agent3.start();\n AgentController Agent4=main1.createNewAgent(\"Agent4\",\"players.Agent4\",null);\n Agent4.start();\n AgentController Agent5=main1.createNewAgent(\"Agent5\",\"players.Agent5\",null);\n Agent5.start();\n AgentController Agent6=main1.createNewAgent(\"Agent6\",\"players.Agent6\",null);\n Agent6.start();\n AgentController Agent7=main1.createNewAgent(\"Agent7\",\"players.Agent7\",null);\n Agent7.start();\n AgentController Agent8=main1.createNewAgent(\"Agent8\",\"players.Agent8\",null);\n Agent8.start();\n AgentController Agent9=main1.createNewAgent(\"Agent9\",\"players.Agent9\",null);\n Agent9.start();\n AgentController Agent10=main1.createNewAgent(\"Agent10\",\"players.Agent10\",null);\n Agent10.start();\n AgentController Agent11=main1.createNewAgent(\"Agent11\",\"players.Agent11\",null);\n Agent11.start();\n AgentController Agent12=main1.createNewAgent(\"Agent12\",\"players.Agent12\",null);\n Agent12.start();\n AgentController Agent13=main1.createNewAgent(\"Agent13\",\"players.Agent13\",null);\n Agent13.start();\n AgentController Agent14=main1.createNewAgent(\"Agent14\",\"players.Agent14\",null);\n Agent14.start();\n AgentController Agent15=main1.createNewAgent(\"Agent15\",\"players.Agent15\",null);\n Agent15.start();\n AgentController Agent16=main1.createNewAgent(\"Agent16\",\"players.Agent16\",null);\n Agent16.start();\n AgentController Main=main1.createNewAgent(\"Main\",\"test.Main\",null);\n Main.start();\n }\n catch (StaleProxyException e)\n {\n e.printStackTrace();\n }\n\n display();\n display();\n display();\n display();\n //showResualt();\n }",
"private static void spawnAtRandomLocation(World world, GameObject gameObject) {\n spawnAtRandomLocation(world, gameObject, 0.5);\n }",
"private Vector3 randomLocationMonster() {\n\t\t\n\t\tVector3 center = this.getEngine().getSceneManager().getRootSceneNode().getLocalPosition();\n\t\tVector3 randomPosition;\n\t\tfloat[] randomFloat;\n\t\tdo {\n\t\t\trandomFloat = randomFloatArray(1000);\n\t\t\trandomPosition = Vector3f.createFrom(randomFloat[0], 1.5f, randomFloat[2]);\n\t\t} while (distanceFrom(center, randomPosition) > 380f);\n\t\treturn randomPosition;\n\t}",
"public Scenario generate() {\n\n //generate random number of Passenger(all human)\n ArrayList liPsg = new ArrayList();\n int totalNumOfPsg = (int) (rd.nextDouble() * PassengerCountMax + PassengerCountMin); //at least one Psg\n for (int i = 0; i < totalNumOfPsg; i++) {\n liPsg.add(getRandomPerson());\n }\n //System.out.println(\"PassengerNum= \"+totalNumOfPsg);\n\n\n //generate random number of Pedestrians(with Max 5) & allocate person+animal randomly(human+animal)\n ArrayList liPdt = new ArrayList();\n int totalNumOfPdst = (int) (rd.nextDouble() * PedestrianCountMax + PedestrianCountMin);//at least one Pdg\n int NumOfPerson = (int) Math.round(rd.nextDouble() * totalNumOfPdst);//if only 1 pdt,along with randomDouble<0.5 , 0.4x*1 rounded=0, will only an animal\n //so if you are random being in pdt but pdt only an animal, you neither wont be in scenario, so your negative probability in scenario is higher.\n int NumOfAnimal = totalNumOfPdst - NumOfPerson;\n for (int i = 0; i < NumOfPerson; i++) {\n liPdt.add(getRandomPerson());\n }\n for (int i = 0; i < NumOfAnimal; i++) {\n liPdt.add(getRandomAnimal());\n }\n //System.out.println(\"PedestrianNum= \"+totalNumOfPdst+\" with \"+NumOfPerson+\" human and \"+NumOfAnimal+\" animals\");\n\n\n //allocating where you are, 0=you absence & do nothing, 1=you in car, 2=you on road !!!!yeah happy solving\n int allocate_of_user = (int) Math.round(rd.nextDouble() * 2);\n if (allocate_of_user == 1) {\n ((Person) liPsg.get(0)).setAsYou(true); //set the first psg is you. !!!!!important Cast Obj into Person!!!!\n } else if (allocate_of_user == 2) {\n for (int i = 0; i < liPdt.size(); i++) {\n if (liPdt.get(i) instanceof Person) {//check whether a person\n ((Person) liPdt.get(i)).setAsYou(true);\n break; // only set once than break rather than set all of people of pdt is you\n }\n }\n }\n\n //Scenario(ArrayList<Character> passengers, ArrayList<Character> pedestrians, boolean isLegalCrossing)\n S = new Scenario(liPsg, liPdt, rd.nextBoolean()); //isLegalCrossing = red or green light;\n return S;\n }",
"public void initializeAgentsPositions(int seed) {\r\n //THE NEXT LINE MEANS THAT ALL INDIVIDUALS WILL BE EVALUATED WITH THE SAME\r\n //ENVIRONEMNT STARTING POSITIONS.\r\n //reset cells\r\n prey.setCell(null);\r\n for (Predator predator : predators) {\r\n predator.setCell(null);\r\n }\r\n prey.setCell(getCell(GeneticAlgorithm.random.nextInt(grid.length), GeneticAlgorithm.random.nextInt(grid.length)));\r\n for (Predator predator : predators) {\r\n do {\r\n Cell cell = getCell(\r\n GeneticAlgorithm.random.nextInt(grid.length), GeneticAlgorithm.random.nextInt(grid.length));\r\n if (!cell.hasAgent()) {\r\n predator.setCell(cell);\r\n }\r\n } while (predator.getCell() == null);\r\n } \r\n }",
"private void spawnRandomAsteroid() {\n\t\tRandom r = new Random();\n\n\t\t// The size of the asteroid is randomised.\n\t\tdouble size = r. nextDouble() * (AsteroidsAsteroid.maximumSize - AsteroidsAsteroid.minimumSize) + AsteroidsAsteroid.minimumSize;\n\n\t\t// The spawn distance is a fair distance away from the action.\n\t\tfinal double spawnDistance = cameraZoom * 2 + size;\n\n\t\t// Same with its velocity magnitude.\n\t\tdouble decidedVelocity = r.nextDouble() * (AsteroidsAsteroid.maximumVelocity - AsteroidsAsteroid.minimumVelocity) + AsteroidsAsteroid.minimumVelocity;\n\n\t\t// And the angle.\n\t\tdouble decidedAngle = r.nextDouble() * 360 - 180;\n\n\t\t// The velocity is then converted to a Vector3.\n\t\tVector3 velocity = new Vector3(decidedVelocity * -Math.sin(Math.toRadians(decidedAngle)), decidedVelocity * Math.cos(Math.toRadians(decidedAngle)));\n\n\t\t// Then we pick a random point on the screen.\n\t\tVector3 randomPoint = new Vector3(r.nextDouble() * 2 * cameraZoom - cameraZoom, r.nextDouble() * 2 * cameraZoom - cameraZoom);\n\n\t\t// We then set the asteroid's starting position as that spawn distance away from the point\n\t\t// in the reverse direction to its velocity.\n\t\tVector3 startingPosition = randomPoint.add(new Vector3(spawnDistance * Math.sin(Math.toDegrees(-decidedAngle)), spawnDistance * -Math.cos(Math.toDegrees(-decidedAngle))));\n\n\t\t// Then we just create the asteroid.\n\t\tAsteroidsAsteroid asteroid = new AsteroidsAsteroid(GameObject.ROOT, this, size, velocity);\n\t\tasteroid.translate(startingPosition);\n\t\tasteroids.add(asteroid);\n\n\t}",
"public Location getRandomLocation() {\n\t\tint x = rand.nextInt(WORLD_SIZE);\n\t\tint y = 12;\n\t\tint z = rand.nextInt(WORLD_SIZE);\n\t\treturn new Location(x, y, z);\n\t}",
"@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}",
"private void placeEnemyShips() {\n\t\tint s51 = (int) (Math.random() * 6); // mostly random numbers\n\t\tint s52 = (int) (Math.random() * 10);\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tpgrid[s51 + i][s52] = 1;\n\n\t\t// Places the ship of length 3\n\t\tint s31 = (int) (Math.random() * 10);\n\t\tint s32 = (int) (Math.random() * 8);\n\t\twhile (pgrid[s31][s32] == 1 || pgrid[s31][s32 + 1] == 1 // prevents\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// overlaps\n\t\t\t\t|| pgrid[s31][s32 + 2] == 1) {\n\t\t\ts31 = (int) (Math.random() * 10);\n\t\t\ts32 = (int) (Math.random() * 8);\n\t\t}\n\t\tpgrid[s31][s32] = 1;\n\t\tpgrid[s31][s32 + 1] = 1;\n\t\tpgrid[s31][s32 + 2] = 1;\n\n\t\t// Places the ship of length 1\n\t\tint s21 = (int) (Math.random() * 10);\n\t\tint s22 = (int) (Math.random() * 9);\n\t\twhile (pgrid[s21][s22] == 1 || pgrid[s21][s22 + 1] == 1) { // prevents\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// overlaps\n\t\t\ts21 = (int) (Math.random() * 10);\n\t\t\ts22 = (int) (Math.random() * 9);\n\t\t}\n\t\tpgrid[s21][s22] = 1;\n\t\tpgrid[s21][s22 + 1] = 1;\n\n\t}",
"public void generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for (int cityIndex = 0; cityIndex < TourManager.numberOfCities(); cityIndex++) {\n setCity(cityIndex, TourManager.getCity(cityIndex));\n }\n // Randomly reorder the tour\n Collections.shuffle(tour);\n }",
"@Test\r\n\tpublic void selectAgentsTest() {\r\n\t\tSet<AgentInfo> recentlyUsedAgents = getRecentlyUsedAgents();\r\n\t\thazelcastService.put(DIST_MAP_NAME_RECENTLY_USED_AGENTS, TEST_USER_ID, recentlyUsedAgents);\r\n\r\n\t\tUser testUser = new User();\r\n\t\ttestUser.setUserId(TEST_USER_ID);\r\n\r\n\t\tSet<AgentInfo> allFreeAgents = getFreeAgents();\r\n\t\tSet<AgentInfo> selectedAgents = agentService.selectAgent(testUser, allFreeAgents, 5);\r\n\r\n\t\tassertThat(selectedAgents.size(), is(5));\r\n\r\n\t\tList<AgentInfo> selectedDedicatedAgents = selectedAgents\r\n\t\t\t.stream()\r\n\t\t\t.filter(agentInfo -> StringUtils.isNotEmpty(agentInfo.getOwner()))\r\n\t\t\t.collect(toList());\r\n\t\tassertThat(selectedDedicatedAgents.size(), is(2));\r\n\r\n\t\t// Check if recently used agents are selected.\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-1\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-3\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-5\")));\r\n\r\n\t\t// Add recently used agents.\r\n\t\trecentlyUsedAgents.add(createAgentInfo(\"test-agent-11\", \"test-region\", TEST_USER_ID));\r\n\t\trecentlyUsedAgents.add(createAgentInfo(\"test-agent-14\", \"test-region\", TEST_USER_ID));\r\n\t\thazelcastService.put(DIST_MAP_NAME_RECENTLY_USED_AGENTS, TEST_USER_ID, recentlyUsedAgents);\r\n\r\n\t\t// Add owned agents for another test.\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-8\", \"test-region\", \"another-user\"));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-9\", \"test-region\", \"another-user\"));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-10\", \"test-region\", \"another-user\"));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-11\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-12\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-13\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-14\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-15\", \"test-region\", TEST_USER_ID));\r\n\r\n\t\tselectedAgents = agentService.selectAgent(testUser, allFreeAgents, 3);\r\n\r\n\t\tassertThat(selectedAgents.size(), is(3));\r\n\t\t// Check if recently used owned agents are selected.\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-6\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-11\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-14\")));\r\n\r\n\t\thazelcastService.delete(DIST_MAP_NAME_RECENTLY_USED_AGENTS, TEST_USER_ID);\r\n\t}",
"public void randomiseBotDirections() {\n\t\tfor (int i = 0; i < bots.size(); i++) {\n\t\t\tbots.get(i).setDirection(Math.random() * 360);\n\t\t}\n\t}",
"public Location getRandomLocationForMobs() {\n\t\tfinal Location temp = getRandomLocation();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX() + 0.5, temp.getBlockY() + 0.5, temp.getBlockZ() + 0.5);\n\t}",
"public static List<StrategyAgent> createAgents() {\n\t\tdouble ratioAlt = parameters.getRatioAltruistic();\n\t\tint numberAlt = (int)Math.floor(parameters.getNAgents() * ratioAlt);\n\t\t\n\t\tList<StrategyAgent> agents = new ArrayList<StrategyAgent>();\n\t\tfor (int i = 0; i < numberAlt; i++) {\n\t\t\tStrategyAgent agent = new StrategyAgent(lastID, 0, parameters.getEtaN(), parameters.getEtaS(),\n\t\t\t\t\tparameters.getFeatures(), parameters.getNNoLearning(), parameters.getAlphabetSize(),\n\t\t\t\t\tStrategyType.ALTRUISTIC, parameters.getMemorySize());\n\t\t\tagent.architecture.ontology = Utils.getSingletonOntology();\n\t\t\tagents.add(agent);\n\t\t\tlastID++;\n\t\t}\n\t\tfor (int i = numberAlt; i < parameters.getNAgents(); i++){\n\t\t\tStrategyAgent agent = new StrategyAgent(lastID, 0, parameters.getEtaN(), parameters.getEtaS(),\n\t\t\t\t\tparameters.getFeatures(), parameters.getNNoLearning(), parameters.getAlphabetSize(),\n\t\t\t\t\tStrategyType.MUTUALISTIC, parameters.getMemorySize());\n\t\t\tagent.architecture.ontology = Utils.getSingletonOntology();\n\t\t\tagents.add(agent);\n\t\t\tlastID++;\n\t\t}\n\t\tCollections.shuffle(agents);\n\t\treturn agents;\n\t}",
"public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}",
"public Game(Agent a, Agent b) \r\n\t{\r\n\t\t// TODO Auto-generated constructor stub\r\n\t\tagent = new Agent[2];\r\n\t\tagent[0] = a;\r\n\t\tagent[1] = b;\r\n winner.setRole(2);\r\n //System.out.println(\" 1st winner role: \"+winner.role+\" agent[0]: \"+agent[0].role+\" agent[1]: \"+agent[1].role);\r\n\t\tdraw=false;\r\n\t}",
"void initAgents() {\n Runtime rt = Runtime.instance();\n\n //Create a container to host the Default Agent\n Profile p = new ProfileImpl();\n p.setParameter(Profile.MAIN_HOST, \"localhost\");\n //p.setParameter(Profile.MAIN_PORT, \"10098\");\n p.setParameter(Profile.GUI, \"false\");\n ContainerController cc = rt.createMainContainer(p);\n\n HashMap<Integer, String> neighbors = new HashMap <Integer, String>();\n neighbors.put(1, \"2, 4, 3\");\n neighbors.put(2, \"1, 3\");\n neighbors.put(3, \"1, 2, 4\");\n neighbors.put(4, \"1, 3, 5\");\n neighbors.put(5, \"4\");\n\n//Create a container to host the Default Agent\n try {\n for (int i = 1; i <= MainController.numberOfAgents; i++) {\n AgentController agent = cc.createNewAgent(Integer.toString(i), \"ru.spbu.mas.DefaultAgent\",\n new Object[]{neighbors.get(i)});\n agent.start();\n }\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n }",
"public void makeAndSendAgentID(){\n sendID(id, x, y);\n }",
"private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}",
"public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }",
"@Test\n\tpublic void testUpdatesSeeds() {\n\t\t//Arrange\n\t\tint startLoc[] = new int[]{2};\n\t\tint otherLocs[] = new int[]{0,1,3,4};\n\t\t\t\n\t\tMockito.when(randMock.generateRandomNumber(1, 4, seed)).thenReturn(startLoc);\n\t\tMockito.when(randMock.generateRandomNumber(10, 5, seed+1)).thenReturn(otherLocs);\n\t\t\t\n\t\t//Act\n\t\tlong seed = 2;\n\t\t\t\n\t\t//Assert\n\t\tassertEquals(seed, iteratorObj.startVisits());\n\t}",
"public static void main(String[] args) {\n Hero aventurier = new Hero(200, 100);\n Equipement epee = new Equipement(\"epee\", 0);\n Monsters sorciere = new Monsters(\"witch\", 180, 0);\n Monsters barbare = new Monsters(\"olaf\", 160, 0);//Degat et point attaque sont à 0 car ils prendront les valeurs du random\n\n\n System.out.println(\"Bienvenue dans le dongeon\");\n System.out.println(\"Vous avez \" + aventurier.getPointDeVie() + \" Point de vie, \" + aventurier.getFlasqueDeau() + \" flasques pour combatre vos ennemies et une \");\n\n // i=room ;si pointdevie > room-->room+1 sinon game over(pas besoin de creer une classe)\n int i = 1;\n do {\n\n if (aventurier.getPointDeVie() > 0) ;\n {\n System.out.println(\"Room\" + i);\n\n Monsters enemieActuel = barbare;\n//nbr aleatoire entre sorcier et monster\n Random random = new Random();\n int nbrAl = random.nextInt(2 );\n//si nbr=0 = sorcier sinon barbare\n if (nbrAl == 0) {\n enemieActuel = sorciere;\n //sinon barbare\n } else {\n enemieActuel = barbare;\n }\n\n\n //Si barbare faire le do while\n\n if (enemieActuel == barbare) {\n\n do { //Faire des degats aleatoire grace au random à l'aide de l'epee\n epee.setDegat((int) (5 + (Math.random() * 30)));//comme .set dega=0 on lui donne la valeur de math.random\n int degat = epee.getDegat(); //.get renvoi la valeur au int nommer degat\n barbare.setPointDeVie(barbare.getPointDeVie() - degat);//vie - degat\n System.out.println(\"Il reste au barbare \" + barbare.getPointDeVie());//nouvelle valeur de point de vie\n\n\n //idem avec l'aventurier\n barbare.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = barbare.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n // tant que les Pvie de l'aventurier >= 0 et idem barbare continuer le combat\n } while (aventurier.getPointDeVie() >= 0 && barbare.getPointDeVie() >= 0);\n //à la fin du combat si pvie de l'aventurier sont >0 et que i (room) egale 5 \"gagné\"\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n\n //Si juste pvie de l'aventurier > 0 --->room suivante\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n //on redonne les valeurs de depart pdeVie pour la nouvelle room\n aventurier.setPointDeVie(200);\n barbare.setPointDeVie(180);\n i+=1;\n }\n\n // sinon room = 6 pour envoyer le sout \"game over\"\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n\n\n\n }\n\n //IDEM avec sorciere\n else {\n do {\n\n\n aventurier.setFlasqueDeau((int) (5 + (Math.random() * 30)));\n int degat = aventurier.getFlasqueDeau();\n sorciere.setPointDeVie(sorciere.getPointDeVie() - degat);\n System.out.println(\"Il reste à la sorciere \" + sorciere.getPointDeVie());\n\n sorciere.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = sorciere.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n } while (aventurier.getPointDeVie() >= 0 && sorciere.getPointDeVie() >= 0);\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n aventurier.setPointDeVie(200);\n sorciere.setPointDeVie(160);\n i+=1;\n }\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n }\n } } while (i <= 5 && aventurier.getPointDeVie() > 0);\n\n\n }",
"protected Agent(){\n\t\trand = SeededRandom.getGenerator();\n\t}",
"public void randomizeLocations() {\n\t// Get a seeded pseudo random-number generator\n\tDate today = new Date();\n\tRandom random = new Random(today.getTime());\n\t// Reset our min and max values\n\tresetNodes();\n\n\tfor (LayoutNode node: nodeList) {\n\n\t if (!node.isLocked()) {\n\t\tdouble x = random.nextDouble() * width;\n\t\tdouble y = random.nextDouble() * height;\n\t\tnode.setLocation(x, y);\n\t\tupdateMinMax(x, y);\n\t } else {\n\t\tupdateMinMax(node.getX(), node.getY());\n\t }\n\t}\n }",
"@Override\n public void onAgentIntroduced(long agentId, LocationOnRoad currentLoc, long time) {\n agentLastAppearTime.put(agentId, time);\n agentLastLocation.put(agentId, currentLoc);\n availableAgent.add(agentId);\n }",
"@Test\n public void GivenTwoRobotsInLaserBeamThenOnlyClosestOneGetsHitByLaser() {\n int healthRobot1BeforeLaser = robot.getRobotHealthPoint();\n int healthRobot2BeforeLaser = robot2.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after laser\n int healthrobot1afterlaser = robot.getRobotHealthPoint();\n int healthrobot2afterlaser = robot2.getRobotHealthPoint();\n\n //only the assert for robot close to laser should fail (this is intentional)\n assertNotEquals(healthRobot1BeforeLaser, healthrobot1afterlaser);\n assertEquals(healthRobot2BeforeLaser, healthrobot2afterlaser);\n }",
"public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}",
"public void spawnEnemy(Location location) {\r\n\t\t\tlocation.addNpc((Npc) this.getNpcSpawner().newObject());\r\n\t\t}",
"private void setupAgents() {\r\n try {\r\n setupJade();\r\n //createAgent(Bank.class, \"Bank\");\r\n createAgent(ProductionAgent.class, \"Res1\");\r\n createAgent(ProductionAgent.class, \"Res2\");\r\n createAgent(SocialAgent.class, \"Soc\");\r\n createAgent(ClientAgent.class, \"Client\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }",
"public void addMine()\n {\n int randomRow = random.nextInt(rows);\n int randomColumn = random.nextInt(columns);\n Integer[] randomLocation = {randomRow, randomColumn};\n\n while (mineLocations.contains(randomLocation))\n {\n randomRow = random.nextInt(rows);\n randomColumn = random.nextInt(columns);\n randomLocation[0] = randomRow;\n randomLocation[1] = randomColumn;\n }\n\n mineLocations.add(randomLocation);\n }",
"public Area GetNextAreaRandom(Area area)\n\n {\n\n Random rand = new Random();\n\n int i = 0;\n\n switch(area.paths)\n\n {\n\n case Constants.North:\n\n i = rand.nextInt(2);\n\n if(i==0)\n\n return area.areaMap.get(Constants.North);\n\n if(i==1)\n\n return area;\n\n case Constants.South:\n\n if(i==0)\n\n return area.areaMap.get(Constants.South);\n\n if(i==1)\n\n return area;\n\n \n\n case Constants.East:\n\n if(i==0)\n\n return area.areaMap.get(Constants.East);\n\n if(i==1)\n\n return area;\n\n \n\n case Constants.West:\n\n if(i==0)\n\n return area.areaMap.get(Constants.West);\n\n if(i==1)\n\n return area;\n\n \n\n \n\n case Constants.NorthAndSouth:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area;\n\n case Constants.NorthAndEast:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 2)\n\n return area;\n\n case Constants.NorthAndWest:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 2)\n\n return area;\n\n case Constants.SouthAndEast:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area;\n\n case Constants.SouthAndWest:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area;\n\n case Constants.EastAndWest:\n\n i = rand.nextInt(3);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 2)\n\n return area;\n\n case Constants.NorthSouthAndEast:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 3)\n\n return area;\n\n case Constants.NorthSouthAndWest:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 3)\n\n return area;\n\n case Constants.NorthEastAndWest:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 3)\n\n return area;\n\n case Constants.SouthEastAndWest:\n\n i = rand.nextInt(4);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 3)\n\n return area;\n\n \n\n case Constants.NorthSouthEastAndWest:\n\n i = rand.nextInt(5);\n\n if(i == 0)\n\n return area.areaMap.get(Constants.West);\n\n if(i == 1)\n\n return area.areaMap.get(Constants.South);\n\n if(i == 2)\n\n return area.areaMap.get(Constants.North);\n\n if(i == 3)\n\n return area.areaMap.get(Constants.East);\n\n if(i == 4)\n\n return area;\n\n }\n\n \n\n return area;\n\n \n\n \n\n }",
"@Override\n\tpublic void spawn(Location loc) {\n\t\t\n\t}",
"@Test\n \tpublic void testTargetRandomSelection() {\n \tComputerPlayer player = new ComputerPlayer();\n \t// Pick a location with no rooms in target, just three targets\n \tboard.calcTargets(23, 7, 2);\n \tint loc_24_8Tot = 0;\n \tint loc_22_8Tot = 0;\n \tint loc_21_7Tot = 0;\n \t// Run the test 100 times\n \tfor (int i=0; i<100; i++) {\n \t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\tif (selected == board.getRoomCellAt(24, 8))\n \t\t\tloc_24_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(22, 8))\n \t\t\tloc_22_8Tot++;\n \t\telse if (selected == board.getRoomCellAt(21, 7))\n \t\t\tloc_21_7Tot++;\n \t\telse\n \t\t\tfail(\"Invalid target selected\");\n \t}\n \t// Ensure we have 100 total selections (fail should also ensure)\n \tassertEquals(100, loc_24_8Tot + loc_22_8Tot + loc_21_7Tot);\n \t// Ensure each target was selected more than once\n \tassertTrue(loc_24_8Tot > 10);\n \tassertTrue(loc_22_8Tot > 10);\n \tassertTrue(loc_21_7Tot > 10);\t\t\t\t\t\t\t\n }",
"static String getRandomAgentName() {\n\n if (_names.isEmpty() && count == 0) {\n initializeNames();\n count++;\n }\n int i = (int) (Math.random() * _names.size());\n String name = \"\";\n try {\n name = _names.remove(i);\n } catch (Exception e) {\n System.out.println(\"NS Error: No more names to hand out.\");\n }\n\n return name;\n }",
"private void createPosition() {\n\n switch (new Random().nextInt(4)) {\n\n case 0:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":-90\";\n break;\n\n case 1:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":\" + (Window.HEIGHT + 90);\n break;\n\n case 2:\n sendString = \"-90:\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n\n case 3:\n sendString = (Window.WIDTH + 90) + \":\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n }\n sendString += \":\" + new Random().nextInt(4);\n sendString += \":\" + new Random().nextInt(2);\n }",
"protected abstract Simulate collectAgentData ();",
"public Point randomLocation() {\r\n\t\tRandom rand = new Random();\r\n\t\treturn new Point(this.location.getPosition().getX()+ rand.nextInt() % location.getSize().getHeight(),this.location.getPosition().getY()+ rand.nextInt() % location.getSize().getWidth());\r\n\t}",
"public Node passAgent(){\n int length = liveNeighbors.size();\n Random rnd = new Random();\n boolean stat = false;\n Node node=null;\n while(!stat) {\n int len = rnd.nextInt(length);\n node = liveNeighbors.get(len);\n stat = node.recieveAgent(agent);\n }\n agent = null;\n updateScreen(\"removeBorder\");\n return node;\n }",
"@Test\r\n public void testAttachAgentToMission() {\r\n Agent agent = jamesBond;\r\n Mission mission = infiltrateSPD;\r\n missionManager.createMission(mission);\r\n agentManager.create(agent);\r\n manager.attachAgentToMission(agent, mission);\r\n \r\n }",
"public Ant(){ // The position and direction of the ant is completely randomizated in it's creation\n this.position[0] = (int)Math.floor(Math.random() * 20); \n this.position[1] = (int)Math.floor(Math.random() * 20);\n this.image = (int)Math.floor(Math.random() * 4);\n }",
"@Test\n\tpublic void testStartVisitsPrintsOtherLocations() {\n\t\t//Arrange\n\t\tint startLoc[] = new int[]{2};\n\t\tint otherLocs[] = new int[]{0,1,3,4};\n\t\t\n\t\tMockito.when(randMock.generateRandomNumber(1, 4, seed)).thenReturn(startLoc);\n\t\tMockito.when(randMock.generateRandomNumber(10, 5, seed+1)).thenReturn(otherLocs);\n\t\t\n\t\t//Act\n\t\titeratorObj.startVisits();\n\t\t\n\t\t//Assert\n\t\tMockito.verify(printerMock, times(1)).printVisits(\"The Point\", visitorMock, false);\n\t\tMockito.verify(printerMock, times(1)).printVisits(\"The Cathedral of Learning\", visitorMock, false);\n\t\tMockito.verify(printerMock, times(1)).printVisits(\"Squirrel Hill\", visitorMock, false);\n\t\tMockito.verify(printerMock, times(1)).printVisits(\"Downtown\", visitorMock, false);\n\t}",
"private void locateApple() {\n xApplePosition = random.nextInt(32);\n yApplePosition = random.nextInt(21);\n }",
"public void moveAllAgents() {\n\t\tPoint moveTo \t\t= null;\n\t\tGameClient client \t= null;\n\t\t\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\t\tclient = HandleCommunication.findClient(p.getName(), server.getConnectedClientList());\n\t\t\t\tmoveTo = getSafeTeleportPosition();\n\t\t\t\tmovePlayer(p.getName(), p.getPosition(), moveTo, false);\n\t\t\t\tserver.sendMessageToClient(client.getClientSocket(), \"@124@\" + moveTo.x + \"@\" + moveTo.y + \"@\");\n\t\t\t}\n\t\t}\n\t}",
"public void enemySpawn(String typeofEnemy) {\n if (spawnTimer == 0) {\n if (typeofEnemy.equals(\"bee\")) {\n outerloop:\n//label to later break when enemy is spawned\n for (int row = 3; row < 5; row++) {\n for (int column = 0; column < 8; column++) {\n if (canSpawn[row][column] == false) {\n handler.getGalagaState().entityManager.entities.add(new EnemyBee(x, y, 32, 32, handler, row, column));\n canSpawn[row][column] = true;\n spawnTimer = random.nextInt(60 * 7);\n break outerloop;\n } else continue;\n }\n }\n } else {//ENEMYOTHER\n outerloop:\n for (int row = 1; row < 3; row++) {\n for (int column = 0; column < 8; column++) {\n if (canSpawn[row][column] == false) {\n handler.getGalagaState().entityManager.entities.add(new EnemyOther(x, y, 32, 32, handler, row, column));\n canSpawn[row][column] = true;\n spawnTimer = random.nextInt(60 * 7);\n break outerloop;\n } else continue;\n }\n }\n\n }\n }\n else {\n spawnTimer--;\n }\n\n// int enemyType = random.nextInt(2);\n// spawnTimer--;\n// if (spawnTimer == 0) {\n// if (typeofEnemy.equals(\"bee\")) {\n// int row = random.nextInt(2) + 3, column = random.nextInt(8);\n// if (canSpawn[row][column] == false) {\n// handler.getGalagaState().entityManager.entities.add(new EnemyBee(x, y, 32, 32, handler, row, column));\n// canSpawn[row][column] = true;\n// } else {\n// return;\n// }\n// } else {\n// int row = random.nextInt(2) + 1, column = random.nextInt(8);\n// if (canSpawn[row][column] == false) {\n// handler.getGalagaState().entityManager.entities.add(new EnemyOther(x, y, 32, 32, handler, row, column));\n// canSpawn[row][column] = true;\n// }\n// }\n// }\n// else{\n// spawnTimer--;\n// }\n\n\n\n\n }",
"public static Location genRandomSpawn() {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = WIDTH / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, 0, z));\n }",
"public Location getRandomLocationForPlayers() {\n\t\tfinal Location temp = getRandomLocationForMobs();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX(), temp.getBlockY() + 1, temp.getBlockZ());\n\t}",
"public MyAgent(World world)\n {\n w = world; \n }",
"@Test\r\n public void testFindMissionWithAgent() {\r\n \r\n Agent agent = jamesBond;\r\n Mission mission = infiltrateSPD;\r\n missionManager.createMission(mission);\r\n agentManager.create(agent);\r\n manager.attachAgentToMission(agent, mission);\r\n \r\n assertEquals(manager.findMissionWithAgent(agent), mission);\r\n \r\n }",
"public void setWhoGoesFirstRandom() {\n Random ran = new Random();\n int i = ran.nextInt(2) + 1;\n if(i == 1) {\n setWhoGoesFirst(humanPlayer);\n } else {\n setWhoGoesFirst(aiPlayer);\n }\n }",
"void random_alien_fires() {\n Random rand = new Random();\n int alien_index = rand.nextInt(aliens.size());\n alien_shoot_missile(aliens.get(alien_index));\n }",
"@Test\n void getLocations() {\n GPSObject n2 = new GPSObject(\"Centenary 1\");\n Location n1 = new Location(\"Centenary 1\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1\");\n Location n4 = new Location(\"Thuto 1\",\"1\",n3);\n Locations loc = new Locations();\n Route roo = new Route(\"roo\", loc);\n assertTrue(roo.getLocations().equals(loc));\n }",
"@Test\n public void testAct() {\n world.add(new Location(FOUR , FOUR), jumper);\n jumper.act();\n jumper.act();\n assertEquals(new Location(ZERO, FOUR), jumper.getLocation());\n }",
"@Test\n \tpublic void testTargetLocationAlwaysSelected() {\n \t\tComputerPlayer player = new ComputerPlayer();\n \t\tplayer.setLastVistedRoom('L');\n \t\tint enteredRoom = 0;\n \t\tboard.calcTargets(6, 7, 4);\n \t\t//pick location with at least one room as a target\n \t\tfor(int i = 0; i < 100; i++) {\n \t\t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\t\tif (selected == board.getRoomCellAt(4, 6))\n \t\t\t\tenteredRoom++;\n \t\t}\n \t\t//ensure room is taken every time\n \t\tAssert.assertEquals(enteredRoom, 100);\n \t}",
"@Test\n public void testplaceRandomChecker()\n {\n player2.placeChecker(0, 0);\n \n // 1) Create Available Moves & Add To Player 1's Moves Collection\n // 2) Pick an Available Move at Random\n Move randomMove = player1.generateRandomMove();\n \n int x = randomMove.getX();\n int y = randomMove.getY();\n \n // Check that X coordinate of Random Move is Up/Down/Unchanged\n assertTrue(x == player2.getXPosition()+1 || x== player2.getXPosition()-1 || x== player2.getXPosition());\n \n // Check that Y coordinate of Random Move is Left/Right/Unchanged\n assertTrue(y == player2.getYPosition()+1 || y== player2.getYPosition()-1 || y== player2.getYPosition());\n \n // Check Random Move Was Successfull\n assertEquals(player1,game.getBoard()[x][y].getOwner()); \n \n }",
"@Override\n\tpublic void randomRoom() {\n\t\tint randSide = random.nextInt(3) + 1;\n\t\tString side = properties.getSideFromProperties().get(randSide);\n\t\tint randRoom = random.nextInt(6) + 1;\n\t\tthis.room = properties.getRoomFromProperties().get(randRoom);\n\t\tthis.side = this.room.substring(0, 1).toLowerCase() + side;\n\t}",
"private void randMove(Person[] array){\r\n\t\t\tlogger.info(\"randMoving starts\");\r\n\t\t\tArrayList<Integer> remaining = new ArrayList<>();\r\n\t\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\t\tremaining.add(i);\r\n\t\t\t}\r\n\t\t\tint step = 0;\r\n\t\t\tboolean isAgentArray = false;\r\n\t\t\tif(array[0] instanceof Agent) isAgentArray = true;\r\n\r\n\t\t\t//select from remaining index when remaining is not empty\r\n\t\t\twhile (step<array.length) {\r\n\t\t\t\tint index = randInt(0,remaining.size()-1);\r\n\t\t\t\tif(remaining.get(index)>=0){\r\n\t\t\t\t\t//move agents and cops here\r\n\t\t\t\t\tif(isAgentArray){\r\n\t\t\t\t\t\tif(agents[index].getJailTerm() == 0)\r\n\t\t\t\t\t\t\tagents[index].move();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse cops[index].move();\r\n\t\t\t\t\tremaining.set(index,-1);\r\n\t\t\t\t\tstep++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.info(\"randmove finished after \" + step + \"iterations.\");\r\n\t\t}",
"private static void spawnAtRandomLocation(World world, GameObject gameObject, double radius) {\n Location location = new Location();\n gameObject.setLocation(location);\n boolean found = false;\n while (!found) {\n double x = Math.random() * (world.mNortheast.getX() - world.mSouthwest.getX());\n double y = Math.random() * (world.mNortheast.getY() - world.mSouthwest.getY());\n location.setX(x);\n location.setY(y);\n found = !world.collides(gameObject, radius);\n }\n world.registerGameObject(gameObject);\n Main.logger.log(Logger.VERBOSE, \"Spawning \" + gameObject + \" @ \" + gameObject.getLocation());\n }",
"public GeneralAgent createAgent(String[] args, EnvironmentInterface env) {\n\t\tboolean meld = false;\n\t\tif(!getArgument(args, \"-meld\").equals(\"\"))\n\t\t\tmeld = Boolean.parseBoolean(getArgument(args, \"-meld\"));\n\t\tif(meld)\n\t\t{\n\t\t\tString[] meldArgs = getArguments(args, \"-meld\", 3);\n\t\t\tdouble[] moralVals = {Double.valueOf(meldArgs[1]), Double.valueOf(meldArgs[2])};\n\t\t\tActionSelect.setMoralValues(moralVals);\n\t\t}\n\t\tboolean pipe = false;\n\t\tif(!getArgument(args, \"-pipe\").equals(\"\"))\n\t\t\tpipe = Boolean.parseBoolean(getArgument(args, \"-pipe\"));\n\t\tif(pipe)\n\t\t\tActionSelect.setMoralFilterEnabled(false);\n\t\tboolean moralTamer = false;\n\t\tif(!getArgument(args, \"-moral\").equals(\"\"))\n\t\t\tmoralTamer = Boolean.parseBoolean(getArgument(args, \"-moral\"));\n\t\tboolean learning = true;\n\t\tif(!getArgument(args, \"-learning\").equals(\"\"))\n\t\t\tlearning = Boolean.parseBoolean(getArgument(args, \"-learning\"));\n\t\tthis.processArgs(args);\n\t\tRotationAgent r = createTetrisMultiagent(args,2);\n\t\taddTableTracer(r, args);\n\t\tif(moralTamer)\n\t\t{\n\t\t\taddHumanProxy(r, args, learning);\n\t\t\tint index = 0;\n\t\t\tfor(GeneralAgent g : r)\n\t\t\t{\n\t\t\t\taddEfficiencyProxy((MoralTamerAgent)((ExtActionAgentWrap)g).coreAgent, index++, learning);\n\t\t\t\t((MoralTamerAgent)((ExtActionAgentWrap)g).coreAgent).perfectly_moral = !learning;\n\t\t\t}\n\t\t}\n\t\treturn r;\n//\t\treturn createTetrisAgent(args);\n\t}",
"private void enemy_choose_player(){\n\t\tint i;\n\t\tRandom r_gen = new Random();\n\t\tfor(i=0;i<enemy_num;i++){\n\t\t\tenemy[i][2] = r_gen.nextInt(player_num);\n\t\t}\n\t}",
"private void generateRandomPosition() {\r\n int indexX, indexY;\r\n boolean collidesWithPlayers;\r\n playerState.position.x = Integer.MIN_VALUE; // While we trying...\r\n playerState.position.y = Integer.MIN_VALUE;\r\n final ExtensiveMovingObject testObject = new ExtensiveMovingObject( 0.0f, 0.0f, 0.0f, 0.0f, GeneralConsts.WORM_WIDTH, GeneralConsts.WORM_HEIGHT );\r\n int positionGenerationTrialFailureCounter = 0;\r\n do {\r\n do {\r\n indexX = 1 + (int) ( Math.random() * ( map.getWidth () - 1 ) );\r\n indexY = 1 + (int) ( Math.random() * ( map.getHeight() - 1 ) );\r\n if ( positionGenerationTrialFailureCounter++ == MAX_POSITION_GENERATION_TRIAL_FAILURE_COUNT )\r\n if ( map.getWall( indexX, indexY ) == Map.WALL_STONE )\r\n map.setWall( indexX, indexY, Map.WALL_BRICK ); // Not to empty: it can be under water!!\r\n } while( map.getWall( indexX, indexY ) == Map.WALL_STONE ); // Stone can't be cleared: it can be part of swimming pool boundaries. (But if there isn't other places where to start, we clear it!)\r\n testObject.position.x = ( indexX << GeneralConsts.WALL_WIDTH_SHIFT ) + GeneralConsts.WALL_WIDTH / 2;\r\n testObject.position.y = ( indexY << GeneralConsts.WALL_HEIGHT_SHIFT ) + GeneralConsts.WALL_HEIGHT / 2;\r\n collidesWithPlayers = false;\r\n for ( int playerIndex = 0; playerIndex < players.length && !collidesWithPlayers; playerIndex++ )\r\n if ( playerIndex != ownIndex && players[ playerIndex ] != null && testObject.hitsExtensiveObject( players[ playerIndex ].playerState ) )\r\n collidesWithPlayers = true;\r\n try {\r\n Thread.sleep( 0, 100 );\r\n }\r\n catch( InterruptedException ie ) {\r\n }\r\n } while ( collidesWithPlayers );\r\n playerState.position.x = testObject.position.x;\r\n playerState.position.y = testObject.position.y;\r\n map.clearMapForEnteringPlayer( indexX, indexY );\r\n }",
"City(){\n x_coordinate = (int)(Math.random()*200);\n y_coordinate = (int)(Math.random()*200);\n }",
"private String RandomGoal() {\n\t\tList<String> list = Arrays.asList(\"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"t\", \"t\");\n\t\tRandom rand = new Random();\n\t\tString randomgoal = list.get(rand.nextInt(list.size()));\n\n\t\treturn randomgoal;\n\t}",
"@Test\n public void alienAttacksMultipleTargets() throws FileNotFoundException,\n URISyntaxException, DisconnectedException {\n // preparo il terreno\n MatchController matchController = new MatchController() {\n @Override\n public void initMatch(PartyController partyController)\n throws FileNotFoundException, URISyntaxException {\n this.partyController = partyController;\n this.match = new Match();\n this.turnController = new TurnController(this);\n ZoneFactory zf = new TemplateZoneFactory(\n EftaiosGame.DEFAULT_MAP);\n this.zoneController = new ZoneController(zf);\n\n }\n\n @Override\n public void checkEndGame() {\n }\n\n @Override\n protected void notifyAPlayerAbout(Player player, String about) {\n }\n\n @Override\n protected void showCardToParty(Card card) {\n }\n\n @Override\n protected void updateDeckView(Player player) {\n }\n\n @Override\n protected void sendMapVariationToPlayer(Player player, Sector sec,\n SectorHighlight highlight) {\n }\n\n @Override\n protected void sendViewModelToAPlayer(Player p, ViewModel content) {\n }\n };\n\n PlayerCard alien = new PlayerCard(PlayerRace.ALIEN, null);\n PlayerCard human = new PlayerCard(PlayerRace.HUMAN, null);\n Party party = new Party(\"test\", new EftaiosGame(), false);\n PartyController partyController = PartyController.createNewParty(party);\n party.addToParty(UUID.randomUUID(), \"player1\");\n party.addToParty(UUID.randomUUID(), \"player2\");\n party.addToParty(UUID.randomUUID(), \"player3\");\n party.addToParty(UUID.randomUUID(), \"player4\");\n party.addToParty(UUID.randomUUID(), \"player5\");\n party.addToParty(UUID.randomUUID(), \"player6\");\n List<Player> players = new ArrayList<Player>(party.getMembers()\n .keySet());\n Player player1 = players.get(0);\n Player player2 = players.get(1);\n Player player3 = players.get(2);\n Player player4 = players.get(3);\n Player player5 = players.get(4);\n Player player6 = players.get(5);\n player1.setIdentity(alien);// attaccante\n player2.setIdentity(alien);// alieno in loco\n player3.setIdentity(alien);// alieno difeso\n player4.setIdentity(human);// umano indifeso\n player5.setIdentity(human);// umano altrove\n player6.setIdentity(human);// umano difeso\n ItemCard defenseCard1 = new ItemCard(Item.DEFENSE);\n ItemCard defenseCard2 = new ItemCard(Item.DEFENSE);\n ItemCard spotlightCard = new ItemCard(Item.SPOTLIGHT);\n ItemCard card2 = new ItemCard(Item.SEDATIVES);\n ItemCard card3 = new ItemCard(Item.ATTACK);\n player3.getItemsDeck().getCards().add(defenseCard1);\n player4.getItemsDeck().getCards().add(spotlightCard);\n player4.getItemsDeck().getCards().add(card2);\n player4.getItemsDeck().getCards().add(card3);\n player6.getItemsDeck().getCards().add(defenseCard2);\n\n matchController.initMatch(partyController);\n\n Turn turn = new Turn(player1, matchController.getMatch().getTurnCount());\n matchController.getTurnController().setTurn(turn);\n matchController.getTurnController().getTurn().setMustMove(false);\n HexPoint point = HexPoint.fromOffset(1, 1);\n Sector sec = new Sector(null, point);\n HexPoint point2 = HexPoint.fromOffset(2, 3);\n Sector sec2 = new Sector(null, point2);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player1, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player2, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player3, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player4, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player5, sec2);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player6, sec);\n matchController.getTurnController().getTurn().setCanAttack(true);\n ActionRequest action = new ActionRequest(ActionType.ATTACK, null, null);\n // eseguo l'azione\n Attack atk = new Attack() {\n @Override\n protected void notifyInChatByCurrentPlayer(String what) {\n }\n\n @Override\n protected void notifyCurrentPlayerByServer(String what) {\n }\n };\n atk.initAction(matchController, action);\n if (atk.isValid())\n atk.processAction();\n // verifico gli esiti\n assertTrue(player1.getKillsCount() == 1);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player1).equals(sec));\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player2) == matchController.endingSector);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player3) == matchController.endingSector);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player4) == matchController.endingSector);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player5).equals(sec2));\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player6).equals(sec));\n assertFalse(matchController.getMatch().getDeadPlayer()\n .contains(player1));\n assertTrue(matchController.getMatch().getDeadPlayer().contains(player2));\n assertTrue(matchController.getMatch().getDeadPlayer().contains(player3));\n assertTrue(matchController.getMatch().getDeadPlayer().contains(player4));\n assertFalse(matchController.getMatch().getDeadPlayer()\n .contains(player5));\n assertFalse(matchController.getMatch().getDeadPlayer()\n .contains(player6));\n assertTrue(matchController.getMatch().getDeadPlayer().size() == 3);\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(defenseCard1));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(defenseCard2));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(spotlightCard));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(card2));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(card3));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket().size() == 5);\n assertFalse(player3.getItemsDeck().getCards().contains(defenseCard1));\n assertFalse(player4.getItemsDeck().getCards().contains(spotlightCard));\n assertFalse(player4.getItemsDeck().getCards().contains(card2));\n assertFalse(player4.getItemsDeck().getCards().contains(card3));\n assertFalse(player6.getItemsDeck().getCards().contains(defenseCard2));\n }",
"public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }",
"private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }",
"public WaiterAgent(String name, RestaurantGui gui, AStarTraversal aStar,\n\t\t Restaurant restaurant, Table[] tables) {\n\tsuper();\n\tthis.gui = gui;//main gui\n\tthis.name = name;\n\tthis.aStar = aStar;\n\tthis.restaurant = restaurant;//the layout for astar\n\twaiter = new Waiter(name.substring(0,2), new Color(255, 0, 0), restaurant);\n\t//currentPosition = new Position(3,13);\n\tcurrentPosition = new Position(waiter.getX(), waiter.getY());\n\tcurrentPosition.moveInto(aStar.getGrid());\n\toriginalPosition = currentPosition;//save this for moving into\n\tthis.tables = tables;\n\n\tString query =\n \"1 (?person)(and (person ?person)(hasname ?person \\\"\" + name+\"\\\"))\";\n loomInstance = PowerloomHelper.retrieve1(query);\n if (loomInstance!=null){\n PowerloomHelper.getloomMap().put(loomInstance, this);\n System.out.println(\"Found person in knowledge base: \" + loomInstance);\n }\n else {\n System.out.println(\"No waiter found. Instantiating...\");\n loomInstance = PowerloomHelper.instantiate(\"person\",this);//puts it in map\n\n String h = PowerloomHelper.instantiate(\"home\",null);\n query = \"(and (workingWaiter \" + loomInstance + \")\"\n +\"(haslocation \" +h+\" \"+gui.getneighborhoodInstance()\n +\") (lives \"+ loomInstance+\" \"+h+\")(hasname \"\n + loomInstance+\" \\\"\"+name+\"\\\"))\";\n print(\"asserting facts about new instance:\"+query);\n PLI.sAssertProposition(query, PowerloomHelper.getWorkingModule(), null);\n }\n\n }",
"public void join(Agent agent) throws RemoteException {\nSystem.out.println(\"Em join: agent = \" + agent.toXml());\n\t\tint row = agent.getRow();\n\t\tint col = agent.getColumn();\n\t\tPoint pos = new Point(row, col);\n\t\tagents.put(agent.getName(), pos);\n\t\tSet s = (Set) agentPositions.get(pos);\n\t\ts.add(agent);\n\t\tString fileName;\n\t\tif (agent instanceof Explorer) {\n\t\t\tfileName = EXPLORER_FILE;\n\t\t} else {\n\t\t\tfileName = WUMPUS_FILE;\n\t\t}\n\t\taddImage(row, col, agent.getName(), fileName);\n\t\tsetDirection(row, col, agent.getName(), agent.getDirection());\n\t\tif (agent instanceof Wumpus) {\n\t\t\tcheckStench(row + 1, col - 1, row - 1, col + 1);\n\t\t}\n\t}",
"@Test\n public void testAct() {\n world.add(new Location(2, 0), jumper);\n jumper.act();\n jumper.act();\n assertEquals(new Location(0, 0), jumper.getLocation());\n jumper.act();\n jumper.act();\n assertEquals(new Location(0, 2), jumper.getLocation());\n }",
"public void setRandomSpawn(final Random random)\r\n {\r\n final List<Double> rows = new ArrayList<>();\r\n \r\n final double column;\r\n \r\n //get a random true/false result\r\n if (random.nextBoolean())\r\n {\r\n //here we will do west\r\n column = 0.5;\r\n }\r\n else\r\n {\r\n //here we will do east\r\n column = COLUMNS - 0.5;\r\n }\r\n \r\n for (double row=0; row < ROWS; row++)\r\n {\r\n //if platform exists add this as a possibility\r\n if (getObject(Type.Platform, (int)column, row) != null)\r\n rows.add(row);\r\n }\r\n \r\n super.setCol(column);\r\n \r\n final int index = random.nextInt(rows.size());\r\n super.setRow(rows.get(index) + 0.5);\r\n }",
"@Override\n\tprotected void onInitialAgentsCreation() {\n\t\tSystem.out.println(\"Création drones\");\n\t\tDrone drone = null;\n\t\tDroneBuilder droneBuilder;\n\t\tfor (int i = 0; i < INITIAL_DRONE_COUNT; i++) {\n\t\t\tdrone = new Drone(this, getEnvironment().getRandom().nextInt(World.WIDTH), getEnvironment().getRandom().nextInt(World.HEIGHT));\n\t\t\tdroneBuilder = new DroneBuilder();\n\t\t\tdroneBuilder.setDrone(drone);\n\t\t\tdroneBuilder.buildBehaviorStates();\n\t\t\tdroneBuilder.buildAgentPhase();\n\t\t}\n\t}",
"@Test\n public void partyTour() throws FileNotFoundException, URISyntaxException,\n DisconnectedException {\n MatchController matchController = new MatchController() {\n @Override\n public void initMatch(PartyController partyController)\n throws FileNotFoundException, URISyntaxException {\n this.partyController = partyController;\n this.match = new Match();\n this.turnController = new TurnController(this) {\n @Override\n protected boolean isPlayerOffline(Player player) {\n return false;\n }\n\n @Override\n protected void notify(Player nextPlayer) {\n }\n\n };\n ZoneFactory zf = new TemplateZoneFactory(\n EftaiosGame.DEFAULT_MAP);\n this.zoneController = new ZoneController(zf);\n }\n\n @Override\n public void checkEndGame() {\n }\n\n };\n PlayerCard alien = new PlayerCard(PlayerRace.ALIEN, null);\n PlayerCard human = new PlayerCard(PlayerRace.HUMAN, null);\n Party party = new Party(\"test\", new EftaiosGame(), false);\n PartyController partyController = PartyController.createNewParty(party);\n party.addToParty(UUID.randomUUID(), \"player1\");\n party.addToParty(UUID.randomUUID(), \"player2\");\n party.addToParty(UUID.randomUUID(), \"player3\");\n party.addToParty(UUID.randomUUID(), \"player4\");\n party.addToParty(UUID.randomUUID(), \"player5\");\n party.addToParty(UUID.randomUUID(), \"player6\");\n party.addToParty(UUID.randomUUID(), \"player7\");\n List<Player> players = new ArrayList<Player>(party.getMembers()\n .keySet());\n Player player1 = players.get(0);\n Player player2 = players.get(1);\n Player player3 = players.get(2);\n Player player4 = players.get(3);\n Player player5 = players.get(4);\n Player player6 = players.get(5);\n Player player7 = players.get(6);\n player1.setIdentity(alien);\n player2.setIdentity(alien);\n player3.setIdentity(alien);\n player4.setIdentity(alien);\n player5.setIdentity(human);\n player6.setIdentity(human);\n player7.setIdentity(human);\n matchController.initMatch(partyController);\n\n // turno di partenza\n Player startPlayer = new Player(\"\", 9);\n for (Player nextPlayer : players) {\n if (nextPlayer.getIndex() == 7) {\n startPlayer = nextPlayer;\n }\n }\n Turn turn = new Turn(startPlayer, matchController.getMatch()\n .getTurnCount());\n matchController.getTurnController().setTurn(turn);\n assertTrue(matchController.getTurnController().getTurn()\n .getCurrentPlayer().equals(startPlayer));\n int num = matchController.getMatch().getTurnCount();\n\n // cerco il player successivo\n Player endPlayer = new Player(\"\", 9);\n for (Player nextPlayer : players) {\n if (nextPlayer.getIndex() == 1) {\n endPlayer = nextPlayer;\n }\n }\n\n // eseguo\n matchController.getTurnController().nextTurn();\n\n // verifico\n assertTrue(matchController.getTurnController().getTurn()\n .getCurrentPlayer().equals(endPlayer));\n assertTrue(matchController.getMatch().getTurnCount() == num + 1);\n }",
"public void makeMove(Location loc)\n {\n \tLocation curLoc = getLocation();\n \tint curDirection = getDirection();\n // get 2 left locations\n\t\tLocation leftNeighborLoc = curLoc.getAdjacentLocation(curDirection + Location.LEFT);\n Location leftNextNeighborLoc = leftNeighborLoc.getAdjacentLocation(curDirection + Location.LEFT);\n // get 2 right locations\n Location rightNeighborLoc = curLoc.getAdjacentLocation(curDirection + Location.RIGHT);\n Location rightNextNeighborLoc = rightNeighborLoc.getAdjacentLocation(curDirection + Location.RIGHT);\n // initial a null\n Actor leftNeighborActor = null;\n Actor leftNextNeighborActor = null;\n Actor rightNeighborActor = null;\n Actor rightNextNeighborActor = null;\n\n boolean isLeftValid = false;\n boolean isRightValid = false;\n\n Grid<Actor> grid = getGrid();\n // if left valid\n if (grid.isValid(leftNeighborLoc) && grid.isValid(leftNextNeighborLoc))\n {\n \tleftNeighborActor = grid.get(leftNeighborLoc);\n \tleftNextNeighborActor = grid.get(leftNextNeighborLoc);\n \t\n \tif (leftNeighborActor == null && leftNextNeighborActor == null) {\n \t\tisLeftValid = true;\n }\n }\n // if right valid\n if (grid.isValid(rightNeighborLoc) && grid.isValid(rightNextNeighborLoc))\n {\n \trightNeighborActor = grid.get(rightNeighborLoc);\n \trightNextNeighborActor = grid.get(rightNextNeighborLoc);\n\n \tif (rightNeighborActor == null && leftNextNeighborActor == null) {\n \t\tisRightValid = true;\n }\n }\n // if both valid\n if (isLeftValid && isRightValid)\n {\n\t // move ramdonly\n if (Math.random() < 0.5)\n\t {\n\t \tmoveTo(leftNextNeighborLoc);\n\t \n\t }\n\t else{\n\t \tmoveTo(rightNextNeighborLoc);\n\t }\n }\n // right valid only\n else if (isRightValid && !isLeftValid)\n {\n \tmoveTo(rightNextNeighborLoc);\n }\n // left valid only\n else if (!isRightValid && isLeftValid)\n {\n \tmoveTo(leftNextNeighborLoc);\n }\n else\n {\n \tsuper.makeMove(loc);\n }\n \n }",
"private void random() {\n\n\t}",
"@Override\n public void nextTuple() {\n final Random rand = new Random();\n int instanceRandom = rand.nextInt(MAX_RANDOM);\n if(instanceRandom == referenceRandom){\n collector.emit(new Values(\"Hello World\"));\n } else {\n collector.emit(new Values(\"Other Random Word\"));\n }\n }",
"boolean shouldAutoAggro(IGeneticMob geneticMob, EntityLiving otherEntity);",
"public void play()\r\n\t{\r\n \r\n\t\tupdateMessage(\"Starting \" + name + \" between \"+ agent[0].name+ \" and \"+ agent[1].name+\".\");\r\n random = new Random(System.currentTimeMillis());\r\n\t\tint turn = random.nextInt(2);\r\n first=turn;\r\n\t\tint dimension=8;\r\n\t\t//System.out.println(agent[turn].name+ \" makes the first move.\");\r\n\t\t//initialize(false,dimension,dimension);\r\n set(agent[first].role);\r\n agent[0].setAvailable(agent[first].role, dimension);\r\n agent[1].setAvailable(agent[first].role, dimension);\r\n \r\n \r\n\t\t//showGameState();\r\n \r\n\t\twhile(!isFinished())\r\n\t\t{\r\n\t\t\tupdateMessage(agent[turn].name+ \"'s turn. \");\r\n\t\t\tagent[turn].makeMove(this);\r\n agent[(turn+1)%2].off(agent[turn].newx,agent[turn].newy );\r\n agent[(turn+1)%2].setNew((OTHELLO)this);\r\n \r\n \r\n\t\t\tshowGameState();\r\n\t\t\t\r\n\t\t\tturn = (turn+1)%2;\r\n\t\t}\r\n\t\t\r\n // System.out.println(\" final winner role: \"+winner.role+\" agent[0]: \"+agent[0].role+\" agent[1]: \"+agent[1].role);\r\n \r\n\t\t\r\n\t\tif(draw)\t\r\n\t\t\tupdateMessage(\"Game drawn!!\");\r\n else updateMessage(winner.name+ \" wins!!!\");\r\n\t\t\r\n\t}",
"private static AgentInfo newAgent(StringTokenizer in) {\n AgentInfo agent = new AgentInfo();\n agent.setGroupId(Factory.getRandomGroup());\n agent.setName(Factory.getRandomAgentName());\n String agentId = in.nextToken();\n String ip = in.nextToken();\n int port = Integer.parseInt(in.nextToken());\n int agentPort = Integer.parseInt(in.nextToken());\n agent.setAgentId(agentId);\n agent.setCurLocation(new HostInfo(ip, port));\n agent.setPort(agentPort);\n AgentInfoList.add(agent);\n\n /*\n * adds to the tally of how many agents are using the host.\n */\n List<HostInfo> hosts = HostInfoList.getList();\n\n for (HostInfo h : hosts) {\n if (h.equals(agent.getCurLocation())) {\n h.incNumAgents();\n }\n }\n\n return agent;\n\n\n }",
"public static void main(String[] args) {\n\n List<Mine> mines = new ArrayList<>();\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new UraniumMine(100));\n mines.add(new MoonMine(10));\n mines.add(new MoonMine(10));\n mines.add(new HadronCollider(1));\n\n List<EnergyPlant> energyPlants = new ArrayList<>();\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new AnnihilationPlant(25000));\n energyPlants.add(new AnnihilationPlant(25000));\n\n\n var simulation = new Simulation(null, mines, energyPlants);\n simulation.run();\n\n }",
"private void spawnEnemy() {\n float randomEnemy = (float) Math.random();\n\n if (round == 1) {\n addActorFunction.accept(new SimpleEnemy(tileSet));\n } else {\n float speedMultiplier = 1 + (0.08f * round);\n float healthMultiplier = 1 + (0.01f * round * round);\n\n if (randomEnemy < (round - 1) * 0.1) {\n addActorFunction.accept(new HeavyEnemy(tileSet, speedMultiplier, healthMultiplier));\n } else {\n addActorFunction.accept(new SimpleEnemy(tileSet, speedMultiplier, healthMultiplier));\n }\n }\n }",
"public Population InitSinglePopulation(int NumberOfAgents) {\n \n SinglePopulation TempPopulation = new SinglePopulation();\n \n TempPopulation.setPopulationID(0);\n\n for(int j = 0; j < NumberOfAgents; j++){\n\n SinglePopulationAgent TempAgentS = new SinglePopulationAgent(j,rand.nextDouble());\n boolean InitAction = (rand.nextDouble() < TempAgentS.getStrategy()) ? true : false;\n TempAgentS.setAction(InitAction);\n \n TempPopulation.AgentList.add(TempAgentS);\n }\n \n TempPopulation.setStrategyList();\n TempPopulation.setActionList();\n return TempPopulation;\n }",
"public void generateRandomRoom(String fromDirection) {\n this.title = pickRandomTitle();\n this.description = pickRandomDescription();\n this.loot.add(pickRandomItem());\n this.enemy = pickRandomEnemy();\n }",
"private boolean findNextAvailableAgent(ArrayList<IAgent> arrayList) {\n\n for (IAgent agent : arrayList) {\n try {\n if (agent.checkIfOnSpawn()) {\n return false;\n }\n } catch (RemoteException e) {\n return false;\n }\n }\n\n for (IAgent agent : arrayList) {\n try {\n if (arrayList.size() < Integer.parseInt(String.valueOf(dialog.getCountAgents().getSelectedItem()))) {\n if (iPlayerList.get(agent.getName()).getPoints() >= agentsValue) {\n for (int[] spawn : playingField.getSpawnFields()) {\n if (playingField.requestField(spawn[0], spawn[1])) {\n IAgent newAgent = new AgentImpl(agent.getName(), agent.getStrategy(), playingField);\n newAgent.setColor(agent.getColor());\n newAgent.setPosx(spawn[0]);\n newAgent.setPosy(spawn[1]);\n newAgent.setCapacity(Integer.parseInt(dialog.getCapacityField().getText()));\n newAgent.getRememberField().setiPlayerList(playingField.getiPlayerList());\n playingField.setOccupancy(spawn[0], spawn[1], newAgent);\n ArrayList<IAgent> templist = new ArrayList<>();\n for (IAgent list : playersAgentsMap.get(agent.getName())) {\n templist.add(list);\n }\n templist.add(newAgent);\n playersAgentsMap.put(agent.getName(), templist);\n iPlayerList.get(agent.getName()).setPoints(iPlayerList.get(agent.getName()).getPoints() - agentsValue);\n return true;\n }\n\n }\n\n }\n }\n } catch (RemoteException e) {\n System.out.println(e.getMessage());\n return false;\n }\n }\n return false;\n\n }"
] |
[
"0.6583102",
"0.64912",
"0.64522797",
"0.64461464",
"0.63164806",
"0.62801236",
"0.62301666",
"0.62013066",
"0.61321723",
"0.61163646",
"0.6087268",
"0.60488665",
"0.60338604",
"0.60205865",
"0.59888",
"0.59712446",
"0.59702355",
"0.5961712",
"0.5954176",
"0.5942262",
"0.5919743",
"0.590896",
"0.5907665",
"0.58937454",
"0.58933854",
"0.5864197",
"0.58607876",
"0.584801",
"0.58335656",
"0.58279103",
"0.5813813",
"0.58108026",
"0.57877725",
"0.57851726",
"0.57800895",
"0.5763772",
"0.57623976",
"0.5759871",
"0.57574624",
"0.5751968",
"0.57468706",
"0.57312787",
"0.57047856",
"0.5699515",
"0.5696134",
"0.5688274",
"0.5677296",
"0.56758106",
"0.5663514",
"0.56625813",
"0.56567466",
"0.56189275",
"0.56106204",
"0.5595948",
"0.55907625",
"0.5567759",
"0.55633473",
"0.5556232",
"0.55486983",
"0.5531315",
"0.55298626",
"0.55296993",
"0.5529147",
"0.55238336",
"0.5514939",
"0.55099493",
"0.5509345",
"0.5503535",
"0.5495599",
"0.5460049",
"0.5458691",
"0.5456266",
"0.54475355",
"0.5442452",
"0.5439328",
"0.54385513",
"0.54367787",
"0.5434225",
"0.54275376",
"0.54181933",
"0.5417195",
"0.5416455",
"0.5415434",
"0.5412471",
"0.5407903",
"0.5403616",
"0.5395676",
"0.53943276",
"0.53935504",
"0.5386091",
"0.53840435",
"0.5383478",
"0.5382886",
"0.53805155",
"0.5375446",
"0.5366556",
"0.53577226",
"0.53565556",
"0.53533787",
"0.53528494"
] |
0.5383382
|
92
|
Checks the user role before executing command If user doesn't have required role a 403 error page will be displayed
|
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response =(HttpServletResponse) resp;
ActionFactory actionFactory = new ActionFactory();
ActionCommand actionCommand = actionFactory.getCommand(request);
User user = LoginLogic.user(request);
if(actionCommand.checkAccess(user)){
chain.doFilter(req, resp);
}else{
response.setStatus(403);
logger.error(String.format("Access denied"));
request.getRequestDispatcher(PathManager.INSTANCE.getString("path.error403")).forward(req, resp);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ?\r\n// return;\r\n// }\r\n\r\n addPageMessage(respage.getString(\"no_have_correct_privilege_current_study\") + respage.getString(\"change_study_contact_sysadmin\"));\r\n throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString(\"not_allowed_access_extract_data_servlet\"), \"1\");// TODO\r\n // above copied from create dataset servlet, needs to be changed to\r\n // allow only admin-level users\r\n\r\n }",
"@Override\n\tpublic boolean isUserInRole(String arg0) {\n\t\treturn false;\n\t}",
"@Override\n\t\tpublic boolean isUserInRole(String role) {\n\t\t\treturn false;\n\t\t}",
"@Test\n public void testSkipOtherExecutionsIfUserHasRoleCondition() {\n final String userWithRole = \"test-user@localhost\";\n final String role = \"offline_access\";\n final String newFlowAlias = \"browser - allow skip\";\n\n Map<String, String> configMap = new HashMap<>();\n configMap.put(ConditionalRoleAuthenticatorFactory.CONDITIONAL_USER_ROLE, role);\n configMap.put(ConditionalRoleAuthenticatorFactory.CONF_NEGATE, \"false\");\n\n configureBrowserFlowWithSkipExecutionInConditionalFlow(newFlowAlias, ConditionalRoleAuthenticatorFactory.PROVIDER_ID, configMap);\n try {\n loginUsernameOnlyPage.open();\n loginUsernameOnlyPage.assertCurrent();\n loginUsernameOnlyPage.login(userWithRole);\n\n final String testUserWithRoleId = testRealm().users().search(userWithRole).get(0).getId();\n\n events.expectLogin()\n .user(testUserWithRoleId)\n .detail(Details.USERNAME, userWithRole)\n .removeDetail(Details.CONSENT)\n .assertEvent();\n } finally {\n revertFlows(testRealm(), newFlowAlias);\n }\n }",
"@Test\n public void testSkipExecutionUserHasNotRoleCondition() {\n final String userWithoutRole = \"john-doh@localhost\";\n final String role = \"offline_access\";\n final String newFlowAlias = \"browser - allow skip\";\n\n Map<String, String> configMap = new HashMap<>();\n configMap.put(ConditionalRoleAuthenticatorFactory.CONDITIONAL_USER_ROLE, role);\n configMap.put(ConditionalRoleAuthenticatorFactory.CONF_NEGATE, \"false\");\n\n configureBrowserFlowWithSkipExecutionInConditionalFlow(newFlowAlias, ConditionalRoleAuthenticatorFactory.PROVIDER_ID, configMap);\n try {\n loginUsernameOnlyPage.open();\n loginUsernameOnlyPage.assertCurrent();\n loginUsernameOnlyPage.login(userWithoutRole);\n\n final String testUserWithoutRoleId = testRealm().users().search(userWithoutRole).get(0).getId();\n\n passwordPage.assertCurrent();\n passwordPage.login(\"password\");\n\n events.expectLogin()\n .user(testUserWithoutRoleId)\n .detail(Details.USERNAME, userWithoutRole)\n .removeDetail(Details.CONSENT)\n .assertEvent();\n } finally {\n revertFlows(testRealm(), newFlowAlias);\n }\n }",
"@Override\n\tpublic boolean isAdminRole(String userName) throws Exception {\n\t\treturn false;\n\t}",
"boolean hasRole();",
"public void roleCheck(HttpServletResponse response,int ieam,int irole)\r\n\tthrows Exception {\t\t\r\n\t\tif(irole<ieam){\r\n\t\t\tresponse.sendRedirect(nls_error_url + \"?errorCode=1200\");\r\n\t\t\treturn; \r\n\t\t}\t\r\n\t}",
"public ServerResponse checkAdminRole(User user){\n if (user != null && user.getRole().intValue() == Const.Role.ROLE_ADMIN)\n return ServerResponse.createBySuccess();\n return ServerResponse.createByError();\n }",
"private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}",
"@Test\n public void testDenyAccessWithRoleCondition() {\n denyAccessWithRoleCondition(false);\n }",
"public String checkRoleForCommand(final String role) {\n\t\tSet<Map.Entry<String, String>> entrySet = allRollesForCommand.entrySet();\n\t\tString chooseRole = null;\n\t\tfor (Map.Entry<String, String> pair : entrySet) {\n\t\t\tif (role.equals(pair.getKey())) {\n\t\t\t\tchooseRole = pair.getValue();\n\t\t\t}\n\t\t}\n\t\treturn chooseRole;\n\t}",
"@Test\n public void testDenyAccessWithNegateRoleCondition() {\n denyAccessWithRoleCondition(true);\n }",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"public void setRole(String role) {\r\n this.role = role;\r\n }",
"@Override\n public boolean isRole() {\n return false;\n }",
"@Path(\"admin_area\")\n @GET\n @View(\"admin_page.jsp\")\n @RolesAllowed(\"admin\")\n public void sayRole(@Context SecurityContext securityContext) {\n\n logger.info(\"AdminRole :: \" + securityContext.isUserInRole(\"AdminRole\"));\n logger.info(\"admin :: \" + securityContext.isUserInRole(\"admin\"));\n logger.info(\"INFO :: \" + securityContext.isSecure());\n\n }",
"@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 }",
"public void setRole(String role) {\n this.role = role;\n }",
"@Override\n public boolean isUserInRole(String string) {\n String imp = (String)ADFContext.getCurrent().getSessionScope().get(\"isImpersonationOn\");\n if(imp == null || !imp.equals(\"Y\")){\n return super.isUserInRole(string);\n }\n else{\n List<String> userRoles = (List<String>)ADFContext.getCurrent().getSessionScope().get(\"userRoles\");\n if(userRoles != null && userRoles.contains(string)){\n return true;\n }\n else{\n return false;\n }\n \n }\n \n }",
"public boolean isUserAllowedOn(RoleAssignee u, Class<? extends Command> commandClass, DvObject dvo) {\n Map<String, Set<Permission>> required = CH.permissionsRequired(commandClass);\n return isUserAllowedOn(u, required, dvo);\n }",
"public String getRole() { return this.role; }",
"public void setRole(String role)\n {\n _role=role;\n }",
"public void isAllowed(String user) {\n \r\n }",
"public void setRole(java.lang.String value) {\n this.role = value;\n }",
"boolean noneGranted(String roles);",
"public void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}",
"public Boolean isRoleValid(String userName,String password, Vector roles)\n {\n try\n {\n UserEntityInterface userEntityInterface = UserEntityFactory.getInstance();\n UserInterface userInterface = userEntityInterface.getUser(userName);\n \n if(userInterface.getRole() == null)\n {\n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPER))\n {\n LogUtil.put(LogFactory.getInstance(\"Role is null: \" + userInterface.getRole() +\n \" Valid Roles: \" + roles.toString(),\n this, \"isRoleValid()\"));\n }\n \n return Boolean.FALSE;\n }\n \n Iterator iter = roles.iterator();\n while(iter.hasNext())\n {\n BasicUserRole nextRole = (BasicUserRole) iter.next();\n if(userInterface.getRole().getBasicUserRole().equals(nextRole))\n {\n //role is verified\n \n //validate permissions to set session\n //this should be seperated into hasPermissions method\n \n /*if(userInterface.hasPermission(new RequestParams(this.request)))\n {\n userInterface.validateSession(weblisketSession,new RequestParams(this.request));\n }\n else\n {\n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPER))\n {\n LogUtil.put(LogFactory.getInstance(\"Role is not valid: \" + userInterface.getRole() +\n \" Valid Roles: \" + roles.toString(),\n this,\"isRoleValid()\"));\n }\n \n return Boolean.FALSE;\n }\n */\n \n userInterface.validateSession((WeblisketSessionInterface) weblisketSession);\n \n this.request.removeAttribute(WeblisketSessionData.REMOVABLEUSERNAME);\n this.request.removeAttribute(WeblisketSessionData.REMOVABLEPASSWORD);\n return Boolean.TRUE;\n }\n }\n \n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPER))\n {\n \t StringBuffer stringBuffer = new StringBuffer();\n \t \n \t stringBuffer.append(\"Role is not valid: \");\n \t stringBuffer.append(userInterface.getRole());\n \t stringBuffer.append(\" Valid Roles: \");\n \t stringBuffer.append(roles.toString());\n \t \n LogUtil.put(LogFactory.getInstance(stringBuffer.toString(), this, \"isRoleValid()\"));\n }\n //on userInterface.getRole() failure\n return Boolean.FALSE;\n }\n catch(Exception e)\n {\n String error = \"Failed to check if Role is valid\";\n if(org.allbinary.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(org.allbinary.logic.communication.log.config.type.LogConfigTypeFactory.getInstance().TAGHELPERERROR))\n {\n LogUtil.put(LogFactory.getInstance(error, this, \"isRoleValid()\", e));\n }\n return Boolean.FALSE;\n }\n }",
"public void tryTakeRole() {\n if (currentPlayer.isEmployed() == false) {\n if(currentPlayer.getLocation().getName() == \"office\" || currentPlayer.getLocation().getName() == \"trailer\"){\n view.showPopUp(currentPlayer.isComputer(), \"You are currently in the \" + currentPlayer.getLocation().getName() + \" please move to a tile that has a role\");\n }\n else{\n if(currentPlayer.getLocation().getFlipStage() == 2){\n view.showPopUp(currentPlayer.isComputer(), \"This scene has already finished! You're too late!!\");\n }\n else{\n String chosenRole = chooseRole();\n if (chosenRole.equals(\"\")) {\n return;\n }\n currentPlayer.takeRole(chosenRole);\n\n if (currentPlayer.isEmployed()) {\n if(\n !board.isOnCard(\n currentPlayer.getRole().getName(), currentPlayer.getLocation())\n )\n {\n currentPlayer.setOnCardAreaData(currentPlayer.getRole().getArea());\n }\n else\n {\n currentPlayer.setAreaData(currentPlayer.getRole().getArea());\n }\n refreshPlayerPanel();\n \n }\n }\n }\n } else {\n view.showPopUp(currentPlayer.isComputer(), \"You're already employed, so you can't take another role until you finish this one\");\n } \n view.updateSidePanel(playerArray);\n }",
"protected void loadSmarttrakRoles(SmarttrakRoleVO role) throws AuthorizationException {\n\t\tUserVO user;\n\t\t/* 2017-06-21 DBargerhuff: In case of 'forgot password' request, the user data on the\n\t\t * attributes map will be a UserDataVO instead of a SmartTRAK UserVO. We try/catch\n\t\t * here to handle the CCE that results from the former case. */\n\t\ttry {\n\t\t\tuser = (UserVO) getAttribute(Constants.USER_DATA);\n\t\t} catch (ClassCastException cce) {\n\t\t\t// logging not required.\n\t\t\treturn;\n\t\t}\n\t\tActionRequest req = (ActionRequest) getAttribute(HTTP_REQUEST);\n\n\t\tif (user == null || StringUtil.isEmpty(user.getAccountId()) || req == null)\n\t\t\tthrow new AuthorizationException(\"invalid data, could not load roles\");\n\n\t\tif (user.getExpirationDate() != null && user.getExpirationDate().before(Convert.getCurrentTimestamp()))\n\t\t\tthrow new AuthorizationException(\"account is expired\");\n\n\t\t//if status is EU Reports, redirect them to the markets page\n\t\tif (\"M\".equals(user.getLicenseType())) {\n\t\t\treq.getSession().setAttribute(LoginAction.DESTN_URL, Section.MARKET.getPageURL());\n\t\t} else if (updatesOnlyLicenses.contains(user.getLicenseType())) {\n\t\t\t//limit the user to updates if their account is limited to updates\n\t\t\tif (\"4\".equals(user.getLicenseType())) {\n\t\t\t\trole.setRoleId(AdminControllerAction.UPDATES_ROLE_ID);\n\t\t\t\trole.setRoleLevel(AdminControllerAction.UPDATES_ROLE_LVL);\n\t\t\t}\n\t\t\treq.getSession().setAttribute(LoginAction.DESTN_URL, Section.UPDATES_EDITION.getPageURL());\n\t\t}else if (blockedLicenses.contains(user.getLicenseType())) {\n\t\t\tthrow new AuthorizationException(\"user not authorized to login according to status\");\n\t\t}\n\n\t\treq.setParameter(AccountAction.ACCOUNT_ID, user.getAccountId());\n\n\t\tloadAccountPermissions(user, role);\n\t\tloadSectionPermissions(req, role);\n\t}",
"@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }",
"public boolean isUserInRole(String role) {\r\n\t\treturn true;\r\n\t}",
"@Test(expected = org.jsecurity.authz.UnauthorizedException.class)\n\tpublic void testCheckRole_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tString role = \"\";\n\n\t\tfixture.checkRole(role);\n\n\t\t// add additional test code here\n\t}",
"public void chooseRole()\n {\n Scanner answer = new Scanner(System.in);\n boolean valid = false;\n String role = \"\";\n \n while(!valid)\n {\n menu.displayRoles();\n role = answer.nextLine().trim();\n valid = validation.integerValidation(role, 1, 3);\n }\n \n if(role.equals(\"3\"))\n home();\n else\n createUser(role);\n }",
"@FunctionalInterface\n private interface RoleChecker {\n public void checkAndRedirect(String role, String redirectAddress) throws IOException;\n }",
"public String execute() { \r\n\t\t\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\t\r\n\t\tif (genericItemId != null) {\r\n\t\t\titem = itemService.getGenericItem(genericItemId, false);\r\n\t\t}\r\n\t\t\r\n\t\tif( item != null )\r\n\t\t{\r\n\t\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t\t{\r\n\t\t\t\treturn \"accessDenied\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn SUCCESS;\r\n\t}",
"public void setRole(String role) {\n\t\tthis.role = role;\n\t}",
"private void checkAdminOrModerator(HttpServletRequest request, String uri)\n throws ForbiddenAccessException, ResourceNotFoundException {\n if (isAdministrator(request)) {\n return;\n }\n\n ModeratedItem moderatedItem = getModeratedItem(uri);\n if (moderatedItem == null) {\n throw new ResourceNotFoundException(uri);\n }\n\n String loggedInUser = getLoggedInUserEmail(request);\n if (moderatedItem.isModerator(loggedInUser)) {\n return;\n }\n\n throw new ForbiddenAccessException(loggedInUser);\n }",
"public boolean hasRole(String roleName);",
"String getRole();",
"String getRole();",
"String computeRole();",
"@Override\n\tpublic boolean isRole() {\n\t\treturn true;\n\t}",
"private void denyAccessWithRoleCondition(boolean negateOutput) {\n final String flowAlias = \"browser-deny\";\n final String userWithRole = \"test-user@localhost\";\n final String userWithoutRole = \"john-doh@localhost\";\n final String role = \"offline_access\";\n final String errorMessage = \"Your account doesn't have the required role\";\n\n Map<String, String> config = new HashMap<>();\n config.put(ConditionalRoleAuthenticatorFactory.CONDITIONAL_USER_ROLE, role);\n config.put(ConditionalRoleAuthenticatorFactory.CONF_NEGATE, Boolean.toString(negateOutput));\n\n Map<String, String> denyConfig = new HashMap<>();\n denyConfig.put(DenyAccessAuthenticatorFactory.ERROR_MESSAGE, errorMessage);\n\n configureBrowserFlowWithDenyAccessInConditionalFlow(flowAlias, ConditionalRoleAuthenticatorFactory.PROVIDER_ID, config, denyConfig);\n\n denyAccessInConditionalFlow(flowAlias,\n negateOutput ? userWithoutRole : userWithRole,\n negateOutput ? userWithRole : userWithoutRole,\n errorMessage\n );\n }",
"@Test(groups = \"role\", priority = 1)\n public void testRoleAdd() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient.roleAdd(rootRole).get();\n this.authDisabledAuthClient.roleAdd(userRole).get();\n }",
"protected boolean hasMyRole() {\r\n String role = getDef().getMyRole();\r\n return AeUtil.notNullOrEmpty(role);\r\n }",
"private boolean validateUser(HttpServletResponse resp, HttpServletRequest req, String username) throws IOException {\n\n SessionHandler session = (SessionHandler) req.getSession().getAttribute(\"authorized\");\n\n String sessionUsername = session.getUsername();\n\n if((!sessionUsername.equalsIgnoreCase(\"admin\")\n && !username.equalsIgnoreCase(sessionUsername))\n || !session.isAuthorized()\n ){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Action not permitted!\");\n return false;\n }\n return true;\n }",
"@Override\n\tpublic boolean checkRoleName(String role_name) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCommandAuthorized(){\n\t\treturn true;\n\t}",
"@Override\n\tpublic String checkPermision(String user, String userType) {\n\t\treturn null;\n\t}",
"private void checkRol(HttpSession session){\n UserDetails user = (UserDetails) session.getAttribute(\"user\");\n if(!user.getRol().equals(\"Company\")){\n System.out.println(\"El usuario no puede acceder a esta pagina con este rol\");\n throw new MajorsACasaException(\"No tens permisos per accedir a aquesta pàgina. \" +\n \"Has d'haver iniciat sessió com a Company per a poder accedir-hi.\",\"AccesDenied\",\"../\"+user.getMainPage());\n }\n }",
"public void setUserRole(Byte userRole) {\r\n this.userRole = userRole;\r\n }",
"private void checkPermission(User user, List sourceList, List targetList)\n throws AccessDeniedException\n {\n logger.debug(\"+\");\n if (isMove) {\n if (!SecurityGuard.canManage(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n else {\n if (!SecurityGuard.canView(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n logger.debug(\"-\");\n }",
"@Override\n protected ResponseState exec(HttpServletRequest request, HttpServletResponse response) throws PersistentException {\n UserService userService = factory.getService(UserService.class);\n try {\n String sRole = request.getParameter(AttrName.ROLE);\n if (sRole != null) {\n Role role = Role.valueOf(sRole.toUpperCase());\n List<User> userList = userService.findUserByRole(role);\n\n request.setAttribute(\"lst\", userList);\n request.setAttribute(AttrName.ROLE, sRole);\n }\n return new ForwardState(\"user/list.jsp\");\n } catch (IllegalArgumentException e) {\n throw new PersistentException(\"Exception while parsing role\", e);\n }\n }",
"public String getRole() {\n return this.role;\n }",
"public static void main(String[] args) {\n String role=\"admin\";\n if(role==\"admin\"){\n System.out.println(\"you are admin\");\n }\n else if(role==\"moderator\"){\n System.out.println(\"You are moderator\");\n }\n else{\n System.out.println(\"You are something else\");\n }\n\n switch (role){\n case \"admin\":\n System.out.println(\"You are an admin\");\n break;\n\n case \"moderator\":\n System.out.println(\"You are a moderator\");\n break;\n\n default:\n System.out.println(\"You are something else\");\n }\n }",
"boolean hasRole(@NotNull String role);",
"@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }",
"private void checkRole() {\n if (tools.checkNewPassword(new String(txtNewPass.getPassword()))) {\n if (new String(txtNewPass.getPassword()).equals(new String(txtConfirmPass.getPassword()))) {\n try {\n controller.changePassword(employee.getUsername(), new String(txtNewPass.getPassword()));\n Tools tools = new Tools();\n tools.sendMessage(employee, 3);\n tampilPesan(\"Password successfully updated.\");\n Login login = new Login(sessionFactory);\n this.getParent().add(login);\n login.setLocation(480, 200);\n login.setVisible(true);\n \n dispose();\n } catch (SQLException ex) {\n Logger.getLogger(ChangePasswordView.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n tampilPesan(\"New password doesn't match with confirm password\");\n }\n } else {\n tampilPesan(\"Password must have 8 characters minimum containing Uppercase, Lowercase, and number!!!\");\n }\n }",
"public String getRole() {\r\n return role;\r\n }",
"public void setRole(String role) {\n\t\t\tthis.role = role;\n\t\t}",
"@Override\n public boolean execute(Context ctx) {\n AccessContext accessCtx = (AccessContext)ctx;\n HttpServletRequest req = accessCtx.getHttpRequest();\n HttpServletResponse resp = accessCtx.getHttpResponse();\n String contextPath = req.getContextPath();\n LogUtils.logDebug(logger, \"getContextPath: \", contextPath);\n\n if (this.authLevel >= AUTH_LEVEL_LOGGED_IN) {\n if (!accessCtx.containsAttribute(AccessContext.KEY_USER_ITEM)) {\n throw new IllegalStateException(\n \"User Item was not found, perhaps LoadUserItemCommand was not executed\");\n }\n }\n // From this point accessCtx.getUserItem is a valid entry.\n\n if (this.authLevel >= AUTH_LEVEL_LOGGED_IN) {\n if (accessCtx.getUserItem() == null) {\n try {\n if (accessCtx.getDatasetItem() == null) {\n // If datasetItem not exists, redirect to login page.\n String redirUrl = contextPath + AccessFilter.REDIRECT_LOGIN;\n LogUtils.logDebug(logger,\n \"Not logged in, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } else {\n // If datasetItem exists, then redirect to Dataset Overview page.\n String redirUrl = contextPath + AccessFilter.REDIRECT_DATASET_INFO\n + \"?datasetId=\" + accessCtx.getDatasetId()\n + \"&access_redir=1\";\n LogUtils.logDebug(logger,\n \"(1)Not authorized for this dataset, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n\n // from this point accessCtx.getUserItem is a valid object.\n\n if (this.authLevel == AUTH_LEVEL_AUTHORIZED_FOR_DS) {\n if (!accessCtx.containsAttribute(AccessContext.KEY_IS_AUTHORIZED_FOR_DS)) {\n throw new IllegalStateException(\n \"IsAuthorizedForDataset was not set. \"\n + \"Perhaps LoadDatsetCommand was not executed.\");\n }\n\n if (!accessCtx.isAuthorizedForDataset()) {\n try {\n String redirUrl = contextPath + AccessFilter.REDIRECT_DATASET_INFO\n + \"?datasetId=\" + accessCtx.getDatasetId()\n + \"&access_redir=1\";\n LogUtils.logDebug(logger,\n \"(2)Not authorized for this dataset, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n\n if (this.authLevel == AUTH_LEVEL_ADMIN) {\n if (!accessCtx.getUserItem().getAdminFlag()) {\n try {\n String redirUrl = AccessFilter.REDIRECT_INDEX_JSP;\n LogUtils.logDebug(logger,\n \"Not admin, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n return false;\n }",
"VerbRole getRole();",
"private void checkRights() {\n image.setEnabled(true);\n String user = fc.window.getUserName();\n \n for(IDataObject object : objects){\n ArrayList<IRights> rights = object.getRights();\n \n if(rights != null){\n boolean everybodyperm = false;\n \n for(IRights right : rights){\n String name = right.getName();\n \n //user found, therefore no other check necessary.\n if(name.equals(user)){\n if(!right.getOwner()){\n image.setEnabled(false);\n }else{\n image.setEnabled(true);\n }\n return;\n //if no user found, use everybody\n }else if(name.equals(BUNDLE.getString(\"Everybody\"))){\n everybodyperm = right.getOwner();\n }\n }\n image.setEnabled(everybodyperm);\n if(!everybodyperm){\n return;\n }\n }\n }\n }",
"public String checkrole() \n { \n \ttry\n {\n String sql =\"select * from user where login='true'\";\n \n Cursor mCur = mDb.rawQuery(sql, null);\n Log.d(\"LEE\",\"hi2\");\n if(mCur.getCount()>0)\n {\n \tmCur.moveToFirst();\n \treturn mCur.getString(mCur.getColumnIndex(\"role\"));\n } \n else\n {\n \treturn \"logout\";\n }\n }\n catch (SQLException mSQLException) \n {\n Log.e(TAG, \"getTestData >>\"+ mSQLException.toString());\n throw mSQLException;\n }\n }",
"private boolean isRoleModified(User user) {\n\t\treturn isAdmin != null && !user.getRole().equals(getRole());\n\t}",
"protected void validateRole(Role role) throws WikiException {\r\n\t\tcheckLength(role.getAuthority(), 30);\r\n\t\trole.setDescription(StringUtils.substring(role.getDescription(), 0, 200));\r\n\t}",
"public abstract boolean checkPolicy(User user);",
"void addRoleToUser(int userID,int roleID);",
"private void onAddRole() {\n\t\troleProxy.addRoleToUser(user, selectedRole);\n\t}",
"@Override\n String execute(HttpServletRequest request, HttpServletResponse response) throws LegohusException {\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n User user = LogicFacade.login(email, password);\n HttpSession session = request.getSession();\n session.setAttribute(\"user\", user);\n \n return \"WEB-INF/\" + user.getRole() + \"page\";\n }",
"public void setRole(Byte role) {\n this.role = role;\n }",
"protected void validateAuthority(String role) throws WikiException {\r\n\t\tcheckLength(role, 30);\r\n\t}",
"@ApiModelProperty(required = true, value = \"The role that the place plays, e.g. \\\"UNI Site\\\", or \\\"ENNI Site\\\".\")\n @NotNull\n\n\n public String getRole() {\n return role;\n }",
"@Test\n @DisplayName(\"delete returns 403 when user is not admin\")\n void delete_Returns403_WhenUserIsNotAdmin() {\n Anime savedAnime = animeRepository.save(AnimeCreator.createAnimeToBeSaved());\n devDojoRepository.save(USER);\n \n ResponseEntity<Void> animeResponseEntity = testRestTemplateRoleUser.exchange(\n \"/animes/admin/{id}\",\n HttpMethod.DELETE,\n null,\n Void.class,\n savedAnime.getId()\n );\n\n Assertions.assertThat(animeResponseEntity).isNotNull();\n \n Assertions.assertThat(animeResponseEntity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);\n }",
"private boolean hasRole(Roles role) {\n\t\tSecurityContext context = SecurityContextHolder.getContext();\n\t\t\n\t\tif(context == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tAuthentication aut = context.getAuthentication();\n\t\tif(aut == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tCollection<? extends GrantedAuthority> autohotities = aut.getAuthorities();\n\t\tfor(GrantedAuthority ga : autohotities) {\n\t\t\tif(role.toString().equals(ga.getAuthority())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }",
"private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}",
"public boolean isAllowed(BaseAction actionClass) {\r\n\t\tint role = getCurrentRole();\r\n\t\tif ((role & User.ROLE_ADMINISTRATOR) != 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tInteger requiredRoles = privilegeDef.get(actionClass.getClass().getSimpleName());\r\n\t\treturn requiredRoles == null || (requiredRoles & role) != 0;\r\n\t}",
"@Override\n public boolean hasAccess(User user) {\n return user.hasRole(RoleValue.APP_ADMIN) || this.equals(user.company);\n }",
"public void checkAuthority() {\n }",
"boolean hasAttackerRoleName();",
"protected void doPost(MCRServletJob job) throws Exception {\n\t\torg.apache.shiro.subject.Subject currentUser = SecurityUtils.getSubject();\n\t\tif (currentUser.hasRole(\"userAdmin\")) {\n\t\t\tString type = getParameter(job, \"type\");\n\t\t\tString name = getParameter(job, \"name\");\n\t\t\tif (type.equals(\"userDelete\")) {\n\t\t\t\tUserDAO.deleteUser(name);\n\t\t\t\tLOGGER.info(\"deleted user \" + name);\n\n\t\t\t} else if (type.equals(\"roleDelete\")) {\n\t\t\t\tString roleName = getParameter(job, \"roleName\");\n\t\t\t\tUserRole role = new UserRole();\n\t\t\t\trole.setUsername(name);\n\t\t\t\trole.setRoleName(roleName);\n\t\t\t\tUserRoleDAO.delete(role);\n\t\t\t\tLOGGER.info(\"deleted role \" + roleName + \" for user \" + name);\n\t\t\t} else if (type.equals(\"roleAdd\")) {\n\t\t\t\tString roleName = getParameter(job, \"roleName\");\n\t\t\t\tUserRole role = new UserRole();\n\t\t\t\trole.setUsername(name);\n\t\t\t\trole.setRoleName(roleName);\n\t\t\t\tUserRoleDAO.insert(role);\n\t\t\t\tLOGGER.info(\"added role \" + roleName + \" for user \" + name);\n\t\t\t} \n\t\t\tjob.getResponse().sendRedirect(\"userManagement\");\n\t\t}else {\n\t\t\tElement output = new Element(\"error\").addContent((new Element(\"message\")).addContent(\"error.noPermission\"));\n\t\t\tsendOutput(job,output);\n\t\t}\n\t}",
"private void checkUserRoleAssignment(final VOUserDetails consideredUser,\n final String... roleNames) throws Exception {\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n PlatformUser user = dm.getReference(PlatformUser.class,\n consideredUser.getKey());\n Set<RoleAssignment> assignedRoles = user.getAssignedRoles();\n assertEquals(roleNames.length, assignedRoles.size());\n for (String roleName : roleNames) {\n boolean roleFound = false;\n for (RoleAssignment roleAssignment : assignedRoles) {\n if (roleAssignment.getRole().getRoleName().name()\n .equals(roleName)) {\n roleFound = true;\n }\n }\n assertTrue(\"User is missing the required role \" + roleName,\n roleFound);\n }\n return null;\n }\n });\n }",
"public void addRole(String username, String role) throws UserNotExistsException ;",
"@PreAuthorize(\"checkPermission('Legal Entity', 'Manage Legal Entities', {'view','create'})\")\n @GetMapping(\n produces = {\"application/json\"})\n @ResponseStatus(HttpStatus.OK)\n public void sampleEndpointThatRequiresUserToHavePermissionsToViewCreateLegalEnitites() {\n LOGGER.info(\"Preauthorize annotation have checked that user has permissions to view/create legal entities\");\n // continue custom implementation ...\n }",
"public void setUserRole(java.lang.String userRole) {\r\n this.userRole = userRole;\r\n }",
"public boolean hasRole() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public void setRole(Integer role) {\n\t\tthis.role = role;\n\t}",
"boolean anyGranted(String roles);",
"@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}",
"public Byte getUserRole() {\r\n return userRole;\r\n }",
"private void checkRunTimePermission() {\n\n if(checkPermission()){\n\n Toast.makeText(MainActivity.this, \"All Permissions Granted Successfully\", Toast.LENGTH_LONG).show();\n\n }\n else {\n\n requestPermission();\n }\n }",
"@Override\n\tpublic String getRole() {\n\t\treturn role;\n\t}",
"void checkAdmin() throws HsqlException {\n Trace.check(isAdmin(), Trace.ACCESS_IS_DENIED);\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 }",
"protected void loadAccountPermissions(UserVO user, SmarttrakRoleVO role) throws AuthorizationException {\n\t\tSMTDBConnection dbConn = (SMTDBConnection)getAttribute(DB_CONN);\n\t\tString schema = (String) getAttribute(Constants.CUSTOM_DB_SCHEMA);\n\t\tStringBuilder sql = new StringBuilder(100);\n\t\tsql.append(\"select sum(fd_no) as fd, sum(ga_no) as ga, sum(pe_no) as pe, sum(an_no) as an, \");\n\t\tsql.append(\"sum(browse_no) as prof, sum(updates_no) as upd from \").append(schema);\n\t\tsql.append(\"BIOMEDGPS_ACCOUNT_ACL where account_id=?\");\n\t\tlog.debug(sql);\n\n\t\tint fdAuth = 0;\n\t\tint gaAuth = 0;\n\t\tint anAuth = 0;\n\t\tint peAuth = 0;\n\t\tint browseAuth = 0;\n\t\tint upAuth = 0;\n\t\ttry (PreparedStatement ps = dbConn.prepareStatement(sql.toString())) {\n\t\t\tps.setString(1, user.getAccountId());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\t//determine if the user is authorized for each tool, either at the account level or user (personal) level\n\t\t\t\t//we need a 1/0 (Yes/No) - don't really care how many sections they're authorized for, only that some exist.\n\t\t\t\tfdAuth = rs.getInt(\"fd\") > 0 ? 1 : 0;\n\t\t\t\tgaAuth = rs.getInt(\"ga\") > 0 ? 1 : 0;\n\t\t\t\tpeAuth = rs.getInt(\"pe\") > 0 ? 1 : 0;\n\t\t\t\tanAuth = rs.getInt(\"an\") > 0 ? 1 : 0;\n\t\t\t\tbrowseAuth = rs.getInt(\"prof\") > 0 ? 1 : 0;\n\t\t\t\tupAuth = rs.getInt(\"upd\") > 0 ? 1 : 0;\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\t\t\tthrow new AuthorizationException(sqle);\n\t\t}\n\n\t\t//set the 3 section permissions into the role VO\n\t\trole.setFdAuthorized(user.getFdAuthFlg(), fdAuth);\n\t\trole.setGaAuthorized(user.getGaAuthFlg(), gaAuth);\n\t\trole.setPeAuthorized(0, peAuth); //not overrideable at the user level\n\t\trole.setAnAuthorized(0, anAuth); //not overrideable at the user level\n\t\trole.setBrowseAuthorized(0, browseAuth);\n\t\trole.setUpAuthorized(0, upAuth); //not overrideable at the user level\n\t\trole.setAccountOwner(user.getAcctOwnerFlg());\n\t}",
"public boolean hasRole() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"@GetMapping(path = \"/addUser\")\n @PreAuthorize(\"hasAnyRole('ROLE_ADMIN')\")\n public String addUser(Model model){\n return \"addUser\";\n }",
"@Override\n\tpublic boolean checkRole(Role Role) {\n\t\tSystem.out.println(Role.getRoleid());\n\t\tif(RoleDao.checkRole(Role).isEmpty())\n\t\t{\n\t\t return true;\n\t\t}\n\t\telse\n\t\t{\n\t\t return false;\n\t\t}\n\t}",
"public boolean checkAccessTemp(String user, String role, String obj,String op){\n\t\t\n\t\t/*Integer object = values.get(5).get(obj);\n\t\tInteger operation = values.get(3).get(op);\n\t\tInteger session = values.get(4).get(s);*/\n\t\t\n\t\tHashMap<Integer,Integer> elements = new HashMap<Integer,Integer>();\n\t\telements.put(1,values.get(1).get(user));\n\t\telements.put(2,values.get(2).get(role));\n\t\telements.put(3,values.get(3).get(op));\n\t\telements.put(5, values.get(5).get(obj));\n\n\t\t\n\t\t//elements.put(4, values.get(4).get(s));\n\t\t\n\t\tif (authGraph.dfsWalkEdges(authGraph.getRoot(), elements)) return true;\n\t\telse return false;\n\t\t\n\t\t//CHECK ACCESS MUST HANDLE THE INHERITANCE PROPERLY.........\n\t\t//MEANING IF THERE IS A SPECIAL EDGE BETWEEN TWO ROLES THEN PASS IT WITHOUT CONSUMING THE PATH VALUES....\n\t}"
] |
[
"0.6955113",
"0.6473836",
"0.63852113",
"0.6291834",
"0.6193789",
"0.61908126",
"0.6156318",
"0.6111736",
"0.6106084",
"0.60435456",
"0.59596366",
"0.5887332",
"0.58829564",
"0.5856181",
"0.5843374",
"0.58304185",
"0.58269095",
"0.5800352",
"0.5782858",
"0.57714844",
"0.574024",
"0.57024676",
"0.56681526",
"0.5665749",
"0.56626654",
"0.5648179",
"0.56424636",
"0.5639413",
"0.5604552",
"0.5595401",
"0.55761415",
"0.55731434",
"0.5552559",
"0.55508596",
"0.55499786",
"0.5535127",
"0.55174917",
"0.5516725",
"0.55083436",
"0.54720604",
"0.54720604",
"0.546936",
"0.5460084",
"0.54561025",
"0.54461044",
"0.5444503",
"0.544408",
"0.5433127",
"0.5423555",
"0.5415658",
"0.5404128",
"0.5374187",
"0.53623563",
"0.53548646",
"0.53443635",
"0.5341107",
"0.5340024",
"0.5336238",
"0.5335197",
"0.5334265",
"0.53258735",
"0.53227097",
"0.5320558",
"0.53163797",
"0.52984726",
"0.5295408",
"0.5290756",
"0.52875453",
"0.52854127",
"0.52800727",
"0.5278137",
"0.52767193",
"0.52743",
"0.52735984",
"0.52691615",
"0.52461445",
"0.5245113",
"0.523429",
"0.52324027",
"0.52293605",
"0.52235585",
"0.5193811",
"0.5190608",
"0.5186327",
"0.5184763",
"0.5184599",
"0.51813346",
"0.5178242",
"0.5173943",
"0.5172961",
"0.51707315",
"0.51697135",
"0.5169201",
"0.51663345",
"0.51638854",
"0.5161555",
"0.5160644",
"0.5153062",
"0.5147851",
"0.5145353",
"0.51407284"
] |
0.0
|
-1
|
final StatisticsDTO stats = results.s;
|
private String resultDTOToString(final ResultDTO results) {
final StatisticsDTO stats = results.stats;
return obj.travelTime(stats) + ";"
+ obj.tardiness(stats) + ";"
+ obj.overTime(stats) + ";"
+ obj.computeCost(stats);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Embedded\n public Statistics getStatistics() {\n return statistics;\n }",
"Map<String, Object> getStats();",
"public Stats getStats() {\n if (this.stats == null) {\n this.stats = (Stats) JavaScriptObject.createObject();\n }\n return this.stats;\n }",
"public java.util.Map<String, FieldStats> getStats() {\n if (stats == null) {\n stats = new com.amazonaws.internal.SdkInternalMap<String, FieldStats>();\n }\n return stats;\n }",
"public PersistentStats getStats() {\n return _stats;\n }",
"public StatValues stats() {\n this.stats.setStatsHolder(this);\n return stats;\n }",
"public Bag getStats(){\n\treturn stats;\n }",
"public Statistics() {}",
"public void setStatistics(Statistics statistics) {\n this.statistics = statistics;\n }",
"public List<Number> getStatistics() {\n return statistics;\n }",
"public SiteStatisticsVO getSiteStatistics () throws DataServiceException;",
"Stats<Double> stats();",
"public interface Statistics {\n\n int getBrowseCount();\n\n int getSalesCount();\n}",
"public Mono<Response<StorageServiceStats>> getStatistics() {\n return storageAsyncRawClient\n .getStatistics()\n .map(rb -> new SimpleResponse<>(rb, rb.value()));\n }",
"public Statistic<?> getStatistic() {\n return statistic;\n }",
"@Override\r\n\tpublic Stats getStats() {\n\t\treturn null;\r\n\t}",
"public ResponseDto() {\n\n students = new ArrayList<>();\n setStudentsCounter(0);\n }",
"public Statistics() {\n }",
"public Result getResults()\r\n {\r\n return result;\r\n }",
"Map<String, Number> toStatsMap() {\n long s = successes.get();\n long r = responseTimes.get();\n long avg = s <= 0 ? -1 : r / s;\n\n Map<String, Number> stats = new HashMap<String, Number>();\n stats.put(\"successes\", (int) s);\n stats.put(\"averageResponseTime\", avg);\n stats.put(\"httpFailures\", httpFailures.get());\n stats.put(\"readTimeouts\", readTimeouts.get());\n stats.put(\"connectTimeouts\", connectTimeouts.get());\n stats.put(\"socketErrors\", socketErrors.get());\n stats.put(\"emptyResults\", emptyResults.get());\n return stats;\n }",
"protected VwStatsPerGame fetchSingleResult(ResultSet rs) throws SQLException\n\t{\n\t\tif (rs.next()) {\n\t\t\tVwStatsPerGame dto = new VwStatsPerGame();\n\t\t\tpopulateDto( dto, rs);\n\t\t\treturn dto;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}",
"@JsonProperty(\"stats\")\n@ApiModelProperty(value = \"Stats about this VirtualInstance\")\n public VirtualInstanceStats getStats() {\n return stats;\n }",
"public HashMap<String, Double> getStats() {\n return playerStats; // stub\n }",
"public List<StatsObject> getData() {\n\t\tList<StatsObject> stats = new ArrayList<StatsObject>(data.values());\n\t\treturn stats;\n\n\t}",
"public SearchResult withStats(java.util.Map<String, FieldStats> stats) {\n setStats(stats);\n return this;\n }",
"List<Number> getTransactionAmounts(final StatisticalDTO dto);",
"@Override\r\n\tpublic void setStats(Stats s) {\n\t\t\r\n\t}",
"public void computeStats() {\n\t\tstats = new Stats();\t\t\n\t}",
"public interface GeocodeWsStatisticsMBean {\n\n long getTotalGoodRequests();\n\n long getTotalBadRequests();\n\n long getTotalServedFromCache();\n\n long getTotalServedFromDatabase();\n\n long getTotalPoliticalHits();\n\n long getTotalEezHits();\n\n long getTotalNoResults();\n\n long getWithing5KmHits();\n\n double getAverageResultSize();\n\n void resetStats();\n}",
"public interface IStatisticManageService {\n\n\n ServerResponse<Map> getBaseCount();\n\n}",
"public SlopeOneStats getStatistics() { return statistics; }",
"public Stats() {\n this(DSL.name(\"stats\"), null);\n }",
"private JsonWrapper convert(List<IMaterialStats> stats) {\n Map<ResourceLocation,IMaterialStats> wrappedStats = stats.stream()\n .collect(Collectors.toMap(\n IMaterialStats::getIdentifier,\n stat -> stat));\n return new JsonWrapper(wrappedStats);\n }",
"public SmallStatistic() {\n\n }",
"@Override\n public List<CardHitDetail> getStats(int start, int limit) {\n List<CardHitDetail> cardList = cardRepository.findStats(limit, start - 1);\n return cardList;\n }",
"public Object getSalesInstanceReport() {\n return salesInstanceReport;\n }",
"void statistics();",
"Observable<SummaryResponse> fetchSummary();",
"MetricsCounterDTO getMetricsCounter(MetricsCounterCriteria dto);",
"public Results() {\n\t\t\t// TODO Auto-generated constructor stub\n\t\t}",
"public void setStats(java.util.Map<String, FieldStats> stats) {\n this.stats = stats == null ? null : new com.amazonaws.internal.SdkInternalMap<String, FieldStats>(stats);\n }",
"@Override\n public OpStatsData toOpStatsData() {\n return null;\n }",
"public ResponseSummaries() {\n }",
"ChartListDTO returnDashboardCharts();",
"public Object getServicingEventLogInstanceAnalysisReport() {\n return servicingEventLogInstanceAnalysisReport;\n }",
"public StatisticsAccumulator getStatisticsAccumulator() {\n return statisticsAccumulator;\n }",
"public StStatutesub() {\n }",
"java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();",
"public Statistics getCopyForTest() {\n Statistics statistics = new Statistics();\n statistics.sentMessageTypes.putAll(sentMessageTypes);\n statistics.receivedMessageTypes.putAll(receivedMessageTypes);\n statistics.incomingOperationTypes.putAll(incomingOperationTypes);\n statistics.listenerEventTypes.putAll(listenerEventTypes);\n statistics.clientErrorTypes.putAll(clientErrorTypes);\n return statistics;\n }",
"private void readSimulationResults(){\n\t\tString tempDir = System.getProperty(\"java.io.tmpdir\");\r\n\t\tFile file = new File(tempDir+File.separator+\"simulation.bin\");\r\n\t try {\r\n\t \t\r\n\t \tObjectInputStream in = new ObjectInputStream(new FileInputStream(file));\r\n\t\t\t// Deserialize the object\r\n\t\t\t\r\n\t\t\tresults = (PortfolioStatistics) in.readObject();\r\n\t\t\tin.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Result() {\n getLatenciesSuccess = new ArrayList<Long>();\n getLatenciesFail = new ArrayList<Long>();\n postLatenciesSuccess = new ArrayList<Long>();\n postLatenciesFail = new ArrayList<Long>();\n getRequestFailNum = 0;\n postRequestFailNum = 0;\n getRequestSuccessNum = 0;\n postRequestSuccessNum = 0;\n// getTimestamps = new ArrayList<Long>();\n// postTimestamps = new ArrayList<Long>();\n }",
"public StatisticDataResponse peekSubscriptionStats(String subscriptionId) throws StatisticsException\r\n\t{\r\n\t\treturn peekSubscriptionStats(subscriptionId, new String[] {});\r\n\t}",
"public Stats2D statistics() {\n Stats2D stats = new Stats2D(data.values);\n stats.run();\n return stats;\n }",
"public static void outputStatistics(StatisticsResults results)\n\t{\n\t\tLogger logger = Log.getLogger();\n\t\t\n\t\tlogger.info(\"Size/number of statements of model: \" + results.getSize() + \"\\n\"\n\t\t\t\t\t+ \"Number of different resources: \" + results.getResources() + \"\\n\"\n\t\t\t\t\t+ \"Number of different subjects: \" + results.getSubjects() + \"\\n\"\n\t\t\t\t\t+ \"Number of different predicates: \" + results.getPredicates() + \"\\n\"\n\t\t\t\t\t+ \"Number of different objects: \" + results.getObjects() + \"\\n\"\n\t\t\t\t\t+ \"Number of different object resources: \" + results.getObjectResources() + \"\\n\"\n\t\t\t\t\t+ \"Number of different literals: \" + results.getLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Total number of object resources: \" + results.getTotalObjectResources() + \"\\n\"\n\t\t\t\t\t+ \"Total number of literals: \" + results.getTotalLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Average number of outgoing links per subject: \" + results.getAvgOutgoingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of outgoing links per subject: \" + results.getMinOutgoingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of outgoing links per subject: \" + results.getMaxOutgoingLinks() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of outgoing links per subject: \" + results.getOutgoingLinks25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of outgoing links per subject: \" + results.getOutgoingLinks50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of outgoing links per subject: \" + results.getOutgoingLinks75() + \"\\n\"\n\t\t\t\t\t+ \"Average number of incoming links per object resource: \" + results.getAvgIncomingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of incoming links per object resource: \" + results.getMinIncomingLinks() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of incoming links per object resource: \" + results.getMaxIncomingLinks() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of incoming links per object resrouce: \" + results.getIncomingLinks25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of incoming links per object resource: \" + results.getIncomingLinks50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of incoming links per object resource: \" + results.getIncomingLinks75() + \"\\n\"\n\t\t\t\t\t+ \"Average number of literals per subject: \" + results.getAvgLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of literals per subject: \" + results.getMinLiterals() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of literals per subject: \" + results.getMaxLiterals() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of literals per subject: \" + results.getLiterals25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of literals per subject: \" + results.getLiterals50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of literals per subject: \" + results.getLiterals75() + \"\\n\"\n\t\t\t\t\t+ \"Average number of object resources per subject: \" + results.getAvgObjectResources() + \"\\n\"\n\t\t\t\t\t+ \"Minimum number of object resources per subject: \" + results.getMinResObjects() + \"\\n\"\n\t\t\t\t\t+ \"Maximum number of object resources per subject: \" + results.getMaxResObjects() + \"\\n\"\n\t\t\t\t\t+ \"25% quantile of object resources per subject: \" + results.getResObjects25() + \"\\n\"\n\t\t\t\t\t+ \"50% quantile of object resources per subject: \" + results.getResObjects50() + \"\\n\"\n\t\t\t\t\t+ \"75% quantile of object resources per subject: \" + results.getResObjects75() + \"\\n\");\n\t}",
"java.util.List<net.iGap.proto.ProtoChannelGetMessagesStats.ChannelGetMessagesStatsResponse.Stats> \n getStatsList();",
"@Test\n\tpublic void getStaticsDataTest() {\n\t\tthis.repo.save(new StatisticsRequest(\"1233333\", \"testing\", Integer.valueOf(200), Integer.valueOf(2000)));\n\n\t\twebTestClient.get().uri(\"/getLoggedData\").accept(MediaType.APPLICATION_JSON).exchange().expectStatus().isOk()\n\t\t\t\t.expectBody(StatisticsResponse.class)\n\t\t\t\t.consumeWith(res -> assertTrue(res.getResponseBody().getTotalRequest() > 0.0));\n\n\t}",
"public CommandResult getStats() {\n return getDB().executeCommand(new BsonDocument(\"collStats\", new BsonString(getName())), getReadPreference());\n }",
"List<UnitDTO> getAllUnits();",
"public Stats getStatsById(int id) {\n\t\tStats s = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString statByIdRecords_sql = \"SELECT * FROM \" + stats_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(statByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\ts = new Stats(rs.getInt(3), rs.getInt(4), rs.getInt(5), rs.getInt(6));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn s;\n\t}",
"List<KeyDevelopmentsStatsPerMonthVO> getGrossProductPerMonth(final StatisticalDTO dto);",
"public VirtualMachinesStatistics getStatistics() {\n return statistics;\n }",
"@Test\n\tpublic void testStatsRetrieveStatsSuccessfully() throws ServiceException, DatabaseException {\n\t\tMockito.when(dao.getMutantsCount()).thenReturn(1);\n\t\tMockito.when(dao.getHumansCount()).thenReturn(10);\n\n\t\t// WHEN the service is called for stats\n\t\tStats stats = service.getStats();\n\n\t\t// THEN a stats object is returned\n\t\tTestCase.assertNotNull(stats);\n\t}",
"ResultSummary getActualResultSummary();",
"public interface DataStats {\n \n // publicly accessible methods - replaces original properties\n \n /***************************************************************************\n * Gets the channel number for these stats\n *\n * @return the channel number\n **************************************************************************/\n public int GetChannel();\n \n /***************************************************************************\n * Sets the channel number for these stats\n *\n * @param channel The channel number\n **************************************************************************/\n public void SetChannel(int channel); \n \n /***************************************************************************\n * Gets the date for these stats\n *\n * @return the date\n **************************************************************************/ \n public Date GetDate();\n\n /***************************************************************************\n * Sets the date for these stats\n *\n * @param date The date\n **************************************************************************/ \n public void SetDate(Date date);\n \n /***************************************************************************\n * Gets time type\n *\n * @return time type - TRUE for hourly stats, FALSE for daily stats\n **************************************************************************/ \n public boolean GetHourly();\n \n /***************************************************************************\n * Sets time type \n *\n * @param hourly The time type - TRUE for hourly stats, FALSE for daily stats \n **************************************************************************/ \n public void SetHourly(boolean hourly); \n \n /***************************************************************************\n * Gets the number of points used to make these statistics\n *\n * @return the number of points\n **************************************************************************/ \n public int GetNPoints();\n \n /***************************************************************************\n * Sets the number of points used to make these statistics\n *\n * @param n_points The number of points\n **************************************************************************/ \n public void SetNPoints(int n_points);\n\n /***************************************************************************\n * Gets the number of points missing\n *\n * @return the number of points\n **************************************************************************/ \n public int GetNMissing();\n \n /***************************************************************************\n * Sets the number of points missing\n *\n * @param n_missing The number of points\n **************************************************************************/ \n public void SetNMissing(int n_missing);\n\n /***************************************************************************\n * Gets the minimum value \n *\n * @return the minimum value\n **************************************************************************/ \n public int GetMinVal();\n\n /***************************************************************************\n * Sets the minimum value\n *\n * @param min_val The minimum value\n **************************************************************************/ \n public void SetMinVal(int min_val);\n \n /***************************************************************************\n * Gets the maximum value\n *\n * @return the maximum value\n **************************************************************************/ \n public int GetMaxVal();\n\n /***************************************************************************\n * Sets the maximum value\n *\n * @param max_val The maximum value\n **************************************************************************/ \n public void SetMaxVal(int max_val);\n\n /***************************************************************************\n * Gets the average\n *\n * @return the average\n **************************************************************************/ \n public double GetAverage();\n\n /***************************************************************************\n * Sets the average\n *\n * @param average The average\n **************************************************************************/ \n public void SetAverage(double average);\n\n /***************************************************************************\n * Gets the standard deviation\n *\n * @return the standard deviation\n **************************************************************************/ \n public double GetStandardDev();\n\n /***************************************************************************\n * Sets the standard deviation\n *\n * @param standard_dev The standard deviation\n **************************************************************************/ \n public void SetStandardDev(double standard_dev);\n \n}",
"@GetMapping(\"/activity\")\n Stats all() {\n Stats stats = new Stats();\n log.info(\"getting daily activity by default\");\n List<Activity> allActivity = repository.findAll();\n log.info(\"allActivity: \" + allActivity);\n Collections.sort(allActivity);\n Map<String, Integer> stepsByCategory = new TreeMap<String, Integer>();\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.DAY_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = DAY + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n stats.setCategory(StatsCategory.DAILY);\n List<Details> details = new ArrayList<Stats.Details>();\n if(stepsByCategory != null) {\n for (Entry entry : stepsByCategory.entrySet()) {\n Details stat = stats.new Details();\n stat.key = entry.getKey().toString();\n stat.steps = entry.getValue().toString();\n details.add(stat);\n }\n stats.setDetails(details);\n }\n //stats.setStepsByCategory(stepsByCategory);\n return stats;\n }",
"public double getGrossSales() {\n return grossSales;\n}",
"public interface StatisticsService {\n\n public void addStatistics(Statistics statistics);\n\n public void updateStatisctics(Statistics statistics);\n\n public void deleteStatistics(Statistics statistics);\n\n public Statistics finsStatistics(int id);\n\n public List<Statistics> findStatistics();\n\n public List<Statistics> findStatisticsByUser(User user);\n}",
"@GetMapping(\"/{id}\")\r\n public ResponseEntity<?> findAllStatsBySportId(@PathVariable long id) {\r\n List<SportStats> allSportsById = sportStatsService.findAllStatsBySportId(id);\r\n return new ResponseEntity<>(allSportsById, HttpStatus.OK);\r\n }",
"@Override\n\t@Transactional(propagation = Propagation.REQUIRED)\n\tpublic String stats(QualityQuery data) throws Exception {\n\t\treturn metaDataFetchService.stats(data);\n\t}",
"public Object getValue() {\n synchronized (mutex) {\n return statisticsAccumulator.getValue();\n }\n }",
"public Stats getBaseStats() {\n return baseStats;\n }",
"io.netifi.proteus.admin.om.Metrics getMetrics();",
"@Projection(name=\"summary\", types = TvSeriesSummary.class)\npublic interface TvSeriesSummaryProjection {\n Date getLastUpdateDate();\n}",
"protected abstract String getStatistics();",
"void populateReportInformation( Collection<ExpressionExperimentDetailsValueObject> vos );",
"public List<Sample> getSampleResults() {\n return sampleResults;\n }",
"public PeekedStatisticsResponse getStatValues(StatisticInfo[] infos) throws StatisticsException\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tMap<String, Object> data = new HashMap<>();\r\n\t\t\tdata.put(\"statistics\", infos);\r\n\t\t\tMap<String, Object> body = new HashMap<>();\r\n\t\t\tbody.put(\"data\", data);\r\n\r\n\t\t\treturn api.getStatValues(body);\r\n\t\t}\r\n\t\tcatch (ApiException ex)\r\n\t\t{\r\n\t\t\tthrow new StatisticsException(\"Cannot get statistics values\", ex);\r\n\t\t}\r\n\t}",
"com.rpg.framework.database.Protocol.BonusStats getBonusStats();",
"public Page<CampaignWithStat> getCampaingsWithStat(String sortField, Sort.Direction direction, int page, int size);",
"public ResultsPanel(StatsCollector st, GraphType g)\n\t{\n\t if (Utils.getUSmode() == true) {\n\t west = \"East\";\n\t east = \"West\";\n\t }\n\t\tstatsCollector = st;\n\t\tgraph = g;\n\t\tgetPoints();\n\t\tif (totalEntered == null || averageWait == null || maxWait == null || timeAlive == null) {\n\t\t\t// What to do if there is no data\n\t\t}\n\t}",
"RealtorProductDTO getrealtorProductDTO(int sr_no);",
"org.tensorflow.proto.profiler.XStatOrBuilder getStatsOrBuilder(\n int index);",
"public net.iGap.proto.ProtoChannelGetMessagesStats.ChannelGetMessagesStatsResponse.Stats getStats(int index) {\n return stats_.get(index);\n }",
"public static String addToStatistics(){\n\t\tString addedStats = Start.addToStatistics();\n\t\t//add\n\t\t//e.g.: addedStats += MyReport();\n\t\treturn addedStats;\n\t}",
"public void summarizeData() {\n\t\t//take json object and populate a POJO\n\t\t\n//\t\tfor(javaObject : x) {\n\t\t\n\t\t\t//new JobSummaryObject\n\t\t\t//\n\t}",
"public Statistics getStatistics()\n throws IOException,IllegalArgumentException\n {\n Mocket.Statistics statistics = new Mocket.Statistics();\n return getStatisticsNative (statistics);\n }",
"public SearchResult clearStatsEntries() {\n this.stats = null;\n return this;\n }",
"public Item2Vector<Summary> getSummaries() { return summaries; }",
"private AggregatedStats(List<MeanWithClusterProbAggregator> stats) {\n clusterProbs = VectorUtils.of(stats.stream()\n .mapToDouble(MeanWithClusterProbAggregator::clusterProb)\n .toArray()\n );\n\n means = stats.stream()\n .map(MeanWithClusterProbAggregator::mean)\n .collect(Collectors.toList());\n }",
"public Vector getResultObjects() {\n\treturn _vcResults;\n }",
"public interface IStatisticsExport {\r\n Map<String, Object> export(Map<String, Object> inParam) throws E5Exception;\r\n}",
"org.tensorflow.proto.profiler.XStat getStats(int index);",
"private void setStats(\n int index, net.iGap.proto.ProtoChannelGetMessagesStats.ChannelGetMessagesStatsResponse.Stats value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureStatsIsMutable();\n stats_.set(index, value);\n }",
"public java.util.List<net.iGap.proto.ProtoChannelGetMessagesStats.ChannelGetMessagesStatsResponse.Stats> getStatsList() {\n return java.util.Collections.unmodifiableList(\n instance.getStatsList());\n }",
"StudentDTO toStudentDTO(Student student);",
"public LogAnalysis(StatRes res) {\n\t\tthis.res=res;\n\t}",
"@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group) {\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"group by col_2_0_\", \"owner\", owner);\n return list;\n }",
"public interface IStatisticsService {\r\n /**\r\n * 统计分析查询\r\n */\r\n public List<StatisticsEntity> qryStatisticsData(StatisticsEntity statisticsEntity);\r\n\r\n public List<StatisticsReportEntity> qryStatisticsReportData(StatisticsReportEntity statisticsReportEntity);\r\n\r\n}",
"net.iGap.proto.ProtoChannelGetMessagesStats.ChannelGetMessagesStatsResponse.Stats getStats(int index);",
"@Valid\n @JsonProperty(\"reviewRatingStatistics\")\n public ReviewRatingStatistics getReviewRatingStatistics();"
] |
[
"0.6483229",
"0.6080049",
"0.5958593",
"0.583475",
"0.58160925",
"0.5786661",
"0.5776779",
"0.57757515",
"0.5758277",
"0.5721278",
"0.57186824",
"0.56869155",
"0.5657026",
"0.5647298",
"0.5629928",
"0.5627558",
"0.5594361",
"0.55710566",
"0.55676097",
"0.5553671",
"0.55133474",
"0.54821444",
"0.5473666",
"0.54723155",
"0.5471989",
"0.5452474",
"0.54471254",
"0.54105",
"0.5405421",
"0.540394",
"0.53767025",
"0.5372965",
"0.5357485",
"0.53400576",
"0.5326502",
"0.5326288",
"0.53226715",
"0.53138065",
"0.5286077",
"0.52699",
"0.5267404",
"0.5256209",
"0.5253471",
"0.52298605",
"0.52243793",
"0.52090263",
"0.52035373",
"0.52033466",
"0.51976806",
"0.51923645",
"0.51746243",
"0.5159581",
"0.5154943",
"0.51535034",
"0.5146941",
"0.5128055",
"0.51274645",
"0.51274526",
"0.5126019",
"0.512527",
"0.51178175",
"0.5105727",
"0.51010484",
"0.5100718",
"0.5093775",
"0.50820076",
"0.50711954",
"0.5064215",
"0.50637656",
"0.5062862",
"0.50611997",
"0.50558174",
"0.5052884",
"0.5039596",
"0.5021129",
"0.50180876",
"0.50175476",
"0.5017015",
"0.5015602",
"0.5007455",
"0.50060105",
"0.5001169",
"0.5000338",
"0.49970755",
"0.49968055",
"0.4993778",
"0.4993346",
"0.49909505",
"0.49848855",
"0.49828288",
"0.4981309",
"0.49775597",
"0.49721524",
"0.49580932",
"0.4957926",
"0.495397",
"0.49538296",
"0.49532393",
"0.49492684",
"0.49480096"
] |
0.5367271
|
32
|
Classifies a case using the decision tree, and then checks the tree's classification against the true classification
|
public static boolean testTree(Case c, Node tree) {
if (tree.isLeaf) {
// If this is a result node, return whether the tree result matches the true classification
return c.isHealthy == tree.isHealthy;
}
else {
// Else, we find the appropriate value, and then compare that to the threshold to recurse on the correct subtree
double value = 0;
switch (tree.attribute) {
case K:
value = c.k;
break;
case Na:
value = c.na;
break;
case CL:
value = c.cl;
break;
case HCO3:
value = c.hco3;
break;
case Endotoxin:
value = c.endotoxin;
break;
case Aniongap:
value = c.aniongap;
break;
case PLA2:
value = c.pla2;
break;
case SDH:
value = c.sdh;
break;
case GLDH:
value = c.gldh;
break;
case TPP:
value = c.tpp;
break;
case BreathRate:
value = c.breathRate;
break;
case PCV:
value = c.pcv;
break;
case PulseRate:
value = c.pulseRate;
break;
case Fibrinogen:
value = c.fibrinogen;
break;
case Dimer:
value = c.dimer;
break;
case FibPerDim:
value = c.fibPerDim;
break;
}
// Recursion
if (value < tree.threshold) {
return testTree(c, tree.lessThanChildren);
}
else {
return testTree(c, tree.greaterThanChildren);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void classify() {\n\t\ttry {\n\t\t\tdouble pred = classifier.classifyInstance(instances.instance(0));\n\t\t\tSystem.out.println(\"===== Classified instance =====\");\n\t\t\tSystem.out.println(\"Class predicted: \" + instances.classAttribute().value((int) pred));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Problem found when classifying the text\");\n\t\t}\t\t\n\t}",
"Integer classify(LogicGraph pce);",
"@Override\n\tpublic void buildClassifier(Instances data) throws Exception {\n decision_tree = new MyID3();\n\t\tdecision_tree.buildClassifier(data);\n\n//\t\tSystem.out.println(decision_tree.toString());\n\n train_data = data;\n\n set_of_rule = convertTreeIntoRules(decision_tree);\n\n\n // DONT DELETE THISSSS\n set_of_rule.setTrainData(data);\n\n List<Rule> listrule = set_of_rule.getList_rule();\n System.out.println(\"\\n\\n\\nBEFORE PRUNEDDD\");\n for (int i = 0; i < listrule.size(); i++ ){\n System.out.println(\"Rule \"+i+\" :\");\n Rule rule = listrule.get(i);\n List<Edge> edges = rule.getPreconditions();\n for (int j=0; j< edges.size(); j++) {\n System.out.println(\"\\t-\"+edges.get(j).getAttribute_name() + \" = \" + edges.get(j).getAttribute_value());\n }\n System.out.println(\"\\tClass = \"+rule.getClass_value());\n }\n\n// selectBestSetofRule();\n\n\t}",
"public abstract double classify(Instance e);",
"public void classify() throws Exception;",
"abstract String classify(Instance inst);",
"@Override\n public void buildClassifier(Instances trainingData) throws Exception {\n // can classifier handle the data?\n getCapabilities().testWithFail(trainingData);\n\n tree = new MultiInstanceDecisionTree(trainingData);\n }",
"Classifier getClassifier();",
"@Test\r\n\tpublic void classifyTest(){\r\n\t\tClassification[] expectedClass = {Classification.First,Classification.UpperSecond,Classification.LowerSecond,Classification.Third,Classification.Fail};\r\n\t\tint[] pointGrades = {3,6,10,13,18};\r\n\t\tfor(int i=0;i<pointGrades.length;i++)\r\n\t\t{\r\n\t\t\tassertEquals(expectedClass[i],new PointGrade(pointGrades[i]).classify());\r\n\t\t}\r\n\t}",
"@Override\n public double classifyInstance(Instance testdata) {\n // get a copy of testdata Instance with only the matched attributes\n Instance ntest = this.mm.getMatchedTestInstance(testdata);\n\n double ret = 0.0;\n try {\n ret = this.classifier.classifyInstance(ntest);\n }\n catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n\n return ret;\n }",
"public abstract int classifyInstance(Instance instance) throws Exception;",
"@Override\n\tpublic ClassifyResult classify(List<String> words) {\n\t\t// TODO : Implement\n\t\t// Sum up the log probabilities for each word in the input data, and the\n\t\t// probability of the label\n\t\t// Set the label to the class with larger log probability\n\t\tdouble log_POSITIVE = Math.log(p_l(Label.POSITIVE));\n\t\tfor (String word : words)\n\t\t\tlog_POSITIVE += Math.log(p_w_given_l(word, Label.POSITIVE));\n\n\t\tdouble log_NEGATIVE = Math.log(p_l(Label.NEGATIVE));\n\t\tfor (String word : words)\n\t\t\tlog_NEGATIVE += Math.log(p_w_given_l(word, Label.NEGATIVE));\n\n\t\t// Create the ClassifyResult\n\t\tClassifyResult result = new ClassifyResult();\n\t\tresult.logProbPerLabel = new HashMap<Label, Double>();\n\t\tresult.logProbPerLabel.put(Label.POSITIVE, log_POSITIVE);\n\t\tresult.logProbPerLabel.put(Label.NEGATIVE, log_NEGATIVE);\n\t\t\n\t\tif (log_POSITIVE > log_NEGATIVE)\n\t\t\tresult.label = Label.POSITIVE;\n\t\telse\n\t\t\tresult.label = Label.NEGATIVE;\n\n\t\treturn result;\n\t}",
"public static Node buildTree(ArrayList<Case> cases) {\n\t\tint healthy = 0;\n\t\t// Count the number of healthy cases in the current set\n\t\tfor (Case c : cases) {\n\t\t\tif (c.isHealthy) healthy++;\n\t\t}\n\t\t// If all cases are either healthy or unhealthy, this can be a result node and so is set as such (to the correct value)\n\t\tif (healthy == cases.size() || healthy == 0) {\n\t\t\treturn new Node(cases.get(0).isHealthy);\n\t\t}\n\t\telse {\n\t\t\t// Otherwise we have a mix, so find the best attribute and matching threshold to split on\n\t\t\tAttribute attribute = chooseAttribute(cases);\n\t\t\tdouble threshold = chooseAttributeThreshold(cases, attribute);\n\t\t\tNode tree = new Node();\n\t\t\ttree.attribute = attribute;\n\t\t\ttree.threshold = threshold;\n\t\t\tArrayList<Case> casesLessThan = new ArrayList<Case>();\n\t\t\tArrayList<Case> casesGreaterThan = new ArrayList<Case>();\n\t\t\t// Get the appropriate value and use that to sort into two lists, one for each side of the threshold\n\t\t\tfor (Case c : cases) {\n\t\t\t\tdouble value = 0;\n\t\t\t\tswitch (attribute) {\n\t\t\t\tcase K:\n\t\t\t\t\tvalue = c.k;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Na:\n\t\t\t\t\tvalue = c.na;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CL:\n\t\t\t\t\tvalue = c.cl;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HCO3:\n\t\t\t\t\tvalue = c.hco3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Endotoxin:\n\t\t\t\t\tvalue = c.endotoxin;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Aniongap:\n\t\t\t\t\tvalue = c.aniongap;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PLA2:\n\t\t\t\t\tvalue = c.pla2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase SDH:\n\t\t\t\t\tvalue = c.sdh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase GLDH:\n\t\t\t\t\tvalue = c.gldh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TPP:\n\t\t\t\t\tvalue = c.tpp;\n\t\t\t\t\tbreak;\n\t\t\t\tcase BreathRate:\n\t\t\t\t\tvalue = c.breathRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PCV:\n\t\t\t\t\tvalue = c.pcv;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PulseRate:\n\t\t\t\t\tvalue = c.pulseRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Fibrinogen:\n\t\t\t\t\tvalue = c.fibrinogen;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Dimer:\n\t\t\t\t\tvalue = c.dimer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase FibPerDim:\n\t\t\t\t\tvalue = c.fibPerDim;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (value < threshold) {\n\t\t\t\t\tcasesLessThan.add(c);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcasesGreaterThan.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Recurse on these sets to create subtrees\n\t\t\ttree.lessThanChildren = buildTree(casesLessThan);\n\t\t\ttree.greaterThanChildren = buildTree(casesGreaterThan);\n\t\t\t\n\t\t\treturn tree;\n\t\t}\n\t}",
"public abstract double test(ClassifierData<U> testData);",
"@Override\r\n\tpublic double classifyInstance(Instance instance) throws Exception {\n\t\tdouble[] hist = bop.bagToArray(bop.buildBag(instance));\r\n\r\n\t\t// stuff into Instance\r\n\t\tInstances newInsts = new Instances(matrix, 1); // copy attribute data\r\n\t\tnewInsts.add(new SparseInstance(1.0, hist));\r\n\r\n\t\treturn knn.classifyInstance(newInsts.firstInstance());\r\n\t}",
"public void classify() throws IOException\n {\n TrainingParameters tp = new TrainingParameters();\n tp.put(TrainingParameters.ITERATIONS_PARAM, 100);\n tp.put(TrainingParameters.CUTOFF_PARAM, 0);\n\n DoccatFactory doccatFactory = new DoccatFactory();\n DoccatModel model = DocumentCategorizerME.train(\"en\", new IntentsObjectStream(), tp, doccatFactory);\n\n DocumentCategorizerME categorizerME = new DocumentCategorizerME(model);\n\n try (Scanner scanner = new Scanner(System.in))\n {\n while (true)\n {\n String input = scanner.nextLine();\n if (input.equals(\"exit\"))\n {\n break;\n }\n\n double[] classDistribution = categorizerME.categorize(new String[]{input});\n String predictedCategory =\n Arrays.stream(classDistribution).filter(cd -> cd > 0.5D).count() > 0? categorizerME.getBestCategory(classDistribution): \"I don't understand\";\n System.out.println(String.format(\"Model prediction for '%s' is: '%s'\", input, predictedCategory));\n }\n }\n }",
"public int classify(Bitmap bitmap) {\n preprocess(bitmap);\n runInference();\n return postprocess();\n }",
"public int classify(String doc){\n\t\tint label = 0;\n\t\tint vSize = vocabulary.size();\n\t\tdouble[] score = new double[numClasses];\n\t\tfor(int i=0;i<score.length;i++){\n\t\t\tscore[i] = Math.log(classCounts[i]*1.0/trainingDocs.size());\n\t\t}\n\t\tString[] tokens = doc.split(\" \");\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tfor(String token: tokens){\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tscore[i] += Math.log(condProb[i].get(token));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tscore[i] += Math.log(1.0/(classTokenCounts[i]+vSize));\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"token: \"+token+\" \"+score[i]);\n\t\t\t}\n\t\t}\n\t\tdouble maxScore = score[0];\n\t\t//System.out.println(\"class 0: \"+score[0]);\n\t\tfor(int i=1;i<score.length;i++){\n\t\t\t//System.out.println(\"class \"+i+\": \"+score[i]);\n\t\t\tif(score[i]>maxScore){\n\t\t\t\tlabel = i;\n\t\t\t}\n\t\t}\n\t\treturn label;\n\t}",
"@Override\n\tpublic double classify(Example example) {\n\t\t// run forwards part of training algorithm on specific example\n\t\t// input to calculateForward method is ArrayList of examples, so\n\t\t// arbitrarily creating one in order to avoid duplicating code\n\t\tArrayList<Example> ex = new ArrayList<Example>();\n\t\tex.add(example);\n\t\tSystem.out.println(\"calculated: \" + calculateForward(ex).get(0) + \" label: \" + example.getLabel());\n\t\treturn (calculateForward(ex).get(0) > 0) ? 1.0 : -1.0;\n\t}",
"@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}",
"org.landxml.schema.landXML11.ClassificationDocument.Classification addNewClassification();",
"@Override\n public double classifyInstance(Instance instance) throws Exception {\n\n\n\n int numAttributes = instance.numAttributes();\n int clsIndex = instance.classIndex();\n boolean hasClassAttribute = true;\n int numTestAtt = numAttributes -1;\n if (numAttributes == m_numOfInputNeutrons) {\n hasClassAttribute = false; // it means the test data doesn't has class attribute\n numTestAtt = numTestAtt+1;\n }\n\n for (int i = 0; i< numAttributes; i++){\n if (instance.attribute(i).isNumeric()){\n\n double max = m_normalization[0][i];\n double min = m_normalization[1][i];\n double normValue = 0 ;\n if (instance.value(i)<min) {\n normValue = 0;\n m_normalization[1][i] = instance.value(i); // reset the smallest value\n }else if(instance.value(i)> max){\n normValue = 1;\n m_normalization[0][i] = instance.value(i); // reset the biggest value\n }else {\n if (max == min ){\n if (max == 0){\n normValue = 0;\n }else {\n normValue = max/Math.abs(max);\n }\n }else {\n normValue = (instance.value(i) - min) / (max - min);\n }\n }\n instance.setValue(i, normValue);\n }\n }\n\n double[] testData = new double[numTestAtt];\n\n\n\n\n\n int index = 0 ;\n\n if (!hasClassAttribute){\n\n for (int i =0; i<numAttributes; i++) {\n testData[i] = instance.value(i);\n }\n }else {\n for (int i = 0; i < numAttributes; i++) {\n\n if (i != clsIndex) {\n\n testData[index] = instance.value(i);\n\n index++;\n }\n }\n }\n\n\n\n DenseMatrix prediction = new DenseMatrix(numTestAtt,1);\n for (int i = 0; i<numTestAtt; i++){\n prediction.set(i, 0, testData[i]);\n }\n\n DenseMatrix H_test = generateH(prediction,weightsOfInput,biases, 1);\n\n DenseMatrix H_test_T = new DenseMatrix(1, m_numHiddenNeurons);\n\n H_test.transpose(H_test_T);\n\n DenseMatrix output = new DenseMatrix(1, m_numOfOutputNeutrons);\n\n H_test_T.mult(weightsOfOutput, output);\n\n double result = 0;\n\n if (m_typeOfELM == 0) {\n double value = output.get(0,0);\n result = value*(m_normalization[0][classIndex]-m_normalization[1][classIndex])+m_normalization[1][classIndex];\n //result = value;\n if (m_debug == 1){\n System.out.print(result + \" \");\n }\n }else if (m_typeOfELM == 1){\n int indexMax = 0;\n double labelValue = output.get(0,0);\n\n if (m_debug == 1){\n System.out.println(\"Each instance output neuron result (after activation)\");\n }\n for (int i =0; i< m_numOfOutputNeutrons; i++){\n if (m_debug == 1){\n System.out.print(output.get(0,i) + \" \");\n }\n if (output.get(0,i) > labelValue){\n labelValue = output.get(0,i);\n indexMax = i;\n }\n }\n if (m_debug == 1){\n\n System.out.println(\"//\");\n System.out.println(indexMax);\n }\n result = indexMax;\n }\n\n\n\n return result;\n\n\n }",
"@Test\n\tpublic void classificationTest(){\n\n\t\tJavaPairRDD<String, Set<String>> javaRDD = javaSparkContext.textFile(\"/Downloads/book2-master/2rd_data/ch02/Gowalla_totalCheckins.txt\")\n\t\t\t\t.map(line -> line.split(\"~\"))\n\t\t\t\t.map(s -> new AppDto(s[0],s[1],s[2],s[3],s[4]))\n\t\t\t\t.mapToPair(app -> {\n\t\t\t\t\tSet<String> setIntro = Arrays.stream(app.getIntroduction().split(\" \"))\n\t\t\t\t\t\t\t.map(s -> s.split(\"/\"))\n\t\t\t\t\t\t\t.filter(ss -> ss[0].length()>1 && (ss[1].equals(\"v\") || ss[1].indexOf(\"n\")>-1))\n\t\t\t\t\t\t\t.map(ss -> ss[0]).collect(Collectors.toSet());\n\n\t\t\t\t\treturn new Tuple2<>(app.getCls(), setIntro);\n\t\t\t\t});\n\n\t\tjavaRDD.map(t -> t._2).zipWithIndex();\n\t}",
"public static void classfy(ArrayList<ArrayList<String>> dataset ,ArrayList<ArrayList<String>> testData,int k) {\n\t\tint index = 0;\r\n\t\tint count = 0;\r\n\t\tfor (ArrayList<String> testItem : testData) {\r\n\t\t\tString str=getFeatureLabel(dataset, testItem, k);\r\n\t\t\tSystem.out.println(str);\r\n\t\t\tif (testItem.get((testData.get(0).size()-1)).equals(str)) {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类正确\");\r\n\t\t\t\tcount ++;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类错误\");\r\n\t\t\t}\r\n\t\t\tindex ++;\r\n\t\t}\r\n\t\tSystem.out.println(\"正确率为\"+count*1.0/testData.size());\r\n\t}",
"private void classify(final String text) {\n executorService.execute(\n () -> {\n // TODO 7: Run sentiment analysis on the input text\n List<Category> results = textClassifier.classify(text);\n\n // TODO 8: Convert the result to a human-readable text\n String textToShow = \"Input: \" + text + \"\\nOutput:\\n\";\n for (int i = 0; i < results.size(); i++) {\n Category result = results.get(i);\n textToShow +=\n String.format(\" %s: %s\\n\", result.getLabel(), result.getScore());\n }\n textToShow += \"---------\\n\";\n\n // Show classification result on screen\n showResult(textToShow);\n });\n }",
"public static boolean changeClassifier(ClassifiedFeature classifiedFeature, Classifier newClassifier, Classification classification) {\n if (changeClassifier(classifiedFeature, newClassifier)) {\n if (newClassifier == Classifier.ALIVE) {\n classification.getAliveFeatures().add(classifiedFeature.getFeature());\n classification.getDeadFeatures().remove(classifiedFeature.getFeature());\n classification.getUnboundFeatures().remove(classifiedFeature.getFeature());\n } else if (newClassifier == Classifier.DEAD) {\n classification.getAliveFeatures().remove(classifiedFeature.getFeature());\n classification.getDeadFeatures().add(classifiedFeature.getFeature());\n classification.getUnboundFeatures().add(classifiedFeature.getFeature());\n } else if (newClassifier == Classifier.UNBOUND) {\n classification.getAliveFeatures().remove(classifiedFeature.getFeature());\n classification.getDeadFeatures().remove(classifiedFeature.getFeature());\n classification.getUnboundFeatures().add(classifiedFeature.getFeature());\n }\n return true;\n } else\n return false;\n\n }",
"@Override\r\n public void buildClassifier(Instances instances) throws Exception {\n getCapabilities().testWithFail(instances);\r\n\r\n // remove instances with missing class\r\n instances = new Instances(instances);\r\n instances.deleteWithMissingClass();\r\n\r\n // ensure we have a data set with discrete variables only and with no\r\n // missing values\r\n instances = normalizeDataSet(instances);\r\n\r\n // copy instances to local field\r\n// m_Instances = new Instances(instances);\r\n m_Instances = instances;\r\n\r\n // initialize arrays\r\n int numClasses = m_Instances.classAttribute().numValues();\r\n m_Structures = new BayesNet[numClasses];\r\n m_cInstances = new Instances[numClasses];\r\n // m_cEstimator = new DiscreteEstimatorBayes(numClasses, m_fAlpha);\r\n\r\n for (int iClass = 0; iClass < numClasses; iClass++) {\r\n splitInstances(iClass);\r\n }\r\n\r\n // update probabilty of class label, using Bayesian network associated\r\n // with the class attribute only\r\n Remove rFilter = new Remove();\r\n rFilter.setAttributeIndices(\"\" + (m_Instances.classIndex() + 1));\r\n rFilter.setInvertSelection(true);\r\n rFilter.setInputFormat(m_Instances);\r\n Instances classInstances = new Instances(m_Instances);\r\n classInstances = Filter.useFilter(classInstances, rFilter);\r\n\r\n m_cEstimator = new BayesNet();\r\n SimpleEstimator classEstimator = new SimpleEstimator();\r\n classEstimator.setAlpha(m_fAlpha);\r\n m_cEstimator.setEstimator(classEstimator);\r\n m_cEstimator.buildClassifier(classInstances);\r\n\r\n /*combiner = new LibSVM(); \r\n FastVector classFv = new FastVector(2);\r\n classFv.addElement(CNTL);\r\n classFv.addElement(CASE);\r\n Attribute classAt = new Attribute(m_Instances.classAttribute().name(), \r\n classFv);\r\n attributesFv = new FastVector(m_Structures.length);\r\n attributesFv.addElement(classAt);\r\n for (int i = 0; i < m_Instances.classAttribute().numValues(); i++){\r\n if (!m_Instances.classAttribute().value(i).equals(CNTL))\r\n attributesFv.addElement(new Attribute(m_Instances.classAttribute\r\n ().value(i)));\r\n }\r\n combinerTrain = new Instances(\"combinertrain\", attributesFv, \r\n m_Instances.numInstances());\r\n combinerTrain.setClassIndex(0);\r\n for (int i = 0; i < m_Instances.numInstances(); i++){\r\n double[] probs = super.distributionForInstance(m_Instances.instance(i));\r\n Instance result = new Instance(attributesFv.size()); \r\n if (!m_Instances.classAttribute().value(m_Instances.instance(i).\r\n classIndex()).equals(CNTL))\r\n result.setValue(classAt, CASE);\r\n else\r\n result.setValue(classAt, CNTL);\r\n for (int j = 0; j < attributesFv.size(); j++){\r\n if (!attributesFv.elementAt(j).equals(classAt)){\r\n Attribute current = (Attribute) attributesFv.elementAt(j);\r\n result.setValue(current, \r\n probs[m_Instances.classAttribute().indexOfValue\r\n (current.name())]);\r\n }\r\n }\r\n combinerTrain.add(result);\r\n }\r\n combinerTrain = discretize(combinerTrain);\r\n combiner.buildClassifier(combinerTrain);*/\r\n }",
"public static DecisionTreeNode performCrossValidation(List<CSVAttribute[]> dataset, int labelAttribute,\n BiFunction<List<CSVAttribute[]>, Integer, DecisionTreeNode> trainFunction,\n int numFolds) {\n\n List<Double> foldPerfResults = new ArrayList<>();\n\n // Split dataset\n DecisionTreeNode learnedTree = null;\n\n List<CSVAttribute[]> trainData;\n List<CSVAttribute[]> ulTestData;\n List<CSVAttribute[]> lTestData;\n\n // inintialize confusion matrix with zeros\n int[][] confusionMatrix = new int[][]{{0,0},{0,0}};\n\n for (int i = 0; i < numFolds; i++) {\n List<List<CSVAttribute[]>> splitData = getTrainData(dataset, numFolds, labelAttribute);\n\n trainData = splitData.get(0);\n ulTestData = splitData.get(1);\n lTestData = splitData.get(2);\n\n // learn from training subset\n learnedTree = trainFunction.apply(trainData, labelAttribute);\n\n // gather results in list\n foldPerfResults.add(predictionAccuracy(ulTestData, lTestData, learnedTree, labelAttribute));\n\n int[][] newConfusionMatrix = getConfusionMatrix(ulTestData, lTestData, labelAttribute);\n confusionMatrix[0][0] += newConfusionMatrix[0][0];\n confusionMatrix[0][1] += newConfusionMatrix[0][1];\n confusionMatrix[1][0] += newConfusionMatrix[1][0];\n confusionMatrix[1][1] += newConfusionMatrix[1][1];\n }\n\n int tp = confusionMatrix[0][0];\n int fp = confusionMatrix[0][1];\n int fn = confusionMatrix[1][0];\n int tn = confusionMatrix[1][1];\n float posPrecision = (float) tp / (tp + fp);\n float negPrecision = (float) tn / (tn + fn);\n float posRecall = (float) tp / (tp + fn);\n float negRecall = (float) tn / (tn + fp);\n\n double averageAccuracy = foldPerfResults.stream()\n .mapToDouble(d -> d)\n .average()\n .orElse(0.0);\n double standardDeviation = Math.sqrt((foldPerfResults.stream()\n .mapToDouble(d -> d)\n .map(x -> Math.pow((x - averageAccuracy),2))\n .sum()) / foldPerfResults.size());\n\n System.out.println(\"accuracy: \" + averageAccuracy * 100 + \"% +/- \" + standardDeviation * 100 + \"%\");\n System.out.println();\n System.out.println(\" true 1 | true 0 | class precision\");\n System.out.println(\"-------------------------------------------\");\n System.out.println(\"pred. 1 | \"+tp+\" | \"+fp+\" | \"+posPrecision*100+\"%\");\n System.out.println(\"pred. 0 | \"+fn+\" | \"+tn+\" | \"+negPrecision*100+\"%\");\n System.out.println(\"-------------------------------------------\");\n System.out.println(\"class recall | \"+posRecall*100+\"% | \"+negRecall*100+\"% | \");\n\n return learnedTree;\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}",
"protected abstract boolean makeDecision (Map<Key, Object> context);",
"public static String evaluateClassification(String hyp_feature, String true_feature, FeatureSet fs)\n throws AuToBIException {\n EvaluationSummary eval = new EvaluationSummary(generateEvaluationResults(hyp_feature, true_feature, fs));\n return eval.toString();\n }",
"@Override\n\tpublic ClassifyResult classify(String[] words) {\n\n\t\t// Sum up the log probabilities for each word in the input data, and the\n\t\t// probability of the label\n\t\t// Set the label to the class with larger log probability\n\t\tClassifyResult ret = new ClassifyResult();\n\t\tret.label = Label.SPORTS;\n\t\tret.log_prob_sports = 0;\n\t\tret.log_prob_business = 0;\n\n\t\tfor (String w : words) {\n\t\t\tret.log_prob_sports += Math.log(p_w_given_l(w, Label.SPORTS));\n\t\t\tret.log_prob_business += Math.log(p_w_given_l(w, Label.BUSINESS));\n\t\t}\n\n\t\tret.log_prob_sports += Math.log(p_l(Label.SPORTS));\n\t\tret.log_prob_business += Math.log(p_l(Label.BUSINESS));\n\n\t\tif (ret.log_prob_business > ret.log_prob_sports) {\n\t\t\tret.label = Label.BUSINESS;\n\t\t}\n\n\t\treturn ret;\n\t}",
"public void doneClassifying() {\n\t\tbinaryTrainClassifier = trainFactory.trainClassifier(binaryTrainingData);\n\t\tmultiTrainClassifier = testFactory.trainClassifier(multiTrainingData);\n\t\tLinearClassifier.writeClassifier(binaryTrainClassifier, BINARY_CLASSIFIER_FILENAME);\n\t\tLinearClassifier.writeClassifier(multiTrainClassifier, MULTI_CLASSIFIER_FILENAME);\n\t}",
"public Integer getClassify() {\n return classify;\n }",
"public abstract boolean supports(ClassificationMethod method);",
"@Override\n\tpublic double classifyInstance(Instance arg0) throws Exception {\n\t\treturn 0;\n\t}",
"public static void KNNClassifier() throws IOException {\n\n\t\tDataset data = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/trainVectors\"), 0, \" \", \":\");\n\n\t\tClassifier knn = new KNearestNeighbors(5);\n\t\tknn.buildClassifier(data);\n\n\n\t\tDataset dataForClassification = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/testVectors\"), 0, \" \", \":\");\n\n\t\tint correct = 0, wrong = 0;\n\n\t\tfor (Instance inst : dataForClassification) {\n\t\t\tObject predictedClassValue = knn.classify(inst);\n\t\t\tObject realClassValue = inst.classValue();\n\t\t\tif (predictedClassValue.equals(realClassValue))\n\t\t\t\tcorrect++;\n\t\t\telse\n\t\t\t\twrong++;\n\t\t}\n\t\tSystem.out.println(\"Correct predictions \" + correct);\n\t\tSystem.out.println(\"Wrong predictions \" + wrong);\n\t\tSystem.out.println(\"Accuracy: \" + (float) correct / (correct + wrong));\n\n\t}",
"public double classifyInstance(Instance instance) throws Exception {\n\n /* check the instance */\n if (m_Train.equalHeaders(instance.dataset()) == false){\n throw new Exception(\"NNge.classifyInstance : Incompatible instance types !\");\n }\n\t\n Exemplar matched = nearestExemplar(instance); \n if(matched == null){\n throw new Exception(\"NNge.classifyInstance : NNge hasn't been trained !\");\n }\n return matched.classValue();\n }",
"public T caseClassifier(Classifier object) {\n\t\treturn null;\n\t}",
"public void classifyReview(Object[] args) {\n\t\tObject[] ans = new Object[2];\n\t\t\n\t\tif (args.length<2) \n\t\t{\n\t\t\tans[0] = \"error\";\n\t\t\tans[1] = \"not enough data\";\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(ans);\n\t\t} \n\t\telse if ((((String)args[0]).equals(\"classify\")) && (((JSONArray)args[1]).length() != 0))\n\t\t{\n\t\t\tJSONArray jsonArray = (JSONArray)args[1];\n\t\t\tArrayList<ReviewedTag> revsTag = new ArrayList<ReviewedTag>();\n\t\t\tArrayList<Review> revs = JsonParser.Json2Reviews(jsonArray);\n\t\t\tfor(Review rev : revs){\n\t\t\t\tReviewedTag tag = atrributes.classify(rev);\n\t\t\t\trevsTag.add(tag);\n\t\t\t}\n\t\t\tJSONObject json = JsonParser.Tags2Json(revsTag);\n\t\t\tans[0] = \"error\";\n\t\t\tans[1] = json;\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(ans);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tans[0] = \"error\";\n\t\t\tans[1] = \"wrong argumetns\";\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(ans);\n\t\t}\n\t\t\n\t}",
"@Test\n\tpublic void test1() {\n\t\tTriangleType type = TriangleClassifier.classify(2,2, 1);\n\t\tassertEquals(type,TriangleType.ISOSCELES);\n\t}",
"public void buildClassifier(Instances data) throws Exception {\n\n // can classifier tree handle the trainData?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n\n buildTree(data, m_subtreeRaising || !m_cleanup);\n if (m_pruneTheTree) {\n prune(data);\n }\n if (m_cleanup) {\n cleanup(new Instances(data, 0));\n }\n }",
"boolean hasDecision();",
"boolean hasDecision();",
"public void setClassify(Integer classify) {\n this.classify = classify;\n }",
"public void buildClassifier(Instances data) throws Exception {\n\n // can classifier handle the data?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n \n /* initialize the classifier */\n\n m_Train = new Instances(data, 0);\n m_Exemplars = null;\n m_ExemplarsByClass = new Exemplar[m_Train.numClasses()];\n for(int i = 0; i < m_Train.numClasses(); i++){\n m_ExemplarsByClass[i] = null;\n }\n m_MaxArray = new double[m_Train.numAttributes()];\n m_MinArray = new double[m_Train.numAttributes()];\n for(int i = 0; i < m_Train.numAttributes(); i++){\n m_MinArray[i] = Double.POSITIVE_INFINITY;\n m_MaxArray[i] = Double.NEGATIVE_INFINITY;\n }\n\n m_MI_MinArray = new double [data.numAttributes()];\n m_MI_MaxArray = new double [data.numAttributes()];\n m_MI_NumAttrClassInter = new int[data.numAttributes()][][];\n m_MI_NumAttrInter = new int[data.numAttributes()][];\n m_MI_NumAttrClassValue = new int[data.numAttributes()][][];\n m_MI_NumAttrValue = new int[data.numAttributes()][];\n m_MI_NumClass = new int[data.numClasses()];\n m_MI = new double[data.numAttributes()];\n m_MI_NumInst = 0;\n for(int cclass = 0; cclass < data.numClasses(); cclass++)\n m_MI_NumClass[cclass] = 0;\n for (int attrIndex = 0; attrIndex < data.numAttributes(); attrIndex++) {\n\t \n if(attrIndex == data.classIndex())\n\tcontinue;\n\t \n m_MI_MaxArray[attrIndex] = m_MI_MinArray[attrIndex] = Double.NaN;\n m_MI[attrIndex] = Double.NaN;\n\t \n if(data.attribute(attrIndex).isNumeric()){\n\tm_MI_NumAttrInter[attrIndex] = new int[m_NumFoldersMI];\n\tfor(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrInter[attrIndex][inter] = 0;\n\t}\n } else {\n\tm_MI_NumAttrValue[attrIndex] = new int[data.attribute(attrIndex).numValues() + 1];\n\tfor(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrValue[attrIndex][attrValue] = 0;\n\t}\n }\n\t \n m_MI_NumAttrClassInter[attrIndex] = new int[data.numClasses()][];\n m_MI_NumAttrClassValue[attrIndex] = new int[data.numClasses()][];\n\n for(int cclass = 0; cclass < data.numClasses(); cclass++){\n\tif(data.attribute(attrIndex).isNumeric()){\n\t m_MI_NumAttrClassInter[attrIndex][cclass] = new int[m_NumFoldersMI];\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;\n\t }\n\t} else if(data.attribute(attrIndex).isNominal()){\n\t m_MI_NumAttrClassValue[attrIndex][cclass] = new int[data.attribute(attrIndex).numValues() + 1];\t\t\n\t for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrClassValue[attrIndex][cclass][attrValue] = 0;\n\t }\n\t}\n }\n }\n m_MissingVector = new double[data.numAttributes()];\n for(int i = 0; i < data.numAttributes(); i++){\n if(i == data.classIndex()){\n\tm_MissingVector[i] = Double.NaN;\n } else {\n\tm_MissingVector[i] = data.attribute(i).numValues();\n }\n }\n\n /* update the classifier with data */\n Enumeration enu = data.enumerateInstances();\n while(enu.hasMoreElements()){\n update((Instance) enu.nextElement());\n }\t\n }",
"private TreeNode BuildTree(List<Instance> instances, List<Boolean> attributes) {\n\t\t// if instances is empty\n\t\tif (instances.isEmpty()) {\n\t\t\treturn baselineNode;\n\t\t}\n\t\t// if instances are pure\n\t\tif (isPure(instances)) {\n\t\t\tLeafNode returnVal = new LeafNode(1,classifierNames.get(instances.get(0).category));\n\t\t\treturn returnVal;\n\t\t\t// return leaf node containing CLASS NAME and probability 1\n\t\t}\n\t\tif (!attributes.contains(false)) { // that is, all attributes have been used\n\t\t\tint[] most = getMostCommonClassAndTotal(instances);\n\t\t\treturn new LeafNode((double)((double)instances.size() - (double)most[1]) / (double)instances.size(),\n\t\t\t\t\tclassifierNames.get(most[0]));\n\t\t\t// return a leaf node containing the name & probability of the MAJORITY CLASS\n\t\t\t// of instances in the node (or choose randomly if equal)\n\t\t}\n\t\t// else find best attribute\n\t\telse {\n\t\t\tint bestAttrIndex = 0;\n\t\t\tdouble bestPurity = 0;\n\t\t\tList<Instance> bestInstsTrue = new ArrayList<Instance>();\n\t\t\tList<Instance> bestInstsFalse = new ArrayList<Instance>();\n\t\t\tfor (int i = 0; i < attributes.size(); i++) {\n\t\t\t\t// for each remaining attribute,\n\t\t\t\tif (attributes.get(i)) { // if we have used this attribute, skip!\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tList<Instance> trueSet = new ArrayList<Instance>();\n\t\t\t\tList<Instance> falseSet = new ArrayList<Instance>();\n\t\t\t\tfor (Instance inst : instances) {\n\t\t\t\t\tif (inst.getAtt(i)) {\n\t\t\t\t\t\ttrueSet.add(inst);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfalseSet.add(inst);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdouble truePurity = purity(trueSet);\n\t\t\t\tdouble falsePurity = purity(falseSet);\n\t\t\t\tdouble weightedPurity = ((double)trueSet.size()/(double)instances.size()*truePurity)\n\t\t\t\t\t\t+ ((double)falseSet.size()/(double)instances.size()*falsePurity);\n\t\t\t\tif (weightedPurity > bestPurity) {\n\t\t\t\t\tbestAttrIndex = i;\n\t\t\t\t\tbestPurity = weightedPurity;\n\t\t\t\t\tbestInstsTrue = trueSet;\n\t\t\t\t\tbestInstsFalse = falseSet;\n\t\t\t\t}\n\t\t\t}\n\t\t\tattributes.set(bestAttrIndex,true);\n\t\t\tArrayList<Boolean> leftArr = new ArrayList<Boolean>();\n\t\t\tArrayList<Boolean> rightArr = new ArrayList<Boolean>();\n\t\t\tleftArr.addAll(attributes);\n\t\t\trightArr.addAll(attributes);\n\t\t\tTreeNode left = BuildTree(bestInstsTrue, leftArr);\n\t\t\tTreeNode right = BuildTree(bestInstsFalse, rightArr);\n\t\t\tTreeNode me = new Node(attributeNames.get(bestAttrIndex),left,right);\n\t\t\treturn me;\n\t\t}\n\t}",
"protected void doClassificationReport(ClassificationAlgorithm algorithm)\n\t{\n\t\t// Test report name\n\t\tString testReportFilename = \"TestClassificationReport.txt\";\n\t\t// Train report name\n\t\tString trainReportFilename = \"TrainClassificationReport.txt\";\n\t\t// Test report file\n\t\tFile testReportFile = new File(reportDirectory, testReportFilename);\n\t\t// Train report file\n\t\tFile trainReportFile = new File(reportDirectory, trainReportFilename);\n\t\t// Test file writer\n\t\tFileWriter testFile = null;\n\t\t// Train file writer\n\t\tFileWriter trainFile = null;\n\t\t// Number of conditions\n\t\tint conditions = 0;\n\t\t// Classifier\n\t\tIClassifier classifier = algorithm.getClassifier();\n\n\t\tint[][] confusionMatrixTrain = classifier.getConfusionMatrix(algorithm.getTrainSet());\n\t\tint[][] confusionMatrixTest = classifier.getConfusionMatrix(algorithm.getTestSet());\n\n\t\tint[] numberInstancesTrain = new int[confusionMatrixTrain.length];\n\t\tint[] numberInstancesTest = new int[confusionMatrixTest.length];\n\t\tint correctedClassifiedTrain = 0, correctedClassifiedTest = 0;\n\n\t\tfor(int i = 0; i < confusionMatrixTrain.length; i++)\n\t\t{\n\t\t\tcorrectedClassifiedTrain += confusionMatrixTrain[i][i];\n\t\t\tcorrectedClassifiedTest += confusionMatrixTest[i][i];\n\n\t\t\tfor(int j = 0; j < confusionMatrixTrain.length; j++)\n\t\t\t{\n\t\t\t\tnumberInstancesTrain[i] += confusionMatrixTrain[i][j];\n\t\t\t\tnumberInstancesTest[i] += confusionMatrixTest[i][j];\n\t\t\t}\n\t\t}\n\n\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tDecimalFormat df4 = new DecimalFormat(\"0.0000\");\n\n\t\ttry {\n\t\t\ttestReportFile.createNewFile();\n\t\t\ttrainReportFile.createNewFile();\n\t\t\ttestFile = new FileWriter (testReportFile);\n\t\t\ttrainFile = new FileWriter (trainReportFile);\n\n\t\t\t// Dataset metadata\n\t\t\tIMetadata metadata = algorithm.getTrainSet().getMetadata();\n\n\t\t\t// Get the classifier\n\t\t\tList<Rule> classificationRules = ((RuleBase) classifier).getClassificationRules();\n\n\t\t\t// Obtain the number of conditions\n\t\t\tconditions = ((RuleBase) classifier).getConditions();\n\n\t\t\t// Obtain the number of classes\n\t\t\tCategoricalAttribute catAttribute = (CategoricalAttribute) metadata.getAttribute(metadata.getClassIndex());\n\t\t\tint numClasses = catAttribute.getCategories().size();\n\n\t\t\t// Train data\n\t\t\ttrainFile.write(\"File name: \" + ((FileDataset) algorithm.getTrainSet()).getFileName());\n\t\t\ttrainFile.write((\"\\nRuntime (s): \" + (((double)(endTime-initTime)) / 1000.0)));\n\t\t\ttrainFile.write(\"\\nMemory Usage(bytes): \" + (afterUsedMem-beforeUsedMem));\n\t\t\ttrainFile.write(\"\\nNumber of rules: \" + (classificationRules.size()+1));\n\t\t\t//trainFile.write(\"\\nNumber of conditions: \"+ conditions);\n\t\t\t//trainFile.write(\"\\nAverage number of conditions per rule: \" + (double)conditions/((double)classificationRules.size()+1.0));\n\t\t\ttrainFile.write(\"\\nAccuracy: \" + df4.format((correctedClassifiedTrain / (double) algorithm.getTrainSet().getInstances().size())));\n\n\t\t\t// Write the geometric mean\n\t\t\t//trainFile.write(\"\\nGeometric mean: \" + df4.format(mediaGeoTrain));\n\t\t\t//trainFile.write(\"\\nCohen's Kappa rate: \" + df4.format(kappaRateTrain));\n\t\t\t//trainFile.write(\"\\nAUC: \" + df4.format(aucTrain));\n\n\t\t\ttrainFile.write(\"\\n\\n#Percentage of correct predictions per class\");\n\n\t\t\t// Test data\n\t\t\ttestFile.write(\"File name: \" + ((FileDataset) algorithm.getTestSet()).getFileName());\n\t\t\ttestFile.write((\"\\nRuntime (s): \" + (((double)(endTime-initTime)) / 1000.0)));\n\t\t\ttrainFile.write(\"\\nMemory Usage(bytes): \" + (afterUsedMem-beforeUsedMem));\n\t\t\t//\ttestFile.write(\"\\nNumber of different attributes: \" + (metadata.numberOfAttributes()-1));\n\t\t\ttestFile.write(\"\\nNumber of rules: \" + (classificationRules.size()+1));\n\t\t\t//\ttestFile.write(\"\\nNumber of conditions: \"+ conditions);\n\t\t\t//\ttestFile.write(\"\\nAverage number of conditions per rule: \" + (double)conditions/((double)classificationRules.size()+1.0));\n\t\t\ttestFile.write(\"\\nAccuracy: \" + df4.format((correctedClassifiedTest / (double) algorithm.getTestSet().getInstances().size())));\n\n\t\t\t// Write the geometric mean\n\t\t\t//testFile.write(\"\\nGeometric mean: \" + df4.format(mediaGeoTest));\n\t\t\t//testFile.write(\"\\nCohen's Kappa rate: \" + df4.format(kappaRateTest));\n\t\t\t//testFile.write(\"\\nAUC: \" + df4.format(aucTest));\n\n\t\t\ttestFile.write(\"\\n\\n#Percentage of correct predictions per class\");\n\n\t\t\t// Check if the report directory name is in a file\n\t\t\tString aux = \"\";\n\t\t\tif(getReportDirName().split(\"/\").length>1)\n\t\t\t\taux = getReportDirName().split(\"/\")[0]+\"/\";\n\t\t\telse\n\t\t\t\taux = \"./\";\n\n\t\t\t// Global report for train\n\t\t\tString nameFileTrain = aux +getGlobalReportName() + \"-train.txt\";\n\t\t\tFile fileTrain = new File(nameFileTrain);\n\t\t\tBufferedWriter bwTrain;\n\n\t\t\t// Global report for test\n\t\t\tString nameFileTest = aux +getGlobalReportName() + \"-test.txt\";\n\t\t\tFile fileTest = new File(nameFileTest);\n\t\t\tBufferedWriter bwTest;\n\n\t\t\t// If the global report for train exist\n\t\t\tif(fileTrain.exists())\n\t\t\t{\n\t\t\t\tbwTrain = new BufferedWriter (new FileWriter(nameFileTrain,true));\n\t\t\t\tbwTrain.write(System.getProperty(\"line.separator\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbwTrain = new BufferedWriter (new FileWriter(nameFileTrain));\n\t\t\t\tbwTrain.write(\"Dataset \t\t\t\t\t\t\t|| Accuracy || Execution time(s) || Memory Usage (bytes)\\n\");\t\t\t}\n\n\t\t\t// If the global report for test exist\n\t\t\tif(fileTest.exists())\n\t\t\t{\n\t\t\t\tbwTest = new BufferedWriter (new FileWriter(nameFileTest,true));\n\t\t\t\tbwTest.write(System.getProperty(\"line.separator\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbwTest = new BufferedWriter (new FileWriter(nameFileTest));\n\n\t\t\t\tbwTest.write(\"Dataset \t\t\t\t\t\t\t\t|| Accuracy || Execution time(s) || Memory Usage (bytes)\\n\");\n\n\t\t\t}\n\n\t\t\t//Write the train dataset name\n\t\t\tbwTrain.write(((FileDataset) algorithm.getTrainSet()).getFileName() + \"||\");\n\t\t\t//Write the test dataset name\n\t\t\tbwTest.write(((FileDataset) algorithm.getTestSet()).getFileName() + \"||\");\n\t\t\t//Write the percentage of correct predictions\n\t\t\tbwTrain.write(((correctedClassifiedTrain / (double) algorithm.getTrainSet().getInstances().size())) + \",\");\n\n\t\t\t//bwTrain.write(kappaRateTrain + \",\");\n\t\t\t//bwTrain.write(aucTrain + \",\");\n\n\t\t\tfor(int i=0; i<numClasses; i++)\n\t\t\t{\n\t\t\t\tString result = new String();\n\n\t\t\t\tresult = \"\\n Class \" + metadata.getAttribute(metadata.getClassIndex()).show(i) + \":\";\n\t\t\t\tif(numberInstancesTrain[i] == 0)\n\t\t\t\t{\n\t\t\t\t\tresult += \" 100.00\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult += \" \" + df.format((confusionMatrixTrain[i][i] / (double) numberInstancesTrain[i]) * 100) + \"%\";\n\t\t\t\t}\n\n\t\t\t\ttrainFile.write(result);\n\t\t\t}\n\n\t\t\ttrainFile.write(\"\\n#End percentage of correct predictions per class\");\n\n\n\t\t\t bwTrain.write((((double)(endTime-initTime)) / 1000.0) + \"\");\n\n\t\t\ttrainFile.write(\"\\n\\n#Classifier\\n\");\n\n\t\t\ttrainFile.write(classifier.toString(metadata));\n\n\t\t\t// Write the Percentage of correct predictions\n\t\t\tbwTest.write(((correctedClassifiedTest / (double) algorithm.getTestSet().getInstances().size())) + \",\");\n\t\t\t//bwTest.write(kappaRateTest + \",\");\n\t\t\t//bwTest.write(aucTest + \",\");\n\n\t\t\tfor(int i=0; i<numClasses; i++)\n\t\t\t{\n\t\t\t\tString result = new String();\n\n\t\t\t\tresult = \"\\n Class \" + metadata.getAttribute(metadata.getClassIndex()).show(i) +\":\";\n\t\t\t\tif(numberInstancesTest[i] == 0)\n\t\t\t\t{\n\t\t\t\t\tresult += \" 100.00\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult += \" \" + df.format((confusionMatrixTest[i][i] / (double) numberInstancesTest[i]) *100) + \"%\";\n\t\t\t\t}\n\t\t\t\ttestFile.write(result);\n\t\t\t}\n\n\t\t\ttestFile.write(\"\\n#End percentage of correct predictions per class\");\n\n\t\t\t//bwTest.write(mediaGeoTest + \",\");\n\t\t\t//bwTest.write((classificationRules.size()+1) + \",\");\n\t\t\t//bwTest.write(conditions + \",\");\n\t\t\t//bwTest.write((double)conditions/((double)classificationRules.size()+1.0) + \",\");\n\t\t\t//bwTest.write(algorithm.getEvaluator().getNumberOfEvaluations()+\",\");\n\t\t\tbwTest.write((((double)(endTime-initTime)) / 1000.0) + \"\");\n\n\t\t\ttestFile.write(\"\\n\\n#Classifier\\n\");\n\n\t\t\ttestFile.write(classifier.toString(metadata));\n\n\t\t\ttestFile.write(\"\\n#Test Classification Confusion Matrix\\n\");\n\n\t\t\ttestFile.write(\"\\t\\t\\tPredicted\\n\\t\\t\\t\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t\ttestFile.write(\"C\"+ i + \"\\t\");\n\n\t\t\ttestFile.write(\"|\\nActual\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t{\n\t\t\t\tif(i != 0)\n\t\t\t\t\ttestFile.write(\"\\t\");\n\n\t\t\t\ttestFile.write(\"\\tC\" + i + \"\\t\");\n\n\t\t\t\tfor(int j = 0; j < metadata.numberOfClasses(); j++)\n\t\t\t\t\ttestFile.write(confusionMatrixTest[i][j] + \"\\t\");\n\n\t\t\t\ttestFile.write(\"|\\tC\" + i + \" = \" + metadata.getAttribute(metadata.getClassIndex()).show(i) + \"\\n\");\n\t\t\t}\n\n\t\t\ttrainFile.write(\"\\n#Train Classification Confusion Matrix\\n\");\n\n\t\t\ttrainFile.write(\"\\t\\t\\tPredicted\\n\\t\\t\\t\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t\ttrainFile.write(\"C\"+ i + \"\\t\");\n\n\t\t\ttrainFile.write(\"|\\nActual\");\n\n\t\t\tfor(int i = 0; i < metadata.numberOfClasses(); i++)\n\t\t\t{\n\t\t\t\tif(i != 0)\n\t\t\t\t\ttrainFile.write(\"\\t\");\n\n\t\t\t\ttrainFile.write(\"\\tC\" + i + \"\\t\");\n\n\t\t\t\tfor(int j = 0; j < metadata.numberOfClasses(); j++)\n\t\t\t\t\ttrainFile.write(confusionMatrixTrain[i][j] + \"\\t\");\n\n\t\t\t\ttrainFile.write(\"||\\tC\" + i + \" = \" + metadata.getAttribute(metadata.getClassIndex()).show(i) + \"\\n\");\n\t\t\t}\n\n\t\t\t// Close the files\n\t\t\tbwTest.close();\n\t\t\tbwTrain.close();\n\t\t\ttestFile.close();\n\t\t\ttrainFile.close();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void run() throws Exception {\r\n\r\n\r\n LibSVM svm = new LibSVM();\r\n String svmOptions = \"-S 0 -K 2 -C 8 -G 0\"; //Final result: [1, -7 for saveTrainingDataToFileHybridSampling2 ]\r\n svm.setOptions(weka.core.Utils.splitOptions(svmOptions));\r\n System.out.println(\"SVM Type and Keranl Type= \" + svm.getSVMType() + svm.getKernelType());//1,3 best result 81%\r\n // svm.setNormalize(true);\r\n\r\n\r\n// load training data from .arff file\r\n ConverterUtils.DataSource source = new ConverterUtils.DataSource(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSSMOTE464Random.arff\");\r\n System.out.println(\"\\n\\nLoaded data:\\n\\n\" + source.getDataSet());\r\n Instances dataFiltered = source.getDataSet();\r\n dataFiltered.setClassIndex(0);\r\n\r\n // gridSearch(svm, dataFiltered);\r\n Evaluation evaluation = new Evaluation(dataFiltered);\r\n evaluation.crossValidateModel(svm, dataFiltered, 10, new Random(1));\r\n System.out.println(evaluation.toSummaryString());\r\n System.out.println(evaluation.weightedAreaUnderROC());\r\n double[][] confusionMatrix = evaluation.confusionMatrix();\r\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n System.out.print(confusionMatrix[i][j] + \" \");\r\n\r\n }\r\n System.out.println();\r\n }\r\n System.out.println(\"accuracy for crime class= \" + (confusionMatrix[0][0] / (confusionMatrix[0][1] + confusionMatrix[0][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for other class= \" + (confusionMatrix[1][1] / (confusionMatrix[1][1] + confusionMatrix[1][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for crime class= \" + evaluation.truePositiveRate(0) + \"%\");\r\n System.out.println(\"accuracy for other class= \" + evaluation.truePositiveRate(1) + \"%\");\r\n\r\n\r\n }",
"public static void LibSVMClassifier() throws IOException {\n\n\t\t/* Load a data set */\n\t\tDataset data = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/trainVectors\"), 0, \" \", \":\");\n\t\t/*\n\t\t * Contruct a LibSVM classifier with default settings.\n\t\t */\n\t\tClassifier svm = new LibSVM();\n\t\tsvm.buildClassifier(data);\n\n\t\tDataset dataForClassification = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/testVectors\"), 0, \" \", \":\");\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tint correct = 0, wrong = 0;\n\t\t\n\t\n\t\tfor (Instance inst : dataForClassification) {\n\t\t\tObject predictedClassValue = svm.classify(inst);\n\t\t\tObject realClassValue = inst.classValue();\n\t\t\tif (predictedClassValue.equals(realClassValue))\n\t\t\t\tcorrect++;\n\t\t\telse\n\t\t\t\twrong++;\n\t\t}\n\t\tSystem.out.println(\"Correct predictions \" + correct);\n\t\tSystem.out.println(\"Wrong predictions \" + wrong);\n\t\tSystem.out.println(\"Accuracy: \" + (float) correct / (correct + wrong));\n\n\t}",
"public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }",
"@Test\r\n public void testAssessCase() throws Exception{\r\n System.out.println(\"assessCase\");\r\n Case aCase = new StringCase(\"abc123\");\r\n RuleSetImpl instance = new RuleSetImpl(\"Test\", true);\r\n instance.addRule(new RegExRule(\".*\", \"string\"));\r\n instance.addRule(new RegExRule(\"a.*\", \"aString\"));\r\n Opinion result = instance.assessCase(aCase, null, \"Test\", RuleSet.ALWAYSPERSIST, null, null, null, false);\r\n assertTrue(result.getLabel().contains(\"string\"));\r\n assertTrue(result.getLabel().contains(\"aString\"));\r\n System.out.println(result.getEnrichedCase(\"Test\", aCase, false, null));\r\n assertTrue(result.getEnrichedCase(\"Test\", aCase, false, null).contains(\"Test\"));\r\n }",
"public void classifyTaxonomy(ReasonerTaskListener taskListener) throws DIGReasonerException;",
"@SuppressWarnings(\"unchecked\")\n\tpublic int classify(BatteryObject instance){\n\t\tJSONObject create_inst = new JSONObject();\n\t\tcreate_inst.put(\"time\", convertToWeekTime(instance.time_stamp));\n\t\tcreate_inst.put(\"lastChargingLevel\", instance.last_level);\n\t\tcreate_inst.put(\"timeOfLastCharge\", convertToWeekTime(instance.time_of_last_charge));\n\t\tcreate_inst.put(\"level\",instance.current_level);\n\t\tcreate_inst.put(\"status\",instance.status_string);\n\t\tcreate_inst.put(\"lengthOfLastCharge\", instance.length_of_last_charge);\n\t\t\n\t\tString result = binaryClassify(create_inst,root_scheme);\n\t\tString quarter_number = result.substring(result.indexOf(' ') + 1).trim();\n\t\t\n\t\tif(quarter_number.compareTo(\"\") == 0){\n\t\t\tLog.i(TAG,\"No tree path was found.\");\n\t\t\treturn -1;\n\t\t}\n\t\treturn Integer.parseInt(quarter_number);\n\t}",
"public static void test() throws IOException {\n\t\tModel trainModel = Trainer.train(\"-i ./data/in -n fales\");\n\t\ttrainModel.saveModel(\"./data/kdTree\");\n\t\t\n\t\t\n\t\tModel model = Model.loadModel(\"./data/kdTree\");\n//\t\tCorpus corpus = CorpusReader.readCorpus(\"./data/test\");\n\t\tCorpus corpus = CorpusReader.readCorpus(\"./data/kd_test\");\n\t\tint all = 0;\n\t\tint right = 0;\n\t\tfor (Instance ins : corpus.getInstanceList()) {\n\t\t\tPredicter.predict(ins, model);\n\t\t\tSystem.out.println(String.format(\"%s %s\", ins.getLabel(), ins.getPredictLabel()));\n\t\t\tSystem.out.println(\"instance: \"+ins.getFeatures());\n\t\t\tSystem.out.println(\"neighbour: \"+ins.getNeighbour().get(0).getFeatures());\n\t\t\t++all;\n\t\t\tif (ins.getLabel().equals(ins.getPredictLabel())) {\n\t\t\t\t++right;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(right+\"/\"+all);\n\t}",
"@Override\n\tpublic abstract Classifier run ();",
"public interface DecisionTreeExample<T extends Comparable<T>, K> extends ClassifierExample<T, K> {\r\n\r\n\t/**\r\n\t * \r\n\t * @param feat\r\n\t * - particular feature to be examined\r\n\t * @param value\r\n\t * - Implementation of the comparable interface to ensure that\r\n\t * this example's feature can be compared with value\r\n\t * \r\n\t * @return boolean to indicate whether this example has value specified for\r\n\t * the feature\r\n\t */\r\n\tboolean hasValueForFeature(DecisionTreeFeature<T> feat, Comparable<T> lowValue, Comparable<T> highValue,\r\n\t\t\tK positiveLabel);\r\n\r\n}",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n FilteredClassifier filteredClassifier0 = new FilteredClassifier();\n try { \n Evaluation.evaluateModel((Classifier) filteredClassifier0, testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -g\n // \\tOnly outputs the graph representation of the classifier.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.meta.FilteredClassifier:\n // \n // -F <filter specification>\n // \\tFull class name of filter to use, followed\n // \\tby filter options.\n // \\teg: \\\"weka.filters.unsupervised.attribute.Remove -V -R 1,2\\\"\n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n // -W\n // \\tFull name of base classifier.\n // \\t(default: weka.classifiers.trees.J48)\n // \n // Options specific to classifier weka.classifiers.trees.J48:\n // \n // -U\n // \\tUse unpruned tree.\n // -O\n // \\tDo not collapse tree.\n // -C <pruning confidence>\n // \\tSet confidence threshold for pruning.\n // \\t(default 0.25)\n // -M <minimum number of instances>\n // \\tSet minimum number of instances per leaf.\n // \\t(default 2)\n // -R\n // \\tUse reduced error pruning.\n // -N <number of folds>\n // \\tSet number of folds for reduced error\n // \\tpruning. One fold is used as pruning set.\n // \\t(default 3)\n // -B\n // \\tUse binary splits only.\n // -S\n // \\tDon't perform subtree raising.\n // -L\n // \\tDo not clean up after the tree has been built.\n // -A\n // \\tLaplace smoothing for predicted probabilities.\n // -J\n // \\tDo not use MDL correction for info gain on numeric attributes.\n // -Q <seed>\n // \\tSeed for random data shuffling (default 1).\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"public int resultRule(Instance inst) {\n\n if (m_test == null || m_test.satisfies(inst)) {\n\treturn m_classification;\n } else {\n\treturn -1;\n }\n }",
"public static void NaiveBayesClassifier() throws IOException {\n\t\t\n\t\t\n\t\tDataset data = FileHandler.loadSparseDataset(new File(\n\t\t\t\t\"./WebContent/corpus/trainVectors\"), 0, \" \", \":\");\n\n\t\tEqualWidthBinning eb = new EqualWidthBinning(20);\n\t\tSystem.out.println(\"Start discretisation\");\n\t\teb.build(data);\n\t\tDataset ddata = data.copy();\n\t\teb.filter(ddata);\n\n\t\tboolean useLaplace = true;\n\t\tboolean useLogs = true;\n\t\tClassifier nbc = new NaiveBayesClassifier(useLaplace, useLogs, false);\n\t\tnbc.buildClassifier(data);\n\n\t\tDataset dataForClassification = FileHandler.loadSparseDataset(new File(\n\t\t\"./WebContent/corpus/testVectors\"), 0, \" \", \":\");\n\n\t\n\t\tint correct = 0, wrong = 0;\n\n\n\t\tfor (Instance inst : dataForClassification) {\n\t\t\teb.filter(inst);\n\t\t\tObject predictedClassValue = nbc.classify(inst);\n\t\t\tObject realClassValue = inst.classValue();\n\t\t\tif (predictedClassValue.equals(realClassValue))\n\t\t\t\tcorrect++;\n\t\t\telse {\n\t\t\t\t\n\t\t\t\twrong++;\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"correct \" + correct);\n\t\tSystem.out.println(\"incorrect \" + wrong);\n\t\tSystem.out.println(\"Accuracy: \" + (float) correct / (correct + wrong));\n\n\t}",
"public String trainmodelandclassify(Attribute at) throws Exception {\n\t\tif(at.getAge()>=15 && at.getAge()<=25)\n\t\t\tat.setAgegroup(\"15-25\");\n\t\tif(at.getAge()>=26 && at.getAge()<=45)\n\t\t\tat.setAgegroup(\"25-45\");\n\t\tif(at.getAge()>=46 && at.getAge()<=65)\n\t\t\tat.setAgegroup(\"45-65\");\n\t\t\n\t\t\n\t\t\n\t\t//loading the training dataset\n\t\n\tDataSource source=new DataSource(\"enter the location of your .arff file for training data\");\n\tSystem.out.println(source);\n\tInstances traindataset=source.getDataSet();\n\t//setting the class index (which would be one less than the number of attributes)\n\ttraindataset.setClassIndex(traindataset.numAttributes()-1);\n\tint numclasses=traindataset.numClasses();\n for (int i = 0; i < numclasses; i++) {\n \tString classvalue=traindataset.classAttribute().value(i);\n \tSystem.out.println(classvalue);\n\t\t\n\t}\n //building the classifier\n NaiveBayes nb= new NaiveBayes();\n nb.buildClassifier(traindataset);\n System.out.println(\"model trained successfully\");\n \n //test the model\n\tDataSource testsource=new DataSource(\"enter the location of your .arff file for test data\");\n\tInstances testdataset=testsource.getDataSet();\n\t\n\tFileWriter fwriter = new FileWriter(\"enter the location of your .arff file for test data\",true); //true will append the new instance\n\tfwriter.write(System.lineSeparator());\n\tfwriter.write(at.getAgegroup()+\",\"+at.getGender()+\",\"+at.getProfession()+\",\"+\"?\");//appends the string to the file\n\tfwriter.close();\n\ttestdataset.setClassIndex(testdataset.numAttributes()-1);\n\t//looping through the test dataset and making predictions\n\tfor (int i = 0; i < testdataset.numInstances(); i++) {\n\t\tdouble classvalue=testdataset.instance(i).classValue();\n\t\tString actualclass=testdataset.classAttribute().value((int)classvalue);\n\t\tInstance instance=testdataset.instance(i);\n\t\tdouble pclassvalue=nb.classifyInstance(instance);\n\t\tString pclass=testdataset.classAttribute().value((int)pclassvalue);\n\t\tSystem.out.println(actualclass+\" \"+ pclass);\n\t\n}\n\tdouble classval=testdataset.instance(testdataset.numInstances()-1).classValue();\n\tInstance ins=testdataset.lastInstance();\n\tdouble pclassval=nb.classifyInstance(ins);\n\tString pclass=testdataset.classAttribute().value((int)pclassval);\n\tSystem.out.println(pclass);\n\t\n\treturn pclass;\n}",
"private String predict(Node currentNode, String[] newInstance) {\n\t\t// If this node is a class node, then return the class name\n\t\tif(currentNode instanceof ClassNode){\n\t\t\tClassNode node = (ClassNode) currentNode;\n\t\t\treturn node.className;\n\t\t}else{\n\t\t\t// otherwise, check which subtree we should follow\n\t\t\t// by comparing the attribute of the instance\n\t\t\t// with the one in the tree\n\t\t\tDecisionNode node = (DecisionNode) currentNode;\n\t\t\tString value = newInstance[node.attribute];\n\t\t\tfor(int i=0; i< node.attributeValues.length; i++){\n\t\t\t\tif(node.attributeValues[i].equals(value)){\n\t\t\t\t\treturn predict(node.nodes[i], newInstance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null; // null if no subtree correspond to the attribute value for the instance\n\t}",
"@Test(timeout = 4000)\n public void test100() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n MockRandom mockRandom0 = new MockRandom(1);\n try { \n evaluation0.crossValidateModel((Classifier) costSensitiveClassifier0, instances0, 2, (Random) mockRandom0, (Object[]) costSensitiveClassifier0.TAGS_MATRIX_SOURCE);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // weka.core.Tag cannot be cast to weka.classifiers.evaluation.output.prediction.AbstractOutput\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test077() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"\";\n Evaluation.main(stringArray0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.bayes.NaiveBayesMultinomial:\n // \n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"@Test\n public void test07() throws Throwable {\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n String string0 = Evaluation.makeOptionString(costSensitiveClassifier0, false);\n assertEquals(\"\\n\\nGeneral options:\\n\\n-h or -help\\n\\tOutput help information.\\n-synopsis or -info\\n\\tOutput synopsis for classifier (use in conjunction with -h)\\n-t <name of training file>\\n\\tSets training file.\\n-T <name of test file>\\n\\tSets test file. If missing, a cross-validation will be performed\\n\\ton the training data.\\n-c <class index>\\n\\tSets index of class attribute (default: last).\\n-x <number of folds>\\n\\tSets number of folds for cross-validation (default: 10).\\n-no-cv\\n\\tDo not perform any cross validation.\\n-split-percentage <percentage>\\n\\tSets the percentage for the train/test set split, e.g., 66.\\n-preserve-order\\n\\tPreserves the order in the percentage split.\\n-s <random number seed>\\n\\tSets random number seed for cross-validation or percentage split\\n\\t(default: 1).\\n-m <name of file with cost matrix>\\n\\tSets file with cost matrix.\\n-l <name of input file>\\n\\tSets model input file. In case the filename ends with '.xml',\\n\\ta PMML file is loaded or, if that fails, options are loaded\\n\\tfrom the XML file.\\n-d <name of output file>\\n\\tSets model output file. In case the filename ends with '.xml',\\n\\tonly the options are saved to the XML file, not the model.\\n-v\\n\\tOutputs no statistics for training data.\\n-o\\n\\tOutputs statistics only, not the classifier.\\n-i\\n\\tOutputs detailed information-retrieval statistics for each class.\\n-k\\n\\tOutputs information-theoretic statistics.\\n-classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\\n\\tUses the specified class for generating the classification output.\\n\\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\\n-p range\\n\\tOutputs predictions for test instances (or the train instances if\\n\\tno test instances provided and -no-cv is used), along with the \\n\\tattributes in the specified range (and nothing else). \\n\\tUse '-p 0' if no attributes are desired.\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-distribution\\n\\tOutputs the distribution instead of only the prediction\\n\\tin conjunction with the '-p' option (only nominal classes).\\n\\tDeprecated: use \\\"-classifications ...\\\" instead.\\n-r\\n\\tOnly outputs cumulative margin distribution.\\n-g\\n\\tOnly outputs the graph representation of the classifier.\\n-xml filename | xml-string\\n\\tRetrieves the options from the XML-data instead of the command line.\\n-threshold-file <file>\\n\\tThe file to save the threshold data to.\\n\\tThe format is determined by the extensions, e.g., '.arff' for ARFF \\n\\tformat or '.csv' for CSV.\\n-threshold-label <label>\\n\\tThe class label to determine the threshold data for\\n\\t(default is the first label)\\n\\nOptions specific to weka.classifiers.meta.CostSensitiveClassifier:\\n\\n-M\\n\\tMinimize expected misclassification cost. Default is to\\n\\treweight training instances according to costs per class\\n-C <cost file name>\\n\\tFile name of a cost matrix to use. If this is not supplied,\\n\\ta cost matrix will be loaded on demand. The name of the\\n\\ton-demand file is the relation name of the training data\\n\\tplus \\\".cost\\\", and the path to the on-demand file is\\n\\tspecified with the -N option.\\n-N <directory>\\n\\tName of a directory to search for cost files when loading\\n\\tcosts on demand (default current directory).\\n-cost-matrix <matrix>\\n\\tThe cost matrix in Matlab single line format.\\n-S <num>\\n\\tRandom number seed.\\n\\t(default 1)\\n-D\\n\\tIf set, classifier is run in debug mode and\\n\\tmay output additional info to the console\\n-W\\n\\tFull name of base classifier.\\n\\t(default: weka.classifiers.rules.ZeroR)\\n\\nOptions specific to classifier weka.classifiers.rules.ZeroR:\\n\\n-D\\n\\tIf set, classifier is run in debug mode and\\n\\tmay output additional info to the console\\n\", string0);\n }",
"@Test\n\tpublic void test2() {\n\t\tTriangleType type = TriangleClassifier.classify(5,5,4);\n\t\tassertEquals(type,TriangleType.ISOSCELES);\n\t}",
"Classifier getType();",
"public abstract void build(ClassifierData<U> inputData);",
"public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}",
"public abstract void printClassifier();",
"public String getClassification() {\n return classification;\n }",
"public String getClassification() {\n return classification;\n }",
"public static void main(String[] args) {\n\t\tif (args.length != 2) {\n\t\t\tSystem.err.println(\"This program requires two parameters, not \"+args.length+\". The first is a training file and the second is a data file.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tDecisionLearningTree dt = new DecisionLearningTree(args[0],args[1]);\n\t\tList<String> rs = dt.useBaselineClassifierOnData(); //dt.useTreeOnData();\n\t\tfor (String r : rs) {\n\t\t\tSystem.out.println(r);\n\t\t}\n\t\tSystem.out.println(\"==========================================================\");\n\t\tSystem.out.println(\"Reporting tree:\");\n\t\tdt.report();\t\t\n\t}",
"@Test(timeout = 4000)\n public void test66() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n naiveBayesMultinomialText0.setLowercaseTokens(true);\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertTrue(naiveBayesMultinomialText0.getLowercaseTokens());\n }",
"public static boolean changeClassifier(ClassifiedFeature classifiedFeature, Classifier newClassifier) {\n Classifier oldClassifier = classifiedFeature.getClassified();\n boolean isAllowed = isChangeAllowed(oldClassifier, newClassifier);\n if (isAllowed) {\n classifiedFeature.setClassified(newClassifier);\n }\n return isAllowed;\n }",
"private Category classify() {\n Category category = null;\n if (name != null) {\n if (name.contains(\"potato\") || name.contains(\"apple\")) {\n category = Category.FOOD;\n } else if (name.contains(\"cloths\") || name.contains(\"pants\") || name.contains(\"shirt\")) {\n category = Category.CLOTHING;\n }\n }\n return category;\n }",
"@Test\n public void testRun_DecisionOtherwise_IN_A1_D_A3_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dNode = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, \"ANYTHING WRONG\");\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dNode).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dNode);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A3_ID, wf.getContext().get(KEY));\n }",
"public double classifyInstance(Instance inst) {\n\n int result = m_rules.resultRules(inst);\n if (result == -1) {\n return Instance.missingValue();\n } else {\n return (double)result;\n }\n }",
"public Map<String,TestResult> classify(DoubleDataTable tstTable, Progress prog) throws InterruptedException\n {\n // klasyfikacja tabeli testowej\n if (tstTable.noOfObjects()<=0) throw new RuntimeException(\"ClassificationController of an empty table\");\n NominalAttribute decAttr = tstTable.attributes().nominalDecisionAttribute();\n Map<String,int[][]> mapOfConfusionMatrices = new HashMap<String,int[][]>();\n prog.set(\"Classifing test table\", tstTable.noOfObjects());\n for (DoubleData dObj : tstTable.getDataObjects())\n {\n int objDecLocalCode = decAttr.localValueCode(((DoubleDataWithDecision)dObj).getDecision());\n for (Map.Entry<String,Classifier> cl : m_Classifiers.entrySet())\n {\n int[][] confusionMatrix = (int[][])mapOfConfusionMatrices.get(cl.getKey());\n if (confusionMatrix==null)\n {\n confusionMatrix = new int[decAttr.noOfValues()][];\n for (int i = 0; i < confusionMatrix.length; i++)\n confusionMatrix[i] = new int[decAttr.noOfValues()];\n mapOfConfusionMatrices.put(cl.getKey(), confusionMatrix);\n }\n try\n {\n double dec = cl.getValue().classify(dObj);\n if (!Double.isNaN(dec))\n \tconfusionMatrix[objDecLocalCode][decAttr.localValueCode(dec)]++;\n }\n catch (RuntimeException e)\n {\n Report.exception(e);\n }\n catch (PropertyConfigurationException e)\n {\n Report.exception(e);\n }\n }\n prog.step();\n }\n // przygotowanie wynikow klasyfikacji\n Map<String,TestResult> resultMap = new HashMap<String,TestResult>();\n for (Map.Entry<String,Classifier> cl : m_Classifiers.entrySet())\n {\n int[][] confusionMatrix = (int[][])mapOfConfusionMatrices.get(cl.getKey());\n cl.getValue().calculateStatistics();\n TestResult results = new TestResult(decAttr, tstTable.getDecisionDistribution(), confusionMatrix, ((ConfigurationWithStatistics)cl.getValue()).getStatistics());\n resultMap.put(cl.getKey(), results);\n }\n return resultMap;\n }",
"public void setClassification(String classification) {\n this.classification = classification;\n }",
"@Override\r\n\tprotected T doSwitch(int classifierID, EObject theEObject) {\r\n\t\tswitch (classifierID) {\r\n\t\t\tcase StextPackage.ROOT: {\r\n\t\t\t\tRoot root = (Root)theEObject;\r\n\t\t\t\tT result = caseRoot(root);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.DEF_ROOT: {\r\n\t\t\t\tDefRoot defRoot = (DefRoot)theEObject;\r\n\t\t\t\tT result = caseDefRoot(defRoot);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.STATECHART_ROOT: {\r\n\t\t\t\tStatechartRoot statechartRoot = (StatechartRoot)theEObject;\r\n\t\t\t\tT result = caseStatechartRoot(statechartRoot);\r\n\t\t\t\tif (result == null) result = caseDefRoot(statechartRoot);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.STATE_ROOT: {\r\n\t\t\t\tStateRoot stateRoot = (StateRoot)theEObject;\r\n\t\t\t\tT result = caseStateRoot(stateRoot);\r\n\t\t\t\tif (result == null) result = caseDefRoot(stateRoot);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.TRANSITION_ROOT: {\r\n\t\t\t\tTransitionRoot transitionRoot = (TransitionRoot)theEObject;\r\n\t\t\t\tT result = caseTransitionRoot(transitionRoot);\r\n\t\t\t\tif (result == null) result = caseDefRoot(transitionRoot);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.STATECHART_SPECIFICATION: {\r\n\t\t\t\tStatechartSpecification statechartSpecification = (StatechartSpecification)theEObject;\r\n\t\t\t\tT result = caseStatechartSpecification(statechartSpecification);\r\n\t\t\t\tif (result == null) result = caseScopedElement(statechartSpecification);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.STATE_SPECIFICATION: {\r\n\t\t\t\tStateSpecification stateSpecification = (StateSpecification)theEObject;\r\n\t\t\t\tT result = caseStateSpecification(stateSpecification);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.TRANSITION_SPECIFICATION: {\r\n\t\t\t\tTransitionSpecification transitionSpecification = (TransitionSpecification)theEObject;\r\n\t\t\t\tT result = caseTransitionSpecification(transitionSpecification);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.STATECHART_SCOPE: {\r\n\t\t\t\tStatechartScope statechartScope = (StatechartScope)theEObject;\r\n\t\t\t\tT result = caseStatechartScope(statechartScope);\r\n\t\t\t\tif (result == null) result = caseScope(statechartScope);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.INTERFACE_SCOPE: {\r\n\t\t\t\tInterfaceScope interfaceScope = (InterfaceScope)theEObject;\r\n\t\t\t\tT result = caseInterfaceScope(interfaceScope);\r\n\t\t\t\tif (result == null) result = caseStatechartScope(interfaceScope);\r\n\t\t\t\tif (result == null) result = caseNamedElement(interfaceScope);\r\n\t\t\t\tif (result == null) result = caseScope(interfaceScope);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.INTERNAL_SCOPE: {\r\n\t\t\t\tInternalScope internalScope = (InternalScope)theEObject;\r\n\t\t\t\tT result = caseInternalScope(internalScope);\r\n\t\t\t\tif (result == null) result = caseStatechartScope(internalScope);\r\n\t\t\t\tif (result == null) result = caseScope(internalScope);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.IMPORT_SCOPE: {\r\n\t\t\t\tImportScope importScope = (ImportScope)theEObject;\r\n\t\t\t\tT result = caseImportScope(importScope);\r\n\t\t\t\tif (result == null) result = caseStatechartScope(importScope);\r\n\t\t\t\tif (result == null) result = caseScope(importScope);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.IMPORT: {\r\n\t\t\t\tImport import_ = (Import)theEObject;\r\n\t\t\t\tT result = caseImport(import_);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.EVENT_DEFINITION: {\r\n\t\t\t\tEventDefinition eventDefinition = (EventDefinition)theEObject;\r\n\t\t\t\tT result = caseEventDefinition(eventDefinition);\r\n\t\t\t\tif (result == null) result = caseEvent(eventDefinition);\r\n\t\t\t\tif (result == null) result = caseDeclaration(eventDefinition);\r\n\t\t\t\tif (result == null) result = caseTypedElement(eventDefinition);\r\n\t\t\t\tif (result == null) result = caseNamedElement(eventDefinition);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.VARIABLE_DEFINITION: {\r\n\t\t\t\tVariableDefinition variableDefinition = (VariableDefinition)theEObject;\r\n\t\t\t\tT result = caseVariableDefinition(variableDefinition);\r\n\t\t\t\tif (result == null) result = caseProperty(variableDefinition);\r\n\t\t\t\tif (result == null) result = caseDeclaration(variableDefinition);\r\n\t\t\t\tif (result == null) result = caseTypedElement(variableDefinition);\r\n\t\t\t\tif (result == null) result = caseNamedElement(variableDefinition);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.OPERATION_DEFINITION: {\r\n\t\t\t\tOperationDefinition operationDefinition = (OperationDefinition)theEObject;\r\n\t\t\t\tT result = caseOperationDefinition(operationDefinition);\r\n\t\t\t\tif (result == null) result = caseOperation(operationDefinition);\r\n\t\t\t\tif (result == null) result = caseDeclaration(operationDefinition);\r\n\t\t\t\tif (result == null) result = casePackageMember(operationDefinition);\r\n\t\t\t\tif (result == null) result = caseTypedElement(operationDefinition);\r\n\t\t\t\tif (result == null) result = caseNamedElement(operationDefinition);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.TYPE_ALIAS_DEFINITION: {\r\n\t\t\t\tTypeAliasDefinition typeAliasDefinition = (TypeAliasDefinition)theEObject;\r\n\t\t\t\tT result = caseTypeAliasDefinition(typeAliasDefinition);\r\n\t\t\t\tif (result == null) result = caseTypeAlias(typeAliasDefinition);\r\n\t\t\t\tif (result == null) result = caseDeclaration(typeAliasDefinition);\r\n\t\t\t\tif (result == null) result = caseTypedElement(typeAliasDefinition);\r\n\t\t\t\tif (result == null) result = caseType(typeAliasDefinition);\r\n\t\t\t\tif (result == null) result = casePackageMember(typeAliasDefinition);\r\n\t\t\t\tif (result == null) result = caseNamedElement(typeAliasDefinition);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.LOCAL_REACTION: {\r\n\t\t\t\tLocalReaction localReaction = (LocalReaction)theEObject;\r\n\t\t\t\tT result = caseLocalReaction(localReaction);\r\n\t\t\t\tif (result == null) result = caseReaction(localReaction);\r\n\t\t\t\tif (result == null) result = caseDeclaration(localReaction);\r\n\t\t\t\tif (result == null) result = caseTypedElement(localReaction);\r\n\t\t\t\tif (result == null) result = caseNamedElement(localReaction);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.TRANSITION_REACTION: {\r\n\t\t\t\tTransitionReaction transitionReaction = (TransitionReaction)theEObject;\r\n\t\t\t\tT result = caseTransitionReaction(transitionReaction);\r\n\t\t\t\tif (result == null) result = caseReaction(transitionReaction);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.GUARD: {\r\n\t\t\t\tGuard guard = (Guard)theEObject;\r\n\t\t\t\tT result = caseGuard(guard);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.ENTRY_POINT_SPEC: {\r\n\t\t\t\tEntryPointSpec entryPointSpec = (EntryPointSpec)theEObject;\r\n\t\t\t\tT result = caseEntryPointSpec(entryPointSpec);\r\n\t\t\t\tif (result == null) result = caseReactionProperty(entryPointSpec);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.EXIT_POINT_SPEC: {\r\n\t\t\t\tExitPointSpec exitPointSpec = (ExitPointSpec)theEObject;\r\n\t\t\t\tT result = caseExitPointSpec(exitPointSpec);\r\n\t\t\t\tif (result == null) result = caseReactionProperty(exitPointSpec);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.EVENT_SPEC: {\r\n\t\t\t\tEventSpec eventSpec = (EventSpec)theEObject;\r\n\t\t\t\tT result = caseEventSpec(eventSpec);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.REGULAR_EVENT_SPEC: {\r\n\t\t\t\tRegularEventSpec regularEventSpec = (RegularEventSpec)theEObject;\r\n\t\t\t\tT result = caseRegularEventSpec(regularEventSpec);\r\n\t\t\t\tif (result == null) result = caseEventSpec(regularEventSpec);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.TIME_EVENT_SPEC: {\r\n\t\t\t\tTimeEventSpec timeEventSpec = (TimeEventSpec)theEObject;\r\n\t\t\t\tT result = caseTimeEventSpec(timeEventSpec);\r\n\t\t\t\tif (result == null) result = caseEventSpec(timeEventSpec);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.BUILTIN_EVENT_SPEC: {\r\n\t\t\t\tBuiltinEventSpec builtinEventSpec = (BuiltinEventSpec)theEObject;\r\n\t\t\t\tT result = caseBuiltinEventSpec(builtinEventSpec);\r\n\t\t\t\tif (result == null) result = caseEventSpec(builtinEventSpec);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.ENTRY_EVENT: {\r\n\t\t\t\tEntryEvent entryEvent = (EntryEvent)theEObject;\r\n\t\t\t\tT result = caseEntryEvent(entryEvent);\r\n\t\t\t\tif (result == null) result = caseBuiltinEventSpec(entryEvent);\r\n\t\t\t\tif (result == null) result = caseEventSpec(entryEvent);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.EXIT_EVENT: {\r\n\t\t\t\tExitEvent exitEvent = (ExitEvent)theEObject;\r\n\t\t\t\tT result = caseExitEvent(exitEvent);\r\n\t\t\t\tif (result == null) result = caseBuiltinEventSpec(exitEvent);\r\n\t\t\t\tif (result == null) result = caseEventSpec(exitEvent);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.ALWAYS_EVENT: {\r\n\t\t\t\tAlwaysEvent alwaysEvent = (AlwaysEvent)theEObject;\r\n\t\t\t\tT result = caseAlwaysEvent(alwaysEvent);\r\n\t\t\t\tif (result == null) result = caseBuiltinEventSpec(alwaysEvent);\r\n\t\t\t\tif (result == null) result = caseEventSpec(alwaysEvent);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.SIMPLE_SCOPE: {\r\n\t\t\t\tSimpleScope simpleScope = (SimpleScope)theEObject;\r\n\t\t\t\tT result = caseSimpleScope(simpleScope);\r\n\t\t\t\tif (result == null) result = caseScope(simpleScope);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.REACTION_TRIGGER: {\r\n\t\t\t\tReactionTrigger reactionTrigger = (ReactionTrigger)theEObject;\r\n\t\t\t\tT result = caseReactionTrigger(reactionTrigger);\r\n\t\t\t\tif (result == null) result = caseTrigger(reactionTrigger);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.DEFAULT_TRIGGER: {\r\n\t\t\t\tDefaultTrigger defaultTrigger = (DefaultTrigger)theEObject;\r\n\t\t\t\tT result = caseDefaultTrigger(defaultTrigger);\r\n\t\t\t\tif (result == null) result = caseTrigger(defaultTrigger);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.REACTION_EFFECT: {\r\n\t\t\t\tReactionEffect reactionEffect = (ReactionEffect)theEObject;\r\n\t\t\t\tT result = caseReactionEffect(reactionEffect);\r\n\t\t\t\tif (result == null) result = caseEffect(reactionEffect);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.EVENT_RAISING_EXPRESSION: {\r\n\t\t\t\tEventRaisingExpression eventRaisingExpression = (EventRaisingExpression)theEObject;\r\n\t\t\t\tT result = caseEventRaisingExpression(eventRaisingExpression);\r\n\t\t\t\tif (result == null) result = caseExpression(eventRaisingExpression);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.EVENT_VALUE_REFERENCE_EXPRESSION: {\r\n\t\t\t\tEventValueReferenceExpression eventValueReferenceExpression = (EventValueReferenceExpression)theEObject;\r\n\t\t\t\tT result = caseEventValueReferenceExpression(eventValueReferenceExpression);\r\n\t\t\t\tif (result == null) result = caseExpression(eventValueReferenceExpression);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tcase StextPackage.ACTIVE_STATE_REFERENCE_EXPRESSION: {\r\n\t\t\t\tActiveStateReferenceExpression activeStateReferenceExpression = (ActiveStateReferenceExpression)theEObject;\r\n\t\t\t\tT result = caseActiveStateReferenceExpression(activeStateReferenceExpression);\r\n\t\t\t\tif (result == null) result = caseExpression(activeStateReferenceExpression);\r\n\t\t\t\tif (result == null) result = defaultCase(theEObject);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tdefault: return defaultCase(theEObject);\r\n\t\t}\r\n\t}",
"public double classifyAll(String testDataFolder)\n\t{\n\t\tFile folder = new File(testDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tdouble accuracy = 0.0;\n\t\tint correct_classifications = 0;\n\t\tint testdata = 0;\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\tString doc = \"\";\n\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tint count = 0;\n\t\t\t\t\tint actual_count = 0;\n\t\t\t\t\tint class_=0;\n\t\t\t\t\tint[] correct = new int[numClasses];\n\t\t\t\t\tint[] test = new int[numClasses];\n\t\t\t\t\tString line = \"\";\n\t\t\t\t\tint tabIndex=0;\n\t\t\t\t\tallDocs = new ArrayList<String>();\n\t\t\t\t\twhile((line=reader.readLine())!=null && !line.isEmpty()){\n\t\t\t\t\t\ttestdata++;\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\tString type = line.substring(0, tabIndex);\n\t\t\t\t\t\tString msg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){class_ = 0;}\n\t\t\t\t\t\telse{class_ = 1;}\n\t\t\t\t\t\ttest[class_]++;\n\t\t\t\t\t\tactual_count = actual_count + class_;\n\t\t\t\t\t\tint label = classify(msg);\n\t\t\t\t\t\tcount = count + label;\n\t\t\t\t\t\t//System.out.println(label+\"/\"+class_+\" \"+count);\n\t\t\t\t\t\tif(label-class_==0){\n\t\t\t\t\t\t\tcorrect_classifications++;\n\t\t\t\t\t\t\tcorrect[class_]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tint label = classify(doc);\n\t\t\t\tif(label - class_==0){correct[class_]++;}\n\t\t\t} \n\t\t\tcatch (IOException e){e.printStackTrace();}\n\t\t}\n\t\taccuracy = Math.round(correct_classifications * 1000.0 / testdata)/1000.0;\n\t\tSystem.out.println(\"Accuracy: \"+accuracy);\n\t\treturn accuracy;\n\t}",
"public String getClassification() {\n return classification;\n }",
"@Override\n protected T doSwitch(int classifierID, EObject theEObject)\n {\n switch (classifierID)\n {\n case BooleanExpressionsPackage.MODEL:\n {\n Model model = (Model)theEObject;\n T result = caseModel(model);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.OR_EXPRESSION:\n {\n OrExpression orExpression = (OrExpression)theEObject;\n T result = caseOrExpression(orExpression);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.AND_EXPRESSION:\n {\n AndExpression andExpression = (AndExpression)theEObject;\n T result = caseAndExpression(andExpression);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.BASE_EXPRESSION:\n {\n BaseExpression baseExpression = (BaseExpression)theEObject;\n T result = caseBaseExpression(baseExpression);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.BOOLEAN_TERM:\n {\n booleanTerm booleanTerm = (booleanTerm)theEObject;\n T result = casebooleanTerm(booleanTerm);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.TIME_CONSTRAINT:\n {\n TimeConstraint timeConstraint = (TimeConstraint)theEObject;\n T result = caseTimeConstraint(timeConstraint);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.BOOLEAN_VARIABLE:\n {\n BooleanVariable booleanVariable = (BooleanVariable)theEObject;\n T result = caseBooleanVariable(booleanVariable);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.VARIABLE_CONDITION:\n {\n VariableCondition variableCondition = (VariableCondition)theEObject;\n T result = caseVariableCondition(variableCondition);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.EXPRESSION:\n {\n EXPRESSION expression = (EXPRESSION)theEObject;\n T result = caseEXPRESSION(expression);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.TERM:\n {\n TERM term = (TERM)theEObject;\n T result = caseTERM(term);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n case BooleanExpressionsPackage.EVENT:\n {\n Event event = (Event)theEObject;\n T result = caseEvent(event);\n if (result == null) result = defaultCase(theEObject);\n return result;\n }\n default: return defaultCase(theEObject);\n }\n }",
"public double computeAccuracy(Node node,\n\t\t\tArrayList<ArrayList<String>> dataSet) {\n\t\tdouble accuracy = 0;\n\t\tint positiveExamples = 0;\n\t\tArrayList<String> attributes = dataSet.get(0);\n\n\t\tfor (ArrayList<String> dataRow : dataSet.subList(1, dataSet.size())) {\n\t\t\tboolean verifyData = verifyTreeRow(node, dataRow, attributes);\n\t\t\tif (verifyData) {\n\t\t\t\tpositiveExamples++;\n\t\t\t}\n\t\t}\n\t\taccuracy = (((double) positiveExamples / (double) (dataSet.size() - 1)) * 100.00);\n\t\treturn accuracy;\n\t}",
"@Override\n\tpublic ConfusionMatrix calculate_confusion_matrix(Instance[] testData) {\n\n\t\t// Count the true positives, true negatives, false positives, false negatives\n\t\tint TP, FP, FN, TN;\n\t\tTP = 0;\n\t\tFP = 0;\n\t\tFN = 0;\n\t\tTN = 0;\n\n\t\tfor (Instance ins : testData) {\n\t\t\t// if True SPORTS\n\t\t\tif (ins.label == Label.SPORTS) {\n\t\t\t\t// if TP\n\t\t\t\tif (classify(ins.words).label == Label.SPORTS) {\n\t\t\t\t\tTP += 1;\n\t\t\t\t}\n\t\t\t\t// else FN\n\t\t\t\telse {\n\t\t\t\t\tFN += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if True BUSINESS\n\t\t\telse {\n\t\t\t\t// if TN\n\t\t\t\tif (classify(ins.words).label == Label.BUSINESS) {\n\t\t\t\t\tTN += 1;\n\t\t\t\t}\n\t\t\t\t// else FP\n\t\t\t\telse {\n\t\t\t\t\tFP += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfusionMatrix(TP, FP, FN, TN);\n\t}",
"public boolean conformsTo(tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier c) {\n //System.out.println(getName()+\" conformsTo \"+((Classifier)c).getName()+\" ?\");\n \n if(equals(c)){\n return true;\n }\n \n Iterator it = getParents().iterator();\n while(it.hasNext()){\n tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier parent = (tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier) it.next();\n \n //System.out.println(\"Consider parent:\" + ((Classifier)parent).getName());\n if(parent.equals(c)){\n return true;\n }\n if(parent.conformsTo(c)){\n return true;\n }\n }\n //System.out.println(\"No!\");\n return false;\n }",
"@Test\n\tvoid testCheckClass1() {\n\t\tassertTrue(DataChecker.checkClass(new Integer(1), new Integer(1)));\n\t}",
"private double crossValidate(Instances data) throws Exception {\r\n\t\tbuildClassifier(data);\r\n\r\n\t\tdouble correct = 0;\r\n\t\tfor (int i = 0; i < data.numInstances(); ++i) {\r\n\t\t\tif (classifyInstance(i) == data.get(i).classValue()) {\r\n\t\t\t\t++correct;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn correct / data.numInstances();\r\n\t}",
"private boolean classify(FeatureVector<? extends Number> wd) {\n\t\tfloat sum = 0;\n\t\t// Scalar Product\n\t\tfor (int i = 0; i < this.getDimensionality(); ++i) {\n\t\t\t// TODO check the type of the vector\n\t\t\tsum += wd.getValue(i).doubleValue()\n\t\t\t\t\t* this.getValue(i).doubleValue();\n\t\t}\n\n\t\t// sign binary function\n\t\tif (sum <= 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public java.lang.Class getJavaClass()\n {\n return de.tif.jacob.ruleengine.castor.Decision.class;\n }",
"public int classify(String tweet){\n\t\t//Each word is classified indenpendtly, whichever one has the most wins. \n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Compute the leading term of category probability:\n\t\tfloat[] catProb = new float[categories.length];\n\t\tint i = 0;\n\t\tfor(int cat : categories){\n\t\t\tcatProb[i] = category_count.get(cat).size()/(float)total_training_size;\n\t\t\ti++;\n\t\t}\n\n\t\t//Compute the number of times a word appears in all categories:\n\t\tHashMap<String, Integer> total_all_classes = new HashMap<String, Integer>();\n\t\tfor(String pt : parsedTweet){\n\t\t\tfor(int cat : categories){\n\t\t\t\tif(!total_all_classes.containsKey(pt)){\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\ttotal_all_classes.put(pt,category_count.get(cat).get(pt));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//What happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//If we've seen the word before:\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\tint additional = total_all_classes.get(pt) + category_count.get(cat).get(pt);\n\t\t\t\t\t\ttotal_all_classes.put(pt, additional);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//I'm skeptical if this will ever be execuated, but what happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Create something to hold the probabilities in\n\t\tfloat[] class_probability = new float[categories.length];\n\t\t//Initalize:\n\t\tfor(int c = 0; c < categories.length; c++){\n\t\t\tclass_probability[c] = 1;\n\t\t}\n\n\t\t//Compute the prodcut of the toals with priors and weights and assumed prob.\n\t\t//product of ( #word appears in all class * (#word appears in class c/#words in class c) )+ weight*assumed probability all divided by weight + #words appeared in all classes\n\t\tfor(int cat : categories){\n\t\t\tfor(String pt : parsedTweet){\n\t\t\t\tif(category_count.get(cat).containsKey(pt) && total_all_classes.containsKey(pt)){ \n\t\t\t\t\t//This is going to be a terribly long expression sadly.\n\t\t\t\t\tclass_probability[cat] *= ((total_all_classes.get(pt)*(category_count.get(cat).get(pt)/(float)category_count.get(cat).size())) + weight*assumed_prob)/(float)(weight + total_all_classes.get(pt));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Multiply the whole term by the leading term of catProb:\n\t\tfor(int cat : categories){\n\t\t\tclass_probability[cat] = catProb[cat]*class_probability[cat];\n\t\t}\n\n\t\t//Figure out which class/category is the highest and return the best fitting one.\n\t\tint bestFit = CAT_SAFE; //If can't figure, return that its SAFE? Dunno if this is the best choice\n\t\tfloat bestProb = -1;\n\t\tfor(int cat : categories){\n\t\t\tif(class_probability[cat] > bestProb){\n\t\t\t\tbestFit = cat;\n\t\t\t}\n\t\t\tSystem.out.println(class_probability[cat]);\n\t\t}\n\t\tSystem.out.println(bestProb < threshold);\n\t\tif(bestProb < threshold){\n\t\t\tbestFit = DEFAULT_CATEGORY;\n\t\t}\n\n\n\n\t\treturn bestFit;\n\n\t}",
"public int classify(Gesture g) {\n\t\tLog.write(\"Gestenerkenung...\");\n\t\t\n\t\t/* Wert im Nenner berechnen, nach Bayes */\n\t\tdouble sum = 0;\n\t\tfor(int i=0; i<types.size(); i++) {\n\t\t\tsum+=types.get(i).getDefaultProbability()*types.get(i).matches(g);\n\t\t}\n\t\t\n\t\tint recognized = -1; // erkannter Gestentyp\n\t\tdouble recogProb = Integer.MIN_VALUE; // Wahrscheinlichkeit der gefundenen Geste\n\t\tdouble foundGestureProb = 0; // Wahrscheinlichkeit der Geste unter Annahme des Modells\n\t\tdouble foundModelProb = 0; // Wahrscheinlichkeit des Modells\n\t\t\n\t\tfor(int i=0; i<this.types.size(); i++) {\n\t\t\tdouble gestureProb = types.get(i).matches(g);\n\t\t\tdouble modelProb = types.get(i).getDefaultProbability();\n\t\t\t\n\t\t\t/* Beobachtungswahrscheinlichkeit im derzeitigen Modell */\n\t\t\tdouble prob=(modelProb*gestureProb)/sum;\n\t\t\t\n\t\t\t/* Vergleich */\n\t\t\tif(prob>recogProb) {\n\t\t\t\tfoundGestureProb=gestureProb;\n\t\t\t\tfoundModelProb=modelProb;\n\t\t\t\trecogProb=prob;\n\t\t\t\trecognized=i;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Geste konnte klassifiziert werden\n\t\tif(recogProb>0 && foundModelProb>0 && foundGestureProb>0 && sum>0) {\n\t\t\t//this.lastprob=recogProb;\n\t\t\treturn recognized;\n\t\t} else {\n\t\t\t// Geste konnte nicht klassifiziert werden\n\t\t\treturn -1;\n\t\t}\n\t}",
"@Override\n public Classification<F, C> classify(Collection<F> features) {\n SortedSet<Classification<F, C>> probabilites = this.categoryProbabilities(features);\n\n if (probabilites.size() > 0) {\n return probabilites.last();\n }\n return null;\n }",
"@Override\r\n protected T doSwitch(int classifierID, EObject theEObject)\r\n {\r\n switch (classifierID)\r\n {\r\n case ConditionModelPackage.OPERATION_COMPARE:\r\n {\r\n Operation_Compare operation_Compare = (Operation_Compare)theEObject;\r\n T result = caseOperation_Compare(operation_Compare);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.UNARY_OPERATION:\r\n {\r\n Unary_Operation unary_Operation = (Unary_Operation)theEObject;\r\n T result = caseUnary_Operation(unary_Operation);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION:\r\n {\r\n Operation operation = (Operation)theEObject;\r\n T result = caseOperation(operation);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.EXPRESSION:\r\n {\r\n Expression expression = (Expression)theEObject;\r\n T result = caseExpression(expression);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.EXPRESSION_DOUBLE:\r\n {\r\n Expression_Double expression_Double = (Expression_Double)theEObject;\r\n T result = caseExpression_Double(expression_Double);\r\n if (result == null) result = caseExpression(expression_Double);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.EXPRESSION_INTEGER:\r\n {\r\n Expression_Integer expression_Integer = (Expression_Integer)theEObject;\r\n T result = caseExpression_Integer(expression_Integer);\r\n if (result == null) result = caseExpression(expression_Integer);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.EXPRESSION_STRING:\r\n {\r\n Expression_String expression_String = (Expression_String)theEObject;\r\n T result = caseExpression_String(expression_String);\r\n if (result == null) result = caseExpression(expression_String);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.EXPRESSION_PROCESS_REF:\r\n {\r\n Expression_ProcessRef expression_ProcessRef = (Expression_ProcessRef)theEObject;\r\n T result = caseExpression_ProcessRef(expression_ProcessRef);\r\n if (result == null) result = caseExpression(expression_ProcessRef);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.EXPRESSION_BOOLEAN:\r\n {\r\n Expression_Boolean expression_Boolean = (Expression_Boolean)theEObject;\r\n T result = caseExpression_Boolean(expression_Boolean);\r\n if (result == null) result = caseExpression(expression_Boolean);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_LESS_EQUALS:\r\n {\r\n Operation_Less_Equals operation_Less_Equals = (Operation_Less_Equals)theEObject;\r\n T result = caseOperation_Less_Equals(operation_Less_Equals);\r\n if (result == null) result = caseOperation(operation_Less_Equals);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_LESS:\r\n {\r\n Operation_Less operation_Less = (Operation_Less)theEObject;\r\n T result = caseOperation_Less(operation_Less);\r\n if (result == null) result = caseOperation(operation_Less);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_GREATER_EQUALS:\r\n {\r\n Operation_Greater_Equals operation_Greater_Equals = (Operation_Greater_Equals)theEObject;\r\n T result = caseOperation_Greater_Equals(operation_Greater_Equals);\r\n if (result == null) result = caseOperation(operation_Greater_Equals);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_GREATER:\r\n {\r\n Operation_Greater operation_Greater = (Operation_Greater)theEObject;\r\n T result = caseOperation_Greater(operation_Greater);\r\n if (result == null) result = caseOperation(operation_Greater);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_NOT_EQUALS:\r\n {\r\n Operation_Not_Equals operation_Not_Equals = (Operation_Not_Equals)theEObject;\r\n T result = caseOperation_Not_Equals(operation_Not_Equals);\r\n if (result == null) result = caseOperation(operation_Not_Equals);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_EQUALS:\r\n {\r\n Operation_Equals operation_Equals = (Operation_Equals)theEObject;\r\n T result = caseOperation_Equals(operation_Equals);\r\n if (result == null) result = caseOperation(operation_Equals);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_UNARY:\r\n {\r\n Operation_Unary operation_Unary = (Operation_Unary)theEObject;\r\n T result = caseOperation_Unary(operation_Unary);\r\n if (result == null) result = caseUnary_Operation(operation_Unary);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n case ConditionModelPackage.OPERATION_NOT_UNARY:\r\n {\r\n Operation_NotUnary operation_NotUnary = (Operation_NotUnary)theEObject;\r\n T result = caseOperation_NotUnary(operation_NotUnary);\r\n if (result == null) result = caseUnary_Operation(operation_NotUnary);\r\n if (result == null) result = defaultCase(theEObject);\r\n return result;\r\n }\r\n default: return defaultCase(theEObject);\r\n }\r\n }",
"@Test\n public void testRun_DecisionWithEquals_IN_A1_D_A2_FN() {\n // Final node creation\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Action node 3 (id #5) creation and flow set to final node\n final String A3_ID = \"#5\";\n final Node an3 = NodeFactory.createNode(A3_ID, NodeType.ACTION);\n final ExecutableActionMock objAn3 = ExecutableActionMock.create(KEY, A3_ID);\n ((ContextExecutable) an3).setObject(objAn3);\n ((ContextExecutable) an3).setMethod(objAn3.getPutIdInContextMethod());\n ((SingleControlFlowNode) an3).setFlow(fn);\n\n // Action node 2 (id #4) creation and flow set to final node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final ExecutableActionMock objAn2 = ExecutableActionMock.create(KEY, A2_ID);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getPutIdInContextMethod());\n ((SingleControlFlowNode) an2).setFlow(fn);\n\n final String A1_KEY = \"a1_key\";\n final String A1_ID = \"#2\";\n\n // Decision node (id #3) creation\n final Node dn = NodeFactory.createNode(\"#3\", NodeType.DECISION);\n // Flow control from decision to action node 2 (if KEY == #2 goto A2)\n Map<FlowCondition, Node> flows = new HashMap<>(1);\n final FlowCondition fc2a2 = new FlowCondition(A1_KEY, ConditionType.EQ, A1_ID);\n flows.put(fc2a2, an2);\n // Otherwise, goto A3\n ((ConditionalControlFlowNode) dn).setFlows(flows, an3);\n\n // Action node 1 (id #2) creation. Sets the context to be used by the decision\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final ExecutableActionMock objAn1 = ExecutableActionMock.create(A1_KEY, A1_ID);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getPutIdInContextMethod());\n ((SingleControlFlowNode) an1).setFlow(dn);\n\n // Initial node (id #1) creation and flow set to action node 1\n final Node iNode = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) iNode).setFlow(an1);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(iNode);\n\n ENGINE.run(wf);\n\n Assert.assertEquals(A2_ID, wf.getContext().get(KEY));\n }",
"private void buildTree(int random_attr){\n String[] schema = new String[]{\"min, max, avg, label\"};\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<int[]> train = driver.queryData(\"data\", schema);\n RandomForest forest = new RandomForest();\n forest.numAttr = RandomForestTrainingMapReduce.N;\n forest.numAttrRandom = random_attr;\n RealDecisionTree tree = new RealDecisionTree(train, forest, RandomForestTrainingMapReduce.N);\n\n // serialize this tree and write to Cassandra.\n byte[] t = serialize(tree);\n try {\n driver.insertData(t, \"Forest\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private boolean getClassificationResult(String imgPath) {\n return false;\n }",
"private double[] classify(ArrayList<Product> newData,\n\t\t\tArrayList<Product> trainData) {\n\t\tdouble[] labels = new double[newData.size()];\n\t\tfor (int i = 0; i < newData.size(); i++) {\n\t\t\tSim[] kNearest = findNeighbors(newData.get(i), trainData, k);\n\t\t\tdouble weightedVal = 0;\n\t\t\tdouble sumWeight = 0;\n\t\t\tfor (Sim sim : kNearest) {\n\t\t\t\tweightedVal += (sim.getSim() * sim.getProduct().label);\n\t\t\t\tsumWeight += sim.getSim();\n\t\t\t}\n\n\t\t\tDecimalFormat df = new DecimalFormat(\".00\");\n\t\t\tdouble formattedLabel = Double.parseDouble(df.format(weightedVal\n\t\t\t\t\t/ sumWeight));\n\t\t\tlabels[i] = formattedLabel;\n\t\t}\n\t\treturn labels;\n\t}"
] |
[
"0.6535951",
"0.64383364",
"0.63275975",
"0.63218015",
"0.625521",
"0.6119743",
"0.60857886",
"0.59984004",
"0.5930655",
"0.5878565",
"0.5875035",
"0.58679324",
"0.5844099",
"0.5800225",
"0.5786788",
"0.57078725",
"0.5691424",
"0.56565046",
"0.562602",
"0.55431366",
"0.55325574",
"0.5526136",
"0.5521598",
"0.551367",
"0.54963315",
"0.5457096",
"0.5452639",
"0.54475284",
"0.54281443",
"0.54047245",
"0.53796154",
"0.53738654",
"0.5357586",
"0.53494936",
"0.5319876",
"0.52824324",
"0.5206376",
"0.5202048",
"0.5188592",
"0.51868075",
"0.5186055",
"0.51799345",
"0.51415086",
"0.5133673",
"0.5133673",
"0.5132453",
"0.51320183",
"0.5114559",
"0.511372",
"0.5110505",
"0.5107723",
"0.510719",
"0.5094405",
"0.5088911",
"0.50773287",
"0.50731534",
"0.5055999",
"0.505242",
"0.5047206",
"0.50449413",
"0.5034832",
"0.50314075",
"0.5025237",
"0.5002248",
"0.49956322",
"0.49947074",
"0.49850118",
"0.49839753",
"0.49667335",
"0.49604315",
"0.49596784",
"0.49550712",
"0.49550712",
"0.49542296",
"0.49503374",
"0.49298927",
"0.49013025",
"0.4900444",
"0.48932725",
"0.48885012",
"0.48875403",
"0.4880727",
"0.4861133",
"0.48603576",
"0.48583573",
"0.48568437",
"0.48561636",
"0.48505738",
"0.4846871",
"0.48435026",
"0.4837533",
"0.48348424",
"0.48286083",
"0.48277438",
"0.4826141",
"0.48211163",
"0.48171166",
"0.4813289",
"0.4811659",
"0.48114187"
] |
0.6083699
|
7
|
Builds the decision tree based on a training set
|
public static Node buildTree(ArrayList<Case> cases) {
int healthy = 0;
// Count the number of healthy cases in the current set
for (Case c : cases) {
if (c.isHealthy) healthy++;
}
// If all cases are either healthy or unhealthy, this can be a result node and so is set as such (to the correct value)
if (healthy == cases.size() || healthy == 0) {
return new Node(cases.get(0).isHealthy);
}
else {
// Otherwise we have a mix, so find the best attribute and matching threshold to split on
Attribute attribute = chooseAttribute(cases);
double threshold = chooseAttributeThreshold(cases, attribute);
Node tree = new Node();
tree.attribute = attribute;
tree.threshold = threshold;
ArrayList<Case> casesLessThan = new ArrayList<Case>();
ArrayList<Case> casesGreaterThan = new ArrayList<Case>();
// Get the appropriate value and use that to sort into two lists, one for each side of the threshold
for (Case c : cases) {
double value = 0;
switch (attribute) {
case K:
value = c.k;
break;
case Na:
value = c.na;
break;
case CL:
value = c.cl;
break;
case HCO3:
value = c.hco3;
break;
case Endotoxin:
value = c.endotoxin;
break;
case Aniongap:
value = c.aniongap;
break;
case PLA2:
value = c.pla2;
break;
case SDH:
value = c.sdh;
break;
case GLDH:
value = c.gldh;
break;
case TPP:
value = c.tpp;
break;
case BreathRate:
value = c.breathRate;
break;
case PCV:
value = c.pcv;
break;
case PulseRate:
value = c.pulseRate;
break;
case Fibrinogen:
value = c.fibrinogen;
break;
case Dimer:
value = c.dimer;
break;
case FibPerDim:
value = c.fibPerDim;
break;
}
if (value < threshold) {
casesLessThan.add(c);
}
else {
casesGreaterThan.add(c);
}
}
// Recurse on these sets to create subtrees
tree.lessThanChildren = buildTree(casesLessThan);
tree.greaterThanChildren = buildTree(casesGreaterThan);
return tree;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void buildClassifier(Instances trainingData) throws Exception {\n // can classifier handle the data?\n getCapabilities().testWithFail(trainingData);\n\n tree = new MultiInstanceDecisionTree(trainingData);\n }",
"static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build();\n }",
"static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build().decisionTree();\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void build(Node<VirtualDataSet> node) {\n\n\t\tif (node == null)\n\t\t\tthrow new NullPointerException(\"Cannot built a decision (sub)tree for a null node.\");\n\n\t\tVirtualDataSet set = node.data;\n\n\t\tif (set == null || set.getNumberOfDatapoints() == 0 || set.getNumberOfAttributes() == 0)\n\t\t\tthrow new IllegalStateException(\"The dataset is in an invalid state!\");\n\n\t\tif (set.getNumberOfAttributes() == 1) // We have only the class attribute left\n\t\t\treturn;\n\n\t\tif (set.getAttribute(set.getNumberOfAttributes() - 1).getValues().length == 1) // No uncertainty left\n\t\t\treturn;\n\n\t\tboolean needsSplit = false;\n\n\t\tfor (int i = 0; i < set.getNumberOfAttributes() - 1; i++) {\n\t\t\tif (set.getAttribute(i).getValues().length < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tneedsSplit = true;\n\t\t}\n\n\t\tif (!needsSplit) // split would be futile for all remaining attributes\n\t\t\treturn;\n\n\t\tGainInfoItem[] gains = InformationGainCalculator.calculateAndSortInformationGains(set);\n\t\t\n\t\tif (gains[0].getGainValue() == 0.0) // No split when there is no gain\n\t\t\treturn; \n\n\t\tAttribute bestAttribute = set.getAttribute(gains[0].getAttributeName());\n\n\t\tif (bestAttribute.getType() == AttributeType.NOMINAL) {\n\t\t\tVirtualDataSet[] partitions = set\n\t\t\t\t\t.partitionByNominallAttribute(set.getAttributeIndex(bestAttribute.getName()));\n\t\t\tnode.children = (Node<VirtualDataSet>[]) new Node[partitions.length];\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tnode.children[i] = new Node<VirtualDataSet>(partitions[i]);\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tbuild(node.children[i]);\n\t\t\t}\n\n\t\t} else {\n\t\t\tint attributeIndex = node.data.getAttributeIndex(bestAttribute.getName());\n\n\t\t\tString[] values = bestAttribute.getValues();\n\n\t\t\tint valueIndex = -1;\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tif (values[i].equals(gains[0].getSplitAt())) {\n\t\t\t\t\tvalueIndex = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (valueIndex == -1) {\n\t\t\t\tSystem.out.println(\"Houston, we have a problem!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tVirtualDataSet[] partitions = set.partitionByNumericAttribute(attributeIndex, valueIndex);\n\n\t\t\tnode.children = (Node<VirtualDataSet>[]) new Node[partitions.length];\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tnode.children[i] = new Node<VirtualDataSet>(partitions[i]);\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < node.children.length; i++) {\n\t\t\t\tbuild(node.children[i]);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void buildClassifier(Instances data) throws Exception {\n decision_tree = new MyID3();\n\t\tdecision_tree.buildClassifier(data);\n\n//\t\tSystem.out.println(decision_tree.toString());\n\n train_data = data;\n\n set_of_rule = convertTreeIntoRules(decision_tree);\n\n\n // DONT DELETE THISSSS\n set_of_rule.setTrainData(data);\n\n List<Rule> listrule = set_of_rule.getList_rule();\n System.out.println(\"\\n\\n\\nBEFORE PRUNEDDD\");\n for (int i = 0; i < listrule.size(); i++ ){\n System.out.println(\"Rule \"+i+\" :\");\n Rule rule = listrule.get(i);\n List<Edge> edges = rule.getPreconditions();\n for (int j=0; j< edges.size(); j++) {\n System.out.println(\"\\t-\"+edges.get(j).getAttribute_name() + \" = \" + edges.get(j).getAttribute_value());\n }\n System.out.println(\"\\tClass = \"+rule.getClass_value());\n }\n\n// selectBestSetofRule();\n\n\t}",
"public DecisionLearningTree(String training, String test) {\n\t\ttrainingFile = training;\n\t\ttestFile = test;\n\t\treadTrainingFile();\n\t\troot = readDataFile();\n\t}",
"public abstract void build(ClassifierData<U> inputData);",
"private void buildTree(int random_attr){\n String[] schema = new String[]{\"min, max, avg, label\"};\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<int[]> train = driver.queryData(\"data\", schema);\n RandomForest forest = new RandomForest();\n forest.numAttr = RandomForestTrainingMapReduce.N;\n forest.numAttrRandom = random_attr;\n RealDecisionTree tree = new RealDecisionTree(train, forest, RandomForestTrainingMapReduce.N);\n\n // serialize this tree and write to Cassandra.\n byte[] t = serialize(tree);\n try {\n driver.insertData(t, \"Forest\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void buildClassifier(Instances data) throws Exception {\n\n // can classifier tree handle the trainData?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n\n buildTree(data, m_subtreeRaising || !m_cleanup);\n if (m_pruneTheTree) {\n prune(data);\n }\n if (m_cleanup) {\n cleanup(new Instances(data, 0));\n }\n }",
"public TreeNode readTrainingFile() {\n\t\t// first, read the training data into some storage location\n\t\ttry {\n\t\t\tScanner s = new Scanner(new File(trainingFile));\n\t\t\t// took these lines from helper-code\n\t\t classifierNames = new ArrayList<String>();\n\t\t for (Scanner l = new Scanner(s.nextLine()); l.hasNext();) {\n\t\t \tclassifierNames.add(l.next());\n\t\t }\n\t\t\tif (attributeNames.size() == 0) {\n\t\t\t\tScanner line = new Scanner(s.nextLine());\n\t\t\t\twhile (line.hasNext()) {\n\t\t\t\t\tattributeNames.add(line.next());\n\t\t\t\t}\n\t\t\t\tline.close();\n\t\t\t}\n\t\t\treadFile(s,instances);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"Training file not found, you should have put tests for this in main.\");\n\t\t\tSystem.err.println(\"Attempted to read \"+trainingFile+\".\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tsetDefaultNode();\n\t\tArrayList<Boolean> ar = new ArrayList<Boolean>();\n\t\tfor (int i = 0; i < attributeNames.size(); i++) {\n\t\t\tar.add(false);\n\t\t}\n\t\treturn BuildTree(instances, ar);\n\t}",
"private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}",
"@Before\n\tpublic void buildCategories()\n\t{\n\t\t// make a root node for the tree (i.e. like a franchise in the CR data set\n\t\tCategoryNode rootParent = null;\n\t\taRootCategory = new CategoryNode(\"rootCategoryId\", \"rootCategoryName\", rootParent);\n\t\t\n\t\t// Add a subtree containing a singleton. The singleton should get removed\n\t\tCategoryNode singleton = new CategoryNode(\"singletonId\", \"singletonName\", aRootCategory);\n\t\taRootCategory.addSubcategory(singleton);\n\t\tCategoryNode childOfSingleton = new CategoryNode(\"childOfSingletonId\", \"childOfSingletonName\", singleton);\n\t\tsingleton.addSubcategory(childOfSingleton);\n\t\tCategoryNode leaf0 = new CategoryNode(\"leaf0Id\", \"leaf0Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf0);\n\t\tCategoryNode leaf1 = new CategoryNode(\"leaf1Id\", \"leaf1Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf1);\n\t\t\n\t\t// Add a subtree will have similar leaves, so the subtree should be turned into an equivalence class\n\t\tCategoryNode equivalenceClass = new CategoryNode(\"equivalenceClassId\", \"equivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(equivalenceClass);\n\t\tCategoryNode similarNode0 = new CategoryNode(\"similarNode0Id\", \"similarNode0Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode0);\n\t\tCategoryNode similarNode1 = new CategoryNode(\"similarNode1Id\", \"similarNode1Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode1);\n\t\t\n\t\t// This subtree has dissimilar leaves, so the subtree shouldn't be turned into an equivalence class\n\t\tCategoryNode nonEquivalenceClass = new CategoryNode(\"nonEquivalenceClassId\", \"nonEquivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(nonEquivalenceClass);\n\t\tCategoryNode dissimilarNode0 = new CategoryNode(\"dissimilarNode0Id\", \"dissimilarNode0Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode0);\n\t\tCategoryNode dissimilarNode1 = new CategoryNode(\"dissimilarNode1Id\", \"dissimilarNode1Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode1);\n\t}",
"private TreeNode BuildTree(List<Instance> instances, List<Boolean> attributes) {\n\t\t// if instances is empty\n\t\tif (instances.isEmpty()) {\n\t\t\treturn baselineNode;\n\t\t}\n\t\t// if instances are pure\n\t\tif (isPure(instances)) {\n\t\t\tLeafNode returnVal = new LeafNode(1,classifierNames.get(instances.get(0).category));\n\t\t\treturn returnVal;\n\t\t\t// return leaf node containing CLASS NAME and probability 1\n\t\t}\n\t\tif (!attributes.contains(false)) { // that is, all attributes have been used\n\t\t\tint[] most = getMostCommonClassAndTotal(instances);\n\t\t\treturn new LeafNode((double)((double)instances.size() - (double)most[1]) / (double)instances.size(),\n\t\t\t\t\tclassifierNames.get(most[0]));\n\t\t\t// return a leaf node containing the name & probability of the MAJORITY CLASS\n\t\t\t// of instances in the node (or choose randomly if equal)\n\t\t}\n\t\t// else find best attribute\n\t\telse {\n\t\t\tint bestAttrIndex = 0;\n\t\t\tdouble bestPurity = 0;\n\t\t\tList<Instance> bestInstsTrue = new ArrayList<Instance>();\n\t\t\tList<Instance> bestInstsFalse = new ArrayList<Instance>();\n\t\t\tfor (int i = 0; i < attributes.size(); i++) {\n\t\t\t\t// for each remaining attribute,\n\t\t\t\tif (attributes.get(i)) { // if we have used this attribute, skip!\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tList<Instance> trueSet = new ArrayList<Instance>();\n\t\t\t\tList<Instance> falseSet = new ArrayList<Instance>();\n\t\t\t\tfor (Instance inst : instances) {\n\t\t\t\t\tif (inst.getAtt(i)) {\n\t\t\t\t\t\ttrueSet.add(inst);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfalseSet.add(inst);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdouble truePurity = purity(trueSet);\n\t\t\t\tdouble falsePurity = purity(falseSet);\n\t\t\t\tdouble weightedPurity = ((double)trueSet.size()/(double)instances.size()*truePurity)\n\t\t\t\t\t\t+ ((double)falseSet.size()/(double)instances.size()*falsePurity);\n\t\t\t\tif (weightedPurity > bestPurity) {\n\t\t\t\t\tbestAttrIndex = i;\n\t\t\t\t\tbestPurity = weightedPurity;\n\t\t\t\t\tbestInstsTrue = trueSet;\n\t\t\t\t\tbestInstsFalse = falseSet;\n\t\t\t\t}\n\t\t\t}\n\t\t\tattributes.set(bestAttrIndex,true);\n\t\t\tArrayList<Boolean> leftArr = new ArrayList<Boolean>();\n\t\t\tArrayList<Boolean> rightArr = new ArrayList<Boolean>();\n\t\t\tleftArr.addAll(attributes);\n\t\t\trightArr.addAll(attributes);\n\t\t\tTreeNode left = BuildTree(bestInstsTrue, leftArr);\n\t\t\tTreeNode right = BuildTree(bestInstsFalse, rightArr);\n\t\t\tTreeNode me = new Node(attributeNames.get(bestAttrIndex),left,right);\n\t\t\treturn me;\n\t\t}\n\t}",
"public BinTree induceTree(int[] partition, int[] features) {\r\n\t\t// if the partition is empty, we can not return a tree\r\n\t\tif (partition.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// check if all entries in partition belong to the same class. If so,\r\n\t\t// return node, labeled with class value\r\n\t\t// you may want to check if pruning is applicable here (and then just\r\n\t\t// return the majority class).\r\n\t\tint[] classCnt = new int[classes.length];\r\n\t\tString sameValue = null;\r\n\t\tboolean sameClass = true;\r\n\t\tfor (int p = 0; p < partition.length; p++) {\r\n\t\t\tString targetValue = output[partition[p]];\r\n\t\t\tfor (int n = 0; n < classes.length; n++) {\r\n\t\t\t\tif (targetValue.equals(classes[n])) {\r\n\t\t\t\t\tclassCnt[n]++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (p == 0)\r\n\t\t\t\tsameValue = targetValue;\r\n\t\t\telse {\r\n\t\t\t\tif (!sameValue.equalsIgnoreCase(targetValue)) {\r\n\t\t\t\t\tsameClass = false;\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\tif (sameClass) {\r\n\t\t\treturn new BinTree(sameValue);\r\n\t\t} else {\r\n\t\t\tint max = 0;\r\n\t\t\tfor (int n = 1; n < classes.length; n++)\r\n\t\t\t\tif (classCnt[max] < classCnt[n])\r\n\t\t\t\t\tmax = n;\r\n\t\t\tif ((double) classCnt[max] / (double) partition.length > 0.50\r\n\t\t\t\t\t|| partition.length < 5) { // if more than 50% of samples\r\n\t\t\t\t\t\t\t\t\t\t\t\t// in partition are of the same\r\n\t\t\t\t\t\t\t\t\t\t\t\t// class OR fewer than 5 samples\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t\treturn new BinTree(classes[max]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if no features are available, we can not return a tree\r\n\t\tif (features.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// class values are not equal so we select a particular feature to split\r\n\t\t// the partition\r\n\t\tint selectedFeature = selectFeature(partition, features);\r\n\r\n\t\t// create new partition of samples\r\n\t\t// use only corresponding subset of full partition\r\n\t\tint[] partTrue = matches(partition, selectedFeature, true);\r\n\t\tint[] partFalse = matches(partition, selectedFeature, false);\r\n\t\t// remove the feature from the new set (to be sent to subtrees)\r\n\t\tint[] nextFeatures = new int[features.length - 1];\r\n\t\tint cnt = 0;\r\n\t\tfor (int f = 0; f < features.length; f++) {\r\n\t\t\tif (features[f] != selectedFeature)\r\n\t\t\t\tnextFeatures[cnt++] = features[f];\r\n\t\t}\r\n\t\t// construct the subtrees using the new partitions and reduced set of\r\n\t\t// features\r\n\t\tBinTree branchTrue = induceTree(partTrue, nextFeatures);\r\n\t\tBinTree branchFalse = induceTree(partFalse, nextFeatures);\r\n\r\n\t\t// if either of the subtrees failed, we have confronted a problem, use\r\n\t\t// the most likely class value of the current partition\r\n\t\tBinTree defaultTree = null;\r\n\t\tif (branchTrue == null || branchFalse == null) {\r\n\t\t\t// indicate a majority vote\r\n\t\t\tint[] freq = new int[classes.length];\r\n\t\t\tint most = 0;\r\n\t\t\tfor (int c = 0; c < classes.length; c++) {\r\n\t\t\t\tint[] pos = matches(partition, classes[c]);\r\n\t\t\t\tfreq[c] = pos.length;\r\n\t\t\t\tif (freq[c] >= freq[most])\r\n\t\t\t\t\tmost = c;\r\n\t\t\t}\r\n\t\t\t// the majority class value can replace any null trees...\r\n\t\t\tdefaultTree = new BinTree(classes[most]);\r\n\t\t\tif (branchTrue == null && branchFalse == null)\r\n\t\t\t\treturn defaultTree;\r\n\t\t\telse\r\n\t\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\t\treturn new BinTree(labelFeature(selectedFeature),\r\n\t\t\t\t\t\t(branchTrue == null ? defaultTree : branchTrue),\r\n\t\t\t\t\t\t(branchFalse == null ? defaultTree : branchFalse));\r\n\t\t} else { // if both subtrees were successfully created we can either\r\n\t\t\tif (branchTrue.classValue != null && branchFalse.classValue != null) {\r\n\t\t\t\tif (branchTrue.classValue.equals(branchFalse.classValue)) {\r\n\t\t\t\t\t// return the the current node with the classlabel common to\r\n\t\t\t\t\t// both subtrees, or\r\n\t\t\t\t\treturn new BinTree(branchTrue.classValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\treturn new BinTree(labelFeature(selectedFeature), branchTrue,\r\n\t\t\t\t\tbranchFalse);\r\n\t\t}\r\n\t}",
"public TreeNode buildTree(ArrayList<Record> records, TreeNode root, LearningSet learningSet) \n\t{\n\t\tint bestAttribute = -1;\n\t\tdouble bestGain = 0;\n\t\troot.setEntropy(Entropy.calculateEntropy(root.getData()));\n\n\t\tif (root.getEntropy() == 0) \n\t\t{\n\t\t\treturn root;\n\t\t}\n\n\t\tfor (int i = 0; i < Assignment2.NUM_ATTRS - 2; i++) \n\t\t{\n\t\t\t// Go further only if this attribute is unused\n\t\t\tif (!Assignment2.isAttributeUsed(i)) \n\t\t\t{\n\t\t\t\tdouble entropy = 0;\n\t\t\t\tArrayList<Double> entropies = new ArrayList<Double>();\n\t\t\t\tArrayList<Integer> setSizes = new ArrayList<Integer>();\n\n\t\t\t\tfor (int j = 0; j < Assignment2.NUM_ATTRS - 2; j++) \n\t\t\t\t{\n\t\t\t\t\tArrayList<Record> subset = subset(root, i, j);\n\t\t\t\t\tsetSizes.add(subset.size());\n\n\t\t\t\t\tif (subset.size() != 0) \n\t\t\t\t\t{\n\t\t\t\t\t\tentropy = Entropy.calculateEntropy(subset);\n\t\t\t\t\t\tentropies.add(entropy);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdouble gain = Entropy.calculateGain(root.entropy, entropies, setSizes, root.data.size());\n\n\t\t\t\tif (gain > bestGain) \n\t\t\t\t{\n\t\t\t\t\tbestAttribute = i;\n\t\t\t\t\tbestGain = gain;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (bestAttribute != -1) \n\t\t{\n\t\t\tint setSize = 2;\n\t\t\troot.testAttribute = (new DiscreteAttribute(Assignment2.attributeMap.get(bestAttribute), 0+\"\"));\n\t\t\troot.children = new TreeNode[setSize];\n\t\t\troot.isUsed = true;\n\t\t\tAssignment2.usedAttributes.add(bestAttribute);\n\n\t\t\tfor (int j = 0; j < setSize; j++) {\n\t\t\t\troot.children[j] = new TreeNode();\n\t\t\t\troot.children[j].parent = root;\n\t\t\t\troot.children[j].data = subset(root, bestAttribute, j);\n\t\t\t\troot.children[j].testAttribute.name = \"\";\n\t\t\t\troot.children[j].testAttribute.value = j;\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < setSize; j++) \n\t\t\t{\n\t\t\t\tbuildTree(root.children[j].data, root.children[j], learningSet);\n\t\t\t}\n\n\t\t\troot.data = null;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn root;\n\t\t}\n\n\t\treturn root;\n\t}",
"private KDTree<BinaryClassificationTarget> buildKDTree() {\n\t\tswitch (kdType) {\n\t\tcase EUCLIDIAN:\n\t\t\treturn new SqrEuclid<BinaryClassificationTarget>(dimension,\n\t\t\t\t\tsizeLimit);\n\t\tcase WEIGHTEDEUCLIDIAN:\n\t\t\treturn new WeightedSqrEuclid<BinaryClassificationTarget>(dimension,\n\t\t\t\t\tsizeLimit);\n\t\tcase MANHATTAN:\n\t\t\treturn new Manhattan<BinaryClassificationTarget>(dimension,\n\t\t\t\t\tsizeLimit);\n\t\tcase WEIGHTEDMANHATTAN:\n\t\t\treturn new WeightedManhattan<BinaryClassificationTarget>(dimension,\n\t\t\t\t\tsizeLimit);\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"entered an unrecognized kdType: \" + kdType);\n\t\t}\n\t}",
"public void buildAllPossibleTrain() {\n while (depotOnThisLine.checkOnPossibilityCreatingTrain()) {\n try {\n trains.add(Factory.buildNewTrain(depotOnThisLine));\n } catch (DepotNotExistException e) {\n e.printStackTrace();\n }\n }\n }",
"public static void test() throws IOException {\n\t\tModel trainModel = Trainer.train(\"-i ./data/in -n fales\");\n\t\ttrainModel.saveModel(\"./data/kdTree\");\n\t\t\n\t\t\n\t\tModel model = Model.loadModel(\"./data/kdTree\");\n//\t\tCorpus corpus = CorpusReader.readCorpus(\"./data/test\");\n\t\tCorpus corpus = CorpusReader.readCorpus(\"./data/kd_test\");\n\t\tint all = 0;\n\t\tint right = 0;\n\t\tfor (Instance ins : corpus.getInstanceList()) {\n\t\t\tPredicter.predict(ins, model);\n\t\t\tSystem.out.println(String.format(\"%s %s\", ins.getLabel(), ins.getPredictLabel()));\n\t\t\tSystem.out.println(\"instance: \"+ins.getFeatures());\n\t\t\tSystem.out.println(\"neighbour: \"+ins.getNeighbour().get(0).getFeatures());\n\t\t\t++all;\n\t\t\tif (ins.getLabel().equals(ins.getPredictLabel())) {\n\t\t\t\t++right;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(right+\"/\"+all);\n\t}",
"public void train(KDTree test, BufferedReader br, List<double[]> equationList, int kmerToDo, boolean fastatofeature) throws Exception;",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\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}",
"@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}",
"@Override\r\n public void buildClassifier(Instances instances) throws Exception {\n getCapabilities().testWithFail(instances);\r\n\r\n // remove instances with missing class\r\n instances = new Instances(instances);\r\n instances.deleteWithMissingClass();\r\n\r\n // ensure we have a data set with discrete variables only and with no\r\n // missing values\r\n instances = normalizeDataSet(instances);\r\n\r\n // copy instances to local field\r\n// m_Instances = new Instances(instances);\r\n m_Instances = instances;\r\n\r\n // initialize arrays\r\n int numClasses = m_Instances.classAttribute().numValues();\r\n m_Structures = new BayesNet[numClasses];\r\n m_cInstances = new Instances[numClasses];\r\n // m_cEstimator = new DiscreteEstimatorBayes(numClasses, m_fAlpha);\r\n\r\n for (int iClass = 0; iClass < numClasses; iClass++) {\r\n splitInstances(iClass);\r\n }\r\n\r\n // update probabilty of class label, using Bayesian network associated\r\n // with the class attribute only\r\n Remove rFilter = new Remove();\r\n rFilter.setAttributeIndices(\"\" + (m_Instances.classIndex() + 1));\r\n rFilter.setInvertSelection(true);\r\n rFilter.setInputFormat(m_Instances);\r\n Instances classInstances = new Instances(m_Instances);\r\n classInstances = Filter.useFilter(classInstances, rFilter);\r\n\r\n m_cEstimator = new BayesNet();\r\n SimpleEstimator classEstimator = new SimpleEstimator();\r\n classEstimator.setAlpha(m_fAlpha);\r\n m_cEstimator.setEstimator(classEstimator);\r\n m_cEstimator.buildClassifier(classInstances);\r\n\r\n /*combiner = new LibSVM(); \r\n FastVector classFv = new FastVector(2);\r\n classFv.addElement(CNTL);\r\n classFv.addElement(CASE);\r\n Attribute classAt = new Attribute(m_Instances.classAttribute().name(), \r\n classFv);\r\n attributesFv = new FastVector(m_Structures.length);\r\n attributesFv.addElement(classAt);\r\n for (int i = 0; i < m_Instances.classAttribute().numValues(); i++){\r\n if (!m_Instances.classAttribute().value(i).equals(CNTL))\r\n attributesFv.addElement(new Attribute(m_Instances.classAttribute\r\n ().value(i)));\r\n }\r\n combinerTrain = new Instances(\"combinertrain\", attributesFv, \r\n m_Instances.numInstances());\r\n combinerTrain.setClassIndex(0);\r\n for (int i = 0; i < m_Instances.numInstances(); i++){\r\n double[] probs = super.distributionForInstance(m_Instances.instance(i));\r\n Instance result = new Instance(attributesFv.size()); \r\n if (!m_Instances.classAttribute().value(m_Instances.instance(i).\r\n classIndex()).equals(CNTL))\r\n result.setValue(classAt, CASE);\r\n else\r\n result.setValue(classAt, CNTL);\r\n for (int j = 0; j < attributesFv.size(); j++){\r\n if (!attributesFv.elementAt(j).equals(classAt)){\r\n Attribute current = (Attribute) attributesFv.elementAt(j);\r\n result.setValue(current, \r\n probs[m_Instances.classAttribute().indexOfValue\r\n (current.name())]);\r\n }\r\n }\r\n combinerTrain.add(result);\r\n }\r\n combinerTrain = discretize(combinerTrain);\r\n combiner.buildClassifier(combinerTrain);*/\r\n }",
"public DecisionTree build(WorkingMemory wm, Class<?> klass, String targetField, Collection<String> workingAttributes) {\n\n\t\tunclassified_facts = new ArrayList<Fact>();\n\t\tDecisionTree dt = new DecisionTree(klass.getName());\n//\t\t**OPT\t\tList<FactSet> facts = new ArrayList<FactSet>();\n\t\tArrayList<Fact> facts = new ArrayList<Fact>();\n\t\tFactSet klass_fs = null;\n\t\tIterator<FactSet> it_fs= wm.getFactsets(); \n\t\twhile (it_fs.hasNext()) {\n\t\t\tFactSet fs = it_fs.next();\n\t\t\tif (fs instanceof OOFactSet) {\n\t\t\t\tif (klass.isAssignableFrom(((OOFactSet)fs).getFactClass())) {\n//\t\t\t\t\t**OPT\t\tfacts.add(fs);\n\t\t\t\t\t((OOFactSet)fs).assignTo(facts); // adding all facts of fs to \"facts\"\n\n\t\t\t\t\tif (klass == ((OOFactSet)fs).getFactClass()) {\n\t\t\t\t\t\tklass_fs = fs;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (klass.getName()== fs.getClassName()) {\n\n\t\t\t}\n\n\t\t}\n\t\tdt.FACTS_READ += facts.size();\n\n\t\tnum_fact_processed = facts.size();\n\n\t\tif (workingAttributes != null)\n\t\t\tfor (String attr: workingAttributes) {\n\t\t\t\tdt.addDomain(klass_fs.getDomain(attr));\n\t\t\t}\n\t\telse \n\t\t\tfor (Domain<?> d: klass_fs.getDomains())\n\t\t\t\tdt.addDomain(d);\n\n\t\tdt.setTarget(targetField);\n\n\t\tArrayList<String> attrs = new ArrayList<String>(dt.getAttributes());\n\t\tCollections.sort(attrs);\n\n\t\thelper = new MyThread();\n//\t\tSystem.out.println(\"IS ALIVE\"+helper.isAlive());\n\t\tTreeNode root = id3(dt, facts, attrs);\n\t\ttry {\n\t\t\thelper.join();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdt.setRoot(root);\n\n\t\treturn dt;\n\t}",
"@Test\n public void testCreateCategorizationLearner()\n {\n int ensembleSize = 3 + random.nextInt(1000);\n double baggingFraction = random.nextDouble();\n double dimensionsFraction = random.nextDouble();\n int maxTreeDepth = 3 + random.nextInt(10);\n int minLeafSize = 4 + random.nextInt(10);\n Random random = new Random();\n BaggingCategorizerLearner<Vector, String> result\n = RandomForestFactory.createCategorizationLearner(ensembleSize,\n baggingFraction, dimensionsFraction, maxTreeDepth, minLeafSize,\n random);\n assertEquals(ensembleSize, result.getMaxIterations());\n assertEquals(baggingFraction, result.getPercentToSample(), 0.0);\n assertSame(random, result.getRandom());\n @SuppressWarnings(\"rawtypes\")\n CategorizationTreeLearner treeLearner = \n (CategorizationTreeLearner) result.getLearner();\n assertEquals(maxTreeDepth, treeLearner.getMaxDepth());\n assertTrue(treeLearner.getLeafCountThreshold() >= 2 * minLeafSize);\n RandomSubVectorThresholdLearner<?> randomSubspace = (RandomSubVectorThresholdLearner<?>)\n treeLearner.getDeciderLearner();\n assertEquals(dimensionsFraction, randomSubspace.getPercentToSample(), 0.0);\n assertSame(random, randomSubspace.getRandom());\n VectorThresholdInformationGainLearner<?> splitLearner = (VectorThresholdInformationGainLearner<?>)\n randomSubspace.getSubLearner();\n assertEquals(minLeafSize, splitLearner.getMinSplitSize());\n }",
"@Override\r\n\tpublic void buildTree() {\r\n\t\t\r\n\t\t// root level \r\n\t\trootNode = new TreeNode<String>(\"\");\r\n\t\t\r\n\t\t//first level\r\n\t\tinsert(\".\", \"e\");\r\n\t\tinsert(\"-\", \"t\");\r\n\t\t\r\n\t\t//second level\r\n\t\t\r\n\t\tinsert(\". .\", \"i\");\r\n\t\tinsert(\".-\", \"a\");\r\n\t\tinsert(\"-.\", \"n\"); \r\n\t\tinsert(\"--\", \"m\");\r\n\t\t\r\n\t\t//third level\r\n\t\tinsert(\"...\", \"s\");\r\n\t\tinsert(\"..-\", \"u\");\r\n\t\tinsert(\".-.\", \"r\");\r\n\t\tinsert(\".--\", \"w\");\r\n\t\tinsert(\"-..\", \"d\");\r\n\t\tinsert(\"-.-\", \"k\");\r\n\t\tinsert(\"--.\", \"g\");\r\n\t\tinsert(\"---\", \"o\");\r\n\t\t\r\n\t\t//fourth level\r\n\t\tinsert(\"....\", \"h\");\r\n\t\tinsert(\"...-\", \"v\");\r\n\t\tinsert(\"..-.\", \"f\");\r\n\t\tinsert(\".-..\", \"l\");\r\n\t\tinsert(\".--.\", \"p\");\r\n\t\tinsert(\".---\", \"j\");\r\n\t\tinsert(\"-...\", \"b\");\r\n\t\tinsert(\"-..-\", \"x\");\r\n\t\tinsert(\"-.-.\", \"c\");\r\n\t\tinsert(\"-.--\", \"y\");\r\n\t\tinsert(\"--..\", \"z\");\r\n\t\tinsert(\"--.-\", \"q\");\r\n\t\t\r\n\t}",
"public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void BuildHierarchyTree(Dataset d, int dim_num,\n\t\t\tArrayList<KDNode> class_buff) throws IOException {\n\t\t\n\t\tfor(int k=0; k<class_buff.size(); k++) {\n\t\t\tclass_buff.get(k).class_vect = new double[20];\n\t\t}\n\t\t\n\t\tCreateClassifierVec(d, dim_num, class_buff, 0);\n\t\t\n\t\twhile(root_map.size() > 4) {\n\t\t\t\n\t\t\tSystem.out.println(\"Root Size: \"+root_map.size());\n\t\t\tArrayList<KDNode> root_buff = new ArrayList<KDNode>();\n\t\t\tfor(KDNode k : root_map) {\n\t\t\t\troot_buff.add(k);\n\t\t\t\t\n\t\t\t\tfloat length = 0;\n\t\t\t\tfor(int i=0; i<k.class_vect.length; i++) {\n\t\t\t\t\tlength += k.class_vect[i] * k.class_vect[i];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlength = (float) Math.sqrt(length);\n\t\t\t\tfor(int i=0; i<k.class_vect.length; i++) {\n\t\t\t\t\tk.class_vect[i] /= length;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfloat max = -99999999;\n\t\t\tTable max_join = new Table();\n\t\t\tfor(int j=0; j<root_buff.size(); j++) {\n\t\t\t\t\n\t\t\t\tfor(int i=j+1; i<root_buff.size(); i++) {\n\n\t\t\t\t\tKDNode dim1 = root_buff.get(j);\n\t\t\t\t\tKDNode dim2 = root_buff.get(i);\n\t\t\t\t\t\n\t\t\t\t\tfloat dot_product = 0;\n\t\t\t\t\tfor(int k=0; k<dim1.class_vect.length; k++) {\n\t\t\t\t\t\tdot_product += dim1.class_vect[k] * dim2.class_vect[k];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdot_product /= (dim1.LeafNodeNum() + dim2.LeafNodeNum());\n\t\t\t\t\t\n\t\t\t\t\tif(dot_product > max) {\n\t\t\t\t\t\tmax = dot_product;\n\t\t\t\t\t\tmax_join.dim1 = dim1;\n\t\t\t\t\t\tmax_join.dim2 = dim2;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\tmax_join.dim1.RemoveRootNode();\n\t\t\tmax_join.dim2.RemoveRootNode();\n\t\t\t\n\t\t\tKDNode parent = new KDNode(null, 0);\n\t\t\tparent.left_ptr = max_join.dim1;\n\t\t\tparent.right_ptr = max_join.dim2;\n\t\t\tparent.node_corr = max;\n\t\t\t\n\t\t\tparent.class_vect = new double[max_join.dim1.class_vect.length];\n\t\t\tfor(int k=0; k<max_join.dim1.class_vect.length; k++) {\n\t\t\t\tparent.class_vect[k] = (max_join.dim1.class_vect[k] + max_join.dim2.class_vect[k]) / 2;\n\t\t\t}\n\t\t\t\n\t\t\tfloat length = 0;\n\t\t\tfor(int i=0; i<parent.class_vect.length; i++) {\n\t\t\t\tlength += parent.class_vect[i] * parent.class_vect[i];\n\t\t\t}\n\t\t\t\n\t\t\tlength = (float) Math.sqrt(length);\n\t\t\tfor(int i=0; i<parent.class_vect.length; i++) {\n\t\t\t\tparent.class_vect[i] /= length;\n\t\t\t}\n\t\t\t\n\t\t\tparent.left_ptr.parent_ptr = parent;\n\t\t\tparent.right_ptr.parent_ptr = parent;\n\t\t}\n\t\t\n\t\tint offset = 0;\n\t\tSampleSpace s = new SampleSpace();\n\t\tfor(KDNode k : KDNode.RootSet()) {\n\t\t\tKDNodeDim dim = new KDNodeDim(k, offset++);\n\t\t\ts.k_neighbour.add(dim);\n\t\t\ts.kdnode_dim.add(dim);\n\t\t}\n\t\t\n\t\tfor(KDNode k : KDNode.RootSet()) {\n\t\t\tk.space = s;\n\t\t}\n\t}",
"public List<String> useTreeOnData() {\n\t\tList<String> classifierWithData = new ArrayList<String>();\n\t\tString header = \"LEARND\\tACTUAL\";\n\t\tfor (String s : attributeNames) {\n\t\t\tchar[] truncated = Arrays.copyOf(s.toCharArray(),5);\n\t\t\tString tr = \"\";\n\t\t\tfor (int i = 0; i < 5 && Character.isAlphabetic(truncated[i]); i++) {\n\t\t\t\ttr += truncated[i];\n\t\t\t}\n\t\t\theader += \"\\t\"+ tr +\".\";\n\t\t}\n\t\tclassifierWithData.add(header);\n\t\tif (root == null || data == null || attributeNames.size() == 0) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (Instance inst : data) {\n\t\t\tString s = root.classify(inst) +\"\\t\"+ inst.toString();\n\t\t\tclassifierWithData.add(s);\n\t\t}\n\t\treturn classifierWithData;\n\t}",
"private Node makeTree(Node currentNode, DataNode dataNode,\r\n\t\t\tint featureSubsetSize, int height) {\n\r\n\t\tif (dataNode.labels.size() < this.traineeDataSize / 25 || height > 7) {\r\n\t\t\treturn new Node(majority(dataNode));\r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\tEntropyCalculation e1 = new EntropyCalculation();\r\n\r\n\t\t\tNode n = e1.maxGainedElement(dataNode.features, dataNode.labels, featureSubsetSize); //new\r\n\r\n\r\n\t\t\tif(e1.zeroEntropy){\r\n\r\n\t\t\t\tcurrentNode = new Node(dataNode.labels.get(0));\r\n\r\n\t\t\t\t/*currentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.labels.get(0);*/\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\tcurrentNode = new Node();\r\n\r\n\t\t\t\tcurrentNode.featureIndexColumn = n.featureIndexColumn;\r\n\t\t\t\tcurrentNode.featureIndexRow = n.featureIndexRow;\r\n\r\n\t\t\t\tcurrentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.features.get(currentNode.featureIndexRow).get(currentNode.featureIndexColumn);\r\n\r\n\t\t\t\tcurrentNode.leftChild = new Node();\r\n\t\t\t\tcurrentNode.rightChild = new Node();\r\n\r\n\t\t\t\tDataNode leftNode = new DataNode();\r\n\t\t\t\tDataNode rightNode = new DataNode();\r\n\r\n\t\t\t\tfor (int i = 0; i < dataNode.features.size(); i++) {\r\n\r\n\t\t\t\t\tif(currentNode.nodeValue >= dataNode.features.get(i).get(currentNode.featureIndexColumn)) {\r\n\r\n\t\t\t\t\t\tleftNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\tleftNode.labels.add(dataNode.labels.get(i));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\trightNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\trightNode.labels.add(dataNode.labels.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif((leftNode.labels.isEmpty() || rightNode.labels.isEmpty()) && height == 0){\r\n\t\t\t\t\tSystem.out.println(\"Ghapla\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentNode.leftChild = makeTree(currentNode.leftChild, leftNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\tcurrentNode.rightChild = makeTree(currentNode.rightChild, rightNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void buildBinaryTree() {\n log.info(\"Constructing priority queue\");\n Huffman huffman = new Huffman(cache.vocabWords());\n huffman.build();\n\n log.info(\"Built tree\");\n\n }",
"protected ClassifierTree getNewTree(Instances data) throws Exception {\n\n myC45PruneableClassifierTree newTree =\n new myC45PruneableClassifierTree(m_toSelectModel, m_pruneTheTree, m_CF,\n m_subtreeRaising, m_cleanup);\n newTree.buildTree((Instances) data, m_subtreeRaising || !m_cleanup);\n\n return newTree;\n }",
"public interface TreeModel {\n\n double checkAccuracy(DataSource d);\n void crossValidate(DataSource testdata);\n void pessimisticPrune(double z);\n void printTree();\n\n}",
"public Node buildTree(ArrayList<ArrayList<String>> dataSet,\n\t\t\tArrayList<String> attributeList) throws FileNotFoundException {\n\t\tint countZero = 0;\n\t\tint countOne = 0;\n\n\t\tfor (int i = 1; i < dataSet.size(); i++) {\n\t\t\tif (dataSet.get(i).get(dataSet.get(i).size() - 1)\n\t\t\t\t\t.equalsIgnoreCase(\"1\")) {\n\t\t\t\tcountOne++;\n\t\t\t} else {\n\t\t\t\tcountZero++;\n\t\t\t}\n\t\t}\n\t\tif (attributeList.isEmpty() || countZero == dataSet.size() - 1) {\n\t\t\treturn new Node(\"0\");\n\n\t\t} else if (attributeList.isEmpty() || countOne == dataSet.size() - 1) {\n\t\t\treturn new Node(\"1\");\n\t\t} else {\n\t\t\tComputeInfoGain gain = new ComputeInfoGain();\n\t\t\tString bestAttribute = gain.bestAttribute(dataSet, attributeList);\n\t\t\tArrayList<String> attributes2 = new ArrayList<String>();\n\t\t\tHashMap<String, ArrayList<ArrayList<String>>> newMap = ComputeInfoGain\n\t\t\t\t\t.classifyOnBestAttribute(dataSet, bestAttribute);\n\t\t\tfor (String attr : attributeList) {\n\t\t\t\tif (!attr.equalsIgnoreCase(bestAttribute)) {\n\t\t\t\t\tattributes2.add(attr);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (newMap.size() < 2) {\n\t\t\t\tString value = \"0\";\n\t\t\t\tif (countOne > countZero) {\n\t\t\t\t\tvalue = \"1\";\n\t\t\t\t}\n\t\t\t\treturn new Node(value);\n\t\t\t}\n\t\t\treturn new Node(bestAttribute, buildTree(newMap.get(\"0\"),\n\t\t\t\t\tattributes2), buildTree(newMap.get(\"1\"), attributes2));\n\t\t}\n\n\t}",
"public void buildClassifier(Instances instances) throws Exception {\r\n\t\tif (instances.checkForStringAttributes()) {\r\n\t\t\tthrow new UnsupportedAttributeTypeException(\"Cannot handle string attributes!\");\r\n\t\t} \r\n\t\tif (instances.numInstances() == 0) {\r\n\t\t\t//throw new IllegalArgumentException(\"No training instances.\");\r\n\t\t}\r\n\t\tif (instances.numAttributes() == 1) {\r\n\t\t\tSystem.err.println(\"No training instances found - only classes.\");\r\n\t\t\tthrow new IllegalArgumentException(\"No training instances found - only classes.\");\r\n\t\t}\r\n\t\t\r\n\t\tinstances = initClassifier(instances);\r\n\r\n\t\tcreateInputLayer(instances);\r\n\t\tcreateOutputLayer(instances);\r\n\t\tcreateHiddenLayer();\r\n\r\n\t\t// connections done.\r\n\t\t// learnClassifier(instances);\r\n\t}",
"private static void buildRegressionModel(Instances data, Instances itemsets, int[] items) throws Exception {\n\t\tif (data.numInstances() <= MAX_NB_LEAF) { //stop criterion possible needs to refined: data.variance(data.numAttributes()-1) < 10)\n\t\t\tdouble prediction = getPrediction(data,PREDICT_AVERAGE); \n\t\t\tdouble[] attributes = new double[data.numAttributes()];\n\t\t\tfor (int i : items) {\n\t\t\t\tattributes[i] = 1;\n\t\t\t}\n\t\t\tattributes[attributes.length-1] = prediction;\n\t\t\titemsets.add(new Instance(1, attributes ));\n\t\t}\n\t\telse{\n\t\t\tint[] items2 = findPattern(data);\n\t\t\tInstanceSelection data2 = select(data, items2);\n\t\t\titems2 = union(items2, items);\n\n\t\t\t// depth-first creation of the tree\n\t\t\tif (data2.getSelected().numInstances() != 0) {\n\t\t\t\tbuildRegressionModel(data2.getSelected(), itemsets, items2);\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (data2.getNotSelected().numInstances() != 0) {\n\t\t\t\tbuildRegressionModel(data2.getNotSelected(), itemsets, items);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}",
"private TakTree<TakPiece> treeBuilder(TakTree<TakPiece> tree, Point startingPoint, ArrayList<Point> visited){\n if(containsWinningPath(visited)){\n // Did white or black win?\n if(getTop(startingPoint).isWhite()){\n whiteWins = true;\n } else {\n blackWins = true;\n }\n\n // return our tree because this is certainly a leaf node\n return tree;\n }\n\n Point right = new Point(startingPoint.x + 1, startingPoint.y);\n Point left = new Point(startingPoint.x - 1, startingPoint.y);\n Point up = new Point(startingPoint.x, startingPoint.y - 1);\n Point down = new Point(startingPoint.x, startingPoint.y + 1);\n\n\n // Check for backtracking right\n if(isValidAndSimilar(right, startingPoint) && !visitedContains(visited, right)){\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(right));\n //Add this position to the visited array\n visited.add(right);\n // Attach subtree to right position\n tree.attachRight(treeBuilder(treeToAttach, right, visited));\n }\n\n // Try to build left subtree\n if(isValidAndSimilar(left, startingPoint) && !visitedContains(visited, left)){\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(left));\n //Add this position to the visited array\n visited.add(left);\n // Attach subtree to right position\n tree.attachLeft(treeBuilder(treeToAttach, left, visited));\n }\n\n // Try to build up subtree\n if(isValidAndSimilar(up, startingPoint) && !visitedContains(visited, up)){\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(up));\n //Add this position to the visited array\n visited.add(up);\n // Attach subtree to right position\n tree.attachUp(treeBuilder(treeToAttach, up, visited));\n }\n\n // Try to build down subtree\n if(isValidAndSimilar(down, startingPoint) && !visitedContains(visited, down)){\n\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(down));\n //Add this position to the visited array\n visited.add(down);\n // Attach subtree to right position\n tree.attachDown(treeBuilder(treeToAttach, down, visited));\n }\n\n return tree;\n }",
"private void buildSkiTree(SkiNode head) {\n\t\tupdateNextNode(head, head.i - 1, head.j, 0);\n\t\tupdateNextNode(head, head.i, head.j - 1, 1);\n\t\tupdateNextNode(head, head.i + 1, head.j, 2);\n\t\tupdateNextNode(head, head.i, head.j + 1, 3);\n\t}",
"private void makeTree(HashMap<Instance, Bag> instanceBags,\n ArrayList<Instance> all, boolean stopOnFirstPositiveLeaf) {\n\n Random r = new Random(getSeed());\n\n AlgorithmConfiguration settings = getSettings();\n\n ArrayList<TreeNode> toSplit = new ArrayList<TreeNode>();\n\n root = new TreeNode(null, all);\n toSplit.add(root);\n numLeaves = 0;\n\n while (toSplit.size() > 0) {\n\n // The next two lines are here solely to reproduce the results from the\n // paper\n // (i.e. so that the same random number sequence is used.\n int nextIndex = Math.min(1, toSplit.size());\n nextIndex = r.nextInt(nextIndex);\n\n TreeNode next = toSplit.remove(nextIndex);\n if (next == null) {\n continue;\n }\n\n if (next.isPurePositive(instanceBags)) {\n next.makeLeafNode(true);\n ArrayList<String> deactivated = new ArrayList<String>();\n next.deactivateRelatedInstances(instanceBags, deactivated);\n\n if (m_Debug && deactivated.size() > 0) {\n Bag.printDeactivatedInstances(deactivated);\n }\n\n // Need to re-calculate scores if positive leaf has been\n // created\n for (TreeNode n : toSplit) {\n n.removeDeactivatedInstances(instanceBags);\n n.calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n }\n\n if (stopOnFirstPositiveLeaf && deactivated.size() > 0) {\n return;\n }\n\n } else if (next.isPureNegative(instanceBags)) {\n next.makeLeafNode(false);\n } else {\n next.splitInstances(instanceBags, settings, r, m_Debug);\n if (!next.isLeafNode()) {\n if (next.split.isNominal) {\n TreeNode[] nominals = next.nominals();\n for (TreeNode nominal : nominals) {\n nominal.calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n toSplit.add(nominal);\n }\n } else {\n next.left().calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n toSplit.add(next.left());\n next.right().calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n toSplit.add(next.right());\n }\n } else {\n // Need to re-calculate scores if positive leaf has been\n // created\n if (next.isPositiveLeaf()) {\n for (TreeNode n : toSplit) {\n n.removeDeactivatedInstances(instanceBags);\n n.calculateNodeScore(instanceBags, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier);\n }\n\n if (stopOnFirstPositiveLeaf) {\n return;\n }\n }\n }\n }\n\n // Increment number of leaves if necessary\n if (next.isLeafNode()) {\n numLeaves++;\n }\n\n // Re-evaluate the best next node, because we've most likely\n // added new nodes or disabled bags\n Comparator<TreeNode> sh = Collections\n .reverseOrder(new NextSplitHeuristic());\n Collections.sort(toSplit, sh);\n }\n\n if (m_Debug) {\n System.out.println(root.render(1, instanceBags));\n }\n }",
"private void buildNewTree(PlanNode plan) {\n ILogicalOperator leftInput = plan.getLeafInput();\n skipAllIndexes(plan, leftInput);\n ILogicalOperator selOp = findSelectOrDataScan(leftInput);\n if (selOp != null) {\n addCardCostAnnotations(selOp, plan);\n }\n addCardCostAnnotations(findDataSourceScanOperator(leftInput), plan);\n }",
"public MultiInstanceDecisionTree(HashMap<Instance, Bag> instanceBags,\n ArrayList<Instance> all, boolean stopOnFirstPositiveLeaf) {\n\n m_instanceBags = instanceBags;\n makeTree(instanceBags, all, stopOnFirstPositiveLeaf);\n }",
"private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}",
"private static void CreateClassifierVec(Dataset set, int dim_num,\n\t\t\tArrayList<KDNode> class_buff, int vec_offset) {\n\t\t\t\n\t\tAttribute atts[] = new Attribute[set.size()];\n\t\t// Declare the class attribute along with its values\n\t\t FastVector fvClassVal = new FastVector(4);\n\t\t fvClassVal.addElement(\"n2\");\n\t\t fvClassVal.addElement(\"n1\");\n\t\t fvClassVal.addElement(\"p1\");\n\t\t fvClassVal.addElement(\"p2\");\n\t\t Attribute ClassAttribute = new Attribute(\"theClass\", fvClassVal);\n\t \n\t\tFastVector fvWekaAttributes = new FastVector(set.size() + 1);\n\t for(int i=0; i<set.size(); i++) {\n\t \tatts[i] = new Attribute(\"att\"+i);\n\t \tfvWekaAttributes.addElement(atts[i]);\n\t }\n\t \n\t fvWekaAttributes.addElement(ClassAttribute);\n\t \n\t Instances isTrainingSet = new Instances(\"Rel\", fvWekaAttributes, class_buff.size()); \n\t isTrainingSet.setClassIndex(set.size());\n\t\t\n\t for(int k=0; k<class_buff.size(); k++) {\n\t \t\n\t \tArrayList<Integer> data_set = new ArrayList<Integer>();\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\t\n\t\t\t\t\tint offset = 0;\n\t\t\t\t\tSet<Entry<Integer, Double>> s = set.instance(j).entrySet();\n\t\t\t\t\tdouble sample[] = new double[dim_num];\n\t\t\t\t\tfor(Entry<Integer, Double> val : s) {\n\t\t\t\t\t\tsample[offset++] = val.getValue();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint output = class_buff.get(k).classifier.Output(sample);\n\t\t\t\t\tdata_set.add(output);\n\t\t\t}\n\t\t\t\n\t\t\tif(data_set.size() != set.size()) {\n\t\t\t\tSystem.out.println(\"dim mis\");System.exit(0);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tInstance iExample = new Instance(set.size() + 1);\n\t\t\tfor(int j=0; j<set.size(); j++) {\n\t\t\t\tiExample.setValue(j, data_set.get(j));\n\t\t\t}\n\t\t\t\n\t\t\tif(Math.random() < 0.5) {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"n1\"); \n\t\t\t} else {\n\t\t\t\tiExample.setValue((Attribute)fvWekaAttributes.elementAt(set.size()), \"p1\"); \n\t\t\t}\n\t\t\t \n\t\t\t// add the instance\n\t\t\tisTrainingSet.add(iExample);\n\t }\n\t\t\n\t System.out.println(dim_num+\" *************\");\n\t int select_num = 16;\n\t\tPrincipalComponents pca = new PrincipalComponents();\n\t\t//pca.setVarianceCovered(0.1);\n Ranker ranker = new Ranker();\n ranker.setNumToSelect(select_num);\n AttributeSelection selection = new AttributeSelection();\n selection.setEvaluator(pca);\n \n Normalize normalizer = new Normalize();\n try {\n normalizer.setInputFormat(isTrainingSet);\n isTrainingSet = Filter.useFilter(isTrainingSet, normalizer);\n \n selection.setSearch(ranker);\n selection.SelectAttributes(isTrainingSet);\n isTrainingSet = selection.reduceDimensionality(isTrainingSet);\n\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(0);\n }\n \n for(int i=0; i<class_buff.size(); i++) {\n \tInstance inst = isTrainingSet.instance(i);\n \tdouble val[] = inst.toDoubleArray();\n \tint offset = vec_offset;\n \t\n \tfloat length = 0;\n \tfor(int j=0; j<select_num; j++) {\n \t\tlength += val[j] * val[j];\n \t}\n \t\n \tlength = (float) Math.sqrt(length);\n \tfor(int j=0; j<select_num; j++) {\n \t\tclass_buff.get(i).class_vect[offset++] = val[j] / length;\n \t}\n }\n\t}",
"protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }",
"public void buildClassifier(Instances data) throws Exception {\n\n // can classifier handle the data?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(data);\n data.deleteWithMissingClass();\n \n /* initialize the classifier */\n\n m_Train = new Instances(data, 0);\n m_Exemplars = null;\n m_ExemplarsByClass = new Exemplar[m_Train.numClasses()];\n for(int i = 0; i < m_Train.numClasses(); i++){\n m_ExemplarsByClass[i] = null;\n }\n m_MaxArray = new double[m_Train.numAttributes()];\n m_MinArray = new double[m_Train.numAttributes()];\n for(int i = 0; i < m_Train.numAttributes(); i++){\n m_MinArray[i] = Double.POSITIVE_INFINITY;\n m_MaxArray[i] = Double.NEGATIVE_INFINITY;\n }\n\n m_MI_MinArray = new double [data.numAttributes()];\n m_MI_MaxArray = new double [data.numAttributes()];\n m_MI_NumAttrClassInter = new int[data.numAttributes()][][];\n m_MI_NumAttrInter = new int[data.numAttributes()][];\n m_MI_NumAttrClassValue = new int[data.numAttributes()][][];\n m_MI_NumAttrValue = new int[data.numAttributes()][];\n m_MI_NumClass = new int[data.numClasses()];\n m_MI = new double[data.numAttributes()];\n m_MI_NumInst = 0;\n for(int cclass = 0; cclass < data.numClasses(); cclass++)\n m_MI_NumClass[cclass] = 0;\n for (int attrIndex = 0; attrIndex < data.numAttributes(); attrIndex++) {\n\t \n if(attrIndex == data.classIndex())\n\tcontinue;\n\t \n m_MI_MaxArray[attrIndex] = m_MI_MinArray[attrIndex] = Double.NaN;\n m_MI[attrIndex] = Double.NaN;\n\t \n if(data.attribute(attrIndex).isNumeric()){\n\tm_MI_NumAttrInter[attrIndex] = new int[m_NumFoldersMI];\n\tfor(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrInter[attrIndex][inter] = 0;\n\t}\n } else {\n\tm_MI_NumAttrValue[attrIndex] = new int[data.attribute(attrIndex).numValues() + 1];\n\tfor(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrValue[attrIndex][attrValue] = 0;\n\t}\n }\n\t \n m_MI_NumAttrClassInter[attrIndex] = new int[data.numClasses()][];\n m_MI_NumAttrClassValue[attrIndex] = new int[data.numClasses()][];\n\n for(int cclass = 0; cclass < data.numClasses(); cclass++){\n\tif(data.attribute(attrIndex).isNumeric()){\n\t m_MI_NumAttrClassInter[attrIndex][cclass] = new int[m_NumFoldersMI];\n\t for(int inter = 0; inter < m_NumFoldersMI; inter++){\n\t m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;\n\t }\n\t} else if(data.attribute(attrIndex).isNominal()){\n\t m_MI_NumAttrClassValue[attrIndex][cclass] = new int[data.attribute(attrIndex).numValues() + 1];\t\t\n\t for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){\n\t m_MI_NumAttrClassValue[attrIndex][cclass][attrValue] = 0;\n\t }\n\t}\n }\n }\n m_MissingVector = new double[data.numAttributes()];\n for(int i = 0; i < data.numAttributes(); i++){\n if(i == data.classIndex()){\n\tm_MissingVector[i] = Double.NaN;\n } else {\n\tm_MissingVector[i] = data.attribute(i).numValues();\n }\n }\n\n /* update the classifier with data */\n Enumeration enu = data.enumerateInstances();\n while(enu.hasMoreElements()){\n update((Instance) enu.nextElement());\n }\t\n }",
"public DecisionTree(String text) {\r\n\t\tsuper(text);\r\n\t\t// Current node starts at root of tree\r\n\t\tcurrent = this.getRootNode();\r\n\t}",
"public NaiveBayes(String trainset_directory){\r\n\t\t// Build the Naive Classifier\r\n\t\t// Using all the characters in the training data, build a Naive Bayes \r\n\t\t// classifier for the three languages. Implement the classifier using \r\n\t\t// a log-likelihood formulation of Naive Bayes.\r\n\t\t\r\n\t\tFile englishDir = new File(trainset_directory + \"/English\");\r\n\t\tFile japaneseDir = new File(trainset_directory + \"/Japanese\");\r\n\t\tFile spanishDir = new File(trainset_directory + \"/Spanish\");\r\n\r\n\t\t/* COMPUTING PRIOR PROBABILITIES */\r\n\t\t// Count the number of English documents in the training set:\r\n\t\tfloat nEnglish = englishDir.listFiles().length;\r\n\t\t\r\n\t\t// Count the number of Spanish documents in the training set:\r\n\t\tfloat nSpanish = spanishDir.listFiles().length;\r\n\t\t\r\n\t\t// Count the number of Japanese documents in the training set:\r\n\t\tfloat nJapanese = japaneseDir.listFiles().length;\r\n\t\t\r\n\t\t// Compute the total number of training documents:\r\n\t\tfloat nTotal = nEnglish + nSpanish + nJapanese;\r\n\t\t\r\n\t\t// Compute the prior probability for English:\r\n\t\tp_english = nEnglish / nTotal;\r\n\t\t// Compute the prior probability for Spanish:\r\n\t\tp_spanish = nSpanish / nTotal;\r\n\t\t// Compute the prior probability for Japanese:\r\n\t\tp_japanese = nJapanese / nTotal;\r\n\r\n\t\t/* COMPUTING CONDITIONAL LIKELIHOODS */\r\n\t\t// ENGLISH\r\n\t\tfillConditionalProb(englishConditional, englishDir);\r\n\t\t// SPANISH\r\n\t\tfillConditionalProb(spanishConditional, spanishDir);\r\n\t\t// JAPANESE\r\n\t\tfillConditionalProb(japaneseConditional, japaneseDir);\r\n\t\t\r\n\t\t/* FROM PROBABILITIES TO LOG PROBABILITIES */\r\n\t\t// Convert all probabilities to log probabilities to avoid underflow \r\n\t\t// problems. Use the natural logarithm (log(x) in Java). Apply the log \r\n\t\t// function to all probabilities\r\n\t}",
"public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }",
"private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }",
"public static void main(String[] args) {\n\t\tif (args.length != 2) {\n\t\t\tSystem.err.println(\"This program requires two parameters, not \"+args.length+\". The first is a training file and the second is a data file.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tDecisionLearningTree dt = new DecisionLearningTree(args[0],args[1]);\n\t\tList<String> rs = dt.useBaselineClassifierOnData(); //dt.useTreeOnData();\n\t\tfor (String r : rs) {\n\t\t\tSystem.out.println(r);\n\t\t}\n\t\tSystem.out.println(\"==========================================================\");\n\t\tSystem.out.println(\"Reporting tree:\");\n\t\tdt.report();\t\t\n\t}",
"public void trainData() throws IOException {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttestingFold = i;\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Training Tree-Augmented Naive Bayes for writing Fold\");\n\t\t\t}\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Calculating Class Priors across Data set.\\n\");\n\t\t\t}\n\t\t\tbuildPriors();\n\n\t\t\tif (testingFold == writingFold) {\n\t\t\t\tlogger.append(\"Priors built.\\n Discretizing data into Naive Bin Estimator...\\n\" +\n\t\t\t\t\t\t\"Generating Completed Graph...\\nWeighting Edges...\\n\");\n\t\t\t}\n\t\t\tdiscretizeData();\n\t\t\ttest();\n\t\t}\n\n\t}",
"protected MLlibClassifier[]\n phaseOneBuildClassifiers(JavaRDD<Instance> dataset, int folds, int seed,\n Instances headerWithSummary) throws DistributedWekaException {\n\n Instances headerNoSummary =\n CSVToARFFHeaderReduceTask.stripSummaryAtts(headerWithSummary);\n headerNoSummary.setClassIndex(headerWithSummary.classIndex());\n\n MLlibClassifier[] classifiers = new MLlibClassifier[folds];\n JavaRDD<FoldMaker> foldRDD =\n createFolds(dataset, headerNoSummary, folds, seed);\n\n logMessage(\"[MLlib evaluation] Phase 1 - building fold classifiers\");\n try {\n for (int i = 1; i <= folds; i++) {\n logMessage(\"[MLlib evaluation] Getting training fold \" + i);\n JavaRDD<Instance> training = getTrainingFold(foldRDD, i);\n logMessage(\"[MLlib evaluation] Building model for fold \" + i);\n MLlibClassifier toTrain = m_classifier.getClass().newInstance();\n toTrain.setOptions(m_classifier.getOptions());\n toTrain.buildClassifier(training, headerWithSummary, m_preprocessors,\n getCachingStrategy());\n classifiers[i - 1] = toTrain;\n training.unpersist();\n }\n } catch (Exception ex) {\n throw new DistributedWekaException(ex);\n }\n\n foldRDD.unpersist(); // no longer needed\n\n return classifiers;\n }",
"void create(Node node) {\n if (node.table.negatives() == 0) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n if (node.table.positives() == 0) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n\r\n //If no test split the data, make it a leaf with the majoriti of the target atribute\r\n int atr;\r\n //Choose the best atribute\r\n atr = this.chooseBestAtrib(node);\r\n node.atribute = atr;\r\n\r\n //No atribute split the data, so make the node a leaf with the majoriti of the class (either positive or negative)\r\n if (node.atribute == -1) {\r\n //System.out.println(\"Atribute is -1 in TeeBuidler.create\");\r\n if (node.table.negatives() > node.table.positives()) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n if (node.table.positives() >= node.table.negatives()) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n }\r\n\r\n Table table_left = new Table(), table_right = new Table();\r\n node.table.splitByAtrib(node.atribute, table_left, table_right);\r\n\r\n //Create two children for the current node //parameters: identifier,parent_result,atribute of split,id_child1, id_child2, table\r\n node.child_left = new Node(node.id + node.id, \"1\", -1, -1, -1, table_left);\r\n node.child_right = new Node(node.id + node.id+1, \"0\", -1, -1, -1, table_right);\r\n node.id_child_left = node.id + node.id;\r\n node.id_child_right = node.id + node.id+1;\r\n\r\n\r\n TreeBuilder builder = new TreeBuilder();\r\n builder.create(node.child_left);\r\n builder.create(node.child_right);\r\n\r\n }",
"public void setup(){\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<byte[]> arr = driver.queryData(\"Forest\", \"tree\");\n\n ArrayList<RealDecisionTree> trees = new ArrayList<RealDecisionTree>();\n for (byte[] b : arr){\n trees.add(deserialize(b));\n }\n RandomForest forest = new RandomForest(trees, \"test\", new String[]{\"min, mav, avg, label\"});\n forest.TestForest(trees, forest.testdata);\n }",
"public void train() {\n\n\t\tint D = Os.length;\n\t\tint T_n = 0;\n\t\tdouble log_likelihood = 0;\n\t\tdouble log_likelihood_new = 0;\n\t\tdouble epsilon = this.epsilon;\n\t\tint maxIter = this.maxIter;\n\n\t\t// Initialization\n\n\t\tclearVector(pi);\n\t\tclearMatrix(A);\n\t\tclearMatrix(B);\n\n\t\tdouble[] a = allocateVector(N);\n\t\tdouble[] b = allocateVector(N);\n\n\t\tint[] Q_n = null;\n\t\tint[] O_n = null;\n\t\t\n\t\tif (Qs == null) {\n\t\t\t\n\t\t\tpi = initializePi();\n\t\t\tA = initializeA();\n\t\t\tB = initializeB();\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tfor (int n = 0; n < D; n++) {\n\t\t\t\tQ_n = Qs[n];\n\t\t\t\tO_n = Os[n];\n\t\t\t\tT_n = Os[n].length;\n\t\t\t\tfor (int t = 0; t < T_n; t++) {\n\t\t\t\t\tif (t < T_n - 1) {\n\t\t\t\t\t\tA[Q_n[t]][Q_n[t + 1]] += 1;\n\t\t\t\t\t\ta[Q_n[t]] += 1;\n\t\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\t\tpi[Q_n[0]] += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tB[Q_n[t]][O_n[t]] += 1;\n\t\t\t\t\tb[Q_n[t]] += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdivideAssign(pi, D);\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tdivideAssign(A[i], a[i]);\n\t\t\t\tdivideAssign(B[i], b[i]);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tint s = 0;\n\t\tdouble[] pi_new = allocateVector(N);\n\t\tdouble[][] A_new = allocateMatrix(N, N);\n\t\tdouble[][] B_new = allocateMatrix(N, M);\n\t\tdouble[] temp_pi = null;\n\t\tdouble[][] temp_A = null;\n\t\tdouble[][] temp_B = null;\n\t\tdouble[][] alpha_hat = null;\n\t\tdouble[][] beta_hat = null;\n\t\tdouble[] c_n = null;\n\t\tdouble[][] xi = allocateMatrix(N, N);\n\t\tdouble[] gamma = allocateVector(N);\n\t\tdo {\n\n\t\t\t// Clearance\n\t\t\tclearVector(pi_new);\n\t\t\tclearMatrix(A_new);\n\t\t\tclearMatrix(B_new);\n\t\t\tclearVector(a);\n\t\t\tclearVector(b);\n\t\t\t/*clearMatrix(xi);\n\t\t\tclearVector(gamma);*/\n\t\t\tlog_likelihood_new = 0;\n\n\t\t\tfor (int n = 0; n < D; n++) {\n\n\t\t\t\t// Q_n = Qs[n];\n\t\t\t\tO_n = Os[n];\n\t\t\t\tT_n = Os[n].length;\n\t\t\t\tc_n = allocateVector(T_n);\n\t\t\t\talpha_hat = allocateMatrix(T_n, N);\n\t\t\t\tbeta_hat = allocateMatrix(T_n, N);\n\n\t\t\t\t// Forward Recursion with Scaling\t\t\t\n\n\t\t\t\tfor (int t = 0; t <= T_n - 1; t++) {\n\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\talpha_hat[0][i] = pi[i] * B[i][O_n[0]];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\t\talpha_hat[t][j] += alpha_hat[t - 1][i] * A[i][j] * B[j][O_n[t]];\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\tc_n[t] = 1.0 / sum(alpha_hat[t]);\n\t\t\t\t\ttimesAssign(alpha_hat[t], c_n[t]);\n\t\t\t\t}\n\n\t\t\t\t// Backward Recursion with Scaling\n\n\t\t\t\tfor (int t = T_n + 1; t >= 2; t--) {\n\t\t\t\t\tif (t == T_n + 1) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tbeta_hat[t - 2][i] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (t <= T_n) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\t\tbeta_hat[t - 2][i] += A[i][j] * B[j][O_n[t - 1]] * beta_hat[t - 1][j];\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\ttimesAssign(beta_hat[t - 2], c_n[t - 2]);\n\t\t\t\t}\n\n\t\t\t\t// Expectation Variables and Updating Model Parameters\n\n\t\t\t\tfor (int t = 0; t <= T_n - 1; t++) {\n\t\t\t\t\tif (t < T_n - 1) {\n\t\t\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\t\t\txi[i][j] = alpha_hat[t][i] * A[i][j] * B[j][O_n[t + 1]] * beta_hat[t + 1][j];\n\t\t\t\t\t\t\t\t// A_new[i][j] += xi[i][j];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplusAssign(A_new[i], xi[i]);\n\t\t\t\t\t\t\tgamma[i] = sum(xi[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (t == 0) {\n\t\t\t\t\t\t\tplusAssign(pi_new, gamma);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplusAssign(a, gamma);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassignVector(gamma, alpha_hat[t]);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\t\t\tB_new[j][O_n[t]] += gamma[j];\n\t\t\t\t\t}\n\t\t\t\t\tplusAssign(b, gamma);\n\t\t\t\t\tlog_likelihood_new += -Math.log(c_n[t]);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Normalization (Sum to One)\n\n\t\t\tsum2one(pi_new);\n\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tdivideAssign(A_new[i], a[i]);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\tdivideAssign(B_new[j], b[j]);\n\t\t\t}\n\n\t\t\ttemp_pi = pi;\n\t\t\tpi = pi_new;\n\t\t\tpi_new = temp_pi;\n\n\t\t\ttemp_A = A;\n\t\t\tA = A_new;\n\t\t\tA_new = temp_A;\n\n\t\t\ttemp_B = B;\n\t\t\tB = B_new;\n\t\t\tB_new = temp_B;\n\t\t\t// display(B);\n\n\t\t\ts = s + 1;\n\n\t\t\tif (s > 1) {\n\t\t\t\tif (Math.abs((log_likelihood_new - log_likelihood) / log_likelihood) < epsilon) {\n\t\t\t\t\tfprintf(\"log[P(O|Theta)] does not increase.\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlog_likelihood = log_likelihood_new;\n\t\t\tfprintf(\"Iter: %d, log[P(O|Theta)]: %f\\n\", s, log_likelihood);\n\n\t\t} while (s < maxIter);\n\n\t}",
"public void train() {\r\n // For each epoch, call setInputValue on input nodes\r\n for (int i = 0; i < maxEpoch; i++) {\r\n Collections.shuffle(trainingSet, random);\r\n\r\n // get each training instance\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n\r\n Instance instance = trainingSet.get(k);\r\n\r\n // set the input value in the input nodes from the training instance\r\n for (int j = 0; j < instance.attributes.size(); j++) {\r\n inputNodes.get(j).setInput(instance.attributes.get(j));\r\n }\r\n\r\n //set the target value in output nodes\r\n for (int j = 0; j < instance.classValues.size(); j++) {\r\n outputNodes.get(j).setTargetValue((double) instance.classValues.get(j));\r\n }\r\n\r\n // calculate values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n // for each hidden node\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateOutput();\r\n }\r\n\r\n //calculate values for output nodes\r\n double sumOfExponents = 0.0;\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n // for each output node\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateOutput();\r\n sumOfExponents += outputNode.getOutput();\r\n }\r\n\r\n //update output values of output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateOutputValue(sumOfExponents);\r\n }\r\n\r\n // calculate delta values for output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateDelta();\r\n }\r\n\r\n // calculate delta values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateDelta();\r\n hiddenNode.resetSumOfPartialDelta();\r\n }\r\n\r\n // update weights going from input layer to hidden layer\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.updateWeight(learningRate);\r\n }\r\n\r\n // update weights going from hidden layer to output layer\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateWeight(learningRate);\r\n }\r\n\r\n /*if (k == 0 && i==0) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n\r\n if (k == 0 && i == 0) {\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n if (hiddenNode.parents != null) {\r\n for (NodeWeightPair pair : hiddenNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n }*/\r\n }\r\n\r\n /* if (i==29) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }*/\r\n\r\n double totalLoss = 0.0;\r\n // Calculate loss and sum for each training instance, and then take average\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n Instance instance = trainingSet.get(k);\r\n totalLoss += loss(instance);\r\n }\r\n totalLoss /= trainingSet.size();\r\n System.out.println(\"Epoch: \" + i + \", \" + \"Loss: \" + String.format(\"%.3e\", totalLoss));\r\n }\r\n }",
"public List<WhereExpr> buildTree(WhereClause where, DatabaseState pre, HashMap<String, String> classinfo) throws Exception{\n\t\t// define fixed where expression list\n\t\tList<WhereExpr> fixed_values;\n\t\t\n\t\t// prepare \n\t\tlong starttime = System.nanoTime();\n\t\tprepareARFF(where, pre, classinfo);\n\t\tlong endtime = System.nanoTime(); // get time stamp\n\t\ttimes[0] = (endtime - starttime);\n\t\t\n\t\t// read file\n\t\tstarttime = System.nanoTime();\n\t\tBufferedReader reader = new BufferedReader(\n new FileReader(\"./data/feature.arff\"));\n\t\tInstances data = new Instances(reader);\n\t\treader.close();\n\t\t\n\t\t// Prepare parameters\n\t\tdata.setClassIndex(data.numAttributes() - 1);\n\t\t\n\t\t// ClassifierTree\n\t\ttree.buildClassifier(data);\n\t\t\n\t\tendtime = System.nanoTime(); // get time stamp\n\t\ttimes[1] = (endtime - starttime);\n\t\t\n\t\t// convert into conditional rules\n\t\tstarttime = System.nanoTime();\n Map<String, DNF> valueTraces = J48Parser.parse(tree, data);\n\t\t\n // return result\n\t\tList<WhereExpr> result = this.toConditionRules(where, valueTraces);\n\t\t\n\t\tendtime = System.nanoTime(); // get time stamp\n\t\ttimes[2] = (endtime - starttime);\n\t\t\n\t\treturn result;\n\t}",
"private void buildTree(int nodeNum, AABB nodeBounds,\n ArrayList<AABB> allPrimBounds,\n IntArray primNums, int nPrims, int depth,\n int badRefines) {\n if (nPrims <= maxPrims || depth == 0) {\n if ((nPrims > 16) && (depth == 0)) {\n System.out.println(\"reached max. KdTree depth with \" + nPrims + \n \" primitives\");\n }\n \n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Split - Position bestimmen */\n \n int bestAxis = -1, bestOffset = -1;\n float bestCost = Float.POSITIVE_INFINITY;\n float oldCost = isectCost * (float)nPrims;\n Vector d = nodeBounds.max.sub(nodeBounds.min);\n float totalSA = (2.f * (d.x*d.y + d.x*d.z + d.y*d.z));\n float invTotalSA = 1.f / totalSA;\n \n /* Achse wählen */\n int axis = d.dominantAxis();\n int retries = 0;\n boolean retry = false;\n ArrayList<BoundEdge> edges = null;\n \n// final int splitCount = edges[axis].length;\n \n do {\n edges = mkEdges(allPrimBounds, primNums, axis);\n Collections.sort(edges);\n final int splitCount = edges.size();\n \n// java.util.Arrays.sort(edges[axis], 0, splitCount);\n \n /* beste Split - Position für diese Achse finden */\n int nBelow = 0, nAbove = nPrims;\n \n for (int i = 0; i < splitCount; ++i) {\n if (edges.get(i).type == EdgeType.END) --nAbove;\n float edget = edges.get(i).t;\n \n if (edget > nodeBounds.min.get(axis) &&\n edget < nodeBounds.max.get(axis)) {\n // Compute cost for split at _i_th edge\n int otherAxis[][] = { {1,2}, {0,2}, {0,1} };\n int otherAxis0 = otherAxis[axis][0];\n int otherAxis1 = otherAxis[axis][1];\n \n float belowSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (edget - nodeBounds.min.get(axis)) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float aboveSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (nodeBounds.max.get(axis) - edget) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float pBelow = belowSA * invTotalSA;\n float pAbove = aboveSA * invTotalSA;\n \n float eb = (nAbove == 0 || nBelow == 0) ? emptyBonus : 0.f;\n float cost = traversalCost + isectCost * (1.f - eb) *\n (pBelow * nBelow + pAbove * nAbove);\n \n if (cost < bestCost) {\n /* neuer bester gefunden */\n bestCost = cost;\n bestAxis = axis;\n bestOffset = i;\n }\n }\n \n if (edges.get(i).type == EdgeType.START) ++nBelow;\n }\n \n if (!(nBelow == nPrims && nAbove == 0))\n throw new IllegalStateException(\"hmm\");\n \n retry = ((bestAxis == -1) && (retries < 2));\n \n if (retry) {\n ++retries;\n axis = (axis+1) % 3;\n }\n \n } while (retry);\n \n if (bestCost > oldCost) ++badRefines;\n if ((bestCost > 4.f * oldCost && nPrims < 16) ||\n bestAxis == -1 || badRefines == 3) {\n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n if (nPrims > 16)\n System.out.println(\"aborting KdTree build recursion (bc=\" +\n bestCost + \", oc=\" + oldCost + \", #prims=\" + \n nPrims + \", br=\" + badRefines + \")\");\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Primitive nach oben / unten sortieren */\n int n0 = 0, n1 = 0;\n \n final ArrayList<Integer> prims0Tmp = new ArrayList<Integer>();\n final ArrayList<Integer> prims1Tmp = new ArrayList<Integer>();\n \n for (int i = 0; i < bestOffset; ++i) {\n if (edges.get(i).type == EdgeType.START) {\n prims0Tmp.add(edges.get(n0++).primNum);\n// prims0.set(n0++, edges[bestAxis][i].primNum);\n }\n }\n \n for (int i = bestOffset + 1; i < edges.size(); ++i) {\n if (edges.get(i).type == EdgeType.END) {\n prims1Tmp.add(edges.get(n1++).primNum);\n// prims1.set(n1++, edges[bestAxis][i].primNum);\n }\n }\n \n /* rekursiver Abstieg */\n float tsplit = edges.get(bestOffset).t;\n \n nodesW.add(makeInterior(bestAxis, tsplit));\n \n AABB bounds[] = nodeBounds.split(tsplit, bestAxis);\n \n final IntArray prims0 = new IntArray(prims0Tmp.size());\n for (int i=0; i < prims0Tmp.size(); i++) {\n prims0.set(i, prims0Tmp.get(i));\n }\n \n final IntArray prims1 = new IntArray(prims1Tmp.size());\n for (int i=0; i < prims1Tmp.size(); i++) {\n prims1.set(i, prims1Tmp.get(i));\n }\n \n buildTree(nodeNum+1, bounds[0], allPrimBounds,\n prims0, n0, depth-1, badRefines);\n \n nodesW.get(nodeNum).setAboveChild(nodesW.size());\n \n buildTree(nodesW.size(), bounds[1], allPrimBounds,\n prims1, n1, depth-1, badRefines);\n }",
"protected MultiInstanceDecisionTree(Instances instances) {\n\n m_instanceBags = new HashMap<Instance, Bag>();\n ArrayList<Instance> all = new ArrayList<Instance>();\n double totalInstances = 0;\n double totalBags = 0;\n for (Instance i : instances) {\n Bag bag = new Bag(i);\n for (Instance bagged : bag.instances()) {\n m_instanceBags.put(bagged, bag);\n all.add(bagged);\n }\n totalBags++;\n totalInstances += bag.instances().numInstances();\n }\n\n double b_multiplier = totalInstances / totalBags;\n if (m_scaleK) {\n for (Bag bag : m_instanceBags.values()) {\n bag.setBagWeightMultiplier(b_multiplier);\n }\n }\n\n makeTree(m_instanceBags, all, false);\n }",
"public static TreeNode constructTreeNode(String testData) {\n\n if (testData == null || testData.equals(\"[]\")) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is null or empty\");\n return null;\n }\n\n if (testData.indexOf(\"[\") != 0 || testData.indexOf(\"]\") != testData.length()-1) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is invalid\");\n return null;\n }\n\n String data = testData.substring(1, testData.length()-1);\n String[] dataList = data.split(\",\");\n TreeNode[] nodeArray = new TreeNode[dataList.length];\n\n for (int i=0; i<dataList.length; i++) {\n if (!dataList[i].equals(\"null\")) {\n TreeNode node = new TreeNode(Integer.valueOf(dataList[i]));\n nodeArray[i] = node;\n }\n }\n\n // Construct binary tree\n // If the index of root = 0\n // The index of left of the node(index = m) is 2*m +1\n // If the index of root = 1\n // Then the index of left of the node(index = m) is 2*m -1\n\n for (int i=0; i<nodeArray.length; i++) {\n if (nodeArray[i] != null) {\n int indexOfLeft = i * 2 + 1;\n int indexOfRight = indexOfLeft + 1;\n\n if (indexOfLeft < nodeArray.length && nodeArray[indexOfLeft] != null) {\n nodeArray[i].left = nodeArray[indexOfLeft];\n }\n\n if (indexOfRight < nodeArray.length && nodeArray[indexOfRight] != null) {\n nodeArray[i].right = nodeArray[indexOfRight];\n }\n }\n }\n\n return nodeArray[0];\n }",
"@Test(timeout = 4000)\n public void test077() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"\";\n Evaluation.main(stringArray0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.bayes.NaiveBayesMultinomial:\n // \n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"@Test\r\n\tpublic final void testCross() throws GeneticProgrammingException {\r\n\t\tfinal int[] training = TestHelper.genertateTrainingDataSet(-100, 100);\r\n\t\tfinal double[] targetValues = TestHelper.calculateTargetValues(\r\n\t\t\t\t\"x*2-1/2\", training);\r\n\t\tfinal Node root = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree = new Tree(root, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator = new Node(root, \"-\", Node.LEFT, Node.OPERATOR);\r\n\t\tnewTree.addNode(minusOperator);\r\n\t\tfinal Node multiOperator = new Node(root, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree.addNode(multiOperator);\r\n\t\tnewTree.addNode(new Node(minusOperator, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(minusOperator, \"3\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree.addNode(new Node(multiOperator, \"5\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(1-3)/(x*5)\",\r\n\t\t\t\tnewTree.getEquation().toString());\r\n\t\tfinal Node root2 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree2 = new Tree(root2, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator2 = new Node(root2, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(minusOperator2);\r\n\t\tfinal Node multiOperator2 = new Node(root2, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree2.addNode(multiOperator2);\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(minusOperator2, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"8\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree2\r\n\t\t\t\t.addNode(new Node(multiOperator2, \"9\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\", \"(x-7)/(8*9)\",\r\n\t\t\t\tnewTree2.getEquation().toString());\r\n\r\n\t\tfinal Node root3 = new Node(null, \"/\", null, Node.OPERATOR);\r\n\t\tfinal Tree newTree3 = new Tree(root3, new TerminalSet(),\r\n\t\t\t\tnew FunctionalSet());\r\n\t\tfinal Node minusOperator3 = new Node(root3, \"-\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(minusOperator3);\r\n\t\tfinal Node multiOperator3 = new Node(root3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator3);\r\n\t\tfinal Node multiOperator4 = new Node(multiOperator3, \"*\", Node.LEFT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator4);\r\n\t\tfinal Node multiOperator5 = new Node(multiOperator3, \"*\", Node.RIGHT,\r\n\t\t\t\tNode.OPERATOR);\r\n\t\tnewTree3.addNode(multiOperator5);\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"x\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(minusOperator3, \"7\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"1\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator4, \"2\", Node.RIGHT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"3\", Node.LEFT, Node.OPERAND));\r\n\t\tnewTree3\r\n\t\t\t\t.addNode(new Node(multiOperator5, \"4\", Node.RIGHT, Node.OPERAND));\r\n\t\tassertEquals(\"Tree did not get generated corectly\",\r\n\t\t\t\t\"(x-7)/(1*2)*(3*4)\", newTree3.getEquation().toString());\r\n\t\tfinal ArrayList<Tree> newTrees = new ArrayList<Tree>();\r\n\t\tnewTrees.add(newTree3);\r\n\t\tnewTrees.add(newTree2);\r\n\t\tnewTrees.add(newTree);\r\n\t\tassertEquals(\"Tree should have a size of 3 before the cross\", 3,\r\n\t\t\t\tnewTrees.size());\r\n\t\tCrossover.cross(newTrees, 1, 100, training, targetValues);\r\n\t\tfinal Iterator<Tree> iterator = newTrees.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\t// All five trees should be different\r\n\t\t\tfinal String firstTree = iterator.next().toString();\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 1\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 2\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 3\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t\tassertNotSame(\"Cross should change the tree but did not 4\",\r\n\t\t\t\t\tfirstTree, iterator.next().toString());\r\n\t\t}\r\n\t\t// should be 5 trees after the crossover\r\n\t\tassertEquals(\"Tree should have a size of 5 but was not\", 5, newTrees\r\n\t\t\t\t.size());\r\n\t}",
"private MultiselectDecisionTree getDecisionTree(String input, boolean assertEquality) throws Exception {\n MultiselectDecisionTree decisionTree = MultiselectDecisionTree.parse(input);\n\n // create string output stream\n try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\n // create new CSV writer instance\n CsvWriter writer = new CsvWriter(\",\", \"\\n\");\n\n // serialize the CSV result to output stream\n decisionTree.serialize(writer, byteArrayOutputStream);\n\n // assert symmetrical parsing/serialising\n String csvOutput = byteArrayOutputStream.toString();\n if (assertEquality) {\n Assert.assertEquals(input, csvOutput);\n } else {\n Assert.assertNotEquals(input, csvOutput);\n }\n }\n return decisionTree;\n }",
"public static void createTree(SuccessorGenerator generator, GameState initialState)\n {\n LinkedList<GameState> currentLevel = new LinkedList<GameState>();\n currentLevel.add(initialState);\n Player currentPlayer = Player.PLAYER_MAX;\n \n int level = 0;\n while(true)\n {\n LinkedList<GameState> nextLevel = new LinkedList<GameState>();\n \n /*Gerando todas as ações possíveis para o nível atual.*/\n for(GameState state : currentLevel)\n {\n generator.generateSuccessors(state, currentPlayer);\n \n for(int i = 0; i < state.getChildren().size(); i++)\n {\n GameState successorState = state.getChildren().get(i);\n nextLevel.add(successorState);\n }\n }\n System.out.println(\"Expandindo nível \"+(level++)+\" com \"+nextLevel.size()+\" estados.\");\n \n /*Alternando jogadores*/\n currentPlayer = (currentPlayer == Player.PLAYER_MAX)?\n Player.PLAYER_MIN:\n Player.PLAYER_MAX; \n \n /*Busca termina quando todos os estados foram explorados*/\n if(nextLevel.isEmpty()) break;\n \n currentLevel.clear();\n currentLevel.addAll(nextLevel);\n }\n \n }",
"public PhylogeneticTree(Model model) {\n this.model = model;\n }",
"public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}",
"private void buildGraph(Classes classes) {\n \t\n\tadjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n\t//add primitives to the children of object\n ArrayList<String> objectlist = adjacencyList.get(TreeConstants.Object_.getString());\n objectlist.add(TreeConstants.IO.getString());\n objectlist.add(TreeConstants.Int.getString());\n objectlist.add(TreeConstants.Bool.getString());\n objectlist.add(TreeConstants.Str.getString());\n adjacencyList.put(TreeConstants.Object_.getString(), objectlist);\n \tfor (Enumeration e = classes.getElements(); e.hasMoreElements(); ) {\n \t class_c currentClass = ((class_c)e.nextElement());\n \n \t // If the same class name is already present, that's a redefinition error\n \t String className = currentClass.getName().toString();\n \t if (!nameToClass.containsKey(className)) {\n \t \tnameToClass.put(currentClass.getName().toString(), currentClass);\n \t } else {\n \t \tsemantError(currentClass).println(\"Class \" + className + \" was previously defined\");\n \t \tcontinue;\n \t }\n \t // if parent already present in HashMap, append child to list of children\n \t String parent = currentClass.getParent().toString();\n \t if ( !adjacencyList.containsKey(parent) ) {\n \t\tadjacencyList.put(parent, new ArrayList<String>() );\n \t }\n \t adjacencyList.get(parent).add(currentClass.getName().toString());\n \t}\n \n // Check if each parent in a parent-child inheritance is a valid class\n HashSet<String> bogusClasses = new HashSet<String>();\n for (String parent : adjacencyList.keySet()) {\n \tif (!nameToClass.containsKey(parent)) {\n \t\tfor (String child: adjacencyList.get(parent)) {\n \t\t\tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" inherits from an undefined class \" + parent);\n \t\t}\n \t\t// Remove the bogus parent class from the graph\n \t\tbogusClasses.add(parent);\n \t}\n }\n // Remove the bogus parent class from the graph\n for (String bogus : bogusClasses) {\n \tadjacencyList.remove(bogus);\n }\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Pruned out unreachable classes\");\n }\n \n // Also check if someone's inheriting from the Basic classes other than Object & IO\n for (String child : adjacencyList.get(TreeConstants.Int.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Int\");\n }\n for (String child : adjacencyList.get(TreeConstants.Str.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Str\");\n }\n for (String child : adjacencyList.get(TreeConstants.Bool.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Bool\");\n }\n // No point in continuing further. The above classes are going to propagate more errors\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Checked for simple inheritance errors\");\n }\n if (errors()) {\n \treturn;\n }\n \n \t// Now check for cycles\n \t// Do the depth first search of this adjacency list starting from Object\n \tHashMap<String, Boolean> visited = new HashMap<String, Boolean>();\n \tfor (String key : adjacencyList.keySet() ) {\n \t\tvisited.put(key, false);\n \t\tfor ( String value : adjacencyList.get(key) ) {\n \t\t\tvisited.put(value, false);\n \t\t}\n \t}\n \tdepthFirstSearch(visited, TreeConstants.Object_.toString());\n \t// It is legal to inherit from the IO class. So mark classes down that tree as well\n\t\n\t/*depthFirstSearch(visited, TreeConstants.IO.getString());\n \t// Check for unreachable components - unreachable classes are cycles\n \t// Except the Bool, IO, Int and String. Hack - set them to true\n \tvisited.put(TreeConstants.IO.getString(), true);\n \tvisited.put(TreeConstants.Bool.getString(), true);\n \tvisited.put(TreeConstants.Str.getString(), true);\n \tvisited.put(TreeConstants.Int.getString(), true);\n\t*/\n \tfor (String key : visited.keySet()) {\n \t\tif (!visited.get(key)) {\n \t\t\tsemantError(nameToClass.get(key)).println(\"Class \" + key + \" or an ancestor is involved in an inheritance cycle.\");\n \t\t}\n \t} \n \n \tif (Flags.semant_debug) {\n \t\tSystem.out.println(\"Checked for cycles\");\n \t}\n \t}",
"private void buildTree(int n, double x, double y, double a, double branchLength) {\n tree = new ArrayList<>();\n populateTree(n, x, y, a, branchLength);\n }",
"public void train() {\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tif (ins.scorePmi_E1E2 > largestPMI)\n\t\t\t\tlargestPMI = ins.scorePmi_E1E2;\n\t\t}\n\t\tSystem.out.println(\"Largest PMI: \" + largestPMI);\n\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tfor (Instance ins : arrTestInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tint sizeD0 = arrD0.size();\n\t\tint sizeD1 = arrD1.size();\n\t\tint sizeD2 = arrD2.size();\n\t\tint sizeD3 = arrD3.size();\n\n\t\tint sizeMin = Math.min(sizeD0, Math.min(sizeD1, Math\n\t\t\t\t.min(sizeD2, sizeD3)));\n\t\tSystem.out.println(\"sizeMin=\" + sizeMin);\n\n\t\tint n = instanceNums.length;\n\n\t\tboolean flag = false;\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tint k = instanceNums[i];\n\n\t\t\tif (k > sizeMin) {\n\t\t\t\tk = sizeMin;\n\t\t\t\tinstanceNums[i] = k;\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nk=\" + k);\n\n\t\t\tArrayList<Instance> arrSub0 = getInstances(arrD0, k);\n\t\t\tArrayList<Instance> arrSub1 = getInstances(arrD1, k);\n\t\t\tArrayList<Instance> arrSub2 = getInstances(arrD2, k);\n\t\t\tArrayList<Instance> arrSub3 = getInstances(arrD3, k);\n\n\t\t\tArrayList<Instance> arrTrains = new ArrayList<Instance>();\n\t\t\tarrTrains.addAll(arrSub0);\n\t\t\tarrTrains.addAll(arrSub1);\n\t\t\tarrTrains.addAll(arrSub2);\n\t\t\tarrTrains.addAll(arrSub3);\n\t\t\tCollections.shuffle(arrTrains);\n\n\t\t\tSystem.out.println(\"Training size: \" + arrTrains.size());\n\n\t\t\ttrain(arrTrains);\n\n\t\t\tdouble acc = test();\n\t\t\tacc = test();\n\n\t\t\taccuracies[i] = acc;\n\n\t\t\tcount++;\n\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tSystem.out.print(\" | \" + \"K=\" + instanceNums[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < count; i++) {\n\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\n\t\t\tString res = df.format(accuracies[i]);\n\t\t\tSystem.out.print(\" | \" + res);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void dmall() {\n \r\n BufferedReader datafile = readDataFile(\"Work//weka-malware.arff\");\r\n \r\n Instances data = null;\r\n\t\ttry {\r\n\t\t\tdata = new Instances(datafile);\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n data.setClassIndex(data.numAttributes() - 1);\r\n \r\n // Choose a type of validation split\r\n Instances[][] split = crossValidationSplit(data, 10);\r\n \r\n // Separate split into training and testing arrays\r\n Instances[] trainingSplits = split[0];\r\n Instances[] testingSplits = split[1];\r\n \r\n // Choose a set of classifiers\r\n Classifier[] models = { new J48(),\r\n new DecisionTable(),\r\n new DecisionStump(),\r\n new BayesianLogisticRegression() };\r\n \r\n // Run for each classifier model\r\n//for(int j = 0; j < models.length; j++) {\r\n int j = 0;\r\n \tswitch (comboClassifiers.getSelectedItem().toString()) {\r\n\t\t\tcase \"J48\":\r\n\t\t\t\tj = 0;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionTable\":\r\n\t\t\t\tj = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"DecisionStump\":\r\n\t\t\t\tj = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"BayesianLogisticRegression\":\r\n\t\t\t\tj = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n \t\r\n\r\n // Collect every group of predictions for current model in a FastVector\r\n FastVector predictions = new FastVector();\r\n \r\n // For each training-testing split pair, train and test the classifier\r\n for(int i = 0; i < trainingSplits.length; i++) {\r\n Evaluation validation = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvalidation = simpleClassify(models[j], trainingSplits[i], testingSplits[i]);\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\te.printStackTrace();\r\n\t\t\t\t}\r\n predictions.appendElements(validation.predictions());\r\n \r\n // Uncomment to see the summary for each training-testing pair.\r\n// textArea.append(models[j].toString() + \"\\n\");\r\n textArea.setText(models[j].toString() + \"\\n\");\r\n// System.out.println(models[j].toString());\r\n }\r\n \r\n // Calculate overall accuracy of current classifier on all splits\r\n double accuracy = calculateAccuracy(predictions);\r\n \r\n // Print current classifier's name and accuracy in a complicated, but nice-looking way.\r\n textArea.append(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\\n\");\r\n System.out.println(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\");\r\n//}\r\n \r\n\t}",
"@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}",
"public void buildClassTree() {\n\t\twriter.writeClassTree();\n\t}",
"private void buildNewTree(PlanNode plan, List<ILogicalOperator> joinOps, MutableInt totalNumberOfJoins)\n throws AlgebricksException {\n // we have to move the inputs in op around so that they match the tree structure in pn\n // we use the existing joinOps and switch the leafInputs appropriately.\n List<PlanNode> allPlans = joinEnum.getAllPlans();\n int leftIndex = plan.getLeftPlanIndex();\n int rightIndex = plan.getRightPlanIndex();\n //System.out.println(\"allPlansSize \" + allPlans.size() + \" leftIndex \" + leftIndex + \" rightIndex \" + rightIndex); // put in trace statements\n //System.out.println(\"allPlansSize \" + allPlans.size());\n PlanNode leftPlan = allPlans.get(leftIndex);\n PlanNode rightPlan = allPlans.get(rightIndex);\n\n ILogicalOperator joinOp = joinOps.get(totalNumberOfJoins.intValue()); // intValue set to 0 initially\n\n if (plan.IsJoinNode()) {\n fillJoinAnnotations(plan, joinOp);\n }\n\n if (leftPlan.IsScanNode()) {\n // leaf\n ILogicalOperator leftInput = leftPlan.getLeafInput();\n skipAllIndexes(leftPlan, leftInput);\n ILogicalOperator selOp = findSelectOrDataScan(leftInput);\n if (selOp != null) {\n addCardCostAnnotations(selOp, leftPlan);\n }\n joinOp.getInputs().get(0).setValue(leftInput);\n addCardCostAnnotations(findDataSourceScanOperator(leftInput), leftPlan);\n } else {\n // join\n totalNumberOfJoins.increment();\n ILogicalOperator leftInput = joinOps.get(totalNumberOfJoins.intValue());\n joinOp.getInputs().get(0).setValue(leftInput);\n buildNewTree(leftPlan, joinOps, totalNumberOfJoins);\n }\n\n if (rightPlan.IsScanNode()) {\n // leaf\n ILogicalOperator rightInput = rightPlan.getLeafInput();\n skipAllIndexes(rightPlan, rightInput);\n ILogicalOperator selOp = findSelectOrDataScan(rightInput);\n if (selOp != null) {\n addCardCostAnnotations(selOp, rightPlan);\n }\n joinOp.getInputs().get(1).setValue(rightInput);\n addCardCostAnnotations(findDataSourceScanOperator(rightInput), rightPlan);\n } else {\n // join\n totalNumberOfJoins.increment();\n ILogicalOperator rightInput = joinOps.get(totalNumberOfJoins.intValue());\n joinOp.getInputs().get(1).setValue(rightInput);\n buildNewTree(rightPlan, joinOps, totalNumberOfJoins);\n }\n }",
"public void build() throws ClusException, IOException {\n m_List = getRun().getDataSet(ClusRun.TRAINSET).getData(); // m_Data;\n }",
"private static void buildHierarchicalGraphs() {\n \tLOG.info(\"Begin building of hierarchical graph for each user.\");\n \t\n \tDBUtil.open();\n \t\n \t// Create a reader for users\n \tLOG.debug(\"Create a UserReader.\");\n \tUserReader userReader = (UserReader) ReaderFactory.instance().getUserReader();\n\n\t\t// Create the processor to test\n \tLOG.debug(\"Create HierarchicalGraphProcessor.\");\n\t\tHierarchicalGraphProcessor hgProc = new HierarchicalGraphProcessor();\n\t\t\n\t\t// Setup the reader\n\t\tuserReader.setProcessor(hgProc);\n\t\tuserReader.attach(hgProc, Interests.UserFinished);\n\t\t\n\t\t// Read the user resources to process\n\t\tLOG.debug(\"Read users out of the database with a minimum of {} and a maximum of {} points.\", userReader.getMinUserPoints(), userReader.getMaxUserPoints());\n\t\tuserReader.read();\n \t\n \tLOG.info(\"Finished building of hierarchical graphs.\");\n }",
"protected void buildHirarchyTree() {\r\n\t\tfor(SupplyZone s : supplyZoneLines){\r\n\t\t\tZoneNode currentZone = zoneNodeMap.get(s.getZoneName());\r\n\t\t\tZoneNode parentZone = zoneNodeMap.get(s.getParentZoneName());\r\n\t\t\tif(parentZone == null){\r\n\t\t\t\tzonesTreeRoot = currentZone;\r\n\t\t\t}\r\n\t\t\tcurrentZone.setParent(parentZone);\r\n\t\t\tif (parentZone != null) parentZone.addChild(currentZone); \r\n\t\t}\r\n\r\n\t}",
"public static void buildTrainData() throws IOException {\n\t\tString negativePath = \"./corpus/20ng-train-all-terms.txt\";\n\t\tString positivePath = \"./corpus/r8-train-all-terms.txt\";\n\t\tString fileout = \"./corpus/trainData\";\n\t\tFileReader fr1 = new FileReader(negativePath);\n\t\tFileReader fr2 = new FileReader(positivePath);\n\t\tFileWriter fw = new FileWriter(fileout);\n\t\tBufferedReader br1 = new BufferedReader(fr1);\n\t\tBufferedReader br2 = new BufferedReader(fr2);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tHashtable<String, Integer> map = new Hashtable<String, Integer>();\n\t\tString readoneline;\n\t\twhile (((readoneline = br1.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\n\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\tbw.newLine();\n\t\t\t} else {\n\t\t\t\tInteger num = map.get(topic);\n\t\t\t\tif (num < 50) {\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (((readoneline = br2.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\t\t\tif (topic.equals(\"acq\") || topic.equals(\"earn\")\n\t\t\t\t\t|| topic.equals(\"money-fx\") || topic.equals(\"trade\")\n\t\t\t\t\t|| topic.equals(\"interest\")) {\n\t\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t} else {\n\t\t\t\t\tInteger num = map.get(topic);\n\t\t\t\t\tif (topic.equals(\"acq\") && num < 300) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"earn\") && num < 450) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"money-fx\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"trade\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"interest\") && num < 50) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbw.flush();\n\t\tbr1.close();\n\t\tbw.close();\n\t\tfw.close();\n\n\t}",
"public NBClassifier(String trainDataFolder, int trainPortion)\n\t{\n\t\ttrainingDocs = new ArrayList<String>();\n\t\tallDocs = new ArrayList<String>();\n\t\tnumClasses = 2;\n\t\tclassCounts = new int[numClasses];\n\t\tclassStrings = new String[numClasses];\n\t\tclassTokenCounts = new int[numClasses];\n\t\tcondProb = new HashMap[numClasses];\n\t\tvocabulary = new HashSet<String>();\n\t\tfor(int i=0;i<numClasses;i++){ //just initialization\n\t\t\tclassStrings[i] = \"\";\n\t\t\tcondProb[i] = new HashMap<String,Double>();\n\t\t}\n\t\ttotalDocs = 5574;\n\t\toffset = Math.round(totalDocs) * trainPortion / 100;\n\t\tSystem.out.println(\"Numer of Documents For Training: \"+offset);\n\t\tSystem.out.println(\"Numer of Documents For Testing: \"+(totalDocs-offset));\n\t\tpreprocess(trainDataFolder);\n\t\t\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tString[] tokens = classStrings[i].split(\" \");\n\t\t\tclassTokenCounts[i] = tokens.length;\n\t\t\t//collecting the counts\n\t\t\tfor(String token:tokens){\n\t\t\t\t//System.out.println(token);\n\t\t\t\tvocabulary.add(token);\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tdouble count = condProb[i].get(token);\n\t\t\t\t\tcondProb[i].put(token, count+1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcondProb[i].put(token, 1.0);\n\t\t\t\t//System.out.println(token+\" : \"+condProb[i].get(token));\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tIterator<Map.Entry<String, Double>> iterator = condProb[i].entrySet().iterator();\n\t\t\tint vSize = vocabulary.size();\n\t\t\twhile(iterator.hasNext())\n\t\t\t{\n\t\t\t\tMap.Entry<String, Double> entry = iterator.next();\n\t\t\t\tString token = entry.getKey();\n\t\t\t\tDouble count = entry.getValue();\n\t\t\t\t//System.out.println(count+1+\" / ( \"+classTokenCounts[i]+\" + \"+vSize+\" )\");\n\t\t\t\tcount = (count+1)/(classTokenCounts[i]+vSize);\n\t\t\t\tcondProb[i].put(token, count);\n\t\t\t}\n\t\t\t//System.out.println(\"dekho: \"+condProb[i]);\n\t\t}\n\t\ttestModel();\n\t}",
"private CategoryView buildComplicatedExpectedTree() {\n\n CategoryView root = new CategoryView(\"ROOT\");\n CategoryView a = new CategoryView(\"a\");\n CategoryView b = new CategoryView(\"b\");\n CategoryView c = new CategoryView(\"c\");\n CategoryView d = new CategoryView(\"d\");\n CategoryView e = new CategoryView(\"e\");\n\n root.addChild(a);\n root.addChild(e);\n root.addChild(new CategoryView(\"f\"));\n root.addChild(new CategoryView(\"g\"));\n root.addChild(new CategoryView(\"z\"));\n a.addChild(b);\n b.addChild(c);\n a.addChild(c);\n c.addChild(d);\n d.addChild(e);\n c.addChild(e);\n\n root.addChild(new CategoryView(\"1\") {{\n addChild(new CategoryView(\"2\") {{\n addChild(new CategoryView(\"3\"));\n }});\n }});\n root.addChild(new CategoryView(\"x\") {{\n addChild(new CategoryView(\"y\"));\n }});\n\n return root;\n }",
"@Override\n\tpublic TimeSeriesForestClassifier call()\n\t\t\tthrows InterruptedException, AlgorithmExecutionCanceledException, TimeoutException, AlgorithmException {\n\t\t\n\t\tTimeSeriesDataset dataset = this.getInput();\n\t\t\n\t\t// Perform Training\n\t\tfinal TimeSeriesTree[] trees = new TimeSeriesTree[this.numTrees];\n\t\tExecutorService execService = Executors.newFixedThreadPool(this.cpus);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tFuture<TimeSeriesTree>[] futures = new Future[this.numTrees];\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\tTimeSeriesTree tst = new TimeSeriesTree(this.maxDepth, this.seed + i, this.useFeatureCaching);\n\t\t\tfutures[i] = execService.submit(new Callable<TimeSeriesTree>() {\n\t\t\t\t@Override\n\t\t\t\tpublic TimeSeriesTree call() throws Exception {\n\n\t\t\t\t\ttst.train(dataset);\n\t\t\t\t\ttst.setTrained(true);\n\t\t\t\t\treturn tst;\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Wait for completion\n\t\texecService.shutdown();\n\t\texecService.awaitTermination(this.timeout.seconds(), TimeUnit.SECONDS);\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\ttry {\n\t\t\t\tTimeSeriesTree tst = futures[i].get();\n\t\t\t\ttrees[i] = tst;\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\tthrow new AlgorithmException(\n\t\t\t\t\t\t\"Could not train time series tree due to training exception: \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\tthis.model.setTrees(trees);\n\t\tthis.model.setTrained(true);\n\n\t\treturn this.model;\n\t}",
"public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}",
"private void buildProbTree() {\n\t\tif (probArray_ == null)\n\t\t\tprobArray_ = new double[elementArray_.length];\n\t\t// Iterate through the items\n\t\tdouble sumProb = 0;\n\t\tfor (int i = 0; i < elementArray_.length; i++) {\n\t\t\tif (sumProb >= 1)\n\t\t\t\tbreak;\n\n\t\t\tsumProb += itemProbs_.get(elementArray_[i]);\n\t\t\tprobArray_[i] = sumProb;\n\t\t}\n\t\trebuildProbs_ = false;\n\t}",
"private void buildTree(Species[] species) {\n List<PhyloTreeNode> treeList = new ArrayList<PhyloTreeNode>();\n MultiKeyMap<Double> speciesMap = new MultiKeyMap<Double>();\n for(Species s : species) {\n treeList.add(new PhyloTreeNode(null, s));\n }\n for(int i = 0; i < species.length - 1; i++) {\n for(int j = i + 1; j < species.length; j++) {\n speciesMap.put(species[i].getName(), species[j].getName(), Species.distance(species[i], species[j]));\n }\n }\n while(treeList.size() > 1) {\n double minValue = java.lang.Double.POSITIVE_INFINITY;\n String currentString = \"\";\n for (Map.Entry<String, Double> entry : speciesMap.entrySet()) {\n double value = entry.getValue();\n if(value < minValue ) {\n minValue = value;\n }\n }\n for (Map.Entry<String, Double> entry : speciesMap.entrySet()) {\n String key = entry.getKey();\n double value = entry.getValue();\n String[] wordArray = compareKeys(key);\n String newString = (wordArray[0] + \"|\" + wordArray[1]);\n if(value == minValue && (newString.compareTo(currentString) < 1 || currentString == \"\" )) {\n currentString = newString;\n }\n }\n PhyloTreeNode less = null;\n PhyloTreeNode great = null;\n String[] twoWords = compareKeys(currentString);\n for(int i = 0; i < treeList.size(); i++) {\n if(treeList.get(i).getLabel().equals(twoWords[0]))\n less = treeList.get(i);\n if(treeList.get(i).getLabel().equals(twoWords[1]))\n great = treeList.get(i);\n }\n String lesser = less.getLabel();\n String greater = great.getLabel();\n for(PhyloTreeNode s : treeList) {\n if(!s.getLabel().equals(lesser) && !s.getLabel().equals(greater)) {\n double numLessLeaf = less.getNumLeafs();\n double numGreatLeaf = great.getNumLeafs();\n double answer = ( ((numLessLeaf /(numLessLeaf + numGreatLeaf)) * speciesMap.get(lesser, s.getLabel())) +\n ((numGreatLeaf /(numLessLeaf + numGreatLeaf)) * speciesMap.get(greater, s.getLabel())));\n speciesMap.remove(lesser, s.getLabel());\n speciesMap.remove(greater, s.getLabel());\n speciesMap.put(lesser + \"+\" + greater, s.getLabel(), answer);\n }\n }\n PhyloTreeNode combined = new PhyloTreeNode(lesser + \"+\" + greater, null, less, great, speciesMap.get(lesser, greater) / 2.0);\n combined.getLeftChild().setParent(combined);\n combined.getRightChild().setParent(combined);\n treeList.add(combined);\n treeList.remove(less);\n treeList.remove(great);\n speciesMap.remove(lesser, greater);\n }\n if(treeList.size() != 0)\n overallRoot = treeList.get(0);\n return;\n }",
"@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }",
"public BinTree induce() {\r\n\t\t// the initial partition contains all the samples available to us\r\n\t\tint[] entries = new int[input.length];\r\n\t\tfor (int i = 0; i < entries.length; i++)\r\n\t\t\tentries[i] = i;\r\n\t\t// the initial features include all available\r\n\t\tint[] features = new int[label.length];\r\n\t\tfor (int i = 0; i < features.length; i++)\r\n\t\t\tfeatures[i] = i;\r\n\t\t// ok, let's get the show on the road\r\n\t\treturn induceTree(entries, features);\r\n\t}",
"@Override\n\tpublic TreeNode buildTree(String[] exp) {\n\t\tStack<TreeNode> stk = new Stack<TreeNode>();\n\t\tTreeNode tmpL, tmpR, tmpRoot;\n\t\tint i;\n\n\t\tfor(String s: exp) {\n\t\t\tif(s.equals(EMPTY))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ti = Integer.parseInt(s);\n\t\t\t\tstk.push(new TreeNode(EMPTY + i));\n\t\t\t}\n\t\t\tcatch (NumberFormatException n) {\n\t\t\t\ttmpR = stk.pop();\n\t\t\t\ttmpL = stk.pop();\n\t\t\t\ttmpRoot = new TreeNode(s, tmpL, tmpR);\n\t\t\t\tstk.push(tmpRoot);\n\t\t\t}\n\t\t}\n\n\t\treturn stk.pop();\n\n\t}",
"Classifier getClassifier();",
"public Node computePostPrunedTree(Node parent, int M,\n\t\t\tArrayList<ArrayList<String>> validationData) {\n\t\tprunedTree = new Node();\n\t\tcopyTree(parent, prunedTree);\n\t\tdouble accuracyPrunedTree = computeAccuracy(prunedTree, validationData);\n\t\t// System.out.println(\"Here the accuracy : \" + accuracyPrunedTree);\n\t\ttempTree = new Node();\n\t\t// for (int i = 1; i <= l; i++) {\n\t\tcopyTree(parent, tempTree);\n\t\tRandom random = new Random();\n\t\t// int M = 1 + random.nextInt(k);\n\t\tfor (int j = 1; j <= M; j++) {\n\t\t\t// System.out.println(\"\\n***Loop \" + j + \"***\");\n\t\t\tcalculateNumLeafNodes(tempTree); // sets the number of leafnodes\n\t\t\t\t\t\t\t\t\t\t\t\t// in the class variable\n\t\t\tint N = getNumberNonLeafNodes();\n\t\t\t// System.out.print(\"N : \" + N);\n\t\t\tif (N > 1) {\n\t\t\t\tint P = random.nextInt(N) + 1;\n\t\t\t\t// System.out.print(\" ; P : \" + P);\n\t\t\t\treplaceNode(tempTree, P);\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdouble accuracyTempTree = computeAccuracy(tempTree, validationData);\n\t\t\t// System.out.println(\"accuracyTempTree : \" + accuracyTempTree\n\t\t\t// + \" ; accuracyPrunedTree : \" + accuracyPrunedTree);\n\t\t\tif (accuracyTempTree < accuracyPrunedTree) {\n\t\t\t\taccuracyPrunedTree = accuracyTempTree;\n\t\t\t\tcopyTree(tempTree, prunedTree);\n\t\t\t\t// System.out.println(\"Copy Happened\");\n\t\t\t}\n\t\t}\n\t\treturn prunedTree;\n\t}",
"public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}",
"public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public QuestionPoolDataModel(Tree tree, DataModel model)\n {\n this.model = model;\n this.tree=tree;\n //buildTree();\n }",
"public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Horse> trainingSet = utility.readHorseColicfile(\"horseTrain.txt\");\n\t\tArrayList<Variable> variableSets = Horse.getAllVar();\n\t\tTree tree = new Tree();\n\t\t\n\t\tNode decisionTree = tree.buildTree(trainingSet, variableSets);\n\t\tutility.printNode(decisionTree);\n\t\t\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Horse> testSet = utility.readHorseColicfile(\"horseTest.txt\");\n\t\tutility.testTree(testSet, decisionTree);\n\t\t\n\n\t}",
"protected abstract LabelNode[] pickNodes(Estimate predictions, int maxPicks);",
"public static DecisionTreeNode performCrossValidation(List<CSVAttribute[]> dataset, int labelAttribute,\n BiFunction<List<CSVAttribute[]>, Integer, DecisionTreeNode> trainFunction,\n int numFolds) {\n\n List<Double> foldPerfResults = new ArrayList<>();\n\n // Split dataset\n DecisionTreeNode learnedTree = null;\n\n List<CSVAttribute[]> trainData;\n List<CSVAttribute[]> ulTestData;\n List<CSVAttribute[]> lTestData;\n\n // inintialize confusion matrix with zeros\n int[][] confusionMatrix = new int[][]{{0,0},{0,0}};\n\n for (int i = 0; i < numFolds; i++) {\n List<List<CSVAttribute[]>> splitData = getTrainData(dataset, numFolds, labelAttribute);\n\n trainData = splitData.get(0);\n ulTestData = splitData.get(1);\n lTestData = splitData.get(2);\n\n // learn from training subset\n learnedTree = trainFunction.apply(trainData, labelAttribute);\n\n // gather results in list\n foldPerfResults.add(predictionAccuracy(ulTestData, lTestData, learnedTree, labelAttribute));\n\n int[][] newConfusionMatrix = getConfusionMatrix(ulTestData, lTestData, labelAttribute);\n confusionMatrix[0][0] += newConfusionMatrix[0][0];\n confusionMatrix[0][1] += newConfusionMatrix[0][1];\n confusionMatrix[1][0] += newConfusionMatrix[1][0];\n confusionMatrix[1][1] += newConfusionMatrix[1][1];\n }\n\n int tp = confusionMatrix[0][0];\n int fp = confusionMatrix[0][1];\n int fn = confusionMatrix[1][0];\n int tn = confusionMatrix[1][1];\n float posPrecision = (float) tp / (tp + fp);\n float negPrecision = (float) tn / (tn + fn);\n float posRecall = (float) tp / (tp + fn);\n float negRecall = (float) tn / (tn + fp);\n\n double averageAccuracy = foldPerfResults.stream()\n .mapToDouble(d -> d)\n .average()\n .orElse(0.0);\n double standardDeviation = Math.sqrt((foldPerfResults.stream()\n .mapToDouble(d -> d)\n .map(x -> Math.pow((x - averageAccuracy),2))\n .sum()) / foldPerfResults.size());\n\n System.out.println(\"accuracy: \" + averageAccuracy * 100 + \"% +/- \" + standardDeviation * 100 + \"%\");\n System.out.println();\n System.out.println(\" true 1 | true 0 | class precision\");\n System.out.println(\"-------------------------------------------\");\n System.out.println(\"pred. 1 | \"+tp+\" | \"+fp+\" | \"+posPrecision*100+\"%\");\n System.out.println(\"pred. 0 | \"+fn+\" | \"+tn+\" | \"+negPrecision*100+\"%\");\n System.out.println(\"-------------------------------------------\");\n System.out.println(\"class recall | \"+posRecall*100+\"% | \"+negRecall*100+\"% | \");\n\n return learnedTree;\n }",
"private void CreatingBeautyContentTopK() {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \tbestBranches=objGrapB.relativePositionDepthSearchTopK(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,maxScreens,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \r\n\t \tBranch objBranch=new Branch();\r\n\t \t//bestBranches=objBranch.sortBranches(bestBranches);\r\n\t \t\r\n\t \t//System.out.print( \"CounterStates\"+objGrapB.getCounterIDs() );\r\n\t \r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branches foundeded\r\n\t \r\n\t Iterator<Branch> nombreIterator = bestBranches.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBranch elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getHeuristicValue()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t \t//Just here to implement the n screens!\r\n\t for(int i=0;i<maxScreens;i++)\r\n\t {//block from Lelis and Reis (>class GeradorDeFasses)\r\n/*\t \ttry {\r\n\t \t\tLevel levelScreen=PaintElements(((Branch)bestBranches.get(i)).getStates(),this.clone());\t\t\t\t\t\r\n\t\t\t\t\tScreen objScreen=new Screen();\r\n\t\t\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n\t \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t\t\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t\t\t \r\n\t\t\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\t\t\tcopiador.copy(\"\" + i, \"Screens/\");\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}*/\r\n\t }\r\n\t \r\n\t\t\t\r\n\t\t}",
"public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}",
"public void evaluate(String sampleFile, String featureDefFile, int nFold, float tvs, String modelDir, String modelFile) {\n/* 854 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 855 */ List<List<RankList>> validationData = new ArrayList<>();\n/* 856 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 860 */ List<RankList> samples = readInput(sampleFile);\n/* */ \n/* */ \n/* 863 */ int[] features = readFeature(featureDefFile);\n/* 864 */ if (features == null) {\n/* 865 */ features = FeatureManager.getFeatureFromSampleVector(samples);\n/* */ }\n/* 867 */ FeatureManager.prepareCV(samples, nFold, tvs, trainingData, validationData, testData);\n/* */ \n/* */ \n/* 870 */ if (normalize)\n/* */ {\n/* 872 */ for (int j = 0; j < nFold; j++) {\n/* */ \n/* 874 */ normalizeAll(trainingData, features);\n/* 875 */ normalizeAll(validationData, features);\n/* 876 */ normalizeAll(testData, features);\n/* */ } \n/* */ }\n/* */ \n/* 880 */ Ranker ranker = null;\n/* 881 */ double scoreOnTrain = 0.0D;\n/* 882 */ double scoreOnTest = 0.0D;\n/* 883 */ double totalScoreOnTest = 0.0D;\n/* 884 */ int totalTestSampleSize = 0;\n/* */ \n/* 886 */ double[][] scores = new double[nFold][]; int i;\n/* 887 */ for (i = 0; i < nFold; i++) {\n/* 888 */ (new double[2])[0] = 0.0D; (new double[2])[1] = 0.0D; scores[i] = new double[2];\n/* 889 */ } for (i = 0; i < nFold; i++) {\n/* */ \n/* 891 */ List<RankList> train = trainingData.get(i);\n/* 892 */ List<RankList> vali = null;\n/* 893 */ if (tvs > 0.0F)\n/* 894 */ vali = validationData.get(i); \n/* 895 */ List<RankList> test = testData.get(i);\n/* */ \n/* 897 */ RankerTrainer trainer = new RankerTrainer();\n/* 898 */ ranker = trainer.train(this.type, train, vali, features, this.trainScorer);\n/* */ \n/* 900 */ double s2 = evaluate(ranker, test);\n/* 901 */ scoreOnTrain += ranker.getScoreOnTrainingData();\n/* 902 */ scoreOnTest += s2;\n/* 903 */ totalScoreOnTest += s2 * test.size();\n/* 904 */ totalTestSampleSize += test.size();\n/* */ \n/* */ \n/* 907 */ scores[i][0] = ranker.getScoreOnTrainingData();\n/* 908 */ scores[i][1] = s2;\n/* */ \n/* */ \n/* 911 */ if (!modelDir.isEmpty()) {\n/* */ \n/* 913 */ ranker.save(FileUtils.makePathStandard(modelDir) + \"f\" + (i + 1) + \".\" + modelFile);\n/* 914 */ System.out.println(\"Fold-\" + (i + 1) + \" model saved to: \" + modelFile);\n/* */ } \n/* */ } \n/* 917 */ System.out.println(\"Summary:\");\n/* 918 */ System.out.println(this.testScorer.name() + \"\\t| Train\\t| Test\");\n/* 919 */ System.out.println(\"----------------------------------\");\n/* 920 */ for (i = 0; i < nFold; i++)\n/* 921 */ System.out.println(\"Fold \" + (i + 1) + \"\\t| \" + SimpleMath.round(scores[i][0], 4) + \"\\t| \" + SimpleMath.round(scores[i][1], 4) + \"\\t\"); \n/* 922 */ System.out.println(\"----------------------------------\");\n/* 923 */ System.out.println(\"Avg.\\t| \" + SimpleMath.round(scoreOnTrain / nFold, 4) + \"\\t| \" + SimpleMath.round(scoreOnTest / nFold, 4) + \"\\t\");\n/* 924 */ System.out.println(\"----------------------------------\");\n/* 925 */ System.out.println(\"Total\\t| \\t\\t| \" + SimpleMath.round(totalScoreOnTest / totalTestSampleSize, 4) + \"\\t\");\n/* */ }",
"@SuppressWarnings(\"unchecked\")\n public static void prepareStrategy(final int nFolds, final String splitPath, final String recPath, final String outPath) {\n for (int i = 0; i < nFolds; i++) {\n File trainingFile = new File(splitPath + \"train_\" + i + \".csv\");\n File testFile = new File(splitPath + \"test_\" + i + \".csv\");\n File recFile = new File(recPath + \"recs_\" + i + \".csv\");\n DataModelIF<Long, Long> trainingModel;\n DataModelIF<Long, Long> testModel;\n DataModelIF<Long, Long> recModel;\n try {\n trainingModel = new SimpleParser().parseData(trainingFile);\n testModel = new SimpleParser().parseData(testFile);\n recModel = new SimpleParser().parseData(recFile);\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n Double threshold = REL_TH;\n String strategyClassName = \"net.recommenders.rival.evaluation.strategy.UserTest\";\n EvaluationStrategy<Long, Long> strategy = null;\n try {\n strategy = (EvaluationStrategy<Long, Long>) (Class.forName(strategyClassName)).getConstructor(DataModelIF.class, DataModelIF.class, double.class).\n newInstance(trainingModel, testModel, threshold);\n } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | ClassNotFoundException | InvocationTargetException e) {\n e.printStackTrace();\n }\n\n DataModelIF<Long, Long> modelToEval = DataModelFactory.getDefaultModel();\n for (Long user : recModel.getUsers()) {\n assert strategy != null;\n for (Long item : strategy.getCandidateItemsToRank(user)) {\n if (!Double.isNaN(recModel.getUserItemPreference(user, item))) {\n modelToEval.addPreference(user, item, recModel.getUserItemPreference(user, item));\n }\n }\n }\n try {\n DataModelUtils.saveDataModel(modelToEval, outPath + \"strategymodel_\" + i + \".csv\", true, \"\\t\");\n } catch (FileNotFoundException | UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n }",
"public void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n FilteredClassifier filteredClassifier0 = new FilteredClassifier();\n try { \n Evaluation.evaluateModel((Classifier) filteredClassifier0, testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -g\n // \\tOnly outputs the graph representation of the classifier.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.meta.FilteredClassifier:\n // \n // -F <filter specification>\n // \\tFull class name of filter to use, followed\n // \\tby filter options.\n // \\teg: \\\"weka.filters.unsupervised.attribute.Remove -V -R 1,2\\\"\n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n // -W\n // \\tFull name of base classifier.\n // \\t(default: weka.classifiers.trees.J48)\n // \n // Options specific to classifier weka.classifiers.trees.J48:\n // \n // -U\n // \\tUse unpruned tree.\n // -O\n // \\tDo not collapse tree.\n // -C <pruning confidence>\n // \\tSet confidence threshold for pruning.\n // \\t(default 0.25)\n // -M <minimum number of instances>\n // \\tSet minimum number of instances per leaf.\n // \\t(default 2)\n // -R\n // \\tUse reduced error pruning.\n // -N <number of folds>\n // \\tSet number of folds for reduced error\n // \\tpruning. One fold is used as pruning set.\n // \\t(default 3)\n // -B\n // \\tUse binary splits only.\n // -S\n // \\tDon't perform subtree raising.\n // -L\n // \\tDo not clean up after the tree has been built.\n // -A\n // \\tLaplace smoothing for predicted probabilities.\n // -J\n // \\tDo not use MDL correction for info gain on numeric attributes.\n // -Q <seed>\n // \\tSeed for random data shuffling (default 1).\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }"
] |
[
"0.7050263",
"0.6597628",
"0.6594863",
"0.63688064",
"0.62227607",
"0.60909325",
"0.6074417",
"0.6061895",
"0.5916782",
"0.58660024",
"0.58183944",
"0.58083546",
"0.5719699",
"0.5699036",
"0.56734425",
"0.566541",
"0.56636024",
"0.5623859",
"0.5612455",
"0.5608167",
"0.554957",
"0.55460924",
"0.5540611",
"0.5510222",
"0.54824674",
"0.5480574",
"0.54390264",
"0.54177046",
"0.5395574",
"0.5393455",
"0.53816843",
"0.533301",
"0.5326513",
"0.5316699",
"0.5315961",
"0.52932453",
"0.52786696",
"0.5269485",
"0.5263529",
"0.5255529",
"0.52529204",
"0.52266324",
"0.52119386",
"0.5205618",
"0.5199475",
"0.5193707",
"0.51908046",
"0.5159608",
"0.5149796",
"0.5149448",
"0.5149392",
"0.5144071",
"0.5143726",
"0.51311946",
"0.5123226",
"0.5116449",
"0.50884897",
"0.5080037",
"0.50759727",
"0.50587046",
"0.5049817",
"0.5022518",
"0.50065184",
"0.49995285",
"0.4990487",
"0.49765313",
"0.49675816",
"0.496433",
"0.49601293",
"0.49582472",
"0.4953111",
"0.49486032",
"0.4947281",
"0.49449652",
"0.49449137",
"0.49419302",
"0.4939136",
"0.49337685",
"0.49287498",
"0.4926473",
"0.4914269",
"0.48945215",
"0.4892961",
"0.48911852",
"0.48894677",
"0.48875028",
"0.48608926",
"0.48585698",
"0.4854808",
"0.4847874",
"0.4839809",
"0.483611",
"0.4830357",
"0.48279148",
"0.48264378",
"0.48241356",
"0.4813031",
"0.4801619",
"0.48009408",
"0.47996327"
] |
0.5600783
|
20
|
The Information Content function I(p/p+n, n/p+n) from lecture
|
public static double informationContent(double p, double n) {
double pn = p + n;
// Modified so that log(0) is treated as 0
if (p == 0) {
return ((-p/pn) * 0) - ((n/pn) * (Math.log(n/pn)/Math.log(2)));
}
else if (n == 0) {
return ((-p/pn) * (Math.log(p/pn)/Math.log(2))) - ((n/pn) * 0);
}
else {
return ((-p/pn) * (Math.log(p/pn)/Math.log(2))) - ((n/pn) * (Math.log(n/pn)/Math.log(2)));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Term getP();",
"public void PrimInfo(ActionEvent actionEvent)\n {\n try {\n Desktop.getDesktop().browse(new URL(\"https://en.wikipedia.org/wiki/Prim%27s_algorithm\").toURI());\n } catch (IOException e) {\n e.printStackTrace();\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n }",
"private int p(K k, int i) {\r\n return i/2 + (i*i)/2 + (i%2);\r\n }",
"private void info3(int i) {\n\t\t\n\t}",
"public static void main( String[] args) {\n System.out.println( 3 + 5.0/2 + 5 * 2-3 );\n System.out.println( 3.0 + 5/2 + 5 * 2-3 );\n System.out.println( (int)(3.0 + 5)/(2 + 5.0) * 2-3); // -.2\n \n // initial variables\n double d1 = 37.9;\n double d2 = 1004.128;\n int i1 = 12;\n int i2 = 18;\n \n System.out.println( \"Problem 1: \" + (57.2 * (i1/i2) + 1) ); // 1.0\n System.out.println( \"Problem 2: \" + (57.2 * ((double)i1/i2) + 1) ); // 39.13333\n System.out.println( \"Problem 3: \" + (15 - i1 * (d1 * 3 ) + 4) ); // -1345.39999\n System.out.println( \"Problem 4: \" + (15 - i1 * (int)(d1 * 3) + 4) ); // -1337\n System.out.println( \"Problem 5: \" + (15 - i1 * ((int)d1 * 3) + 4) ); // -1313\n \n // Exercises 10-15 page 5-4\n System.out.println( \"Exercise 10\" );\n int p1 = 3;\n double d3 = 10.3;\n int j1 = (int)5.9;\n System.out.println( p1 + p1 * (int)d3 - 3 * j1 );\n \n System.out.println( \"Exercises 12-15\" );\n int dividend = 12, divisor = 4, quotient = 0, remainder = 0;\n int dividend2 = 13, divisor2 = 3, quotient2 = 0, remainder2 = 0;\n \n quotient = dividend/divisor; // 3\n remainder = dividend % divisor; // 0\n quotient2 = dividend / divisor2; // 4\n remainder2 = dividend2 % divisor2; //1\n \n System.out.println( quotient );\n System.out.println( remainder );\n System.out.println( quotient2 );\n System.out.println( remainder2 );\n \n // Exercise 17\n final String M = \"ugg\"; // constant String M\n // M = \"wow\"; // compile error\n \n // Math class methods\n \n /*\n * Math class methods:\n * \n * Math.abs(x); = Absolute value (int,double)\n * Math.pow(x,y); = Exponent (x to the power of y)\n * Math.sqrt(x); = Square root (double)\n * Math.ceil(x); = Ceiling (the next highest whol num 1.1 = 2\n * Math.floor(x); = Floor (the next lowest num 1.9 = 1)\n * Math.min(x,y); = Minimum of x or y \n * Math.max(x,y); = Maximum of x or y\n * Math.random(); = Returns a random num between 0<=x<1\n * Math.round(x); = Rounds the number\n * Math.PI = Constant variable, returns 3.14159265...\n */\n System.out.println( \"\\nMath class methods\" );\n System.out.println( Math.abs(-312.7) );\n System.out.println( Math.pow(5,5) );\n System.out.println( Math.sqrt(1.0) );\n System.out.println( Math.ceil(99.1));\n System.out.println( Math.floor(100.9) );\n System.out.println( Math.min(2, 25) );\n System.out.println( Math.max(2, 25) );\n System.out.println( Math.round(99.5) );\n System.out.println( Math.random() + \"\\t\" + Math.random() );\n System.out.println( Math.PI );\n \n /*\n * Other Math methods\n * \n * Math.log(x); == log base e of x\n * Math.sin(x); == sin of angle x in radians\n * Math.cos(x); == cos of angle x in radians\n * Math.tan(x); == tan of angle x in radians\n * Math.asin(x); == arcisne of x in radians -PI/2 to PI/2\n * Math.acos(x); == arccosine of x in radians -PI/2 to PI/2\n * Math.atan(x); == arctan of x in range -PI/2 to PI/2\n * Math.toDegrees(x); == converts radians to degrees\n * Math.toRadians(x); == converts degrees to radians\n */\n \n /*\n * Project: ComputeThis\n * \n * Print: d1 = 3PIsin(187deg) + |cos(122deg)| = -0.618672237585067\n * Print: d2 = (14.72)^3.801 + ln72 = 27496.9888867001543\n */\n \n double d10 = 3 * Math.PI * Math.sin(Math.toRadians(187)) + Math.abs( Math.cos( Math.toRadians(122) ) );\n double d20 = Math.pow(14.72, 3.801) + Math.log(72);\n System.out.println( \"d1 = \" + d10 );\n System.out.println( \"d2 = \" + d20 );\n \n \n \n }",
"public void printInfo() {\n System.out.println(\"\\n\\n---------------------BASIC RESULTS-----------------------\\n\");\n System.out.println(\"Most positive article: \" + mostPositiveDoc + \"\\nwith positivity \" + mostPositive + \"\\n\");\n System.out.println(\"Most negative article: \" + mostNegativeDoc + \"\\nwith negativity \" + mostNegative + \"\\n\");\n if (biggestDifference >= 0) {\n System.out.println(\"Biggest difference: \" + biggestDifferenceDoc + \"\\nwith more positivity by \" + biggestDifference);\n } else {\n System.out.println(\"Biggest difference: \" + biggestDifferenceDoc + \"\\nwith more negativity by \" + Math.abs(biggestDifference));\n }\n \n System.out.println(\"\\nAverage positivity: \" + avgPositive);\n System.out.println(\"Average negativity: \" + avgNegative);\n System.out.println(\"\\n-----------------------------------------------------------\\n\");\n System.out.println(\"\\n---------------------ADVANCED RESULTS----------------------\");\n \n System.out.println(\"\\nAverage positivity for PUBLISHERS:\");\n for (String s : publisherOptimism.keySet()) {\n LinkedList<Double> positives = publisherOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for PUBLISHERS:\");\n for (String s : publisherPessimism.keySet()) {\n LinkedList<Double> negatives = publisherPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage positivity for REGIONS:\");\n for (String s : regionOptimism.keySet()) {\n LinkedList<Double> positives = regionOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for REGIONS:\");\n for (String s : regionPessimism.keySet()) {\n LinkedList<Double> negatives = regionPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage positivity for DATES:\");\n for (LocalDate s : dayOptimism.keySet()) {\n LinkedList<Double> positives = dayOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for DATES:\");\n for (LocalDate s : dayPessimism.keySet()) {\n LinkedList<Double> negatives = dayPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage positivity for WEEKDAYS:\");\n for (DayOfWeek s : weekdayOptimism.keySet()) {\n LinkedList<Double> positives = weekdayOptimism.get(s);\n int size = positives.size();\n double total = 0;\n for (double d : positives) {\n total += d;\n }\n System.out.println(s + \", positivity = \" + total / size);\n }\n \n System.out.println(\"\\nAverage negativity for WEEKDAYS:\");\n for (DayOfWeek s : weekdayPessimism.keySet()) {\n LinkedList<Double> negatives = weekdayPessimism.get(s);\n int size = negatives.size();\n double total = 0;\n for (double d : negatives) {\n total += d;\n }\n System.out.println(s + \", negativity = \" + total / size);\n }\n \n System.out.println(\"\\n-----------------------------------------------------------\\n\");\n \n }",
"private interface IPsi {\n public double f(int n);\n }",
"public void computeParagraph(){\r\n\r\n\t\tstrBuff = new StringBuffer();\r\n\r\n\t\t//For else for ER2 rule of inserting the first letter of my last name twice before each consonant\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\r\n\t\t\tif(paragraph.charAt(i) == 'a' || paragraph.charAt(i) == 'e' || paragraph.charAt(i) == 'i'\r\n\t\t\t\t|| paragraph.charAt(i) == 'o' || paragraph.charAt(i) == 'u' || paragraph.charAt(i) == 'A'\r\n\t\t\t\t|| paragraph.charAt(i) == 'E' || paragraph.charAt(i) == 'I' || paragraph.charAt(i) == 'O'\r\n\t\t\t\t|| paragraph.charAt(i) == 'U' || paragraph.charAt(i) == ' ' || paragraph.charAt(i) == '.'\r\n\t\t\t\t|| paragraph.charAt(i) == '!' || paragraph.charAt(i) == '?'){\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\r\n\t\t\telse{\r\n\t\t\t\tstrBuff.append(\"OO\");\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tnewParagraph = strBuff.toString();\r\n\r\n\t\tcount = 0;\r\n\r\n\t\t//For for ER2 rule of counting the number of characters in the initial text excluding the number of vowels\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\t\t\tif(paragraph.charAt(i) != 'a' && paragraph.charAt(i) != 'e' && paragraph.charAt(i) != 'i'\r\n\t\t\t\t&& paragraph.charAt(i) != 'o' && paragraph.charAt(i) != 'u' && paragraph.charAt(i) != 'A'\r\n\t\t\t\t&& paragraph.charAt(i) != 'E' && paragraph.charAt(i) != 'I' && paragraph.charAt(i) != 'O'\r\n\t\t\t\t&& paragraph.charAt(i) != 'U'){\r\n\t\t\t\t\tcount++;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t}",
"public interface NoteAlg extends Alg {\n\n\t\n\t/**\n\t * Noting some hinting usage.\n\t * @return some hinting usage.\n\t */\n\tString note();\n\t\n\t\n}",
"private double equation(long n) {\n\t\treturn (4d * montoCarlo(n) / n);\n\t}",
"private int countPermuation(int n, int m){\n\t\tint res = 1;\n\t\tfor(int i = n - m + 1; i <= n; i++){\n\t\t\tres *= i;\n\t\t}\n\t\treturn res;\n\t}",
"private double solution() {\n final double h = (getTextToDouble(textX1) - getTextToDouble(textX0)) / ( 2*getTextToDouble(textN)) / 3;\n double[][] mass = xInitialization();\n double answer, evenSum = 0, oddSum = 0;\n for (int i = 0; i < 2; i++) {\n for (double element : mass[i]) {\n if (i == 0)\n oddSum += getValue(element);\n else\n evenSum += getValue(element);\n }\n }\n answer = h * (getValue(getTextToDouble(textX0)) + 4 * oddSum + 2 * evenSum + getValue(getTextToDouble(textX1)));\n return answer;\n }",
"@Override\r\n\tpublic void CalcPeri() {\n\t\tSystem.out.println(4*side);\t\r\n\t}",
"public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }",
"protected final int calculateInterst1(int pr){\n\t\t return pr*10*1/100;\n\t }",
"public static void calcularIMC(Persona p) throws NotCalculateException {\n if (p != null && p.getAltura() != 0 && p.getPeso() != 0) {\r\n double imc= p.getPeso()/Math.pow(p.getAltura(),2);\r\n \r\n if (imc<16){\r\n System.out.println(\"IMC: \" + imc + \" \" + IMCMIN_16);\r\n } else if (imc <18.5){\r\n System.out.println(\"IMC: \" + imc + \" \" + IMC16_18);\r\n } else if (imc<25){\r\n System.out.println(\"IMC: \" + imc + \" \" + IMC18_25);\r\n } else if (imc<30){\r\n System.out.println(\"IMC: \" + imc + \" \" + IMC25_30);\r\n } else {\r\n System.out.println(\"IMC: \" + imc + \" \" + IMCMAX_30);\r\n }\r\n } else {\r\n String mensaje=\"No se puede calcular el IMC\";\r\n if (p == null) {\r\n mensaje=\"Persona no definida\";\r\n }\r\n else {\r\n mensaje=\"Datos necesarios no definidos\";\r\n }\r\n throw new NotCalculateException(mensaje);\r\n }\r\n }",
"LP getLp();",
"public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }",
"public static void show(Petrinet pn) {\n\t\tint[] M_i = pn.getM();\n\t\tint curr_places = pn.numberOfPlaces();\n\t\tJDDConsole.out.print(\"M_i = [\");\n\t\tfor(int i = 0; i < curr_places; i++) {\n\t\t\tif(i != 0) JDDConsole.out.print(\", \");\n\t\t\tJDDConsole.out.print( \"\" + M_i[i]);\n\t\t}\n\t\tJDDConsole.out.println(\"]\");\n\n\t\tJDDConsole.out.println(\"A-\"); pn.getAMinus().show();\n\t\tJDDConsole.out.println(\"A+\"); pn.getAPlus().show();\n\t}",
"public static List<Node> getPIs(Node n) {\n // If there are any children, visit each one\n List<Node> result = new ArrayList<>(10);\n Node nod = n.getFirstChild();\n while (nod != null) {\n if (nod.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {\n result.add(nod);\n } else {\n result.addAll(getPIs(nod));\n }\n nod = nod.getNextSibling();\n }\n return result;\n }",
"public double[] Interpolasi(Matriks input, int n, double x){\r\n\t\tdouble[] result = new double[n+2]; // Menyimpan koefisien polinom hasil interpolasi polinom dan hasil taksiran pada indeks terakhir\r\n\t\tMatriks M = new Matriks(n+1, n+2);\r\n\t\tint l = 0;\r\n\t\tint m = 0;\r\n\r\n\t\t// Mengubah masukan menjadi matriks augmented\r\n\t\tfor(int i=0; i<n+1; i++){\r\n\t\t\tfor(int j=0; j<n+2; j++){\r\n\t\t\t\tif(j==n+1){\r\n\t\t\t\t\tM.Elmt[i][j] = input.Elmt[l++][1];\r\n\t\t\t\t} else if(j==0){\r\n\t\t\t\t\tM.Elmt[i][j] = 1;\r\n\t\t\t\t} else{\r\n\t\t\t\t\tM.Elmt[i][j] = 1;\r\n\t\t\t\t\tfor(int k=0; k<j; k++){\r\n\t\t\t\t\t\tM.Elmt[i][j] *= input.Elmt[m][0];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm++;\r\n\t }\r\n\t\t\r\n\t\tdouble[] polinom = Matriks.Gauss(M);\r\n\r\n\t\tdouble taksiran = polinom[0];\r\n\r\n\t\t// Menghitung nilai taksiran dari hasil interpolasi polinom\r\n\t\tfor(int i=1; i<n+1; i++){\r\n\t\t\tdouble temp = x;\r\n\t\t\tfor(int j=1; j<i; j++){\r\n\t\t\t\ttemp *= x;\r\n\t\t\t}\r\n\t\t\ttaksiran += polinom[i] * temp;\r\n\t\t}\r\n\r\n\t\tfor(int i=0; i<n+1; i++){\r\n\t\t\tresult[i] = polinom[i];\r\n\t\t}\r\n\t\tresult[n+1] = taksiran;\r\n\t\treturn result;\r\n\t}",
"public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }",
"Value getInterpretation();",
"public abstract int getGuideSchematics();",
"public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}",
"public abstract void overallConcepts(long ms, int n);",
"public abstract int preN();",
"private double binomeN_I(int n, int i) {\n double ni;\n double a1 = factorial(n);\n double a2 = factorial(i);\n double a3 = factorial(n - i);\n ni = a1 / (a2 * a3);\n return ni;\n }",
"public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }",
"public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public void test2 (List<List<String>> sentences) {\n double totalLogProb = 0;\n double totalNumTokens = 0;\n for (List<String> sentence : sentences) {\n totalNumTokens += sentence.size();\n double sentenceLogProb = sentenceLogProb2(sentence);\n totalLogProb += sentenceLogProb;\n }\n double perplexity = Math.exp(-totalLogProb / totalNumTokens);\n System.out.println(\"Word Perplexity = \" + perplexity );\n }",
"private Proof notDivides(int n, int m, Expression expression) {\n Expression litMPrev = intToLit(m - 1); //[m - 1]\n if (n == 0) {\n return notDividesBase(expression, litMPrev); //|- 0 * z = [m - 1]\n }\n Variable x = var(\"x\");\n Expression litN = intToLit(n); //[n]\n Proof noDivi0 = notMulZero(litN, litMPrev); //![n] * 0 = [m]\n Expression litM = intToLit(m); //[m]\n Expression not = not(equal(multi(litN, x), litM)); //![n] * x = [m]\n Proof nextStep = notDividesInductionStep(n, m, x); //![n] * x' = [m]\n Proof imWeak = implLeftWeakness(not, nextStep); //![n] * x = [m] -> ![n] * x' = [m]\n return inductConclusion(x, expression, noDivi0, imWeak); //![n] * 0 = [m] & @z(![n] * x = [m] -> ![n] * x' = [m]) -> !([n] * x = [m])\n }",
"@Override\n public void print() {\n for (int i = 1; i <= itertion; i++) {\n if(n <0){\n this.result = String.format(\"%-3d %-3s (%-3d) %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }else {\n this.result = String.format(\"%-3d %-3s %-3d %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }\n }\n }",
"public int get_num_p(){ return num_p; }",
"String getProcessingInstructionData(Object pi);",
"public abstract int mo9749n();",
"String notes();",
"public void extractKnowledge()\n {\n }",
"@Override\n public String getDescription(){\n return \"Spanning tree algorithm using LCO.\\n\" +\n \"Rule 1 : N(1) --- N(x) ---> F(0) --- N(x-1) \\n\" +\n \"Rule 2 : N(1) --- N(1) ---> E(0) --- F(0) \\n\";\n }",
"@Override\n\tpublic String about() {\n\t\treturn \"Calculator implemented by \"+ Authors.JSTP;\n\t}",
"public static void main(String[] args) {\r\n // int m = 6, n = 2;\r\n\r\n // int addition = m + n;\r\n // int subtract = m - n;\r\n // int multiplication = m * n;\r\n // int division = m / n;\r\n // int modulas = m % n;\r\n\r\n // n = 4;\r\n // double division1 = (double) m / n; // Typecasting\r\n // int division2 = m / n;\r\n\r\n // System.out.println(addition);\r\n // System.out.println(subtract);\r\n // System.out.println(multiplication);\r\n // System.out.println(division);\r\n // System.out.println(modulas);\r\n // System.out.println(division1);\r\n // System.out.println(division2);\r\n\r\n // System.out.println(n += m);\r\n\r\n // System.out.println(++n);\r\n // System.out.println(n++);\r\n\r\n // ++n; // pre increment\r\n // ++n; // post increment\r\n // int a = ++m;\r\n // System.out.println(a);\r\n // System.out.println(m);\r\n\r\n // int b = n++;\r\n // System.out.println(b);\r\n // System.out.println(n);\r\n\r\n }",
"String note();",
"public static void calculateNNumbersInPI(int n){\n double pi = 0;\n\n for (int i = 100000; i > 0; i--) { // the larger (i), the closer to PI\n pi += Math.pow(-1, i + 1) / (2 * i - 1);\n if (i == 1) {\n pi *= 4;\n System.out.printf(\"%.\"+n+\"f\\n\", pi);\n }\n }\n }",
"static String power (String s, int p) {\r\n if (s==errorSignature) return errorSignature;\r\n if (p==1) return s;\r\n try {\r\n StringBuffer result = new StringBuffer();\r\n char type [] = new char[1];\r\n int pos [] = new int[1];\r\n int power[] = new int[1];\r\n int index[] = new int[1];\r\n int n = eatNumber (s, pos); // <n>(..dimensionReference)\r\n result.append (n);\r\n for (int i=0; i<n; i++) {\r\n String name = eatReference (s, pos, type, power, index);\r\n char c = type[0]; // 'D' or 'W' ...\r\n result.append (c);\r\n if (c=='D') {result.append (p*power[0]).append (name). append (';');}\r\n else if (c=='W') {result.append (p*power[0]).append ('V' ).append (index[0]).append (';');}\r\n else {throw new RuntimeException ();}\r\n }\r\n return result.toString();\r\n }\r\n catch (RuntimeException e) {\r\n throw new RuntimeException (\"INTERNAL ERROR: illegal dimension signature: \"+s);\r\n }\r\n }",
"public abstract void substitutedConcepts(long ms, int n);",
"@Override\n public void pp(){\n PP=3+2*nivel;\n }",
"private int h2(int p){\n\t\tdouble A = (Math.sqrt(5) - 1) / 2;\n\t\treturn (int) Math.abs(this.table.length * ((p * A) - (int)(p * A))) % table.length;\n\t}",
"public static void main(String[] args) {\n\n\n\n double numberOfgallons = 5;\n\n double gallonstolitter = numberOfgallons*3.785;\n\n\n String result = numberOfgallons + \" gallons equal to: \"+gallonstolitter+ \" liters\";\n System.out.println(result);\n\n //=============================================\n /* 2. write a java program that converts litters to gallons\n 1 gallon = 3.785 liters\n 1 litter = 1/3.785\n*/\n\n /*double litter1 = 1/3.785;\n double l =10;\n double gallon1 = l*litter1;\n\n System.out.println(gallon1);\n //======================================================\n*/\n /*\n 3. manually calculate the following code fragements:\n\t\t\t\t1. int a = 200;\n\t\t\t\t\tint b = -a++ + - --a * a-- % 2\n\t\t\t\t\tb = ?\n\n */\n\n\n double numberOfLiters = 100;\n\n double LiterstoGallons = numberOfLiters/3.785;\n\n String result2 = numberOfLiters+\" liters equal to \"+LiterstoGallons+\" galons\";\n\n System.out.println(result2);\n\n\n\n\n\n\n\n\n\n\n\n\n\n int a = 200;\n int b = -a++ + - --a * a-- % 2;\n // b = -200 + - 200* 200%2 = -200;\n\n int x = 300;\n int y = 400;\n int z = x+y-x*y+x/y;\n // z= 300+400-300*400+300/400=700-120000+0(cunki int kimi qebul edir)= -119300;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }",
"public FactorPol factorLogExpHead(FactorPol factPl , int enteringFactorInLogExp, Ring ring){\n ArrayList<Integer> numbers = new ArrayList<Integer>();\n for (int i = 0; i < factPl.multin.length; i++) {\n if( (factPl.multin[i].isItNumber()) &&\n (factPl.multin[i].Re(ring).isZero(ring) == false) &&\n (factPl.multin[i].Im(ring).isZero(ring) == false) ) {\n numbers.add(i);\n }\n }\n \n \n for (int k = 0; k < factPl.multin.length; k++) {\n Polynom poll=factPl.multin[k]; if (poll.coeffs.length==0) return FactorPol.ZERO;\n int epVar=poll.powers.length / poll.coeffs.length;\n if (epVar<ring.varNames.length) continue;\n if(poll.isItNumber())continue;\n \n \n\n// if((ring.algebra[0]&(~Ring.Complex))==Ring.Q){\n// for (int i = 0; i < poll.coeffs.length; i++) {\n// if(poll.coeffs[i] instanceof Fraction)\n// }\n// }\n boolean bool = false;\n Element poll2 = null;\n \n do {\n poll =factorL(poll, enteringFactorInLogExp, ring); \n \n \n poll= factorExpFunction(poll, enteringFactorInLogExp, ring); \n \n \n \n if(poll2 != null) {\n if(poll.subtract(poll2.multiply(factPl.multin[numbers.get(0)], ring), ring).isZero(ring)) {\n factPl.multin[k] = (Polynom) poll2;\n } else {\n factPl.multin[k]=poll;\n factPl.multin[numbers.get(0)] = new Polynom(new int[]{}, new Element[]{ring.numberONE});\n numbers.remove(0);\n }\n bool = false;\n } else if( (numbers.size() > 0) &&\n (poll.Im(ring).isZero(ring) == false) &&\n (poll.Re(ring).isZero(ring) == false) ) {\n \n poll2 = poll;\n poll = poll.multiply(factPl.multin[numbers.get(0)], ring);\n bool = true;\n } else {\n factPl.multin[k]=poll;\n bool = false;\n }\n } while(bool);\n poll2 = null;\n }\n return factPl; \n }",
"public abstract String division();",
"public String visit(Procedure n, Object argu) \r\n\t{\r\n\t\t\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\".text \\n\");\r\n\t\tMipsOutPut.add(n.f0.f0.tokenImage+\": \\n\");\r\n\t MipsOutPut.add(MipsOutPut.Space+\"sw $fp, -8($sp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"move $fp, $sp \\n\");\r\n int stackLength = (Integer.parseInt(n.f5.f0.tokenImage)+2)*4;\r\n MipsOutPut.add(MipsOutPut.Space+\"subu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"sw $ra, -4($fp) \\n\");\r\n\t\tn.f10.accept(this,argu);\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $ra, -4($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $fp, -8($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"addu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"j $ra \\n\");\r\n\t\treturn null;\r\n\t}",
"private int getCondensedIndex(int n, int i, int j) {\n if (i < j) {\n return n * i - (i * (i + 1) / 2) + (j - i - 1);\n }\n else if (i > j) {\n return n * j - (j * (j + 1) / 2) + (i - j - 1);\n }\n else{\n return 0;\n }\n }",
"public void findHarmonicNo(int n)\r\n\t {\r\n\t int harmonicNo=0;\r\n\t for(int i=1;i<=n;i++)\r\n\t {\r\n\t System.out.print(\"1\"+\"/\"+i+\"+\");\r\n\t }\r\n\t }",
"void doCalculations(){\n double out1;\n double out2;\n double out3;\n \n out1 = x + n * y - (x + n) * y;\n System.out.printf(\"If x=%s, n=%s, y=%s, then out1 = \\n\",x,n,y);\n System.out.println(out1 + \"\\n\");\n \n out2 = m / n + m % n;\n System.out.printf(\"If m=%s, n=%s, then out2 = \\n\",m,n);\n System.out.println(out2 + \"\\n\");\n \n out3 = 5 * x - n / 5;\n System.out.printf(\"If x=%s, n=%s, then out3 = \\n\",x,n);\n System.out.println(out3 + \"\\n\");\n \n \n }",
"public void math1(){\n\t\tSystem.out.println(\"The variable B has value \"+ i);\n\t}",
"public void calcP() {\r\n\t\tthis.setP(sick/people.size());\r\n\t}",
"public static void experiment2() {\n\t\tList<String> lines = FileUtil.loadFrom(\"docs/corpus-search-results-new-408.txt\");\n\t\tString cipher = Ciphers.cipher[1].cipher;\n\t\tString plain = Ciphers.cipher[1].solution;\n\t\tfor (String line : lines) {\n\t\t\tint pos = plain.indexOf(line.toLowerCase());\n\t\t\tif (pos < 0) System.out.println(\"Could not find \" + line + \" in plaintext\");\n\t\t\telse {\n\t\t\t\tString sub = cipher.substring(pos, pos+line.length());\n\t\t\t\tInfo info = new Info(sub, 0);\n\t\t\t\tSystem.out.println(line + \", \" + sub + \", \" + info.probability);\n\t\t\t}\n\t\t}\n\t}",
"public static void p_show_info_program() {\n System.out.println(\"╔══════════════════════════════╗\");\n System.out.println(\"║ SoftCalculator V1.2 ║\");\n System.out.println(\"║ Oscar Javier Cardozo Diaz ║\");\n System.out.println(\"║ 16/04/2021 ║\");\n System.out.println(\"╚══════════════════════════════╝\");\n }",
"public int nrOfExpressions();",
"public static String getQuestion() {\n\t\treturn \"3) A line in the xy-plane passes through the origin and has a slope of 1/7. Which of \\\\n\"+\"the following points lies on the line?\";\n\t}",
"public String makeUpMetaphysics() {\n\t\treturn \"Yes I know what I'm talking about and I understand existence more than everyone else. As \"\n\t\t\t\t+ \"you can see I wrote all these books: \" + books + \". I am truly the wokest being alive.\";\n\t}",
"public static BigInteger getPent(int i)\n {\n\tBigInteger bii = new BigInteger(\"\"+i);\n BigInteger tmp = bii;\n tmp = tmp.multiply(bi3);\n tmp = tmp.add(bim1);\n tmp = tmp.multiply(bii);\n\ttmp = tmp.divide(bi2); //i*(3*i - 1)/2\n\treturn tmp;\n }",
"private double calc_e_order_n(int il) {\n\t\tint j;\n\t\tdouble dr2,newe,store_cut,pot;\n\t\t\n\t\tstore_cut = pot_cut_off;\n\t\tpot_cut_off = 1.0e20;\n\t\tpot_cut_off2 = pot_cut_off*pot_cut_off;\n\t\tnewe = 0.0;\n\t\tfor(j=0; j<n; j++) {\n\t\t\tif ( j != 0 ) {\n\t\t\t\tdr2 = ij_sep2(0,j,il,CUR_POS);\n\t\t\t\tpot = ij_inter_act(dr2,0,j,il);\n\t\t\t\tnewe += pot;\n\t\t\t}\n\t\t}\n\t\tpot_cut_off = store_cut;\n\t\tpot_cut_off2 = pot_cut_off*pot_cut_off;\n\t\t\n\t\treturn(newe);\n\t}",
"public void emissionProbabilities() {\r\n /**\r\n * Word and Tag List.\r\n */\r\n final TreeSet<String> words = new TreeSet(), tags = new TreeSet();\r\n Iterator<Kata> iterSatu = MarkovCore.LIST_KATA.iterator();\r\n while (iterSatu.hasNext()) {\r\n final Kata kata = iterSatu.next();\r\n words.add(kata.getKata());\r\n tags.add(kata.getTag());\r\n }\r\n System.out.println(\"Jumlah Kata: \" + words.size());\r\n System.out.println(\"Jumlah Tag: \" + tags.size());\r\n System.out.println();\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Emissions Calculation\">\r\n /**\r\n * Perhitungan Emisi.\r\n */\r\n Iterator<String> iterDua = words.iterator();\r\n while (iterDua.hasNext()) {\r\n final String kata = iterDua.next();\r\n Iterator<String> iterTiga = tags.iterator();\r\n while (iterTiga.hasNext()) {\r\n final StrBuilder strBuilder = new StrBuilder(10);\r\n final String tag = iterTiga.next();\r\n strBuilder.append(\"P(\");\r\n strBuilder.append(kata + \"|\");\r\n strBuilder.append(tag + \") = \");\r\n final Emissions emissions = new Emissions(kata, tag, strBuilder.toString());\r\n emissionses.add(emissions);\r\n }\r\n }\r\n\r\n final HashMap<String, Double> penyebut = new HashMap();\r\n Iterator<Kata> iterEmpat = MarkovCore.LIST_KATA.iterator();\r\n while (iterEmpat.hasNext()) {\r\n final Kata kata = iterEmpat.next();\r\n if (penyebut.get(kata.getTag()) == null) {\r\n penyebut.put(kata.getTag(), 1.0);\r\n } else {\r\n penyebut.put(kata.getTag(), penyebut.get(kata.getTag()) + 1);\r\n }\r\n }\r\n\r\n Iterator<Emissions> iterTiga = emissionses.iterator();\r\n while (iterTiga.hasNext()) {\r\n final Emissions emissions = iterTiga.next();\r\n double pembilang = 0.0;\r\n Iterator<Kata> iterKata = MarkovCore.LIST_KATA.iterator();\r\n while (iterKata.hasNext()) {\r\n Kata kata = iterKata.next();\r\n if (StringUtils.equalsIgnoreCase(kata.getKata(), emissions.word) && StringUtils.equalsIgnoreCase(kata.getTag(), emissions.tag)) {\r\n pembilang++;\r\n }\r\n }\r\n\r\n /**\r\n * WARNING - Laplace Smoothing is Activated.\r\n */\r\n// emissions.setEmissionsProbability(pembilang + 1, penyebut.get(emissions.tag) + this.uniqueWords.size(), (pembilang + 1) / (penyebut.get(emissions.tag) + this.uniqueWords.size()));\r\n emissions.setEmissionsProbability(pembilang, penyebut.get(emissions.tag), pembilang / penyebut.get(emissions.tag));\r\n }\r\n//</editor-fold>\r\n\r\n// System.out.println(emissionses.size());\r\n Iterator<Emissions> emissionsIterator = emissionses.iterator();\r\n while (emissionsIterator.hasNext()) {\r\n final Emissions emissions = emissionsIterator.next();\r\n this.emissionsMap.put(new MultiKey(emissions.word, emissions.tag), emissions.emissionsProbability);\r\n// System.out.println(emissions);\r\n }\r\n// System.out.println(this.emissionsMap.size());\r\n }",
"void calculatePR( int iteration){\n\t\t\n\t\ttotal_nodes = inlinks.size();\n\t\tfor(String page : inlinks.keySet()){\n\t\t\tPageRank.put(page, (1/(double)(total_nodes)));\n\t\t\tinit_PageRank.put(page, (1/(double)(total_nodes)));\n\t\t}\n \n double ppx = 0.0;\n boolean cond = true;\n int itr =1;\n // while(iteration >0){ //Used for Graph page rank calculation; c\n while(cond){ \n \tSystem.out.println(\"Iteration\"+itr); \n double sinkPR = 0;\n for(String s: sink){\n \tsinkPR = sinkPR + (PageRank.get(s)); //calculate total sink PR\n }\n \n double entropy = 0.0;\n \n for(String s: PageRank.keySet()){\n \tdouble newPR;\n \tnewPR = (1.0 -d)/total_nodes;\n \tnewPR = newPR + (d*sinkPR)/total_nodes;\n \tSet<String> in = inlinks.get(s); //pages pointing to P\n \tif(in != null){\n \t\tfor(String s1 : in){\n \t\t\tnewPR = newPR + d* (PageRank.get(s1)/outlinks_count.get(s1)); \t\t \n \t\t}\n \t} \n \t\tnew_PageRank.put(s, newPR);\n \t\tentropy = entropy + (newPR*(Math.log(newPR)/Math.log(2))); //entroPy calculation\n \t}\n \n PageRank.putAll(new_PageRank);\n ppx = Math.pow(2,-1*entropy);\n System.out.println(\"perplexity : \"+ ppx);\n ppx_list.add(ppx);\n if(ppx_list.size()>5) \n \tcond= !check(4);\n \n itr++;\n \t\n //\t iteration --; //Used for page Rank Calculation of Graph\n } \n\t}",
"private int d(final int n) {\r\n Set<Long> set = new Factors(n).getProperDivisors();\r\n long sum = 0;\r\n for (long i : set) {\r\n sum += i;\r\n }\r\n return (int) sum;\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}",
"public static void relprecision() throws IOException \n\t{\n\t \n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\eclipse64\\\\data\\\\labeled_titles.txt\");\n\t // File fFile = new File(\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelation\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL());\n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\t//trainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tList<String> statements= new ArrayList<String>() ;\n\t\tList<String> notstatements= new ArrayList<String>() ;\n\t\tDouble TPcount = 0.0 ; \n\t\tDouble FPcount = 0.0 ;\n\t\tDouble NonTPcount = 0.0 ;\n\t\tDouble TPcountTot = 0.0 ; \n\t\tDouble NonTPcountTot = 0.0 ;\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tif (title.contains(\"<YES>\") || title.contains(\"<TREAT>\") || title.contains(\"<DIS>\") || title.contains(\"</\"))\n\t\t\t{\n\t\t\t\n\t\t\t\tBoolean TP = false ; \n\t\t\t\tBoolean NonTP = false ;\n\t if (title.contains(\"<YES>\") && title.contains(\"</YES>\"))\n\t {\n\t \t TP = true ; \n\t \t TPcountTot++ ; \n\t \t \n\t }\n\t else\n\t {\n\t \t NonTP = true ; \n\t \t NonTPcountTot++ ; \n\t }\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\ttitle = title.replaceAll(\"<YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<DIS>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</DIS>\", \" \") ;\n\t\t\t\ttitle = title.toLowerCase() ;\n\t\n\t\t\t\tcount++ ; \n\t\n\t\t\t\t// get the goldstandard concepts for current title \n\t\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\t\n\t\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\t\n\t\t\t\t// get the concepts \n\t\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\t\n\t\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,dataset.FILE_NAME_Patterns) ;\n\t\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t\t{\n\t\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelationdisc\") ;\n\t\t\t\t\t\n\t\t\t if (TP )\n\t\t\t {\n\t\t\t \t TPcount++ ; \n\t\t\t \t \n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t FPcount++ ; \n\t\t\t }\n\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t notstatements.add(title) ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}",
"String getInstructions();",
"public abstract int mo12574RN(int i);",
"public boolean seriesPatt(int n){\n\n for(int i=1;i<=n;i++){\n for(int j=1;j<=i;j++){\n System.out.print(i+\" \");\n }\n //System.out.println();\n }\n return true;\n }",
"public static void main (String [] args) throws IOException {\n\t\tScanner s = new Scanner(new FileReader(\"fact4.in\"));\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"fact4.out\")));\n\t\tint n = s.nextInt();\n\t\tint numzeroes = n/5 + n/25 + n/125 + n/625 + n/3125;\n\t\tint result = 1;\n\t\tint counter1 =0;\n\t\twhile(n>0){\n\t\t\tif(n%5 ==0){\n\t\t\t\tint temp = n;\n\t\t\t\twhile(temp%5 ==0){\n\t\t\t\t\ttemp /=5;\n\t\t\t\t}\n\t\t\t\tresult = (result*temp)%10;\n\t\t\t}\n\t\t\telse if(n%2==0 && counter1 < numzeroes){\n\t\t\t\tresult = (result*(n/2))%10;\n\t\t\t\tcounter1++;\n\t\t\t}else{\n\t\t\t\tresult = (result*n)%10;\n\t\t\t}\n\t\t\tn--;\n\t\t}\n\t\tout.println(result);\n\t\tout.close(); \n\t}",
"private static int get_number(int i, int j) { n n!\n// C = _____________\n// r (n-r)! * r!\n//\n return factorial(i)/(factorial(i-j)* factorial(j));\n }",
"public abstract int mo8526p();",
"public GrapheIndicateursProjet (Projet p) {\n seuils = p.getSeuilFixes() ;\n \n // pour l'echelle, on determine les mesures max de toutes les iterations\n \n \n iterations = p.getListeIt() ; \n nbIt = iterations.size() ;\n \n // calcul des maximums\n Iteration tempIt = null ;\n IndicateursIteration tempIndIt = null ;\n for (int i = 0 ; i < nbIt ; i++)\n {\n if (iterations.get(i) instanceof Iteration)\n {\n tempIt = (Iteration)iterations.get(i) ;\n tempIndIt = tempIt.getIndicateursIteration() ;\n // charges\n if (tempIndIt.getTotalCharges() > chargesMax) { chargesMax = tempIndIt.getTotalCharges() ; }\n\t\tif (tempIndIt.getChargeMoyenneParticipants() > moyenneChargesMax) { moyenneChargesMax = tempIndIt.getChargeMoyenneParticipants() ; }\n\t\tif (tempIndIt.getNombreParticipants() > participantsMax) { participantsMax = tempIndIt.getNombreParticipants() ; }\n\t\tif (tempIndIt.getNombreTachesTerminees() > tachesTermineesMax) { tachesTermineesMax = tempIndIt.getNombreTachesTerminees() ; }\n\t\tif (tempIndIt.getNombreMoyenTachesParticipants() > tachesParticipantsMax) { tachesParticipantsMax = tempIndIt.getNombreMoyenTachesParticipants() ; }\n\t\tif (tempIndIt.getDureeMoyenneTaches() > dureeMoyenneTacheMax) { dureeMoyenneTacheMax = tempIndIt.getDureeMoyenneTaches() ; }\n }\n }\n setPreferredSize(new Dimension(ITERATION_WIDTH * nbIt,440));\n\t//setBorder(new TitledBorder(new EtchedBorder(), \"toto\", 5, TitledBorder.ABOVE_TOP)) ;\n }",
"abstract int estimationParameter1();",
"abstract void findPerimeter();",
"static void setExample(int n) throws Exception {\n int j=n-1;\n PetriNet net = new PetriNet(n);\n PetriNet.setNet(net);\n \n int[] eins=new int[n]; \n Arrays.fill(eins, 1);\n m0 = new Marking(eins);\n \n int[] zwei=new int[n]; \n Arrays.fill(zwei, 2); \n mF = new Marking(zwei);\n \n for (int i = 0; i < n; i++) {\n int[] tmin = new int[n]; \n int[] tdelta = new int[n]; \n Arrays.fill(tmin, 1);\n Arrays.fill(tdelta, -1); \n tdelta[i]=n-1;\n if(i==j) tdelta[i]=n;\n PNTransition t = new PNTransition(tmin, tdelta);\n net.addTransition(t);\n }\n int[] temp=new int[n]; \n Arrays.fill(temp, -n-1); \n temp[j]=-n;\n Inequality ineq=new Inequality(temp);\n boolean findC = ineq.findC();\n System.out.println(\"check-k for: \"+n+\": \"+findC);\n System.out.println(ineq.toString());\n\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Welcome to Java\");\r\n\t\t\r\n\t\t//1.2\r\n\t\tSystem.out.println(\"Programming is fun\");\r\n\t\tSystem.out.println(\"Fundementals First\");\r\n\t\tSystem.out.println(\"Problem Driven\");\r\n\t\t\r\n\t\t//1.3\r\n\t\tSystem.out.print(\"(10.5 + 2 * 3) / (45-3.5) = \");\r\n\t\tSystem.out.println( (10.5 + 2 * 3) / (45-3.5) );\r\n\t\t\r\n\t\t//1.6\r\n\t\tSystem.out.print(\"Celsius 35 is Fahrenheit degree \");\r\n\t\tSystem.out.println((9 / 5) * 35 + 32);\r\n\t\t\r\n\t\tSystem.out.println((9 / 5));\r\n\t\t\r\n\t\t//\tPROGRAMMING EXERCISES\r\n\t\t \r\n\t\t//1.1\tDISPLAY SOME MESSAGES\r\n\t\tSystem.out.println(\"Welcome to Java, Learning Java now, \"\r\n\t\t\t\t+ \"Programming is fun\");\r\n\t\t\r\n\t\t//1.2 Display a message 5 times\r\n\t\tSystem.out.println(\"I love JAVA\");\r\n\t\tSystem.out.println(\"I love JAVA\");\r\n\t\tSystem.out.println(\"I love JAVA\");\r\n\t\tSystem.out.println(\"I love JAVA\");\r\n\t\tSystem.out.println(\"I love JAVA\");\r\n\t\t\r\n\t\t//1.3 Display that\r\n\t\t\r\n\t\tSystem.out.println(\" J \");\r\n\t\tSystem.out.println(\"J aaa v vaaa\");\r\n\t\tSystem.out.println(\"J J aa v v a a\");\r\n\t\tSystem.out.println(\"J aaaa v aaaa\");\r\n\t\t\r\n\t\t//1.4 Print table\r\n\t\tSystem.out.println(\"a\t\ta^2\t\ta^3\t\ta^4\");\r\n\t\tSystem.out.println(\"1\t\t1\t\t1\t\t1\");\r\n\t\tSystem.out.println(\"2\t\t4\t\t8\t\t16\");\r\n\t\tSystem.out.println(\"3\t\t9\t\t27\t\t81\");\r\n\t\tSystem.out.println(\"4\t\t16\t\t64\t\t256\");\r\n\t\t\r\n\t\t//1.5 compute expressions\r\n\t\tSystem.out.print(\"(7.5 * 6.5 - 4.5 * 3) / (47.5 - 5.5) = \");\r\n\t\tSystem.out.println( (7.5 * 6.5 - 4.5 * 3) / (47.5 - 5.5) );\r\n\t\t\r\n\t\t\r\n\t\t//1.6 Summation of a series n(n+1)/2\r\n\t\t\r\n\t\tSystem.out.println(\"1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = \");\r\n\t\tSystem.out.println(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 );\r\n\t\t\r\n\t\t//1.7 Approximate PI\r\n\t\t// computer says 1/3 = 0\r\n\t\tSystem.out.println(\" PI = 4 * (1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11)\");\r\n\t\tSystem.out.println(4 * (1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11));\r\n\t\t\r\n\t\t//1.8 Area and perimeter of a circle\r\n\t\t\r\n\t\tSystem.out.println(\"Perimeter = \" + 2 * 6.5 * 3.14159);\r\n\t\tSystem.out.println(\"Area = \" + 6.5 * 6.5 * 3.14159);\r\n\t\t\r\n\t\t//1.9 Area and perimeter of a rectangle\r\n\t\t\r\n\t\tSystem.out.println(\"Area = \" + 5.3 * 8.6);\r\n\t\tSystem.out.println(\"Perimeter = \" + 2 * (5.3 + 8.6));\r\n\t\t\r\n\t\t//1.10 Average speed in miles\r\n\t\t//average speed = total distance / time\r\n\t\t\r\n\t\t//km to mile 15 km how many mile? 9.32 miles\r\n\t\t\r\n\t\tSystem.out.println(\"Average speed is = \" + (15 / 1.6) / (50/ 60));\r\n\t\t//15 / 1.6) / (50/ 60) -------> (50/ 60) smaller than 1 so our programs see it is 0\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// 1.11\tPopulation \r\n\t\t//births = 365*24*60*60 / 7 +\r\n\t\t//deaths = 365*24*60*60 /13 -\r\n\t\t//immigrant = 365*24*60*60 / 45 +\r\n\t\t//Current population is 312 032 486\r\n\t\t\r\n\t\tSystem.out.println(\"2021 Population = \" + (312032486 + \r\n\t\t\t\t(365*24*60*60 / 7) - 365*24*60*60 /13 + 365*24*60*60 / 45));\r\n\t\tSystem.out.println(\"2022 Population = \" + (314812582 + \r\n\t\t\t\t(365*24*60*60 / 7) - 365*24*60*60 /13 + 365*24*60*60 / 45));\r\n\t\tSystem.out.println(\"2023 Population = \" + (317592678 + \r\n\t\t\t\t(365*24*60*60 / 7) - 365*24*60*60 /13 + 365*24*60*60 / 45));\r\n\t\tSystem.out.println(\"2024 Population = \" + (320372774 + \r\n\t\t\t\t(365*24*60*60 / 7) - 365*24*60*60 /13 + 365*24*60*60 / 45));\r\n\t\tSystem.out.println(\"2025 Population = \" + (323152870 + \r\n\t\t\t\t(365*24*60*60 / 7) - 365*24*60*60 /13 + 365*24*60*60 / 45));\r\n\t\t\r\n\t\t//or\t\t\r\n\t\tSystem.out.println(\"Every year = \" + (\r\n\t\t\t\t(365*24*60*60 / 7) - 365*24*60*60 /13 + 365*24*60*60 / 45));\r\n\t\tSystem.out.println(\"2021 Population = \" + (312032486 + 2780096));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static int p(int i)\n {\n return (i - 1) / 2;\n }",
"public static void main(String[] args) {\n\t\tDemo d = new Demo();\n\t\tinferenceEngine inf = new inferenceEngine();\n\t\td.takeInput(inf);\n\t\t// while writing the output check the number of input statements and the one's\n\t\t// left to prove and perform a sanity check to see if same number of statements\n\t\t// are written to output file\n\t\t\n\t\t//how to detect an infinite loop? refer pdf\n\t\t\n\t\t//\n\t\t\n//\t\tSystem.out.print(\"\\nIn Inference engine\\n\"+ inf.toString());\n\t\tpredicate q = new predicate();\n//\t\tArrayList<String> arguments = new ArrayList();\n\t\tq.name=\"~P\";\n\t\tq.arguments.add(\"Joe\");\n\t\tq.arguments.add(\"Mary\");\n//\t\targuments.add(\"z\");\n\n//\t\tq.arguments = arguments;\n//\t\tq.testRunSet(\"OmAmma\", arguments);\n\t\t//System.out.println(inf.negateQuery(q).toString());\n///*sc*/\t\tsentence s3 = sentence.copySentence(inf.knowledgeBase.sentenceslist.get(2));\n\n//sc\t\tsentence s4 = sentence.copySentence(inf.knowledgeBase.sentenceslist.get(5));\n//\t\tHashMap<String, String> substitutionMap = new HashMap(); \n//\t\tsubstitutionMap.put(\"x4\", \"Charlie\");\n//\t\tsubstitutionMap.put(\"y4\", \"Billy\");\n//\t\tsubstitutionMap.put(\"x5\", \"Charlie\");\n//\t\tsubstitutionMap.put(\"y5\", \"Billy\");\n//\t\tsubstitutionMap.put(\"z5\", \"Liz\");\n//\t\tsubstitutionMap.put(\"z5\", \"x6\");\n//\t\tSystem.out.println(substitutionMap);\n//\t\tSystem.out.println(\"My first predicate \"+ inf.knowledgeBase.sentenceslist.get(0).predicatelist.get(0));\n//\t\tSystem.out.println(\"My second predicate \"+ inf.knowledgeBase.sentenceslist.get(2).predicatelist.get(0));\n//\t\tpredicate p1 = new predicate();\n//\t\tpredicate p2 = new predicate();\n//\t\tp1.name = p2.name = \"Amma\" ;\n//\t\tp1.arguments.add(\"AB\");\n//\t\tp1.arguments.add(\"y\");\n//\t\tp1.arguments.add(\"s\");\n//\t\tp2.arguments.add(\"z\");\n//\t\tp2.arguments.add(\"Hello\");\n//\t\tp2.arguments.add(\"t\");\n//\t\tinf.checkPredicate(p1, p2, substitutionMap);\n//\t\tSystem.out.println(\"Original sentence is\"+s.toString());\n//\t\tsentence copy =sentence.copySentence(s);\n//\t\tcopy.predicatelist.get(0).arguments.add(\"x\");\n//\t\tSystem.out.println(\"Copy sentence \"+copy.toString());\n//\t\t\t\tSystem.out.println(\"The first negated query is\\n\"+ s.toString());\n\t//\tSystem.out.println(\"The value of 1st resolution is\");\n\t\t//boolean set = inf.Resolution(s);\n//\t\tsentence ab = inf.merge(inf.knowledgeBase.sentenceslist.get(4), inf.knowledgeBase.sentenceslist.get(5), inf.knowledgeBase.sentenceslist.get(4).predicatelist.get(1));\n//\t\tSystem.out.println(\"The resolved sentence now is \\n\"+ab.toString());\n//\t\tSystem.out.println(\"The substitutioin map\\n\"+substitutionMap);\n//\t\tSystem.out.println(\"The sentence passed is\\n\"+s.toString());\n//\t\tinf.applySubstitution(s, substitutionMap);\n//\t\tSystem.out.println(\"Hi the substituted sentence \\n\"+ s.toString());\n//\t\tArrayList<String> A = new ArrayList();\n//\t\tSystem.out.println(A.size());\n//\t\tSystem.out.println(\"The third sentence is \\n\"+s3);\n//\t\tSystem.out.println(\"The fourth sentence is \\n\"+s4);\n//\t\tinf.merge(s3, s4, substitutionMap);\n\t\tsentence s = new sentence();\n\t\ts.predicatelist.add(inf.queryList.get(0));\n//\t\tSystem.out.println(inf.queryList.get(0).toString());\n//\t\tHashMap<String, String> theta = inf.copyHashMap(substitutionMap);\n//\t\ttheta.put(\"Om\", \"Amma\");\n//\t\tSystem.out.println(\"Map = \"+substitutionMap+\"\\nTheta = \"+theta);\n//\t\ttheta = inf.Unify(s, inf.knowledgeBase.sentenceslist.get(5), theta);\n//\t\tSystem.out.println(\"The Theta mapping is \"+ theta);\n//\t\tSystem.out.println(q.toString());\n//\t\tSystem.out.println(s3.toString());\n//\t\tSystem.out.println(s3.contains(q));\t\n//\t\tSystem.out.println(\"Start here!\"+ inf.queryList.get(0));\n//\t\tSystem.out.println(inf.knowledgeBase.toString());\n\t\tboolean b[] = d.runResolution(inf);\n//\t\tSystem.out.println(\"My first Query \"+ b);\n\t\t\n\t\td.writeOutput(b);\n\t\t\n\t}",
"public static void main(String[] args) {\n System.out.println(\"1.1\");\n System.out.println(\"Welcome to java\");\n System.out.println(\"Learning java now\");\n System.out.println(\"Programming is fun\");\n\n // Kapitel3.opgave 1.2 (display 5 messages)\n System.out.println(1.2);\n int i = 0;\n while (i <= 4) {\n System.out.println(\"I love java\");\n i++;\n }\n // Kapitel3.opgave 1.4 (print a table)\n System.out.println(\"1.4\");\n System.out.println(\"a a^2 a^3 a^4\");\n System.out.println(\"1 1 1 1\");\n System.out.println(\"2 4 8 16\");\n System.out.println(\"3 9 27 81\");\n System.out.println(\"4 16 64 256\");\n\n // Kapitel3.opgave 1.5\n System.out.println(1.5);\n System.out.print(\"(7.5 * 6.5 - 4.5 * 3)/(47.5 - 5.5 ) = \");\n System.out.println((7.5 * 6.5 - 4.5 * 3)/(47.5 - 5.5));\n\n // Kapitel3.opgave 1.6\n System.out.println(\"1.6\");\n System.out.print(\"1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = \");\n System.out.println(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10);\n\n //Kapitel3.opgave 1.12\n System.out.println(\"1.12\");\n // vi skal omskrive miles til kilometer\n System.out.println(\"Miles to kilometers is \" + (24 * 1.6));\n // vi skal omskrive 1 time 40 min og 35 sek til sekunder\n System.out.println(\"Number of hour in fraction is \" + ((60 * 60) + (40 * 60) + 35)/ (60.0 * 60));\n\n System.out.println(\"he ran \" + (38.400000000000006 / 1.676388888888889 ) + \" kilometers per hour\");\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tPI(n);\n\t\t\n\n\t}",
"protected Score compose() {\r\n // Simple example composition\r\n Phrase phrase = new Phrase();\r\n Score s = new Score(new Part(phrase));\r\n //for(int i = 0; i < 8; i++) {\r\n Note n = new Note (48 + (int)(Math.random() * variableA), 0.5 + variableB * 0.25);\r\n phrase.addNote(n);\r\n //}\r\n \r\n //Instrument[] tempInsts = {new SineInst(44100)};\r\n //insts = tempInsts;\r\n return s;\r\n }",
"public static void main(String[] args) {\n Homework1 hw1 = new Homework1();\n\n System.out.println(\"===Problem 1===\");\n hw1.problem1();\n\n System.out.println(\"===Problem 2===\");\n System.out.println(hw1.topInt(1.5));\n System.out.println(hw1.topInt(5.1));\n System.out.println(hw1.topInt(1.0));\n System.out.println(hw1.topInt(-4.2));\n\n\n System.out.println(\"===Problem 3===\");\n hw1.draw4x4('-');\n hw1.draw4x4('4');\n\n System.out.println(\"===Problem 4===\");\n System.out.println(hw1.citationName(\"Alastair\", \"Reynolds\"));\n System.out.println(hw1.citationName(\"Grace\", \"Hopper\"));\n\n System.out.println(\"===Problem 5===\");\n System.out.println(String.valueOf(hw1.min3(1.0, 2.0, 3.0)));\n System.out.println(String.valueOf(hw1.min3(4.0, 3.0, 2.0)));\n System.out.println(String.valueOf(hw1.min3(0.5, 0.1, 0.5)));\n \n System.out.println(\"===Problem 6===\");\n System.out.println(hw1.fibonacci(0));\n System.out.println(hw1.fibonacci(1));\n System.out.println(hw1.fibonacci(2));\n System.out.println(hw1.fibonacci(3));\n System.out.println(hw1.fibonacci(10));\n System.out.println(hw1.fibonacci(25));\n \n \n System.out.println(\"===Problem 7===\");\n //System.out.println(hw1.isPalindrome(\"racecar\"));\n //System.out.println(hw1.isPalindrome(\"cat\"));\n //System.out.println(hw1.isPalindrome(\"hannah\"));\n //System.out.println(hw1.isPalindrome(\"saippuakivikauppias\"));\n }",
"public int mirrorReflection(int p, int q) {\n int k = 1;\n while (q * k % p != 0)\n k++;\n if (q * k / p % 2 != 0)\n return k % 2 == 0 ? 2 : 1;\n return k % 2 ==0 ? -1 : 0;\n }",
"@Override\n public String toString()\n {\n if(this.powerOfIi == 0 || this.imaginaryPart == 0.0)\n {\n return (\"\" + this.realPart);\n }\n else if(this.powerOfIi != 1)\n {\n return (this.realPart + \" + \" + this.imaginaryPart + \"i^\" + this.powerOfIi);\n }\n else\n {\n return (this.realPart + \" + \" + this.imaginaryPart + \"i\");\n }\n }",
"public static void printPattern(int n){\n int c=1;\n for(int i=1;i<=(n+1)/2;i++){\n for(int j=1;j<=n;j++){\n System.out.print(c+\" \");\n c++;\n }\n c=c+n;\n System.out.println();\n }\n if(n%2==0)\n c=c-n;\n else\n c=c-3*n;\n for(int i=(n+1)/2;i<n;i++){\n for(int j=1;j<=n;j++){\n System.out.print(c+\" \");\n c++;\n }\n c=c-3*n;\n System.out.println();\n }\n\n\t}",
"private void polyInt() {\n this.polySolve();\n this.ia = this.a * (1.0 / 4.0);\n this.ib = this.b * (1.0 / 3.0);\n this.ic = this.c * (1.0 / 2.0);\n this.id = this.d;\n String int1 = null, int2 = \"\", int3 = \"\", int4 = \"\";\n int inta = 0, intb = 0, intc = 0, intd = 0;\n if (this.degree == 3) {\n int1 = \"Sf(x) = \" + this.ia + \"x^4 \";\n if (this.b == 0) {\n intb = 1;\n } else {\n if (this.b > 0) {\n int2 = \"+ \" + this.ib + \"x^3 \";\n\n } else {\n int2 = \"- \" + -this.ib + \"x^3 \";\n }\n }\n if (this.c == 0) {\n intc = 1;\n } else {\n if (this.c > 0) {\n int3 = \"+ \" + this.ic + \"x^2 \";\n } else {\n int3 = \"- \" + -this.ic + \"x^2 \";\n }\n }\n if (this.d == 0) {\n intd = 1;\n } else {\n if (this.d > 0) {\n int4 = \"+ \" + this.id + \"x \";\n } else {\n int4 = \"- \" + -this.id + \"x \";\n }\n }\n if (intb == 0 && intc == 0 && intd == 0) {\n this.integral = int1 + int2 + int3 + int4 + \"+ C\";\n }\n if (intb == 0 && intc == 0 && intd == 1) {\n this.integral = int1 + int2 + int3 + \"+ C\";\n }\n if (intb == 0 && intc == 1 && intd == 1) {\n this.integral = int1 + int2 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 1) {\n this.integral = int1 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 0) {\n this.integral = int1 + int3 + int4 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 1) {\n this.integral = int1 + int3 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 0) {\n this.integral = int1 + int4 + \"+ C\";\n }\n\n }\n if (this.degree == 2) {\n int1 = \"Sf(x) = \" + this.ib + \"x^3 \";\n if (this.c == 0) {\n intc = 1;\n } else {\n if (this.c > 0) {\n int2 = \"+ \" + this.ic + \"x^2 \";\n } else {\n int2 = \"- \" + -this.ic + \"x^2 \";\n }\n }\n\n if (this.d == 0) {\n intd = 1;\n } else {\n if (this.d > 0) {\n int3 = \"+ \" + this.id + \"x \";\n } else {\n int3 = \"- \" + -this.id + \"x \";\n }\n }\n if (intc == 0 && intd == 0) {\n this.integral = int1 + int2 + int3 + \"+ C\";\n }\n if (intc == 0 && intd == 1) {\n this.integral = int1 + int2 + \"+ C\";\n }\n if (intc == 1 && intd == 0) {\n this.integral = int1 + int3 + \"+ C\";\n }\n if (intc == 1 && intd == 1) {\n this.integral = int1 + \"+ C\";\n }\n }\n if (this.degree == 1) {\n int1 = \"Sf(x) = \" + this.ic + \"x^2 \";\n if (this.id == 0) {\n intd = 1;\n\n } else {\n if (this.id > 0) {\n int2 = \"+ \" + this.id + \"x \";\n } else {\n int2 = \"- \" + -this.id + \"x \";\n }\n }\n if (intd == 0) {\n this.integral = int1 + int2 + \"+ C\";\n } else {\n this.integral = int1 + int2 + \"+ C\";\n }\n\n }\n if (this.degree == 0) {\n this.integral = \"Sf(x) = \" + this.id + \"x + C\";\n }\n\n }",
"public interface NopComputer {\n /**\n * Return an array of values to be used as the immediate arguments\n * for the given op.\n *\n * The length of the array should match the length of {@link OpDesc#immediates}.\n * @return\n */\n public BitMatrix[] getNopValues(OpDesc op, VMState state);\n }",
"private static int fact(int n) {\n\t\tint prod = 1;\n\t\tfor (int i = 1; i <= n; prod *= i++)\n\t\t\t;\n\t\treturn prod;\n\t}",
"public static void main(String[] args) {\n int a = 2; // starting number\n int r = 2; // Common ratio\n int n = 5; // N th term to be find\n\n int curr_term;\n for (int i = 0; i < n; i++) {\n curr_term = a * (int)Math.pow(r, i);\n System.out.print(curr_term + \" \");\n }\n\n }",
"int getLikelihoodValue();",
"void mo21050ml(int i);",
"public static void main(String[] args) {\nScanner s =new Scanner(System.in);\r\nint n=s.nextInt();\r\nfor(int i=n;i>=0;i--)\r\n{ int a=n;\r\n for(int j=n;j>=i;j--)\r\n {System.out.print(a+\" \");a--;}\r\n a=a+1;\r\n for(int k=1;k<=2*i-1;k++)\r\n {System.out.print(\" \"+\" \");}\r\n if(a!=0) {\r\n for(int l=n;l>=i;l--)\r\n {System.out.print(a+\" \");a++;}\r\n }\r\n else {for(int m=1;m<=n;m++)\r\n {System.out.print(m+\" \");}\r\n }\r\n System.out.print(\"\\n\");\r\n}\r\nfor(int x=1;x<=n;x++)\r\n{ int c=n;\r\n for(int y=n;y>=x;y--)\r\n {System.out.print(c+\" \");c--;}\r\n c=c+1;\r\n for(int z=1;z<=2*x-1;z++)\r\n {System.out.print(\" \"+\" \");}\r\n for(int p=x;p<=n;p++)\r\n {System.out.print(c+\" \");c++;}\r\n \r\n\t\r\nSystem.out.print(\"\\n\");\r\n\r\n\r\n}\r\n}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"public abstract int getNFactor();",
"private static int getTotient(int n) {\n int result = n;\n for(int i=2; i*i <=n; i++) {\n if(n % i == 0) {\n while(n % i == 0) n /= i;\n result -= result/i;\n }\n }\n if(n > 1) result -= result/n;\n return result;\n }",
"public static void computeBody() {\r\n\r\n double value;\r\n String text;\r\n\r\n for (int first = 0; first < columns; first++) {\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n computeRanks(first, second);\r\n }\r\n }\r\n }\r\n\r\n text = \"\\n\";\r\n\r\n //print individual comparisons\r\n\r\n for (int first = 0; first < columns; first++) {\r\n\r\n text += \"\\n\\\\section{Detailed results for \" + algorithms[first] + \"}\\n\\n\";\r\n text += \"\\n\\\\subsection{Results}\\n\\n\";\r\n text += \"\\\\begin{table}[!htp]\\n\\\\centering\\\\small\\n\" + \"\\\\begin{tabular}{\\n\";\r\n text += \"|c|c|c|c|c|\";\r\n text += \"}\\n\\\\hline\\n\";\r\n text += \" VS & $R^{+}$ & $R^{-}$ & Exact P-value & Asymptotic P-value \\\\\\\\ \\\\hline \\n\";\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n text += algorithms[second] + \" & \" + wilcoxonRanks[first][second] + \" & \" + wilcoxonRanks[second][first] + \" & \";\r\n\r\n if (rows < 51) {\r\n value = exactPValues[first][second];\r\n if (value != 1.0) {\r\n text += value + \" & \";\r\n } else {\r\n text += \"$\\\\geq$ 0.2 & \";\r\n }\r\n } else {\r\n text += \"- & \";\r\n }\r\n\r\n value = asymptoticPValues[first][second];\r\n text += nf.format(value);\r\n text += \"\\\\\\\\ \\\\hline \\n\";\r\n }\r\n }\r\n\r\n text += \"\\n\" + \"\\\\end{tabular}\\n\" + \"\\\\caption{Results obtained by the Wilcoxon test for algorithm \" + algorithms[first] + \"}\\n\\\\end{table}\\n\";\r\n\r\n text += \"\\n\\\\subsection{Confidence intervals for Median of diferences}\\n\\n\";\r\n\r\n text += \"\\\\begin{table}[!htp]\\n\\\\centering\\\\small\\n\" + \"\\\\begin{tabular}{\\n\";\r\n text += \"|c|c|c|\";\r\n text += \"}\\n\\\\hline\\n\";\r\n text += \" $\\\\alpha$=0.90 & Confidence interval & Exact confidence \\\\\\\\ \\\\hline \\n\";\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n text += algorithms[second] + \" & \" + confidenceIntervals90[first][second] + \" & \" + nf.format(exactConfidence90[first][second]) + \"\\\\\\\\ \\\\hline \\n\";\r\n }\r\n }\r\n text += \"\\n\" + \"\\\\end{tabular}\\n\" + \"\\\\caption{Confidence intervals for algorithm \" + algorithms[first] + \" ($\\\\alpha$=0.90)}\\n\\\\end{table}\\n\";\r\n\r\n text += \"\\\\begin{table}[!htp]\\n\\\\centering\\\\small\\n\" + \"\\\\begin{tabular}{\\n\";\r\n text += \"|c|c|c|\";\r\n text += \"}\\n\\\\hline\\n\";\r\n text += \" $\\\\alpha$=0.95 & Confidence interval & Exact confidence \\\\\\\\ \\\\hline \\n\";\r\n for (int second = 0; second < columns; second++) {\r\n if (first != second) {\r\n text += algorithms[second] + \" & \" + confidenceIntervals95[first][second] + \" & \" + nf.format(exactConfidence95[first][second]) + \"\\\\\\\\ \\\\hline \\n\";\r\n }\r\n }\r\n text += \"\\n\" + \"\\\\end{tabular}\\n\" + \"\\\\caption{Confidence intervals for algorithm \" + algorithms[first] + \" ($\\\\alpha$=0.95)}\\n\\\\end{table}\\n\";\r\n text += \"\\n \\\\clearpage \\n\\n\";\r\n\r\n Files.addToFile(outputFileName, text);\r\n\r\n text = \"\";\r\n }\r\n\r\n }"
] |
[
"0.54053557",
"0.5385912",
"0.5382481",
"0.530613",
"0.52514625",
"0.52150804",
"0.5195819",
"0.5172272",
"0.5141877",
"0.5136022",
"0.51293194",
"0.51251173",
"0.51086235",
"0.5086757",
"0.5067879",
"0.5063586",
"0.4990064",
"0.4988011",
"0.4979463",
"0.49786898",
"0.4976559",
"0.49721253",
"0.49633086",
"0.49539888",
"0.4943188",
"0.49290487",
"0.4925742",
"0.4915725",
"0.49016276",
"0.48816985",
"0.487113",
"0.4867487",
"0.48665455",
"0.48650998",
"0.48632818",
"0.4857945",
"0.4856273",
"0.48458531",
"0.48453137",
"0.48424128",
"0.4838825",
"0.48325038",
"0.48214796",
"0.48154807",
"0.4800873",
"0.47953624",
"0.47862947",
"0.4785044",
"0.47747964",
"0.47713754",
"0.47708544",
"0.47656024",
"0.47652003",
"0.4765195",
"0.4758746",
"0.4757956",
"0.47541425",
"0.4753377",
"0.47442427",
"0.47414577",
"0.47413182",
"0.47407696",
"0.4739789",
"0.4737914",
"0.47333032",
"0.47321346",
"0.47262457",
"0.4724812",
"0.47228968",
"0.4722712",
"0.47196487",
"0.4719385",
"0.4714005",
"0.47131076",
"0.47075802",
"0.47060192",
"0.47056848",
"0.4705149",
"0.47031927",
"0.47031587",
"0.46965858",
"0.46938053",
"0.46930364",
"0.4692763",
"0.46879882",
"0.4685543",
"0.46814215",
"0.4678237",
"0.46755385",
"0.4670566",
"0.4666541",
"0.4665614",
"0.46639296",
"0.4663898",
"0.4663889",
"0.46622145",
"0.46565962",
"0.46560824",
"0.46533749",
"0.464927"
] |
0.6790435
|
0
|
Based on a set of Cases, finds the attribute that gives the highest information gain This method is fairly ugly, it could definitely be cut down on in length as there is a lot of repeated code, but it is perfectly functional in its current state, just a lot of repetition
|
public static Attribute chooseAttribute(ArrayList<Case> cases) {
Attribute currentBestAttribute = null;
double currentBestRemainder = 0;
// k
double [] kValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
// Extract the correct fields from each case into a separate array for sorting
kValues[i] = cases.get(i).k;
}
Arrays.sort(kValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
// Find the midpoint between two sequential values
double midpoint = (kValues[i] + kValues[i+1]) / 2;
// A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing
if (midpoint == kValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
// Count the number of positive and negative cases that exist on either side of the threshold
if (c.k < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
// Calculate the remainder as given in lecture slides 17-18 slide 31
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
// We want the attribute that gives the highest information gain, and since information content of the full
// set is constant, this is equivalent to the smallest remainder
if (remainder < currentBestRemainder || currentBestAttribute == null) {
currentBestAttribute = Attribute.K;
currentBestRemainder = remainder;
}
}
// na
double [] naValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
naValues[i] = cases.get(i).na;
}
Arrays.sort(naValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (naValues[i] + naValues[i+1]) / 2;
if (midpoint == naValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.na < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.Na;
currentBestRemainder = remainder;
}
}
// cl
double [] clValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
clValues[i] = cases.get(i).cl;
}
Arrays.sort(clValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (clValues[i] + clValues[i+1]) / 2;
if (midpoint == clValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.cl < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.CL;
currentBestRemainder = remainder;
}
}
// hco3
double [] hco3Values = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
hco3Values[i] = cases.get(i).hco3;
}
Arrays.sort(hco3Values);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (hco3Values[i] + hco3Values[i+1]) / 2;
if (midpoint == hco3Values[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.hco3 < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.HCO3;
currentBestRemainder = remainder;
}
}
// endotoxin
double [] endotoxinValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
endotoxinValues[i] = cases.get(i).endotoxin;
}
Arrays.sort(endotoxinValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (endotoxinValues[i] + endotoxinValues[i+1]) / 2;
if (midpoint == endotoxinValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.endotoxin < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.Endotoxin;
currentBestRemainder = remainder;
}
}
// aniongap
double [] aniongapValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
aniongapValues[i] = cases.get(i).aniongap;
}
Arrays.sort(aniongapValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (aniongapValues[i] + aniongapValues[i+1]) / 2;
if (midpoint == aniongapValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.aniongap < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.Aniongap;
currentBestRemainder = remainder;
}
}
// pla2
double [] pla2Values = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
pla2Values[i] = cases.get(i).pla2;
}
Arrays.sort(pla2Values);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (pla2Values[i] + pla2Values[i+1]) / 2;
if (midpoint == pla2Values[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.pla2 < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.PLA2;
currentBestRemainder = remainder;
}
}
// sdh
double [] sdhValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
sdhValues[i] = cases.get(i).sdh;
}
Arrays.sort(sdhValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (sdhValues[i] + sdhValues[i+1]) / 2;
if (midpoint == sdhValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.sdh < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.SDH;
currentBestRemainder = remainder;
}
}
// gldh
double [] gldhValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
gldhValues[i] = cases.get(i).gldh;
}
Arrays.sort(gldhValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (gldhValues[i] + gldhValues[i+1]) / 2;
if (midpoint == gldhValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.gldh < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.GLDH;
currentBestRemainder = remainder;
}
}
// tpp
double [] tppValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
tppValues[i] = cases.get(i).tpp;
}
Arrays.sort(tppValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (tppValues[i] + tppValues[i+1]) / 2;
if (midpoint == tppValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.tpp < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.TPP;
currentBestRemainder = remainder;
}
}
// breathRate
double [] breathRateValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
breathRateValues[i] = cases.get(i).breathRate;
}
Arrays.sort(breathRateValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (breathRateValues[i] + breathRateValues[i+1]) / 2;
if (midpoint == breathRateValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.breathRate < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.BreathRate;
currentBestRemainder = remainder;
}
}
// pcv
double [] pcvValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
pcvValues[i] = cases.get(i).pcv;
}
Arrays.sort(pcvValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (pcvValues[i] + pcvValues[i+1]) / 2;
if (midpoint == pcvValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.pcv < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.PCV;
currentBestRemainder = remainder;
}
}
// pulseRate
double [] pulseRateValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
pulseRateValues[i] = cases.get(i).pulseRate;
}
Arrays.sort(pulseRateValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (pulseRateValues[i] + pulseRateValues[i+1]) / 2;
if (midpoint == pulseRateValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.pulseRate < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.PulseRate;
currentBestRemainder = remainder;
}
}
// fibrinogen
double [] fibrinogenValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
fibrinogenValues[i] = cases.get(i).fibrinogen;
}
Arrays.sort(fibrinogenValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (fibrinogenValues[i] + fibrinogenValues[i+1]) / 2;
if (midpoint == fibrinogenValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.fibrinogen < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.Fibrinogen;
currentBestRemainder = remainder;
}
}
// dimer
double [] dimerValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
dimerValues[i] = cases.get(i).dimer;
}
Arrays.sort(dimerValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (dimerValues[i] + dimerValues[i+1]) / 2;
if (midpoint == dimerValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.dimer < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.Dimer;
currentBestRemainder = remainder;
}
}
// fibPerDim
double [] fibPerDimValues = new double[cases.size()];
for (int i = 0 ; i < cases.size() ; i++) {
fibPerDimValues[i] = cases.get(i).fibPerDim;
}
Arrays.sort(fibPerDimValues);
for (int i = 0 ; i < cases.size() - 1 ; i++) {
double midpoint = (fibPerDimValues[i] + fibPerDimValues[i+1]) / 2;
if (midpoint == fibPerDimValues[i]) continue;
double pless = 0;
double nless = 0;
double pgreater = 0;
double ngreater = 0;
for (Case c : cases) {
if (c.fibPerDim < midpoint) {
if (c.isHealthy) pless++;
else nless++;
}
else {
if (c.isHealthy) pgreater++;
else ngreater++;
}
}
double remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))
+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));
if (remainder < currentBestRemainder) {
currentBestAttribute = Attribute.FibPerDim;
currentBestRemainder = remainder;
}
}
return currentBestAttribute;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static double chooseAttributeThreshold(ArrayList<Case> cases, Attribute attribute) {\n\t\tdouble currentBestThreshold = -1;\n\t\tdouble currentBestRemainder = 0;\n\n\t\tdouble [] values = new double[cases.size()];\n\t\tfor (int i = 0 ; i < cases.size() ; i++) {\n\t\t\t// Create an array of the appropriate field values from each case for easy sorting\n\t\t\tswitch (attribute) {\n\t\t\tcase K:\n\t\t\t\tvalues[i] = cases.get(i).k;\n\t\t\t\tbreak;\n\t\t\tcase Na:\n\t\t\t\tvalues[i] = cases.get(i).na;\n\t\t\t\tbreak;\n\t\t\tcase CL:\n\t\t\t\tvalues[i] = cases.get(i).cl;\n\t\t\t\tbreak;\n\t\t\tcase HCO3:\n\t\t\t\tvalues[i] = cases.get(i).hco3;\n\t\t\t\tbreak;\n\t\t\tcase Endotoxin:\n\t\t\t\tvalues[i] = cases.get(i).endotoxin;\n\t\t\t\tbreak;\n\t\t\tcase Aniongap:\n\t\t\t\tvalues[i] = cases.get(i).aniongap;\n\t\t\t\tbreak;\n\t\t\tcase PLA2:\n\t\t\t\tvalues[i] = cases.get(i).pla2;\n\t\t\t\tbreak;\n\t\t\tcase SDH:\n\t\t\t\tvalues[i] = cases.get(i).sdh;\n\t\t\t\tbreak;\n\t\t\tcase GLDH:\n\t\t\t\tvalues[i] = cases.get(i).gldh;\n\t\t\t\tbreak;\n\t\t\tcase TPP:\n\t\t\t\tvalues[i] = cases.get(i).tpp;\n\t\t\t\tbreak;\n\t\t\tcase BreathRate:\n\t\t\t\tvalues[i] = cases.get(i).breathRate;\n\t\t\t\tbreak;\n\t\t\tcase PCV:\n\t\t\t\tvalues[i] = cases.get(i).pcv;\n\t\t\t\tbreak;\n\t\t\tcase PulseRate:\n\t\t\t\tvalues[i] = cases.get(i).pulseRate;\n\t\t\t\tbreak;\n\t\t\tcase Fibrinogen:\n\t\t\t\tvalues[i] = cases.get(i).fibrinogen;\n\t\t\t\tbreak;\n\t\t\tcase Dimer:\n\t\t\t\tvalues[i] = cases.get(i).dimer;\n\t\t\t\tbreak;\n\t\t\tcase FibPerDim:\n\t\t\t\tvalues[i] = cases.get(i).fibPerDim;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tArrays.sort(values);\n\t\tfor (int i = 0 ; i < cases.size() - 1 ; i++) {\n\t\t\tdouble midpoint = (values[i] + values[i+1]) / 2;\n\t\t\t// A rough way of dealing with non-unique values; two sequential identical values' average will be themselves, so ignore anything coming from such a pairing\n\t\t\tif (midpoint == values[i]) continue;\n\t\t\tdouble pless = 0;\n\t\t\tdouble nless = 0;\n\t\t\tdouble pgreater = 0;\n\t\t\tdouble ngreater = 0;\n\t\t\tfor (Case c : cases) {\n\t\t\t\t// Count the number of positive and negative cases that exist on either side of the threshold\n\t\t\t\tdouble value = 0;\n\t\t\t\tswitch (attribute) {\n\t\t\t\tcase K:\n\t\t\t\t\tvalue = c.k;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Na:\n\t\t\t\t\tvalue = c.na;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CL:\n\t\t\t\t\tvalue = c.cl;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HCO3:\n\t\t\t\t\tvalue = c.hco3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Endotoxin:\n\t\t\t\t\tvalue = c.endotoxin;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Aniongap:\n\t\t\t\t\tvalue = c.aniongap;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PLA2:\n\t\t\t\t\tvalue = c.pla2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase SDH:\n\t\t\t\t\tvalue = c.sdh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase GLDH:\n\t\t\t\t\tvalue = c.gldh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TPP:\n\t\t\t\t\tvalue = c.tpp;\n\t\t\t\t\tbreak;\n\t\t\t\tcase BreathRate:\n\t\t\t\t\tvalue = c.breathRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PCV:\n\t\t\t\t\tvalue = c.pcv;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PulseRate:\n\t\t\t\t\tvalue = c.pulseRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Fibrinogen:\n\t\t\t\t\tvalue = c.fibrinogen;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Dimer:\n\t\t\t\t\tvalue = c.dimer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase FibPerDim:\n\t\t\t\t\tvalue = c.fibPerDim;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (value < midpoint) {\n\t\t\t\t\tif (c.isHealthy) pless++;\n\t\t\t\t\telse nless++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (c.isHealthy) pgreater++;\n\t\t\t\t\telse ngreater++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Calculate the remainder as defined in lecture notes 17-18 slide 31\n\t\t\tdouble remainder = ((pless+nless)/cases.size() * informationContent(pless, nless))\n\t\t\t\t\t+ ((pgreater+ngreater)/cases.size() * informationContent(pgreater, ngreater));\n\t\t\t// We want the attribute that gives the highest information gain, and since information content of the full\n\t\t\t// set is constant, this is equivalent to the smallest remainder\n\t\t\tif (remainder < currentBestRemainder || currentBestThreshold == -1) {\n\t\t\t\tcurrentBestThreshold = midpoint;\n\t\t\t\tcurrentBestRemainder = remainder;\n\t\t\t}\n\t\t}\n\n\t\treturn currentBestThreshold;\n\t}",
"public int getHighestCombatSkill() {\r\n int id = 0;\r\n int last = 0;\r\n for (int i = 0; i < 5; i++) {\r\n if (staticLevels[i] > last) {\r\n last = staticLevels[i];\r\n id = i;\r\n }\r\n }\r\n return id;\r\n }",
"public static void main(String[] args) {\n Map<Currency, Long> map = TransactionData.transactions.stream()\n .collect(groupingBy(Transaction::getCurrency, counting()));\n System.out.println(map);\n\n // group transactions by currency then find the largest transaction in that group by comparing the Transaction value integer\n Map<Currency, Optional<Transaction>> map2 = TransactionData.transactions.stream()\n .collect(groupingBy(Transaction::getCurrency, maxBy(comparingInt(Transaction::getValue))));\n\n System.out.println(map2);\n\n // group transactions by currency then find the largest transaction in that group by comparing the Transaction value integer\n // then unwrap the Optional using .get()\n Map<Currency, Transaction> map3 = TransactionData\n .transactions.stream()\n .collect(groupingBy(Transaction::getCurrency, collectingAndThen(maxBy(comparingInt(Transaction::getValue)), Optional::get)));\n\n System.out.println(map3);\n\n\n Map<Dish.Type, Set<CaloricLevel>> map4 = Restauraunt.menu.stream()\n .collect(\n groupingBy(Dish::getType, mapping(\n dish -> {\n if( dish.getCalories() < 200)\n return CaloricLevel.DIET;\n else if( dish.getCalories() < 500)\n return CaloricLevel.NORMAL;\n else\n return CaloricLevel.FAT;\n },toSet() )));\n\n System.out.println(map4);\n\n\n }",
"private int find_bestSplit(KnowledgeBase kb, int attIndex, ArrayList<ArrayList<ArrayList<Integer>>> multiple_counters) {\r\n\t\tif(multiple_counters.size() >0){\r\n\t\t\tfloat best_Gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(0));; // it's a minimum!!\r\n\t\t\tint index_Best_Gini =0;\r\n\t\t\tfloat tmp_gini;\r\n\t\t\tfor(int i=1;i<multiple_counters.size();i++){\r\n\t\t\t\ttmp_gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(i));\r\n\t\t\t\tif(tmp_gini<best_Gini){\r\n\t\t\t\t\tbest_Gini = tmp_gini;\r\n\t\t\t\t\tindex_Best_Gini = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn index_Best_Gini;\r\n\t\t}\r\n\t\treturn 0;\r\n\t\t\r\n\t\t\r\n\t}",
"public AnimalList findMax(HashMap<String, AnimalList> animalEntries) {\n //HashMap<String, AnimalList> animalEntries = country.getValue(); \n AnimalList max = new AnimalList(\"emptyAnimal\");\n for (Entry<String, AnimalList> animal : animalEntries.entrySet ()) { \n if (max.compareTo(animal.getValue()) < 0) {\n max = animal.getValue();\n }\n } //for each animal type in a country (HashMap) \n if (max.getAnimalName().equals(\"emptyAnimal\")) { //if the country is empty (no animals)\n return null;\n } else { //found a max animal\n return max;\n }\n }",
"public Book mostExpensive() {\n //create variable that stores the book thats most expensive\n Book mostExpensive = bookList.get(0);//most expensive book is set as the first in the array\n for (Book book : bookList) {\n if(book.getPrice() > mostExpensive.getPrice()){\n mostExpensive = book;\n }\n } return mostExpensive;//returns only one (theFIRST) most expensive in the array if tehre are several with the same price\n }",
"private Map.Entry<Activity, Prediction> chooseBestPrediction(Map<Activity, Prediction> predictions) {\n \n Map.Entry<Activity, Prediction> prediction = null;\n int result1, result2, lastIndex;\n double probability1, probability2;\n \n \n for (Map.Entry<Activity, Prediction> entry : predictions.entrySet()) {\n \n if (prediction == null) {\n prediction = entry;\n } else {\n lastIndex = prediction.getValue().getObservations().length - 1;\n \n result1 = prediction.getValue().getPredictions()[lastIndex];\n probability1 = prediction.getValue().getProbability();\n result2 = entry.getValue().getPredictions()[lastIndex];\n probability2 = entry.getValue().getProbability();\n \n /*a result 1 means that an activity has been detected,\n * thus we prefer a result that predicts an activity*/\n if (result2 == 1 && result1 == 0)\n prediction = entry;\n \n /* if both predict an activity, or don't predict anything then\n * we take the probability into consideration */\n if (result1 == result2) {\n if (probability2 > probability1)\n prediction = entry;\n }\n \n }\n \n }\n \n return prediction;\n \n }",
"@Override\n\tpublic int select_arm() {\n\t\tint countsSum = 0;\n\t\t\n\t\tfor(int arm : m_counts){\n\t\t\tif(arm == 0) return arm;\n\t\t\tcountsSum += arm;\n\t\t}\n\t\t\n\t\tdouble max = 0;\n\t\tint max_indx = 0;\n\t\tfor(int i = 0; i<m_counts.length; i++){\n\t\t\tdouble bonus = Math.sqrt((2 * Math.log(countsSum)) / m_counts[i]);\n\t\t\tdouble ucb_value = m_values[i] + bonus;\n\t\t\tif(ucb_value > max){ \n\t\t\t\tmax = ucb_value;\n\t\t\t\tmax_indx = i;\n\t\t\t}\n\t\t}\n\t\treturn max_indx;\n\t}",
"public String getHighestInterest(){\n if(!interestsNotFilled()) {\n Object highestInterest = interestMap.keySet().toArray()[0];\n for (String interest : interestMap.keySet()) {\n float score = interestMap.get(interest);\n if (score > interestMap.get(highestInterest)) {\n highestInterest = interest;\n }\n }\n return (String) highestInterest;\n }else{\n return null;\n }\n }",
"public int best(){\n List<Integer> points = count();\n Integer max = 0;\n for (Integer p: points){\n if (p <= 21 && max < p){\n max = p;\n }\n }\n return max;\n }",
"Object getBest();",
"private ResultIntent.IntentProbability maxElementIntent(List<ResultIntent.IntentProbability> element) {\n return Collections.max(element, (intentProbability, t1) -> {\n if (intentProbability.getProbability() == t1.getProbability()) {\n return 0;\n } else if (intentProbability.getProbability() < t1.getProbability()) {\n return -1;\n }\n return 1;\n });\n }",
"private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }",
"private Object keyOfBestUnlabeledInstance(Classifier[] committee){\n\t\tdouble worstAgreement=2.0;\n\t\tObject queryKey=null;\n\t\tfor(Iterator<Double> i=unlabeled.keySet().iterator();i.hasNext();){\n\t\t\tObject key=i.next();\n\t\t\tInstance instance=unlabeled.get(key);\n\t\t\tTObjectDoubleHashMap counts=new TObjectDoubleHashMap();\n\t\t\tdouble biggestCount=0;\n\t\t\tfor(int j=0;j<committee.length;j++){\n\t\t\t\tString best=committee[j].classification(instance).bestClassName();\n\t\t\t\tdouble c=counts.get(best)+1;\n\t\t\t\tcounts.put(best,c);\n\t\t\t\tif(c>biggestCount)\n\t\t\t\t\tbiggestCount=c;\n\t\t\t}\n\t\t\tdouble agreement=biggestCount/committee.length;\n\t\t\tlog.info(\"instance: \"+instance+\" committee: \"+counts+\" agreement: \"+\n\t\t\t\t\tagreement);\n\t\t\tif(agreement<worstAgreement){\n\t\t\t\tworstAgreement=agreement;\n\t\t\t\tqueryKey=key;\n\t\t\t\tlog.debug(\" ==> best\");\n\t\t\t}\n\t\t}\n\t\tlog.info(\"queryInstance is: \"+unlabeled.get(queryKey));\n\t\treturn queryKey;\n\t}",
"public byte getAttributeLevel(byte i)\r\n\t{\r\n\t\tswitch(i)\r\n\t\t{\r\n\t\tcase INTELLIGENCE:\r\n\t\t\treturn intelligence;\r\n\t\tcase CUNNING:\r\n\t\t\treturn cunning;\r\n\t\tcase STRENGTH:\r\n\t\t\treturn strength;\r\n\t\tcase AGILITY:\r\n\t\t\treturn agility;\r\n\t\tcase PERCEPTION:\r\n\t\t\treturn perception;\r\n\t\tcase HONOR:\r\n\t\t\treturn honor;\r\n\t\tcase SPEED:\r\n\t\t\treturn speed;\r\n\t\tcase LOYALTY:\r\n\t\t\treturn loyalty;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int cases = scanner.nextInt();\n\n for (int i = 0; i < cases; i++) {\n int contestants = scanner.nextInt();\n\n if (contestants <= 1) {\n System.out.println(contestants);\n continue;\n }\n\n int [] skillList = new int[contestants];\n\n for (int j = 0; j < contestants; j++) {\n skillList[j] = scanner.nextInt();\n }\n\n Arrays.sort(skillList);\n Map<Integer, Integer> skillLevelFrequency = new LinkedHashMap<Integer, Integer>();\n int skillLevel = skillList[0];\n int frequency = 1;\n\n for (int j = 1; j < contestants; j++) {\n if (skillLevel == skillList[j]) {\n frequency++;\n }\n else {\n skillLevelFrequency.put(skillLevel, frequency);\n skillLevel = skillList[j];\n frequency = 1;\n }\n }\n\n List<Integer> team = new ArrayList<Integer>();\n int minGroupSize = Integer.MAX_VALUE;\n }\n }",
"private int highestPossibleValue(List<Card> cards) {\n int value = 0;\n int assCounter = 0;\n\n // Calculate the value without taking * into account\n for (Card card : cards) {\n value += card.getValue();\n if (card.getName().equals(\"*\")) assCounter++;\n }\n\n // Subtracts value of *\n for (int i = 0; i < assCounter; i++) {\n if (value <= 21)\n break;\n value -= 10;\n }\n\n return value;\n }",
"private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }",
"public static String getMostFrequentType() {\n\t\tint cars = 0;\n\t\tint figures = 0;\n\t\t\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (toyList.get(i).getType().equals(\"Car\")) {\n\t\t\t\tcars++;\n\t\t\t}\n\t\t\tif (toyList.get(i).getType().equals(\"Action Figure\")) {\n\t\t\t\tfigures++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (cars > figures) {\n\t\t\treturn \"Car\";\n\t\t}\n\t\telse if (figures > cars) {\n\t\t\treturn \"Action Figure\";\n\t\t}\n\t\telse {\n\t\t\treturn \"Equal amounts of actions figures and cars.\";\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n public static void main(String[] args)\r\n {\r\n //final String INPUT_FILE=\"contact-lenses.arff\";\r\n final String INPUT_FILE=\"adult.merged.arff\";\r\n Instances data;\r\n try {\r\n Reader reader = new FileReader(INPUT_FILE);\r\n data = new Instances(reader);\r\n } catch (Exception e) {\r\n System.out.println(\"Failed to read input file \" + INPUT_FILE + \", exiting\");\r\n return;\r\n }\r\n data.setClassIndex(data.numAttributes()-1);\r\n\r\n System.out.println(\"Acquired data from file \" + INPUT_FILE);\r\n System.out.println(\"Got \" + data.numInstances() + \" instances with \" + data.numAttributes() + \" attributes, class attribute is \" + data.classAttribute().name());\r\n AttributeScoreAlgorithm scorer = new MaxScorer ();\r\n Enumeration<Attribute> atts=(Enumeration<Attribute>)data.enumerateAttributes();\r\n while (atts.hasMoreElements())\r\n {\r\n C45Attribute att=new C45Attribute(atts.nextElement());\r\n System.out.println(\"Score for attribute \" + att.WekaAttribute().name() + \" is \" + scorer.Score(data,att));\r\n }\r\n\r\n List<C45Attribute> candidateAttributes = new LinkedList<C45Attribute>();\r\n Enumeration attEnum = data.enumerateAttributes();\r\n while (attEnum.hasMoreElements())\r\n candidateAttributes.add(new C45Attribute((Attribute)attEnum.nextElement()));\r\n BigDecimal epsilon=new BigDecimal(0.1, DiffPrivacyClassifier.MATH_CONTEXT);\r\n PrivacyAgent agent = new PrivacyAgentBudget(epsilon);\r\n\r\n PrivateInstances privData = new PrivateInstances(agent,data);\r\n privData.setDebugMode(true);\r\n\r\n try {\r\n C45Attribute res=privData.privateChooseAttribute(new MaxScorer(), candidateAttributes,epsilon);\r\n System.out.println(\"Picked attribute \" + res.WekaAttribute().name());\r\n } catch(Exception e) { System.out.println(e.getMessage());}\r\n }",
"private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}",
"@Test\n\tvoid attributeCardinality() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..*]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING, BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..1]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(CLINICAL_FINDING, DISORDER, BLEEDING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[0..0]\" + FINDING_SITE + \"=*\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\"<<\" + CLINICAL_FINDING + \":[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(BLEEDING_SKIN, PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[0..1]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[1..2]\" + FINDING_SITE + \"= <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"{\" +\n\t\t\t\t\t\t\t\t\"[1..1]\" + FINDING_SITE + \" != <<\" + PULMONARY_VALVE_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS + \"\" +\n\t\t\t\t\t\t\t\t\"}\")));\n\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PENTALOGY_OF_FALLOT, PENTALOGY_OF_FALLOT_INCORRECT_GROUPING),\n\t\t\t\tstrings(selectConceptIds(\n\t\t\t\t\t\t\"<<\" + CLINICAL_FINDING + \":\" +\n\t\t\t\t\t\t\t\t\"[0..0]\" + FINDING_SITE + \" != <<\" + BODY_STRUCTURE + \",\" +\n\t\t\t\t\t\t\t\t\"[1..*]\" + ASSOCIATED_MORPHOLOGY + \"= <<\" + STENOSIS)));\n\n\t}",
"public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }",
"public T getBestElement() {\n\t\tT bestElement = null;\n\t\tdouble bestProb = -1;\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\tdouble thisProb = itemProbs_.get(element);\n\t\t\tif (thisProb > bestProb) {\n\t\t\t\tbestProb = thisProb;\n\t\t\t\tbestElement = element;\n\t\t\t}\n\t\t}\n\t\treturn bestElement;\n\t}",
"public String FindCategory(double index){\n \n if(index < 18.5) \n return \"undernourished.\";\n\n if(index < 25) \n return \"regular.\";\n\n if(index < 30) \n return \"overweight.\";\n \n return \"obese.\"; //Could over accumulated with overweight in Test\n\n }",
"private static List<Building> getHighestManufacturingTechLevelBuildings(List<Building> buildingList) {\n\n\t\tList<Building> result = new ArrayList<Building>();\n\n\t\tint highestTechLevel = 0;\n\t\tIterator<Building> i = buildingList.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tBuilding building = i.next();\n\t\t\tManufacture manufacturingFunction = building.getManufacture();\n\t\t\tif (building.getManufacture().getTechLevel() > highestTechLevel) {\n\t\t\t\thighestTechLevel = manufacturingFunction.getTechLevel();\n\t\t\t}\n\t\t}\n\n\t\tIterator<Building> j = buildingList.iterator();\n\t\twhile (j.hasNext()) {\n\t\t\tBuilding building = j.next();\n\t\t\tif (building.getManufacture().getTechLevel() == highestTechLevel) {\n\t\t\t\tresult.add(building);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"private String getMajorityClass(List<Instance> instances) {\r\n\r\n\t\tint[] counters = countClasses(instances);\r\n\r\n\t\tint max = 0;\r\n\t\tint index = 0;\r\n\t\tfor(int i = 0;i<counters.length;++i){\r\n\t\t\tif(max<counters[i]){\r\n\t\t\t\tmax=counters[i];\r\n\t\t\t\tindex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn classes.get(index);\r\n\t}",
"public void writeAttributeAssociations(String inputFilename, String outputFilename, int maxAssociations){\r\n\t\ttry {\r\n\t\t\tFile aFile = new File(inputFilename);\r\n\t\t\t\r\n\t\t\tif (!aFile.exists()) {\r\n\t\t\t\tthrow new IOException();\r\n\t\t\t}\r\n\t\t\tif (!aFile.isFile()) {\r\n\t\t\t\tthrow new IOException();\r\n\t\t\t}\r\n\t\t\tif (!aFile.canRead()) {\r\n\t\t\t\tthrow new IOException();\r\n\t\t\t}\r\n\t\r\n\t\t File awFile = new File(outputFilename);\r\n\t\t Writer output = new BufferedWriter( new FileWriter(awFile) );\r\n\t\t ArrayList<AttributeValue<String>> tokensList = new ArrayList<AttributeValue<String>>(300);\r\n\t\t float[] logProbOfAttributeGivenCluster = new float[numberOfExperts];\r\n\t\t double[][] logQuant = new double[numberOfExperts][];\r\n\t\t for (int c=0; c<numberOfExperts; c++)\r\n\t\t \tlogQuant[c] = new double[numberOfExperts];\r\n\t\t \r\n\t\t // Calculate the distinctiveness of each attribute, i.e p(c|att)/p(c) for each cluster\r\n\t\t ArrayList<HashMap<String,Float>> attributeScores = null;\r\n\t \r\n\t \tFileReader fr = new FileReader(aFile);\r\n\t \tBufferedReader br = new BufferedReader(fr);\r\n\t \tString lineStr;\r\n\t \twhile ((lineStr = br.readLine()) != null) {\r\n\t \t\tString[] st = lineStr.split(\",\");\r\n\t \t\tString category = st[0];\r\n\t \t\tStringBuffer sb2 = new StringBuffer();\r\n\t \t\tsb2.append(\"\\\"\" + category + \"\\\"\");\r\n\t \t\t\r\n\t \t\tboolean found=false;\r\n\r\n\t \t\t// Compute p(c|list_of_seed_terms)\r\n\t \t\tfor (int c=0; c<numberOfExperts; c++)\r\n\t \t\t\tfor (int r=0; r<numberOfExperts; r++)\r\n\t \t\t\t\tlogQuant[r][c] = logProbOfCluster[r] - logProbOfCluster[c];\r\n\t \t\tfor (int i=1; i<st.length; i++){\r\n\t \t\t\tInteger indx = attribute2Index.get(st[i]);\r\n\t \t\t\tif (indx == null)\r\n\t \t\t\t\tcontinue;\r\n \t\t\r\n\t \t\t\tfound=true;\r\n// \t\tSystem.out.print(\" \" + st[i]);\r\n\t \t\t\tsb2.append(\",\\\"\"); sb2.append(st[i]); sb2.append(\"\\\"\");\r\n\t \t\t\tint attribute = indx.intValue();\r\n\t \t\t\tgetAttributeClusterLogProbs(attribute,logProbOfAttributeGivenCluster);\r\n\t \t\t\tfor (int c=0; c<numberOfExperts; c++)\r\n\t \t\t\t\tfor (int r=0; r<numberOfExperts; r++){\r\n\t \t\t\t\t\tlogQuant[r][c] += logProbOfAttributeGivenCluster[r] - logProbOfAttributeGivenCluster[c];\r\n\t \t\t\t\t}\r\n\t \t\t}\r\n\t \t\tsb2.append(\"\\n\");\r\n \t\r\n \t\r\n\t \t\tif (! found){\r\n\t \t\t\tStringBuffer sb = new StringBuffer();\r\n\t \t\t\tsb.append(\"\\\"\" + category + \"\\\"\");\r\n\t \t\t\tsb.append(\",\\\"NULL\\\"\\n\"); \r\n//\t \t\t\toutput.write(sb2.toString());\r\n \t\toutput.write(sb.toString());\r\n\t \t\t\tcontinue;\r\n\t \t\t}\r\n\r\n \t\r\n\t \t\tdouble[] conditionalProb = new double[numberOfExperts];\r\n\t \t\tfor (int c=0; c<numberOfExperts; c++){\r\n\t \t\t\tboolean zeroProb = false;\r\n\t \t\t\tfor (int r=0; r<numberOfExperts; r++){\r\n\t \t\t\t\tif (logQuant[r][c] > 15.0){\r\n\t \t\t\t\t\tconditionalProb[c] = 0.0;\r\n\t \t\t\t\t\tzeroProb = true;\r\n\t \t\t\t\t\tbreak;\r\n\t \t\t\t\t}\r\n\t \t\t\t\telse {\r\n\t \t\t\t\t\tconditionalProb[c] += Math.exp(logQuant[r][c]);\r\n\t \t\t\t\t}\r\n\t \t\t\t}\r\n\t \t\t\tif (! zeroProb)\r\n\t \t\t\t\tconditionalProb[c] = 1.0 / conditionalProb[c];\r\n\t \t\t}\r\n\r\n\t \t\ttokensList.clear();\r\n\t \t\tfor (int i=0; i<numberOfAttributes; i ++){\r\n\t \t\t\tfloat score = 0.0f;\r\n\t \t\t\tfor (int c=0; c<numberOfExperts; c ++){\r\n\t \t\t\t\tif (! attributeScores.get(c).containsKey(attributeName.get(i))){\r\n\t \t\t\t\t\tcontinue;\r\n\t \t\t\t\t}\r\n\t \t\t\t\tFloat dprob=attributeScores.get(c).get(attributeName.get(i));\r\n\t \t\t\t\tscore += dprob.floatValue() * conditionalProb[c];\r\n\t \t\t\t}\r\n\t \t\t\tif (score > 0.0f)\r\n\t \t\t\t\ttokensList.add(new AttributeValue<String>(attributeName.get(i), score));\r\n\t \t\t}\r\n\t \t\tCollections.sort(tokensList);\r\n\t \t\tint associationsShown=0;\r\n\t \t\tStringBuffer sb = new StringBuffer();\r\n\t \t\tfor (AttributeValue<String> attObj : tokensList){\r\n\t \t\t\tfloat score = attObj.getValue();\r\n\t \t\t\tString attribute = attObj.getIndex();\r\n\r\n\t \t\t\tif (associationsShown >= maxAssociations)\r\n\t \t\t\t\tbreak;\r\n\r\n\t \t\t\tsb.append(\"\\\"\" + category + \"\\\"\");\r\n\t \t\t\tsb.append(\",\\\"\"); sb.append(attribute); sb.append(\"\\\",\"); sb.append(score); sb.append(\"\\n\");\r\n\r\n\t \t\t\tassociationsShown ++;\r\n\t \t\t}\r\n // \toutput.write(sb2.toString());\r\n\t \t\toutput.write(sb.toString());\r\n\t \t}\r\n\t \toutput.close();\r\n\t }\r\n\t catch (IOException e){\r\n\t \te.printStackTrace();\r\n\t \tSystem.exit(1);\r\n\t }\r\n\t}",
"public static void main(String[] args) {\n\n\n List<Stock> listOfStock = Arrays.asList(new Stock(\"ICICI\", 10), new Stock(\"ICICI\", 30), new Stock(\"SBI\", 60), new Stock(\"SBI\", 30));\n\n ///Map<String, Integer> collect = listOfStock.stream().collect(Collectors.toMap(Stock::getName , stock -> stock.getValue(), Stock::getValue ));\n //System.out.println(collect);\n\n\n List<Integer> integerList = Arrays.asList(1, 2, 35, 32, 34);\n\n Integer integer = integerList.stream().filter(i -> i <\n integerList.stream().mapToInt(j -> j).max().getAsInt()).max(Comparator.naturalOrder()).get();\n System.out.println(integer);\n\n\n // Output : {ICICI=40, SBI=90}\n }",
"public double getAchievedMarksMax(){\n return achievedMarks\n .stream()\n .mapToDouble(AchievedMark::getMark)\n .max()\n .orElse(0);\n }",
"public int getBestGuy () {\r\n return poblac.getBestGuy();\r\n }",
"public TagSequence getBestTag();",
"private void setMaxPayRaise ()\r\n {\r\n Random randomizer = new Random ();\r\n int[] randValues = {\r\n randomizer.nextInt (4) + 5, randomizer.nextInt (4) + 4,\r\n randomizer.nextInt (5) + 3, randomizer.nextInt (4) + 5,\r\n randomizer.nextInt (4) + 1, randomizer.nextInt (7) + 2,\r\n randomizer.nextInt (6) + 1\r\n };\r\n\r\n for (int j = 0; j < CAREERS.length; j++)\r\n if (CAREERS[j].equalsIgnoreCase (name))\r\n maxPayRaise = randValues[j];\r\n }",
"public PracticeResult getHighestGradingByMember(Member member, String practiceType);",
"public abstract String getMaxUsage();",
"@VisibleForTesting\n public static Severity getHighestSeverity(Collection<Incident> incidents) {\n Severity max = Severity.OK;\n for (Incident incident : incidents) {\n if (max.compareTo(incident.severity) < 0) {\n max = incident.severity;\n }\n }\n return max;\n }",
"public FoodItem mostExpensive() {\n FoodItem mostExpensive = null;\n for (int i = 0; i < this._noOfItems; i++) {\n FoodItem currentItem = this._stock[i];\n // if not first, compare the most expensive yet to current,\n // and change the most expensive if current's price is grater\n if (i != 0) {\n // if price is bigger than all tested yet\n if (currentItem.getPrice() > mostExpensive.getPrice()) {\n // set it as biggest yet\n mostExpensive = new FoodItem(currentItem); // avoid aliasing\n }\n }\n else \n mostExpensive = new FoodItem(currentItem); //avoid aliasing\n }\n // return biggest\n return mostExpensive;\n }",
"private static int[] findMaxValues(int[] weightArr, int[] heightArr){\r\n int[] max = new int[3];\r\n for(int i = 0; i < weightArr.length; i++){\r\n if(weightArr[i] > max[0]){\r\n max[0] = weightArr[i];\r\n max[1] = heightArr[i];\r\n max[2] = i;\r\n }\r\n }\r\n\r\n return max;\r\n }",
"static int hireAssistant(int tab[]) {\n int best = 0;\n for(int i = 0; i<tab.length; i++) {\n if(tab[i] > best)\n best = tab[i];\n }\n return best;\n }",
"public Decision worstFor(Context context);",
"long getMaxItemFindings();",
"public String getStrongestCountryConqueredByPlayer(HashMap<String, ArrayList<String>> potentialScenarios) {\r\n\t\t\r\n \tString strongestCountry = null;\r\n \tInteger maxArmyCountEncountered = 1;\r\n \r\n // find the strongest country conquered by the player, knowing it would be contained as a key \r\n for (String country : potentialScenarios.keySet()){\r\n \tInteger currentCountryArmyCount = gameData.gameMap.getCountry(country).getCountryArmyCount();\r\n \tif (currentCountryArmyCount > maxArmyCountEncountered) {\r\n \t\tstrongestCountry = country;\r\n \t\tmaxArmyCountEncountered = currentCountryArmyCount;\r\n \t} \r\n }\r\n \r\n \treturn strongestCountry;\r\n }",
"String getMax_res();",
"protected int getHighestInnovation() {\n\t\treturn highest;\n\t}",
"private HashMap<String, int[] > getAttrClassRatio ( ArrayList<String> alCalcAttr, ArrayList<String> alClasAttr ) {\r\n\t\tHashMap< String, int[] > attrClassRatioMap = new HashMap<String, int[] >();\r\n\t\tString classA = alClasAttr.get(0);\r\n\t\tfor ( int i = 0; i < alCalcAttr.size(); i++ ) {\r\n\t\t\tString attr = alCalcAttr.get(i);\r\n\t\t\tString classification = alClasAttr.get(i);\r\n\t\t\tif ( !attrClassRatioMap.containsKey(attr) ) {\r\n\t\t\t\tattrClassRatioMap.put( attr, new int[2] );\r\n\t\t\t}\r\n\t\t\tif ( classA.equals( classification ) ) {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[0];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t} else {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[1];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn attrClassRatioMap;\r\n\t}",
"public int \r\nomStudent_dHighACT_Score( View mStudent,\r\n String InternalEntityStructure,\r\n String InternalAttribStructure,\r\n Integer GetOrSetFlag )\r\n{\r\n double dTotalComposite = 0.0;\r\n\r\n\r\n //:CASE GetOrSetFlag\r\n switch( GetOrSetFlag )\r\n { \r\n //:OF zDERIVED_GET:\r\n case zDERIVED_GET :\r\n\r\n //:ComputeHighExamScoreACT( dTotalComposite, mStudent )\r\n //:StoreValueInRecord ( mStudent,\r\n //: InternalEntityStructure, InternalAttribStructure, dTotalComposite, 0 )\r\n StoreValueInRecord( mStudent, InternalEntityStructure, InternalAttribStructure, dTotalComposite, 0 );\r\n break ;\r\n\r\n //: /* end zDERIVED_GET */\r\n //:OF zDERIVED_SET:\r\n case zDERIVED_SET :\r\n break ;\r\n } \r\n\r\n\r\n //: /* end zDERIVED_SET */\r\n //:END /* case */\r\n return( 0 );\r\n// END\r\n}",
"public double getHighestConfidence() {\n\t\tdouble best = Double.MIN_VALUE;\n\n\t\tfor (ResultConfidencePairing rcp : m_results) {\n\t\t\tif (rcp.getConfidence() > best)\n\t\t\t\tbest = rcp.getConfidence();\n\t\t}\n\t\treturn best;\n\t}",
"public static Node buildTree(ArrayList<Case> cases) {\n\t\tint healthy = 0;\n\t\t// Count the number of healthy cases in the current set\n\t\tfor (Case c : cases) {\n\t\t\tif (c.isHealthy) healthy++;\n\t\t}\n\t\t// If all cases are either healthy or unhealthy, this can be a result node and so is set as such (to the correct value)\n\t\tif (healthy == cases.size() || healthy == 0) {\n\t\t\treturn new Node(cases.get(0).isHealthy);\n\t\t}\n\t\telse {\n\t\t\t// Otherwise we have a mix, so find the best attribute and matching threshold to split on\n\t\t\tAttribute attribute = chooseAttribute(cases);\n\t\t\tdouble threshold = chooseAttributeThreshold(cases, attribute);\n\t\t\tNode tree = new Node();\n\t\t\ttree.attribute = attribute;\n\t\t\ttree.threshold = threshold;\n\t\t\tArrayList<Case> casesLessThan = new ArrayList<Case>();\n\t\t\tArrayList<Case> casesGreaterThan = new ArrayList<Case>();\n\t\t\t// Get the appropriate value and use that to sort into two lists, one for each side of the threshold\n\t\t\tfor (Case c : cases) {\n\t\t\t\tdouble value = 0;\n\t\t\t\tswitch (attribute) {\n\t\t\t\tcase K:\n\t\t\t\t\tvalue = c.k;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Na:\n\t\t\t\t\tvalue = c.na;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CL:\n\t\t\t\t\tvalue = c.cl;\n\t\t\t\t\tbreak;\n\t\t\t\tcase HCO3:\n\t\t\t\t\tvalue = c.hco3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Endotoxin:\n\t\t\t\t\tvalue = c.endotoxin;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Aniongap:\n\t\t\t\t\tvalue = c.aniongap;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PLA2:\n\t\t\t\t\tvalue = c.pla2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase SDH:\n\t\t\t\t\tvalue = c.sdh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase GLDH:\n\t\t\t\t\tvalue = c.gldh;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TPP:\n\t\t\t\t\tvalue = c.tpp;\n\t\t\t\t\tbreak;\n\t\t\t\tcase BreathRate:\n\t\t\t\t\tvalue = c.breathRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PCV:\n\t\t\t\t\tvalue = c.pcv;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PulseRate:\n\t\t\t\t\tvalue = c.pulseRate;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Fibrinogen:\n\t\t\t\t\tvalue = c.fibrinogen;\n\t\t\t\t\tbreak;\n\t\t\t\tcase Dimer:\n\t\t\t\t\tvalue = c.dimer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase FibPerDim:\n\t\t\t\t\tvalue = c.fibPerDim;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (value < threshold) {\n\t\t\t\t\tcasesLessThan.add(c);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcasesGreaterThan.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Recurse on these sets to create subtrees\n\t\t\ttree.lessThanChildren = buildTree(casesLessThan);\n\t\t\ttree.greaterThanChildren = buildTree(casesGreaterThan);\n\t\t\t\n\t\t\treturn tree;\n\t\t}\n\t}",
"@Override\n\tpublic Rank getMax(Set<StrategyState<State,Memory>> strategyStates) {\n\t\tValidate.notEmpty(strategyStates);\n\t\tRankFunction<State> rankFunction = this.getRankFunction(strategyStates.iterator().next().getMemory());\n\t\treturn rankFunction.getMaximum(GRUtils.getStates(strategyStates));\n\t}",
"public Card bestEight()\n {\n String mostSuit = \"\";\n int most = 0;\n Hashtable<String, Integer> cardSuit = new Hashtable<String, Integer>();\n //Count the number of cards in players hand for each suit\n for(Card cardInHand: this.hand)\n {\n String suit = cardInHand.getSuit();\n if(cardSuit.containsKey(suit))\n {\n cardSuit.put(suit, cardSuit.get(suit) + 1);\n }\n else\n {\n cardSuit.put(suit, 1);\n }\n }\n //find the highest one.\n for(String key: cardSuit.keySet())\n {\n if(cardSuit.get(key) > most) {\n mostSuit = key;\n most = cardSuit.get(key);\n }\n }\n return new Card(mostSuit, \"8\");\n }",
"Object getWorst();",
"private void calculateMode(){\r\n float[][] tally = new float[2][2];\r\n //The \"best\" so far\r\n tally[0][0] = 0; //AER\r\n tally[0][1] = 0; //amount\r\n //Works out the total\r\n tally[1][0] = 0; //AER\r\n tally[1][1] = 0; //amount\r\n\r\n for(Account aAccount: theAccounts){\r\n if(aAccount.getAer() == tally[1][0]){\r\n tally[1][1]++;\r\n }\r\n else{\r\n if(tally[1][1]>tally[0][1]){\r\n tally[0][0] = tally[1][0];\r\n tally[0][1] = tally[1][1];\r\n\r\n }\r\n tally[1][0] = aAccount.getAer();\r\n tally[1][1] = 0;\r\n }\r\n }\r\n float averageAER = tally[0][0];\r\n float averageBond = startingBonds + (startingBonds*averageAER/100);\r\n\r\n Account averageAccount = new Account(startingBonds,averageBond,averageAER);\r\n System.out.println(averageAccount.toString());\r\n\r\n }",
"public double getProficiency(DefaultActivity i) {\n ActivityTypes subType = i.getActivityType();\n double proficiency = 0.0;\n int count = 1;\n switch (subType) {\n case SLEEP: //day\n for (String keyValue : i.getName().split(\" \")) {\n if (keyValue.length() >= 3) {\n if (sleepMap.get(keyValue) != null) {\n if (sleepMap.get(keyValue) <= 3) {\n proficiency += sleepMap.get(keyValue) * 100;\n count += sleepMap.get(keyValue);\n }\n } else {\n proficiency += 30;\n count++;\n }\n proficiency += proficiency / count;\n }\n }\n return proficiency;\n case MEAL: //day\n for (String keyValue : i.getName().split(\" \")) {\n if (keyValue.length() >= 4) {\n if (mealMap.get(keyValue) != null) {\n if (mealMap.get(keyValue) >= 4) {\n proficiency += mealMap.get(keyValue) * 100;\n count += mealMap.get(keyValue);\n }\n } else {\n proficiency += 30;\n }\n proficiency += proficiency / count;\n }\n }\n return proficiency;\n case TESTSTUDY: //week\n for (String keyValue : i.getName().split(\" \")) {\n if (keyValue.length() >= 4) {\n if (testMap.get(keyValue) != null) {\n if (testMap.get(keyValue) > 4) {\n proficiency += testMap.get(keyValue) * 100;\n count += testMap.get(keyValue);\n }\n } else {\n proficiency += 25;\n }\n proficiency += proficiency / count;\n }\n }\n return proficiency;\n default:\n return 50;\n }\n }",
"int getIndividualDefense();",
"public Building mostFitInPopulation(){\n\t\tCollections.sort(population);\n\t\treturn population.get(population.size() - 1);\n\t}",
"private String chooseNextCharacter(final Random random, final String sequence) throws NoSuchElementException {\n if(! sequenceProbabilities.containsKey(sequence)) {\n throw new NoSuchElementException(\"There are no computed probabilities for the specified key.\");\n }\n\n Integer highestProbability = null;\n final List<String> highestStrings = new ArrayList<>();\n\n for(final Map.Entry<String, Integer> entry : sequenceProbabilities.get(sequence).entrySet()) {\n // If the initial data has not yet been set,\n // then set it.\n if(highestProbability == null) {\n highestStrings.add(entry.getKey());\n highestProbability = entry.getValue();\n } else {\n if(entry.getValue() > highestProbability) {\n highestStrings.clear();\n highestStrings.add(entry.getKey());\n highestProbability = entry.getValue();\n } else {\n highestStrings.add(entry.getKey());\n }\n }\n }\n\n final int randomIndex = random.nextInt(highestStrings.size());\n\n return highestStrings.get(randomIndex);\n }",
"public static void main(String[] args) {\n\t\tList<String> attributeList = new ArrayList<>();\n\t\tattributeList.add(\"srvac/v-pen/c04-ch02inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch05-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch07-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch09-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch13-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch14-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch16inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-sept-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch02inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch04inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch05-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch06-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch07-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch07-2/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch08-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch09-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch09-2/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch12-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch13-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch14-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch15inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch16inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch22inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-sept-1/pressure\");\n\n\t\tList<String> selectionList = new ItemSelectionDialog(\n\t\t\t\t(JFrame) null, \"Attribute Selection\", attributeList, true).showDialog();\n\t\tif (selectionList.isEmpty())\n\t\t\tSystem.out.println(\"No Selection\");\n\t\telse {\n\t\t\tfor (String selection : selectionList)\n\t\t\t\tSystem.out.println(selection);\n\t\t}\n\t}",
"@Override\n public Object evaluateBindings(@NotNull BindingsType bindingType,\n @NotNull List<? extends ModularDataModel> models) {\n switch (bindingType) {\n case CONSENSUS: {\n Map<Integer, Integer> max = new HashMap<>();\n for (ModularDataModel model : models) {\n if (model != null) {\n Integer charge = model.get(this);\n max.merge(charge, 1, Integer::sum);\n }\n }\n Integer maxCharge = 0;\n Integer maxCount = 0;\n for (var entry : max.entrySet()) {\n if (entry.getValue() > maxCount) {\n maxCount = entry.getValue();\n maxCharge = entry.getKey();\n }\n }\n return maxCharge;\n }\n default:\n return super.evaluateBindings(bindingType, models);\n }\n }",
"public String StrongestWeapon() {\n\t\tString weapon = \"fists\";\n\t\tfor (Item temp: rooms.player.getItems()) {\t\t\t\t// Goes through all items in bag\n\t\t\tif (temp.getID() == \"pocket knife\" && !weapon.equals(\"wrench\")){ // Has pocket knife\n\t\t\t\tweapon = \"pocket knife\";\n\t\t\t}else if (temp.getID() == \"wrench\"){\t\t\t\t// Has wrench\n\t\t\t\tweapon = \"wrench\";\n\t\t\t}else if (temp.getID() == \"sword\"){\t\t\t\t\t// Has sword\n\t\t\t\treturn \"sword\";\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\treturn weapon;\n\t}",
"public String getBestClassByClassification(Features features,\r\n\t\t\tFileOneByOneLineWriter writer) {\r\n\t\tdouble[] categoryProb = getClassProbByClassification(features, writer);\r\n\t\tdouble maximumProb = -Double.MAX_VALUE;\r\n\t\tint maximumIndex = -1;\r\n\t\tfor (int i = 0; i < categoryProb.length; ++i) {\r\n\t\t\tif (maximumProb < categoryProb[i]) {\r\n\t\t\t\tmaximumProb = categoryProb[i];\r\n\t\t\t\tmaximumIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mCategories[maximumIndex];\r\n\t}",
"private void mostValuePerWeightFirst(Instance instance) {\n ArrayList<Pair> order = new ArrayList<Pair>();\n\n for (int i = 0; i < instance.getSize(); i++) {\n order.add(i, new Pair(i, instance.getValue(i), instance.getWeight(i)));\n }\n\n // Sort items according to c_i/w_i >= c_i+1/w_i+1\n order.sort(new Comparator<Pair>() {\n @Override\n public int compare(Pair o1, Pair o2) {\n return o1.compareTo(o2) * -1;\n }\n });\n\n setSolution(order);\n }",
"protected void computeOWLOntologyObjectPropertyUsage(){\n\t\tfor(OWLOntology ont : super.getOntologies()){\n\t\t\tfor(OWLObjectProperty prop : ont.getObjectPropertiesInSignature()){\n\t\t\t\t\n\t\t\t\tint objectPropUsageInt = getOWLObjectPropertyUsage(prop);\n\t\t\t\t\n\t\t\t\tobjectPropertyUsageMap.put(prop, objectPropUsageInt);\n\t\t\n\t\t\t\t//find the class with the maximum usage \n\t\t\t\t//In these exclude the owl:thing class because\n\t\t\t\t//this information is redundant \n\t\t\t\tif (!prop.isTopEntity()) {\n\t\t\t\t\tif(max < objectPropUsageInt){\n\t\t\t\t\t\tmax = objectPropUsageInt;\n\t\t\t\t\t\tpropertyWithMaxUsage = prop;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public String toString() {\n return getName() + \" max:\" + getUpper(); //TODO needs a better toString()\n\n }",
"public int fitness(ArrayList<Integer> fitnessCases) {\n\t\tif (this.fitnessCases == fitnessCases) return fitness; // cache hit\n\n\t\tint fitness = 0;\n\t\tfor (int c : fitnessCases) {\n\t\t\tValuation v = new Valuation(c, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t// cache these values:\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = fitnessCases;\n\t\treturn fitness;\n\t}",
"public Individual getBest() {\n\t\treturn individuals[0];\n\t}",
"Map <String,Integer> RepresentationBinaire(BasicSet A){\r\n\t\tMap<String,Integer> bit=new TreeMap<String,Integer>();\r\n\t\tVector<String> v=context.getAttributes();\t\t\r\n\t\tBasicSet attributes=new BasicSet();\r\n\t\tattributes.addAll(v);\r\n\r\n\t\tfor(String item: attributes )\r\n\t\t{\r\n\t\t\tbit.put(item,0);\t\t\r\n\t\t}\r\n\t\tfor(String item: attributes)\r\n\t\t{\t\t\r\n\t\t\tfor(String it: A){\t\r\n\t\t\t\tif(it.equals(item)){\r\n\t\t\t\t\tbit.put(item,1);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn bit;\r\n\t}",
"public int \r\nomStudent_dHighSAT_Score( View mStudent,\r\n String InternalEntityStructure,\r\n String InternalAttribStructure,\r\n Integer GetOrSetFlag )\r\n{\r\n double dTotalComposite = 0.0;\r\n\r\n\r\n //:CASE GetOrSetFlag\r\n switch( GetOrSetFlag )\r\n { \r\n //:OF zDERIVED_GET:\r\n case zDERIVED_GET :\r\n\r\n //:ComputeHighExamScoreSAT( dTotalComposite, mStudent )\r\n //:StoreValueInRecord ( mStudent,\r\n //: InternalEntityStructure, InternalAttribStructure, dTotalComposite, 0 )\r\n StoreValueInRecord( mStudent, InternalEntityStructure, InternalAttribStructure, dTotalComposite, 0 );\r\n break ;\r\n\r\n //: /* end zDERIVED_GET */\r\n //:OF zDERIVED_SET:\r\n case zDERIVED_SET :\r\n break ;\r\n } \r\n\r\n\r\n //: /* end zDERIVED_SET */\r\n //:END /* case */\r\n return( 0 );\r\n// END\r\n}",
"public String getBestMovie() {\n\t\tdouble highestRating = 0;\n\t\tString bestMovie = \"\";\n\t\tfor(Movie movie : this.movieList) {\n\t\t\tif(movie.getRating() > highestRating) {\n\t\t\t\thighestRating = movie.getRating();\n\t\t\t\tbestMovie = movie.getName();\n\t\t\t}\n\t\t}\n\t\treturn bestMovie;\n\t}",
"private ArrayList<Vector2i> getBestUsingStd(ArrayList<ArrayList<Vector2i>> trueClusters) {\n\t\tdouble stdBest = Double.MAX_VALUE;\n\t\tint posBest = -1;\n\t\t\n\t\tint idx = 0;\n\t\tfor (ArrayList<Vector2i> group : trueClusters) {\n\t\t\tDescriptiveStatistics ds = new DescriptiveStatistics();\n\t\t\tfor (Vector2i vec : group) {\n\t\t\t\tds.addValue(vec.y);\n\t\t\t}\n\t\t\tdouble std = ds.getStandardDeviation();\n\t\t\tif (std < stdBest) {\n\t\t\t\tstdBest = std;\n\t\t\t\tposBest = idx;\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t\treturn trueClusters.get(posBest);\n\t}",
"private String getAmountOfAbsencePerClass(List<String> classNames)\n {\n String stringToPrint = \"\";\n\n for (String name : DifferentClasses)\n {\n if (Collections.frequency(classNames, name) != 0)\n {\n stringToPrint += name + \" (\" + Collections.frequency(classNames, name) + \")\\n\";\n }\n }\n return stringToPrint;\n }",
"private static int compareWeighted(ArrayList<ActivityItem> trace, HashMap<Integer, ActivityPrediction> model) {\n Iterator traceIterator = trace.iterator();\n ActivityPrediction predictionItem = null;\n ActivityItem currentTraceItem;\n int result = 0;\n int traceID;\n if (traceIterator.hasNext()) {\n// get the current item in the trace and get the actual model id from it (needed to distinguish between AM and PM)\n currentTraceItem = (ActivityItem) traceIterator.next();\n traceID = ProcessMiningUtil.getProcessModelID(currentTraceItem.getStarttime(), currentTraceItem.getActivityId(), currentTraceItem.getSubactivityId());\n// find start node of the model representation\n// if (model.containsKey(Fitness.getStartID(model))) {\n if (model.containsKey(9990)) {\n predictionItem = model.get(Fitness.getStartID(model));\n }\n if (Fitness.nextActivityPossible(traceID, predictionItem.getEdgeTargetMap())) {\n predictionItem = model.get(traceID);\n }\n while (predictionItem.getActivityID() == traceID && traceIterator.hasNext()) {\n currentTraceItem = (ActivityItem) traceIterator.next();\n traceID = ProcessMiningUtil.getProcessModelID(currentTraceItem.getStarttime(), currentTraceItem.getActivityId(), currentTraceItem.getSubactivityId());\n if (Fitness.nextActivityPossible(traceID, predictionItem.getEdgeTargetMap())) {\n predictionItem = model.get(traceID);\n } else {\n result = 0;\n break;\n }\n if (!traceIterator.hasNext()) {\n// if (Fitness.nextActivityPossible(Fitness.getEndID(model), predictionItem.getEdgeTargetMap())) {\n if (Fitness.nextActivityPossible(9991, predictionItem.getEdgeTargetMap())) {\n result = 1;\n break;\n }\n }\n }\n }\n return result;\n }",
"public ResourceType getMaxResource() {\n if (food >= energy && food >= ore) {\n return ResourceType.FOOD;\n } else if (energy >= food && energy >= ore) {\n return ResourceType.ENERGY;\n } else {\n return ResourceType.ORE;\n }\n }",
"public static NLMeaning findMaxProbabilityMeaning(Set<NLMeaning> meanings) {\n\t\tNLMeaning maxMeaning = null;\n\t\tIterator<NLMeaning> itMeanings = meanings.iterator();\n\t\twhile (itMeanings.hasNext()) {\n\t\t\tNLMeaning meaning = itMeanings.next();\n\t\t\tif (maxMeaning == null) {\n\t\t\t\tmaxMeaning = meaning;\n\t\t\t} else {\n\t\t\t\tmaxMeaning = pickMaxProbabilityMeaning(maxMeaning, meaning);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn maxMeaning;\n\t}",
"public List<OWLObject> search(OWLObject queryObj) {\n\t\tList<OWLObject> hits = new ArrayList<OWLObject>(maxHits);\n\t\tSystem.out.println(\"gettings atts for \"+queryObj+\" -- \"+simEngine.comparisonProperty);\n\t\tSet<OWLObject> atts = simEngine.getAttributeClosureFor(queryObj);\n\t\tSystem.out.println(\"all atts: \"+atts.size());\n\t\tif (atts.size() == 0)\n\t\t\treturn hits;\n\t\t\n\t\t// only compare using significant atts;\n\t\t// we don't do the same test on candidates as these will be removed by the\n\t\t// intersection operation. they will have a small effect on the score, as\n\t\t// we don't divide by the union, but instead the sum of sizes\n\t\tatts = filterNonSignificantAttributes(atts);\n\t\tSystem.out.println(\"filtered atts: \"+atts.size());\n\n\t\t//bloomFilter = new BloomFilter<OWLObject>(0.05, atts.size());\n\t\t//bloomFilter.addAll(atts);\n\t\t\t\t\n\t\tSortedMap<Integer,Set<OWLObject>> scoreCandidateMap = new TreeMap<Integer,Set<OWLObject>>();\n\t\t\n\t\tfor (OWLObject candidate : getCandidates()) {\n\t\t\tif (candidate.equals(queryObj))\n\t\t\t\tcontinue;\n\t\t\tSet<OWLObject> iAtts = simEngine.getAttributeClosureFor(candidate);\n\t\t\t//Set<OWLObject> iAtts = simEngine.getGraph().getAncestors(candidate);\n\n\t\t\tif (iAtts.size() == 0)\n\t\t\t\tcontinue;\n\t\t\tint cAttsSize = iAtts.size();\n\t\n\t\t\tiAtts.retainAll(atts);\n\t\t\t//Collection<OWLObject> iAtts = bloomFilter.intersection(cAtts);\n\t\t\t\n\t\t\t// simJ, one-sided, scaled by 1000\n\t\t\t// negate to ensure largest first\n\t\t\t//Integer score = - (iAtts.size() * 1000 / cAttsSize);\n\t\t\t\n\t\t\t// this biases us towards genes with large numbers of annotations,\n\t\t\t// but it is better at finding the models that share all features\n\t\t\tInteger score = - iAtts.size();\n\t\t\tif (!scoreCandidateMap.containsKey(score)) \n\t\t\t\tscoreCandidateMap.put(score, new HashSet<OWLObject>());\n\t\t\tscoreCandidateMap.get(score).add(candidate);\n\t\t\treporter.report(this,\"query_candidate_overlap_total\",queryObj,candidate,iAtts.size(),cAttsSize);\n\t\t}\n\t\t\n\t\tint n = 0;\n\t\tfor (Set<OWLObject> cs : scoreCandidateMap.values()) {\n\t\t\tn += cs.size();\n\t\t\thits.addAll(cs);\n\t\t}\n\t\t\n\t\tn = 0;\n\t\tfor (OWLObject hit : hits) {\n\t\t\tn++;\n\t\t\treporter.report(this,\"query_hit_rank_threshold\",queryObj,hit,n,maxHits);\n\t\t}\n\t\tif (hits.size() > maxHits)\n\t\t\thits = hits.subList(0, maxHits);\n\t\t\n\n\n\t\treturn hits;\n\t}",
"public Staff findHighestEarningLabour() {\n Staff highest = new Labourer(null,0,null,0,0);\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() >= ((Labourer)highest).getWage()){\n highest = staffList[i];\n }\n }\n }\n return highest;\n }",
"public Sight getMaxCountCityName(List<OptionSight> optionSights, int minLimit) {\n\t\tHashMap<String, Integer> cityMap = new HashMap<String, Integer>();\n\t\t// get cities of sights\n\t\tfor (OptionSight optionSight : optionSights) {\n\t\t\tint optionSize = optionSight.getOptionSights().size();\n\t\t\tif (optionSize == 1) { // no consider multiple alias names\n\t\t\t\tSight sight = optionSight.getOptionSights().get(0);\n\t\t\t\tSight city = sight.getCity();\n\t\t\t\tif (city != null && sight.getName().length() > 2) {\n\t\t\t\t\tInteger count = 1;\n\t\t\t\t\tif (cityMap.containsKey(city.getName())) {\n\t\t\t\t\t\tcount = cityMap.get(city.getName()) + 1;\n\t\t\t\t\t}\n\t\t\t\t\tcityMap.put(city.getName(), count);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint maxCount = -1;\n\t\tString maxCountCityName = \"\";\n\t\tIterator it = cityMap.keySet().iterator(); \n\t\twhile(it.hasNext()) { \n\t\t\tString cityName = (String)it.next();\n\t\t\tint count = cityMap.get(cityName);\n\t\t\tif (count > maxCount) {\n\t\t\t\tmaxCount = count;\n\t\t\t\tmaxCountCityName = cityName;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (maxCount >= minLimit) { // the limit\n\t\t\treturn dict.getFirstSightByName(maxCountCityName);\n\t\t} \n\t\t\n\t\treturn null;\n\t}",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(new FileReader(\"talent.in\"));// new InputStreamReader(System.in)); //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"talent.out\")));\n int N = sc.nextInt();\n int minWeight = sc.nextInt();\n int[] weight = new int[N];\n int[] value = new int[N];\n int totalTalent = 0;\n for (int i = 0; i < N; i++) {\n int wt = sc.nextInt();\n int val = sc.nextInt();\n weight[i] = wt;\n value[i] = val;\n totalTalent += val;\n }\n\n // Store, for a given talent, what is the smallest weight used to achieve it?\n int[] dp = new int[totalTalent + 1];\n Arrays.fill(dp, (int) 1e9);\n dp[0] = 0;\n // the min weight to produce 0 talent is 0. However,\n // it is necessary to make everything else big because we can only BUILD\n // from 0\n double bestRatio = 0;\n for (int cow = 0; cow < N; cow++) {\n // look at each cow, and go DOWN THROUGH THE dp array, updating the\n // best weight achievable BEHIND US. This countercurrent motion ensures no repeated\n // counting of a single cow's talents\n int contribution = value[cow];\n int wt = weight[cow];\n for (int talent = totalTalent; talent >= 0; talent--) {\n int boostedTalent = contribution + talent;\n int boostedWeight = dp[talent] + wt;\n // with the min weight of a certain talent,\n // is it possible to get a smaller boostedWeight for a boostedTalent\n if (boostedTalent <= totalTalent) {\n // If we are in bounds,\n if (boostedWeight < dp[boostedTalent]) {\n // and the attempted team has a better weight value\n // then update it!\n // Initially, when everything is 1 billion, this cannot\n // happen except for from the base cases, building outward\n dp[boostedTalent] = boostedWeight;\n\n // At the same time, we can be more efficient by constantly\n // checking if we had enough weight first of all, and\n // second of all had a better talent/weight ratio!\n double ratio = (double) boostedTalent / boostedWeight;\n if (ratio > bestRatio && boostedWeight >= minWeight) {\n bestRatio = ratio;\n }\n }\n }\n }\n }\n\n out.println((int) (1000 * bestRatio));\n out.close();\n }",
"public int getMaxLevel() {\r\n int maxLev = 0;\r\n for (final Category name : map.keySet()) {\r\n if (name.categories.size() > maxLev) {\r\n maxLev = name.categories.size();\r\n }\r\n }\r\n return maxLev;\r\n }",
"public static int mostMoney(int[][] a) { \n double[] totals = new double[3]; \n double rowTotal = 0.0;\n double rowTotal1 = 0.0;\n double rowTotal2 = 0.0;\n \n \n for(int i = 0; i<4; i++){\n rowTotal += a[0][i];\n totals[0] = rowTotal;}\n \n for(int j = 0; j<4; j++){\n rowTotal1 += a[1][j];\n totals[1] = rowTotal1;}\n \n for(int k = 0; k<4; k++){\n rowTotal2 += a[0][k];\n totals[2] = rowTotal2;}\n \n int indexOfBest=0; //used to find index of best year\n double best = totals[0];\n for(int i =0; i < 3; i++) {\n if(totals[i] >= best){\n best = totals[i];\n indexOfBest = i;}\n \n } return indexOfBest;\n }",
"public static void findMinMax(Student[] student){\n int minMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find min value of midterm because I describe first index of midterm value in array\n int maxMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find max value of midterm because I describe first index of midterm value in array\n int minFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find min value of final because I describe first index of final value in array\n int maxFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find max value of final because I describe first index of final value in array\n\n for(int i=0;i<student.length;i++){\n if(student[i].getExamGrade().getMidtermExamGrade()<minMidterm){ // this condution find min value of midterm until this step \n minMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getMidtermExamGrade()>maxMidterm){// this condution find max value of midterm until this step \n maxMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()<minFinal){// this condution find min value of final until this step \n minFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()>maxFinal){// this condution find max value of final until this step \n maxFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n }\n\n System.out.println(\"Maximum Midterm Exam Grade: \"+maxMidterm+\" Minumum Midterm Exam Grade: \"+minMidterm);\n System.out.println(\"Maximum Final Exam Grade: \"+maxFinal+\" Minumum Final Exam Grade: \"+minFinal);\n }",
"public static TempResult max(int allowedWeight, Set<Item> items) {\n\t\tint[] values=new int[items.size()];\n\t\tint[] weights=new int[items.size()];\n\t\t\n\n\t\tArrayList<Item> items2=new ArrayList<Item>(items);\n\t\tfor (int i=0; i<items2.size(); i++) {\n\t\t\tvalues[i]=items2.get(i).value;\n\t\t\tweights[i]=items2.get(i).weight;\n\t\t}\n\t\t\n int[][] totalValue = new int[values.length+1][allowedWeight+1];\n boolean[][] includedorNot = new boolean[values.length+1][allowedWeight+1];\n \n //We introduce item one by one to the system.\n //For each introduced item, we consider the maximal profit\n //for weight=[0:allowedWeight]\n for (int i=0; i<values.length; i++) {\n \t//introduce item i into the system.\n \tint val=values[i];\n \tint weight=weights[i];\n \t\n \tint itemIndex=i+1;\n \t\n \tfor (int w=1; w<=allowedWeight; w++) {\n \t\t\n \t\t//Zero copy of ith item; i-1 is calculated already\n \t\tint profit1=totalValue[itemIndex-1][w];\n \t\t\n \t\t//one copy of ith item.\n \t\tint profit2=Integer.MIN_VALUE;\n \t\tif (w-weight>=0) {\n \t\t\t//for a particular targeted weight, add item i does not overflow the targeted weight.\n \t\t\tprofit2=totalValue[itemIndex-1][w-weight]+val;\n \t\t}\n \t\t\n \t\tif (profit1>profit2) {\n \t\t\tincludedorNot[itemIndex][w]=false;\n \t\t\ttotalValue[itemIndex][w]=profit1;\n \t\t} else {\n \t\t\tincludedorNot[itemIndex][w]=true;\n \t\t\ttotalValue[itemIndex][w]=profit2;\n \t\t}\n \t}\n }\n\t\t\n \n TempResult result=new TempResult(0, 0);\n result.value=totalValue[values.length][allowedWeight];\n result.items=new LinkedList<>();\n int w=allowedWeight;\n for (int itemIndex=values.length; itemIndex>0; itemIndex--) {\n \tif (includedorNot[itemIndex][w]) {\n \t\tresult.items.add(items2.get(itemIndex-1));\n \t\tw=w-weights[itemIndex-1];\n \t} \n }\n \n return result;\n \n\t}",
"public String biggestSet(HashMap<String, TreeSet<String>> myMap){\n\t\tString testKey = \"\";\n\t\tString biggestKey = \"\";\n\t\tIterator<Entry<String, TreeSet<String>>>\n\t\titer= myMap.entrySet().iterator();\n\n\t\tTreeSet<String> largestFamily = new TreeSet<String>();\n\t\tTreeSet<String> test;\n\n\t\twhile(iter.hasNext()){\n\t\t\ttestKey = iter.next().getKey();\n\t\t\ttest = myMap.get(testKey);\n\t\t\tif(test.size()>largestFamily.size()){\n\t\t\t\tlargestFamily = test;\n\t\t\t\tbiggestKey = testKey;\n\t\t\t}\n\t\t}\n\t\treturn biggestKey;\n\t}",
"private <T> GeneticResult<T> maxFitness(List<Chromosome<T>> chromosomes, int totalBreedings){\n\t\tChromosome<T> bestFit = fittestChromosome(chromosomes);\n\t\treturn new GeneticResult<T>(bestFit, bestFit.getFitness(), totalBreedings);\n\t}",
"private static void maxDuffelBagValue(JSONArray cakeTypes, int capacity) {\n for (int i = 0; i < cakeTypes.length(); i++) {\n \tJSONObject cakeType = (JSONObject) cakeTypes.remove(i);\n \tif (cakeType.getInt(\"weight\") <= capacity) {\n \t\tval += cakeType.getInt(\"value\");\n \t\tcapacity -= cakeType.getInt(\"weight\");\n \t\tmaxDuffelBagValue(cakeTypes, capacity);\n\t\t\t}\n }\n\t}",
"private void findBest()\r\n\t{\r\n\t\tint i;\r\n\t\tint size_mature_pool;\r\n\t\tint idx_current;//index of a currently checked genotype\r\n\t\tint num_errors;//number of errors of the current chromosome\r\n\t\tdouble min_error;//smallest error among the oldest genotypes\r\n\t\tVector<Integer> idx_oldest;\r\n\t\t\r\n\t\tsize_mature_pool = _pool_of_bests.size();\r\n\t\t\r\n\t\tidx_oldest = new Vector<Integer>(0, 1);\r\n\t\t\r\n\t\t//find all oldest genotypes\r\n\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t{\r\n\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\tif(num_errors>=_min_life_span)\r\n\t\t\t{\r\n\t\t\t\tidx_oldest.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//find the best oldest gentypes with a span above a threshold\r\n\t\t_best_idx = -1;\r\n\t\tif(idx_oldest.size() > 0)\r\n\t\t{\r\n\t\t\t_best_idx = idx_oldest.get(0);\r\n\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\tfor(i=1; i<idx_oldest.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tidx_current = idx_oldest.get(i);\r\n\t\t\t\tif(min_error > _pool_of_bests.get(idx_current)._error.getAverageError())\r\n\t\t\t\t{\r\n\t\t\t\t\t_best_idx = idx_current;\r\n\t\t\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int getFishingSkill();",
"private Instances handleEnumeratedAttribute(Instances trainInstances)\r\n\t\t\tthrows Exception {\n\r\n\t\tInstance instance;\r\n\r\n\t\tm_distribution = new Distribution(m_complexityIndex,\r\n\t\t\t\ttrainInstances.numClasses());\r\n\r\n\t\t// TODO get instances by class\r\n//\r\n//\t\tList<Instances> classSeparatedInstances = WekaUtils\r\n//\t\t\t\t.getClassSeparatedInstances(trainInstances);\r\n//\r\n//\t\t// TODO look for common properties connected by the same connection\r\n//\t\t// types in the current attribute\r\n//\t\t\r\n//\t\t//TODO look for properties that are different but don't play role in the classification as \r\n//\t\t//instances belong to the same class\r\n//\r\n//\t\tWekaUtils.getCommonAttributes(classSeparatedInstances, m_attIndex);\r\n\r\n\t\t// TODO Use the new properties to check if the information gain improves\r\n\r\n\t\t// TODO what about numeric attributes/properties\r\n\r\n\t\t// Look for better attributes\r\n\t\tEnumeration<Instance> enumer = trainInstances.enumerateInstances();\r\n\t\twhile (enumer.hasMoreElements()) {\r\n\t\t\tinstance = enumer.nextElement();\r\n\t\t\tif (!instance.isMissing(m_attIndex)) {\r\n\r\n\t\t\t\t// Model model = ModelFactory.createDefaultModel().read(uri);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Check if minimum number of Instances in at least two\r\n\t\t// subsets.\r\n\t\tif (m_distribution.check(m_minNoObj)) {\r\n\t\t\tm_numSubsets = m_complexityIndex;\r\n\t\t\tm_infoGain = infoGainCrit.splitCritValue(m_distribution,\r\n\t\t\t\t\tm_sumOfWeights);\r\n\t\t\tm_gainRatio = gainRatioCrit.splitCritValue(m_distribution,\r\n\t\t\t\t\tm_sumOfWeights, m_infoGain);\r\n\t\t}\r\n\r\n\t\treturn trainInstances;\r\n\r\n\t}",
"public double getBestScore();",
"private int majority(int x, int y, int z){\n return (x & y) | (x & z) | (y & z);\n }",
"public ArrayList<Configuration> choixMax()\r\n\t{\r\n\t\tArrayList<Configuration> Filles=ConfigurationsFilles();\r\n\t\tArrayList<Configuration> FillesMax = new ArrayList<>();\r\n\t\tif(Filles==null) return null;\r\n\t\tint max = Filles.get(0).maxscore;\r\n\t\tfor(Configuration c : Filles)\r\n\t\t{\r\n\t\t\tif(max == c.maxscore)\r\n\t\t\t{\r\n\t\t\t\tFillesMax.add(c);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FillesMax;\r\n\t}",
"private double[] chooseBestMove(List<double[]> possibleMoves) {\n double bestScore = 0;\n int indexBest = 0;\n for (int i = 0; i < possibleMoves.size(); i++) {\n if (possibleMoves.get(i)[4] > bestScore) {\n bestScore = possibleMoves.get(i)[4];\n indexBest = i;\n }\n }\n return possibleMoves.get(indexBest);\n }",
"Object getMaximumValue(Object elementID) throws Exception;",
"private static @Nullable Integer commonMax(List<ArgumentCount> counts) {\n // max=5, max=3, max=0 -> max=5\n // max=5, max=3, max=0, max=null -> max=null\n int commonMax = Integer.MIN_VALUE;\n for (ArgumentCount count : counts) {\n final Optional<Integer> max = count.getMaxCount();\n if (!max.isPresent()) {\n return null;\n }\n commonMax = Math.max(commonMax, max.get());\n }\n if (commonMax == Integer.MIN_VALUE) {\n return null;\n }\n return commonMax;\n }",
"abstract int getMaxLevel();",
"public int selectionFunctionBiggestCoin(MyList<Integer> candidates){\n\n\t\t//-----------------------------\n\t\t//Output Variable --> InitialValue\n\t\t//-----------------------------\n\t\tint res = -1;\n\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\t\tint maxWeight = Integer.MIN_VALUE;\n\t\tint index = candidates.length() - 1;\n\n\n\t\twhile (index >= 0) {\n\t\t\t// OP1.1. Auxiliary variables:\n\t\t\t// We use 'e0' to compute the first item of 'candidate' just once.\n\t\t\tint e0 = candidates.getElement(index);\n\n\t\t\t// OP1.1. If a not previously considered item improves minWeight, we\n\t\t\t// update 'res' and 'minWeight'\n\t\t\tif (e0 > maxWeight) {\n\t\t\t\tres = index;\n\t\t\t\tmaxWeight = e0;\n\t\t\t}\n\n\t\t\t// OP1.2. We decrease 'index' so as to try the previous item of\n\t\t\t// 'candidates'\n\t\t\tindex--;\n\t\t}\n\n\t\t//-----------------------------\n\t\t//Output Variable --> Return FinalValue\n\t\t//-----------------------------\t\t\n\t\treturn res;\t\t\n\t}",
"private void findIdealSuitAndRank() {\n Map<Card.Suit, Integer> suitsInHand = new HashMap<Card.Suit, Integer>();\n Map<Card.Rank, Integer> ranksInHand = new HashMap<Card.Rank, Integer>();\n\n // Use the enumerable methods in Card class to put all the keys in the HashMaps\n for (Card.Suit suit : Card.Suit.values()) {\n suitsInHand.put(suit, 0);\n }\n for (Card.Rank rank : Card.Rank.values()) {\n ranksInHand.put(rank, 0);\n }\n\n // Place all cards played in their respective locations in the HashMap\n for (Card card : cardsInHand) {\n suitsInHand.put(card.getSuit(), suitsInHand.get(card.getSuit()) + 1);\n ranksInHand.put(card.getRank(), ranksInHand.get(card.getRank()) + 1);\n }\n /**\n * The following for loop was derived from\n * https://stackoverflow.com/questions/5911174/finding-key-associated-with-max-value-in-a-java-map\n * for finding the key with the max value in a HashMap.\n */\n Map.Entry<Card.Suit, Integer> maxEntrySuit = null;\n for (Map.Entry<Card.Suit, Integer> entry : suitsInHand.entrySet()) {\n if (maxEntrySuit == null || entry.getValue().compareTo(maxEntrySuit.getValue()) > 0) {\n maxEntrySuit = entry;\n }\n }\n idealSuit = maxEntrySuit.getKey();\n\n Map.Entry<Card.Rank, Integer> maxEntryRank = null;\n for (Map.Entry<Card.Rank, Integer> entry : ranksInHand.entrySet()) {\n if (maxEntryRank == null || entry.getValue().compareTo(maxEntryRank.getValue()) > 0) {\n maxEntryRank = entry;\n }\n }\n idealRank = maxEntryRank.getKey();\n }",
"public Card.Face getHighestCard(){\n return uniqueFaces.getFirst();\n }",
"private int largestCard(Card[] cards) {\n int i;\n\n // Initialize maximum element\n int max = 0;\n\n // Traverse array elements from second and\n // compare every element with current max\n for (i = 1; i < cards.length; i++)\n if (cards[i].getDenomination() > cards[max].getDenomination())\n max = i;\n\n return max;\n }",
"@Test\r\n\tvoid testCapitalEfficiency() throws IOException {\r\n\t\tStock stock = new Stock(ticker);\r\n\t\tFMPWebReaderFilter adder = new FMPWebReaderFilter();\r\n\t\tstock.setProfile(adder.getStockDetails(stock.getTicker()));\r\n\t\tstock.setCapEff(Evaluator.getCapitalEfficiency(stock));\r\n\t\tassertEquals(\"18\", stock.getCapEff());\r\n\t}"
] |
[
"0.6499191",
"0.5765308",
"0.54022",
"0.53552985",
"0.5194244",
"0.518922",
"0.5189157",
"0.51846284",
"0.51598316",
"0.515874",
"0.51391286",
"0.5137646",
"0.51013863",
"0.5096742",
"0.50918394",
"0.5072064",
"0.50668865",
"0.5064764",
"0.5051296",
"0.502816",
"0.5004011",
"0.5002979",
"0.5002884",
"0.49963334",
"0.49943677",
"0.49917513",
"0.49860668",
"0.49642858",
"0.49613488",
"0.49607334",
"0.49587843",
"0.49489167",
"0.494673",
"0.4936155",
"0.492645",
"0.4920641",
"0.4898175",
"0.48867172",
"0.48855898",
"0.48776007",
"0.48691747",
"0.4868183",
"0.48571914",
"0.48504296",
"0.4850114",
"0.48492646",
"0.48439237",
"0.4841088",
"0.4840702",
"0.4833465",
"0.4828866",
"0.4824555",
"0.48242405",
"0.48052245",
"0.48031542",
"0.48010173",
"0.47956514",
"0.47873268",
"0.47779155",
"0.4777631",
"0.47747868",
"0.4770026",
"0.47686115",
"0.47661814",
"0.47627744",
"0.47586364",
"0.47576326",
"0.47523624",
"0.47484455",
"0.4735996",
"0.47329846",
"0.4731959",
"0.47304758",
"0.47271088",
"0.47084147",
"0.4707615",
"0.47047064",
"0.46991742",
"0.46979368",
"0.4694993",
"0.4692235",
"0.46903038",
"0.46853754",
"0.46761906",
"0.46751165",
"0.4674345",
"0.46722785",
"0.4671288",
"0.4666037",
"0.46638268",
"0.46622738",
"0.4659892",
"0.46590072",
"0.46493432",
"0.46459258",
"0.46434304",
"0.4642729",
"0.46393454",
"0.46381742",
"0.4630326"
] |
0.7323549
|
0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.