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
Gets the process id.
public String getProcessId() { return processId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final int getProcessId() {\n\t\treturn ID;\n\t}", "public final int getProcessId() {\n\t\treturn this.processId;\n\t}", "public java.lang.String getProcessId() {\n return processId;\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "public long getProcessID() {\n return processID;\n }", "java.lang.String getProcessId();", "public abstract long getProcessID();", "public String getProcessID()\n {\n return processID;\n }", "public final int getProcessId() {\n \treturn m_pid;\n }", "public static String getPid() {\n\t\tString name = ManagementFactory.getRuntimeMXBean().getName(); \n\t\t// get pid \n\t\treturn name.split(\"@\")[0];\n\t}", "String getProcessInstanceID();", "String getPid();", "protected String getProcessId() {\n return getClass().getName();\n }", "public static String getPid() {\n String retVal = \"-\";\n Vector<String> commands = new Vector<String>();\n commands.add(\"/bin/bash\");\n commands.add(\"-c\");\n commands.add(\"echo $PPID\");\n ProcessBuilder pb = new ProcessBuilder(commands);\n try {\n Process pr = pb.start();\n pr.waitFor();\n if (pr.exitValue() == 0) {\n BufferedReader outReader = new BufferedReader(\n new InputStreamReader(pr.getInputStream()));\n retVal = outReader.readLine().trim();\n }\n } catch (Exception e) {\n }\n return retVal;\n }", "public static int getPID() {\n return Integer.parseInt(ManagementFactory.getRuntimeMXBean().getName().split(\"@\")[0]);\n }", "public String getUniqueProcessId() {\n\t\treturn uniqueProcessId;\n\t}", "public int get_process_number() {\n\t\treturn process_number;\n\t}", "public Integer processInfoId() {\n return this.processInfoId;\n }", "public int getPid() {\n return pid;\n }", "public String getPid() {\n return pid;\n }", "static String getMyPid() {\n String pid = \"0\";\n try {\n final String nameStr = ManagementFactory.getRuntimeMXBean().getName();\n\n // XXX (bjorn): Really stupid parsing assuming that nameStr will be of the form\n // \"pid@hostname\", which is probably not guaranteed.\n pid = nameStr.split(\"@\")[0];\n } catch (RuntimeException e) {\n // Fall through.\n }\n return pid;\n }", "public String getPid() {\n\t\treturn pid;\n\t}", "public String getPid() {\r\n return pid;\r\n }", "@NativeType(\"pid_t\")\n public static long getpid() {\n long __functionAddress = Functions.getpid;\n return invokeP(__functionAddress);\n }", "public Integer getPid() {\n return pid;\n }", "public Integer getPid() {\n return pid;\n }", "public Integer getPid() {\n return pid;\n }", "public Integer getPid() {\n return pid;\n }", "public String getPid() {\r\n return this.pid;\r\n }", "com.google.protobuf.ByteString getProcessIdBytes();", "public Long getPid() {\n return pid;\n }", "public Long getId() {\n return pid;\n }", "@Override\n\tpublic int getPID() {\n\t\treturn pID;\n\t}", "public YangUInt32 getProcessPidValue() throws JNCException {\n return (YangUInt32)getValue(\"process-pid\");\n }", "public int getProcID() {\n\t\treturn procID;\n\t}", "public static Long getPid() {\n String name = ManagementFactory.getRuntimeMXBean().getName();\n List<String> nameParts = Splitter.on('@').splitToList(name);\n if (nameParts.size() == 2) { // 12345@somewhere\n try {\n return Long.parseLong(Iterators.get(nameParts.iterator(), 0));\n } catch (NumberFormatException ex) {\n LOG.warn(\"Failed to get PID from [\" + name + \"]\", ex);\n }\n } else {\n LOG.warn(\"Don't know how to get PID from [\" + name + \"]\");\n }\n return null;\n }", "int getpid();", "IPID getPID();", "public java.lang.String getPID() {\r\n return localPID;\r\n }", "public static String getProcessId(Path path) throws IOException {\n if (path == null) {\n throw new IOException(\"Trying to access process id from a null path\");\n }\n LOG.debug(\"Accessing pid from pid file {}\", path);\n String processId = null;\n BufferedReader bufReader = null;\n\n try {\n File file = new File(path.toString());\n if (file.exists()) {\n FileInputStream fis = new FileInputStream(file);\n bufReader = new BufferedReader(new InputStreamReader(fis, \"UTF-8\"));\n\n while (true) {\n String line = bufReader.readLine();\n if (line == null) {\n break;\n }\n String temp = line.trim(); \n if (!temp.isEmpty()) {\n if (Shell.WINDOWS) {\n // On Windows, pid is expected to be a container ID, so find first\n // line that parses successfully as a container ID.\n try {\n ContainerId.fromString(temp);\n processId = temp;\n break;\n } catch (Exception e) {\n // do nothing\n }\n }\n else {\n // Otherwise, find first line containing a numeric pid.\n try {\n long pid = Long.parseLong(temp);\n if (pid > 0) {\n processId = temp;\n break;\n }\n } catch (Exception e) {\n // do nothing\n }\n }\n }\n }\n }\n } finally {\n if (bufReader != null) {\n bufReader.close();\n }\n }\n LOG.debug(\"Got pid {} from path {}\",\n (processId != null ? processId : \"null\"), path);\n return processId;\n }", "public java.lang.String getProcessDefinitionId() {\n return processDefinitionId;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getProcessHistoryID() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(PROCESSHISTORYID_PROP.get());\n }", "private long determinePID(final Process p)\n {\n long pid = -1;\n\n try\n {\n // Unix variants incl. OSX\n if (p.getClass().getSimpleName().equals(\"UNIXProcess\"))\n {\n final Class<?> clazz = p.getClass();\n final Field pidF = clazz.getDeclaredField(\"pid\");\n\n pidF.setAccessible(true);\n\n Object oPid = pidF.get(p);\n\n if (oPid instanceof Number)\n {\n pid = ((Number) oPid).longValue();\n }\n else if (oPid instanceof String)\n {\n pid = Long.parseLong((String) oPid);\n }\n }\n\n // Windows processes, i.e. Win32Process or ProcessImpl\n else\n {\n RuntimeMXBean rtb = ManagementFactory.getRuntimeMXBean();\n final String sProcess = rtb.getName();\n final int iPID = sProcess.indexOf('@');\n\n if (iPID > 0)\n {\n String sPID = sProcess.substring(0, iPID);\n\n pid = Long.parseLong(sPID);\n }\n }\n }\n catch (SecurityException e)\n {\n }\n catch (NoSuchFieldException e)\n {\n }\n catch (IllegalArgumentException e)\n {\n }\n catch (IllegalAccessException e)\n {\n }\n\n return pid;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getProcessHistoryID() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(PROCESSHISTORYID_PROP.get());\n }", "private Long unixLikeProcessId(Process process) {\n Class<?> clazz = process.getClass();\n try {\n if (clazz.getName().equals(\"java.lang.UNIXProcess\")) {\n Field pidField = clazz.getDeclaredField(\"pid\");\n pidField.setAccessible(true);\n Object value = pidField.get(process);\n if (value instanceof Integer) {\n log.debug(\"Detected pid: \" + value);\n return ((Integer) value).longValue();\n }\n }\n } catch (SecurityException sx) {\n log.error(\"SecurityException: \", sx);\n } catch (NoSuchFieldException e) {\n log.error(\"NoSuchFieldException: \", e);\n } catch (IllegalArgumentException e) {\n log.error(\"IllegalArgumentException: \", e);\n } catch (IllegalAccessException e) {\n log.error(\"IllegalAccessException: \", e);\n }\n return null;\n }", "public int processIdOfActiveWindow()\r\n\t{\n\t\treturn 0;\r\n\t}", "private static int getPidForWindows(Process process)\n\t{\n\t\tint pid = -1;\n\t\tif (process.getClass().getName().equals(\"java.lang.Win32Process\") || process.getClass().getName().equals(\"java.lang.ProcessImpl\")) {\n\t\t\t/* determine the pid on windows plattforms */\n\t\t\ttry {\n\t\t\t\tField f = process.getClass().getDeclaredField(\"handle\");\n\t\t\t\tf.setAccessible(true);\n\t\t\t\t// f.getInt(process);\n\t\t\t\tlong handl = f.getLong(process);\n\t\t\t\tKernel32 kernel = Kernel32.INSTANCE;\n\t\t\t\tW32API.HANDLE handle = new W32API.HANDLE();\n\t\t\t\thandle.setPointer(Pointer.createConstant(handl));\n\t\t\t\tpid = kernel.GetProcessId(handle);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tLOGGER.error(\"failed to get pid for process [ \" + process.toString() + \" ] : \" + e.getMessage(), e);\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\treturn pid;\n\t}", "String getProgramId();", "public native int getProcess();", "public String getPId() {\n return (String)getAttributeInternal(PID);\n }", "public String getProcessName() {\n return processName;\n }", "@AccessType(\"field\")\n @Column(name = \"PROC_INST_ID_\")\n public Long getProcessInstanceId() {\n return processInstanceId;\n }", "public String getProgramId() {\n return pathsProvider.getProgramId();\n }", "public String getNode_pid() {\r\n\t\treturn node_pid;\r\n\t}", "public Integer getProgramId();", "String getExecId();", "public final Process getProcess() {\n return process;\n }", "public static int getIdNumber() {\n return idNumber;\n }", "public String getProcessDescriptionId() {\r\n\t\treturn this.processDescriptionId;\r\n\t}", "public static final String getProcessName() {\n\t\treturn NAME;\n\t}", "public Process getProcess() {\n \t\treturn process;\n \t}", "public String getSessionId() {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return null;\n }\n return session.getId();\n }", "public static Process getProcess() {\r\n return (m_Proc);\r\n }", "public Process getProcess() {\n\t\treturn process;\n\t}", "private static int findRenderThreadId(@NotNull ProcessModel process) {\n Optional<ThreadModel> renderThread =\n process.getThreads().stream().filter((thread) -> thread.getName().equalsIgnoreCase(RENDER_THREAD_NAME)).findFirst();\n return renderThread.map(ThreadModel::getId).orElse(INVALID_PROCESS);\n }", "public String getExecId() {\n Object ref = execId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execId_ = s;\n }\n return s;\n }\n }", "private static int getPidForUnix(Process process)\n\t{\n\t\tint pid = -1;\n\t\tif (process.getClass().getName().equals(\"java.lang.UNIXProcess\")) {\n\t\t\t/* get the PID on unix/linux systems */\n\t\t\ttry {\n\t\t\t\tField f = process.getClass().getDeclaredField(\"pid\");\n\t\t\t\tf.setAccessible(true);\n\t\t\t\tpid = f.getInt(process);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tLOGGER.error(\"failed to get pid for process [ \" + process.toString() + \" ] : \" + e.getMessage(), e);\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\treturn pid;\n\t}", "public String getExecId() {\n Object ref = execId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n execId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public ServiceProcess getProcess() {\n\t\treturn this.process;\n\t}", "public static long getTopInterviewProcessId(long processInstanceId, WFAdminSession wfAdminSession) throws Exception {\t\n \tEPMHelper epmHelper = new EPMHelper();\n \n try {\n\t\t\tProcessInstance procInstance = epmHelper.getProcessInstance(processInstanceId, wfAdminSession);\n\t\t\t\n\t\t\tif (procInstance == null)\n\t\t\t\treturn -1;\n\t\t\telse\n\t\t\t{\t\t\n\t\t\t\tString templateName = procInstance.getPlanName();\n\t\t\t\t\n\t\t\t\tif (!isInterviewProcess(templateName))\n\t\t\t\t\treturn -1;\n\t\t\t\telse if (isInterviewTopProcess(templateName))\n\t\t\t\t\treturn procInstance.getId();\n\t\t\t\telse { //it is a telephonic-interview sub-process...\n\t\t\t\t long parentProcessInstanceId = procInstance.getParentProcessId();\n\t\t\t\t return getTopInterviewProcessId(parentProcessInstanceId, wfAdminSession);\n\t\t\t\t}\n\t\t\t}\n } catch (Exception e)\n {\n \treturn -1;\n }\n\t}", "public String getProcessName() throws RemoteException;", "public long getProcessOrderItemKey() {\n\t\treturn processOrderItemKey;\n\t}", "public PDDeviceNProcess getProcess() {\n/* 93 */ COSDictionary process = (COSDictionary)this.dictionary.getDictionaryObject(COSName.PROCESS);\n/* 94 */ if (process == null)\n/* */ {\n/* 96 */ return null;\n/* */ }\n/* 98 */ return new PDDeviceNProcess(process);\n/* */ }", "public long threadId();", "Process getProcess();", "protected Integer getIdProject() {\n\n return (Integer) getExtraData().get(ProcessListener.EXTRA_DATA_IDPROJECT);\n }", "public Process getProcess()\n {\n return proc;\n }", "protected Element setProcId(){\n\t\treturn el(\"bpws:copy\", new Node[]{\n\t\t\t\tel(\"bpws:from\", attr(\"expression\", \"abx:getProcessId()\")),\n\t\t\t\tel(\t\"bpws:to\", new Node[]{\n\t\t\t\t\t\tattr(\"variable\", VARNAME),\n\t\t\t\t\t\tattr(\"part\", \"part1\"),\n\t\t\t\t\t\tattr(\"query\", \"/nswomoxsd:receive/nswomoxsd:processId\")\n\t\t\t\t\t})\n\t\t});\n\t}", "public String getProcessCode() {\n \tif (isProcessDocumentNotNull()) {\n \t\treturn getProcessDocument().getDocCode();\n \t}\n\t\treturn processCode;\n\t}", "public List getProcessIds()\r\n\t{\n\t\treturn null;\r\n\t}", "long getWorkflowID();", "java.lang.String getWorkerId();", "public static String id()\n {\n return _id;\n }", "public Integer getProcess(final String title) {\n\t\treturn getProcess(title, null);\n\t}", "String getPipelineId();", "public Integer getpId() {\n return pId;\n }", "private String createPID() {\n return \"7777\";\n }", "private static String m29548a(Context context) {\n ActivityManager activityManager = (ActivityManager) context.getSystemService(\"activity\");\n int myPid = Process.myPid();\n for (RunningAppProcessInfo runningAppProcessInfo : activityManager.getRunningAppProcesses()) {\n if (runningAppProcessInfo.pid == myPid) {\n return runningAppProcessInfo.processName;\n }\n }\n return null;\n }", "public long getId() {\n return session.getId();\n }", "public Integer getId() {\n return id.get();\n }", "@Override\r\n\tpublic String getPID() {\n\t\treturn \"NYXQYZ\"+getID();\r\n\t}", "public String getProcessedId() {\n\t\treturn processedId;\n\t}", "public String getProcessInstanceIdFromExternalTodoId(String externalTodoId)\r\n throws ProcessManagerException {\r\n try {\r\n return Workflow.getTaskManager().getProcessInstanceIdFromExternalTodoId(\r\n externalTodoId);\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_PROCESS_FROM_TODO\", \"externalTodoId : \"\r\n + externalTodoId, e);\r\n }\r\n }", "public Integer getProcess(final String title, final String text) {\n\t\tint pid = AutoItXImpl.autoItX.AU3_WinGetProcess(\n\t\t\t\tAutoItUtils.stringToWString(AutoItUtils.defaultString(title)), AutoItUtils.stringToWString(text));\n\t\treturn (pid <= 0) ? null : pid;\n\t}", "public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }", "public int getpId() {\n return pId;\n }", "public static PeerUid forCurrentProcess() {\n return new PeerUid(android.os.Process.myUid());\n }", "public Long getWaiting_pid() {\n return waiting_pid;\n }" ]
[ "0.8110812", "0.80564433", "0.8055342", "0.8055342", "0.80275327", "0.80275327", "0.7942452", "0.79197514", "0.77550316", "0.77327245", "0.7621316", "0.7603962", "0.7523409", "0.7512598", "0.7471428", "0.7397141", "0.73329383", "0.73153204", "0.72955394", "0.72443855", "0.7222172", "0.71907085", "0.717967", "0.7163244", "0.7160327", "0.71020603", "0.70816857", "0.70816857", "0.70816857", "0.70816857", "0.70713705", "0.7046531", "0.7014783", "0.6987334", "0.693334", "0.69118553", "0.6898852", "0.68817043", "0.6838316", "0.6784005", "0.6753855", "0.6704451", "0.667208", "0.6634934", "0.661631", "0.6591578", "0.6574577", "0.65469104", "0.65391713", "0.649904", "0.64901", "0.6350462", "0.6337339", "0.6333302", "0.6313573", "0.62859136", "0.6233534", "0.6221879", "0.622138", "0.6165169", "0.6135636", "0.61274576", "0.61020195", "0.6085856", "0.6064931", "0.6055128", "0.6055033", "0.60427386", "0.6019619", "0.601661", "0.6013461", "0.60092926", "0.60088056", "0.5992995", "0.59832156", "0.59656364", "0.5963245", "0.59485", "0.5946724", "0.5939134", "0.59362787", "0.5919123", "0.59164065", "0.5906798", "0.5894156", "0.58836395", "0.5881385", "0.5870193", "0.5833237", "0.58307445", "0.5814662", "0.5812408", "0.58018434", "0.5800968", "0.580001", "0.57910174", "0.57863086", "0.5785304", "0.5783182", "0.5773548" ]
0.8085376
1
Sets the process id.
public void setProcessId(String processId) { this.processId = processId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setProcessID(long pid);", "private void setProcessId(int value) {\n\t\tthis.processId = value;\n\t}", "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder setProcessId(java.lang.String value) {\n validate(fields()[18], value);\n this.processId = value;\n fieldSetFlags()[18] = true;\n return this;\n }", "public final void setProcessId(int pid) {\n \tif ( getOpenCount() == 0)\n \t\tm_pid = pid;\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setProcessId(java.lang.String value) {\n validate(fields()[8], value);\n this.processId = value;\n fieldSetFlags()[8] = true;\n return this;\n }", "public void setPid(Integer pid) {\n this.pid = pid;\n }", "public void setPid(Integer pid) {\n this.pid = pid;\n }", "public void setPid(Integer pid) {\n this.pid = pid;\n }", "public void setPid(Integer pid) {\n this.pid = pid;\n }", "@Override\n\tpublic void setPID(int pid) {\n\t\tthis.pID = pid;\n\t\t\n\t}", "public void setProvProcessId(Integer v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/prov_process_id\",v);\n\t\t_ProvProcessId=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "public void setPid(String pid) {\r\n this.pid = pid;\r\n }", "public void setId(Long pid) {\n this.pid = pid;\n }", "public void setPid(Long pid) {\n this.pid = pid;\n }", "public void setPid(Long pid) {\n this.pid = pid;\n }", "public void setPid(String pid) {\n\t\tthis.pid = pid == null ? null : pid.trim();\n\t}", "public void setPid(String pid) {\n this.pid = pid == null ? null : pid.trim();\n }", "public void setProcessPidValue(String processPidValue) throws JNCException {\n setProcessPidValue(new YangUInt32(processPidValue));\n }", "protected Element setProcId(){\n\t\treturn el(\"bpws:copy\", new Node[]{\n\t\t\t\tel(\"bpws:from\", attr(\"expression\", \"abx:getProcessId()\")),\n\t\t\t\tel(\t\"bpws:to\", new Node[]{\n\t\t\t\t\t\tattr(\"variable\", VARNAME),\n\t\t\t\t\t\tattr(\"part\", \"part1\"),\n\t\t\t\t\t\tattr(\"query\", \"/nswomoxsd:receive/nswomoxsd:processId\")\n\t\t\t\t\t})\n\t\t});\n\t}", "public void setProcessPidValue(YangUInt32 processPidValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"process-pid\",\n processPidValue,\n childrenNames());\n }", "public void setidnumber(int id) {\r\n idnumber = id;\r\n }", "public void setProcessPidValue(long processPidValue) throws JNCException {\n setProcessPidValue(new YangUInt32(processPidValue));\n }", "public void setPId(String value) {\n setAttributeInternal(PID, value);\n }", "public void setProcessHistoryID(java.lang.Long value) {\n __getInternalInterface().setFieldValue(PROCESSHISTORYID_PROP.get(), value);\n }", "public void addProcessPid() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"process-pid\",\n null,\n childrenNames());\n }", "public void setProcessHistoryID(java.lang.Long value) {\n __getInternalInterface().setFieldValue(PROCESSHISTORYID_PROP.get(), value);\n }", "public void setProcess(ServiceProcess process) {\n\t\tthis.process = process;\n\t}", "public void markProcessPidReplace() throws JNCException {\n markLeafReplace(\"processPid\");\n }", "public void setProcID(int newID) {\n\t\tprocID = newID;\n\t}", "public void setId(java.lang.Integer _id)\n {\n id = _id;\n }", "public final native void setId(int id) /*-{\n\t\tthis.id = id;\n\t}-*/;", "public long getProcessID() {\n return processID;\n }", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "public String getProcessID()\n {\n return processID;\n }", "@Test\n void setPid() {\n assertEquals(3, new Process() {{\n setPid(3);\n }}.getPid());\n }", "void setIdNumber(String idNumber);", "public String getProcessId()\r\n\t{\r\n\t\treturn processId;\r\n\t}", "public void setPID(java.lang.String param) {\r\n localPIDTracker = param != null;\r\n\r\n this.localPID = param;\r\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int id) {\n this.id = String.valueOf(this.hashCode());\n }", "void setID(int val)\n throws RemoteException;", "public void setIdNumber(String idNumber) {\n this.idNumber = idNumber;\n }", "public void setId_number(String id_number) {\n this.id_number = id_number;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void assignId(int id);", "public void setId(int id_)\n\t{\n\t\tthis.id=id_;\n\t}", "@Override\r\n\tpublic void setId(String id) {\n\t\tmProductionId = id;\r\n\t}", "protected void setId(long id) {\n\t\tgraphicFrame.getNvGraphicFramePr().getCNvPr().setId(id);\n\t}", "protected void setProcess(Process rNewProcess)\n\t{\n\t\trProcess = rNewProcess;\n\t\tfragmentParam().annotate(PROCESS, rProcess);\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setPeerID(PeerID pid) {\n this.pid = pid;\n incModCount();\n }", "public void setId(final Integer id)\n {\n this.id = id;\n }", "public void setId (java.lang.Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id){\n\t\tthis.id = id;\n\t}", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(Integer id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setPipePipelinedetailsElementId(Integer v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/pipe_pipelineDetails_element_id\",v);\n\t\t_PipePipelinedetailsElementId=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "public void setId( Integer id )\n {\n this.id = id ;\n }", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "@Override\n public void setId(int pintId) {\n this.intDynaGraphId = pintId;\n }", "public void setId(final Integer id) {\n this.id = id;\n }", "void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public final void setServiceProcess(java.lang.String serviceprocess)\r\n\t{\r\n\t\tsetServiceProcess(getContext(), serviceprocess);\r\n\t}", "public java.lang.String getProcessId() {\n return processId;\n }", "public java.lang.String getProcessId() {\n return processId;\n }", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setId(int value) {\n this.id = value;\n }", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "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 }" ]
[ "0.8174183", "0.78946936", "0.75033253", "0.73848224", "0.72139686", "0.709769", "0.709769", "0.709769", "0.709769", "0.70657134", "0.6872884", "0.68419546", "0.67925686", "0.6745262", "0.6745262", "0.6631396", "0.6587978", "0.6565314", "0.6533758", "0.6484513", "0.6434489", "0.6385715", "0.6368103", "0.6348847", "0.6319096", "0.631749", "0.63030976", "0.6278709", "0.6196175", "0.61046565", "0.6103108", "0.60749024", "0.6019731", "0.60178554", "0.60089266", "0.60016465", "0.5997919", "0.5995851", "0.598221", "0.59804815", "0.59754264", "0.5973139", "0.5972078", "0.59565514", "0.595565", "0.5929423", "0.5898745", "0.5868919", "0.58488494", "0.58460265", "0.58460265", "0.58460265", "0.58460265", "0.58460265", "0.58460265", "0.58460265", "0.58402324", "0.5831615", "0.5820257", "0.5815388", "0.5815038", "0.5811037", "0.58107436", "0.58107436", "0.5799559", "0.5794904", "0.57913035", "0.57904047", "0.578874", "0.578874", "0.578844", "0.578844", "0.578844", "0.578844", "0.578844", "0.578844", "0.578844", "0.578844", "0.578844", "0.578657", "0.57864624", "0.57847315", "0.5783236", "0.5783236", "0.5781929", "0.5779649", "0.5779649", "0.57718295", "0.5770984", "0.5759677", "0.5759528", "0.5759528", "0.5759528", "0.5759528", "0.5759528", "0.5759528", "0.5759528", "0.5759528", "0.5759528", "0.5759528" ]
0.72541344
4
Gets the process completed in.
public String getProcessCompletedIn() { return processCompletedIn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProcessCompleted()\r\n\t{\r\n\t\treturn processCompleted;\r\n\t}", "public long getCompleted() { return completed; }", "public int completed() {\n return this.completed;\n }", "public String getProcessCompleteQueueName()\n {\n return DONE; \n }", "public ProcessInfo getResult()\n\t{\n\t\treturn m_pi;\n\t}", "public int getDone() {\n\t\treturn done;\n\t}", "public Long getProgressDone();", "public boolean completed() {\n return completed;\n }", "public int getThroughPut() {\n\t\treturn completed;\n\t}", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "public boolean getDone() {\n return isDone;\n }", "public boolean isCompleted() {\r\n return completed;\r\n }", "public boolean getDone(){\r\n\t\treturn done;\r\n\t}", "public synchronized boolean getFinished(){\n return finished;\n }", "public boolean isCompleted() {\r\n return completed;\r\n }", "public boolean isCompleted(){\r\n\t\treturn isCompleted;\r\n\t}", "public boolean getFinished() {\n\t\treturn finished;\n\t}", "public boolean getFinished() {\n return finished;\n }", "public boolean isCompleted() {\n return completed;\n }", "public boolean isCompleted() {\n\t\t\n\t\treturn completed;\n\t\t\n\t}", "boolean completed();", "public PPMFile getfinishedImage() {\n while (finishedImage == null) {\n // if you call this before you know we're ready due to the semaphore, having to spinlock is your own fault\n }\n\n return finishedImage;\n }", "public boolean getFinished() {\n return finished_;\n }", "public boolean isCompleted() {\n return this.completed;\n }", "public String getDone() {\n return (isDone ? \"1\" : \"0\");\n }", "public boolean getIsDone() {\n return this.isDone;\n }", "public boolean getFinished() {\n return finished_;\n }", "public boolean isDone(){\n return status;\n }", "public boolean isDone() {\r\n return isDone;\r\n }", "boolean getFinished();", "public int exitValue() {\n if (_aborted) { return -1; }\n if ((_index<_processes.length-1) || (_processes[_processes.length-1]==null)) {\n throw new IllegalThreadStateException(\"Process sequence has not terminated yet, exit value not available.\");\n }\n // just returning the exit value of the last process is sufficient:\n // the last process gets started when the previous one has already terminated\n return _processes[_processes.length-1].exitValue();\n }", "public boolean isCompleted() {\n\t\treturn program.getBPCFG().isCompleted();\n\t}", "public void setProcessCompletedIn(String processCompletedIn)\r\n\t{\r\n\t\tthis.processCompletedIn = processCompletedIn;\r\n\t}", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "public boolean isDone() {\n return isDone;\n }", "public boolean isDone() {\n return isDone;\n }", "public boolean isDone() {\n return isDone;\n }", "public boolean isCompleted() {\n return currentItemState == ItemProcessingState.COMPLETED;\n }", "public boolean isDone() {\n return this.done;\n }", "public static boolean isCompleted(){\n return isComplete;\n }", "public java.lang.String getLast_processstatus() {\n return last_processstatus;\n }", "boolean isDone() {\n return this.isDone;\n }", "public String getIsDone() {\n if (isDone) {\n return \"1\";\n } else {\n return \"0\";\n }\n }", "public Boolean getTaskCompletedOption() {\n return (Boolean) commandData.get(CommandProperties.TASKS_COMPLETED_OPTION);\n }", "public boolean isDone() { return true; }", "public boolean is_completed();", "public boolean wasFinished()\n {\n return this.isFinished;\n }", "public void processEnd();", "public boolean isDone() {\n return done;\n }", "Object getCompletionResult();", "public synchronized Status getStatus() {\n return execStatus;\n }", "public int CompletedCount() {\n \t\treturn jobcomplete.size();\n \t}", "public boolean getStatus() {\n return this.isDone;\n }", "public boolean isDone() {\n return done;\n }", "public boolean isDone() {\n return done;\n }", "boolean isComplete() {\n return complete.get();\n }", "public boolean isDone();", "public boolean isDone();", "@ManagedMetric(category=\"UDPOpRequests\", metricType=MetricType.COUNTER, description=\"total number of agent operations completed\")\n\tpublic long getRequestsCompleted() {\n\t\treturn getMetricValue(\"RequestsCompleted\");\n\t}", "boolean isCompleted();", "public boolean getIsComplete() {\n return isComplete_;\n }", "public boolean getIsComplete() {\n return isComplete_;\n }", "public long getCompletedTasks()\n {\n return getCompletedTaskCount();\n }", "@Override\n public boolean isDone() {\n return this.isDone;\n }", "Integer getExitCode() {\n\n try {\n final int exitValue = process.exitValue();\n streamHandler.stop();\n LOGGER.trace(\"Process has been terminated with exit value {}\", exitValue);\n return exitValue;\n\n } catch (IllegalThreadStateException ex) {\n LOGGER.trace(\"Could not get exit value; the process is running\");\n return null;\n }\n }", "public synchronized boolean hasFinished ()\n {\n return this.finished;\n }", "public String getStatus() {\n return isDone ? \"1\" : \"0\";\n }", "public boolean isDone() {\n\t\t\n\t\treturn done;\n\t}", "public boolean isDone(){\n return done;\n }", "public boolean isComplete() { \n return isComplete; \n }", "@Override\n\tpublic boolean done() {\n\t\treturn p;\n\t}", "public boolean checkDone() {\n return this.isDone;\n }", "public ResultStatus getExecutionProgressStatus();", "public long getRunning() { return running; }", "public Process getProcess()\n {\n return proc;\n }", "public Process getProcess() {\n \t\treturn process;\n \t}", "private int getCompleteProgress()\n {\n int complete = (int)(getProgress() * 100);\n \n if (complete >= 100)\n complete = 100;\n \n return complete;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public boolean isDone() {\n\t\treturn true;\n\t}", "public boolean isComplete() {\r\n\t\treturn complete;\r\n\t}", "public Process getProcess() {\n return this.process;\n }", "protected boolean isFinished() {\n\treturn this.isDone;\n }", "public int getQueryFinish()\n\t{\n\t\treturn myQueryFinish;\n\t}", "public boolean getDoneStatus(){\n return isDone;\n }", "public boolean getComplete(){\n return localComplete;\n }", "public boolean isComplete() {\n return complete;\n }", "public boolean isComplete() {\n return complete;\n }", "boolean isDone();", "boolean getIsComplete();", "public ProcessModelStatus getStatus() {\r\n return this.status;\r\n }", "public String getProgress() {\n return this.progress;\n }", "@Override\n\tpublic int getJobStatus() {\n\t\treturn model.getJobStatus();\n\t}", "public boolean isDone()\r\n/* 69: */ {\r\n/* 70:106 */ return isDone0(this.result);\r\n/* 71: */ }", "public int progress() {\n return _progress;\n }", "public JobProgress getJobProgress() {\n return this.jobProgress;\n }", "public Integer getPROCESS_STATUS() {\n return PROCESS_STATUS;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.288 -0400\", hash_original_method = \"41AED877D51F56AB121F4235E96580E7\", hash_generated_method = \"FAE5E8273CFAE7048C4C302C5D04574C\")\n \npublic boolean isCompleted() {\n return getInfo().getState() == PrintJobInfo.STATE_COMPLETED;\n }", "public boolean isDone() { return false; }" ]
[ "0.8060819", "0.7016713", "0.6818515", "0.6720466", "0.651596", "0.6506343", "0.649353", "0.6415354", "0.6307271", "0.6196084", "0.6190557", "0.6174266", "0.61689305", "0.6166226", "0.61659986", "0.60960245", "0.6092662", "0.60851634", "0.60840327", "0.60755384", "0.60656244", "0.60064745", "0.6004224", "0.60020787", "0.5993548", "0.5983193", "0.59704316", "0.5969623", "0.59607995", "0.595211", "0.5939297", "0.592614", "0.59248435", "0.5922748", "0.5918884", "0.5918884", "0.5918884", "0.5895147", "0.58876354", "0.5886743", "0.5879228", "0.58787435", "0.58464664", "0.5841108", "0.58011824", "0.5790968", "0.5764975", "0.5759641", "0.5748488", "0.57430524", "0.57404083", "0.5724911", "0.57198095", "0.5709651", "0.5709651", "0.5686063", "0.5680677", "0.5680677", "0.56673205", "0.5656759", "0.5652191", "0.565061", "0.5647847", "0.56448716", "0.5643123", "0.5638371", "0.56369376", "0.56312597", "0.5628475", "0.5619908", "0.5618055", "0.55881315", "0.55690604", "0.55685157", "0.5563929", "0.5563073", "0.5560863", "0.5555907", "0.5555907", "0.5555907", "0.5546501", "0.55458814", "0.55429685", "0.55402696", "0.553477", "0.55310386", "0.55295146", "0.5528575", "0.5528575", "0.55175143", "0.5513574", "0.551043", "0.5508773", "0.55085224", "0.55035543", "0.5501331", "0.54990715", "0.54968417", "0.54862165", "0.5481602" ]
0.80445385
1
Sets the process completed in.
public void setProcessCompletedIn(String processCompletedIn) { this.processCompletedIn = processCompletedIn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProcessCompleted(String processCompleted)\r\n\t{\r\n\t\tthis.processCompleted = processCompleted;\r\n\t}", "public void setCompleted(){\r\n\t\tisCompleted = true;\r\n\t}", "public void completeTask() {\n completed = true;\n }", "public void setCompleted() {\n this.completed = true;\n }", "public synchronized void setComplete() {\n status = Status.COMPLETE;\n }", "public void setCompleted(boolean flag) {\r\n completed = flag;\r\n }", "public void complete()\n {\n isComplete = true;\n }", "public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.done = true;\n }", "public void setDone() {\n isDone = true;\n }", "public void markAsDone() {\r\n this.isDone = true;\r\n }", "public void SetDone(){\n this.isDone = true;\n }", "public void CompleteTask() {\n\t\tCompletionDate = new Date();\n\t}", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "protected void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n\n }", "public void done() {\n isDone = true;\n }", "public void markAsDone(){\n isDone = true;\n }", "public void set_completed();", "public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }", "@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}", "public void markDone() {\n isDone = true;\n }", "public void done() {\n done = true;\n }", "public void complete() {\n\t}", "public void completed(final Status status);", "public void setDone(boolean value) {\n this.done = value;\n }", "public void setCompleted (boolean isCompleted) {\n this.isCompleted = isCompleted;\n }", "synchronized public void markDone() {\n this.done = true;\n }", "public String getProcessCompleted()\r\n\t{\r\n\t\treturn processCompleted;\r\n\t}", "public void setComplete(boolean value) {\n\t\tif (value) {\n\t\t\tcountdown = EXIT_COUNT;\n\t\t}\n\t\tcomplete = value;\n\t\t//\t\tif (value) waitSeconds(3);\n\t}", "synchronized public void jobDone(){ // l'action a été réalisée\n\t\tdone = true; // changement d'état\n\t\tthis.notifyAll(); // on notifie tout le monde\n\t}", "public void setFinished(boolean fin) {\n finished = fin;\n }", "protected void setFinished(boolean finished) {\n this.finished = finished;\n }", "protected void execute() {\n finished = true;\n }", "public synchronized void setFinished(boolean f){\n finished = f;\n }", "@Override\n public boolean completed() {\n return false;\n }", "public void setDone(){\n this.status = \"Done\";\n }", "public void setDone(boolean done) {\n this.done = done;\n }", "public void setFinished(Boolean finished) {\n this.finished = finished;\n }", "public boolean completed() {\n return completed;\n }", "public void setDone(boolean done) {\n \tthis.done = done;\n }", "public void setFinished(boolean fin) {\n\t\tfinished = fin;\n\t}", "@Override\n\tpublic void complete()\n\t{\n\t}", "public void setDone(boolean done) {\n this.done = done;\n }", "public void setDone(boolean done) {\n this.done = done;\n }", "public void done() {\n\t\t}", "public void setStateComplete() {state = STATUS_COMPLETE;}", "public void setNumCompleted(int numCompleted)\n\t{\n\t\tthis.numCompleted = numCompleted;\n\t}", "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "public void finish(){\n\t\tnotfinish = false;\n\t}", "public void finish(boolean b) {\n\t\tisFinished = b;\n\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "public void setDone(boolean done) {\n\t\tthis.done = done;\n\t\t\n\t}", "private void doMarkTaskAsCompleted() {\n System.out.println(\n \"Select the task you would like to mark as complete by entering the appropriate index number.\");\n int index = input.nextInt();\n todoList.markTaskAsCompleted(index);\n System.out.println(\"The selected task has been marked as complete. \");\n }", "public void setComplete(Boolean complete){\n this.complete = complete;\n }", "public void processEnd();", "public void setDone(int done) {\n\t\tthis.done = done;\n\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "public void setComplete(boolean complete) {\n }", "private void eventProcessingCompleted() {\n\t\tsynchronized(processingCounterMutex) {\n\t\t\tprocessingCounter--;\n\t\t\tif (processingCounter == 0)\n\t\t\t\tprocessingCounterMutex.notifyAll();\n\t\t}\n\t}", "public void setisDone(boolean b) {\r\n isDone = b;\r\n }", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "public void setComplete(boolean complete) {\n\t\t\n\t}", "public void markComplete()\n {\n setCount(getGoal());\n }", "@IcalProperty(pindex = PropertyInfoIndex.COMPLETED,\n todoProperty = true)\n public void setCompleted(final String val) {\n completed = val;\n }", "@Override\n public String markComplete() {\n if (this.isDone) {\n return Ui.getTaskAlrCompletedMessage(this);\n } else {\n this.isDone = true;\n return Ui.getMarkCompleteEventMessage(this);\n }\n }", "public long getCompleted() { return completed; }", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\r\n\tprotected void processFinish() {\n\r\n\t}", "@Override\n public void setFinished() {\n finishedBanking = true;\n }", "private void complete(MasterProcedureEnv env, Throwable error) {\n if (isFinished()) {\n LOG.info(\"This procedure {} is already finished, skip the rest processes\", this.getProcId());\n return;\n }\n if (event == null) {\n LOG.warn(\"procedure event for {} is null, maybe the procedure is created when recovery\",\n getProcId());\n return;\n }\n if (error == null) {\n LOG.info(\"finish snapshot {} on region {}\", snapshot.getName(), region.getEncodedName());\n succ = true;\n }\n\n event.wake(env.getProcedureScheduler());\n event = null;\n }", "public abstract Task markAsDone();", "@Override\r\n public void updateExit() {\r\n if (((CompositeGoal) compositeGoal).allOtherGoalsComplete()) {\r\n goalCompleted = true;\r\n compositeGoal.processGoal();\r\n } else {\r\n System.out.println(\"Need to complete other goals first\");\r\n }\r\n }", "@Override\r\n\tpublic void done() {\n\t\tSystem.out.println(\"done\");\r\n\t}", "boolean completed();", "@Override\r\n\tpublic void complete() {\n\r\n\t}", "public void formProcessingComplete(){}", "public void markAsUndone() {\n isDone = false;\n }", "public void setComplete()\n\t{\n\t\texisting.set(0, pieces.length);\n\t}", "public void setCompleted(boolean achievementCompleted) {\n\t\t\n\t\tcompleted = achievementCompleted;\n\t\t\n\t}", "public void finished();", "@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}", "public void setDone(boolean doneIt)\n {\n notDone = doneIt;\n }", "public String getProcessCompletedIn()\r\n\t{\r\n\t\treturn processCompletedIn;\r\n\t}" ]
[ "0.72862196", "0.72838384", "0.72202593", "0.7180305", "0.7138444", "0.7103249", "0.7078802", "0.70508957", "0.7038898", "0.7038898", "0.7038898", "0.7021541", "0.7014289", "0.7002456", "0.6991184", "0.6972238", "0.69642425", "0.69642425", "0.69642425", "0.69468504", "0.69468504", "0.69468504", "0.69334435", "0.69262564", "0.6900879", "0.6849663", "0.6738701", "0.673262", "0.66940975", "0.66713864", "0.666723", "0.6656422", "0.6565481", "0.65634876", "0.65360695", "0.6526633", "0.647319", "0.64613724", "0.6458646", "0.64399326", "0.6436345", "0.6399017", "0.63845766", "0.6375994", "0.63051575", "0.62955683", "0.62841636", "0.62741494", "0.6272319", "0.62697756", "0.6261919", "0.62563473", "0.62563473", "0.623847", "0.62357336", "0.62338096", "0.623163", "0.62265646", "0.62265646", "0.62245995", "0.6209777", "0.6197824", "0.6197824", "0.61975765", "0.6195774", "0.61622065", "0.61574084", "0.61528724", "0.6151701", "0.6151701", "0.6151701", "0.6151701", "0.6151701", "0.61140007", "0.61079705", "0.6105328", "0.61043715", "0.6103336", "0.6088289", "0.6068388", "0.60626", "0.605768", "0.60571873", "0.60571873", "0.60571873", "0.6057056", "0.6052044", "0.6038296", "0.6029309", "0.6012066", "0.6008653", "0.6007108", "0.59867597", "0.5982079", "0.59547544", "0.59498274", "0.59451777", "0.5942276", "0.5938368", "0.5937951" ]
0.6939969
22
Gets the process completed.
public String getProcessCompleted() { return processCompleted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProcessCompletedIn()\r\n\t{\r\n\t\treturn processCompletedIn;\r\n\t}", "public int completed() {\n return this.completed;\n }", "public long getCompleted() { return completed; }", "public String getProcessCompleteQueueName()\n {\n return DONE; \n }", "public boolean completed() {\n return completed;\n }", "public int getDone() {\n\t\treturn done;\n\t}", "public boolean isCompleted() {\r\n return completed;\r\n }", "public boolean isCompleted() {\r\n return completed;\r\n }", "public boolean isCompleted() {\n\t\t\n\t\treturn completed;\n\t\t\n\t}", "public boolean getFinished() {\n\t\treturn finished;\n\t}", "public Long getProgressDone();", "public boolean getFinished() {\n return finished;\n }", "public boolean isCompleted() {\n return completed;\n }", "public boolean getDone(){\r\n\t\treturn done;\r\n\t}", "public synchronized boolean getFinished(){\n return finished;\n }", "public boolean isCompleted() {\n\t\treturn program.getBPCFG().isCompleted();\n\t}", "public boolean getFinished() {\n return finished_;\n }", "public boolean getFinished() {\n return finished_;\n }", "public boolean isCompleted() {\n return this.completed;\n }", "public boolean getDone() {\n return isDone;\n }", "public boolean isCompleted(){\r\n\t\treturn isCompleted;\r\n\t}", "boolean completed();", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "public Boolean getTaskCompletedOption() {\n return (Boolean) commandData.get(CommandProperties.TASKS_COMPLETED_OPTION);\n }", "public boolean getIsDone() {\n return this.isDone;\n }", "public ProcessInfo getResult()\n\t{\n\t\treturn m_pi;\n\t}", "public String getDone() {\n return (isDone ? \"1\" : \"0\");\n }", "boolean isDone() {\n return this.isDone;\n }", "public static boolean isCompleted(){\n return isComplete;\n }", "public boolean isDone() {\n return this.done;\n }", "public boolean isDone() {\r\n return isDone;\r\n }", "public java.lang.String getLast_processstatus() {\n return last_processstatus;\n }", "public boolean wasFinished()\n {\n return this.isFinished;\n }", "public boolean isDone() {\n return isDone;\n }", "public boolean isDone() {\n return isDone;\n }", "public boolean isDone() {\n return isDone;\n }", "boolean getFinished();", "public boolean isDone(){\n return status;\n }", "public boolean isCompleted() {\n return currentItemState == ItemProcessingState.COMPLETED;\n }", "public int getThroughPut() {\n\t\treturn completed;\n\t}", "public PPMFile getfinishedImage() {\n while (finishedImage == null) {\n // if you call this before you know we're ready due to the semaphore, having to spinlock is your own fault\n }\n\n return finishedImage;\n }", "public boolean isDone() {\n return done;\n }", "public boolean isComplete() {\r\n\t\treturn complete;\r\n\t}", "boolean isComplete() {\n return complete.get();\n }", "public boolean isDone() {\n return done;\n }", "public boolean isDone() {\n return done;\n }", "public synchronized boolean hasFinished ()\n {\n return this.finished;\n }", "public boolean getIsComplete() {\n return isComplete_;\n }", "public boolean isComplete() {\n return complete;\n }", "public boolean isComplete() {\n return complete;\n }", "public void processEnd();", "public boolean isDone() {\n\t\t\n\t\treturn done;\n\t}", "public boolean getIsComplete() {\n return isComplete_;\n }", "public String getIsDone() {\n if (isDone) {\n return \"1\";\n } else {\n return \"0\";\n }\n }", "@Override\n public boolean isDone() {\n return this.isDone;\n }", "public boolean is_completed();", "public void setProcessCompleted(String processCompleted)\r\n\t{\r\n\t\tthis.processCompleted = processCompleted;\r\n\t}", "public boolean isComplete()\n {\n return getStatus() == STATUS_COMPLETE;\n }", "public boolean getStatus() {\n return this.isDone;\n }", "public boolean isComplete() { \n return isComplete; \n }", "public boolean checkDone() {\n return this.isDone;\n }", "public boolean isFinished() {\r\n\t\treturn this.finished;\r\n\t}", "public int CompletedCount() {\n \t\treturn jobcomplete.size();\n \t}", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "public boolean isDone() { return true; }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.288 -0400\", hash_original_method = \"41AED877D51F56AB121F4235E96580E7\", hash_generated_method = \"FAE5E8273CFAE7048C4C302C5D04574C\")\n \npublic boolean isCompleted() {\n return getInfo().getState() == PrintJobInfo.STATE_COMPLETED;\n }", "public boolean isComplete( ) {\n\t\treturn complete;\n\t}", "public boolean isDone(){\n return done;\n }", "@Override\n\tpublic boolean done() {\n\t\treturn p;\n\t}", "public boolean isDone();", "public boolean isDone();", "private int getCompleteProgress()\n {\n int complete = (int)(getProgress() * 100);\n \n if (complete >= 100)\n complete = 100;\n \n return complete;\n }", "public boolean isFinished() {\n return finished;\n }", "public Boolean isComplete() {\n return true;\n }", "@ManagedMetric(category=\"UDPOpRequests\", metricType=MetricType.COUNTER, description=\"total number of agent operations completed\")\n\tpublic long getRequestsCompleted() {\n\t\treturn getMetricValue(\"RequestsCompleted\");\n\t}", "public boolean isFinished() {\n\t\treturn finished;\n\t}", "public boolean isFinished() {\n\t\treturn finished;\n\t}", "public boolean getFinish(){\n\t\treturn finish;\n\t}", "public boolean isComplete();", "public int exitValue() {\n if (_aborted) { return -1; }\n if ((_index<_processes.length-1) || (_processes[_processes.length-1]==null)) {\n throw new IllegalThreadStateException(\"Process sequence has not terminated yet, exit value not available.\");\n }\n // just returning the exit value of the last process is sufficient:\n // the last process gets started when the previous one has already terminated\n return _processes[_processes.length-1].exitValue();\n }", "protected boolean isFinished() {\n\treturn this.isDone;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public Long getDoneCode() {\n return doneCode;\n }", "public boolean isDone() {\n\t\treturn true;\n\t}", "public void completeTask() {\n completed = true;\n }", "public double getPercentCompleted() {\n\t\treturn -1;\n\t}", "public boolean finished() {\n \t\treturn isFinished;\n \t}", "Object getCompletionResult();", "public boolean getComplete(){\n return localComplete;\n }", "public String getStatus() {\n return isDone ? \"1\" : \"0\";\n }", "public boolean isFinished(){\n return this.finished;\n }", "boolean isCompleted();", "public int getCompletionTime() {\n return this.completeTime;\n }", "public java.util.Date getFinishedTime () {\r\n\t\treturn finishedTime;\r\n\t}", "public boolean isFinished() {\n return isFinished;\n }", "public String getDoneCode() {\n return doneCode;\n }", "public synchronized Status getStatus() {\n return execStatus;\n }", "public boolean isComplete() {\n return future != null && future.isDone();\n }", "boolean getIsComplete();" ]
[ "0.7353133", "0.7162469", "0.71440876", "0.6864019", "0.68519783", "0.66986454", "0.6521682", "0.6510661", "0.6505985", "0.64898074", "0.6464349", "0.64542466", "0.6423746", "0.6418532", "0.64137304", "0.63876164", "0.6384612", "0.637659", "0.6342709", "0.63335806", "0.6309585", "0.63000643", "0.6218937", "0.6197334", "0.61965233", "0.6182424", "0.61456525", "0.6145126", "0.6141127", "0.61395633", "0.6136064", "0.6116535", "0.6097661", "0.6094058", "0.6094058", "0.6094058", "0.6072457", "0.6070708", "0.60394055", "0.6031673", "0.60246724", "0.59898853", "0.5984949", "0.5977354", "0.5969544", "0.5969544", "0.59418225", "0.5924635", "0.59198487", "0.59198487", "0.5909122", "0.5908802", "0.5908562", "0.5899119", "0.58829135", "0.58600664", "0.5859153", "0.58514786", "0.5838968", "0.583158", "0.5827763", "0.5818655", "0.58120596", "0.58044314", "0.58027905", "0.5800198", "0.5794613", "0.577735", "0.5775656", "0.57607186", "0.57607186", "0.5758797", "0.575416", "0.5751818", "0.57476574", "0.5734176", "0.5734176", "0.57326764", "0.5712209", "0.5702515", "0.5697822", "0.56971693", "0.56971693", "0.56971693", "0.5693912", "0.5680553", "0.5679213", "0.5673529", "0.56689256", "0.5660092", "0.5653878", "0.5652037", "0.5645825", "0.5630128", "0.5628005", "0.56232446", "0.5621216", "0.56179535", "0.56159854", "0.561268" ]
0.8397951
0
Sets the process completed.
public void setProcessCompleted(String processCompleted) { this.processCompleted = processCompleted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void setComplete() {\n status = Status.COMPLETE;\n }", "public void completeTask() {\n completed = true;\n }", "public void setCompleted() {\n this.completed = true;\n }", "public void complete()\n {\n isComplete = true;\n }", "public void setCompleted(){\r\n\t\tisCompleted = true;\r\n\t}", "public void CompleteTask() {\n\t\tCompletionDate = new Date();\n\t}", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setCompleted(boolean flag) {\r\n completed = flag;\r\n }", "public void done() {\n isDone = true;\n }", "public void SetDone(){\n this.isDone = true;\n }", "public void setDone() {\n isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }", "public void markAsDone() {\n this.done = true;\n }", "public void markAsDone() {\r\n this.isDone = true;\r\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void complete() {\n\t}", "public void markAsDone() {\n this.isDone = true;\n\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void done() {\n done = true;\n }", "public String getProcessCompleted()\r\n\t{\r\n\t\treturn processCompleted;\r\n\t}", "@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}", "public void completed(final Status status);", "public void set_completed();", "protected void markAsDone() {\n isDone = true;\n }", "public void setDone(boolean value) {\n this.done = value;\n }", "public void markAsDone(){\n isDone = true;\n }", "public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }", "protected void setFinished(boolean finished) {\n this.finished = finished;\n }", "public void setComplete(boolean value) {\n\t\tif (value) {\n\t\t\tcountdown = EXIT_COUNT;\n\t\t}\n\t\tcomplete = value;\n\t\t//\t\tif (value) waitSeconds(3);\n\t}", "public void setFinished(Boolean finished) {\n this.finished = finished;\n }", "public boolean completed() {\n return completed;\n }", "public void markDone() {\n isDone = true;\n }", "public synchronized void setFinished(boolean f){\n finished = f;\n }", "protected void execute() {\n finished = true;\n }", "public void setCompleted (boolean isCompleted) {\n this.isCompleted = isCompleted;\n }", "public void setProcessCompletedIn(String processCompletedIn)\r\n\t{\r\n\t\tthis.processCompletedIn = processCompletedIn;\r\n\t}", "public void setDone(boolean done) {\n this.done = done;\n }", "public void processEnd();", "public void setDone(boolean done) {\n this.done = done;\n }", "public void setDone(boolean done) {\n this.done = done;\n }", "@Override\n public boolean completed() {\n return false;\n }", "synchronized public void markDone() {\n this.done = true;\n }", "public void setDone(boolean done) {\n \tthis.done = done;\n }", "public void setDone(boolean done) {\n\t\tthis.done = done;\n\t\t\n\t}", "public void finish(boolean b) {\n\t\tisFinished = b;\n\t}", "public void setComplete(Boolean complete){\n this.complete = complete;\n }", "public void done() {\n\t\t}", "public void setComplete(boolean complete) {\n\t\t\n\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "@IcalProperty(pindex = PropertyInfoIndex.COMPLETED,\n todoProperty = true)\n public void setCompleted(final String val) {\n completed = val;\n }", "synchronized public void jobDone(){ // l'action a été réalisée\n\t\tdone = true; // changement d'état\n\t\tthis.notifyAll(); // on notifie tout le monde\n\t}", "public void setFinished(boolean fin) {\n finished = fin;\n }", "@Override\n\tpublic void complete()\n\t{\n\t}", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "public void setComplete(boolean complete) {\n }", "public void setDone(){\n this.status = \"Done\";\n }", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "public void finished() {\r\n\t\t// Mark ourselves as finished.\r\n\t\tif (finished) { return; }\r\n\t\tfinished = true;\r\n\t\tif (ic != null) {\r\n\t\t\tjvr.removeEventListener(ic);\r\n\t\t\ttry {\r\n\t\t\t\tdx.stopch(dxdev,dx.EV_ASYNC);\r\n\t\t\t}\r\n\t\t\tcatch (JVRException e) { logger.throwing(getClass().getName(),\"finished\",e); }\r\n\t\t}\r\n\t\t// Notify any \"waiters\" that we are done.\r\n\t\tsynchronized (this) { notifyAll(); }\r\n\t\t// Fire an event for asynchronous JVR event listeners.\r\n\t\tnew JVREvent(this,\"finished\").fire();\r\n\t\t// For debugging only.\r\n\t\t// logger.info(\"(FINISHED)\\n\" + this);\r\n\t}", "public void setNumCompleted(int numCompleted)\n\t{\n\t\tthis.numCompleted = numCompleted;\n\t}", "public void DONE() throws SystemException {\r\n\t\t\r\n\t\t// Instance check.\r\n\t\tisResponseInstance();\r\n\t\tcommandResponder.done();\r\n\t}", "public void finish(){\n\t\tnotfinish = false;\n\t}", "public void setDone(int done) {\n\t\tthis.done = done;\n\t}", "private void complete(MasterProcedureEnv env, Throwable error) {\n if (isFinished()) {\n LOG.info(\"This procedure {} is already finished, skip the rest processes\", this.getProcId());\n return;\n }\n if (event == null) {\n LOG.warn(\"procedure event for {} is null, maybe the procedure is created when recovery\",\n getProcId());\n return;\n }\n if (error == null) {\n LOG.info(\"finish snapshot {} on region {}\", snapshot.getName(), region.getEncodedName());\n succ = true;\n }\n\n event.wake(env.getProcedureScheduler());\n event = null;\n }", "public void setStateComplete() {state = STATUS_COMPLETE;}", "@Override\r\n\tpublic void done() {\n\t\tSystem.out.println(\"done\");\r\n\t}", "public void setFinished(boolean fin) {\n\t\tfinished = fin;\n\t}", "@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}", "public void setComplete()\n\t{\n\t\texisting.set(0, pieces.length);\n\t}", "@Override\n\tpublic void completed() {\n\t\tSystem.out.println(\"Message Completed: \" + toString());\n\t\tscheduler.putResourceIdle();\n\t\ttry {\n\t\t\tscheduler.applyScheduling();\n\t\t} catch (Exception e) {\n\t\t\t// this should be logged or on a GUI show a dialog of the error\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n public void updateExit() {\r\n if (((CompositeGoal) compositeGoal).allOtherGoalsComplete()) {\r\n goalCompleted = true;\r\n compositeGoal.processGoal();\r\n } else {\r\n System.out.println(\"Need to complete other goals first\");\r\n }\r\n }", "public void setCompleted(boolean achievementCompleted) {\n\t\t\n\t\tcompleted = achievementCompleted;\n\t\t\n\t}", "public int completed() {\n return this.completed;\n }", "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "public long getCompleted() { return completed; }", "public void finished();", "public void onComplete() {\r\n\r\n }", "public void markComplete()\n {\n setCount(getGoal());\n }", "boolean completed();", "private void doMarkTaskAsCompleted() {\n System.out.println(\n \"Select the task you would like to mark as complete by entering the appropriate index number.\");\n int index = input.nextInt();\n todoList.markTaskAsCompleted(index);\n System.out.println(\"The selected task has been marked as complete. \");\n }", "public boolean getDone(){\r\n\t\treturn done;\r\n\t}", "@Override\r\n\tpublic void complete() {\n\r\n\t}", "@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}", "public boolean finished();", "public void setisDone(boolean b) {\r\n isDone = b;\r\n }", "@Override\n public String markComplete() {\n if (this.isDone) {\n return Ui.getTaskAlrCompletedMessage(this);\n } else {\n this.isDone = true;\n return Ui.getMarkCompleteEventMessage(this);\n }\n }", "private void eventProcessingCompleted() {\n\t\tsynchronized(processingCounterMutex) {\n\t\t\tprocessingCounter--;\n\t\t\tif (processingCounter == 0)\n\t\t\t\tprocessingCounterMutex.notifyAll();\n\t\t}\n\t}" ]
[ "0.710087", "0.7080607", "0.70638925", "0.70573616", "0.70430464", "0.69948906", "0.68838465", "0.68838465", "0.68838465", "0.6855195", "0.6815845", "0.6801338", "0.6791726", "0.67836946", "0.67610204", "0.6743104", "0.6706419", "0.6706419", "0.6706419", "0.6658386", "0.6648129", "0.66074777", "0.66074777", "0.66074777", "0.6583719", "0.6577727", "0.656664", "0.65599465", "0.65208113", "0.65069747", "0.64653456", "0.64641404", "0.6462174", "0.642678", "0.6404624", "0.63503927", "0.63501817", "0.6312528", "0.6310044", "0.630755", "0.6301019", "0.6276375", "0.62715656", "0.624613", "0.6235723", "0.6235723", "0.62260866", "0.62251055", "0.6224193", "0.6198888", "0.61972445", "0.6195303", "0.61925", "0.617295", "0.61727375", "0.61727375", "0.6171286", "0.6171286", "0.6169791", "0.61630595", "0.6156569", "0.6156175", "0.6152382", "0.6147034", "0.6137063", "0.6111292", "0.6111292", "0.6111292", "0.6111292", "0.6111292", "0.610175", "0.6073473", "0.6063939", "0.6063687", "0.6062265", "0.6053422", "0.6027838", "0.5998824", "0.599745", "0.597326", "0.5972572", "0.59709036", "0.5961303", "0.59599227", "0.5947599", "0.5946555", "0.59410805", "0.5932056", "0.5925138", "0.59210193", "0.59202325", "0.5913113", "0.5872227", "0.5862653", "0.58609253", "0.58609253", "0.5859192", "0.585551", "0.58497036", "0.58448803" ]
0.7371366
0
Notification that the web application initialization process is starting
@Override public void contextInitialized(ServletContextEvent sce) { EntityConnector.createEntityManagerFactory(); if (!logStarted){ logStarted=true; try { Log.startLogFile(); } catch (IOException ex) { System.out.println("Could Not Start the Log File!" + ex.getMessage()); } Log.writeToLog("Server has Started!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\n\n getStartUp();\n }", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "public static void setApplicationInitialized() {\n applicationInitialized = true;\n }", "protected void applicationInitalize() throws OwConfigurationException, OwServerException\r\n {\n OwConfiguration.applicationInitalize(this);\r\n }", "@PostConstruct\r\n\tpublic void doMyStartUpStuff() {\r\n\t\t\r\n\t\tSystem.out.println(\"TennisCoach : -> Inside of doMyStartUpStuff()\");\r\n\t}", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tserverAPP.start();\n\t}", "public void notifyStartup();", "@Override\n public void startup() {\n }", "@Override\n\tpublic void onStartup(ServletContext servletContext)\n\t\t\tthrows ServletException {\n\t\tsuper.onStartup(servletContext);//master line where whole framework works\n\t\t//configure global objects/tasks if required\n\t}", "@PostConstruct\n\tpublic void doMyStartupStfff() {\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStartupStuff\");\n\t}", "@Override\n\tpublic void contextInitialized(ServletContextEvent sce) {\n\t\tstartupEvt.fire(new ContainerStartupEvent());\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}", "public void startup(){}", "@Override\n public void init() throws LifecycleException {\n logger.info(\"Start to parse and config Web Server ...\");\n configParse();\n\n // TODO web server 是否应该关心 database 的状态? 当 database 连接断开后,相关接口返回 HTTP-Internal Server Error 是不是更合理一些\n // step 2: check database state\n\n // 注册为EventBus的订阅者\n Segads.register(this);\n }", "public void doMyStartupStuff() {\n System.out.println(\"init method\");\n }", "@Override\n protected void appStart() {\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent sce) {\n\t\tSystem.out.println(\"MyListener.contextInitialized() 初始化\");\n//\t\t当server启动时 就初始化applic\n\t\t\n\t}", "@Override\n\tpublic void init() throws Exception {\n //the code present in this method is executed as soon as the application loads that is even before it starts\n\t\tsuper.init(); //super keyword invokes the init methods as per the definition in the Application class\n \n\t}", "@Override\r\n\tpublic void startup() {\n\t\tif(!initialized)\r\n\t\t\tinitOperation();\r\n\t\tregisterMBean();\r\n\t}", "void onStart(@Observes Startup event, ApplicationLifecycle app) {\n\n\t\tif (!newstore)\n\t\t\tapp.markAsRestart();\n\t\t\n\t}", "public void autonomousInit() {\n }", "public void autonomousInit() {\n }", "public void autonomousInit() {\n \n }", "@Override\n\tpublic void earlyStartup() {\n\t}", "@PostConstruct\n public void init() throws SQLException, IOException {\n Server.createWebServer(\"-webPort\", \"1777\").start();\n\n\n }", "public void startup() {\n\t\tstart();\n }", "public void autonomousInit() {\n\t\t\n\t}", "@PostConstruct\n public void startup()\n {\n //codeFragmentPrinter.startTimer();\n }", "@PostConstruct // bcoz of java 9 and higher version i need to download jar file\r\n\tpublic void doMyStartupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStrtupStuff()\");\r\n\t}", "public static void init() {\n\n\t\tsnapshot = new SnapshotService();\n\t\tlog.info(\"App init...\");\n\t}", "@Override\n protected void startUp() {\n }", "public void onLoad()\n\t{\n\t\tJLog.info(\" --- INIT --- \");\n\t\t\n\t}", "public interface MyWebInitializer {\n void onStartup(ServletContext servletContext) throws ServletException;\n}", "public abstract void startup();", "public void contextInitialized(ServletContextEvent contextEvent) {\n super.serviceInitialization(contextEvent,SERVICE_NAME);\n }", "@Override\n public void contextInitialized(ServletContextEvent sce) {\n // Setup Hibernate ORM Connector\n DB.setup();\n\n // Create Default User\n createInitialUser();\n\n // Set Defaults in Preferences table in DB\n try {\n setPreferenceDefaults();\n } catch (IOException e) {\n log.error(\"Problem Updating Preferences Table via Defaults\", e);\n }\n\n // Setup Sync Jobs\n startSyncAgents();\n }", "@Override\n public void autonomousInit() {\n }", "@Override\n public void autonomousInit() {\n }", "@Override\r\n\tpublic void contextInitialized(ServletContextEvent event) {\r\n\t\tinvoke(\"contextInitialized\", event);\r\n\t}", "public void myInit() {\n\t\tSystem.out.println(\">> myInit for Bean Executed\");\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n prepareSystemStatusListeners();\n }", "public void initOsgi();", "public void contextInitialized(ServletContextEvent event) {\r\n \t\r\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}", "public void onModuleLoad() {\r\n\t\trpcService = GWT.create(ContactService.class);\r\n\t\teventBus = new HandlerManager(null);\r\n\t\tappViewer = new AppController(rpcService, eventBus);\r\n\t\tappViewer.go(RootPanel.get(\"initView\"));\r\n\t}", "@Override\n\t\tpublic void onWLInitCompleted(Bundle savedInstanceState) {\n\t\t\tLog.d(DEBUGTAG, \"onWLInitCompleted시작(bundle=\" + savedInstanceState\n\t\t\t\t\t+ \")\");\n\t\t\tsuper.loadUrl(getWebMainFilePath());\n\t\t\t// Add custom initialization code after this line\n\t\t\t// use this to start and trigger a service\n\n\t\t\t// Intent i = new Intent(this, MqttPushService.class);\n\t\t\t// startService(i);\n\n\t\t\tAlarmManager service = (AlarmManager) this\n\t\t\t\t\t.getSystemService(Context.ALARM_SERVICE);\n\t\t\tIntent i = new Intent(this, MqttPushServiceReceiver.class);\n\t\t\tPendingIntent pending = PendingIntent.getBroadcast(this, 0, i,\n\t\t\t\t\tPendingIntent.FLAG_CANCEL_CURRENT);\n\t\t\t// Calendar cal = Calendar.getInstance();\n\t\t\t// start 30 seconds after boot completed\n\t\t\t// cal.add(Calendar.SECOND, 1);\n\t\t\t// fetch every 30 seconds\n\t\t\t// InexactRepeating allows Android to optimize the energy consumption\n\t\t\tservice.setInexactRepeating(AlarmManager.RTC_WAKEUP,\n\t\t\t/* cal.getTimeInMillis() */0, 1000 * 240, pending);\n\n\t\t\tLog.d(DEBUGTAG, \"푸시알람이설정되었습니다\");\n\n\t\t\t// service.setRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),\n\t\t\t// REPEAT_TIME, pending);\n\t\t\tLog.d(DEBUGTAG, \"onWLInitCompleted종료()\");\n\t\t}", "@Override\n public void autonomousInit() {\n \n }", "private void initializeStartup()\n {\n /* Turn off Limelight LED when first started up so it doesn't blind drive team. */\n m_limelight.turnOffLED();\n\n /* Start ultrasonics. */\n m_chamber.startUltrasonics();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tmApplication = null;\n\t\tContext appCtx = getApplicationContext();\n\t\tif (appCtx instanceof DSCApplication) {\n\t\t\tmApplication = (DSCApplication) appCtx;\n\t\t}\n\t\tif (mApplication != null) {\n\t\t\tmApplication.initFolderObserverList(false);\n\t\t}\n\t}", "private static void setupOsgi() {\r\n FrameworkStarter.getInstance().start();\r\n }", "public abstract void onInit();", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\r\n\tpublic void contextInitialized(ServletContextEvent m_event) {\n\t\tArkService.getInstance().start(m_event.getServletContext().getRealPath(\"/WEB-INF/silicon\"), \r\n\t\t\tm_event.getServletContext().getContextPath());\r\n\t}", "public void init() {\r\n\t\tGetRunningProgramsGR request = new GetRunningProgramsGR(\r\n\t\t\t\tRunningServicesListViewAdapter.this.runningServicesActivity.getApplicationContext());\r\n\t\trequest.setServerName(RunningServicesListViewAdapter.this.serverName);\r\n\t\tnew GuiRequestHandler(RunningServicesListViewAdapter.this.runningServicesActivity,\r\n\t\t\t\tRunningServicesListViewAdapter.this, true).execute(request);\r\n\t}", "@PostConstruct\n\tpublic void init()\n\t{\n\t\ttry {\n\t\t\t// هر دو خط کد زیر شدنی هست\n//\t\t\tprocessEngine = ProcessEngines.getDefaultProcessEngine();\n\t\t\t//Activiti with Spring do below line automatically\n//\t\t\tsetProcessEngine(ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault().buildProcessEngine());\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void doMyStartupStuff() {\r\n\t\tSystem.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n\t}", "public void initEasyJWeb() {\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.execute.EasyJWeb.initialization.applications\"));\r\n\t\tif (resourceLoader == null) {\r\n\t\t\tif (servletContext != null)\r\n\t\t\t\tresourceLoader = new ServletContextResourceLoader(\r\n\t\t\t\t\t\tservletContext);\r\n\t\t\telse\r\n\t\t\t\tresourceLoader = new FileResourceLoader();\r\n\t\t}\r\n\t\tinitContainer();\r\n\t\tFrameworkEngine.setWebConfig(webConfig);// 初始化框架工具\r\n\t\tFrameworkEngine.setContainer(container);// 在引擎中安装容器\r\n\t\tAjaxUtil.setServiceContainer(new AjaxServiceContainer(container));// 初始化Ajax容器服务\r\n\t\tinitTemplate(); // 初始化模版\r\n\t\tinvokeApps();// 在应用启动的时候启动一些配置好的应用\r\n\t\thaveInitEasyJWeb = true;\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.EasyJWeb.initialized\"));\r\n\t}", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t}", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t}", "void onServerStarted();", "@Override\n public void init() {\n UserThread.setExecutor(Platform::runLater);\n UserThread.setTimerClass(UITimer.class);\n\n shutDownHandler = this::stop;\n BisqApp.shutDownHandler = this::stop;\n CommonSetup.setup(this::showErrorPopup);\n CoreSetup.setup(bisqEnvironment);\n }", "public void onStart() {\n\t\t\n\t}", "protected void onPreCreateApplication() {\n\n\t}", "protected void init() { \n ServletContext servletContext = getServletContext();\n applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\n String names[] = applicationContext.getBeanDefinitionNames();\n\n for (String name : names) {\n System.out.println(\"name:\" + name);\n }\n }", "public void testLoadOnStartup() throws Exception {\n WebXMLString wxs = new WebXMLString();\n wxs.addServlet( \"servlet1\", \"one\", Servlet1.class );\n wxs.setLoadOnStartup( \"servlet1\" );\n wxs.addServlet( \"servlet2\", \"two\", Servlet2.class );\n wxs.addServlet( \"servlet3\", \"three\", Servlet3.class );\n \n ServletRunner sr = new ServletRunner( toInputStream( wxs.asText() ) );\n ServletUnitClient wc = sr.newClient();\n InvocationContext ic = wc.newInvocation( \"http://localhost/three\" );\n assertEquals( \"Initialized servlets\", \"Servlet1,Servlet3\", ic.getServlet().getServletConfig().getServletContext().getAttribute( \"initialized\" ) );\n }", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "public void startApp()\r\n\t{\n\t}", "@Override\r\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tCptedController.getInstance();\r\n\t}", "public void init(@Observes @Initialized(ApplicationScoped.class) Object init) {\n }", "@BundleStart\n public void bundleStart() {\n System.out.println(\"In bundleStart()!\");\n System.setProperty(\"test.bundle.start\", \"Jeehaa!\");\n }", "@PostConstruct\n\tpublic void init()\n\t{\n\t\tlogModule.info(TaskGenerator.class, \"初始化 Task generator...\");\n\t}", "@Override\n public void afterServletStart() {\n System.setProperty(\"opennms.home\", m_onmsHome);\n ConfigurationTestUtils.setRelativeHomeDirectory(m_onmsHome);\n }", "@PostConstruct\r\n\tpublic void doMyInitStuff() {\r\n\t\tSystem.out.println(\"init method\");\r\n\t}", "@PostConstruct\n\tpublic void init() {\n\t\tSystem.out.println(\"Opened Resource\");\n\t}", "@Override\r\n public void contextInitialized(ServletContextEvent servletContextEvent) {\r\n \r\n }", "@Override\n public void start() throws WebServerException {\n }", "@Override\n public final void contextInitialized(ServletContextEvent context) {\n try {\n LogTap.getInstance().reloadLogs();\n } catch (IOException e) {\n throw new HoneypotRuntimeException(e);\n }\n\n tcpListenerThread.start();\n sshListenerThread.start();\n }", "public void init() throws ServletException {\n\t\tSystem.out.println(\"=====start loginServler=========\");\n\t}", "@Override\n public void initialize() {\n\n try {\n /* Bring up the API server */\n logger.info(\"loading API server\");\n apiServer.start();\n logger.info(\"API server started. Say Hello!\");\n /* Bring up the Dashboard server */\n logger.info(\"Loading Dashboard Server\");\n if (dashboardServer.isStopped()) { // it may have been started when Flux is run in COMBINED mode\n dashboardServer.start();\n }\n logger.info(\"Dashboard server has started. Say Hello!\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\tpublic void onWLInitCompleted(Bundle savedInstanceState){\n\t\tsuper.loadUrl(getWebMainFilePath());\n\t\ttry {\n\t\t\tMaaS360SDK.initSDK(MainApplication.getApplication(), \"appKey\", \"licenseKey\", \n\t\t\t MainApplication.getApplication().getSDKListener(), PolicyAutoEnforceInfo.getInstance());\n\t\t} catch (MaaS360SDKInitializationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Add custom initialization code after this line\n\t}", "public void init() {\n\t\tThread appThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tSwingUtilities.invokeAndWait(doHelloWorld);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Finished on \" + Thread.currentThread());\n\t\t\t}\n\t\t};\n\t\tappThread.start();\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n if(!Synergykit.isInit()) {\n Synergykit.init(APPLICATION_TENANT, APPLICATION_KEY);\n Synergykit.setDebugModeEnabled(BuildConfig.DEBUG);\n }\n }", "public void contextInitialized(ServletContextEvent event) {\n\t\tthis.contextLoader = createContextLoader();\n\t\tif (this.contextLoader == null) {\n\t\t\tthis.contextLoader = this;\n\t\t}\n\t\tthis.contextLoader.initWebApplicationContext(event.getServletContext());\n\t\tUserBuffer.getInstance();\n\t}", "protected void onFirstTimeLaunched() {\n }", "void startup();", "void startup();", "private void showExecutionStart() {\n log.info(\"##############################################################\");\n log.info(\"Creating a new web application with the following parameters: \");\n log.info(\"##############################################################\");\n log.info(\"Name: \" + data.getApplicationName());\n log.info(\"Package: \" + data.getPackageName());\n log.info(\"Database Choice: \" + data.getDatabaseChoice());\n log.info(\"Database Name: \" + data.getDatabaseName());\n log.info(\"Persistence Module: \" + data.getPersistenceChoice());\n log.info(\"Web Module: \" + data.getWebChoice());\n }", "public void setStartOnStartup(Boolean startOnStartup) {\n\t\tthis.startOnStartup = startOnStartup;\n\t}", "void preInit();", "void preInit();", "public void onInitHandler() {\n }", "public void onStart() {\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tConnectionDB.getInstance();\n\t}", "public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}", "@Override\n protected void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n mTAG = this.getClass().getSimpleName();\n initConfigure();\n //PushAgent.getInstance(mContext).onAppStart();\n\n }", "void onStarted();", "@Override\n public void contextInitialized(ServletContextEvent event) {\n\n if (event != null) {\n sc = event.getServletContext();\n if (PROJECT_ID == null) {\n PROJECT_ID = sc.getInitParameter(\"BIGTABLE_PROJECT\");\n }\n if (INSTANCE_ID == null) {\n INSTANCE_ID = sc.getInitParameter(\"BIGTABLE_INSTANCE\");\n }\n }\n\n if (PROJECT_ID != null && PROJECT_ID.startsWith(\"@\")) {\n PROJECT_ID = null;\n }\n if (INSTANCE_ID != null && INSTANCE_ID.startsWith(\"@\")) {\n INSTANCE_ID = null;\n }\n\n if (PROJECT_ID == null) {\n PROJECT_ID = System.getProperty(\"BIGTABLE_PROJECT\");\n }\n if (INSTANCE_ID == null) {\n INSTANCE_ID = System.getProperty(\"BIGTABLE_INSTANCE\");\n }\n\n try {\n connect();\n } catch (IOException e) {\n if (sc != null) {\n sc.log(\"BigtableHelper - connect \", e);\n }\n }\n if (connection == null) {\n if (sc != null) {\n sc.log(\"BigtableHelper-No Connection\");\n }\n }\n if (sc != null) {\n sc.log(\"ctx Initialized: \" + PROJECT_ID + \" \" + INSTANCE_ID);\n }\n }", "public void contextInitialized(ServletContextEvent event) { \n super.contextInitialized(event); \n ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(event.getServletContext()); \n //获取bean \n // emailListener = (EmailListener) applicationContext.getBean(\"emailListener\"); \n // birthdayListener = (BirthdayListener) applicationContext.getBean(\"birthdayListener\"); \n /* \n 具体地业务代码 \n */ \n // emailListener.contextInitialized(event);\n // birthdayListener.contextInitialized(event);\n }" ]
[ "0.72432375", "0.712045", "0.6979342", "0.69704455", "0.69550717", "0.6954253", "0.69345665", "0.69170105", "0.68040967", "0.6789555", "0.6772578", "0.67518985", "0.67444676", "0.6720566", "0.6675147", "0.66502315", "0.66300994", "0.66281843", "0.65879136", "0.65701187", "0.6541174", "0.6515157", "0.6515157", "0.6499321", "0.6465515", "0.64486635", "0.64333296", "0.63888675", "0.636764", "0.6351226", "0.63257855", "0.6310874", "0.6308774", "0.6250258", "0.6240891", "0.6238247", "0.623639", "0.6231157", "0.6231157", "0.6224964", "0.6224023", "0.62160844", "0.6212876", "0.6207338", "0.6192469", "0.6191174", "0.61833906", "0.61553276", "0.61476773", "0.61287874", "0.6120183", "0.6118751", "0.61186826", "0.6109578", "0.60834", "0.6077021", "0.6076074", "0.60674", "0.6055054", "0.6053368", "0.6053368", "0.6039977", "0.60354024", "0.6034454", "0.6029293", "0.60289335", "0.6019125", "0.60051286", "0.60005164", "0.5997742", "0.5990268", "0.5986962", "0.5986493", "0.59777933", "0.59755516", "0.5972265", "0.5971741", "0.59591985", "0.59515846", "0.59511495", "0.5950737", "0.59429985", "0.5941715", "0.5941056", "0.5941029", "0.5941011", "0.59398806", "0.59398806", "0.59392744", "0.5937641", "0.5928113", "0.5928113", "0.59272224", "0.5917866", "0.5917145", "0.5915007", "0.5910473", "0.59103996", "0.5909246", "0.59070337" ]
0.59167707
95
Notification that the servlet context is about to be shut down.
@Override public void contextDestroyed(ServletContextEvent sce) { Log.closeLogger(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public final void contextDestroyed(final ServletContextEvent sce) {\n if (asDaemon != null) {\n asDaemon.shutdown();\n }\n\n // Unregister MySQL driver\n APIServerDaemonDB.unregisterDriver();\n\n // Notify termination\n System.out.println(\"--- APIServerDaemon Stopped ---\");\n }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\t\tshutdownEvt.fire(new ContainerShutdownEvent());\n\t}", "public void contextDestroyed(ServletContextEvent servletContextEvent) {\n }", "@Override\r\n public void contextDestroyed(ServletContextEvent event) {\n }", "default public void contextDestroyed(ServletContextEvent sce) {}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\tserverAPP.quit();\n\t}", "@Override\n public void contextDestroyed(ServletContextEvent arg0) {\n\n }", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent event) {\r\n\t\tinvoke(\"contextDestroyed\", event);\r\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t}", "public void contextDestroyed(ServletContextEvent event) {\n\t}", "public void contextDestroyed(ServletContextEvent contextEvent) {\n \n \tsuper.serviceTermination(contextEvent,SERVICE_NAME); \n }", "public void contextDestroyed(ServletContextEvent servletcontextevent) \n\t {\n\t\t \n\t }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\t\n\t}", "public void contextDestroyed(ServletContextEvent sce) {\n }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent contextEvent) {\n t.interrupt();\n\t\t\n\t}", "public void contextDestroyed(ServletContextEvent event) {\r\n \tlog.write(\"Context Destroyed Override - ControlClass\");\r\n \tshutdown();\r\n }", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\r\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent ctx) {\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\n\t}", "public void contextDestroyed(ServletContextEvent sce)\n {\n }", "@Override\n public void contextDestroyed(ServletContextEvent sce) {\n }", "@Override\n public void contextDestroyed(ServletContextEvent sce) {\n }", "@Override\r\n\t\tpublic void contextDestroyed(ServletContextEvent sce) {\r\n\t\t}", "@Override\n public void contextDestroyed(ServletContextEvent sce) {\n \n }", "@Override\n public void contextDestroyed(ServletContextEvent sce) {\n\n }", "public final void destroy()\n {\n log.info(\"PerformanceData Servlet: Done shutting down!\");\n }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\t}", "public void contextDestroyed(final ServletContextEvent event) {\n }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent event)\n\t{\n\t\tlogger.debug(\"应用程序关闭,这里负责销毁所有Session\");\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\r\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\r\n\t}", "public void contextDestroyed(ServletContextEvent sce) {\n\t}", "@Override\n public void contextDestroyed(ServletContextEvent event) {\n closeWebApplicationContext(event.getServletContext());\n ContextCleanupListener.cleanupAttributes(event.getServletContext());\n }", "public void contextDestroyed(ServletContextEvent arg0) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent sce) {\n\t\tSystem.out.println(\"MyListener.contextDestroyed() 销毁\");\n//\t\t当server关闭时,销毁applic\n\t\t\n\t\t\n\t}", "public synchronized void contextDestroyed(ServletContextEvent event) {\n servletContext = null;\n userOnlineCounter = 0;\n }", "public void contextDestroyed(ServletContextEvent event) {\n\t\tif (this.contextLoader != null) {\n\t\t\tthis.contextLoader.closeWebApplicationContext(event.getServletContext());\n\t\t}\n\t\tEnumeration<String> attrNames = event.getServletContext().getAttributeNames();\n\t\twhile (attrNames.hasMoreElements()) {\n\t\t\tString attrName = (String) attrNames.nextElement();\n\t\t\tif (attrName.startsWith(\"org.springframework.\")) {\n\t\t\t\tObject attrValue = event.getServletContext().getAttribute(attrName);\n\t\t\t\tif (attrValue instanceof DisposableBean) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t((DisposableBean) attrValue).destroy();\n\t\t\t\t\t} catch (Throwable ex) {\n\t\t\t\t\t\tlog.error(\"Couldn't invoke destroy method of attribute with name '\" + attrName + \"'\", ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void serverWasShutdown();", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\ttry {\n\t\t\tlog.info(\"Initiating shutdown of StarExec.\");\n\n\t\t\tStackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();\n\t\t\tString stackString = \"\";\n\t\t\tfor ( StackTraceElement element : stacktrace ) {\n\t\t\t\t// stackString += element.toString()+\"\\t\"+ClassLoader.findClass(element.getClassName()).getResource(\".class\")+\"\\n\";\n\t\t\t\tstackString += element.toString()+\"\\n\";\n\t\t\t}\n\t\t\tlog.debug( \"\\n\\ncontextDestroyed() stackString:\\n\"+stackString+\"\\n\" );\n\n\t\t\tlog.debug( \"\\n\\nServletContext info:\\ngetInitParameterNames(): \"+arg0.getServletContext().getInitParameterNames()+\n\t\t\t\t\t\"\\ntoString(): \"+arg0.toString()+\"\\n\" );\n\n\n\n\t\t\t// Stop the task scheduler since it freezes in an unorderly shutdown...\n\t\t\tlog.debug(\"Stopping starexec task scheduler...\");\n\t\t\ttaskScheduler.shutdown();\n\n\t\t\t// Save cached Analytics events to DB\n\t\t\tAnalytics.saveToDB();\n\n\t\t\t// Make sure to clean up database resources\n\t\t\tlog.debug(\"Releasing database connections...\");\n\t\t\tCommon.release();\n\n\t\t\tlog.debug(\"Releasing Util threadpool...\");\n\t\t\tUtil.shutdownThreadPool();\n\n\t\t\tR.BACKEND.destroyIf();\n\t\t\t// Wait for the task scheduler to finish\n\t\t\ttaskScheduler.awaitTermination(10, TimeUnit.SECONDS);\n\t\t\ttaskScheduler.shutdownNow();\n\t\t\tlog.info(\"The task scheduler reports it was \" + (taskScheduler.isTerminated() ? \"\" : \"not \") +\n\t\t\t \"terminated successfully.\");\n\t\t\tlog.info(\"StarExec successfully shutdown\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t\tlog.error(\"StarExec unclean shutdown\");\n\t\t}\n\t}", "@Override\n public void contextDestroyed(ServletContextEvent event) {\n if (connection == null) {\n return;\n }\n try {\n connection.close();\n } catch (IOException io) {\n if (sc != null) {\n sc.log(\"contextDestroyed \", io);\n }\n }\n connection = null;\n }", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\tlogger.debug(\"Destory Logback\");\r\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\tConnectionDB.destroy();\n\t}", "public void shutdown()\n {\n // todo\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tscheduler.shutdownNow();\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\tscheduler = Executors.newSingleThreadScheduledExecutor();\n\t\tUpdateContexts command = new UpdateContexts(); \n\t\tscheduler.scheduleAtFixedRate(command, 0, 15, TimeUnit.MINUTES);\n\t}", "public void shutDown()\n {\n // Runtime.getRuntime().removeShutdownHook(shutdownListener);\n //shutdownListener.run();\n }", "@GetMapping(\"/logout/context\")\n\tpublic void shutdownContext() {\n\t\t((ConfigurableApplicationContext) context).close();\n\n\t}", "public void contextDestroyed(ServletContextEvent sce) {\n System.out.println(\"我随着服务器一起挂啦\");\n }", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent m_event) {\n\t\tDataBaseConn.closeConn();\r\n\t\tArkService.getInstance().stop();\r\n\t\t//DataBaseConn.closeConn();\r\n\t}", "public void contextDestroyed(ServletContextEvent sce) {\n if (emf.isOpen()) emf.close();\n }", "public void shutDown();", "public void shutdown() {\n\t\tserver.stop(0);\n\t}", "@Override\n public void shutDown() {\n }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent evt) {\n\t\ttry {\n\t\t\tPersistenceManager.getInstance().closeEntityManagerFactory();\n\t\t} catch (Exception ex) {\n\t\t\tevt.getServletContext().log(ex.getMessage(), ex);\n\t\t}\n\t}", "public synchronized void shutdown() {\n final String actionDescription = \"shutdown\";\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_TERMINATING.getMessageDefinition());\n\n if (instance != null) {\n this.instance.shutdown();\n }\n\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_SHUTDOWN.getMessageDefinition());\n }", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown() {\n }", "private void shutdown()\n\t\t{\n\t\tif (myChannelGroup != null)\n\t\t\t{\n\t\t\tmyChannelGroup.close();\n\t\t\t}\n\t\tif (myHttpServer != null)\n\t\t\t{\n\t\t\ttry { myHttpServer.close(); } catch (IOException exc) {}\n\t\t\t}\n\t\tmyLog.log (\"Stopped\");\n\t\t}", "public static void shutdown() {\n\t}", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\temf.close();\n\t}", "@Override\r\n\tpublic void contextDestroyed(ServletContextEvent env) {\n\t\tInteger nn= (Integer)env.getServletContext().getAttribute(\"num\");\r\n dao.addCount(nn);\r\n String path=env.getServletContext().getContextPath();\r\n System.out.println(path+\"项目销毁了\");\r\n \r\n\t}", "protected void stopContext () throws Exception\n {\n super.doStop();\n\n //Call the context listeners\n ServletContextEvent event = new ServletContextEvent(_scontext);\n Collections.reverse(_destroySerletContextListeners);\n MultiException ex = new MultiException();\n for (ServletContextListener listener:_destroySerletContextListeners)\n {\n try\n {\n callContextDestroyed(listener,event);\n }\n catch(Exception x)\n {\n ex.add(x);\n }\n }\n ex.ifExceptionThrow();\n }", "public void shutdown() {\n // no-op\n }", "@Override\n protected void shutDown() {\n }", "public void shutdown() {\n\t\t\n\t}", "@Override\n public void contextDestroyed( ServletContextEvent sce ) {\n LOG.debug( \"Destroying EMF\" );\n EMFactory.closeEMF();\n LOG.debug( \"EMF Destroyed\" );\n }", "public void shutdown()\n {\n // nothing to do here\n }", "void shutDown();", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\tif(factory != null){\n\t\t\tfactory.close();\n\t\t}\n\t}", "@Override\n\tpublic void shutdown()\n\t{\n\t}", "public void shutdown() {\n/* 188 */ this.shutdown = true;\n/* */ }", "@Override\n public void contextDestroyed(ServletContextEvent sce) {\n try { connection.close(); } catch(SQLException e) {}\n }", "public void shutdown() {\n this.isShutdown = true;\n }", "protected void shutdown() {\n\r\n }", "@Override\n public void contextDestroyed(ServletContextEvent servletContextEvent) {\n if (this.driver != null) {\n try {\n DriverManager.deregisterDriver(driver);\n //LOG.info(String.format(\"deregistering jdbc driver: %s\", driver));\n } catch (SQLException e) {\n// LOG.warn(\n// String.format(\"Error deregistering driver %s\", driver),\n// e);\n }\n this.driver = null;\n } //else {\n// LOG.warn(\"No driver to deregister\");\n //}\n\n }", "public synchronized void shutdown() {\n server.stop();\n }", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "protected abstract void shutdown();", "@Override\n\tpublic void shutdown() {\n\t}", "@Override\n\tpublic void shutdown() {\n\t}", "@Override\r\n protected void shutdownInternal() {\r\n service.stop();\r\n }", "void shutDownServer() throws Exception;" ]
[ "0.76162034", "0.7473447", "0.7465464", "0.7455834", "0.743523", "0.73690474", "0.7331212", "0.73162115", "0.73066854", "0.72999924", "0.7299205", "0.72952133", "0.7283056", "0.728131", "0.72746867", "0.7270311", "0.7266045", "0.7266045", "0.7266045", "0.7266045", "0.7234551", "0.7234551", "0.7230115", "0.7228857", "0.7228857", "0.7228857", "0.7228857", "0.7205591", "0.72020584", "0.72020584", "0.7183908", "0.71798986", "0.71581644", "0.7156025", "0.71521324", "0.71521324", "0.71187747", "0.7094507", "0.70859784", "0.70859784", "0.7081349", "0.7078416", "0.7060505", "0.7011773", "0.7011773", "0.7011773", "0.7011773", "0.70043045", "0.69847167", "0.6816892", "0.679912", "0.6782482", "0.67063415", "0.66704595", "0.6664734", "0.66489977", "0.66169393", "0.6585946", "0.6573479", "0.65645605", "0.6546074", "0.6537184", "0.6495711", "0.6490444", "0.6486216", "0.64641696", "0.64544", "0.64455366", "0.64447564", "0.64447564", "0.64447564", "0.64447564", "0.6438149", "0.6434295", "0.64252067", "0.6410364", "0.64091814", "0.63638806", "0.6357555", "0.6357256", "0.63527447", "0.6340801", "0.6328406", "0.6307303", "0.6298786", "0.6294586", "0.6273158", "0.6273124", "0.62633824", "0.62617177", "0.62546337", "0.62438315", "0.6231773", "0.6231773", "0.6231773", "0.62308264", "0.62179255", "0.62179255", "0.6211807", "0.6207588" ]
0.66094774
57
/ PRE: el largo coordX y coordY debe ser como maximo 11 caracteres y como minimo 8 caracteres
@Override public Retorno registrarEsquina(Double coordX, Double coordY) { Retorno r = new Retorno(); if (coordenadasValidas(coordX, coordY)) { r = mapa.registrarEsquina(coordX, coordY); } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makePoint(String x, String y) {\n List<String> decX = putDecimal(x);\n List<String> decY = putDecimal(y);\n\n //for every string value x check if its valid, if it is, find a valid y coordinate\n for (String dx : decX) {\n if (isValid(dx)) {\n for (String dy : decY) {\n if (isValid(dy)) {\n coordinates.add(\"(\" + dx + \", \" + dy + \")\");\n }\n }\n }\n }\n }", "private static int CoordinateFilled(int y, int x) {\r\n\t\tint retVal = y*9+x;\r\n\t\treturn retVal;\r\n\t}", "public void coordinatesShipConverter( Coordinates startCoord, Coordinates endCoord) {\n\t\t\r\n\t\tif (startCoord.getNumber()>endCoord.getNumber()) {\r\n\t\t\tint interm = startCoord.getNumber();\r\n\t\t\tstartCoord.setNumber(endCoord.getNumber());\r\n\t\t\tendCoord.setNumber(interm);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (startCoord.getLetter()>endCoord.getLetter()) {\r\n\t\t\tchar interm = startCoord.getLetter();\r\n\t\t\tstartCoord.setLetter(endCoord.getLetter());\r\n\t\t\tendCoord.setLetter(interm);\r\n\t\t}\r\n\t}", "public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}", "@Test\n public void testConvertCoordToPixel() throws Exception {\n System.out.println(\"convertCoordToPixel\");\n double x = 800;\n double y = 500;\n double lat = -71.320920;\n double lon = 46.759400;\n Utils instance = new Utils();\n Coordonnee coord = new Coordonnee(-71.320920,46.759400);\n assertEquals(\"test latitude\",x,instance.convertCoordToPixel(coord).getLat(),0);\n assertEquals(\"test longitude\",y,instance.convertCoordToPixel(coord).getLon(),0);\n }", "private String coords(int x, int y) {\n return String.format(\"%d,%d\", x, y);\n }", "private double convertCoord(double val) {\n return val - 50;\n }", "protected static String getXY(List<AccessibilityNodeInfo> nodes ) {\n try {\n String listStringXY= CopyOfStringUtil.ListToString(nodes);\n Acesslog(\"当前屏幕信息 \"+listStringXY);\n String test = listStringXY.substring(listStringXY.indexOf(\"boundsInScreen\")+1,listStringXY.indexOf(\"packageName\"));\n String test2 = test.substring(test.indexOf(\"(\")+1,test.indexOf(\")\"));\n //以a为分割字符 Rect(209, 432 - 860, 494)\n String[] splitstr=test2.split(\"-\");\n for(String res : splitstr){\n String[] splitsXY=res.split(\",\");\n String X=splitsXY[0];\n String Y=splitsXY[1];\n Acesslog(\"测试 \"+test2 );\n\n Acesslog(\"取到的坐标 X\"+X+\" Y \"+Y );\n return execShell(\"input tap \"+X+\"\"+Y);\n\n }\n\n\n\n\n\n }catch(Exception e){\n Acesslog(\"获取坐标 失败\"+e);\n\n }\n return null;\n }", "public Coordinate() { row = col = -1; }", "private static Vector2f toGuiCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x/DisplayManager.getWidth()) - 0.5f, y/DisplayManager.getHeight()));\r\n\t}", "String dCoord(int coord) {\n if (coord < 0)\n return (minimap.conf.netherpoints ? \"n\" : \"\") + \"-\" + Math.abs(coord + 1);\n else\n return (minimap.conf.netherpoints ? \"n\" : \"\") + \"+\" + coord;\n }", "public String getCoordsForLP() {\n String x = coords[0] < 0 ? \"neg\" + Math.abs(coords[0]) :\n Integer.toString(Math.abs(coords[0]));\n String y = coords[1] < 0 ? \"neg\" + Math.abs(coords[1]) :\n Integer.toString(Math.abs(coords[1]));\n return x + \"_\" + y;\n }", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "private Sprite.UV[] buildFontSpriteCoords() {\n Sprite.UV[] uvs = new Sprite.UV[16*16];\n float step = 1.0f / 16.0f;\n\n for (int y=0; y<16; y++) {\n for (int x=0; x<16; x++) {\n int offset = (y*16)+x;\n uvs[offset] = new Sprite.UV();\n uvs[offset].s = (x * step) + step;\n uvs[offset].t = (y * step) + step;\n uvs[offset].u = x * step;\n uvs[offset].v = y * step;\n }\n }\n\n return uvs;\n }", "String getPosY();", "private void settingXY9Array(int x, int y, int[] arrX, int[] arrY) {\n for (int i = 0; i < 9; i++) {\n arrY[i] = y + i / 3 - 1;\n }\n arrX[0] = x - 1;\n arrX[1] = x;\n arrX[2] = x + 1;\n arrX[3] = x - 1;\n arrX[4] = x;\n arrX[5] = x + 1;\n arrX[6] = x - 1;\n arrX[7] = x;\n arrX[8] = x + 1;\n for (int i = 0; i < arrX.length; i++) {\n if (arrX[i] >= numSqW || arrX[i] < 0 || arrY[i] < 0 || arrX[i] >= numSqH) {\n arrX[i] = -1;\n arrY[i] = -1;\n }\n }\n }", "@Test\n public void testConvertPixelToCoord() throws Exception {\n System.out.println(\"convertPixelToCoord\");\n double x = 800;\n double y = 500;\n double lat = -71.320920;\n double lon = 46.759400;\n Utils instance = new Utils();\n Coordonnee result = instance.convertPixelToCoord(x, y);\n assertEquals(\"test latitude\",lat,result.getLat(),0);\n assertEquals(\"test longitude\",lon,result.getLon(),0);\n }", "@Override\r\n\tpublic void setMinCoordinates() {\n\t\t\r\n\t}", "public void setToCoordinates(int toX, int toY);", "public CellCoord(String coord) {\n if (coord == null || coord.length() == 0) {\n valid = false;\n return;\n }\n int rowSplitIndex = 0, length = coord.length();\n while (rowSplitIndex < length && !Character.isDigit(coord.charAt(rowSplitIndex))) rowSplitIndex++;\n\n String temp = coord.substring(0, rowSplitIndex).toUpperCase(); //coord.substring(rowSplitIndex)\n for (int i = rowSplitIndex - 1; i >= 0; i--) {\n if (Character.getType(temp.charAt(i)) != Character.UPPERCASE_LETTER) {\n valid = false;\n return;\n }\n column += Math.pow(26, (rowSplitIndex - 1) - i) * (temp.charAt(i) - 64);\n }\n\n try {\n row = Integer.parseInt(coord.substring(rowSplitIndex));\n } catch (NumberFormatException ignored) {\n }\n if (row <= 0 || column <= 0 || row > SpreadSheet.MAX_ROWS || column > SpreadSheet.MAX_COLUMNS) {\n valid = false;\n }\n }", "public void setCoord(short xPos , short yPos ){\n this.xPos = xPos;\n this.yPos = yPos;\n }", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "private void setCoordsByCommaSeparatedString(final String sCoords) {\n \n \t\tStringTokenizer sToken = new StringTokenizer(sCoords, \",\");\n \n \t\tshArCoords = new short[sToken.countTokens() / 2][2];\n \n \t\tint iCount = 0;\n \n \t\twhile (sToken.hasMoreTokens()) {\n \t\t\t// Filter white spaces\n \t\t\tshort shXCoord = Short.valueOf(sToken.nextToken().replace(\" \", \"\")).shortValue();\n \n \t\t\tif (!sToken.hasMoreTokens())\n \t\t\t\treturn;\n \n \t\t\tshort shYCoord = Short.valueOf(sToken.nextToken().replace(\" \", \"\")).shortValue();\n \n \t\t\tshArCoords[iCount][0] = shXCoord;\n \t\t\tshArCoords[iCount][1] = shYCoord;\n \n \t\t\tiCount++;\n \t\t}\n \t}", "public void mouseMoved( MouseEvent event )\n\t {\n\t \t /*\n\t \t * Change one unit into pixels sx = width/(b-a)\n\t \t * X = (x-a)*sx\n\t \t * \n\t \t * sy = height/(ymax - ymin)\n\t \t * Y1 = height - (y-ymin)*sy\n\t \t * Y2 = (ymax-y)*sy\n\t \t * Y1=Y2(same expression)\n\t \t */\n\t \t double b = InputView.getEnd();\n\t \t\t double a = InputView.getStart();\n\t \t DecimalFormat df = new DecimalFormat(\"#.##\");\n\t \t double sx = 594/(b-a);\n\t \t double sy = 572/(PlotPoints.getMax()-PlotPoints.getMin());\n\t \t coords.setText( \"(\"+ df.format((event.getX()/sx)+a-.02) + \", \" + df.format((.17 + PlotPoints.getMax()) - (event.getY()/sy)) + \")\" );\n\t }", "private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "public int getXY(int x, int y);", "public static void main(final String[] args) throws IOException {\r\n\t\tString str;\r\n\t\tfinal FileInputStream in = new FileInputStream(\"C:\\\\git\\\\AoC2018\\\\Dag17\\\\src\\\\dag17\\\\input1.txt\");\r\n\t\tfinal BufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\twhile ((str = br.readLine()) != null) {\r\n\t\t\tinput.add(str);\r\n\t\t}\r\n\t\tbr.close();\r\n\t\t// precalculated dimensions\r\n\t\tint tempX;\r\n\t\tint tempY;\r\n\t\tint tempX2;\r\n\t\tint tempY2;\r\n\t\tdimensionX = maxX - minX + 5;\r\n\t\tdimensionY = maxY + 1;\r\n\t\tg = new char[dimensionX][dimensionY];// maxx-minx+3,maxy+1\r\n\t\tint sourceX = 500 - minX + 1;// 500-minx+1\r\n\t\tfor (int j = 0; j < dimensionY; j++) {\r\n\t\t\tfor (int i = 0; i < dimensionX; i++) {\r\n\t\t\t\tg[i][j] = '.';\r\n\t\t\t}\r\n\t\t}\r\n\t\tg[sourceX][0] = '+';\r\n\t\tString inp[];\r\n\t\tfor (String s : input) {\r\n\t\t\tinp = s.split(\" \");\r\n\t\t\tif (s.substring(0, 2).equals(\"x=\")) {\r\n\t\t\t\ttempX = Integer.valueOf(inp[0].substring(2, inp[0].length() - 1));\r\n\t\t\t\tif (tempX > maxX) {\r\n\t\t\t\t\tmaxX = tempX;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempX < minX) {\r\n\t\t\t\t\tminX = tempX;\r\n\t\t\t\t}\r\n\t\t\t\tinp = inp[1].substring(2, inp[1].length()).split(\"[.]\");\r\n\t\t\t\ttempY = Integer.valueOf(inp[0]);\r\n\t\t\t\ttempY2 = Integer.valueOf(inp[2]);\r\n\t\t\t\tif (tempY2 > maxY) {\r\n\t\t\t\t\tmaxY = tempY2;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempY < minY) {\r\n\t\t\t\t\tminY = tempY;\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = tempY; i <= tempY2; i++) {\r\n\t\t\t\t\tg[tempX - minX + 2][i] = '#';\r\n\t\t\t\t}\r\n\t\t\t} else { // y\r\n\t\t\t\ttempY = Integer.valueOf(inp[0].substring(2, inp[0].length() - 1));\r\n\t\t\t\tif (tempY > maxY) {\r\n\t\t\t\t\tmaxY = tempY;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempY < minY) {\r\n\t\t\t\t\tminY = tempY;\r\n\t\t\t\t}\r\n\t\t\t\tinp = inp[1].substring(2, inp[1].length()).split(\"[.]\");\r\n\t\t\t\ttempX = Integer.valueOf(inp[0]);\r\n\t\t\t\ttempX2 = Integer.valueOf(inp[2]);\r\n\t\t\t\tif (tempX2 > maxX) {\r\n\t\t\t\t\tmaxX = tempX2;\r\n\t\t\t\t}\r\n\t\t\t\tif (tempX < minX) {\r\n\t\t\t\t\tminX = tempX;\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = tempX; i <= tempX2; i++) {\r\n\t\t\t\t\tg[i - minX + 2][tempY] = '#';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"maxX \" + maxX + \" maxY \" + maxY);\r\n\t\tSystem.out.println(\"minX \" + minX + \" minY \" + minY);\r\n\r\n\t\t// start: travel down from pointOfOrigin, mark with | until reach # or ~\r\n\t\t// first to reach maxY it ends\r\n\t\t// mark | both sides until hit # or get to freefall if beneath is (. or | ) then\r\n\t\t// call start\r\n\t\t// if enclosed by # mark all with ~\r\n\t\t// repeat until reach maxY\r\n\r\n\t\tint yolo = 0;\r\n\t\twhile (!fill(sourceX, 1)) {\r\n//\t\t\tif(yolo++ % 100 == 0) {\r\n//\t\t\t\tprint();\r\n//\t\t\t}\r\n\t\t}\r\n//\t\tprint();\r\n\t\tyolo = totalWaterTiles() - minY;\r\n//\t\tSystem.out.println(\"Wet tiles >31649 : \" + yolo);\r\n\t\tint oldYolo = 0;\r\n\t\twhile (oldYolo < yolo) {\r\n\t\t\toldYolo = yolo;\r\n\t\t\tSystem.out.println(\"YOLO!\");\r\n\t\t\tfill(sourceX, 1);\r\n\t\t\tyolo = totalWaterTiles() - minY;\r\n\t\t}\r\n\t\tprint();\r\n\t\tSystem.out.println(\"Wet tiles >31649 <32214: \" + yolo);\r\n\t\tSystem.out.println(\"Wet Still water tiles : \" + totalStillWaterTiles());\r\n\t}", "public boolean Validate_Input(String attack_coord){\r\n\t\tattack_coord=attack_coord.trim(); //deletes any unecessary whitespace\r\n\t\tif(attack_coord.length()>3) { //format incorrect\r\n\t\t\tdisplay.scroll(\"Input string too long to be proper coordinate\");\r\n\t\t\tdisplay.printScreen();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(attack_coord.length()<=1){\r\n\t\t\tdisplay.scroll(\"Input string too short to be proper coordinate\");\r\n\t\t\tdisplay.printScreen();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Convert the string inputs into integers\r\n\t\tString x_as_string = attack_coord.substring(1);\r\n\t\tycoor = letterToIndex(attack_coord.charAt(0));\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\t\txcoor=Integer.parseInt(x_as_string);\r\n\t\t\txcoor--; //to match the xcoor with the array position\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t display.scroll(\"Incorrect Format. Enter with letter and then number i.e. B3\");\r\n\t display.printScreen();\r\n\t return false;\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t\tif(!hisBoard.in_Grid(xcoor, ycoor)){\r\n\t\t\tdisplay.scroll(\"The Coordinate input is not within (A-J) or (1-10)\");\r\n\t\t\tdisplay.printScreen();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(hisBoard.already_attacked(xcoor,ycoor)){\r\n\t\t\tdisplay.scroll(\"Coordinate has already been attacked\");\r\n\t\t\tdisplay.printScreen();\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "posXY(int x, int y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public Coordinate(int x,int y)\n {\n this.x = x;\n this.y = y;\n }", "public HorizontalCoords() {\n }", "public String getGVCoordsForPosition() {\n return \"\\\"\" + coords[0] + \",\" + coords[1] + \"!\\\"\";\n }", "public void coFromInt(int coord) {\n int twist = 0;\n for(int j = 0; j < 7; j ++) {\n co[6 - j] = coord % 3;\n twist = (twist + coord % 3) % 3;\n coord /= 3;\n }\n co[7] = (3 - twist) % 3;\n }", "private double xPos(double xMetres){\r\n\t\treturn xMetres*14+canvas.getWidth()/2;\r\n\t}", "private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}", "@Test\n public void testHorizontalDisplacementTo() {\n System.out.println(\"Testing HorizontalDisplacementTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 555.998,\n 555.998,\n -555.998,\n -555.998,\n\t\t\t72.266,\n\t\t\t72.266,\n\t\t\t-72.266,\n\t\t\t-72.266\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.horizontalDisplacementTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }", "public Coordinates(int x, int y){\n this.x = x;\n this.y = y;\n }", "private Point convertToLogical(int x, int y)\n {\n // convert to next lowest multiple of agentGUISize using int division\n int agentGUISize = Parameters.getAgentGUISize();\n int newX = (x - viewportX) / agentGUISize;\n int newY = (y - viewportY) / agentGUISize;\n\n return new Point(newX, newY);\n }", "@Override\r\n\tpublic void setMaxCoordinates() {\n\t\t\r\n\t}", "long getCoordinates();", "long getCoordinates();", "public Coordinates(int x, int y)\r\n {\r\n xCoord = x;\r\n yCoord = y;\r\n }", "public static int getBukkitPosition(int x,int y){\n return ((y-1)*9)+x-1;\n }", "private boolean setCoords(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) {\r\n // Ensure all x co-ordinates are in the first quadrant\r\n if(x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0) {\r\n throw new IllegalArgumentException(\"Error: Non-negative numbers for the X co-ordinates only\");\r\n } else if(y1 < 0 || y2 < 0 || y3 < 0 || y4 < 0) {\r\n throw new IllegalArgumentException(\"Error: Non-negative numbers for the Y co-ordinates only\");\r\n } else if(x1 > 20 || x2 > 20 || x3 > 20 || x4 > 20) {\r\n throw new IllegalArgumentException(\"Error: X co-ordinate values cannot be greater than 20\");\r\n } else {\r\n \treturn(true);\r\n }\r\n }", "@Test\n\tpublic void testIfCoordinatesAreValid()\n\t{\n\t\tData d = new Data();\n\t\tCoordinate c = d.getCoordinate(0); // at index 0 is the king's default location (5, 5)\n\t\tassertEquals(c.getX(), 5);\n\t\tassertEquals(c.getY(), 5);\t\n\t}", "Coordinate(int Xposition, int Yposition) {\n\t\tthis.X = Xposition;\n\t\tthis.Y = Yposition;\n\n\t}", "@Test\n\tpublic void testDecodingCoordinates55()\n\t{\n\t\tData d = new Data();\n\t\tCoordinate c = d.decode(55);\n\t\tassertEquals(c.getX(), 10);\n\t\tassertEquals(c.getY(), 4);\n\t}", "double getMapPositionX();", "public String getGVCoordsForLabel() {\n StringBuilder coordsBuilder = new StringBuilder();\n\n coordsBuilder.append(\"X\");\n\n if (coords[0] < 0) {\n coordsBuilder.append(\"neg\");\n }\n\n coordsBuilder.append(Math.abs(coords[0])).append(\"Y\");\n\n if (coords[1] < 0) {\n coordsBuilder.append(\"neg\");\n }\n\n coordsBuilder.append(Math.abs(coords[1]));\n\n return coordsBuilder.toString();\n }", "default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }", "public Piste(int x, int y, int ala_x, int ala_y, int yla_x, int yla_y){\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.minX=ala_x;\n\t\tthis.minY=ala_y;\n\t\tthis.maxX=yla_x;\n\t\tthis.maxY=yla_y;\n\t}", "public Coordinate(int x, int y, int data){\r\n this.x = x;\r\n this.y = y;\r\n this.data = data;\r\n }", "public MbCoordDpto() {\r\n \r\n }", "private static Vector2f toScreenCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x + 0.5f) * DisplayManager.getWidth(), y * DisplayManager.getHeight()));\r\n\t}", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "int getLatE6();", "int getLatE6();", "@Test\n\tpublic void testBoardCoordinates() {\n\n\t\ttry {\n\t\t\tAssert.assertTrue((0 == Board.getFieldIndex(\"A1\")));\n\t\t\tAssert.assertTrue((8 == Board.getFieldIndex(\"A2\")));\n\t\t\tAssert.assertTrue((1 == Board.getFieldIndex(\"B1\")));\n\t\t\tAssert.assertTrue((9 == Board.getFieldIndex(\"B2\")));\n\t\t\tAssert.assertTrue((63 == Board.getFieldIndex(\"h8\")));\n\t\t} catch (IllegalBoardException e) {\n\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t}", "protodef.b_math.coord getCoordInfo();", "private int[][] scaleTour(int xs, int ys)\n {\n int xsize = xs - diam;\n int ysize = ys - diam;\n\n int nnodes = coords[0].length;\n int[][] tour = new int[2][nnodes];\n double[] borders = new double[4]; // the extreme values of the coords\n\t\t\n // initialize \n for( int i = 0; i < 3; i++ )\n {\n if( i % 2 == 0 )\n borders[i] = Double.MAX_VALUE;\n else\n borders[i] = Double.MIN_VALUE;\n }\n\n // find the extreme values of the coords\n for( int i = 0; i < nnodes; i++ )\n {\n if( coords[0][i] < borders[0] )\n borders[0] = coords[0][i];\n if( coords[0][i] > borders[1] )\n borders[1] = coords[0][i];\n if( coords[1][i] < borders[2] )\n borders[2] = coords[1][i];\n if( coords[1][i] > borders[3] )\n borders[3] = coords[1][i];\n }\n\t\t\n // calculate the scaling factor\n double x_scale = Math.max(borders[1] - borders[0], 1.0);\n double y_scale = Math.max(borders[3] - borders[2], 1.0);\n double scale = Math.min(xsize/x_scale, ysize/y_scale);\n\t\t\n // calculate the shift\t\t\n double x_off = 0.0;\n double y_off = 0.0;\n if( xsize/x_scale < ysize/y_scale )\n {\n x_off = diam/2;\n y_off = diam/2 + (ysize - scale*y_scale)/2;\n }\n else\n {\n x_off = diam/2 + (xsize - scale*x_scale)/2;\n y_off = diam/2;\n }\n\t\t\n // scale the coordinates\n for( int i = 0; i < nnodes; i++ )\n {\n tour[0][i] = (int) Math.round(x_off + scale * (coords[0][i] - borders[0]));\n tour[1][i] = (int) Math.round(ys - (y_off + scale * (coords[1][i] - borders[2])));\n }\n\t\t\n return tour;\n }", "private boolean hasValidNumber(String[] coord, int numShip) {\n int[] indices = getIndexFromCoord(coord);\n int x0 = indices[0];\n int y0 = indices[1];\n int x1 = indices[2];\n int y1 = indices[3];\n\n if (x0 == x1) {\n // horizontal ships\n if (Math.abs(y0 - y1) + 1 != numShip) {\n System.out.println(\"Error! Wrong length of the Submarine! Try again:\");\n return false;\n }\n return true;\n } else {\n // vertical ships\n if (Math.abs(x0 - x1) + 1 != numShip) {\n System.out.println(\"Error! Wrong length of the Submarine! Try again:\");\n return false;\n }\n return true;\n }\n }", "private SquareCoordinate(int x, int y)\n {\n \tthis.x = x;\n \tthis.y = y;\n }", "public Entidade(int x, int y, char s){\r\n\t\tposicaoX = x;\r\n\t\tposicaoY = y;\r\n\t\tsimbolo = s;\r\n\t}", "public void setFromCoordinates(int fromX, int fromY);", "@Test\n\tvoid testToPixel() {\n\t\t\n\t\t// read the image map of ariel \n\t\tBufferedImage map = null;\n\t\ttry {\n\t\t\tmap = ImageIO.read(new File(\"Ariel1.png\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMap m= new Map(map,Width,Height,start,end);\n\n\n\t\tPoint3D ans1 =m.toPixel(start);\n\t\tassertTrue(ans1.equals(pixelStart));\n\n\t\tPoint3D ans2 =m.toPixel(end);\n\t\tassertTrue(ans2.equals(pixelEnd));\n\n\n\t\tPoint3D ans3 = m.toPixel(p);\n\t\tassertTrue(ans3.equals(p1));\n\n\t}", "private void setNodeCoordinates (int trainPosition)\r\n\t{\r\n\t\tswitch (trainPosition)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\t// S node\r\n\t\t\t\tx = 312;\r\n\t\t\t\ty = 191;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 1:\r\n\t\t\t{\t\r\n\t\t\t\t// I1\r\n\t\t\t\tx = 272;\r\n\t\t\t\ty = 286;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 2:\r\n\t\t\t{\t\r\n\t\t\t\t// I2\r\n\t\t\t\tx = 165;\r\n\t\t\t\ty = 266;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 3:\r\n\t\t\t{\t\r\n\t\t\t\t// I3\r\n\t\t\t\tx = 181;\r\n\t\t\t\ty = 170;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 4:\r\n\t\t\t{\t\r\n\t\t\t\t// I4\r\n\t\t\t\tx = 300;\r\n\t\t\t\ty = 87;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tcase 5:\r\n\t\t\t{\r\n\t\t\t\t// I5\r\n\t\t\t\tx = 442;\r\n\t\t\t\ty = 136;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 6:\r\n\t\t\t{\t\r\n\t\t\t\t// I6\r\n\t\t\t\tx = 437;\r\n\t\t\t\ty = 249;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 7:\r\n\t\t\t{\t\r\n\t\t\t\t// O1\r\n\t\t\t\tx = 309;\r\n\t\t\t\ty = 371;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 8:\r\n\t\t\t{\t\r\n\t\t\t\t// O2\r\n\t\t\t\tx = 34;\r\n\t\t\t\ty = 291;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 9:\r\n\t\t\t{\t\r\n\t\t\t\t// O3\r\n\t\t\t\tx = 113;\r\n\t\t\t\ty = 54;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 10:\r\n\t\t\t{\t\r\n\t\t\t\t// O4\r\n\t\t\t\tx = 383;\r\n\t\t\t\ty = 18;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t\tcase 11:\r\n\t\t\t{\t\r\n\t\t\t\t// O5\r\n\t\t\t\tx = 560;\r\n\t\t\t\ty = 147;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 12:\r\n\t\t\t{\t\r\n\t\t\t\t// O6\r\n\t\t\t\tx = 558;\r\n\t\t\t\ty = 312;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "private int convert2d(int x, int y) {\n return x + y * width;\n }", "private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }", "public double[] setMapBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 154: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 20;\n/* 122: */\n/* 123:188 */ x_max = Math.max(x_max, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 124:189 */ x_max = Math.max(x_max, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 125:190 */ y_max = Math.max(y_max, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 126:191 */ y_max = Math.max(y_max, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 127:192 */ x_min = Math.min(x_min, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 128:193 */ x_min = Math.min(x_min, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 129:194 */ y_min = Math.min(y_min, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 130:195 */ y_min = Math.min(y_min, MercatorProj.LatToY(lrLat, mapZoomMax));\n /* x_max= (int)(Math.max(ulLon,lrLon)*1000000);\n x_min= (int)(Math.min(ulLon,lrLon)*1000000);\n y_max= (int)(Math.max(ulLat,lrLat)*1000000);\n y_min= (int)(Math.min(ulLat,lrLat)*1000000);*/\n/* 134:199 */ int height = Math.max(0, this.mapPanel.getHeight());\n/* 135:200 */ int width = Math.max(0, this.mapPanel.getWidth());\n/* 136:201 */ int newZoom = mapZoomMax;\n/* 137:202 */ int x = x_max - x_min;\n/* 138:203 */ int y = y_max - y_min;\n/* 139:204 */ while ((x > width) || (y > height))\n/* 140: */ {\n/* 141:205 */ newZoom--;\n/* 142:206 */ x >>= 1;\n/* 143:207 */ y >>= 1;\n/* 144: */ }\n/* 145:209 */ x = x_min + (x_max - x_min)/2;\n/* 146:210 */ y = y_min + (y_max - y_min)/2;\n/* 147:211 */ int z = 1 << mapZoomMax - newZoom;\n/* 148:212 */ x /= z;\n/* 149:213 */ y /= z;\n /* int Cx=256;\n int Cy=256;\n //Cx>>=(newZoom);\n //Cy>>=(newZoom);\n double x1=((x*(width/2))/Cx);\n double y1=((y*(height/2))/Cy);\n x=(int) x1;\n y=(int) y1;\n x >>=(newZoom-this.mapPanel.zoom);\n y >>=(newZoom-this.mapPanel.zoom);\n //x = x+156;\n //y = y-137;*/\n x=x/10000;\n y=y/10000;\n /* 150:214 */ this.mapPanel.setZoom(new Point((int)x, (int)y), newZoom);\n double[] res = { this.mapPanel.zoom, this.mapPanel.centerX, this.mapPanel.centerY,x,y, newZoom, z };\n traceln(Arrays.toString(res));\n traceln( x_max+\",\"+x_min+\",\"+y_max+\",\"+y_min+\",x:\"+x+\",y:\"+y+\",z:\"+z+\",nZomm:\"+newZoom);\n // this.mapPanel.getBounds().getX()setBounds( (int)ulLon,(int)ulLat, (int)width,(int)height);\n return res;\n\n/* 167: */ }", "public static void main (String[] args)\r\n {\n Coordenada utm = new Coordenada(new Datum(6378388D, 6356911.94612795),\r\n\t\t\t 481742, 4770800, 700, (byte)29, true);\r\n //System.out.println(\"lon=\"+utm.getLon()+\" lat=\"+utm.getLat());\r\n //System.out.println(utm.getGrados(utm.getLon())+\"¦ \"+utm.getMinutos(utm.getLon())+\"' \"+utm.getSegundos(utm.getLon())+\"\\\" \"+utm.getGrados(utm.getLat())+\"¦ \"+utm.getMinutos(utm.getLat())+\"' \"+utm.getSegundos(utm.getLat())+\"\\\"\");\r\n @SuppressWarnings(\"unused\")\r\n Coordenada res;\r\n res = utm.CambioDeDatum(new Datum(6378137D, 6356752.31424518));\r\n\r\n //System.out.println(\"Coordenadas en Datum destino: X=\"+res.X+\" Y=\"+res.Y);\r\n //System.out.println(\"lon=\"+res.getLon()+\" lat=\"+res.getLat());\r\n //System.out.println(res.getGrados(res.getLon())+\"¦ \"+res.getMinutos(res.getLon())+\"' \"+res.getSegundos(res.getLon())+\"\\\" \"+res.getGrados(res.getLat())+\"¦ \"+res.getMinutos(res.getLat())+\"' \"+res.getSegundos(res.getLat())+\"\\\"\");\r\n\t\t\t\t \r\n }", "public void aggiornaPropulsori(){\n xPropulsore1=new int[]{xCord[0],xCord[0]};\n yPropulsore1=new int[]{yCord[0],yCord[0]+15}; \n xPropulsore2=new int[]{xCord[2],xCord[2]}; \n yPropulsore2=new int[]{yCord[2],yCord[2]+15};\n \n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Coord[\" + this.x0 + \",\" + this.y0 + \"]\";\n\t}", "private int getXnYp(double locLeft, double locRight, double len, int num, int pos) {\n int np = (int) Math.floor(Math.max(locRight - locLeft, 0.0) / len * num);\n return np * (2 * pos - 1) + (1 - pos) * (num - 1);\n }", "public static String bboxVertices(){\n \treturn \"0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5\";\n }", "void setXandY(double x, double y){\r\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t}", "private int separarCoordenadasCol(String[] pCasilla){\n\t\treturn Integer.parseInt(pCasilla[1]);\n\t}", "static char[] coordinatesForUser(int[]coordinatesForDeveloper) throws IllegalArgumentException{\n if(coordinatesForDeveloper.length != 2){\n throw new IllegalArgumentException(\"The coordinates should be 2 (row and column), not \" + coordinatesForDeveloper.length +\".\");\n }\n char[]coordinatesForUser = new char[2];\n //row (with letters: A,B,C instead of 0,1,2)\n coordinatesForUser[0] = verticalCoordinateForUser(coordinatesForDeveloper[0]);\n //column (1,2,3 instead of 0,1,2)\n coordinatesForUser[1] = horizontalCoordinateForUser(coordinatesForDeveloper[1]);\n return coordinatesForUser;\n }", "String getPosX();", "public static String chajara(int x1, int y1,String in){\n x=x1;\n y=y1;\n //converts string to array\n String[] input = new String[x*y];\n for (int i = 0; i < input.length; i++) {\n input[i]=in.substring(i,i+1);\n }\n\n return convert(calculate(input));\n }", "private int distanceUnscaled(int px, int py) {\n return (px - sx) * (ey - sy) - (py - sy) * (ex - sx);\r\n }", "public Coordinate(final int r, final int c) { row = r; col = c; }", "public static int getStartXCoordinate(){\n\t\tint x = getThymioStartField_X(); \n\t\t\n\t\tif(x == 0){\n\t\t\n \t}else{\n \t x *= FIELD_HEIGHT;\n \t}\n \t\n\t\treturn x ;\n\t}", "@Test\n\tvoid testCheckCoordinates8() {\n\t\tassertTrue(DataChecker.checkCoordinate(new Integer(5)));\n\t}", "@Test\n public void testVerticalDisplacementTo() {\n System.out.println(\"Testing verticleDisplacementTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 555.998,\n -555.998,\n -555.998,\n 555.998,\n\t\t\t72.266,\n\t\t\t-72.266,\n\t\t\t-72.266,\n\t\t\t72.266\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.verticalDisplacementTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }", "public Cell(int x, int y){\n\t\tif((x<0 || x>7) || (y<0 || y>7)){\n\t\t\tSystem.out.println(\"The provided coordinates for the cell are out of range.\");\n\t\t\treturn;\n\t\t}\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.placedPiece = null;\n\t}", "private void parse(String position) throws Exception {\r\n\t \r\n\t StringTokenizer tokens = new StringTokenizer(position);\r\n\t if(tokens.hasMoreTokens()){\r\n\t \r\n\t try{\r\n\t\t x = Integer.parseInt(tokens.nextToken());\r\n\t\t y = Integer.parseInt(tokens.nextToken());\r\n\t }catch(NumberFormatException ne){\r\n\t throw new Exception(\"Invalid number!!\");\r\n\t }\r\n\t direction = tokens.nextToken().getBytes()[0];\r\n\t }\r\n\t if(!verifyBounds()){\r\n\t throw new Exception(\"Invalid inital position!!!\");\r\n\t }\r\n\t}", "public void calculateRenderCoords() {\n\t\tif(!enabled())\n\t\t\treturn;\n\t\t\n\t\tdouble xSpeed = -(startX - tarX);\n\t\tdouble ySpeed = -(startY - tarY);\n\t\t\n\t\tdouble fpsPerTick = 0;\n\t\tif(USE_EXPECTED)\n\t\t\tfpsPerTick = (double) Screen.expectedFps / Updater.expectedUps;\n\t\telse\n\t\t\tfpsPerTick = (double) Screen.fps / Updater.ups;\n\t\t\n\t\tdouble moveX = xSpeed / fpsPerTick;\n\t\tdouble moveY = ySpeed / fpsPerTick;\n\t\t\n\t\tif(isValidDouble(moveX))\n\t\t\trenderX += moveX;\n\t\tif(isValidDouble(moveY))\n\t\t\trenderY += moveY;\n\t\t\n\t\tif((int) renderX == (int) track.getX() || (int) renderX == (int) tarX)\n\t\t\tstartX = renderX;\n\t\tif((int) renderY == (int) track.getY() || (int) renderY == (int) tarY)\n\t\t\tstartY = renderY;\n\t}", "private void setDefaultMonsterCords()\n {\n this.xBeginMap=0;\n this.yBeginMap=0;\n this.xEndMap=16;\n this.yEndMap=16;\n\n this.xBeginSrc=0;\n this.yBeginSrc=0;\n this.xEndSrc=0;\n this.yEndSrc=0;\n\n }", "private static char horizontalCoordinateForUser(int horizontalCoordinateForDeveloper){\n //column (1,2,3 instead of 0,1,2)\n return (char)((int) '1' + horizontalCoordinateForDeveloper);\n }", "public Point2D_2_9(int x, int y) {\n\t this.x = x;\n\t this.y = y;\n\t }", "Coordinate getMinY();", "private int[] adjustNodes(int Location, int level, int x, int y) {\n level = level + 2;\n int[] adjustedCoords = new int[3];\n if (Location == 1) {\n adjustedCoords[0] = x - (new Double(spatialWidth / Math.pow(2, level))).intValue();\n adjustedCoords[1] = y + (new Double(spatialHeight / Math.pow(2, level))).intValue();\n\n }\n\n if (Location == 2) {\n adjustedCoords[0] = x + (new Double(spatialWidth / Math.pow(2, level ))).intValue();\n adjustedCoords[1] = y + (new Double(spatialHeight / Math.pow(2, level ))).intValue();\n }\n\n if (Location == 3) {\n adjustedCoords[0] = x - (new Double(spatialWidth / Math.pow(2, level ))).intValue();\n adjustedCoords[1] = y - (new Double(spatialHeight / Math.pow(2, level ))).intValue();\n }\n\n\n if (Location == 4) {\n adjustedCoords[0] = x + (new Double(spatialWidth / Math.pow(2, level ))).intValue();\n adjustedCoords[1] = y - (new Double(spatialHeight / Math.pow(2, level ))).intValue();\n }\n\n\n return adjustedCoords;\n\n }", "private static int encodeMove(int p_x, int p_y, int to_x, int to_y, int a_x, int a_y) {\n\t\treturn p_x + (p_y << 4) + (to_x << 8) + (to_y << 12) + (a_x << 16) + (a_y << 20);\n\t}", "public ArrayList<Coordinate> getPossibleMoveCoordinate() {\n ChessBoard board = this.getChessBoard(); // get chess board\n ArrayList<Coordinate> coords = new ArrayList<Coordinate>(); // create return ArrayList\n int x, y;\n /*\n several cases\n 2 3\n 1 4\n\n 5 8\n 6 7\n\n */\n // case1\n x = this.x_coordinate - 2;\n y = this.y_coordinate + 1;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case2\n x = this.x_coordinate - 1;\n y = this.y_coordinate + 2;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case3\n x = this.x_coordinate + 1;\n y = this.y_coordinate + 2;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case4\n x = this.x_coordinate + 2;\n y = this.y_coordinate + 1;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case5\n x = this.x_coordinate - 2;\n y = this.y_coordinate - 1;\n if(x >= 0 && y >= 0 ){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case6\n x = this.x_coordinate - 1;\n y = this.y_coordinate - 2;\n if(x >= 0 && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case7\n x = this.x_coordinate + 1;\n y = this.y_coordinate - 2;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case1\n x = this.x_coordinate + 2;\n y = this.y_coordinate - 1;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n\n\n return coords;\n }", "void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }", "protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}", "public Position getPositionFromPixelCoords(int y, int x){\n if (disp.rotated){\n return new Position(y / 64 + 1, (x - 640) / -64);\n } else {\n return new Position((y - 576) / -64, x / 64);\n }\n }", "public void getCoordbyId(int id, Double X, Double Y) {\n CasellaGraphic casella = getCasellabyId(id);\n X = casella.getLayoutX();\n Y = casella.getLayoutY();\n }", "double distanceSq (double px, double py);", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }" ]
[ "0.62228847", "0.60773087", "0.6015845", "0.5993575", "0.5974772", "0.58977705", "0.58933645", "0.5846944", "0.58422494", "0.5808462", "0.57720697", "0.5762542", "0.5751066", "0.5749546", "0.5714873", "0.57020557", "0.5698542", "0.5672022", "0.5644497", "0.5641771", "0.5641727", "0.5623983", "0.5612352", "0.55928296", "0.55887157", "0.5584924", "0.55755454", "0.5569307", "0.55631375", "0.5547274", "0.55451524", "0.5538291", "0.55299234", "0.5521376", "0.55203706", "0.54938227", "0.5468294", "0.54644793", "0.54609317", "0.5459976", "0.54528177", "0.54528177", "0.54432493", "0.54377997", "0.54332393", "0.5430482", "0.54271585", "0.5414482", "0.5412502", "0.54060644", "0.5405172", "0.54027045", "0.5392772", "0.5390569", "0.5380802", "0.5369009", "0.536304", "0.536304", "0.5361554", "0.5360342", "0.5355429", "0.5347087", "0.5343319", "0.53393805", "0.5337863", "0.5337308", "0.5325318", "0.5323651", "0.5320255", "0.5318899", "0.5316368", "0.5309465", "0.53062564", "0.52933264", "0.52882594", "0.52818996", "0.52751344", "0.5272547", "0.52712345", "0.5264495", "0.52627665", "0.52615637", "0.52535367", "0.52516645", "0.52500373", "0.5248361", "0.5244338", "0.5238682", "0.52352154", "0.5234138", "0.523411", "0.523322", "0.52329415", "0.52289194", "0.52286965", "0.52268606", "0.5226597", "0.52209204", "0.5216647", "0.5215174", "0.5209641" ]
0.0
-1
TODO reemplazar por su implementacion
@Override public Retorno registrarTramo(Double coordXi, Double coordYi, Double coordXf, Double coordYf, int metros) { return new Retorno(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void prot() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\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\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "@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}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "protected abstract Set method_1559();", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void remplirPrestaraireData() {\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}" ]
[ "0.61262137", "0.6101449", "0.6078", "0.6067657", "0.6026832", "0.5906028", "0.590478", "0.58808863", "0.5852624", "0.5848607", "0.5816028", "0.58063036", "0.58063036", "0.579703", "0.578379", "0.5743513", "0.5740944", "0.57390296", "0.57261133", "0.5652682", "0.5646929", "0.5633921", "0.562019", "0.56171924", "0.5613897", "0.5598938", "0.5579726", "0.5565247", "0.5565247", "0.55544144", "0.55514085", "0.55074584", "0.5503209", "0.5475986", "0.5464789", "0.5464789", "0.5445994", "0.54445356", "0.5436911", "0.5436619", "0.542027", "0.54125464", "0.5393762", "0.53787774", "0.535457", "0.535457", "0.534918", "0.5341773", "0.5334498", "0.53344977", "0.5321854", "0.5321854", "0.5321854", "0.53215593", "0.53206563", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.53146344", "0.5308696", "0.5298727", "0.52956694", "0.5284156", "0.52715474", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52560204", "0.5251348", "0.5249322", "0.524905", "0.5242415", "0.5240638", "0.5240534", "0.52393556", "0.52389485", "0.5238629", "0.5238629", "0.5237242", "0.52370465", "0.5234269", "0.52300155", "0.52297395", "0.5220111", "0.52157", "0.5210905", "0.52101964", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.5202742", "0.5202041", "0.5199894" ]
0.0
-1
TODO reemplazar por su implementacion
@Override public Retorno eliminarEsquina(Double coordX, Double coordY) { return new Retorno(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void prot() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\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\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "@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}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "protected abstract Set method_1559();", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void remplirPrestaraireData() {\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}" ]
[ "0.61262137", "0.6101449", "0.6078", "0.6067657", "0.6026832", "0.5906028", "0.590478", "0.58808863", "0.5852624", "0.5848607", "0.5816028", "0.58063036", "0.58063036", "0.579703", "0.578379", "0.5743513", "0.5740944", "0.57390296", "0.57261133", "0.5652682", "0.5646929", "0.5633921", "0.562019", "0.56171924", "0.5613897", "0.5598938", "0.5579726", "0.5565247", "0.5565247", "0.55544144", "0.55514085", "0.55074584", "0.5503209", "0.5475986", "0.5464789", "0.5464789", "0.5445994", "0.54445356", "0.5436911", "0.5436619", "0.542027", "0.54125464", "0.5393762", "0.53787774", "0.535457", "0.535457", "0.534918", "0.5341773", "0.5334498", "0.53344977", "0.5321854", "0.5321854", "0.5321854", "0.53215593", "0.53206563", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.53146344", "0.5308696", "0.5298727", "0.52956694", "0.5284156", "0.52715474", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52560204", "0.5251348", "0.5249322", "0.524905", "0.5242415", "0.5240638", "0.5240534", "0.52393556", "0.52389485", "0.5238629", "0.5238629", "0.5237242", "0.52370465", "0.5234269", "0.52300155", "0.52297395", "0.5220111", "0.52157", "0.5210905", "0.52101964", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.5202742", "0.5202041", "0.5199894" ]
0.0
-1
TODO reemplazar por su implementacion
@Override public Retorno eliminarTramo(Double coordXi, Double coordYi, Double coordXf, Double coordYf) { return new Retorno(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void prot() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\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\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "@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}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "protected abstract Set method_1559();", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void remplirPrestaraireData() {\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}" ]
[ "0.61262137", "0.6101449", "0.6078", "0.6067657", "0.6026832", "0.5906028", "0.590478", "0.58808863", "0.5852624", "0.5848607", "0.5816028", "0.58063036", "0.58063036", "0.579703", "0.578379", "0.5743513", "0.5740944", "0.57390296", "0.57261133", "0.5652682", "0.5646929", "0.5633921", "0.562019", "0.56171924", "0.5613897", "0.5598938", "0.5579726", "0.5565247", "0.5565247", "0.55544144", "0.55514085", "0.55074584", "0.5503209", "0.5475986", "0.5464789", "0.5464789", "0.5445994", "0.54445356", "0.5436911", "0.5436619", "0.542027", "0.54125464", "0.5393762", "0.53787774", "0.535457", "0.535457", "0.534918", "0.5341773", "0.5334498", "0.53344977", "0.5321854", "0.5321854", "0.5321854", "0.53215593", "0.53206563", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.53146344", "0.5308696", "0.5298727", "0.52956694", "0.5284156", "0.52715474", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52560204", "0.5251348", "0.5249322", "0.524905", "0.5242415", "0.5240638", "0.5240534", "0.52393556", "0.52389485", "0.5238629", "0.5238629", "0.5237242", "0.52370465", "0.5234269", "0.52300155", "0.52297395", "0.5220111", "0.52157", "0.5210905", "0.52101964", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.5202742", "0.5202041", "0.5199894" ]
0.0
-1
TODO reemplazar por su implementacion
@Override public Retorno movilMasCercano(Double coordX, Double coordY) { return new Retorno(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void prot() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\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\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "@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}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "protected abstract Set method_1559();", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void remplirPrestaraireData() {\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}" ]
[ "0.61262137", "0.6101449", "0.6078", "0.6067657", "0.6026832", "0.5906028", "0.590478", "0.58808863", "0.5852624", "0.5848607", "0.5816028", "0.58063036", "0.58063036", "0.579703", "0.578379", "0.5743513", "0.5740944", "0.57390296", "0.57261133", "0.5652682", "0.5646929", "0.5633921", "0.562019", "0.56171924", "0.5613897", "0.5598938", "0.5579726", "0.5565247", "0.5565247", "0.55544144", "0.55514085", "0.55074584", "0.5503209", "0.5475986", "0.5464789", "0.5464789", "0.5445994", "0.54445356", "0.5436911", "0.5436619", "0.542027", "0.54125464", "0.5393762", "0.53787774", "0.535457", "0.535457", "0.534918", "0.5341773", "0.5334498", "0.53344977", "0.5321854", "0.5321854", "0.5321854", "0.53215593", "0.53206563", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.53146344", "0.5308696", "0.5298727", "0.52956694", "0.5284156", "0.52715474", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52560204", "0.5251348", "0.5249322", "0.524905", "0.5242415", "0.5240638", "0.5240534", "0.52393556", "0.52389485", "0.5238629", "0.5238629", "0.5237242", "0.52370465", "0.5234269", "0.52300155", "0.52297395", "0.5220111", "0.52157", "0.5210905", "0.52101964", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.5202742", "0.5202041", "0.5199894" ]
0.0
-1
TODO reemplazar por su implementacion
@Override public Retorno verMovilesEnRadio(Double coordX, Double coordY, int radio) { return new Retorno(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void prot() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\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\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "@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}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "protected abstract Set method_1559();", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void remplirPrestaraireData() {\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}" ]
[ "0.61262137", "0.6101449", "0.6078", "0.6067657", "0.6026832", "0.5906028", "0.590478", "0.58808863", "0.5852624", "0.5848607", "0.5816028", "0.58063036", "0.58063036", "0.579703", "0.578379", "0.5743513", "0.5740944", "0.57390296", "0.57261133", "0.5652682", "0.5646929", "0.5633921", "0.562019", "0.56171924", "0.5613897", "0.5598938", "0.5579726", "0.5565247", "0.5565247", "0.55544144", "0.55514085", "0.55074584", "0.5503209", "0.5475986", "0.5464789", "0.5464789", "0.5445994", "0.54445356", "0.5436911", "0.5436619", "0.542027", "0.54125464", "0.5393762", "0.53787774", "0.535457", "0.535457", "0.534918", "0.5341773", "0.5334498", "0.53344977", "0.5321854", "0.5321854", "0.5321854", "0.53215593", "0.53206563", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.5320592", "0.53146344", "0.5308696", "0.5298727", "0.52956694", "0.5284156", "0.52715474", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52591133", "0.52560204", "0.5251348", "0.5249322", "0.524905", "0.5242415", "0.5240638", "0.5240534", "0.52393556", "0.52389485", "0.5238629", "0.5238629", "0.5237242", "0.52370465", "0.5234269", "0.52300155", "0.52297395", "0.5220111", "0.52157", "0.5210905", "0.52101964", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.52035886", "0.5202742", "0.5202041", "0.5199894" ]
0.0
-1
TODO filtrar mobiles en mapa por moviles disponibles(verde), deshabilitados(rojo), asignados(amarillo)
@Override public Retorno verMapa() { Retorno r = new Retorno(); this.mapa.levantarMapaEnBrowser(abb); r.resultado = Retorno.Resultado.OK; return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tHashMap<Integer, Movil> moviles = new HashMap<Integer, Movil>();\r\n\t\t\r\n\t\t/*\r\n\t\t//Utilizando \"var\" como en C#\r\n\t\tvar movilJuan = new Movil(111, 4, \"Samsung\", 4);\r\n\t\tvar movilMaria = new Movil(232, 6, \"Apple\", 4);\r\n\t\tvar movilPedro = new Movil(955, 4, \"Xiaomi\", 5);\r\n\t\t*/\r\n\t\tMovil movilJuan = new Movil(111, 4, \"Samsung\", 4);\r\n\t\tMovil movilMaria = new Movil(232, 6, \"Apple\", 4);\r\n\t\tMovil movilPedro = new Movil(955, 4, \"Xiaomi\", 5);\r\n\r\n\t\tMovil movilBusqueda = new Movil(232, 6, \"Apple\", 4);\r\n\t\t\r\n\t\t//Añadimos los elementos a la colección\r\n\t\t/*\r\n\t\tmoviles.put(111, movilJuan);\r\n\t\tmoviles.put(232, movilMaria);\r\n\t\tmoviles.put(955, movilPedro);\r\n\t\t*/\r\n\t\tmoviles.put(movilJuan.getImei(), movilJuan);\r\n\t\tmoviles.put(movilMaria.getImei(), movilMaria);\r\n\t\tmoviles.put(movilPedro.getImei(), movilPedro);\r\n\t\t\r\n\t\t\r\n\t\t//Comprobamos is un elemento se encuentra en la colección por su valor\r\n\t\t//El método containsValue() requiere redefinir el método equals() de la clase Movil para saber que campo debe comparar para determinar que dos objetos sean iguales.\r\n\t\t//En caso de no hacerlo, los objetos se comparan utilizando sus Hashcodes (direcciones de memoria).\r\n\t\tif (moviles.containsValue(movilBusqueda)) {\r\n\t\t\tSystem.out.println(\"Encontrado\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No encontrado\");\r\n\t\t}\r\n\t\t\r\n\r\n\t\t\r\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n float zoomLevel = 7.0f;\n\n // Add a markers of every destination and move the camera\n Bundle b = this.getIntent().getExtras();\n String[] records = b.getStringArray(\"Records\");\n\n double lat;\n double lon;\n\n int index = 1;\n\n for(int r = 0; r < records.length; r++){\n\n if(index == records.length - 7){\n lat = Double.parseDouble(records[records.length - 4]);\n lon = Double.parseDouble(records[records.length - 3]);\n LatLng dest = new LatLng(lat, lon);\n mMap.addMarker(new MarkerOptions().position(dest).title(records[index])).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(dest, zoomLevel));\n break;\n }\n\n lat = Double.parseDouble(records[index+3]);\n lon = Double.parseDouble(records[index+4]);\n\n LatLng dest = new LatLng(lat, lon);\n mMap.addMarker(new MarkerOptions().position(dest).title(records[index])).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(dest, zoomLevel));\n index+=8;\n }\n\n\n /*\n // Царевец\n LatLng carevec = new LatLng(43.084030f, 25.652586f);\n mMap.addMarker(new MarkerOptions().position(carevec).title(\"Царевец\")).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carevec, zoomLevel));\n\n // Чудни мостове\n LatLng chydniMostove = new LatLng(41.819929f, 24.581748f);\n mMap.addMarker(new MarkerOptions().position(chydniMostove).title(\"„Чудните Мостове“\")).showInfoWindow();\n\n // Ягодинска Пещера\n LatLng yagodinskaPeshtera = new LatLng(41.628984f, 24.329589f);\n mMap.addMarker(new MarkerOptions().position(yagodinskaPeshtera).title(\"Ягодинска Пещера\")).showInfoWindow();\n\n // Връх Снежанка\n LatLng vruhSnejanka = new LatLng(41.638506f, 24.675594f);\n mMap.addMarker(new MarkerOptions().position(vruhSnejanka).title(\"Връх Снежанка\")).showInfoWindow();\n\n // Белоградчишки скали\n LatLng belogradchiskiSkali = new LatLng(43.623361f, 22.677964f);\n mMap.addMarker(new MarkerOptions().position(belogradchiskiSkali).title(\"Белоградчишки Скали\")).showInfoWindow();\n\n // Пещера „Леденика“\n LatLng peshteraLedenika = new LatLng(43.204703f, 23.493687f);\n mMap.addMarker(new MarkerOptions().position(peshteraLedenika).title(\"Пещера „Леденика“\")).showInfoWindow();\n\n // Паметник На Христо Ботев И Неговата Чета\n LatLng pametneikHristoBotev = new LatLng(43.798045f, 23.677926f);\n mMap.addMarker(new MarkerOptions().position(pametneikHristoBotev).title(\"Паметник На Христо Ботев И Неговата Чета\")).showInfoWindow();\n\n // Национален Музей \"Параход Радецки\"\n LatLng myzeiParahodRadecki = new LatLng(43.799125f, 23.676921f);\n mMap.addMarker(new MarkerOptions().position(myzeiParahodRadecki).title(\"Национален Музей 'Параход Радецки'\")).showInfoWindow();\n\n // Археологически Резерват „Калиакра”\n LatLng rezervatKaliakra = new LatLng(43.361190f, 28.465788f);\n mMap.addMarker(new MarkerOptions().position(rezervatKaliakra).title(\"Археологически Резерват „Калиакра”\")).showInfoWindow();\n\n // Перперикон\n LatLng perperikon = new LatLng(41.718126f, 25.468954f);\n mMap.addMarker(new MarkerOptions().position(perperikon).title(\"Перперикон\")).showInfoWindow();\n\n // Вр. Мусала (2925 М.) - Рила\n LatLng vruhMysala = new LatLng(42.180021f, 23.585167f);\n mMap.addMarker(new MarkerOptions().position(vruhMysala).title(\"Вр. Мусала (2925 М.) - Рила\")).showInfoWindow();\n\n // Връх Шипка – Национален Парк-Музей „Шипка“ - Паметник На Свободата\n LatLng vruhShipka = new LatLng(42.748281f, 25.321387f);\n mMap.addMarker(new MarkerOptions().position(vruhShipka).title(\"Връх Шипка – Национален Парк-Музей „Шипка“ - Паметник На Свободата\")).showInfoWindow();\n\n // Пещера – Пещера „Снежанка“ (Дължина: 145 М)\n LatLng peshteraSnejanka = new LatLng(42.004459f, 24.278645f);\n mMap.addMarker(new MarkerOptions().position(peshteraSnejanka).title(\"Пещера – Пещера „Снежанка“ (Дължина: 145 М)\")).showInfoWindow();\n\n // Античен Театър\n LatLng antichenTeatur = new LatLng(42.147109f, 24.751005f);\n mMap.addMarker(new MarkerOptions().position(antichenTeatur).title(\"Античен Театър\")).showInfoWindow();\n\n // Асенова Крепост\n LatLng asenovaKrepost = new LatLng(41.987020f, 24.873552f);\n mMap.addMarker(new MarkerOptions().position(asenovaKrepost).title(\"Асенова Крепост\")).showInfoWindow();\n\n // Бачковски Манастир\n LatLng bachkovskiManastir = new LatLng(41.942380f, 24.849340f);\n mMap.addMarker(new MarkerOptions().position(bachkovskiManastir).title(\"Бачковски Манастир\")).showInfoWindow();\n\n // Резерват „Сребърна“\n LatLng rezervatSreburna = new LatLng(44.115654f, 27.071807f);\n mMap.addMarker(new MarkerOptions().position(rezervatSreburna).title(\"Резерват „Сребърна“\")).showInfoWindow();\n\n // Мадарски Конник\n LatLng madarskiKonnik = new LatLng(43.277708f, 27.118949f);\n mMap.addMarker(new MarkerOptions().position(madarskiKonnik).title(\"Мадарски Конник\")).showInfoWindow();\n\n // Седемте Рилски езера\n LatLng sedemteRilskiEzera = new LatLng(42.203413f, 23.319871f);\n mMap.addMarker(new MarkerOptions().position(sedemteRilskiEzera).title(\"Седемте Рилски езера\")).showInfoWindow();\n\n //Храм-Паметник „Александър Невски“\n LatLng aleksandurNevski = new LatLng(42.696000f, 23.332879f);\n mMap.addMarker(new MarkerOptions().position(aleksandurNevski).title(\"Храм-Паметник „Александър Невски“\")).showInfoWindow();\n */\n\n }", "public void elementosMapa() {\n\t\t\n\t\tHeroes heroe = (Heroes) ven.getHeroe();\n\t\t\n\t\tif(heroe.getPosX() >= 250 && heroe.getPosX() <= 302 && heroe.getPosY() >= 208 && heroe.getPosY() <= 255 && pregunta1 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Cuántas transformaciones sufre Freezer?\" + \"\\n\" + \"a) 4\" + \"\\n\" + \"b) 5\" + \"\\n\" + \"c) 2\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tpregunta1 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(2);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(281); \n\t\t\t\theroe.setPosY(311);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1148 && heroe.getPosX() <= 1202 && heroe.getPosY() >= 33 && heroe.getPosY() <= 84 && pregunta2 == false) {\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién logró liberar la espada Z?\" + \"\\n\" + \"a) Goten\" + \"\\n\" + \"b) Goku\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta2 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera\");\n\t\t\t\tven.modificarEsfera(4);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(1280);\n\t\t\t\theroe.setPosY(119);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 50 && heroe.getPosX() <= 103 && heroe.getPosY() >= 558 && heroe.getPosY() <= 607 && pregunta3 == false) {\n\t\t\t\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién es hijo de Paragus?\" + \"\\n\" + \"a) Bardock\" + \"\\n\" + \"b) Broly\" + \"\\n\" + \"c) Freezer\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tpregunta3 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(6);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(135);\n\t\t\t\theroe.setPosY(593);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\telse if(heroe.getPosX() >= 70 && heroe.getPosX() <= 130 && heroe.getPosY() >= 1 && heroe.getPosY() <= 55 && pregunta4 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién se convirtío primero en SSJ2?\" + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Trunks\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta4 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"c\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(208); \n\t\t\t\theroe.setPosY(47);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\n\t\telse if(heroe.getPosX() >= 585 && heroe.getPosX() <= 640 && heroe.getPosY() >= 258 && heroe.getPosY() <= 310 && pregunta5 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién mantuvo su cola hasta la muerte?\" + \"\\n\" + \"a) Vegeta\" + \"\\n\" + \"b) Bardock\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tpregunta5 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(577); \n\t\t\t\theroe.setPosY(356);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 396 && heroe.getPosX() <= 444 && heroe.getPosY() >= 230 && heroe.getPosY()<= 300 && Broly == false) {\n\t\t\t\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Broly\");\n\t\t\tvillanoActual = \"Broly\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Broly: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla3.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1235 && heroe.getPosX() <= 1295 && heroe.getPosY() >= 290 && heroe.getPosY() <= 360 && Freezer == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Freezer\");\n\t\t\tvillanoActual = \"Freezer\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Freezer: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla2.png\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1015 && heroe.getPosX() <= 1067 && heroe.getPosY() >= 7 && heroe.getPosY() <= 57 && MajinB == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Majin boo\");\n\t\t\tvillanoActual = \"Majin boo\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Majin boo: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla4.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else if(heroe.getPosX() >= 222 && heroe.getPosX() <= 294 && heroe.getPosY() >= 480 && heroe.getPosY() <= 560 && Cell == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Cell\");\n\t\t\tvillanoActual = \"Cell\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Cell: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}else if(heroe.getPosX() >= 900 && heroe.getPosX() <= 988 && heroe.getPosY() >= 314 && heroe.getPosY() <= 421) {\n\t\t\t\n\t\t\theroe.setPosX(956);\n\t\t\theroe.setPosY(484);\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Qué deseas hacer \" + ven.getNombreUsuario() + \"?\" + \"\\n\" + \"a) Guardar puntaje\" + \"\\n\" + \"b) Ver información de los personajes\" + \"\\n\" + \"c) Ver puntajes\");\n\t\t\tif(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tven.guardarPuntaje();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(respuesta.equalsIgnoreCase(\"c\")){\n\t\t\t\tven.cargarPuntajes();\n\t\t\t\tven.visualizarPuntajes();\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tString per = JOptionPane.showInputDialog(this, \"¿De qué personaje deseas ver la información \" + ven.getNombreUsuario() + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Roshi\" + \"\\n\" + \"c) Vegeta\" + \"\\n\" + \"d) Freezer\" + \"\\n\" + \"e) Cell\" + \"\\n\" + \"f) Majin boo\" + \"\\n\" + \"g) Broly\");\n\t\t\t\t\n\t\t\t\tif(per.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Goku\");\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Roshi\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Vegeta\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"d\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Freezer\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"e\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Cell\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"f\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Majin boo\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"g\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Broly\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\ttry {\n\t\t\t\t\tthrow new CaracterEquivocadoException();\n\t\t\t\t} catch (CaracterEquivocadoException 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\t\t\n\t\t}\n\t\t\n\t}", "String getMobile(String name);", "List<Person> getAllPersonsWithMobile();", "public void colocarMarcadores(){\n\n if(seeOnMap != 0){\n\n for (int n=0; n<c.getCount(); n++) {\n c.moveToPosition(n);\n Double lat = c.getDouble(c.getColumnIndex(\"lat\"));\n Double lng = c.getDouble(c.getColumnIndex(\"lon\"));\n String name = c.getString(c.getColumnIndex(\"title\"));\n\n map.addMarker(new MarkerOptions().position(new LatLng(lat, lng))\n .title(name));\n }\n }\n }", "public Map<Integer, DefMazmorra>getMapaMazmoras()\n {\n if(null==this.mapaMazmoras)\n this.mapaMazmoras=CargadorRecursos.cargaMapaMazmorras();\n \n \n //Comprobacion:\n for(Map.Entry<Integer, DefMazmorra>maz: mapaMazmoras.entrySet())\n Gdx.app.log(\"DEF_MAZMORRA:\", \"\"+maz.getKey()+\":\"+maz.getValue());\n \n \n return this.mapaMazmoras;\n }", "private Texture mapaAleatorio(int noAleatorio) {\n if (estadoMapa == EstadoMapa.RURAL){\n if(noAleatorio == 1){\n return texturaFondo1_1;\n }\n if(noAleatorio == 2){\n return texturaFondo1_2;\n }\n if(noAleatorio == 3){\n return texturaFondo1_3;\n }\n if(noAleatorio == 4){\n return texturaFondo1_4;\n }\n if(noAleatorio == 5){\n return texturaFondo1_5;\n }\n } else\n if (estadoMapa == EstadoMapa.URBANO) {\n if(noAleatorio == 1){\n return texturaFondo2_1;\n }\n if(noAleatorio == 2){\n return texturaFondo2_2;\n }\n if(noAleatorio == 3){\n return texturaFondo2_3;\n }\n if(noAleatorio == 4){\n return texturaFondo2_4;\n }\n if(noAleatorio == 5){\n return texturaFondo2_5;\n }\n } else if (estadoMapa == EstadoMapa.UNIVERSIDAD) {\n if(noAleatorio == 1){\n return texturaFondo3_1;\n }\n if(noAleatorio == 2){\n return texturaFondo3_2;\n }\n if(noAleatorio == 3){\n return texturaFondo3_3;\n }\n if(noAleatorio == 4){\n return texturaFondo3_4;\n }\n if(noAleatorio == 5){\n return texturaFondo3_5;\n }\n }else if (estadoMapa == EstadoMapa.SALONES) {\n if (noAleatorio == 1) {\n return texturaFondo4_1;\n }\n if (noAleatorio == 2) {\n return texturaFondo4_2;\n }\n if (noAleatorio == 3) {\n return texturaFondo4_3;\n }\n if (noAleatorio == 4) {\n return texturaFondo4_4;\n }\n if (noAleatorio == 5) {\n return texturaFondo4_5;\n }\n } else if (estadoMapa == EstadoMapa.RURALURBANO) { //Trancisiones\n return texturaRuralUrbano;\n } else if (estadoMapa == EstadoMapa.URBANOUNIVERSIDAD) {\n return texturaUrbanoUniversidad;\n } else if (estadoMapa == EstadoMapa.UNIVERSIDADSALONES) {\n return texturaUniversidadSalones;\n }\n return null;\n }", "public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}", "private void getData(){\n mapFStreets = new ArrayList<>();\n mapFAreas = new ArrayList<>();\n mapIcons = new ArrayList<>();\n coastLines = new ArrayList<>();\n //Get a rectangle of the part of the map shown on screen\n bounds.updateBounds(getVisibleRect());\n Rectangle2D windowBounds = bounds.getBounds();\n sorted = zoomLevel >= 5;\n\n coastLines = (Collection<MapFeature>) (Collection<?>) model.getVisibleCoastLines(windowBounds);\n\n Collection < MapData > bigRoads = model.getVisibleBigRoads(windowBounds, sorted);\n mapFStreets = (Collection<MapFeature>)(Collection<?>) bigRoads;\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n else if (zoomLevel > 4)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n else if (zoomLevel > 7)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n else if(zoomLevel > 7)\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n else if(zoomLevel > 7) {\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n }\n\n if (drawAttributeManager.isTransport() && zoomLevel > 14)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n else if(zoomLevel > 10)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n\n if(zoomLevel > 14)\n mapIcons = (Collection<MapIcon>) (Collection<?>) model.getVisibleIcons(windowBounds);\n\n if (!drawAttributeManager.isTransport())\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n else {\n if (zoomLevel > 3)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n }\n mapFAreas.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleBikLakes(windowBounds, sorted));\n\n }", "@Override\n\tpublic void run() {\n\t\tfinal MapOptions options = MapOptions.create(); //Dhmiourgeia antikeimenou me Factory (xwris constructor)\n\t\t//Default na fenetai xarths apo doruforo (Hybrid)\n\t\toptions.setMapTypeId(MapTypeId.HYBRID);\n\t\toptions.setZoom(Map.GOOGLE_MAPS_ZOOM);\n\t\t//Dhmiourgei ton xarth me tis panw ruthmiseis kai to vazei sto mapDiv\n\t\tgoogleMap = GoogleMap.create(map, options);\n\t\t//Otan o xrhsths kanei click epanw ston xarth\n\t\tfinal MarkerOptions markerOptions = MarkerOptions.create();\n\t\tmarkerOptions.setMap(googleMap);\n\t\tmarker = Marker.create(markerOptions);\n\t\t//psaxnei antikeimeno gia na kentrarei o xarths kai na fortwsei h forma\n\t\tfinal String id = Window.Location.getParameter(\"id\");\n\t\tif (id == null) {\n\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorRetrievingMedium(\n\t\t\t\t\tMOBILE_MEDIA_SHARE_CONSTANTS.noMediaIdSpecified()));\n\t\t\t//redirect sto map\n\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t} else {\n\t\t\t//Klhsh tou MEDIA_SERVICE gia na paroume to antikeimeno (metadedomena)\n\t\t\tMEDIA_SERVICE.getMedia(id, new AsyncCallback<Media>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(final Throwable throwable) {\n\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorRetrievingMedium(throwable.getMessage()));\n\t\t\t\t\t//redirect sto map\n\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(final Media media) {\n\t\t\t\t\tif (media == null) {\n\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(\n\t\t\t\t\t\t\t\tMOBILE_MEDIA_SHARE_CONSTANTS.mediaNotFound()));\n\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t\t//o xrhsths vlepei to media giati einai diko tou 'h einai diaxeirisths 'h to media einai public\n\t\t\t\t\t} else if (currentUser.equals(media.getUser()) || (currentUser.getStatus() == UserStatus.ADMIN) || media.isPublic()) {\n\t\t\t\t\t\t//Gemisma tou div content analoga ton tupo\n\t\t\t\t\t\tswitch (MediaType.getMediaType(media.getType())) {\n\t\t\t\t\t\tcase APPLICATION:\n\t\t\t\t\t\t\tfinal ImageElement application = Document.get().createImageElement();\n\t\t\t\t\t\t\tapplication.setSrc(MOBILE_MEDIA_SHARE_URLS.selectedImage(GWT.getHostPageBaseURL(), MediaType.APPLICATION.name().toLowerCase()));\n\t\t\t\t\t\t\tapplication.setAlt(media.getTitle());\n\t\t\t\t\t\t\tapplication.getStyle().setWidth(CONTENT_WIDTH, Style.Unit.PX);\n\t\t\t\t\t\t\tapplication.getStyle().setHeight(CONTENT_HEIGHT, Style.Unit.PX);\n\t\t\t\t\t\t\tcontent.appendChild(application);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase AUDIO:\n\t\t\t\t\t\t\tfinal AudioElement audio = Document.get().createAudioElement();\n\t\t\t\t\t\t\taudio.setControls(true);\n\t\t\t\t\t\t\taudio.setPreload(AudioElement.PRELOAD_AUTO);\n\t\t\t\t\t\t\t//url sto opoio vriskontai ta dedomena tou antikeimenou. Ta travaei o browser\n\t\t\t\t\t\t\t//me xrhsh tou media servlet\n\t\t\t\t\t\t\tfinal SourceElement audioSource = Document.get().createSourceElement();\n\t\t\t\t\t\t\taudioSource.setSrc(MOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\taudioSource.setType(media.getType());\n\t\t\t\t\t\t\taudio.appendChild(audioSource);\n\t\t\t\t\t\t\tcontent.appendChild(audio);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase IMAGE:\n\t\t\t\t\t\t\tfinal ImageElement image = Document.get().createImageElement();\n\t\t\t\t\t\t\timage.setSrc(MOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\timage.setAlt(media.getTitle());\n\t\t\t\t\t\t\timage.getStyle().setWidth(CONTENT_WIDTH, Style.Unit.PX);\n\t\t\t\t\t\t\timage.getStyle().setHeight(CONTENT_HEIGHT, Style.Unit.PX);\n\t\t\t\t\t\t\tcontent.appendChild(image);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase TEXT:\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @see http://www.gwtproject.org/doc/latest/tutorial/JSON.html#http\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfinal ParagraphElement text = Document.get().createPElement();\n\t\t\t\t\t\t\ttext.getStyle().setWidth(CONTENT_WIDTH, Style.Unit.PX);\n\t\t\t\t\t\t\ttext.getStyle().setHeight(CONTENT_HEIGHT, Style.Unit.PX);\n\t\t\t\t\t\t\t//scrollbar gia to text\n\t\t\t\t\t\t\ttext.getStyle().setOverflow(Style.Overflow.SCROLL);\n\t\t\t\t\t\t\tcontent.appendChild(text);\n\t\t\t\t\t\t\t//Zhtaei asugxrona to periexomeno enos url\n\t\t\t\t\t\t\tfinal RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET,\n\t\t\t\t\t\t\t\t\tMOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trequestBuilder.sendRequest(null, new RequestCallback() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onError(final Request request, final Throwable throwable) {\n\t\t\t\t\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(throwable.getMessage()));\n\t\t\t\t\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\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\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onResponseReceived(final Request request, final Response response) {\n\t\t\t\t\t\t\t\t\t\tif (response.getStatusCode() == Response.SC_OK) {\n\t\t\t\t\t\t\t\t\t\t\t//selida pou fernei to response se me to keimeno pros anazhthsh\n\t\t\t\t\t\t\t\t\t\t\ttext.setInnerText(response.getText());\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t//selida pou efere to response se periptwsh sfalmatos (getText())\n\t\t\t\t\t\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(response.getText()));\n\t\t\t\t\t\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\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});\n\t\t\t\t\t\t\t} catch (final RequestException e) {\n\t\t\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(e.getMessage()));\n\t\t\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase VIDEO:\n\t\t\t\t\t\t\tfinal VideoElement video = Document.get().createVideoElement();\n\t\t\t\t\t\t\tvideo.setPoster(MOBILE_MEDIA_SHARE_URLS.selectedImage(GWT.getHostPageBaseURL(), MediaType.VIDEO.name().toLowerCase()));\n\t\t\t\t\t\t\tvideo.setControls(true);\n\t\t\t\t\t\t\tvideo.setPreload(VideoElement.PRELOAD_AUTO);\n\t\t\t\t\t\t\tvideo.setWidth(Double.valueOf(CONTENT_WIDTH).intValue());\n\t\t\t\t\t\t\tvideo.setHeight(Double.valueOf(CONTENT_HEIGHT).intValue());\n\t\t\t\t\t\t\tfinal SourceElement videoSource = Document.get().createSourceElement();\n\t\t\t\t\t\t\tvideoSource.setSrc(MOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\tvideoSource.setType(media.getType());\n\t\t\t\t\t\t\tvideo.appendChild(videoSource);\n\t\t\t\t\t\t\tcontent.appendChild(video);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//O current user peirazei to media an einai diko tou 'h an einai diaxeirisths\n\t\t\t\t\t\tif (currentUser.equals(media.getUser()) || (currentUser.getStatus() == UserStatus.ADMIN)) {\n\t\t\t\t\t\t\tedit.setEnabled(true);\n\t\t\t\t\t\t\tdelete.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttitle.setText(media.getTitle());\n\t\t\t\t\t\t//prosthikh html (keimeno kai eikona) stin selida\n\t\t\t\t\t\ttype.setHTML(List.TYPE.getValue(media));\n\t\t\t\t\t\t//analoga ton tupo dialegetai to katallhlo eikonidio\n\t\t\t\t\t\tmarker.setIcon(MarkerImage.create(MOBILE_MEDIA_SHARE_URLS.selectedImage(GWT.getHostPageBaseURL(), \n\t\t\t\t\t\t\t\tMediaType.getMediaType(media.getType()).name().toLowerCase())));\n\t\t\t\t\t\tsize.setText(List.SIZE.getValue(media));\n\t\t\t\t\t\tduration.setText(List.DURATION.getValue(media));\n\t\t\t\t\t\tuser.setText(List.USER.getValue(media));\n\t\t\t\t\t\tcreated.setText(List.CREATED.getValue(media));\n\t\t\t\t\t\tedited.setText(List.EDITED.getValue(media));\n\t\t\t\t\t\tpublik.setHTML(List.PUBLIC.getValue(media));\n\t\t\t\t\t\tlatitudeLongitude.setText(\"(\" + List.LATITUDE.getValue(media) + \", \" + List.LONGITUDE.getValue(media) + \")\");\n\t\t\t\t\t\tfinal LatLng latLng = LatLng.create(media.getLatitude().doubleValue(), media.getLongitude().doubleValue());\n\t\t\t\t\t\tgoogleMap.setCenter(latLng);\n\t\t\t\t\t\tmarker.setPosition(latLng);\n\t\t\t\t\t} else { //Vrethike to media alla einai private allounou\n\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(\n\t\t\t\t\t\t\t\tMOBILE_MEDIA_SHARE_CONSTANTS.accessDenied()));\n\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), \n\t\t\t\t\t\t\t\tURL.encodeQueryString(LocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public static Vector<MobileObject> parseMobileObjectList( File inFile, MobilityMap map ) throws FileNotFoundException\r\n {\r\n /* SET UP INPUT AND PARSING STUFF */\r\n Parser parser = new Parser( inFile );\r\n boolean skipped;\r\n int linesSkipped;\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n \r\n \r\n /* PREAMBLE */\r\n parser.skipWhitespace();\r\n int numEntries = parser.parseInt();\r\n \r\n // Set up storage for inputted MobileObjects\r\n Vector<MobileObject> mObjects = new Vector<MobileObject>();\r\n \r\n // Skip between preamble and list\r\n linesSkipped = parser.skipWhitelines();\r\n if( linesSkipped < 2 )\r\n throw new MobileObjectsParseException( \"[Line \" + parser.getLineNumber() + \"] Did not find a blank line between preamble and list of mobile objects\" );\r\n \r\n \r\n /* LIST OF MOBILE OBJECTS */\r\n for( int i=0; i < numEntries; i++ )\r\n {\r\n int nodeIndex;\r\n int numMobileObjects;\r\n boolean useDefaultSpeed;\r\n double speed = 0;\r\n\r\n /* PARSE THE VALUES FOR AN ENTRY */\r\n // Get node index\r\n parser.skipWhitespace();\r\n \r\n nodeIndex = parser.parseInt();\r\n\r\n if( nodeIndex > numNodes )\r\n throw new MobileObjectsParseException( \"[Line \" + parser.getLineNumber() + \"] Node index \" + nodeIndex + \" is out of range (expected range is 1 <= index <= \" + numNodes + \")\" );\r\n \r\n if( nodeIndex < 1 )\r\n throw new MobileObjectsParseException( \"[Line \" + parser.getLineNumber() + \"] Node index \" + nodeIndex + \" is out of range (expected range is 1 <= index <= \" + numNodes + \")\" );\r\n \r\n \r\n // Skip delimiter \r\n parser.skipWhitespace();\r\n skipped = parser.skipCharacter( ':' );\r\n if( !skipped )\r\n throw new MobileObjectsParseException( \"[Line \" + parser.getLineNumber() + \"] Did not find ':' after node index\" );\r\n \r\n \r\n // Get number of mobile objects to be added\r\n parser.skipWhitespace();\r\n numMobileObjects = parser.parseInt();\r\n \r\n \r\n // Get speed for these mobile objects (or default if not given)\r\n parser.skipWhitespace();\r\n skipped = parser.skipCharacter( ';' );\r\n \r\n if( !skipped ) // (no delimiter, thus use default speed)\r\n useDefaultSpeed = true;\r\n else // (delimiter found, thus use specified speed)\r\n {\r\n useDefaultSpeed = false;\r\n \r\n parser.skipWhitespace();\r\n speed = parser.parseDouble();\r\n parser.skipWhitespace();\r\n }\r\n \r\n \r\n \r\n \r\n /* TRANSLATE THE VALUES TO MOBILE OBJECTS */\r\n // Recall that to the user, nodes index from 1, but internally nodes\r\n // index from 0\r\n MapNode startNode = map.getNodeAt( nodeIndex-1 );\r\n \r\n for( int j=0; j < numMobileObjects; j++ )\r\n {\r\n if( useDefaultSpeed )\r\n {\r\n MobileObject mo = new MobileObject( startNode );\r\n mObjects.add( mo );\r\n }\r\n else\r\n {\r\n MobileObject mo = new MobileObject( startNode );\r\n mo.setMovementSpeed( speed );\r\n mObjects.add( mo );\r\n }\r\n }\r\n \r\n \r\n // Skip whitelines BETWEEN entries (not after)\r\n if( i < (numEntries-1) )\r\n {\r\n linesSkipped = parser.skipWhitelines();\r\n \r\n if( linesSkipped < 1 )\r\n throw new MobileObjectsParseException( \"[Line \" + parser.getLineNumber() + \"] Line did not end after a mobile object entry\" );\r\n else if( linesSkipped > 1 )\r\n throw new MobileObjectsParseException( \"[Line \" + parser.getLineNumber() + \"] List of mobile objects ended unexpectedly\" );\r\n }\r\n }\r\n \r\n \r\n /* CHECK END OF FILE */\r\n parser.skipWhitelines(); // Allow blank lines at end of file\r\n parser.skipWhitespace(); // Allow whitespace on the last line\r\n if( !parser.isEOF() )\r\n throw new MobileObjectsParseException( \"Input did not end after list processing complete\" );\r\n \r\n \r\n // Finally, return the objects\r\n return mObjects;\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n\n map.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n map.getUiSettings().setZoomControlsEnabled(true);\n map.setBuildingsEnabled(true);\n\n map.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n\n i.putExtra(\"nom_usuario\",marker.getTitle().toString());\n i.putExtra(\"origen2\",0);\n startActivity(i);\n }\n });\n\n\n\n for (int i =0; i<latitude.size(); i++){\n\n for (int j =0; j<longitude.size(); j++){\n\n for (int k =0; k<emails.size(); k++){\n\n for (int l =0;l<nombres.size(); l++){\n\n lat = latitude.get(i);\n lon = longitude.get(i);\n email=emails.get(i);\n // controller.obtener_imagen_todos(bit,email);\n nombre=nombres.get(i);\n // bm=bit.get(i);\n // escala =controller.obtener_imagen_con_email(email).createScaledBitmap(controller.obtener_imagen_con_email(email), 75, 75, true);\n\n marca= map.addMarker(new MarkerOptions()\n .position(new LatLng(lat, lon))\n //.icon(BitmapDescriptorFactory.fromBitmap(escala))\n .title(email)\n .snippet(nombre));\n map.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n //showStreetView(new LatLng(controller.obtener_latitud_con_email(marca.getTitle().toString()),controller.obtener_longitud_con_email(marca.getTitle().toString())));\n }\n });\n\n\n map.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n @Override\n public View getInfoWindow(Marker marker) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n\n View v = getLayoutInflater().inflate(R.layout.map_info, null);\n TextView tv =(TextView)v.findViewById(R.id.map_nombre);\n tv.setText(\"Nombre: \"+ marker.getSnippet());\n TextView tv2=(TextView)v.findViewById(R.id.map_email);\n tv2.setText(\"Email: \"+marker.getTitle());\n CircleImageView civ=(CircleImageView)v.findViewById(R.id.imagen_map);\n civ.setImageBitmap(controller.obtener_imagen_con_email(marker.getTitle()));\n\n return v;\n }\n });\n\n\n }\n }\n\n }\n }\n\n map.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n //if (marker.getTitle().equals(marca.getTitle().toString())){\n\n lat2=controller.obtener_latitud_con_email(marker.getTitle().toString());\n lon2=controller.obtener_longitud_con_email(marker.getTitle().toString());\n showStreetView(new LatLng(lat2,lon2));\n //Toast.makeText(MapsActivity.this, \"latn: \"+lat2, Toast.LENGTH_SHORT).show();\n // panoram.setPosition(new LatLng(lat2,lon2));\n //onStreetViewPanoramaReady(panoram);\n //}\n\n return false;\n }\n });\n\n }", "public void checkCameraLimits()\n {\n //Daca camera ar vrea sa mearga prea in stanga sau prea in dreapta (Analog si pe verticala) ea e oprita (practic cand se intampla acest lucru Itemul asupra caruia se incearca centrarea nu mai e in centrul camerei )\n\n if(xOffset < 0 )\n xOffset = 0;\n else if( xOffset > refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth())\n xOffset =refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth();\n if(yOffset<0)\n yOffset = 0;\n if(yOffset > refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight())\n {\n yOffset = refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight();\n }\n }", "private void getPinchazos(){\n mPinchazos = estudioAdapter.getListaPinchazosSinEnviar();\n //ca.close();\n }", "public void doScan() {\n\t\tSystemMapObject[] results = scan();\r\n\t\t// add to its current map.\r\n\t\t// System.out.println(toStringInternalMap());\r\n\t\tupdateMowerCords();\r\n\t\t// NorthWest\r\n\t\tif (y + 1 >= this.map.size()) {\r\n\t\t\tthis.map.add(new ArrayList<SystemMapObject>());\r\n\t\t\tthis.map.get(y + 1).add(0, results[7]);\r\n\t\t} else if (x - 1 <= 0) {\r\n\t\t\tthis.map.get(y + 1).add(x, results[7]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y + 1).set(x - 1, results[7]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// West\r\n\t\tif (this.map.get(y).size() < 2) {\r\n\t\t\tthis.map.get(y).add(0, results[6]);\r\n\t\t} else if (x - 1 < 0) {\r\n\t\t\tthis.map.get(y).add(0, results[6]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y).set(x - 1, results[6]);\r\n\t\t}\r\n\t\t// SouthWest\r\n\t\tupdateMowerCords();\r\n\t\tif (y - 1 < 0) {\r\n\t\t\tthis.map.add(0, new ArrayList<SystemMapObject>());\r\n\t\t\tthis.map.get(0).add(0, results[5]);\r\n\t\t} else if (this.map.get(y - 1).size() < 2) {\r\n\t\t\tthis.map.get(y - 1).add(0, results[5]);\r\n\t\t} else if (this.map.get(y - 1).size() <= x - 1) {\r\n\t\t\tthis.map.get(y - 1).add(results[5]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y - 1).set(x - 1, results[5]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// North\r\n\t\tif (y + 1 < this.map.size() && x >= this.map.get(y + 1).size()) {\r\n\t\t\tif (x >= this.map.get(y + 1).size()) {\r\n\t\t\t\tthis.map.get(y+1).add(results[0]);\r\n\t\t\t} else {\r\n\t\t\t\tthis.map.get(y + 1).add(x, results[0]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.map.get(y + 1).set(x, results[0]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// NorthEast\r\n\t\tif (this.map.get(y + 1).size() <= x + 1) {\r\n\t\t\tthis.map.get(y + 1).add(results[1]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y + 1).set(x + 1, results[1]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// East\r\n\t\tif (this.map.get(y).size() <= x + 1) {\r\n\t\t\tthis.map.get(y).add(results[2]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y).set(x + 1, results[2]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\r\n\t\t// South\r\n\t\tif (y - 1 < 0) {\r\n\t\t\tthis.map.add(0, new ArrayList<SystemMapObject>());\r\n\t\t\tthis.map.get(0).add(results[4]);\r\n\t\t} else if (x >= this.map.get(y - 1).size()) {\r\n\t\t\tthis.map.get(y - 1).add(results[4]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y - 1).set(x, results[4]);\r\n\t\t}\r\n\t\tupdateMowerCords();\r\n\t\t// South East\r\n\t\tif (this.map.get(y - 1).size() <= x + 1) {\r\n\t\t\tthis.map.get(y - 1).add(results[3]);\r\n\t\t} else {\r\n\t\t\tthis.map.get(y - 1).set(x + 1, results[3]);\r\n\t\t}\r\n\r\n\t\tupdateMowerCords();\r\n\t\t// System.out.println(\"This is your X:\" + this.x);\r\n\t\t// System.out.println(\"This is your Y:\" + this.y);\r\n\t\t//\r\n\t\t// System.out.println(toStringInternalMap());\r\n\t\t// System.out.println(\"-------------------------------------------------------------------------------------\");\r\n\r\n\t}", "public void drawMobile (IMobile mobile, Graphics graphics, ImageObserver observer){\n final BufferedImage imageMobile = new BufferedImage(mobile.getWidth(), mobile.getHeight(), Transparency.TRANSLUCENT);\n final Graphics graphicsMobile = imageMobile.getGraphics();\n\n graphicsMobile.drawImage(mobile.getImage(), 0, 0, mobile.getWidth(), mobile.getHeight(), observer);\n graphics.drawImage(imageMobile, mobile.getPositionX() * zoom, mobile.getPositionY() * zoom, observer);\n }", "public void mo8814a(final String str) {\n C3720a.this._cameraUtil.mo6032a((Runnable) new Runnable() {\n public void run() {\n if (C3720a.this.f12125b == null) {\n return;\n }\n if (str.equalsIgnoreCase(\"ia\")) {\n C3720a.this.f12125b.f12208ae.mo3216a(Boolean.valueOf(true));\n C3720a.this.f12125b.f12209af.mo3216a(Integer.valueOf(R.drawable.recmode_ia_icon));\n } else if (str.equalsIgnoreCase(\"manual\")) {\n C3720a.this.f12125b.f12208ae.mo3216a(Boolean.valueOf(true));\n C3720a.this.f12125b.f12209af.mo3216a(Integer.valueOf(R.drawable.recmode_manual_icon));\n } else if (str.equalsIgnoreCase(\"4kphoto\")) {\n C3720a.this.f12125b.f12208ae.mo3216a(Boolean.valueOf(true));\n C3720a.this.f12125b.f12209af.mo3216a(Integer.valueOf(R.drawable.recmode_4kphoto_icon));\n } else if (str.equalsIgnoreCase(\"slowzoom\")) {\n C3720a.this.f12125b.f12208ae.mo3216a(Boolean.valueOf(true));\n C3720a.this.f12125b.f12209af.mo3216a(Integer.valueOf(R.drawable.recmode_slow_zoom_icon));\n } else {\n C3720a.this.f12125b.f12208ae.mo3216a(Boolean.valueOf(false));\n C3720a.this.f12125b.f12209af.mo3216a(Integer.valueOf(0));\n }\n }\n });\n }", "private void cruzarGenesMonopunto(Cromosoma padre, Cromosoma madre) {\n\t\t//obtenemos el punto de cruce\n\t\tint longCromosoma = this.poblacion[0].getLongitudCrom();\n\t\tint puntoCruce = (int) (Math.random() * longCromosoma) + 1;\n\t\t\n\t\tboolean[] infoPadre = padre.getCromosoma();\n\t\tboolean[] infoMadre = madre.getCromosoma();\n\t\tboolean aux;\n\t\tfor(int i = puntoCruce; i < longCromosoma; i++) {\n\t\t\t\n\t\t\taux = infoPadre[i];\n\t\t\tinfoPadre[i] = infoMadre[i];\n\t\t\tinfoMadre[i] = aux;\n\t\t\t\n\t\t}\n\t\tpadre.setCromosoma(infoPadre);\n\t\tmadre.setCromosoma(infoMadre);\n\t\t\n\t}", "public boolean buscarMedico2(int dpi){\r\n Guardia med = new Guardia();\r\n boolean esta = false;\r\n\t\tfor (int i = 0;i<medicosenfermeras.size();i++) {\r\n med = medicosenfermeras.get(i);\r\n if((dpi == med.getDpi())&&(med instanceof Medico)){\r\n\t\t\testa = true;\r\n return esta;\r\n \t }\r\n\t\t}\r\n return esta;\r\n\t}", "private void buscar(final String filtro) {\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n if (code.equalsIgnoreCase(filtro) || nombre.equalsIgnoreCase(filtro) || tipo.equalsIgnoreCase(filtro) || raza.equalsIgnoreCase(filtro)) {\n animalesFirebase.add(animal);\n }\n }\n if (animalesFirebase.size() == 0) {\n animalesFirebase.add(\"No se encuentran animales con ese código\");\n }\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public void leituraMapa() throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(caminho+\"/caminho.txt\"));\n String linha = br.readLine();\n String array[] = new String[3];\n while (linha != null){\n array = linha.split(\",\");\n dm.addElement(array[1]);\n nomeJanela[contador] = array[0];\n contador++;\n linha = br.readLine();\n }\n br.close();\n }", "private void actualizaEstadoMapa() {\n if(cambiosFondo >= 0 && cambiosFondo < 10){\n estadoMapa= EstadoMapa.RURAL;\n }\n if(cambiosFondo == 10){\n estadoMapa= EstadoMapa.RURALURBANO;\n }\n if(cambiosFondo > 10 && cambiosFondo < 15){\n estadoMapa= EstadoMapa.URBANO;\n }\n if(cambiosFondo == 15 ){\n estadoMapa= EstadoMapa.URBANOUNIVERSIDAD;\n }\n if(cambiosFondo > 15 && cambiosFondo < 20){\n estadoMapa= EstadoMapa.UNIVERSIDAD;\n }\n if(cambiosFondo == 20){\n estadoMapa= EstadoMapa.UNIVERSIDADSALONES;\n }\n if(cambiosFondo > 20 && cambiosFondo < 25){\n estadoMapa= EstadoMapa.SALONES;\n }\n\n }", "boolean hasMobile(String name);", "public boolean updateMobile(QueryItem item)throws Exception{\n if(item == null){\n throw new NullPointerException(\"item is null\");\n }\n String mobile = item.getKey();\n if(mobile.length() <= key_length){\n throw new Exception(\"mobile length is too short\");\n }\n String key = mobile.substring(0,key_length);\n String m = mobile.substring(key_length);\n SimpleQueryEntity qe = map.get(key);\n if(qe == null){\n int x = (int) (Math.pow(10,(MOBILE_COUNT - key_length)));\n qe = new SimpleQueryEntity(x,weight);\n map.put(key,qe);\n }\n qe.addOneItemData(item.getProperties(), Integer.parseInt(m));\n return true;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n coordList = getIntent().getParcelableArrayListExtra(\"coordlist\");\n Menit = getIntent().getIntExtra(\"minute\",0);\n Detik = getIntent().getIntExtra(\"second\",0);\n totalDistance = getIntent().getDoubleExtra(\"jarak\",0);\n kecepatan = getIntent().getDoubleExtra(\"speed\",0);\n kalori = getIntent().getDoubleExtra(\"kalori\",0);\n //strLat = getIntent().getStringExtra(\"strLat\");\n //strLong = getIntent().getStringExtra(\"strLong\");\n\n\n\n\n\n txtSpeed.setText(String.valueOf(Math.round(kecepatan))+\"Km/h\");\n\n txtJarak.setText(String.valueOf(numberFormat.format(totalDistance/1000)));\n\n txtJumlahCalorie.setText(String.valueOf(numberFormat.format(kalori)));\n\n //txtMenit = (TextView)findViewById(R.id.menit);\n //txtDetik = (TextView)findViewById(R.id.detik);\n\n txtTime.setText(String.format(\"%02d\", Menit)+\":\"\n + String.format(\"%02d\", Detik)+\"hr\");\n //txtDetik.setText(String.valueOf(Detik));\n\n if(coordList.size() <= 1){\n //Toast.makeText(MyRouteMaps.this, \"ANDA BELUM BERAKTIFITAS\", Toast.LENGTH_SHORT).show();\n drawMap();\n }else{\n drawMap();\n }\n\n Log.d(\"ISI DALAM COORDLIST MAP : \",String.valueOf(coordList.size()));\n\n\n if(totalDistance < 500) {\n mMap.animateCamera(CameraUpdateFactory.zoomTo(17.0f));\n }else{\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15.5f));\n }\n\n // Add a marker in Sydney and move the camera\n //LatLng sydney = new LatLng(-34, 151);\n\n }", "private String getMiles(String numero) {\n String c = numero.substring(numero.length() - 3);\r\n //obtiene los miles\r\n String m = numero.substring(0, numero.length() - 3);\r\n String n = \"\";\r\n //se comprueba que miles tenga valor entero\r\n if (Integer.parseInt(m) > 0) {\r\n n = getCentenas(m);\r\n return n + \"mil \" + getCentenas(c);\r\n } else {\r\n return \"\" + getCentenas(c);\r\n }\r\n\r\n }", "private void moverFondo() {\n ActualizaPosicionesFondos();\n noAleatorio = MathUtils.random(1, 5); // crea los numeros para cambiar los mapas de manera aleatoria\n if (xFondo == -texturaFondoBase.getWidth()){\n //Cambio de fondo base\n texturaFondoBase= mapaAleatorio(noAleatorio);\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())){\n //Cambio fondo de apoyo\n texturaFondoApoyo= mapaAleatorio(noAleatorio);\n xFondo= 0; //al pasar el segundo fondo regresa el puntero al primer fondo.\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n }", "@Override\n \t\tpublic void onLocationChanged(Location location) {\n \t\t\tmobileLocation = location;\n \t\t\tif(!wasZoomed)\n \t\t\t{\n \t\t\tGeoPoint newPos = new GeoPoint(\n \t\t\t\t\t(int)(mobileLocation.getLatitude() * 1e6),\n \t\t\t\t\t(int)(mobileLocation.getLongitude() * 1e6));\n \t\t\t\n \t\t\tdouble latitudeSpan = Math.round(Math.abs(mobileLocation.getLatitude()*1e6- \n \t grave.getLatitudeE6()));\n \t\t\tdouble longitudeSpan = Math.round(Math.abs(mobileLocation.getLongitude()*1e6 - \n \t grave.getLongitudeE6()));\n \t\t\t\n \t\t\tmc.zoomToSpan((int)(latitudeSpan*2), (int)(longitudeSpan*2)); \n \t\t\t\t\t\n \t\t\tmc.animateTo(new GeoPoint\n \t\t\t\t\t((grave.getLatitudeE6()+newPos.getLatitudeE6())/2, \n \t\t\t \t\t\t(grave.getLongitudeE6()+newPos.getLongitudeE6())/2));\n \t\t\t\n \t\t\tmapView.invalidate();\n \t\t\twasZoomed = true;\n \t\t\t}\n \t\t\tLog.i(\"LOCATION\",\"LONG: \"+location.getLongitude()+ \" LAT:\"+location.getLatitude());\n \t\t}", "private static void grabarYleerMedico() {\r\n\r\n\t\tMedico medico = new Medico(\"Manolo\", \"Garcia\", \"62\", \"casa\", \"2\", null);\r\n\t\tDTO<Medico> dtoMedico = new DTO<>(\"src/Almacen/medico.dat\");\r\n\t\tif (dtoMedico.grabar(medico) == true) {\r\n\t\t\tSystem.out.println(medico.getNombre());\r\n\t\t\tSystem.out.println(medico.getDireccion());\r\n\t\t\tSystem.out.println(\"Medico grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tMedico medicoLeer = dtoMedico.leer();\r\n\t\tSystem.out.println(medicoLeer);\r\n\t\tSystem.out.println(medicoLeer.getNombre());\r\n\t}", "public List<Mobibus> darMobibus();", "@Override\r\n public String getUsoMaggiore() {\n int maxpacchetti=0;\r\n int npacchetti=0;\r\n String a;\r\n Map<String, String> mappatemp=new HashMap<>();\r\n Iterator<Map<String, String>> iterator;\r\n iterator = getUltimaEntry().iterator();\r\n System.out.println(getUltimaEntry().size());\r\n\t\twhile (iterator.hasNext()) {\r\n \r\n\t\t\tMap<String, String> m = iterator.next();\r\n //si fa la ricerca della più utilizzata all'inerno della mappa\r\n \r\n npacchetti=Integer.parseInt(m.get(\"RX-OK\"))+Integer.parseInt(m.get(\"TX-OK\"));\r\n System.out.println(maxpacchetti);\r\n if (maxpacchetti<npacchetti){\r\n maxpacchetti=npacchetti;\r\n mappatemp.put(\"Iface\",m.get(\"Iface\"));\r\n mappatemp.put(\"Pacchetti_TX+RX_OK\",String.valueOf(npacchetti));\r\n \r\n }\r\n }\r\n \r\n try {\r\n String json = new ObjectMapper().writeValueAsString(mappatemp);\r\n System.out.println(json);\r\n \r\n \r\n if (json!=null) return json ;\r\n } catch (JsonProcessingException ex) {\r\n Logger.getLogger(NetstatSingleton.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n \r\n \r\n return \"NOT WORKING\";\r\n \r\n }", "public interface RobotMap {\n\t// CAN Device IDs\n\n\tpublic static final int WINCH_TALON = 1;\n\t// winch motors\n\n\tpublic static final int LEFT_ALIGN_TALON = 3;\n\tpublic static final int RIGHT_ALIGN_TALON = 4;\n\t// allignment wheels\n\n\tpublic static final int REAR_RIGHT_TALON = 5;\n\tpublic static final int REAR_LEFT_TALON = 6;\n\tpublic static final int FRONT_RIGHT_TALON = 7;\n\tpublic static final int FRONT_LEFT_TALON = 8;\n\t// drivetrain wheels\n\n\tpublic static final int PCM_MAIN = 9;\n\n\t/******************\n ** PNEUMATICS ** \n ******************/ \n\tpublic static final int FLIPPER_RIGHT = 0;\n\tpublic static final int FLIPPER_LEFT = 1;\n\tpublic static final int ARMS_A = 2;\n\tpublic static final int ARMS_B = 3;\n\t// End Pneumatic Channels\n\n\t/******************\n **PID CONTROLLER** \n ******************/ \n public static final double ABS_TOL = 100;\n public static final double P = .4;\n public static final double I = .01;\n public static final double D = 11;\n public static final double OUT_RANGE_L = -0.8;\n public static final double OUT_RANGE_H = 0.8;\n\n}", "public static void queriedMetroInformation(Activity context) {\n\n // Get tracker\n Tracker tracker = ((GlobalEntity) context.getApplicationContext())\n .getTracker(TrackerName.APP_TRACKER);\n if (tracker == null) {\n return;\n }\n\n // Build and send an Event\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Info Search [Metro]\").setAction(\"queryMetro\")\n .setLabel(\"queryMetro\").build());\n }", "Room mo12151c();", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n mMap2 = googleMap;\n mMap3 = googleMap;\n mMap4 = googleMap;\n mMap5 = googleMap;\n mMap6 = googleMap;\n mMap7 = googleMap;\n mMap8 = googleMap;\n\n\n configuracion =mMap.getUiSettings();\n configuracion.setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n\n LatLng med = new LatLng(5.5986029, -75.8189893);\n LatLng med2 = new LatLng(5.5963072,-75.8130777);\n LatLng med3 = new LatLng(5.5936377, -75.8126003);\n LatLng med4 = new LatLng(5.5749407, -75.7907993);\n LatLng med5 = new LatLng(5.5646469, -75.7912391);\n LatLng med6 = new LatLng(5.5457995, -75.7945168);\n LatLng med7 = new LatLng(5.5391573, -75.8043015);\n LatLng med8 = new LatLng(5.5305395, -75.8031642);\n\n\n final Marker medellin = mMap.addMarker(new MarkerOptions().position(med).title(getString(R.string.ventanas1)));\n final Marker medellin2 = mMap2.addMarker(new MarkerOptions().position(med2).title(getString(R.string.ventanas2)));\n final Marker medellin3 = mMap3.addMarker(new MarkerOptions().position(med3).title(getString(R.string.ventanas3)));\n final Marker medellin4 = mMap4.addMarker(new MarkerOptions().position(med4).title(getString(R.string.ventanas4)));\n final Marker medellin5 = mMap5.addMarker(new MarkerOptions().position(med5).title(getString(R.string.ventanas5)));\n final Marker medellin6 = mMap6.addMarker(new MarkerOptions().position(med6).title(getString(R.string.ventanas6)));\n final Marker medellin7 = mMap7.addMarker(new MarkerOptions().position(med7).title(getString(R.string.ventanas7)));\n final Marker medellin8 = mMap8.addMarker(new MarkerOptions().position(med8).title(getString(R.string.ventanas8)));\n\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(med, 12));\n mMap2.moveCamera(CameraUpdateFactory.newLatLngZoom(med2, 12));\n mMap3.moveCamera(CameraUpdateFactory.newLatLngZoom(med3, 12));\n mMap4.moveCamera(CameraUpdateFactory.newLatLngZoom(med4, 12));\n mMap5.moveCamera(CameraUpdateFactory.newLatLngZoom(med5, 12));\n mMap6.moveCamera(CameraUpdateFactory.newLatLngZoom(med6, 12));\n mMap7.moveCamera(CameraUpdateFactory.newLatLngZoom(med7, 12));\n mMap8.moveCamera(CameraUpdateFactory.newLatLngZoom(med8, 12));\n mMap.addPolyline(new PolylineOptions().geodesic(true)\n .add(new LatLng( 5.5985815 , -75.8189195 ))\n .add(new LatLng( 5.5975885 , -75.8166182 ))\n .add(new LatLng( 5.5960936 , -75.8130026 ))\n .add(new LatLng( 5.5957733 , -75.8127344 ))\n .add(new LatLng( 5.5937338 , -75.8126485 ))\n .add(new LatLng( 5.5927835 , -75.8132172 ))\n .add(new LatLng( 5.5918866 , -75.8127987 ))\n .add(new LatLng( 5.5912352 , -75.8127666 ))\n .add(new LatLng( 5.5893986 , -75.8110714 ))\n .add(new LatLng( 5.5885231 , -75.8110070 ))\n .add(new LatLng( 5.5888861 , -75.8095479 ))\n .add(new LatLng( 5.5902956 , -75.8079815 ))\n .add(new LatLng( 5.5909149 , -75.8080673 ))\n .add(new LatLng( 5.5915128 , -75.8073592 ))\n .add(new LatLng( 5.5918545 , -75.8078313 ))\n .add(new LatLng( 5.5923030 , -75.8079815 ))\n .add(new LatLng( 5.5923244 , -75.8068013 ))\n .add(new LatLng( 5.5926020 , -75.8059430 ))\n .add(new LatLng( 5.5915342 , -75.8057284 ))\n .add(new LatLng( 5.5906159 , -75.8050203 ))\n .add(new LatLng( 5.5903596 , -75.8037329 ))\n .add(new LatLng( 5.5898471 , -75.8031428 ))\n .add(new LatLng( 5.5896336 , -75.8027136 ))\n .add(new LatLng( 5.5879785 , -75.8015442 ))\n .add(new LatLng( 5.5874019 , -75.8011794 ))\n .add(new LatLng( 5.5868360 , -75.7985830 ))\n .add(new LatLng( 5.5854051 , -75.7966733 ))\n .add(new LatLng( 5.5851702 , -75.7962441 ))\n .add(new LatLng( 5.5847217 , -75.7942271 ))\n .add(new LatLng( 5.5847644 , -75.7931542 ))\n .add(new LatLng( 5.5843800 , -75.7911801 ))\n .add(new LatLng( 5.5845509 , -75.7902789 ))\n .add(new LatLng( 5.5842305 , -75.7894850 ))\n .add(new LatLng( 5.5835045 , -75.7887983 ))\n .add(new LatLng( 5.5825434 , -75.7871032 ))\n .add(new LatLng( 5.5823299 , -75.7861590 ))\n .add(new LatLng( 5.5821590 , -75.7850862 ))\n .add(new LatLng( 5.5813689 , -75.7821250 ))\n .add(new LatLng( 5.5813475 , -75.7805371 ))\n .add(new LatLng( 5.5813048 , -75.7790565 ))\n .add(new LatLng( 5.5813475 , -75.7774687 ))\n .add(new LatLng( 5.5807922 , -75.7771468 ))\n .add(new LatLng( 5.5801943 , -75.7785416 ))\n .add(new LatLng( 5.5789770 , -75.7780051 ))\n .add(new LatLng( 5.5781014 , -75.7763529 ))\n .add(new LatLng( 5.5773112 , -75.7762671 ))\n .add(new LatLng( 5.5766492 , -75.7756662 ))\n .add(new LatLng( 5.5760085 , -75.7753444 ))\n .add(new LatLng( 5.5745670 , -75.7738262 ))\n .add(new LatLng( 5.5729546 , -75.7729304 ))\n .add(new LatLng( 5.5729332 , -75.7734239 ))\n .add(new LatLng( 5.5728478 , -75.7743251 ))\n .add(new LatLng( 5.5735419 , -75.7747972 ))\n .add(new LatLng( 5.5737875 , -75.7752693 ))\n .add(new LatLng( 5.5738729 , -75.7764816 ))\n .add(new LatLng( 5.5744708 , -75.7764173 ))\n .add(new LatLng( 5.5746631 , -75.7779086 ))\n .add(new LatLng( 5.5753358 , -75.7794267 ))\n .add(new LatLng( 5.5761793 , -75.7801294 ))\n .add(new LatLng( 5.5760298 , -75.7809448 ))\n .add(new LatLng( 5.5761153 , -75.7816315 ))\n .add(new LatLng( 5.5759444 , -75.7829189 ))\n .add(new LatLng( 5.5764143 , -75.7844424 ))\n .add(new LatLng( 5.5754959 , -75.7865667 ))\n .add(new LatLng( 5.5748553 , -75.7888842 ))\n .add(new LatLng( 5.5749941 , -75.7906866 ))\n .add(new LatLng( 5.5720576 , -75.7914162 ))\n .add(new LatLng( 5.5712888 , -75.7906222 ))\n .add(new LatLng( 5.5705413 , -75.7906866 ))\n .add(new LatLng( 5.5700074 , -75.7903647 ))\n .add(new LatLng( 5.5687687 , -75.7913518 ))\n .add(new LatLng( 5.5677650 , -75.7907295 ))\n .add(new LatLng( 5.5668253 , -75.7910728 ))\n .add(new LatLng( 5.5664409 , -75.7907295 ))\n .add(new LatLng( 5.5656293 , -75.7911587 ))\n .add(new LatLng( 5.5646896 , -75.7910299 ))\n .add(new LatLng( 5.5659283 , -75.7927036 ))\n .add(new LatLng( 5.5660992 , -75.7936478 ))\n .add(new LatLng( 5.5655012 , -75.7942915 ))\n .add(new LatLng( 5.5647323 , -75.7943344 ))\n .add(new LatLng( 5.5619133 , -75.7972527 ))\n .add(new LatLng( 5.5614434 , -75.7990551 ))\n .add(new LatLng( 5.5608454 , -75.7991409 ))\n .add(new LatLng( 5.5602902 , -75.7984972 ))\n .add(new LatLng( 5.5588806 , -75.7975531 ))\n .add(new LatLng( 5.5561469 , -75.7968664 ))\n .add(new LatLng( 5.5561469 , -75.7953644 ))\n .add(new LatLng( 5.5536268 , -75.7944202 ))\n .add(new LatLng( 5.5514911 , -75.7936478 ))\n .add(new LatLng( 5.5500816 , -75.7948065 ))\n .add(new LatLng( 5.5493981 , -75.7944202 ))\n .add(new LatLng( 5.5457674 , -75.7934332 ))\n .add(new LatLng( 5.5453403 , -75.7951498 ))\n .add(new LatLng( 5.5457674 , -75.7961369 ))\n .add(new LatLng( 5.5460451 , -75.7968235 ))\n .add(new LatLng( 5.5468139 , -75.7983255 ))\n .add(new LatLng( 5.5453616 , -75.7986689 ))\n .add(new LatLng( 5.5455966 , -75.7996988 ))\n .add(new LatLng( 5.5464081 , -75.8006215 ))\n .add(new LatLng( 5.5458956 , -75.8013296 ))\n .add(new LatLng( 5.5463227 , -75.8022308 ))\n .add(new LatLng( 5.5451053 , -75.8032823 ))\n .add(new LatLng( 5.5449345 , -75.8037865 ))\n .add(new LatLng( 5.5445501 , -75.8039045 ))\n .add(new LatLng( 5.5443792 , -75.8036900 ))\n .add(new LatLng( 5.5449345 , -75.8028531 ))\n .add(new LatLng( 5.5452121 , -75.8025956 ))\n .add(new LatLng( 5.5449986 , -75.8023596 ))\n .add(new LatLng( 5.5448918 , -75.8023596 ))\n .add(new LatLng( 5.5445073 , -75.8025956 ))\n .add(new LatLng( 5.5431298 , -75.8041513 ))\n .add(new LatLng( 5.5423930 , -75.8043337 ))\n .add(new LatLng( 5.5426493 , -75.8036685 ))\n .add(new LatLng( 5.5430123 , -75.8031321 ))\n .add(new LatLng( 5.5436744 , -75.8024669 ))\n .add(new LatLng( 5.5428628 , -75.8022952 ))\n .add(new LatLng( 5.5419712 , -75.8028370 ))\n .add(new LatLng( 5.5408232 , -75.8030784 ))\n .add(new LatLng( 5.5403427 , -75.8016300 ))\n .add(new LatLng( 5.5402359 , -75.8005357 ))\n .add(new LatLng( 5.5402572 , -75.7992053 ))\n .add(new LatLng( 5.5403640 , -75.7983899 ))\n .add(new LatLng( 5.5400223 , -75.7985616 ))\n .add(new LatLng( 5.5399155 , -75.7995915 ))\n .add(new LatLng( 5.5400437 , -75.8032823 ))\n .add(new LatLng( 5.5394136 , -75.8042479 ))\n .add(new LatLng( 5.5382283 , -75.8037114 ))\n .add(new LatLng( 5.5381215 , -75.8027458 ))\n .add(new LatLng( 5.5374808 , -75.8024025 ))\n .add(new LatLng( 5.5358149 , -75.8037758 ))\n .add(new LatLng( 5.5349606 , -75.8032179 ))\n .add(new LatLng( 5.5340849 , -75.8039474 ))\n .add(new LatLng( 5.5337005 , -75.8036900 ))\n .add(new LatLng( 5.5340208 , -75.8031750 ))\n .add(new LatLng( 5.5336791 , -75.8025098 ))\n .add(new LatLng( 5.5323976 , -75.8024883 ))\n .add(new LatLng( 5.5324350 , -75.8019519 ))\n .add(new LatLng( 5.5320960 , -75.8018446 ))\n .add(new LatLng( 5.5317569 , -75.8020806 ))\n .add(new LatLng( 5.5317356 , -75.8029604 ))\n .add(new LatLng( 5.5314579 , -75.8030999 ))\n .add(new LatLng( 5.5310414 , -75.8026814 ))\n .add(new LatLng( 5.5304968 , -75.8027995 ))\n .color(Color.BLUE)\n .width(5)\n\n );\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n\n\n }", "private String getMillones(String numero) {\n String miles = numero.substring(numero.length() - 6);\r\n //se obtiene los millones\r\n String millon = numero.substring(0, numero.length() - 6);\r\n String n = \"\";\r\n if (millon.length() > 1) {\r\n n = getCentenas(millon) + \"millones \";\r\n } else {\r\n n = getUnidades(millon) + \"millon \";\r\n }\r\n return n + getMiles(miles);\r\n }", "public List<AlerteMobile> DecoderXMLAlerteMobile() {\n\t\tJournalDesactivable.ecrire(\"decoderListe()\");\n\t\tList<AlerteMobile> listeAlerteMobile = new ArrayList<AlerteMobile>();\n\n\t\ttry \n\t\t{\n\t\t\tDocumentBuilder parseur = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\tDocument document = parseur.parse(new StringBufferInputStream(this.xml)); //mettre à la place du fichier xml\n\t\t\tString racine = document.getDocumentElement().getNodeName();\n\t\t\tJournal.ecrire(3, \"Racine=\" + racine);\n\t\t\t\t\t\n\t\t\tNodeList listeNoeudsAlerteMobile = document.getElementsByTagName(\"mobile\");\n\t\t\tfor(int position = 0; position < listeNoeudsAlerteMobile.getLength(); position++)\n\t\t\t{\n\t\t\t\tElement noeudAlerteMobile = (Element)listeNoeudsAlerteMobile.item(position);\n\t\t\t\tString alerte = noeudAlerteMobile.getElementsByTagName(\"alerte\").item(0).getTextContent();\n\t\t\t\tString seuil = noeudAlerteMobile.getElementsByTagName(\"seuil\").item(0).getTextContent();\n\t\t\t\t\n\n\t\t\t\tJournal.ecrire(3,\"Alerte : \" + alerte);\n\t\t\t\tJournal.ecrire(3,\"Seuil : \" + seuil);\n\t\t\t\tAlerteMobile alerteMobile = new AlerteMobile(alerte,seuil);\n\t\t\t\tlisteAlerteMobile.add(alerteMobile);\n\t\t\t}\n\t\t} \n\t\tcatch (ParserConfigurationException e) \n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\treturn listeAlerteMobile;\n\t}", "@ApiModelProperty(value = \"Statistics of the campaign on the basis of mobile devices\")\n public Map<String, GetDeviceBrowserStats> getMobile() {\n return mobile;\n }", "public static void createDeviceMap() {\n\t\ttry {\n\t\t\tSmapStreamList sat = new SmapStreamList();\n\t\t\tMap<String, SmapDevice> saMap = sat.convertToSADevices();\n\t\t\tFileWriter fw = new FileWriter(device_map_file);\t\t\t\n\t\t\tString json = sat.gson.toJson(saMap);\n\t\t\tfw.write(json);\n\t\t\tfw.close();\n\t\t\trenderText(json);\n\t\t} catch (Exception e) {\n\t\t\trenderText(e);\n\t\t}\n\t}", "public void adjustMap(MapData mapd){\n int[][] map = mapd.getMap();\n int mx=mapd.getX();\n int my=mapd.getY();\n for(int y=0;y<my;y++){\n for(int x=0;x<mx;x++){\n boolean l = false;\n boolean r = false;\n boolean t = false;\n boolean b = false;\n boolean tl = false;\n boolean tr = false;\n boolean bl = false;\n boolean br = false;\n \n\n if(map[x][y]>0 && map[x][y]<26) {\n int mustSet = 0;\n //LEFT\n if (x > 0 && map[x - 1][y] > 0 && map[x-1][y]<26) {\n l = true;\n }\n //RIGHT\n if (x < mx - 1 && map[x + 1][y] > 0 && map[x+1][y]<26) {\n r = true;\n }\n //TOP\n if (y > 0 && map[x][y - 1] > 0 && map[x][y-1]<26) {\n t = true;\n }\n //Bottom\n if (y < my - 1 && map[x][y + 1] > 0 && map[x][y+1]<26) {\n b = true;\n }\n //TOP LEFT\n if (x > 0 && y > 0 && map[x - 1][y - 1] > 0 && map[x-1][y-1]<26) {\n tl = true;\n }\n //TOP RIGHT\n if (x < mx - 1 && y > 0 && map[x + 1][y - 1] > 0 && map[x+1][y-1]<26) {\n tr = true;\n }\n //Bottom LEFT\n if (x > 0 && y < my - 1 && map[x - 1][y + 1] > 0 && map[x-1][y+1]<26) {\n bl = true;\n }\n //Bottom RIGHT\n if (x < mx - 1 && y < my - 1 && map[x + 1][y + 1] > 0 && map[x+1][y+1]<26) {\n br = true;\n }\n\n //Decide Image to View\n if (!r && !l && !t && !b) {\n mustSet = 23;\n }\n if (r && !l && !t && !b) {\n mustSet = 22;\n }\n if (!r && l && !t && !b) {\n mustSet = 25;\n }\n if (!r && !l && t && !b) {\n mustSet = 21;\n }\n if (!r && !l && !t && b) {\n mustSet = 19;\n }\n if (r && l && !t && !b) {\n mustSet = 24;\n }\n if (!r && !l && t && b) {\n mustSet = 20;\n }\n if (r && !l && t && !b && !tr) {\n mustSet = 11;\n }\n if (r && !l && t && !b && tr) {\n mustSet = 2;\n }\n if (!r && l && t && !b && !tl) {\n mustSet = 12;\n }\n if (!r && l && t && !b && tl) {\n mustSet = 3;\n }\n if (r && !l && !t && b && br) {\n mustSet = 1;\n }\n if (r && !l && !t && b && !br) {\n mustSet = 10;\n }\n if (!r && l && !t && b && bl) {\n mustSet = 4;\n }\n if (r && !l && t && b && !tr) {\n mustSet = 15;\n }\n if (r && !l && t && b && tr) {\n mustSet = 6;\n }\n if (!r && l && t && b && !tl) {\n mustSet = 17;\n }\n if (!r && l && t && b && tl) {\n mustSet = 8;\n }\n if (r && l && !t && b && !br) {\n mustSet = 14;\n }\n if (r && l && !t && b && br) {\n mustSet = 5;\n }\n if (r && l && t && !b && !tr) {\n mustSet = 16;\n }\n if (r && l && t && !b && tr) {\n mustSet = 7;\n }\n if (!r && l && !t && b && !bl) {\n mustSet = 13;\n }\n if (r && l && t && b && br && tl) {\n mustSet = 9;\n }\n if (r && l && t && b && !br && !tl) {\n mustSet = 18;\n }\n\n //System.out.println(\"MAP SEGMENT : \" + mustSet);\n map[x][y] = mustSet;\n }\n mapd.setMap(map);\n }\n }\n System.out.println(\"Map Adjust OK !\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng barcelona = new LatLng(41.3887901, 2.1589899);\n LatLng marcador1 = new LatLng(41.379564, 2.167203);\n LatLng marcador2 = new LatLng(41.394327, 2.191843);\n LatLng marcador3 = new LatLng(41.398121, 2.199290);\n LatLng marcador4 = new LatLng(41.386235, 2.146300);\n LatLng marcador5 = new LatLng(41.395933, 2.136832);\n LatLng marcador6 = new LatLng(41.441696, 2.237285);\n LatLng marcador7 = new LatLng(41.457493, 2.255982);\n LatLng marcador8 = new LatLng(41.316202, 2.028248);\n LatLng marcador9 = new LatLng(41.333813, 2.035098);\n LatLng marcador10 = new LatLng(41.357954, 2.061158);\n\n\n mMap.addMarker(new MarkerOptions().position(marcador1).title(\"Los amigos\"));\n mMap.addMarker(new MarkerOptions().position(marcador2).title(\"El dorado\"));\n mMap.addMarker(new MarkerOptions().position(marcador3).title(\"Juan y Luca\"));\n mMap.addMarker(new MarkerOptions().position(marcador4).title(\"Durums\"));\n mMap.addMarker(new MarkerOptions().position(marcador5).title(\"Restaurante Jose Fina\"));\n mMap.addMarker(new MarkerOptions().position(marcador6).title(\"Los Hermanos\"));\n mMap.addMarker(new MarkerOptions().position(marcador7).title(\"Paella para todos\"));\n mMap.addMarker(new MarkerOptions().position(marcador8).title(\"Señor Pollo\"));\n mMap.addMarker(new MarkerOptions().position(marcador9).title(\"Restaurante Boliviano\"));\n mMap.addMarker(new MarkerOptions().position(marcador10).title(\"Laguna Alalay\"));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(barcelona,12), 4000,null);\n mMap.setMaxZoomPreference(1000);\n }", "public List getFeriadoZona(Map criteria);", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n if (!multi) {\n LatLng localEntrega = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(localEntrega).title(\"Local de Entrega\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(localEntrega, 14));\n } else {\n myapp = (EntregasApp)getApplicationContext();\n manager = new Manager(myapp);\n LatLng primeiraEntrega;\n\n primeiraEntrega = new LatLng(0,0);\n\n int i = 0;\n List<Documento> documentos = manager.findDocumentoByDataRomaneio(myapp.getDate());\n\n for (Documento documento : documentos ){\n LatLng localEntrega;\n if (documento.getDestinatario().getLatitude()!=null){\n i = i + 1;\n latitude = Double.valueOf(documento.getDestinatario().getLatitude());\n longitude = Double.valueOf(documento.getDestinatario().getLongitude());\n\n localEntrega = new LatLng(latitude, longitude);\n\n if(i==1){\n primeiraEntrega = new LatLng(latitude,longitude);\n }\n\n mMap.addMarker(new MarkerOptions().position(localEntrega)\n .title(documento.getDestinatario().getNome()));\n }\n }\n\n mMap.setMyLocationEnabled(true);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(primeiraEntrega, 10));\n\n // Check if we were successful in obtaining the map.\n /*\n if (mMap != null) {\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location arg0) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.truck);\n mMap.addMarker(new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title(\"Minha Localização\").icon(icon));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(arg0.getLatitude(), arg0.getLongitude()), 6));\n }\n });\n\n\n }\n\n */\n\n }\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\r\n float zoomLevel = 16.0f; //This goes up to 21\r\n\r\n switch (mPost_L){\r\n\r\n case \"Mellor Building\":\r\n //Mellor Building\r\n LatLng mellor = new LatLng(53.010042, -2.180419);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(mellor)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car park A\r\n LatLng carPark1 = new LatLng(53.010189, -2.180913);\r\n mMap.addMarker(new MarkerOptions().position(carPark1).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark1, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark2 = new LatLng(53.010197, -2.178928);\r\n mMap.addMarker(new MarkerOptions().position(carPark2).title(mPost_L +\" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark2, zoomLevel));\r\n break;\r\n\r\n\r\n case \"Ember Lounge\":\r\n //Ember Lounge\r\n LatLng ember = new LatLng(53.009524, -2.179833);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(ember)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car park A\r\n LatLng carPark1a = new LatLng(53.010189, -2.180913);\r\n mMap.addMarker(new MarkerOptions().position(carPark1a).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark1a, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark2b = new LatLng(53.010197, -2.178928);\r\n mMap.addMarker(new MarkerOptions().position(carPark2b).title(mPost_L +\" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark2b, zoomLevel));\r\n break;\r\n\r\n case \"LRV and Verve\":\r\n //LRV and Verve\r\n LatLng lrvAndverve = new LatLng(53.007882, -2.175342);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(lrvAndverve)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car Park A\r\n LatLng carPark3 = new LatLng(53.007652, -2.175546);\r\n mMap.addMarker(new MarkerOptions().position(carPark3).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark3, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark4 = new LatLng(53.008826, -2.175459);\r\n mMap.addMarker(new MarkerOptions().position(carPark4).title(mPost_L + \" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark4, zoomLevel));\r\n break;\r\n\r\n\r\n case \"Sir Stanley Matthews Sports hall\":\r\n //Stanley Matthews Sports hall\r\n LatLng SMsportsHall = new LatLng(53.007882, -2.175342);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(SMsportsHall)\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n\r\n //Car Park A\r\n LatLng carPark5 = new LatLng(53.008605, -2.174087);\r\n mMap.addMarker(new MarkerOptions().position(carPark5).title(mPost_L + \" Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark5, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark6 = new LatLng(53.009739, -2.174776);\r\n mMap.addMarker(new MarkerOptions().position(carPark6).title(mPost_L + \" Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark6, zoomLevel));\r\n break;\r\n\r\n\r\n case \"S520 (Mellor Building)\":\r\n //Mellor Building (S520)\r\n LatLng s520mellor = new LatLng(53.010042, -2.180419);\r\n mMap.addMarker(new MarkerOptions()\r\n .position(s520mellor).snippet(\"5th Floor of Mellor Building!\")\r\n .title(mPost_L).icon(BitmapDescriptorFactory\r\n .defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n //Car park A\r\n LatLng carPark7 = new LatLng(53.010189, -2.180913);\r\n mMap.addMarker(new MarkerOptions().position(carPark7).title(\"Mellor Building Car park A\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark7, zoomLevel));\r\n\r\n //Car park B\r\n LatLng carPark8 = new LatLng(53.010197, -2.178928);\r\n mMap.addMarker(new MarkerOptions().position(carPark8).title(\"Mellor Building Car park B\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(carPark8, zoomLevel));\r\n break;\r\n\r\n }\r\n }", "public void QueryBUSINFO() {\r\n\r\n Cursor cursor = getBusINFOCursor();\r\n\r\n if (cursor != null) {\r\n\r\n if (cursor.moveToFirst()) {\r\n do {\r\n\r\n\r\n String busNUM = cursor.getString(1);\r\n String busINFO = cursor.getString(2);\r\n\r\n\r\n Log.d(\"test\", busNUM);\r\n if (busNUM.indexOf(\"九巴\") != -1 || busNUM.indexOf(\"KMB\") != -1) {\r\n if (Bus.isLanguare() == true) {\r\n busList.add(new Bus(busNUM, \"往 \" + busINFO, busICON[0]));\r\n } else {\r\n busList.add(new Bus(busNUM, \"To \" + busINFO, busICON[0]));\r\n }\r\n } else if (busNUM.indexOf(\"城巴\") != -1 || busNUM.indexOf(\"CITYBUS\") != -1) {\r\n if (Bus.isLanguare() == true) {\r\n busList.add(new Bus(busNUM, \"往 \" + busINFO, busICON[1]));\r\n } else {\r\n busList.add(new Bus(busNUM, \"To \" + busINFO, busICON[1]));\r\n }\r\n } else if (busNUM.indexOf(\"新巴\") != -1 || busNUM.indexOf(\"FIRST BUS\") != -1) {\r\n if (Bus.isLanguare() == true) {\r\n busList.add(new Bus(busNUM, \"往 \" + busINFO, busICON[2]));\r\n } else {\r\n busList.add(new Bus(busNUM, \"To \" + busINFO, busICON[2]));\r\n }\r\n }\r\n } while (cursor.moveToNext());\r\n }\r\n cursor.close();\r\n\r\n }\r\n\r\n }", "public modifyMobile() {\n\t\tsuper();\n\t}", "public f createFromParcel(Parcel parcel) {\r\n int i = 0;\r\n String str = null;\r\n int b = a.b(parcel);\r\n HashSet hashSet = new HashSet();\r\n String str2 = null;\r\n boolean z = false;\r\n String str3 = null;\r\n String str4 = null;\r\n String str5 = null;\r\n String str6 = null;\r\n String str7 = null;\r\n int i2 = 0;\r\n while (parcel.dataPosition() < b) {\r\n int a = a.a(parcel);\r\n switch (a.a(a)) {\r\n case e.MapAttrs_cameraBearing /*1*/:\r\n i2 = a.f(parcel, a);\r\n hashSet.add(Integer.valueOf(1));\r\n break;\r\n case e.MapAttrs_cameraTargetLat /*2*/:\r\n str7 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(2));\r\n break;\r\n case e.MapAttrs_cameraTargetLng /*3*/:\r\n str6 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(3));\r\n break;\r\n case e.MapAttrs_cameraTilt /*4*/:\r\n str5 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(4));\r\n break;\r\n case e.MapAttrs_cameraZoom /*5*/:\r\n str4 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(5));\r\n break;\r\n case e.MapAttrs_uiCompass /*6*/:\r\n str3 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(6));\r\n break;\r\n case e.MapAttrs_uiRotateGestures /*7*/:\r\n z = a.c(parcel, a);\r\n hashSet.add(Integer.valueOf(7));\r\n break;\r\n case e.MapAttrs_uiScrollGestures /*8*/:\r\n str2 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(8));\r\n break;\r\n case e.MapAttrs_uiTiltGestures /*9*/:\r\n str = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(9));\r\n break;\r\n case e.MapAttrs_uiZoomControls /*10*/:\r\n i = a.f(parcel, a);\r\n hashSet.add(Integer.valueOf(10));\r\n break;\r\n default:\r\n a.b(parcel, a);\r\n break;\r\n }\r\n }\r\n if (parcel.dataPosition() == b) {\r\n return new f(hashSet, i2, str7, str6, str5, str4, str3, z, str2, str, i);\r\n }\r\n throw new b(\"Overread allowed size end=\" + b, parcel);\r\n }", "public interface MetaInfo {\n\n String DIR_EMPTY = \"empty\";\n\n\n //===========================\n float WEIGHT_CAMERA_MOTION = 1;\n float WEIGHT_LOCATION = 1;\n float WEIGHT_MEDIA_TYPE = 1;\n float WEIGHT_SHORT_TYPE = 1;\n\n float WEIGHT_MEDIA_DIR = 3f;\n float WEIGHT_TIME = 3;\n float WEIGHT_VIDEO_TAG = 2.5f;\n float WEIGHT_SHOT_KEY = 5f;\n float WEIGHT_SHOT_CATEGORY = 2.5f;\n\n int FLAG_TIME = 0x0001;\n int FLAG_LOCATION = 0x0002;\n int FLAG_MEDIA_TYPE = 0x0004;\n int FLAG_MEDIA_DIR = 0x0008;\n int FLAG_SHOT_TYPE = 0x0010;\n int FLAG_CAMERA_MOTION = 0x0020;\n int FLAG_VIDEO_TAG = 0x0040;\n int FLAG_SHOT_KEY = 0x0080;\n int FLAG_SHOT_CATEGORY = 0x0100;\n\n //================= location ==================\n int LOCATION_NEAR_GPS = 1;\n int LOCATION_SAME_COUNTRY = 2;\n int LOCATION_SAME_PROVINCE = 3; //省,市,区\n int LOCATION_SAME_CITY = 4;\n int LOCATION_SAME_REGION = 5;\n\n //=================== for camera motion ====================\n int STILL = 0; // 静止, class 0\n int ZOOM = 3; // 前后移动(zoomIn or zoomOut), class 1\n int ZOOM_IN = 4;\n int ZOOM_OUT = 5;\n int PAN = 6; // 横向移动(leftRight or rightLeft), class 2\n int PAN_LEFT_RIGHT = 7;\n int PAN_RIGHT_LEFT = 8;\n int TILT = 9; // 纵向移动(upDown or downUp), class 3\n int TILT_UP_DOWN = 10;\n int TILT_DOWN_UP = 11;\n int CATEGORY_STILL = 1;\n int CATEGORY_ZOOM = 2;\n int CATEGORY_PAN = 3;\n int CATEGORY_TILT = 4;\n\n //图像类型。视频,图片。 已有\n\n //============== shooting device =================\n /**\n * the shoot device: cell phone\n */\n int SHOOTING_DEVICE_CELLPHONE = 1;\n /**\n * the shoot device: camera\n */\n int SHOOTING_DEVICE_CAMERA = 2;\n\n /**\n * the shoot device: drone\n */\n int SHOOTING_DEVICE_DRONE = 3; //无人机\n\n\n //====================== shooting mode ===========================\n /**\n * shooting mode: normal\n */\n int SHOOTING_MODE_NORMAL = 1;\n /**\n * shooting mode: slow motion\n */\n int SHOOTING_MODE_SLOW_MOTION = 2;\n /**\n * shooting mode: time lapse\n */\n int SHOOTING_MODE_TIME_LAPSE = 3;\n\n //=========================== shot type =======================\n /**\n * shot type: big - long- short ( 大远景)\n */\n int SHOT_TYPE_BIG_LONG_SHORT = 5;\n /**\n * shot type: long short ( 远景)\n */\n int SHOT_TYPE_LONG_SHORT = 4;\n\n /** medium long shot. (中远景) */\n int SHOT_TYPE_MEDIUM_LONG_SHOT = 3;\n /**\n * shot type: medium shot(中景)\n */\n int SHOT_TYPE_MEDIUM_SHOT = 2;\n /**\n * shot type: close up - chest ( 特写-胸)\n */\n int SHOT_TYPE_MEDIUM_CLOSE_UP = 1;\n\n /**\n * shot type: close up -head ( 特写-头)\n */\n int SHOT_TYPE_CLOSE_UP = 0;\n\n int SHOT_TYPE_NONE = -1;\n\n int CATEGORY_CLOSE_UP = 12; //特写/近景\n int CATEGORY_MIDDLE_VIEW = 11; //中景\n int CATEGORY_VISION = 10; //远景\n\n //========================== time ==========================\n int[] MORNING_HOURS = {7, 8, 9, 10, 11};\n int[] AFTERNOON_HOURS = {12, 13, 14, 15, 16, 17};\n //int[] NIGHT_HOURS = {18, 19, 20, 21, 22, 24, 1, 2, 3, 4, 5, 6};\n int TIME_SAME_DAY = 1;\n int TIME_SAME_PERIOD_IN_DAY = 2; //timeSamePeriodInDay\n\n class LocationMeta {\n private double longitude, latitude;\n /**\n * 高程精度比水平精度低原因,主要是GPS测出的是WGS-84坐标系下的大地高,而我们工程上,也就是电子地图上采用的高程一般是正常高,\n * 它们之间的转化受到高程异常和大地水准面等误差的制约。\n * 卫星在径向的定轨精度较差,也限制了GPS垂直方向的精度。\n */\n private int gpsHeight; //精度不高\n private String country, province, city, region; //国家, 省, 市, 区\n\n public double getLongitude() {\n return longitude;\n }\n\n public void setLongitude(double longitude) {\n this.longitude = longitude;\n }\n\n public double getLatitude() {\n return latitude;\n }\n\n public void setLatitude(double latitude) {\n this.latitude = latitude;\n }\n\n public String getCountry() {\n return country;\n }\n\n public void setCountry(String country) {\n this.country = country;\n }\n\n public String getProvince() {\n return province;\n }\n\n public void setProvince(String province) {\n this.province = province;\n }\n\n public String getCity() {\n return city;\n }\n\n public void setCity(String city) {\n this.city = city;\n }\n\n public String getRegion() {\n return region;\n }\n\n public void setRegion(String region) {\n this.region = region;\n }\n\n public int getGpsHeight() {\n return gpsHeight;\n }\n\n public void setGpsHeight(int gpsHeight) {\n this.gpsHeight = gpsHeight;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n LocationMeta that = (LocationMeta) o;\n\n if (Double.compare(that.longitude, longitude) != 0) return false;\n if (Double.compare(that.latitude, latitude) != 0) return false;\n if (gpsHeight != that.gpsHeight) return false;\n if (country != null ? !country.equals(that.country) : that.country != null)\n return false;\n if (province != null ? !province.equals(that.province) : that.province != null)\n return false;\n if (city != null ? !city.equals(that.city) : that.city != null) return false;\n return region != null ? region.equals(that.region) : that.region == null;\n }\n }\n\n /**\n * the meta data of image/video ,something may from 'AI'.\n */\n class ImageMeta extends SimpleCopyDelegate{\n private String path;\n private int mediaType;\n /** in mills */\n private long date;\n\n /** in mill-seconds */\n private long duration;\n private int width, height;\n\n private LocationMeta location;\n\n /**\n * frames/second\n */\n private int fps = 30;\n /** see {@linkplain IShotRecognizer#CATEGORY_ENV} and etc. */\n private int shotCategory;\n /**\n * the shot type\n */\n private String shotType;\n\n /** shot key */\n private String shotKey;\n /**\n * 相机运动\n */\n private String cameraMotion;\n /** video tags */\n private List<List<Integer>> tags;\n\n /** the whole frame data of video(from analyse , like AI. ), after read should not change */\n private SparseArray<VideoDataLoadUtils.FrameData> frameDataMap;\n /** the high light data. key is the time in seconds. */\n private SparseArray<List<? extends IHighLightData>> highLightMap;\n private HighLightHelper mHighLightHelper;\n\n /** 主人脸个数 */\n private int mainFaceCount = -1;\n private int mBodyCount = -1;\n\n /** 通用tag信息 */\n private List<FrameTags> rawVideoTags;\n /** 人脸框信息 */\n private List<FrameFaceRects> rawFaceRects;\n\n //tag indexes\n private List<Integer> nounTags;\n private List<Integer> domainTags;\n private List<Integer> adjTags;\n\n private Location subjectLocation;\n\n //-------------------------- start High-Light ----------------------------\n /** set metadata for high light data. (from load high light) */\n public void setMediaData(MediaData mediaData) {\n List<MediaData.HighLightPair> hlMap = mediaData.getHighLightDataMap();\n if(!Predicates.isEmpty(hlMap)) {\n highLightMap = new SparseArray<>();\n VisitServices.from(hlMap).fire(new FireVisitor<MediaData.HighLightPair>() {\n @Override\n public Boolean visit(MediaData.HighLightPair pair, Object param) {\n List<MediaData.HighLightData> highLightData = VEGapUtils.filterHighLightByScore(pair.getDatas());\n if(!Predicates.isEmpty(highLightData)){\n highLightMap.put(pair.getTime(), highLightData);\n }\n return null;\n }\n });\n }\n mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(int time){\n return mHighLightHelper.getHighLight(time);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLight(context, tt);\n }\n\n public List<KeyValuePair<Integer, List<IHighLightData>>> getHighLights(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLights(context, tt);\n }\n @SuppressWarnings(\"unchecked\")\n public HighLightArea getHighLightArea(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLightArea(context, tt);\n }\n\n public void setHighLightMap(SparseArray<List<? extends IHighLightData>> highLightMap) {\n this.highLightMap = highLightMap;\n this.mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n\n //-------------------------- end High-Light ----------------------------\n public SparseArray<VideoDataLoadUtils.FrameData> getFrameDataMap() {\n if(frameDataMap == null){\n frameDataMap = new SparseArray<>();\n }\n return frameDataMap;\n }\n public void setFrameDataMap(SparseArray<VideoDataLoadUtils.FrameData> frameDataMap) {\n this.frameDataMap = frameDataMap;\n }\n public void travelAllFrameDatas(Map.MapTravelCallback<Integer, VideoDataLoadUtils.FrameData> traveller){\n Throwables.checkNull(frameDataMap);\n CollectionUtils.travel(frameDataMap, traveller);\n }\n\n public List<Integer> getNounTags() {\n return nounTags != null ? nounTags : Collections.emptyList();\n }\n public void setNounTags(List<Integer> nounTags) {\n this.nounTags = nounTags;\n }\n\n public List<Integer> getDomainTags() {\n return domainTags != null ? domainTags : Collections.emptyList();\n }\n public void setDomainTags(List<Integer> domainTags) {\n this.domainTags = domainTags;\n }\n\n public List<Integer> getAdjTags() {\n return adjTags != null ? adjTags : Collections.emptyList();\n }\n public void setAdjTags(List<Integer> adjTags) {\n this.adjTags = adjTags;\n }\n public void setShotCategory(int shotCategory) {\n this.shotCategory = shotCategory;\n }\n\n public int getShotCategory() {\n return shotCategory;\n }\n public String getShotKey() {\n return shotKey;\n }\n public void setShotKey(String shotKey) {\n this.shotKey = shotKey;\n }\n\n public int getMainFaceCount() {\n return mainFaceCount;\n }\n public void setMainFaceCount(int mainFaceCount) {\n this.mainFaceCount = mainFaceCount;\n }\n public int getMediaType() {\n return mediaType;\n }\n public void setMediaType(int mediaType) {\n this.mediaType = mediaType;\n }\n\n public String getPath() {\n return path;\n }\n\n public void setPath(String path) {\n this.path = path;\n }\n\n /** date in mills */\n public long getDate() {\n return date;\n }\n /** date in mills */\n public void setDate(long date) {\n this.date = date;\n }\n\n public long getDuration() {\n return duration;\n }\n\n /** set duration in mill-seconds */\n public void setDuration(long duration) {\n this.duration = duration;\n }\n\n public int getWidth() {\n return width;\n }\n\n public void setWidth(int width) {\n this.width = width;\n }\n\n public int getHeight() {\n return height;\n }\n\n public void setHeight(int height) {\n this.height = height;\n }\n\n public int getFps() {\n return fps;\n }\n\n public void setFps(int fps) {\n this.fps = fps;\n }\n\n public String getShotType() {\n return shotType;\n }\n\n public void setShotType(String shotType) {\n this.shotType = shotType;\n }\n\n public String getCameraMotion() {\n return cameraMotion;\n }\n\n public void setCameraMotion(String cameraMotion) {\n this.cameraMotion = cameraMotion;\n }\n\n public List<List<Integer>> getTags() {\n return tags;\n }\n public void setTags(List<List<Integer>> tags) {\n this.tags = tags;\n }\n public LocationMeta getLocation() {\n return location;\n }\n public void setLocation(LocationMeta location) {\n this.location = location;\n }\n public void setBodyCount(int size) {\n this.mBodyCount = size;\n }\n public int getBodyCount(){\n return mBodyCount;\n }\n public int getPersonCount() {\n return Math.max(mBodyCount, mainFaceCount);\n }\n\n public Location getSubjectLocation() {\n return subjectLocation;\n }\n public void setSubjectLocation(Location subjectLocation) {\n this.subjectLocation = subjectLocation;\n }\n\n //============================================================\n public List<FrameFaceRects> getAllFaceRects() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }else{\n //no face we just add a mock\n }\n }\n return result;\n }\n public List<FrameTags> getVideoTags(ITimeTraveller part) {\n return getVideoTags(part.getStartTime(), part.getEndTime());\n }\n\n /** get all video tags. startTime and endTime in frames */\n public List<FrameTags> getVideoTags(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n }\n return result;\n }\n public List<FrameTags> getAllVideoTags() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n //long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n return result;\n }\n public List<FrameFaceRects> getFaceRects(ITimeTraveller part) {\n return getFaceRects(part.getStartTime(), part.getEndTime());\n }\n /** get all face rects. startTime and endTime in frames */\n public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }\n\n public void setRawVideoTags(List<FrameTags> tags) {\n rawVideoTags = tags;\n }\n public List<FrameTags> getRawVideoTags() {\n return rawVideoTags;\n }\n\n public List<FrameFaceRects> getRawFaceRects() {\n return rawFaceRects;\n }\n public void setRawFaceRects(List<FrameFaceRects> rawFaceRects) {\n this.rawFaceRects = rawFaceRects;\n }\n /** 判断这段原始视频内容是否是“人脸为主”. work before cut */\n public boolean containsFaces(){\n if(rawFaceRects == null){\n if(frameDataMap == null){\n return false;\n }\n rawFaceRects = getAllFaceRects();\n }\n if(Predicates.isEmpty(rawFaceRects)){\n return false;\n }\n List<FrameFaceRects> tempList = new ArrayList<>();\n VisitServices.from(rawFaceRects).visitForQueryList((ffr, param) -> ffr.hasRect(), tempList);\n float result = tempList.size() * 1f / rawFaceRects.size();\n Logger.d(\"ImageMeta\", \"isHumanContent\", \"human.percent = \"\n + result + \" ,path = \" + path);\n return result > 0.55f;\n }\n\n /** 判断这段原始视频是否被标记原始tag(人脸 or 通用) . work before cut */\n public boolean hasRawTags(){\n return frameDataMap != null && frameDataMap.size() > 0;\n }\n\n @Override\n public void setFrom(SimpleCopyDelegate sc) {\n if(sc instanceof ImageMeta){\n ImageMeta src = (ImageMeta) sc;\n setShotType(src.getShotType());\n setShotCategory(src.getShotCategory());\n setShotKey(src.getShotKey());\n\n setMainFaceCount(src.getMainFaceCount());\n setDuration(src.getDuration());\n setMediaType(src.getMediaType());\n setPath(src.getPath());\n setCameraMotion(src.getCameraMotion());\n setDate(src.getDate());\n setFps(src.getFps());\n setHeight(src.getHeight());\n setWidth(src.getWidth());\n //not deep copy\n setTags(src.tags);\n setAdjTags(src.adjTags);\n setNounTags(src.nounTags);\n setDomainTags(src.domainTags);\n\n setLocation(src.getLocation());\n setRawFaceRects(src.getRawFaceRects());\n setRawVideoTags(src.getRawVideoTags());\n setFrameDataMap(src.frameDataMap);\n setHighLightMap(src.highLightMap);\n }\n }\n }\n\n}", "public interface RobotMap {\n\n /* COMPETITION BOT */\n\n // CAN Talon SRX\n int LEFT_TALON = 7;\n int RIGHT_TALON = 9;\n int LIFT_TALON = 8;\n int CLIMB_TALON = 10;\n\n // CAN Victor SPX\n int LEFT_DRIVE_VICTOR = 1;\n int RIGHT_DRIVE_VICTOR = 3;\n\n // Victor SP PWM ports\n int INTAKE_VICTOR = 0;\n int CLIMB_VICTOR = 1;\n\n // Double Solenoid PCM IDs\n int FORWARD_CHANNEL = 6;\n int REVERSE_CHANNEL = 7;\n\n // Digital Input ports\n int HALL_SENSOR = 0;\n int LIMIT_SWITCH = 1;\n\n // Pneumatics Control Module CAN ID\n int PCM = 0;\n\n\n /* PRACTICE BOT */\n\n /*\n\n // CAN Talon SRX\n int LEFT_TALON = 6;\n int RIGHT_TALON = 1;\n int LIFT_TALON = 2;\n int CLIMB_TALON = 5;\n\n // CAN Victor SPX\n int LEFT_DRIVE_VICTOR = 6;\n int RIGHT_DRIVE_VICTOR = 2;\n\n // Victor SP PWM ports\n int INTAKE_VICTOR = 0;\n int CLIMB_VICTOR = 1;\n\n // Double Solenoid PCM IDs\n int FORWARD_CHANNEL = 6;\n int REVERSE_CHANNEL = 7;\n\n // Digital Input ports\n int HALL_SENSOR = 0;\n int LIMIT_SWITCH = 1;\n\n // Pneumatics Control Module CAN ID\n int PCM = 0;\n\n */\n\n}", "public void diagrafiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka sto farmakeio\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA FARMAKWN\");\n\t\t\t// Emfanizw ola ta famraka tou farmakeiou\n\t\t\tfor(int j = 0; j < numOfMedicine; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tmedicine[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU FARMAKOU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO FARMAKOU: \");\n\t\t\t}\n\t\t\t// Metakinw ta epomena farmaka mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfMedicine - 1; k++)\n\t\t\t{\n\t\t\t\tmedicine[k] = medicine[k+1]; // Metakinw to farmako sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfMedicine--; // Meiwse ton ari8mo twn farmakwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMA FARMAKA PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void mapIt(View v) {\n final StopData stop = (StopData) ((View) v.getParent()).getTag(R.layout.nearby_stop);\n Uri gmmIntentUri;\n Intent mapIntent = null;\n switch (v.getId()) {\n case R.id.nr_map:\n // Creates an Intent that will load a map of the stop\n gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + stop.stopLat + \",\" + stop.stopLong + \"(\" + stop.stopName + \")\");\n //geo:0,0?q=latitude,longitude(label)\n mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n break;\n case R.id.nr_directions:\n //Uri gmmIntentUri = Uri.parse(\"google.navigation:q=Taronga+Zoo,+Sydney+Australia&mode=b\");\n // Creates an Intent that will load a map of the stop\n gmmIntentUri = Uri.parse(\"google.navigation:q=\" + stop.stopLat + \",\" + stop.stopLong + \"&mode=w\");\n //geo:0,0?q=latitude,longitude(label)\n mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n break;\n }\n\n mapIntent.setPackage(\"com.google.android.apps.maps\");\n startActivity(mapIntent);\n }", "private String armarWhereStr(String ubigeo) {\n \n UtilidadesLog.info(\"DAOZON.armarWhereStr(String ubigeo): Entrada\");\n \n String[] ubigeoArray = new String[9];\n int resto = (ubigeo.length() % 6);\n\n if ((ubigeo.length() >= 6) && (ubigeo.length() <= 54) && (resto == 0) &&\n (ubigeo != null)) {\n int a = 0;\n\n for (int i = 0; i < ubigeo.length(); i++) {\n ubigeoArray[a] = ubigeo.substring(i, i + 6);\n i = i + 5;\n a = a + 1;\n }\n\n if (a < 9) {\n for (int i = a; i < 9; i++)\n ubigeoArray[i] = null;\n }\n\n StringBuffer query = new StringBuffer();\n String[] camposWhere = new String[] {\n \"orde_1\", \"orde_2\", \"orde_3\", \"orde_4\", \"orde_5\", \"orde_6\",\n \"orde_7\", \"orde_8\", \"orde_9\"\n };\n\n Object[] valoresWhere = new Object[] {\n ubigeoArray[0], ubigeoArray[1], ubigeoArray[2],\n ubigeoArray[3], ubigeoArray[4], ubigeoArray[5],\n ubigeoArray[6], ubigeoArray[7], ubigeoArray[8]\n };\n boolean[] operadores = new boolean[] {\n false, false, false, false, false, false, false, false,\n false\n };\n\n if (ubigeo.length() > 0) {\n /*\n * Armamos where de los campos not null\n */\n query.append(UtilidadesBD.armarSQLWhere(camposWhere,\n valoresWhere, operadores));\n\n /*\n * buscamos el primer orden !=nulo\n */\n for (int i = 0; i < valoresWhere.length; i++) {\n if (valoresWhere[i] == null) {\n query.append(\" and \" + camposWhere[i] + \" is null \");\n UtilidadesLog.debug(\"camposWhere[i] \" + i + \" \" +\n camposWhere[i] + \" valoresWhere \" +\n valoresWhere.toString());\n }\n }\n }\n UtilidadesLog.info(\"Salida : query.toString()\" + query.toString());\n UtilidadesLog.info(\"DAOZON.armarWhereStr(String ubigeo): Salida\");\n return query.toString();\n } //fin del if donde valida tamaño del ubigeo\n else {\n /*throw new MareException(new Exception(),\n UtilidadesError.armarCodigoError(ErroresDeNegocio.UBIGEO_NO_EXISTE_PARA_TERRITORIO));\n */\n UtilidadesLog.info(\"DAOZON.armarWhereStr(String ubigeo): Salida\");\n return null;\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n // Add a marker in Sydney and move the camera\n\n for( JSONObject jo : this.ubicaciones )\n {\n try{\n Log.i(\"ubicacion\",\n \" lat : \" + jo.get(\"lat\")\n + \" lon : \" + jo.get(\"lon\")\n + \" alt : \" + jo.get(\"alt\")\n );\n LatLng marca = new LatLng( jo.getDouble(\"lat\"), jo.getDouble(\"lon\") );\n\n mMap.addMarker(\n new MarkerOptions()\n .position(marca)\n .icon(\n BitmapDescriptorFactory\n .defaultMarker(BitmapDescriptorFactory.HUE_BLUE)\n )\n );\n// .title(\"Marker in Sydney\"));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(marca));\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "public static Map < String, Object > getStatistiche(String NomeDelCampo, List lista) {\r\n Map < String, Object > mappa = new HashMap < > ();\r\n mappa.put(\"campo\", NomeDelCampo);\r\n if (NomeDelCampo.contains(\"20\") || (NomeDelCampo.contains(\"19\"))) {\r\n\r\n mappa.put(\"deviazionestandard\", deviazionestandard(lista));\r\n mappa.put(\"media\", media(lista));\r\n mappa.put(\"minimo\", minimo(lista));\r\n mappa.put(\"massimo\", massimo(lista));\r\n mappa.put(\"somma\", somma(lista));\r\n\r\n return mappa;\r\n } else { \r\n mappa.put(\"numeroelementi\", numeroelementi(lista));\r\n mappa.put(\"elementiunici\", conteggioElementiUnici(lista));\r\n\r\n return mappa;\r\n }\r\n }", "public void m6939a(RouteDTO routeDTO) {\n if (routeDTO != null) {\n this.f5676b.setText(routeDTO.getName());\n double totalDistance = routeDTO.getTotalDistance() / 1000.0d;\n CharSequence charSequence = \"km\";\n if (!C1849a.b(getContext())) {\n totalDistance = C1849a.a(totalDistance);\n charSequence = \"mi\";\n }\n this.f5678d.setText(String.format(\"%.0f\", new Object[]{Double.valueOf(totalDistance)}));\n this.f5679e.setText(charSequence);\n ImageCache a = C2790a.a();\n Object mapURL = routeDTO.getMapURL();\n if (TextUtils.isEmpty(mapURL)) {\n this.f5677c.setScaleType(ScaleType.CENTER);\n this.f5681g.setVisibility(0);\n } else {\n this.f5677c.setImageUrl(mapURL, new RoutesSelfFrag$b$1(this, this.f5675a.getRequestQueueFactory().b(this.f5675a.getActivity()), a));\n }\n if (routeDTO.isUse()) {\n this.f5680f.setText(C1373R.string.route_self_activity_used);\n this.f5680f.setTextColor(this.f5675a.getResources().getColor(C1373R.color.route_self_used));\n this.f5680f.setBackgroundResource(C1373R.drawable.route_map_used_bg);\n return;\n }\n this.f5680f.setText(C1373R.string.route_self_activity_use);\n this.f5680f.setTextColor(this.f5675a.getResources().getColor(C1373R.color.route_self_use));\n this.f5680f.setBackgroundResource(C1373R.drawable.route_map_use_bg);\n this.f5680f.setOnClickListener(new RoutesSelfFrag$b$2(this, routeDTO));\n }\n }", "private void addMakerToMap() {\n if (mapboxMap != null) {\r\n mapboxMap.removeAnnotations();\r\n if (res.getData().size() > 0) {\r\n for (UserBasicInfo info : res.getData()) {\r\n if (info.getRole().equalsIgnoreCase(\"student\")) {\r\n if (isStudentSwitchOn) {\r\n setMarker(info);\r\n }\r\n }\r\n if (info.getRole().equalsIgnoreCase(\"teacher\")) {\r\n if (isTeacherSwitchOn) {\r\n setMarker(info);\r\n }\r\n }\r\n }\r\n } else {\r\n getMvpView().noRecordFound();\r\n }\r\n }\r\n }", "private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\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}", "public void act() \n {\n World myWorld = getWorld();\n \n Mapa mapa = (Mapa)myWorld;\n \n EnergiaMedicZ vidaMZ = mapa.getEnergiaMedicZ();\n \n EnergiaGuerriZ vidaGZ = mapa.getEnergiaGuerriZ();\n \n EnergiaConstrucZ vidaCZ = mapa.getEnergiaConstrucZ();\n \n GasZerg gasZ = mapa.getGasZerg();\n \n CristalZerg cristalZ = mapa.getCristalZerg();\n \n BunkerZerg bunkerZ = mapa.getBunkerZerg();\n \n Mina1 mina1 = mapa.getMina1();\n Mina2 mina2 = mapa.getMina2();\n Mina3 mina3 = mapa.getMina3();\n \n \n //movimiento del personaje\n if(Greenfoot.isKeyDown(\"b\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }\n }\n else if(Greenfoot.isKeyDown(\"z\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }}\n //encuentro con objeto\n \n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"s\"))\n {\n setLocation(getX(),getY()-1);\n }\n \n \n //probabilida de daño al enemigo\n \n if(isTouching(MedicTerran.class) && Greenfoot.getRandomNumber(100)==3)\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n if(isTouching(ConstructorTerran.class) && (Greenfoot.getRandomNumber(100)==3 ||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n if(isTouching(GuerreroTerran.class) && (Greenfoot.getRandomNumber(100)==3||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1||Greenfoot.getRandomNumber(100)==4||Greenfoot.getRandomNumber(100)==5))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n \n \n //encuentro con Bunker\n \n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"s\"))\n \n {\n setLocation(getX(),getY()-1);\n }\n \n //AccionesUnicas\n \n if(isTouching(YacimientoDeGas.class) && gasZ.gasZ < 100)\n {\n \n gasZ.addGasZ();\n \n }\n \n \n if(isTouching(Mina1.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina1.removemina1();\n \n }\n \n if(isTouching(Mina2.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina2.removemina2();\n \n }\n \n if(isTouching(Mina3.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina3.removemina3();\n \n }\n \n \n if(isTouching(DepositoZ.class) && gasZ.gasZ > 4 && bunkerZ.bunkerZ() < 400){\n \n gasZ.removeGasZ();\n bunkerZ.addbunkerZ();\n }\n \n if(isTouching(DepositoZ.class) && cristalZ.cristalZ() > 0 && bunkerZ.bunkerZ() < 400 ){\n \n cristalZ.removeCristalZ();\n bunkerZ.addbunkerZ();\n }\n \n //determinar si la vida llega a 0\n \n if( vidaCZ.vidaCZ <= 0 )\n {\n \n getWorld().removeObjects(getWorld().getObjects(EnergiaConstrucZ.class)); \n \n getWorld().removeObjects(getWorld().getObjects(ConstructorZerg.class));\n \n EnergiaZerg energiaZ = mapa.getEnergiaZerg(); \n \n energiaZ.removenergiaCZ();\n }\n \n if( mina1.mina1() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina1.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal1.class));\n \n }\n \n if( mina2.mina2() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina2.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal2.class));\n \n }\n \n if( mina3.mina3() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina3.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal3.class));\n \n }\n \n \n}", "public interface Mobile\n{\n // Formatting constants\n public final static double WIRE = 100;\n public final static double UNIT = 10;\n public final static double GAP = 2;\n public final static double TOP = 10;\n public final static int WIDTH = 1200;\n public final static int HEIGHT = 800;\n\n /**\n * Draws this Mobile on g, beginning at point (x,y).\n */\n public void display (Graphics2D g, double x, double y);\n\n /**\n * Returns the total weight of all the Bobs in this Mobile.\n */\n public int weight ();\n\n /**\n * Reports whether all the Rods in this Mobile are completely horizontal. A Rod will be horizontal if the product of\n * its left length and the weight of its left Mobile equals the product of its right length and the weight of its\n * right Mobile.\n */\n public boolean isBalanced ();\n\n /**\n * Returns the length of the longest path through this Mobile. There is one path for every Bob in the Mobile. Each\n * path leads from the top of the Mobile to a Bob, and its length is the number of Rods encountered along the way\n * plus one.\n */\n public int depth ();\n\n /**\n * Returns the number of Bobs contained in this Mobile.\n */\n public int bobCount ();\n\n /**\n * Returns the number of Rods contained in this Mobile.\n */\n public int rodCount ();\n\n /**\n * Returns the length of the longest Rod contained in this Mobile. If there are no Rods, returns zero.\n */\n public int longestRod ();\n\n /**\n * Returns the weight of the heaviest Bob contained in this Mobile.\n */\n public int heaviestBob ();\n}", "public void ektypwsiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"INFO FOR MEDICINE No.\" + (i+1) + \":\");\n\t\t\t\tmedicine[i].print();\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMA FARMAKA PROS EMFANISH!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void eisagwgiFarmakou() {\n\t\t// Elegxw o arithmos twn farmakwn na mhn ypervei ton megisto dynato\n\t\tif(numOfMedicine < 100)\n\t\t{\n\t\t\tSystem.out.println();\t\n\t\t\tmedicine[numOfMedicine] = new Farmako();\t\n\t\t\tmedicine[numOfMedicine].setCode(rnd.nextInt(1000000)); // To sistima dinei automata ton kwdiko tou farmakou\n\t\t\tmedicine[numOfMedicine].setName(sir.readString(\"DWSTE TO ONOMA TOU FARMAKOU: \")); // Zitaw apo ton xristi na mou dwsei to onoma tou farmakou\n\t\t\tmedicine[numOfMedicine].setPrice(sir.readPositiveFloat(\"DWSTE THN TIMH TOU FARMAKOU: \")); // Pairnw apo ton xristi tin timi tou farmakou\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos monadikotitas tou kwdikou tou farmakou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tif(medicine[i].getCode() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(10);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfMedicine++;\n\t\t}\n\t\t// An xeperastei o megistos arithmos farmakwn\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLA FARMAKA!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "private void loadAllAvailableDriver(final LatLng location) {\n\n mMap.clear();\n mUserMarker = mMap.addMarker(new MarkerOptions()\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker))\n .position(location)\n .title(\"Your Location\"));\n //move camera to this position\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(location, 15.0f));\n\n\n //Load all available drivers in 3 km distance\n DatabaseReference driverLocation = FirebaseDatabase.getInstance().getReference(Common.driver_tb1);\n GeoFire gf = new GeoFire(driverLocation);\n\n GeoQuery geoQuery = gf.queryAtLocation(new GeoLocation(location.latitude, location.longitude), distance);\n geoQuery.removeAllListeners();\n\n geoQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n @Override\n public void onKeyEntered(String key, final GeoLocation location) {\n //Using key to get email from table Users\n //Table users is table when drivers register account and update information\n FirebaseDatabase.getInstance().getReference(Common.user_driver_tb1)\n .child(key)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //because rider and user model is same properties\n //so we can use Rider model to get User here\n Rider rider = dataSnapshot.getValue(Rider.class);\n\n //Add driver to map\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(location.latitude, location.longitude))\n .flat(true)\n .snippet(\"Phone :\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.car)));\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n if (distance <= LIMIT) { //distance find upto 3 km\n distance++;\n loadAllAvailableDriver(location);\n\n }\n\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n }", "public final List<TimeKey> mo13029a(Map<String, ? extends Map<String, String>> map) {\n ArrayList arrayList = new ArrayList(map.size());\n for (Map.Entry next : map.entrySet()) {\n Map map2 = (Map) next.getValue();\n Object obj = map2.get(\"encrypted_mobile_id\");\n if (obj != null) {\n String str = (String) obj;\n Object obj2 = map2.get(\"fromDate\");\n if (obj2 != null) {\n long roundToLong = MathKt.roundToLong(((Double) obj2).doubleValue());\n Object obj3 = map2.get(\"tillDate\");\n if (obj3 != null) {\n arrayList.add(new TimeKey((String) next.getKey(), str, TimeKey.DEFAULT_NAME, roundToLong, MathKt.roundToLong(((Double) obj3).doubleValue()), 0, 32, (DefaultConstructorMarker) null));\n } else {\n throw new NullPointerException(\"null cannot be cast to non-null type kotlin.Double\");\n }\n } else {\n throw new NullPointerException(\"null cannot be cast to non-null type kotlin.Double\");\n }\n } else {\n throw new NullPointerException(\"null cannot be cast to non-null type kotlin.String\");\n }\n }\n return arrayList;\n }", "public byte getMobileItem(String mobile) throws Exception{\n if(mobile == null){\n throw new NullPointerException(\"mobile is null\");\n }\n if(mobile.length() <= key_length){\n throw new Exception(\"mobile length is too short\");\n }\n String key = mobile.substring(0,key_length);\n String m = mobile.substring(key_length);\n SimpleQueryEntity qe = map.get(key);\n if(qe == null){\n return 0;\n }\n int index = 0;\n try{\n index = Integer.parseInt(m);\n }catch(NumberFormatException e){\n throw new Exception(\"mobile is not number\");\n }\n return qe.getTheItemData(index);\n }", "private void cargarRegistroMedicamentos() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/registro_medicamentos.zul\", \"REGISTRO DE MEDICAMENTOS\",\r\n\t\t\t\tparametros);\r\n\t}", "private void gerarLaudosProcedimentosMateriais(\r\n\t\t\tMpmPrescricaoMedica prescricao, List<MpmLaudo> laudoList) throws ApplicationBusinessException {\r\n\r\n\t\tMap<MpmPrescricaoProcedimento, FatProcedHospInternos> procedimentosMap = this\r\n\t\t\t\t.getConfirmarPrescricaoMedicaRN()\r\n\t\t\t\t.listarProcedimentosGeracaoLaudos(prescricao);\r\n\r\n\t\tMpmLaudo laudo = null;\r\n\r\n\t\tfor (MpmPrescricaoProcedimento procedimento : procedimentosMap.keySet()) {\r\n\t\t\tlaudo = new MpmLaudo();\r\n\t\t\tlaudo.setDthrInicioValidade(prescricao.getDthrInicio());\r\n\r\n\t\t\tDate dataFimValidade = prescricao.getDthrInicio();\r\n\t\t\tif (procedimento.getDuracaoTratamentoSolicitado() != null) {\r\n\t\t\t\tdataFimValidade = DateUtil.adicionaDias(dataFimValidade,\r\n\t\t\t\t\t\tprocedimento.getDuracaoTratamentoSolicitado()\r\n\t\t\t\t\t\t\t\t.intValue() - 1);\r\n\t\t\t}\r\n\t\t\tlaudo.setDthrFimValidade(dataFimValidade);\r\n\t\t\tlaudo.setDthrFimPrevisao(dataFimValidade);\r\n\r\n\t\t\tlaudo.setJustificativa(procedimento.getJustificativa());\r\n\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\tlaudo.setImpresso(false);\r\n\t\t\tlaudo.setDuracaoTratSolicitado(procedimento\r\n\t\t\t\t\t.getDuracaoTratamentoSolicitado());\r\n\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\tlaudo.setPrescricaoProcedimento(procedimento);\r\n\t\t\tlaudo.setProcedimentoHospitalarInterno(procedimentosMap\r\n\t\t\t\t\t.get(procedimento));\r\n\r\n\t\t\tthis.adicionarLaudoLista(laudoList, laudo);\r\n\r\n\t\t}\r\n\r\n\t}", "private void agregarMarcador(double lat, double lon, Meteo maMeteo) {\n if(mMap != null){\n if(marker != null){\n marker.setPosition(new LatLng(lat, lon));\n marker.setTag(maMeteo);\n }else{\n marker = mMap.addMarker(new MarkerOptions().position(new LatLng(lat,lon)));\n marker.setTag(maMeteo);\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(lat, lon)));\n }\n }", "List<MobilePhone> getMobilePhonesFromOwner(Owner owner);", "public List<Map<String, Object>> Listar_Cumplea˝os(String mes,\r\n String dia, String aps, String dep, String are,\r\n String sec, String pue, String fec, String edad,\r\n String ape, String mat, String nom, String tip, String num) {\r\n sql = \"SELECT * FROM RHVD_FILTRO_CUMPL_TRAB \";\r\n sql += (!aps.equals(\"\")) ? \"Where UPPER(CO_APS)='\" + aps.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!dep.equals(\"\")) ? \"Where UPPER(DEPARTAMENTO)='\" + dep.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!are.equals(\"\")) ? \"Where UPPER(AREA)='\" + are.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!sec.equals(\"\")) ? \"Where UPPER(SECCION)='\" + sec.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!pue.equals(\"\")) ? \"Where UPPER(PUESTO)='\" + pue.trim().toUpperCase() + \"'\" : \"\";\r\n //sql += (!fec.equals(\"\")) ? \"Where FECHA_NAC='\" + fec.trim() + \"'\" : \"\"; \r\n sql += (!edad.equals(\"\")) ? \"Where EDAD='\" + edad.trim() + \"'\" : \"\";\r\n sql += (!ape.equals(\"\")) ? \"Where UPPER(AP_PATERNO)='\" + ape.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!mat.equals(\"\")) ? \"Where UPPER(AP_MATERNO)='\" + mat.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!nom.equals(\"\")) ? \"Where UPPER(NO_TRABAJADOR)='\" + nom.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!tip.equals(\"\")) ? \"Where UPPER(TIPO)='\" + tip.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!num.equals(\"\")) ? \"Where NU_DOC='\" + num.trim() + \"'\" : \"\";\r\n //buscar por rango de mes de cumplea├▒os*/\r\n\r\n sql += (!mes.equals(\"\") & !mes.equals(\"13\")) ? \"where mes='\" + mes.trim() + \"' \" : \"\";\r\n sql += (!mes.equals(\"\") & mes.equals(\"13\")) ? \"\" : \"\";\r\n sql += (!dia.equals(\"\")) ? \"and dia='\" + dia.trim() + \"'\" : \"\";\r\n return jt.queryForList(sql);\r\n }", "private boolean buscarUnidadMedida(String valor) {\n\t\ttry {\n\t\t\tlistUnidadMedida = unidadMedidaI.getAll(Unidadmedida.class);\n\t\t} catch (Exception e) {\n\t\n\t\t}\n\n\t\tboolean resultado = false;\n\t\tfor (Unidadmedida tipo : listUnidadMedida) {\n\t\t\tif (tipo.getMedidaUm().equals(valor)) {\n\t\t\t\tresultado = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tresultado = false;\n\t\t\t}\n\t\t}\n\n\t\treturn resultado;\n\t}", "private void dibujarArregloCamionetas() {\n\n timerCrearEnemigo += Gdx.graphics.getDeltaTime();\n if (timerCrearEnemigo>=TIEMPO_CREA_ENEMIGO) {\n timerCrearEnemigo = 0;\n TIEMPO_CREA_ENEMIGO = tiempoBase + MathUtils.random()*2;\n if (tiempoBase>0) {\n tiempoBase -= 0.01f;\n }\n\n camioneta= new Camioneta(texturaCamioneta,ANCHO,60f);\n arrEnemigosCamioneta.add(camioneta);\n\n\n }\n\n //Si el vehiculo se paso de la pantalla, lo borra\n for (int i = arrEnemigosCamioneta.size-1; i >= 0; i--) {\n Camioneta camioneta1 = arrEnemigosCamioneta.get(i);\n if (camioneta1.sprite.getX() < 0- camioneta1.sprite.getWidth()) {\n arrEnemigosCamioneta.removeIndex(i);\n\n }\n }\n }", "private void init_fields(String subor, Maps map) throws FileNotFoundException{ //inicializacia vsetkych zoznamov -> hlavne tych z triedy Maps\n map.setCars(new ArrayList<>());\n map.setStations(new ArrayList<>());\n Free_time_window free[][] = map.getFree_windows();\n Reserved_time_window reserved[][] = map.getReserved_windows();\n Road[][] road_matrix = map.getRoads();\n ArrayList<Car>cars;\n \n fr = new FileReader(subor); //nabijem do File Readera moj subor\n br = new BufferedReader(fr); //a budem ho citat\n \n cars = new ArrayList<>();\n \n for(int i= 0;i< max_NO_of_stations; i++){\n for(int j = 0;j< max_NO_of_stations; j++){\n if(i==j){ \n road_matrix[i][j] = new Road(0,-1,-1,-1);\n }\n else{\n road_matrix[i][j] = new Road(-1,-1,-1,-1);\n }\n }\n }\n \n for(int i= 0;i< max_NO_of_stations; i++){\n for(int j = 0;j< max_NO_of_windows; j++){\n free[i][j] = new Free_time_window(-1,-1,-1, -1);\n \n reserved[i][j] = new Reserved_time_window(-1,-1, new Car(-1));\n }\n }\n \n map.setFree_windows(free);\n map.setReserved_windows(reserved);\n map.setRoads(road_matrix);\n map.setCars(cars);\n }", "@Override\n\tpublic boolean on(GetMapObjectsEvent t) {\n\t\t\n\t\tPlayer player = t.getPlayer();\n\t\tS2LatLng pos = player.s2LatLngPos();\n\t\tWorld world = t.getGame().getWorld();\n\t\tGameSettings settings = t.getGame().getSettings();\n\t\tlong ts = System.currentTimeMillis();\n\t\tFunction<UniqueLocatable, MapObjectInfo> f = u -> getMapObjectInfo(u, settings, ts, player, pos);\n\t\t\n\t\tfor(int i=0;i<t.size();i++){\n\t\t\tWorldCell cell = world.getCell(t.cellIds[i]);\n\t\t\tif(cell == null)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// Don't let them scan cells too far away\n\t\t\t// TODO: Make the limit configurable!\n\t\t\tif(cell.distanceTo(pos) > 1000)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tt.cells[i] = new CellInfo(ts, Iterators.filter(Iterators.transform(cell.objects().iterator(), f), e -> e != null));\n\t\t}\n\t\t\n\t\tt.status = MapObjectsStatus.SUCCESS;\n\t\treturn true;\n\t}", "public List<ApercuMobile> DecoderXMLApercuMobile() {\n\t\tJournalDesactivable.ecrire(\"decoderListe()\");\n\t\tList<ApercuMobile> listeApercuMobile = new ArrayList<ApercuMobile>();\n\n\t\ttry \n\t\t{\n\t\t\tDocumentBuilder parseur = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\tDocument document = parseur.parse(new StringBufferInputStream(this.xml)); //mettre à la place du fichier xml\n\t\t\tString racine = document.getDocumentElement().getNodeName();\n\t\t\tJournal.ecrire(3, \"Racine=\" + racine);\n\t\t\t\t\t\n\t\t\tNodeList listeNoeudsApercuMobile = document.getElementsByTagName(\"apercu\");\n\t\t\tfor(int position = 0; position < listeNoeudsApercuMobile.getLength(); position++)\n\t\t\t{\n\t\t\t\tElement noeudApercuMobile = (Element)listeNoeudsApercuMobile.item(position);\n\t\t\t\tString mesureActuelle = noeudApercuMobile.getElementsByTagName(\"mesureactuelle\").item(0).getTextContent();\n\t\t\t\tString moyJour = noeudApercuMobile.getElementsByTagName(\"journee\").item(0).getTextContent();\n\t\t\t\tString moyAnnee = noeudApercuMobile.getElementsByTagName(\"annee\").item(0).getTextContent();\n\n\t\t\t\tJournal.ecrire(3,\"Mesure actuelle : \" + mesureActuelle);\n\t\t\t\tJournal.ecrire(3,\"moyenne du jour : \" + moyJour);\n\t\t\t\tJournal.ecrire(3,\"Moyenne de l'année : \" + moyAnnee);\n\t\t\t\tApercuMobile apercuMobile = new ApercuMobile(mesureActuelle,moyJour,moyAnnee);\n\t\t\t\tlisteApercuMobile.add(apercuMobile);\n\t\t\t}\n\t\t} \n\t\tcatch (ParserConfigurationException e) \n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\treturn listeApercuMobile;\n\t}", "public Guardia buscarMedico(int dpi){\r\n Guardia med = new Guardia();\r\n\t\tfor (int i = 0;i<medicosenfermeras.size();i++) {\r\n med = medicosenfermeras.get(i);\r\n if((dpi == med.getDpi())&&(med instanceof Medico)){\r\n\t\t\treturn med; \r\n }\r\n\t\t}\r\n return med; \r\n\t}", "@Override\n public List<Person> listByMobile(String mobile) {\n List<Person> test33 = personRepository.query(\"%43%\", \"name%\");\n System.out.println(test33.size());\n return test33;\n }", "private void moveMonsters() {\r\n\t\tfor (AreaOrMonster obj : areas) {\r\n\t\t\tif(obj.getLeftRight()) {\r\n\t\t\t\tif(!pirate1.currentLocation.equals(new Point(obj.getX()+1, obj.getY())) && !pirate2.currentLocation.equals(new Point(obj.getX()+1, obj.getY()))) {\r\n\t\t\t\t\tobj.move();\r\n\t\t\t\t\tobj.getImageView().setX(obj.getX() * scalingFactor);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(!pirate1.currentLocation.equals(new Point(obj.getX()-1, obj.getY())) && !pirate2.currentLocation.equals(new Point(obj.getX()-1, obj.getY()))) {\r\n\t\t\t\t\tobj.move();\r\n\t\t\t\t\tobj.getImageView().setX(obj.getX() * scalingFactor);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void agregarMarcador(double lat, double lon) {\n LatLng coord = new LatLng(lat, lon);\n CameraUpdate miUbi = CameraUpdateFactory.newLatLngZoom(coord, 16);\n if (mPrueba != null) mPrueba.remove();\n mPrueba = mMap.addMarker(new MarkerOptions()\n .position(coord)\n .title(\"Reporte\")\n .snippet(\"Reportar\"));\n mPrueba.setDraggable(true);\n mPrueba.setTag(0);\n mMap.animateCamera(miUbi);\n }", "@Override\n public void onStyleLoaded(@NonNull Style style) {\n\n\n marcador(style);\n rutaOptimizadaLinea(style);\n\n\n\n CameraPosition position = new CameraPosition.Builder()\n .target(new LatLng(origin.latitude(), origin.longitude()))\n .zoom(10)\n .tilt(13)\n .build();\n mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(position));\n\n\n\n //Toast.makeText(Mapboxnavigation.this, R.string.click_instructions, Toast.LENGTH_SHORT).show();\n //mapboxMap.addOnMapClickListener(Mapboxnavigation.this);\n //mapboxMap.addOnMapLongClickListener(Mapboxnavigation.this);\n localizacion(style);\n double a=-3.00;\n // Toast.makeText(getApplicationContext(), \"\"+a, Toast.LENGTH_SHORT).show();\n for(int i=0;i<lista.size();i++){\n generarLugares(lista.get(i));\n }\n\n\n /*p(destino);\n p(intermedi3);\n p(cinco);\n p(intermedi4);*/\n\n\n }", "public void getWalls() {\n\t\tRandomMapGenerator rmg = new RandomMapGenerator();\n\n\t\tboolean[][] cm = rmg.cellmap;\n\n\t\tfor (int x = 0; x < rmg.width; x++) {\n\t\t\tfor (int y = 0; y < rmg.height; y++) {\n\t\t\t\tif (cm[x][y]) {\n\t\t\t\t\twallArray.add(new Wall(x * 12, y * 12, mode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static Vector<MobileObject> parseMobileObjectList( String filename, MobilityMap map ) throws FileNotFoundException\r\n {\r\n File f = new File( filename );\r\n return parseMobileObjectList( f, map );\r\n }", "private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n // Cambia el movimiento de los Ufos\n if (cambiaUfos) {\n for (Ufo ufo : ufos) {\n ufo.cambiaMoverUfo();\n }\n cambiaUfos = false;\n }\n\n // Mueve los disparos y los elimina los disparos de la nave Guardian\n if (disparoGuardian.getVisible()) {\n disparoGuardian.moverArriba();\n if (disparoGuardian.getPosicionY() <= 0) {\n disparoGuardian.setVisible(false);\n }\n }\n\n // Dispara, mueve y elimina los disparos de las naves Ufo\n disparaUfo();\n if (disparoUfo.getVisible()) {\n disparoUfo.moverAbajo();\n if (disparoUfo.getPosicionY() >= altoVentana) {\n disparoUfo.setVisible(false);\n }\n }\n\n // Mueve la nave Guardian hacia la izquierda\n if (moverIzquierda) {\n guardian.moverIzquierda();\n }\n // Mueve la nave Guardian hacia la derecha\n if (moverDerecha) {\n guardian.moverDerecha();\n }\n // Hace que la nave Guardian dispare\n if (disparar) {\n disparaGuardian();\n }\n }", "public void ImprimirMapa(){\n\t\tfor(int i=0;i<12;i++){\n\t\t\tfor(int j=0;j<16;j++){\n\t\t\t\tSystem.out.print(mapa[i][j].getCaracter());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "private void actionRoute(final GoogleMap googleMap){\n mMap = googleMap;\n PengajianApi pengajianApi = ServiceGenerator.getPengajianApi();\n Call<JadwalPengajianResponse> responseCall = pengajianApi.jadwalPengajian();\n responseCall.enqueue(new Callback<JadwalPengajianResponse>() {\n @Override\n public void onResponse(Call<JadwalPengajianResponse> call, Response<JadwalPengajianResponse> response) {\n if (response.isSuccessful()){\n// // tampung response ke variable\n\n int total= response.body().getMenuPengajians().size();\n\n for (int a=0;a<total;a++){\n Double model1 = Double.valueOf(response.body().getMenuPengajians().get(a).getLatitude());\n Double model2 = Double.valueOf(response.body().getMenuPengajians().get(a).getLongitude());\n MarkerOptions markerOptions = new MarkerOptions();\n LatLng latLng = new LatLng(model1,model2);\n markerOptions.position(latLng);\n Marker m = mMap.addMarker(markerOptions);\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n// menuPengajians.add(model);\n }\n// JadwalPengajianResponse item = new JadwalPengajianResponse(menuPengajians);\n// jadwalPengajianResponses.add(item);\n////\n\n////\n\n }\n\n }\n\n @Override\n public void onFailure(Call<JadwalPengajianResponse> call, Throwable t) {\n\n }\n });\n\n\n\n }", "public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}", "public void updateMhos() { \r\n\r\n\t\tfor (int i = 0; i < 12; i++) {\r\n\t\t\tif (Mhos[i].isAlive) {// Mho AI\r\n\t\t\t\t\r\n\t\t\t\tif (Mhos[i].x == p.x) // directly vertical\r\n\t\t\t\t\tif (Mhos[i].y > p.y) // move up\r\n\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\telse // move down\r\n\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\r\n\t\t\t\telse if (Mhos[i].y == p.y) { // directly horizontal\r\n\t\t\t\t\tif (Mhos[i].x > p.x) {\r\n\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint relPos = Mhos[i].relToPlayer(p.x, p.y);\r\n\t\t\t\t\tint horDist = Math.abs(Mhos[i].x - p.x);\r\n\t\t\t\t\tint verDist = Math.abs(Mhos[i].y - p.y);\r\n\r\n\t\t\t\t\tif (relPos == 1) { // top right\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\r\n\t\t\t\t\t} else if (relPos == 2) { // top left\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (relPos == 3) { // bottom left\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, -1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, -1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (relPos == 4) { // bottom right\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, -1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, -1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "private void updateMhoLocationList() {\n\n\t\t//clear all the mhos in mhoLocations\n\t\tmhoLocations.clear();\n\n\t\t//add the locations of all the mhos in mhoLocations\n\t\tfor (int i = 1; i < 11; i++)\n\t\t\tfor (int j = 1; j < 11; j++) \n\t\t\t\tif(newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmhoLocations.add(i);\n\t\t\t\t\tmhoLocations.add(j);\n\t\t\t\t}\n\t}", "private void m7632a() {\n Exception e;\n if (!this.f6418o) {\n this.f6406c.removeAnnotations();\n this.f6417n = true;\n Icon fromDrawable = IconFactory.getInstance(this).fromDrawable(getResources().getDrawable(C1373R.drawable.ic_grid_oval_icon));\n for (GridDTO latLng1 : this.f6414k) {\n this.f6415l.add((MarkerOptions) ((MarkerOptions) new MarkerOptions().icon(fromDrawable)).position(latLng1.getLatLng1()));\n }\n try {\n C2568n.a(this.f6406c, this.f6415l);\n } catch (ExecutionException e2) {\n e = e2;\n e.printStackTrace();\n } catch (InterruptedException e3) {\n e = e3;\n e.printStackTrace();\n }\n }\n }", "private static List<MobileElement> w(List<WebElement> elements) {\n List list = new ArrayList(elements.size());\n for (WebElement element : elements) {\n list.add(w(element));\n }\n\n return list;\n }", "private void startMapCreater() {\n\t\tNavigator navi = new Navigator(pilot);\n\t\tnavi.addWaypoint(0,0);\n\t\tnavi.addWaypoint(0,5000);\n\t\tBehavior forward = new Forward(navi);\n\t\tBehavior ultrasonic = new UltrasonicSensor(ultrasonicSensorAdaptor,pilot, sonicWheel,dis,dos,navi);\n\t\tBehavior stopEverything = new StopRobot(Button.ESCAPE);\n\t\tBehavior[] behaiverArray = {forward, ultrasonic, stopEverything};\n\t\tarb = new Arbitrator(behaiverArray);\n\t\t\n\t arb.go();\n\t\t\n\t}", "public static float kmToMiles(long steps){\n float miles;\n float distance = (float) (steps * 78) / (float) 100000;\n miles = (float) (distance / 1.609344);\n return miles;\n }", "@Override\n protected void onResume() {\n super.onResume();\n if (rad == 50000) {\n filterLocations(50000, mSelectedLat, mSelectedLng); //Filter to show locations in 50 km radi\n }\n }", "@Override\n\tpublic List<Map<String, Object>> ListaMarcas(int start, int estado, String search, int length) {\n\t\treturn marcadao.ListaMarca(start, estado, search, length);\n\t}", "private void pulsarItemMayus(){\n if (mayus) {\n mayus = false;\n texto_frases = texto_frases.toLowerCase();\n }\n else {\n mayus = true;\n texto_frases = texto_frases.toUpperCase();\n }\n fillList(false);\n }", "public void getMapView() {\n Bitmap bitmap = Bitmap.createBitmap(webView.getWidth(), webView.getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n //绘制\n webView.draw(canvas);\n // 获取内置SD卡路径\n String sdCardPath = Environment.getExternalStorageDirectory().getPath();\n // 图片文件路径\n Calendar calendar = Calendar.getInstance();\n String creatTime = calendar.get(Calendar.YEAR) + \"-\" +\n calendar.get(Calendar.MONTH) + \"-\"\n + calendar.get(Calendar.DAY_OF_MONTH) + \" \"\n + calendar.get(Calendar.HOUR_OF_DAY) + \":\"\n + calendar.get(Calendar.MINUTE) + \":\"\n + calendar.get(Calendar.SECOND);\n String filePath = sdCardPath + File.separator + \"shot_\" + creatTime + \".png\";\n if (bitmap != null) {\n try {\n File file = new File(filePath);\n if (file.exists()) {\n file.delete();\n }\n FileOutputStream os = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, os);\n os.flush();\n os.close();\n Log.d(\"webview\", \"存储完成\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public static void DeterminarArregloDeMisiles() {\n\t\tVectorDeMisilesCrucerosPorNivel[3] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[4] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[7] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[8] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[11] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[12] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[15] = true;\n\t\tVectorDeMisilesCrucerosPorNivel[16] = true;\n\t}", "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 }" ]
[ "0.55845475", "0.5527104", "0.54827225", "0.5326581", "0.52134573", "0.52122825", "0.51887906", "0.5183326", "0.5120956", "0.51206815", "0.50760365", "0.5075467", "0.5070761", "0.5046888", "0.5008615", "0.4968669", "0.49618438", "0.4953448", "0.49453345", "0.49443862", "0.49335957", "0.49296236", "0.49230126", "0.49095553", "0.4898167", "0.48881787", "0.4884122", "0.487937", "0.48725218", "0.48586136", "0.4855158", "0.48534334", "0.48519188", "0.48495632", "0.48366812", "0.48312905", "0.48251265", "0.48158786", "0.48056346", "0.48020557", "0.4799951", "0.47891238", "0.47819424", "0.47790056", "0.47753692", "0.4773009", "0.47690532", "0.47656846", "0.4760424", "0.4757134", "0.47542012", "0.47519735", "0.47383365", "0.47371703", "0.47369248", "0.47339654", "0.4729151", "0.47243646", "0.4721447", "0.47183356", "0.47168896", "0.4705989", "0.47032547", "0.46990085", "0.46972677", "0.4691876", "0.46884838", "0.4679782", "0.467649", "0.4658696", "0.46582258", "0.46510077", "0.4648622", "0.4643002", "0.46429494", "0.4642456", "0.46413606", "0.46404514", "0.46375638", "0.4636532", "0.46335003", "0.46305513", "0.4630182", "0.4628255", "0.46276966", "0.4625605", "0.46227518", "0.46221185", "0.46179992", "0.4615265", "0.4615066", "0.46109545", "0.46108884", "0.4605268", "0.46048558", "0.46025142", "0.4601011", "0.45950487", "0.45950487", "0.45950487", "0.45950487" ]
0.0
-1
This method populates the emissionMapTemp and transMapTemp instance variables from the selected files, taking in two corresponding sentences at a time (one is the words, one is the word types).
public void updateFrequency(String lineWord, String lineType) { String oldWordType = "start"; if (lineType != null && lineWord != null) { String[] wordTypes = lineType.split(" "); String[] words = lineWord.split(" "); int i = 0; for (String currentWordType: wordTypes) { //if not at first word of sentence if (oldWordType.equals("start")) { updateProbabilities(transMapTemp, oldWordType, currentWordType); } else { String word = words[i-1].toLowerCase(); // updateProbabilities(emissionMapTemp, oldWordType, word); updateProbabilities(transMapTemp, oldWordType, currentWordType); } i++; oldWordType = currentWordType; } updateProbabilities(emissionMapTemp, oldWordType, words[i-1]); oldWordType = ""; //signifies we are now at a new sentence/line } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }", "public void updateFinalMaps() {\r\n\t\t//prints out probMap for each tag ID and makes new map with ln(frequency/denominator) for each\r\n\t\t//wordType in transMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> tagIDsFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.transMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.transMapTemp.get(key);\r\n\t\t\ttagIDsFinal.put(key, this.transMapTemp.get(key).map);\r\n\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\t\t\t\ttagIDsFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\tSystem.out.println(key + \": \" + key2 + \" \" + tagIDsFinal.get(key).get(key2));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//makes new map with ln(frequency/denominator) for each word in emissionMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> emissionMapFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.emissionMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.emissionMapTemp.get(key);\r\n\t\t\temissionMapFinal.put(key, this.emissionMapTemp.get(key).map);\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\r\n\t\t\t\temissionMapFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.transMap = tagIDsFinal;\r\n\t\tthis.emissionMap = emissionMapFinal;\t\t\r\n\t}", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "public static void main(String arg[]) {\n \tFile wordListFile = new File(\"WordList.txt\");\r\n \tFile definitionsFile = new File (\"DefinitionsAndSentences.txt\"); \t\r\n \tFile outputFile = new File (\"debug.txt\"); \r\n \t\r\n \tInputStream inputStreamOne;\r\n \tInputStreamReader readerOne;\r\n \tBufferedReader binOne;\r\n \t\r\n \tInputStream inputStreamTwo;\r\n \tInputStreamReader readerTwo;\r\n \tBufferedReader binTwo;\r\n \t\r\n \tOutputStream outputStream;\r\n \tOutputStreamWriter writerTwo;\r\n \tBufferedWriter binThree;\r\n \t \t\r\n \t\r\n \t// Lists to store data to write to database\r\n \tArrayList<TermItem>databaseTermList = new ArrayList<TermItem>();\r\n \tArrayList<DefinitionItem>databaseDefinitionList = new ArrayList<DefinitionItem>();\r\n \tArrayList<SentenceItem>databaseSampleSentenceList = new ArrayList<SentenceItem>();\r\n \t\r\n \t// Create instance to use in main()\r\n \tDictionaryParserThree myInstance = new DictionaryParserThree();\r\n \t\r\n \tint totalTermCounter = 1;\r\n \tint totalDefinitionCounter = 1;\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tmyInstance.createDatabase();\r\n\t\t\t// Open streams for reading data from both files\r\n\t\t\tinputStreamOne = new FileInputStream(wordListFile);\r\n\t \treaderOne= new InputStreamReader(inputStreamOne);\r\n\t \tbinOne= new BufferedReader(readerOne);\r\n\t \t\r\n\t \tinputStreamTwo = new FileInputStream(definitionsFile);\r\n\t \treaderTwo= new InputStreamReader(inputStreamTwo);\r\n\t \tbinTwo= new BufferedReader(readerTwo);\r\n\t \t\r\n\t \toutputStream = new FileOutputStream(outputFile);\r\n\t \twriterTwo= new OutputStreamWriter(outputStream);\r\n\t \tbinThree= new BufferedWriter(writerTwo);\r\n\r\n\t \tString inputLineTwo;\r\n\t \tString termArray[] = new String[NUM_SEARCH_TERMS];\r\n\t \t\r\n\t \t// Populate string array with all definitions.\r\n\t \tfor (int i = 0; (inputLineTwo = binTwo.readLine()) != null; i++) {\r\n\t\t \t termArray[i] = inputLineTwo; \r\n\t \t}\t \t\r\n\t \t\r\n\t \t// Read each line from the input file (contains top gutenberg words to be used)\r\n\t \tString inputLineOne;\r\n\t \tint gutenbergCounter = 0;\r\n\t \twhile ((inputLineOne = binOne.readLine()) != null) {\r\n\t \t\t\r\n\t \t\t\r\n\t \t\t// Each line contains three or four words. Grab each word inside double brackets.\r\n\t\t \tString[] splitString = (inputLineOne.split(\"\\\\[\\\\[\")); \t\t \t\r\n\t \t\tfor (String stringSegment : splitString) {\r\n\t \t\t\t\r\n\t \t\t\tif (stringSegment.matches((\".*\\\\]\\\\].*\")))\r\n\t \t\t\t{\r\n\t \t\t\t\t// Increment counter to track Gutenberg rating (already from lowest to highest)\r\n\t \t\t\t\tgutenbergCounter++;\r\n\t \t \t\t\r\n\t \t\t\t\tboolean isCurrentTermSearchComplete = false;\r\n\t \t\t \tint lowerIndex = 0;\r\n\t \t\t \tint upperIndex = NUM_SEARCH_TERMS - 1;\r\n\t \t\t \t\r\n\t \t\t \tString searchTermOne = stringSegment.substring(0, stringSegment.indexOf(\"]]\"));\r\n\t \t\t \tsearchTermOne = searchTermOne.substring(0, 1).toUpperCase() + searchTermOne.substring(1);\r\n\t \t\t \t\r\n\t \t\t\t\twhile (!isCurrentTermSearchComplete) {\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// Go to halfway point of lowerIndex and upperIndex.\r\n\t \t\t\t\t\tString temp = termArray[(lowerIndex + upperIndex)/2];\r\n\t \t\t\t\t\tString currentTerm = temp.substring(temp.indexOf(\"<h1>\") + 4, temp.indexOf(\"</h1>\"));\r\n\t \t\t\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// If definition term is lexicographically lower, need to increase lower Index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If definition term is lexicographically higher, need decrease upper index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If a match is found, need to find first definition, and record each definition\r\n\t \t\t\t\t\t// in case of duplicates.\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\tif (currentTerm.compareTo(searchTermOne) < 0) {\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\tlowerIndex = (lowerIndex + upperIndex)/2;\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\telse if (currentTerm.compareTo(searchTermOne) > 0) {\r\n\t \t\t\t\t\t\tupperIndex = (lowerIndex + upperIndex)/2; \t\t\t\t\t\t\r\n\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\telse {\t\r\n\t \t\t\t\t\t\t// Backtrack row-by-row until we reach the first term in the set. Once we reach the beginning,\r\n\t \t\t\t\t\t\t// cycle through each match in the set and obtain each definition until we reach the an unmatching term.\r\n\r\n\t \t\t\t\t\t\t//else {\r\n\t \t\t\t\t\t\t\tSystem.out.println(searchTermOne);\r\n\t\t \t\t\t\t\t\tint k = (lowerIndex + upperIndex)/2;\r\n\t\t \t\t\t\t\t\tboolean shouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\tif (k <= 0 || k >= NUM_SEARCH_TERMS) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString previous = termArray[k - 1].substring(termArray[k - 1].indexOf(\"<h1>\") + 4, termArray[k - 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t \t\t\t\t\t\tif (current.compareTo(previous) == 0) {\t\t\t\r\n\t\t\t\t \t\t\t\t\t\t\tk--;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t\t \t\t\t\t\telse {\r\n\t\t\t\t\t \t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\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\tshouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\t\t \t\r\n\t\t \t\t\t\t\t\t\t// Used to store data to later pass to DB\r\n\t\t \t\t\t\t\t DictionaryParserThree.TermItem tempTermItem = myInstance.new TermItem();\r\n\r\n\t\t \t\t\t\t\t // Determine unique ID (which will be written to DB later)\r\n\t\t \t\t\t\t\t // Add current term and gutenberg rating.\r\n\t\t \t\t\t\t\t tempTermItem.ID = totalTermCounter;\t\t \t\t\t\t\t \t \t\t\t\t\t \r\n\t\t \t\t\t\t\t \ttempTermItem.theWord = searchTermOne; // same as termArray[k]'s term\r\n\t\t \t\t\t\t\t \r\n\t\t \t\t\t\t\t\t\ttempTermItem.gutenbergRating = gutenbergCounter;\r\n\t\t \t\t\t\t\t\t\tdatabaseTermList.add(tempTermItem);\r\n\t\t \t\t\t\t\t\t\tbinThree.write(\"Term ID \" + tempTermItem.ID + \" \" + tempTermItem.theWord + \" guten rank is \" + tempTermItem.gutenbergRating);\r\n\t\t \t\t\t\t\t\t\tbinThree.newLine();\t\t\t\t\t\t\t\r\n\t\t \t\t\t\t \t\tsplitString = termArray[k].split(\"<def>\");\r\n\t\t \t\t\t\t \t\t\r\n\t\t \t\t\t\t \t\tint m = 0;\r\n\t \t\t\t\t\t \t\tfor (String stringSegment2 : splitString) {\r\n\t \t\t\t\t\t \t\t\tif (stringSegment2.matches(\".*</def>.*\") && m > 0) {\r\n\t \t\t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t\t\t// Determine unique ID (which will be written to DB later)\r\n\t \t\t\t\t\t \t\t\t\t// Add definition, as well as term ID it is associated with.\r\n\t \t\t\t\t\t \t\t\t\tDictionaryParserThree.DefinitionItem tempDefinitionItem = myInstance.new DefinitionItem();\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.ID = totalDefinitionCounter;\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.theDefinition = stringSegment2.substring(0, stringSegment2.indexOf(\"</def>\"));\r\n\t \t\t\t\t\t\t \t\t\ttempDefinitionItem.termID = totalTermCounter;\r\n\t \t\t\t\t\t\t \t\t\tdatabaseDefinitionList.add(tempDefinitionItem);\r\n\r\n\t \t\t\t\t\t\t \t\t\tint n = 0;\r\n\t \t\t\t\t\t\t \t\t\tString[] splitString2 = (stringSegment2.split(\"<blockquote>\")); \r\n\t \t \t\t\t\t\t \t\tfor (String stringSegment3 : splitString2) {\r\n\t \t \t\t\t\t\t \t\t\tif (stringSegment3.matches(\".*</blockquote>.*\") && n > 0) {\r\n\t \t \t\t\t\t\t \t\t\t\t// Add data which will be added to DB later.\r\n\t \t \t\t\t\t\t \t\t\t\t// Add sample sentence as well as the definition ID it is associated with.\r\n\t \t \t\t\t\t\t \t\t\t\tDictionaryParserThree.SentenceItem tempSentenceItem = myInstance.new SentenceItem();\t\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.definitionID = totalDefinitionCounter;\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.theSampleSentence = stringSegment3.substring(0, stringSegment3.indexOf(\"</blockquote>\"));\r\n\t \t \t\t\t\t\t \t\t\t\tdatabaseSampleSentenceList.add(tempSentenceItem);\t \t \t\t\t\t\t \t\t\t\t\r\n\t \t \t \t\t\t\t\t \t\t\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\"Definition is\" + tempDefinitionItem.theDefinition);\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.newLine();\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\" and sample sentence is \" + tempSentenceItem.theSampleSentence);\r\n\t \t \t\t \t\t\t\t\t\t\tbinThree.newLine();\t\r\n\t \t \t\t\t\t\t \t\t\t}\r\n\t \t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's sample sentence)\r\n\t \t \t\t\t\t\t \t\t\tn++;\r\n\t \t \t\t\t\t\t \t\t}\r\n\t \t \t\t\t\t\t \t\ttotalDefinitionCounter++;\r\n\t \t\t\t\t\t \t\t\t}\r\n\t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's definition)\r\n\t \t\t\t\t \t\t\t\tm++;\r\n\t \t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t}\t \t \t\t\t\t\t \t\t\r\n\t \t\t\t\t\t \t\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\ttotalTermCounter++;\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\t// Compare next definition and see if duplicate exists.\r\n\t\t \t\t\t\t\t\t\t// If so, add to string array.\r\n\t \t\t\t\t\t \t\tif (k < 0 || k >= NUM_SEARCH_TERMS - 1) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\telse { \t \t\t\t\t\t \t\t\r\n\t\t\t \t\t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString next = termArray[k + 1].substring(termArray[k + 1].indexOf(\"<h1>\") + 4, termArray[k + 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\tif (current.compareTo(next) == 0) {\t\r\n\t\t\t\t \t\t\t\t\t\t\tk++;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t \t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\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\t//}\t \t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\tisCurrentTermSearchComplete = true;\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}\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// If the term does not exist in the database.\r\n\t \t\t\t\t\tif (Math.abs(upperIndex) - Math.abs(lowerIndex) <= 1)\r\n\t \t\t\t\t\t{\r\n \t\t\t\t\t\t\t isCurrentTermSearchComplete = true;\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 \t\t\r\n\t \t}\r\n\t \t\r\n\t \t \t\r\n\t \tSystem.out.println(\"ended search.\");\t\r\n\t \tmyInstance.writeAllItemsToDatabase(databaseTermList, databaseDefinitionList, databaseSampleSentenceList);\t\r\n\t \tSystem.out.println(\"ended write.\");\r\n\t \t\r\n\t \tbinOne.close();\r\n\t \treaderOne.close();\r\n\t \tinputStreamOne.close();\t \t\r\n\t \t\r\n\t \tbinTwo.close();\r\n\t \treaderTwo.close();\r\n\t \tinputStreamTwo.close();\t \t\r\n\t \t\r\n\t \tbinThree.close(); \r\n\t \twriterTwo.close();\r\n\t \toutputStream.close();\r\n\t \tSystem.exit(0);\r\n\r\n\r\n\t \t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \t\r\n }", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public void transform() {\n String delimiter = \" \";\n\n System.out.println(\"Using pathname \" + this.inputPath_ + \"\\n\");\n\n //create string to hold the entire input file\n String input = \"\";\n try { //use a scanner to get the contents of the file into a string\n Scanner inputScanner = new Scanner(new File(this.inputPath_));\n //use a delimiter that only matches the end of the file; this will give us the whole file\n input = inputScanner.useDelimiter(\"\\\\Z\").next();\n inputScanner.close();\n } catch (Exception e) {\n System.err.println(\"Couldn't read \" + this.inputPath_);\n System.exit(-100);\n }\n //if we are here, then there wasn't an exception\n\n //make sure not empty file\n if(input.isEmpty()) {\n System.err.print(\"Error: Empty file.\");\n System.exit(-200);\n }\n\n //create an array for the line strings\n ArrayList<String> inputLines = new ArrayList<>();\n\n //next, separate the input string into multiple strings, one for each line\n //delimiter string regex - only match line terminators\n String lineDelim = \"(\\n|\\r|\\r\\n|\\u0085|\\u2028|\\u2029)\";\n StringTokenizer inputLineTokenizer = new StringTokenizer(input, lineDelim); //create a string tokenizer\n\n //count number of lines\n int numberOfLines = inputLineTokenizer.countTokens();\n\n //add the lines to the array\n for(int i = 0; i < numberOfLines; i++) inputLines.add(inputLineTokenizer.nextToken(lineDelim));\n\n\n //split line into words\n\n //create arraylist of strings\n ArrayList<ArrayList<String>> lines = new ArrayList<>();\n\n for(int i = 0; i < inputLines.size(); i++) {\n //printout(\"Read line: \" + inputLines.get(i) + \"\\n\");\n\n //create a tokenizer and count number of tokens\n StringTokenizer tokenizer = new StringTokenizer(inputLines.get(i), delimiter);\n int numWords = tokenizer.countTokens();\n\n //create array of strings\n ArrayList<String> currentLine = new ArrayList<>();\n\n for(int j = 0; j < numWords; j++) { //add a word if it is valid\n String currentWord = cleanUpText(tokenizer.nextToken(delimiter));\n if(!currentWord.isEmpty()) currentLine.add(currentWord);\n }\n\n //add the current line to the list of typed lines if it had any valid words\n if(currentLine.size() > 0) lines.add(currentLine);\n }\n\n if(lines.size() <= 0) {\n System.err.println(\"ERROR! File did not contain a line with any valid words. Please try again with a different inpput file.\");\n System.exit(-444);\n } else {\n //send lines from array to pipe\n for(int i = 0; i < lines.size(); i++) {\n this.output_.put(lines.get(i));\n }\n\n\n\n //send a null terminator?\n //this causes the other filter to give an exception\n //the exception is caught by the other filter, which breaks the loop it uses to get new lines\n this.output_.put(null);\n //printout(\"Done with file input.\\n\");\n //stop the filter\n this.stop();\n }\n\n\n }", "private static void loadFiles(String[] files) throws IOException {\n\t\tfor(String file : files){\n\n\t\t\t//Create reader for the file\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\n\t\t\t//Create HashMap to store words and counts\n\t\t\tHashMap<String,WordCount> fileWordCounts = new HashMap<String,WordCount>();\n\t\t\tArrayList<String> sentences = new ArrayList<String>();\n\n\t\t\t//While the file still has more lines to be read from\n\t\t\twhile(fileReader.ready()){\n\n\t\t\t\t//Read a line from the file\n\t\t\t\tString fileLine = fileReader.readLine();\n\t\t\t\t//Add the line to file sentences\n\t\t\t\tsentences.add(fileLine);\n\t\t\t\t//Split the file and remove punctuation from words\n\t\t\t\tString[] fileWords = fileLine.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n\n\t\t\t\t//iterate through all words in each line\n\t\t\t\tfor (String word : fileWords)\n\t\t\t\t{\n\t\t\t\t\tWordCount count = fileWordCounts.get(word);\n\t\t\t\t\t//If word is not in file, add it \n\t\t\t\t\tif (count == null) {\n\t\t\t\t\t\tfileWordCounts.put(word,new WordCount(word));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount.inc(); //If not, increment it\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\n\t\t\t//Add file to fileDatabase \n\t\t\tfileDatabase.map.put(file, new FileObject(file, fileWordCounts, sentences));\n\n\t\t\tfileReader.close(); // Close File\n\n\t\t}//End of For Loop reading from all files\n\t}", "public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\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\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\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\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \t\t \n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\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\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\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\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \t\t\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\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\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }", "private void textToVariables() {\n\t\tfor (int i = 0; i < text1.length; i++) {\n\t\t\tString [] variables = app.split(text1[i], \" \");\n\t\t\tfor (int j = 0; j < variables.length; j++) {\n\t\t\t\tfirstVariables.add(variables[j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < firstVariables.size(); i++) {\n\t\t\t//Variable\n\t\t\tString word = firstVariables.get(i);\n\t\t\t\n\t\t\t//Assigning the variables based on their position in the list (odd and even numbers)\n\t\t\tif (i%2 == 0) {\n\t\t\t\tid.add(word); \n\t\t\t} else {\n\t\t\t\tnames.add(word);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < text2.length; i++) {\n\t\t\t//Sorting the array to make sure that it corresponds with the ID and name from the first text\n\t\t\tArrays.sort(text2);\n\t\t\t//Then splitting it to get: ID, breed and date of birth\n\t\t\tString [] variables = app.split(text2[i], \" \");\n\t\t\tfor (int j = 0; j < variables.length; j++) {\n\t\t\t\tsecondVariables.add(variables[j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < secondVariables.size(); i++) {\n\t\t\t//Variable\n\t\t\tString word = secondVariables.get(i);\n\t\t\t\n\t\t\t//Removing the ID from the list, because it's already in order\n\t\t\tsecondVariables.remove(\"1\");\t\t\tsecondVariables.remove(\"2\");\n\t\t\tsecondVariables.remove(\"3\");\t\t\tsecondVariables.remove(\"4\");\n\t\t\tsecondVariables.remove(\"5\");\n\t\t\t\n\t\t\t//Assigning the variables based on their position in the list (odd and even numbers)\n\t\t\tif (i%2 == 0) {\n\t\t\t\tdate.add(word);\n\t\t\t} else {\n\t\t\t\tbreeds.add(word);\n\t\t\t}\t\n\t\t}\n\t}", "public void run() {\n \n if (Parameter != null && Parameter instanceof ConvertTextUnitsParameter) {\n CastParameter = (ConvertTextUnitsParameter)Parameter;\n }\n else {\n CastParameter = null;\n }\n\n String shortErrorMessage = \"Error: Text Units Cannot be Converted!\";\n this.acceptTask(TaskProgress.INDETERMINATE, \"Initial Preparations\");\n this.validateParameter(Parameter, shortErrorMessage);\n this.openDiasdemCollection(CastParameter.getCollectionFileName());\n this.checkPrerequisitesAndSetDefaultTextUnitsLayer(shortErrorMessage);\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .APPLY_REGULAR_EXPRESSION_TO_TEXT_UNITS) {\n RegexPattern = Pattern.compile(CastParameter.getRegularExpression());\n }\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .IDENTIFY_SPECIFIED_MULTI_TOKEN_TERMS) {\n // read multi token word: each line contains one multi token word;\n // comment lines start with '#'\n TextFile multiTokenFile = new TextFile(\n new File(CastParameter.getMultiTokenFileName()));\n multiTokenFile.open();\n String line = multiTokenFile.getFirstLineButIgnoreCommentsAndEmptyLines();\n ArrayList list = new ArrayList();\n while (line != null) {\n list.add(line.trim());\n line = multiTokenFile.getNextLineButIgnoreCommentsAndEmptyLines();\n }\n // sort multi token terms by decreasing length\n Collections.sort(list, new SortStringsByDecreasingLength());\n // for (int i = 0; i < list.size(); i++) {\n // System.out.println((String)list.get(i));\n // }\n // System.out.println(list.size());\n String[] multiToken = new String[list.size()];\n for (int i = 0; i < list.size(); i++)\n multiToken[i] = (String)list.get(i);\n multiTokenFile.close();\n MyMultiTokenWordIdentifier = new HeuristicMultiTokenWordIdentifier(\n multiToken);\n }\n else {\n MyMultiTokenWordIdentifier = null;\n }\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .FIND_AND_REPLACE_SPECIFIED_TOKENS) {\n // read token replacement file: each line contains the tokens to search \n // for and the replacement tokens separated by a tab stop;\n // comment lines start with '#'\n TextFile tokenReplacementFile = new TextFile(\n new File(CastParameter.getTokenReplacementFileName()));\n tokenReplacementFile.open();\n String line = tokenReplacementFile.getFirstLineButIgnoreCommentsAndEmptyLines();\n HashMap tokensSearchList = new HashMap();\n String[] tokensContents = null;\n while (line != null) {\n tokensContents = line.split(\"\\t\");\n if (tokensContents.length == 2\n && tokensContents[1].trim().length() > 0) {\n try {\n tokensSearchList.put(tokensContents[0].trim(), \n tokensContents[1].trim());\n }\n catch (PatternSyntaxException e) {\n System.out.println(\"[TokenizeTextUnitsTask] Regex syntax error in \"\n + \" file \" + CastParameter.getTokenReplacementFileName() + \": \"\n + \" Line \\\"\" + line + \"\\\"; error message: \" + e.getMessage());\n }\n }\n else {\n System.out.println(\"[TokenizeTextUnitsTask] Error in file \"\n + CastParameter.getTokenReplacementFileName() + \": Line \\\"\"\n + line + \"\\\" does not conform to syntax!\");\n }\n line = tokenReplacementFile.getNextLineButIgnoreCommentsAndEmptyLines();\n }\n // sort multi token terms by decreasing length\n ArrayList list = new ArrayList(tokensSearchList.keySet());\n Collections.sort(list, new SortStringsByDecreasingLength());\n // create arrays for token replacement \n String[] tokensSearch = new String[list.size()];\n String[] tokensReplace = new String[list.size()];\n Iterator iterator = list.iterator();\n int i = 0;\n while (iterator.hasNext()) {\n TmpString = (String)iterator.next();\n tokensSearch[i] = TmpString;\n tokensReplace[i++] = (String)tokensSearchList.get(TmpString);\n }\n tokenReplacementFile.close();\n MyTokenReplacer = new HeuristicTokenReplacer(tokensSearch, tokensReplace);\n }\n else {\n MyTokenReplacer = null;\n }\n \n int counterProgress = 0;\n long maxProgress = DiasdemCollection.getNumberOfDocuments();\n \n DiasdemDocument = DiasdemCollection.getFirstDocument(); \n while (DiasdemDocument != null) {\n \n if (counterProgress == 1 || (counterProgress % 50) == 0) {\n Progress.update( (int)(counterProgress * 100 / maxProgress),\n \"Processing Document \" + counterProgress);\n DiasdemServer.setTaskProgress(Progress, TaskThread);\n }\n\n DiasdemDocument.setActiveTextUnitsLayer(DiasdemProject\n .getActiveTextUnitsLayerIndex());\n DiasdemDocument.backupProcessedTextUnits(DiasdemProject\n .getProcessedTextUnitsRollbackOption());\n \n for (int i = 0; i < DiasdemDocument.getNumberOfProcessedTextUnits(); \n i++) {\n DiasdemTextUnit = DiasdemDocument.getProcessedTextUnit(i);\n switch (CastParameter.getConversionType()) {\n case ConvertTextUnitsParameter.CONVERT_TEXT_UNITS_TO_LOWER_CASE: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString()\n .toLowerCase();\n break;\n }\n case ConvertTextUnitsParameter.CONVERT_TEXT_UNITS_TO_UPPER_CASE: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString()\n .toUpperCase();\n break;\n } \n case ConvertTextUnitsParameter.APPLY_REGULAR_EXPRESSION_TO_TEXT_UNITS: {\n RegexMatcher = RegexPattern.matcher(DiasdemTextUnit\n .getContentsAsString());\n TmpStringBuffer = new StringBuffer(DiasdemTextUnit\n .getContentsAsString().length() + 10000);\n while (RegexMatcher.find()) {\n RegexMatcher.appendReplacement(TmpStringBuffer,\n CastParameter.getReplacementString());\n }\n TextUnitContentsAsString = RegexMatcher.appendTail(TmpStringBuffer)\n .toString();\n break;\n }\n case ConvertTextUnitsParameter.IDENTIFY_SPECIFIED_MULTI_TOKEN_TERMS: {\n TextUnitContentsAsString = MyMultiTokenWordIdentifier\n .identifyMultiTokenWords(DiasdemTextUnit.getContentsAsString());\n break;\n } \n case ConvertTextUnitsParameter.FIND_AND_REPLACE_SPECIFIED_TOKENS: {\n TextUnitContentsAsString = MyTokenReplacer\n .replaceTokens(DiasdemTextUnit.getContentsAsString());\n break;\n } \n case ConvertTextUnitsParameter.REMOVE_PART_OF_SPEECH_TAGS_FROM_TOKENS: {\n TextUnitContentsAsString = this.removeTagsFromTokens(\n DiasdemTextUnit.getContentsAsString(), \"/p:\");\n break;\n } \n case ConvertTextUnitsParameter.REMOVE_WORD_SENSE_TAGS_FROM_TOKENS: {\n TextUnitContentsAsString = this.removeTagsFromTokens(\n DiasdemTextUnit.getContentsAsString(), \"/s:\");\n break;\n } \n default: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString();\n }\n }\n DiasdemTextUnit.setContentsFromString(TextUnitContentsAsString);\n DiasdemDocument.replaceProcessedTextUnit(i, DiasdemTextUnit);\n }\n\n DiasdemCollection.replaceDocument(DiasdemDocument\n .getDiasdemDocumentID(), DiasdemDocument);\n \n DiasdemDocument = DiasdemCollection.getNextDocument();\n counterProgress++;\n \n } // read all documents\n \n super.closeDiasdemCollection();\n \n CastResult = new ConvertTextUnitsResult(TaskResult.FINAL_RESULT,\n \"All processed text units have been converted in the DIAsDEM document\\n\" +\n \" collection \" +\n Tools.shortenFileName(CastParameter.getCollectionFileName(), 55) + \"!\", \n \"Processed text units have been converted.\");\n this.setTaskResult(100, \"All Documents Processed ...\", CastResult,\n TaskResult.FINAL_RESULT, Task.TASK_FINISHED);\n \n }", "void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }", "public HashMap readFile(String filePath, HashMap source){\n\t\tArrayList<String> temp1 = new ArrayList<String>();\n\t\tArrayList<String> temp2 = new ArrayList<String>();\n\t\tBufferedReader br = null;\n\t\t\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\t\n\t\t\t// \"Users/Jasmine/Documents/Eclipse/CacheDictionary/src/english.txt\"\n\t\t\tbr = new BufferedReader(new FileReader(filePath)); \n\t\t\t\n\t\t\t//str.matches(\".*\\\\d+.*\"); ==> string that contains numbers\n\t\t\t//.matches(\"[a-zA-Z]+\"); ==> string that only contains letter\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if the source file itself is not one word per line, we need to split the string\n\t\t\t\t * only letter(not single) will be stored in the array\n\t\t\t\t */\n\t\t\t\t//\n\t\t\t\tif(sCurrentLine.matches(\".*([ \\t]).*\")){ //check if the current line is a single word or not\n\t\t\t\t\ttemp1.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t\telse if(sCurrentLine.matches(\"[a-zA-Z]+\") && sCurrentLine.length()>1){\n\t\t\t\t\ttemp2.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t}// end of while loop\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(!temp1.isEmpty()){\n\t\t\tfor(int i = 0; i< temp1.size(); i++){\n\t\t\t\tString thisLine[] = temp1.get(i).split(\" \");\n\t\t\t\t//for each word in this line\n\t\t\t\tfor(int j = 0; j < thisLine.length; j++){\n\t\t\t\t\t//if it is a valid word\n\t\t\t\t\tif(thisLine[j].matches(\"[a-zA-Z]+\") && thisLine[j].length()>1 ){\n\t\t\t\t\t\tif( source.get(thisLine[j]) == null){\n\t\t\t\t\t\t\tsource.put(thisLine[j].toLowerCase(),thisLine[j].toLowerCase());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t} // end of if current word i valid\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // end of temp1\n\t\t\n\t\tif(!temp2.isEmpty()){\n\t\t\tfor(int i = 0; i< temp2.size(); i++){\n\t\t\t\tif(temp2.get(i).matches(\"[a-zA-Z]+\") && temp2.get(i).length()>1){\n\t\t\t\t\tif(source.get(temp2.get(i)) == null){\n\t\t\t\t\t\tsource.put(temp2.get(i).toLowerCase(),temp2.get(i).toLowerCase());\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn source;\n\t}", "private void upgradeDictionary() throws IOException {\n File fileAnnotation = new File(filePathAnnSource);\n FileReader fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n if (fileAnnotation.exists()) {\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf(\"\\t\") + 1);\n\n if (!nonDictionaryTerms.contains(word.toLowerCase())) {\n if (dictionaryTerms.containsKey(word.toLowerCase())) {\n if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n System.out.println(\"Conflict: word:: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n nonDictionaryTerms.add(word.toLowerCase());\n// removeLineFile(dictionaryTerms.get(word.toLowerCase())+\" \"+word.toLowerCase(),filePathDictionaryAuto);\n dictionaryTerms.remove(word.toLowerCase());\n writePrintStream(word, filePathNonDictionaryAuto);\n }\n } else {\n System.out.println(\"Updating Dictionary:: Word: \" + word + \"\\tTag: \" + annotations[1]);\n dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n writePrintStream(annotations[1] + \" \" + word.toLowerCase(), filePathDictionaryAuto);\n }\n }\n\n// if (dictionaryTerms.containsKey(word.toLowerCase())) {\n// if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n// System.out.println(\"Conflict: word: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n// nonDictionaryTerms.add(word.toLowerCase());\n//\n// }\n// } else {\n// dictionary.add(word.toLowerCase());\n// dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n// System.out.println(\"Updating Dictionary: Word: \" + word + \"\\tTag: \" + annotations[1]);\n// }\n }\n }\n\n\n br.close();\n fr.close();\n }", "public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}", "public Context runMap() throws InstantiationException, IllegalAccessException, IOException {\n\t\tContext tempoContext = new Context();\n\t\tthis.setup(tempoContext);\n\t\t//Read the input file\n\t\tString[] inputLines = this.inputSplit.getLines();\n\t\t//Map process\n\t\tfor (int i=0; i<inputLines.length; i++) {\n\t\t\tthis.map(Integer.toString(i), inputLines[i], tempoContext);\n\t\t}\n\t\treturn tempoContext;\n\t}", "public void InsertInfo(String Name) throws IOException{\r\n test.songMatch();\r\n test.sourceMatch();\r\n test.WordTable();\r\n test.doword2();\r\n \r\n String value=\"\";\r\n String Performer=\"\";// will hold either arrangers, vocalists, or circles\r\n int counter=0;\r\n List<String> ListLines=new ArrayList<>();\r\n List<String> ListInserts=new ArrayList<>();\r\n List<String> PerformerLinesList=new ArrayList<>();\r\n Map <Integer,String> Map=new HashMap<>();\r\n Map <Integer,String> TempMap=new HashMap<>();\r\n Map <Integer,Integer> LinesMap=new HashMap<>();\r\n for(String object:FileNames){\r\n try{\r\n \r\n MP3 mp3 = new MP3(object); \r\n Title=mp3.getTitle(); \r\n switch(Name){\r\n case \"Vocal\": value= \"Vocalists\";\r\n Performer=mp3.getComments().trim();//get comments AKA THE VOCALISTS \r\n break;\r\n case \"Arranger\": value= \"Arrangers\";\r\n Performer=mp3.getMusicBy().trim();//get comments AKA THE ARRANFERS \r\n break;\r\n case \"Circle\": value= \"Circles\";\r\n Performer=mp3.getBand().trim();//get comments AKA THE CIRCLES \r\n break;\r\n } \r\n String []perform; \r\n perform=Performer.split(\"/\"); \r\n for (String perform1 : perform) {\r\n perform1=perform1.trim();\r\n boolean check=true; \r\n TempMap.put(counter, perform1.toLowerCase()); \r\n for(int id:Map.keySet()){\r\n if(perform1.toLowerCase().hashCode()==Map.get(id).toLowerCase().hashCode()){\r\n // System.out.println(\"check is false\"+counter);\r\n check=false;\r\n break;\r\n }\r\n }\r\n if(!Map.containsValue(perform1)){\r\n if(check)\r\n Map.put(counter, perform1);\r\n counter++;\r\n }\r\n \r\n int id=0;\r\n for(int a:Map.keySet()){\r\n if(Map.get(a).toLowerCase().equals(perform1.toLowerCase())){ \r\n id=a;\r\n break;\r\n } \r\n }\r\n String nos=\"\";\r\n nos= value;\r\n nos= value.substring(0,nos.length()-1);\r\n \r\n //vocalist inserts for table \r\n ListInserts.add(\"Insert Into \" +value+ \" (\"+nos+\"_id,\"+nos+\"_Name) values(\"+id+\",\"+perform1+\");\");\r\n //System.out.println(\"Insert Into \" +value+ \" (\"+nos+\"_id,\"+nos+\"_Name) values(\"+id+\",\"+perform1+\");\");\r\n \r\n //vocalist lines inserts for vocalist lines table\r\n //System.out.println(\"Insert Into VocalistLines (Song_id,Vocalist_Id) values(\"+Title+perform1);//+Title.hashCode()+\",\"+id+\");\"); \r\n // System.out.println(\"Insert Into VocalistLines (Song_id,Vocalist_Id) values(\"+Title.hashCode()+\",\"+id+\");\");\r\n ListLines.add(\"Insert Into \" +value+\"Lines (Song_id,Vocalist_Id) values(\"+Title.hashCode()+\",\"+id+\");\");\r\n int songid=test.getsongid(test.getMap(\"T\"), Title);\r\n LinesMap.put(songid, id);\r\n PerformerLinesList.add(+songid+\"/\"+id);\r\n } \r\n \r\n }\r\n catch(IOException e){\r\n System.out.println(\"An error occurred while reading/saving the mp3 file.\");\r\n } \r\n }\r\n switch(Name){\r\n case\"Vocal\":\r\n VocalistsMap.putAll(Map);\r\n VocalistsLines.addAll(ListLines);\r\n VocalistsInsert.addAll(ListInserts); \r\n VocalLinesList.addAll(PerformerLinesList);\r\n break;\r\n case \"Arranger\":\r\n ArrangersMap.putAll(Map);\r\n ArrangersLines.addAll(ListLines);\r\n ArrangersInsert.addAll(ListInserts);\r\n ArrangerLinesList.addAll(PerformerLinesList);\r\n break;\r\n case\"Circle\":\r\n CirclesMap.putAll(Map); \r\n CirclesLines.addAll(ListLines);\r\n CirclesInsert.addAll(ListInserts);\r\n CircleLinesList.addAll(PerformerLinesList);\r\n break;\r\n }\r\n}", "public void createDictionary(int wordLength, int shiftLength, String lettersInputFolder) throws IOException{\n\t\t//read File\n\t\t// go to letters directory\n\t\tString seriesLetterFolder = lettersInputFolder + File.separator + \"letters\";\n\t\tFile directory = new File(seriesLetterFolder); \n\t\tfileNames = directory.listFiles(new FileFilter() {\n\t\t @Override\n\t\t public boolean accept(File pathname) {\n\t\t String name = pathname.getName().toLowerCase();\n\t\t return name.endsWith(\".csv\") && pathname.isFile();\n\t\t }\n\t\t});\n\t\tfor (int i = 0; i < fileNames.length; i++) {\n\t\t\t\n\t\t\t// Overall structure is as follows:\n\t\t\t// On each row, for each word - we have a Map of String and List<Double> indicating a word\n\t\t\t// and list for TF, IDF, and IDF2 values. So for each csv file, you will have a List of these maps.\n\t\t\t// the size of the list is 20. Eventually the global dictionary will be a List of such lists.\n\t\t\t// in case of sample data, the global dictionary is of 60 lists.\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(fileNames[i]));\n\t\t\t\n\t\t\t\n\t\t\t// for each document\n\t\t\tList<Map<String,List<Double>>> mapPerGestureFile = new ArrayList<Map<String,List<Double>>>(); \n\t\t\t\n\t\t\tMap<String,List<Double>> wordMap = null; //per row \n\t\t\twhile(in.ready()) {\n\t\t\t\twordMap = new HashMap<String, List<Double>>(); //per rows\n\t\t\t\tString series = in.readLine();\n\t\t\t\tString letters[]= series.split(\",\");\n\t\t\t\tInteger lastLocationForRef = -1; // for padding\n\t\t\t\tdouble totalWordCountPerDocument = 0.0; \n\t\t\t\tfor (int curLineCharLocation = 0; curLineCharLocation < letters.length\n\t\t\t\t\t\t- wordLength + 1; curLineCharLocation = curLineCharLocation\n\t\t\t\t\t\t+ shiftLength) {\n\t\t\t\t\t// this for loop runs on each line and curLineCharLocation\n\t\t\t\t\t// indicates the current pointer\n\t\t\t\t\t// from which we should be forming the word\n\t\t\t\t\t// extract a word and move the shift length\n\t\t\t\t\tString currentWord = \"\";\n\t\t\t\t\tfor (int currentWordLocation = curLineCharLocation; currentWordLocation < wordLength\n\t\t\t\t\t\t\t+ curLineCharLocation; currentWordLocation++) {\n\t\t\t\t\t\t// this inner for loop denotes the current word to be\n\t\t\t\t\t\t// created\n\t\t\t\t\t\tcurrentWord = currentWord\n\t\t\t\t\t\t\t\t+ letters[currentWordLocation];\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, currentWord);\n\t\t\t\t\tlastLocationForRef = curLineCharLocation + shiftLength;\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t\t\t\t}\n\t\t\t\t// check to see if we have any leftover strings. If yes then pad that word using\n\t\t\t\t// the last character pointed by lastLocationForRef\n\t\t\t\tInteger difference = letters.length - lastLocationForRef;\n\t\t\t\tif (difference > 0) {\n\t\t\t\t\tString paddedWord = \"\";\n\t\t\t\t\tInteger extraPaddingSize = wordLength - difference;\n\t\t\t\t\twhile (difference > 0) {\n\t\t\t\t\t\t// this while loop will simply create the padded word \n\t\t\t\t\t\t// to be appended at the end\n\t\t\t\t\t\tpaddedWord = paddedWord + letters[lastLocationForRef];\n\t\t\t\t\t\tdifference = difference - 1;\n\t\t\t\t\t\tlastLocationForRef = lastLocationForRef + 1; //advance to next location\n\t\t\t\t\t}\n\t\t\t\t\twhile(extraPaddingSize > 0) {\n\t\t\t\t\t\t paddedWord = paddedWord + letters[lastLocationForRef-1];\n\t\t extraPaddingSize = extraPaddingSize - 1;\n\t\t\t\t\t}\n\t\t\t\t\taddWordToMap(wordMap, paddedWord);\n\t\t\t\t\ttotalWordCountPerDocument = totalWordCountPerDocument + 1;\n\t }\n\t\t\t\twordMap = updateWordMapForTotalCountK(wordMap,totalWordCountPerDocument); // n/k , where n is frequency of word in doc/ k total freq\n\t\t\t\tmapPerGestureFile.add(wordMap);\t\t\t\t\n\t\t\t}\n\t\t\tgetTfMapArrayIDF().add(mapPerGestureFile);\n\t\t\t//count idf2 per document\n\t\t\tinitIDF2Map(mapPerGestureFile);\n\t\t\t\n\t\t\tin.close();\n\t\t}\n\t\t\n\t\t//populate global map for IDF values List<LIst<Map>\n\t\t initIDFMap(getTfMapArrayIDF());\n\t\t //Generate IDF Files from Global Map * TF Values\n\t\t calculateIDFValues();\n\t\t //Generate IDF2 Files\n\t\t calculateIDF2Values();\n\t\t //normalize tfidf and tfidf2\n\t\t normalizeDictionary(); \n\t\t createDatabaseFiles(getTfMapArrayIDF(),lettersInputFolder);\n\t}", "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 static Map<String, List<List<String>>>[] splitYagoDataIntoDocumentSets(File yagoInputFile) {\r\n\t\tMap<String, List<List<String>>> trainData = new HashMap<String, List<List<String>>>();\r\n\t\tMap<String, List<List<String>>> testaData = new HashMap<String, List<List<String>>>();\r\n\t\tMap<String, List<List<String>>> testbData = new HashMap<String, List<List<String>>>();\r\n\t\t\r\n\t\tBufferedReader reader = FileUtil.getFileReader(yagoInputFile.getAbsolutePath());\r\n\t\ttry {\r\n\t\t\tString documentName = null;\r\n\t\t\tString documentSet = null;\r\n\t\t\tList<List<String>> documentLines = null;\r\n\t\t\tList<String> sentenceLines = null;\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tif (line.startsWith(\"-DOCSTART-\")) {\r\n\t\t\t\t\tif (documentSet != null) {\r\n\t\t\t\t\t\tif (documentSet.equals(\"train\"))\r\n\t\t\t\t\t\t\ttrainData.put(documentName, documentLines);\r\n\t\t\t\t\t\telse if (documentSet.equals(\"testa\"))\r\n\t\t\t\t\t\t\ttestaData.put(documentName, documentLines);\r\n\t\t\t\t\t\telse if (documentSet.equals(\"testb\"))\r\n\t\t\t\t\t\t\ttestbData.put(documentName, documentLines);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString docId = line.substring(\"-DOCSTART- (\".length(), line.length() - 1);\r\n\t\t\t\t\tString[] docIdParts = docId.split(\" \");\r\n\t\t\t\t\tdocumentName = docIdParts[0] + \"_\" + docIdParts[1];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (docIdParts[0].endsWith(\"testa\"))\r\n\t\t\t\t\t\tdocumentSet = \"testa\";\r\n\t\t\t\t\telse if (docIdParts[0].endsWith(\"testb\"))\r\n\t\t\t\t\t\tdocumentSet = \"testb\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tdocumentSet = \"train\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tdocumentLines = new ArrayList<List<String>>();\r\n\t\t\t\t\tsentenceLines = new ArrayList<String>();\r\n\t\t\t\t} else if (line.trim().length() == 0) {\r\n\t\t\t\t\tdocumentLines.add(sentenceLines);\r\n\t\t\t\t\tsentenceLines = new ArrayList<String>();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsentenceLines.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (documentSet.equals(\"train\"))\r\n\t\t\t\ttrainData.put(documentName, documentLines);\r\n\t\t\telse if (documentSet.equals(\"testa\"))\r\n\t\t\t\ttestaData.put(documentName, documentLines);\r\n\t\t\telse if (documentSet.equals(\"testb\"))\r\n\t\t\t\ttestbData.put(documentName, documentLines);\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tMap<String, List<List<String>>>[] returnData = new HashMap[3];\r\n\t\treturnData[0] = trainData;\r\n\t\treturnData[1] = testaData;\r\n\t\treturnData[2] = testbData;\r\n\t\t\r\n\t\treturn returnData;\r\n\t}", "public void prepareForFeaturesAndOrderCollection() throws Exception {\n\n LOG.info(\" - Preparing phrases...\");\n readPhrases(false);\n collectNumberProps(m_srcPhrs, m_trgPhrs, true, true); \n collectTypeProp(m_srcPhrs, m_trgPhrs); \n\n collectContextEqs();\n prepareSeedDictionary(m_contextSrcEqs, m_contextTrgEqs);\n prepareTranslitDictionary(m_contextSrcEqs);\n filterContextEqs();\n\n collectContextAndTimeProps(m_srcPhrs, m_trgPhrs);\n collectOrderProps(m_srcPhrs, m_trgPhrs);\n }", "public static void Pubmed() throws IOException \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:\\\\TempDB\\\\PMCxxxx\\\\articals.txt\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL()); \n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\ttrainset = 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\tif (trainset == null )\n\t\t{\n\t\t\ttrainset = new HashMap<String, Map<String,List<String>>>();\n\t\t}\n\t\t\n\t\t\n\t\t/************************************************************************************************/\n\t\t//Map<String, Integer> bagofwords = semantic.getbagofwords(titles) ; \n\t\t//trainxmllabeling(trainset,bagofwords); \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\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tModel Sentgraph = sentInfo.graph;\n\t\t\tif (trainset.containsKey(title))\n\t\t\t\tcontinue ; \n\t\t\t//8538\n\t\t\tcount++ ; \n\n\t\t\tMap<String, List<String>> triples = null ;\n\t\t\t// get the goldstandard concepts for current title \n\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\n\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\n\t\t\t// get the concepts \n\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\n\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,FILE_NAME_Patterns) ;\n\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t{\n\t\t\t\tcount1++ ;\n\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\n\t\t\t\tif (count1 == 30)\n\t\t\t\t{\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\Relationdisc1\") ;\n\t\t\t\t\tcount1 = 0 ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\t\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}", "private void loadStrings() {\n\t\tfor (String texto : textOne) {\n\t\t\t//Se parte cada linea por comas\n\t\t\tString [] info = texto.split(\",\");\n\t\t\t//----------------\n\t\t\tint id = Integer.parseInt(info[0]);\n\t\t\tString name = info[1];\n\t\t\tint age = Integer.parseInt(info[2]);\n\t\t\tString race = info[3];\n\t\t\t//--------------------\n\t\t\t\n\t\t\tdogList.addElement(id, name, age, race);\n\t\t}\n\t\t\n\t\t//-----------------------\n\t\t// Se carga segundo TXT\n\t\tfor (int i = 0; i < dogList.getList().size(); i++) {\n\t\t\tfor (int j = 0; j < textTwo.length; j++) {\n\t\t\t\tString [] infoD = textTwo[j].split(\",\");\n\t\t\t\t//----------------\n\t\t\t\tint id = Integer.parseInt(infoD[0]);\n\t\t\t\tString nombre = infoD[1];\n\t\t\t\tString apellido = infoD[2];\n\t\t\t\tint identificacion = Integer.parseInt(infoD[3]);\n\t\t\t\tint telefono = Integer.parseInt(infoD[4]);\n\t\t\t\tString direccion = infoD[5];\n\t\t\t\tString enfermedades = infoD[6];\n\t\t\t\t//-----------\n\t\t\t\tduenoList.addElement(id, nombre, apellido, identificacion, telefono, direccion, enfermedades);\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}\n\t\tduenoList.printList();\n\t\tdogList.printList();\n\t\t\n\t\t\n\t}", "@Override\n\t\t\tprotected Void call() throws Exception {\n\t\t\t\twordCloudMap = new LinkedHashMap<WordCloud, String>();\n\t\t\t\twordFrequencyMap = new LinkedHashMap<String, List<WordFrequency>>();\n\t\t\t\t\n\t\t\t\ttranslatorSkippedWords = new HashMap<String, ArrayList<String>>();\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < selectedTranslators.size(); ++i) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"1\");\n\t\t\t\t\t\n\t\t\t\t\tString translator = selectedTranslators.get(i);\n\t\t\t\t\t\n\t\t\t\t\tfinal FrequencyAnalyzer frequencyAnalyzer = new FrequencyAnalyzer();\n\t\t\t\t\tfrequencyAnalyzer.setWordFrequenciesToReturn(200);\n\t\t\t\t\tfrequencyAnalyzer.setNormalizer(new LowerCaseNormalizer());\n\t\t\t\n\t\t\t\t\tBasicConfigurator.configure();\t\n\t\t\t\t\t\n\t\t\t\t\tString text = textReader.getWholeFilteredText(translator, removeStopWords);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\t\n\t\t\t\t\tList<WordFrequency> wordFrequencies = frequencyAnalyzer.load(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)));\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\t\t\n\t\t\t\t\twordFrequencyMap.put(translator, wordFrequencies);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"4\");\n\t\t\t\t\t\n\t\t\t\t\tDimension dimension = new Dimension(250,600);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"5\");\n\t\t\t\t\t\n\t\t\t\t\tfinal WordCloud wordCloud = new WordCloud(dimension, CollisionMode.PIXEL_PERFECT);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"6\");\n\t\t\t\t\t\n\t\t\t\t\twordCloud.setPadding(2);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"7\");\n\t\t\t\t\t\n\t\t\t\t\t///////////////////////////////////IDE/////////////////////////////////////\n//\t\t\t\t\twordCloud.setBackground(new PixelBoundryBackground(\"images/lighthouse.png\"));\n\t\t\t\t\t///////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\n\t\t\t\t\t//////////////////////////////////JAR//////////////////////////////////////\n\t\t\t\t\twordCloud.setBackground(new PixelBoundryBackground(getClass().getResourceAsStream(\"/lighthouse.png\")));\n\t\t\t\t\t///////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"8\");\n\t\t\t\t\t\n\t\t\t\t\twordCloud.setBackgroundColor(new Color(0xFFFFFF));\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"9\");\n\t\t\t\t\t\n\t\t\t\t\twordCloud.setColorPalette(new ColorPalette(new Color(0x4055F1), new Color(0x408DF1), new Color(0x40AAF1), new Color(0x40C5F1), new Color(0x40D3F1), new Color(0x663096)));\n\t\t\t\t\tSystem.out.println(\"10\");\n\t\t\t\t\t\n\t\t\t\t\twordCloud.setFontScalar(new LinearFontScalar(10, 40));\n\t\n\t\t\t\t\tSystem.out.println(\"11\");\n\t\t\t\t\t\n\t\t\t\t\twordCloud.build(wordFrequencies);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"12\");\n\t\t\t\t\t\n\t\t\t\t\twordCloudMap.put(wordCloud, translator);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"13\");\n\t\t\t\t\t\n\t\t\t\t\tArrayList<String> skippedWords = new ArrayList<String>();\n\t\t\t\t\t\n\t\t\t\t\tfor (Word word : wordCloud.getSkipped()) {\n\t\t\t\t\t\tskippedWords.add(word.getWord());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttranslatorSkippedWords.put(translator, skippedWords);\n\t\t\t\t\t\n\t\t\t\t\tupdateProgress(i+1, selectedTranslators.size());\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tSystem.out.println(wordFrequencies);\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tScrollPane scrollPane = new ScrollPane();\n\t\t\t\t\t\t\n\t\t\t\t\t\tGridPane gridPane = new GridPane();\n\t\t\t\t\t\t\n\t\t\t\t\t\tgridPane.minWidthProperty().bind(Bindings.createDoubleBinding(() -> \n\t\t\t\t\t\tscrollPane.getViewportBounds().getWidth(), scrollPane.viewportBoundsProperty()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tgridPane.setPadding(new Insets(20,20,20,20));\n\t\t\t\t\t\t\n\t\t\t\t\t\tint counter = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Entry<WordCloud, String> pair : wordCloudMap.entrySet()) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tColumnConstraints columnConstraints = new ColumnConstraints();\n\t\t\t\t columnConstraints.setPercentWidth(100.0 / wordCloudMap.size());\n\t\t\t\t gridPane.getColumnConstraints().add(columnConstraints);\n\t\t\t\t \n\t\t\t\t\t\t\tWordCloud wordCloud = pair.getKey();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tImageView imageView = new ImageView();\n\t\t\t\t\t\t\timageView.setImage(SwingFXUtils.toFXImage(wordCloud.getBufferedImage(), null));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGridPane.setHalignment(imageView, HPos.CENTER);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tLabel translatorLabel = new Label(wordCloudMap.get(wordCloud));\n\t\t\t\t\t\t\ttranslatorLabel.setFont(new Font(15));\n\t\t\t\t\t\t\ttranslatorLabel.setPadding(new Insets(20,0,0,0));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tGridPane.setHalignment(translatorLabel, HPos.CENTER);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgridPane.add(imageView, counter, 0);\n\t\t\t\t\t\t\tgridPane.add(translatorLabel, counter, 1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t++counter;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tscrollPane.setContent(gridPane);\n\t\t\t\t\t\t\n\t\t\t\t\t\tborderPane.setCenter(scrollPane);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsaveButton.setDisable(false);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn null;\n\t\t\t}", "public void parseThesaurus() throws IOException {\r\n\t\t\t//We create an object below to read the thesaurus file\r\n\t\t\tFileInputStream fis = new FileInputStream(\"src//ie//gmit//dip//resources//MobyThesaurus3.txt\");\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(fis));\r\n\t\t\t List <List<String>> listOflist= new ArrayList<>();\r\n\t\t\t// HashMap<String,List> tMap = new HashMap<>();\t\t\r\n\t\t\t List <String> individualListOfSynonyms= new ArrayList <String>();\r\n\r\n\t\t\t \r\n\t\t\t //we create a hashmap with the first word being the key value and the rest a list of synonims we will use\r\n\t\t\twhile(br.readLine()!=null) {\r\n\t\t\t\t\r\n\t\t\t\tString somestring = br.readLine();\r\n\t\t\t\tString[] testsplit= somestring.split(\",\");\r\n\t\t\t\tindividualListOfSynonyms=Arrays.asList(testsplit);\r\n\t\t\t\tString indexvalue=individualListOfSynonyms.get(0).toString();\r\n\t\t\t tMap.put(indexvalue, individualListOfSynonyms);\r\n\t\t\t //br.close();\r\n\t\t\t //System.out.println(tMap);\r\n\t\t\t }\r\n\t\t\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}", "public void CreatFileXML(HashMap<String, List<Detail>> wordMap, String fileName ) throws ParserConfigurationException, TransformerException {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.newDocument();\n\t\t\n\t\t//root element\n\t\tElement rootElement = doc.createElement(\"Words\");\n\t\tdoc.appendChild(rootElement);\n\t\t\n\t\tSet<String> keyset = wordMap.keySet();\n\t\tfor(String key : keyset) {\n\t\t\t\n\t\t\t// Load List of detail from HashMap\n\t\t\tList<Detail> values = wordMap.get(key);\n\t\t\t\n\t\t\tfor (Detail detail : values) {\n\t\t\t\n\t\t\t\t//LexicalEntry element\n\t\t\t\tElement LexicalEntry = doc.createElement(\"LexicalEntry\");\n\t\t\t\trootElement.appendChild(LexicalEntry);\n\t\t\t\t\n\t\t\t\t//HeadWord element\n\t\t\t\tElement HeadWord = doc.createElement(\"HeadWord\");\n\t\t\t\tHeadWord.appendChild(doc.createTextNode(key));\n\t\t\t\tLexicalEntry.appendChild(HeadWord);\n\t\t\t\t\n\t\t\t\t//Detail element\n\t\t\t\tElement Detail = doc.createElement(\"Detail\");\n\t\t\t\t\n\t\t\t\t// WordType element\n\t\t\t\tElement WordType = doc.createElement(\"WordType\");\n\t\t\t\tWordType.appendChild(doc.createTextNode(detail.getTypeWord()));\n\t\t\t\t\n\t\t\t\t// CateWord element\n\t\t\t\tElement CateWord = doc.createElement(\"CateWord\");\n\t\t\t\tCateWord.appendChild(doc.createTextNode(detail.getCateWord()));\n\t\t\t\t\n\t\t\t\t// SubCateWord element\n\t\t\t\tElement SubCateWord = doc.createElement(\"SubCateWord\");\n\t\t\t\tSubCateWord.appendChild(doc.createTextNode(detail.getSubCateWord()));\n\t\t\t\t\n\t\t\t\t// VerbPattern element\n\t\t\t\tElement VerbPattern = doc.createElement(\"VerbPattern\");\n\t\t\t\tVerbPattern.appendChild(doc.createTextNode(detail.getVerbPattern()));\n\t\t\t\t\n\t\t\t\t// CateMean element\n\t\t\t\tElement CateMean = doc.createElement(\"CateMean\");\n\t\t\t\tCateMean.appendChild(doc.createTextNode(detail.getCateMean()));\n\t\t\t\t\n\t\t\t\t// Definition element\n\t\t\t\tElement Definition = doc.createElement(\"Definition\");\n\t\t\t\tDefinition.appendChild(doc.createTextNode(detail.getDefinition()));\n\t\t\t\t\n\t\t\t\t// Example element\n\t\t\t\tElement Example = doc.createElement(\"Example\");\n\t\t\t\tExample.appendChild(doc.createTextNode(detail.getExample()));\n\t\t\t\t\n\t\t\t\t// Put in Detail Element\n\t\t\t\tDetail.appendChild(WordType);\n\t\t\t\tDetail.appendChild(CateWord);\n\t\t\t\tDetail.appendChild(SubCateWord);\n\t\t\t\tDetail.appendChild(VerbPattern);\n\t\t\t\tDetail.appendChild(CateMean);\n\t\t\t\tDetail.appendChild(Definition);\n\t\t\t\tDetail.appendChild(Example);\n\t\t\t\t\n\t\t\t\t// Add Detail into LexicalEntry\n\t\t\t\tLexicalEntry.appendChild(Detail);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write the content into xml file\n\t\tTransformerFactory tfmFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = tfmFactory.newTransformer();\n\t\tDOMSource source = new DOMSource(doc);\n\t\tStreamResult result = new StreamResult(new File(\"F://GitHUB/ReadXML/data/\" + fileName));\n\t\ttransformer.transform(source, result);\n\t\t\n//\t\t// output testing\n//\t\tStreamResult consoleResult = new StreamResult(System.out);\n// transformer.transform(source, consoleResult);\n\t}", "private void populateDictionary() throws IOException {\n populateDictionaryByLemmatizer();\n// populateDictionaryBySynonyms();\n }", "protected void createBasicData(File tmpFile)\r\n\t{\t\t \r\n\t\tfileNumber++;\r\n\t\tScanner sc2 = null;\r\n\t try {\r\n\t sc2 = new Scanner(tmpFile);\r\n\t } catch (FileNotFoundException e) {\r\n\t e.printStackTrace(); \r\n\t }\r\n\t while (sc2.hasNextLine()) {\r\n\t Scanner s2 = new Scanner(sc2.nextLine());\r\n\t while (s2.hasNext()) {\r\n\t String tmpWord = s2.next();\r\n\t tmpWord = tmpWord.replaceAll(\"\\\\W\", \"\"); //replace all special characters with \"\"\r\n\t tmpWord = tmpWord.replaceAll(\"\\\\d\", \"\"); //replace all digits with \"\"\r\n\t tmpWord = tmpWord.toLowerCase();\r\n\t if(!(tmpWord.equals(\"\")))\r\n\t {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t//Inserting into location_order table\r\n\t\t\t\t\t\t String query = \"insert ignore into location_order (word, docID, file_name, visible)\" + \" values (?, ?, ?, ?)\";\r\n\t\t\t\t\t // create the mysql insert preparedstatement\r\n\t\t\t\t\t PreparedStatement preparedStmt = con.prepareStatement(query);\r\n\t\t\t\t\t preparedStmt.setString (1,tmpWord);\r\n\t\t\t\t\t preparedStmt.setInt (2, fileNumber);\t\r\n\t\t\t\t\t preparedStmt.setString (3,tmpFile.getName());\r\n\t\t\t\t\t preparedStmt.setInt (4, 1);\t\r\n\t\t\t\t\t // execute the preparedstatement\r\n\t\t\t\t\t preparedStmt.executeUpdate();\r\n\t\t\t\t\t con.commit();\r\n\t\t\t\t\t \r\n\t\t\t\t\t //Inserting into soundex table\r\n\t\t\t\t\t query = \"insert ignore into tmp_soundex (word, soundex, docID, file_name, visible)\" + \" values (?, ?, ?, ?, ?)\";\r\n\t\t\t\t\t // insert preparedstatement\r\n\t\t\t\t\t preparedStmt = con.prepareStatement(query);\r\n\t\t\t\t\t preparedStmt.setString (1,tmpWord);\r\n\t\t\t\t\t preparedStmt.setString (2,sndx.encode(tmpWord));\r\n\t\t\t\t\t preparedStmt.setInt (3, fileNumber);\t\r\n\t\t\t\t\t preparedStmt.setString (4,tmpFile.getName());\r\n\t\t\t\t\t preparedStmt.setInt (5, 1);\t\r\n\t\t\t\t\t // execute the preparedstatement\r\n\t\t\t\t\t preparedStmt.executeUpdate();\r\n\t\t\t\t\t con.commit();\r\n\t\t\t\t\t \r\n\t\t\t\t\t preparedStmt.close();\r\n\t\t\t\t\t System.out.println(\"Inserted the word: \"+tmpWord+\" | DocID is: \"+fileNumber +\"|\" +\" Name:: \"+tmpFile.getName());\r\n\t\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t} catch(NumberFormatException nfe){\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid data input!\", \"Error!\", 2);\r\n\t\t\t\t\t}\r\n\t }\r\n\t }\r\n\t s2.close();\r\n\t }\r\n\t sc2.close();\r\n\t}", "private void train() throws IOException {\n\t\thamContent = new String();// the content of ham training files\n\t\tspamContent = new String();// the content of spam training files\n\t\tvocabulary = new ArrayList<String>();// all the\n\t\t\t\t\t\t\t\t\t\t\t\t// vocabulary\n\t\t\t\t\t\t\t\t\t\t\t\t// within\n\t\t\t\t\t\t\t\t\t\t\t\t// training\n\t\t\t\t\t\t\t\t\t\t\t\t// files\n\t\thamSenderDomainHash = new HashMap<String, Integer>();\n\t\thamTimeHash = new HashMap<String, Integer>();\n\t\thamReplyHash = new HashMap<String, Integer>();\n\t\thamNonCharNumHash = new HashMap<String, Integer>();\n\t\tspamSenderDomainHash = new HashMap<String, Integer>();\n\t\tspamTimeHash = new HashMap<String, Integer>();\n\t\tspamReplyHash = new HashMap<String, Integer>();\n\t\tspamNonCharNumHash = new HashMap<String, Integer>();\n\n\t\thamWordProb = new HashMap<String, Double>();\n\t\tspamWordProb = new HashMap<String, Double>();\n\t\tclassProb = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < 24; i++) {\n\t\t\thamTimeHash.put(String.valueOf(i), 0);\n\t\t\tspamTimeHash.put(String.valueOf(i), 0);\n\t\t}\n\t\tint numSpam = 0, numHam = 0, numFile = 0;// numbers of training files\n\t\tString buff;// file reading tmp buffer\n\n\t\t/* get all the files in the directory */\n\t\tFile directory = new File(inputDirectory);\n\t\tFile[] files = directory.listFiles();\n\n\t\t/*\n\t\t * assign the content of hams and spams while counting the number of\n\t\t * files\n\t\t */\n\t\tfor (File f : files) {\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (f.getName().startsWith(\"ham\")) {\n\t\t\t\tString readbufferString = readFile(f, 0);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (File f : files) {\n\t\t\tnumFile++;\n\t\t\t// System.out.println(f.getName());\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tnumSpam++; // add to the number of spams\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 1);\n\t\t\t\telse if (spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum,\n\t\t\t\t\t\t\tspamNonCharNumHash.get(spamNonCharNum) + 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 1);\n\t\t\t\t\telse if (spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain,\n\t\t\t\t\t\t\t\tspamSenderDomainHash.get(spamSenderDomain) + 1);\n\t\t\t\t\tif (!spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime, 1);\n\t\t\t\t\telse if (spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime,\n\t\t\t\t\t\t\t\tspamTimeHash.get(spamTime) + 1);\n\t\t\t\t\tif (!spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply, 1);\n\t\t\t\t\telse if (spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply,\n\t\t\t\t\t\t\t\tspamReplyHash.get(spamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\tspamContent += readbuffer.toLowerCase();\n\t\t\t\tspamContent = spamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\n\t\t\t} else if (f.getName().startsWith(\"ham\")) { // the same thing for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ham\n\t\t\t\tnumHam++;\n\t\t\t\tString readbuffer = readFile(f, 0);\n\t\t\t\tif (!hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 1);\n\t\t\t\telse if (hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum,\n\t\t\t\t\t\t\thamNonCharNumHash.get(hamNonCharNum) + 1);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 1);\n\t\t\t\t\telse if (hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain,\n\t\t\t\t\t\t\t\thamSenderDomainHash.get(hamSenderDomain) + 1);\n\n\t\t\t\t\tif (!hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, 1);\n\t\t\t\t\telse if (hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, hamTimeHash.get(hamTime) + 1);\n\t\t\t\t\tif (!hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply, 1);\n\t\t\t\t\telse if (hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply,\n\t\t\t\t\t\t\t\thamReplyHash.get(hamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\thamContent += readbuffer.toLowerCase();\n\t\t\t\thamContent = hamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"file read complete!!!\");\n\t\t// System.out.println(hamSenderDomainHash);\n\t\t// System.out.println(hamTimeHash);\n\t\t// System.out.println(hamReplyHash);\n\t\t// System.out.println(hamNonCharNumHash);\n\t\t// System.out.println(spamSenderDomainHash);\n\t\t// System.out.println(spamTimeHash);\n\t\t// System.out.println(spamReplyHash);\n\t\t// System.out.println(spamNonCharNumHash);\n\t\t// System.out.println(spamContent);\n\t\t// System.out.println(hamContent);\n\n\t\t/* calculate probabilities */\n\t\tpHam = (double) numHam / (double) numFile;\n\t\tpSpam = (double) numSpam / (double) numFile;\n\t\t// System.out.println(numHam);\n\t\t// System.out.println(numSpam);\n\t\t// System.out.println(numFile);\n\n\t\tclassProb.put(\"hamProb\", pHam);\n\t\tclassProb.put(\"spamProb\", pSpam);\n\n\t\t/* get vocabulary and its length */\n\t\tString[] hamWord = hamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> hamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < hamWord.length; i++) {\n\t\t\tif (hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], hamWordFreq.get(hamWord[i]) + 1);\n\t\t\tif (!hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], 1);\n\t\t}\n\t\thamWordCount = hamWord.length;\n\t\tString[] spamWord = spamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> spamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < spamWord.length; i++) {\n\t\t\tif (spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq\n\t\t\t\t\t\t.put(spamWord[i], spamWordFreq.get(spamWord[i]) + 1);\n\t\t\tif (!spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq.put(spamWord[i], 1);\n\t\t}\n\t\tspamWordCount = spamWord.length;\n\t\tSystem.out.println(hamWordFreq.size());\n\t\tSystem.out.println(spamWordFreq.size());\n\t\tSystem.out.println(\"count get!!!\");\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(spamWordCount);\n\t\tfor (int i = 0; i < hamWordCount; i++) {\n\t\t\tif (!vocabulary.contains(hamWord[i]) && !hamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(hamWord[i]);\n\t\t}\n\t\t// System.out.println(hamWordFreq);\n\t\tfor (int i = 0; i < spamWordCount; i++)\n\t\t\tif (!vocabulary.contains(spamWord[i]) && !spamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(spamWord[i]);\n\t\tvocabLen = vocabulary.size();\n\t\tSystem.out.println(\"vocab init\");\n\t\t/* remove unnecessary words */\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\tif ((hamwordFreq <= 3) && (spamwordFreq <= 3)) {\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (((double) ((double) hamwordFreq / (double) hamWordCount) >= 0.005)\n\t\t\t\t\t&& ((double) ((double) spamwordFreq / (double) spamWordCount) >= 0.005)) {\n\t\t\t\t// System.out.println(vocabulary.get(i));\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"vocab complete!!!\");\n\t\tSystem.out.println(vocabulary.size());\n\t\tvocabLen = vocabulary.size();\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\thamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (hamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (hamWordCount + vocabLen)));\n\t\t\tspamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (spamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (spamWordCount + vocabLen)));\n\t\t\t// System.out.println(i);\n\n\t\t}\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(hamContent);\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(spamWordProb.size());\n\t\t// System.out.println(vocabulary.size());\n\t\t//\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(vocabulary);\n\t\t// System.out.println(vocabLen);\n\t\tSystem.out.println(\"word prob complete!!!\");\n\t}", "public void constructDictionaries(String corpusFilePath) throws Exception {\n\n System.out.println(\"Constructing dictionaries...\");\n File dir = new File(corpusFilePath);\n for (File file : dir.listFiles()) {\n if (\".\".equals(file.getName()) || \"..\".equals(file.getName())) {\n continue; // Ignore the self and parent aliases.\n }\n System.out.printf(\"Reading data file %s ...\\n\", file.getName());\n BufferedReader input = new BufferedReader(new FileReader(file));\n String line = null;\n\n System.out.println(file.getName() + \"----------------------------------- \");\n while ((line = input.readLine()) != null) {\n\n if (line.isEmpty()) {\n continue;\n }\n\n /*\n * Remember: each line is a document (refer to PA2 handout)\n * TODO: Your code here\n */\n\n String[] words = line.trim().split(\"\\\\s+\");\n String previousWord = words[0];\n unigrams.add(previousWord);\n\n for (int i=1; i<words.length; ++i) {\n String w = words[i];\n unigrams.add(w);\n\n String bigram = previousWord + \" \" + w ;\n\n bigrams.add(bigram);\n\n previousWord = w;\n }\n\n }\n input.close();\n }\n\n computeUnigramProbabilities();\n computeBigramProbabilities();\n\n System.out.println(\"Done.\");\n }", "public void map(Object key, Text value, Context context\n\t\t ) throws IOException, InterruptedException {\n\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t String curr_string=value.toString();\n\t\t\t /// splitting based on \"*\" as a delimiter...\n\t\t\t String [] parts=curr_string.split(\"\\\\*\");\n\t\t\t String curr_key=parts[0];\n\t\t\t // Removing spaces from both left and right part of the string..\n\t\t\t String curr_value=parts[1].trim();\n\t\t\t String [] small_parts=curr_value.split(\",\");\n\t\t\t // Taking the count of unique files which are present in the input given to tfidf\n\t\t\t int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);\n\t\t\t /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....\n\t\t\t Configuration conf=context.getConfiguration();\n\t\t\t String value_count=conf.get(\"test\");\n\t\t\t if(!value_count.isEmpty())\n\t\t\t {\n\t\t\t int total_no_files=Integer.parseInt(value_count);\n\t\t\t double x=(total_no_files/no_of_unique_files);\n\t\t\t // Formula fo rcomputing the idf value....\n\t\t\t double idf_value=Math.log10(1+x);\n\t\t\t for(int i=0;i<small_parts.length-1;i++)\n\t\t\t {\n\t\t\t\t String [] waste=small_parts[i].split(\"=\");\n\t\t\t\t String file_name=waste[0];\n\t\t\t\t // Computing the tfidf on the fly...\n\t\t\t\t double tf_idf=idf_value*Double.parseDouble(waste[1]);\n\t\t\t\t Text word3 = new Text();\n\t\t\t\t Text word4 = new Text();\n\t\t\t\t word3.set(curr_key+\"#####\"+file_name+\",\");\n\t\t\t\t word4.set(tf_idf+\"\");\n\t\t\t\t context.write(word3,word4);\n\t\t\t\t \n\t\t\t }\n\t\t\t //word1.set(curr_key);\n\t\t\t //word2.set(idf_value+\"\");\n\t\t\t //context.write(word1,word2); \n\t\t\t} \n\t\t}", "@Override\n\tpublic void setTraining(String text) {\n\t\tmyWords = text.split(\"\\\\s+\");\n\t\tmyMap = new HashMap<String , ArrayList<String>>();\n\t\t\n\t\tfor (int i = 0; i <= myWords.length-myOrder; i++)\n\t\t{\n\t\t\tWordGram key = new WordGram(myWords, i, myOrder);\n\t\t\tif (!myMap.containsKey(key))\n\t\t\t{\n\t\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\tlist.add(myWords[i+myOrder]);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t} else {\n\t\t\t\t\tlist.add(PSEUDO_EOS);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(myWords[i+myOrder]);\n\t\t\t\t} else {\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(PSEUDO_EOS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}", "private static void populateDataStructures(\r\n final String filename,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsFromSessions,\r\n Map<String, List<Buy>> buysFromSessions\r\n\r\n /* add parameters as needed */\r\n )\r\n throws FileNotFoundException\r\n {\r\n try (Scanner input = new Scanner(new File(filename)))\r\n {\r\n processFile(input, sessionsFromCustomer,\r\n viewsFromSessions, buysFromSessions\r\n /* add arguments as needed */ );\r\n }\r\n }", "public ArrayList<WordMap> countWordOccurrences(String filePaths, WordMap corpus,\n Word.Polarity polarity) {\n\n Scanner sc1, sc2;\n ArrayList<WordMap> wordMaps = new ArrayList<WordMap>();\n\n // Where the training texts are located\n String subFolder;\n if (polarity == Word.Polarity.POSITIVE) subFolder = FOLDER_POSITIVE;\n else if (polarity == Word.Polarity.NEGATIVE) subFolder = FOLDER_NEGATIVE;\n else subFolder = FOLDER_NEUTRAL;\n\n try {\n String previousWord = \"\";\n\n sc1 = new Scanner(new File(filePaths));\n\n //For each training file\n while (sc1.hasNextLine()) {\n // Contains one filename per row\n String currentFile = FOLDER_TXT + subFolder + sc1.nextLine();\n\n sc2 = new Scanner(new File(currentFile));\n WordMap textMap = new WordMap(); // Map for this text\n\n while (sc2.hasNextLine()) {\n String[] words = sc2.nextLine().split(\" \");\n\n for (int j = 0; j < words.length; j++){\n //Replaces all characters which might cause us to miss the key\n String word = words[j].replaceAll(\"\\\\W\", \"\");\n\n //For each word, if it is in the WordMap increment the count\n if (corpus.has(word)) {\n // Store a new word if it has not been created\n if (!textMap.has(words[j])) {\n Word objWord = copyWord(corpus.get(word));\n textMap.put(word, objWord);\n }\n\n //If the words are negated, flip the count\n if (polarity == Word.Polarity.POSITIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountNegative(word);\n } else if (polarity == Word.Polarity.POSITIVE) {\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE) {\n textMap.addCountNegative(word);\n } else { // Neutral, don't negate\n textMap.addCountNeutral(word);\n }\n }\n\n previousWord = word;\n }\n }\n\n wordMaps.add(textMap);\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(\"Error in countWordOccurences\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n return wordMaps;\n }", "public TweetTagger() throws IOException {\n super();\n loadModel(MODEL_LOCATION);\n tfIdf = new HashMap<String, Map<String, Integer>>();\n documentFrequencyMap = new HashMap<String, Integer>();\n previousTopWords = new HashMap<String, List<Map<String, Double>>>();\n }", "@ChangeSet(order = \"001\", id = \"initialWordType\", author = \"zdoh\", runAlways = true)\n public void initWordType(MongoTemplate template) {\n partOfSpeechMap.putIfAbsent(\"num\", template.save(PartOfSpeech.builder()\n .shortName(\"num\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"числительное\"), new TranslateEntity(languageMap.get(\"en\"), \"numeral\")))\n .japanName(\"数詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n\", template.save(PartOfSpeech.builder()\n .shortName(\"n\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное\"), new TranslateEntity(languageMap.get(\"en\"), \"noun (common)\")))\n .japanName(\"名詞\")\n .kuramojiToken(\"名詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"pn\", template.save(PartOfSpeech.builder()\n .shortName(\"pn\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"местоимение\"), new TranslateEntity(languageMap.get(\"en\"), \"pronoun\")))\n .japanName(\"代名詞\")\n .kuramojiToken(\"代名詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n // no kuramoji\n partOfSpeechMap.putIfAbsent(\"hon\", template.save(PartOfSpeech.builder()\n .shortName(\"hon\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"вежливая речь\"), new TranslateEntity(languageMap.get(\"en\"), \"honorific or respectful (sonkeigo) language\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"mr-suf\", template.save(PartOfSpeech.builder()\n .shortName(\"mr-suf\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс обращения к кому-то: мистер, миссис и тд, используемый в японском языке\")))\n .build()));\n\n\n partOfSpeechMap.putIfAbsent(\"adv\", template.save(PartOfSpeech.builder()\n .shortName(\"adv\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"наречие\"), new TranslateEntity(languageMap.get(\"en\"), \"adverb\")))\n .japanName(\"副詞\")\n .kuramojiToken(\"副詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.OTHER)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"int\", template.save(PartOfSpeech.builder()\n .shortName(\"int\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"междометие\"), new TranslateEntity(languageMap.get(\"en\"), \"interjection\")))\n .japanName(\"感動詞\")\n .kuramojiToken(\"感動詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.OTHER)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"adj-na\", template.save(PartOfSpeech.builder()\n .shortName(\"adj-na\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"na-прилагательное (предикативное)\"), new TranslateEntity(languageMap.get(\"en\"), \"adjectival nouns or quasi-adjectives\")))\n .japanName(\"な形容詞\")\n .kuramojiToken(\"形容動詞語幹\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"adj-i\", template.save(PartOfSpeech.builder()\n .shortName(\"adj-i\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"i-прилагательное (полупредикативное)\"), new TranslateEntity(languageMap.get(\"en\"), \"adjective\")))\n .japanName(\"い形容詞\")\n .kuramojiToken(\"形容詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v\", template.save(PartOfSpeech.builder()\n .shortName(\"v\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол\"), new TranslateEntity(languageMap.get(\"en\"), \"verb\")))\n .japanName(\"動詞\")\n .kuramojiToken(\"動詞\")\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.MAIN)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5b\", template.save(PartOfSpeech.builder()\n .shortName(\"v5b\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ぶ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'bu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5g\", template.save(PartOfSpeech.builder()\n .shortName(\"v5g\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ぐ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'gu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5k\", template.save(PartOfSpeech.builder()\n .shortName(\"v5k\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -く\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'ku' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5k-s\", template.save(PartOfSpeech.builder()\n .shortName(\"v5k-s\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -す (специальный клаас)\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'su' ending (special class)\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5m\", template.save(PartOfSpeech.builder()\n .shortName(\"v5m\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -む\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'mu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5n\", template.save(PartOfSpeech.builder()\n .shortName(\"v5n\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ぬ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'nu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5r\", template.save(PartOfSpeech.builder()\n .shortName(\"v5r\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -る\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'ru' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5s\", template.save(PartOfSpeech.builder()\n .shortName(\"v5s\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -す\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'su' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5t\", template.save(PartOfSpeech.builder()\n .shortName(\"v5t\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -つ\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'tu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5u\", template.save(PartOfSpeech.builder()\n .shortName(\"v5u\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -う\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'u' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v5z\", template.save(PartOfSpeech.builder()\n .shortName(\"v5z\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол I-спряжение, -ず\"), new TranslateEntity(languageMap.get(\"en\"), \"Godan verb with 'zu' ending\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vi\", template.save(PartOfSpeech.builder()\n .shortName(\"vi\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"непереходный глагол\"), new TranslateEntity(languageMap.get(\"en\"), \"intransitive verb\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"prefix\", template.save(PartOfSpeech.builder()\n .shortName(\"prefix\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"префикс\"), new TranslateEntity(languageMap.get(\"en\"), \"prefix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"v1\", template.save(PartOfSpeech.builder()\n .shortName(\"v1\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"глагол II-спряжение\"), new TranslateEntity(languageMap.get(\"en\"), \"ichidan verb\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vt\", template.save(PartOfSpeech.builder()\n .shortName(\"vt\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"переходный глагол\"), new TranslateEntity(languageMap.get(\"en\"), \"transitive verb\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-adv\", template.save(PartOfSpeech.builder()\n .shortName(\"n-adv\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"отглагольное существительное\"), new TranslateEntity(languageMap.get(\"en\"), \"adverbial noun\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-t\", template.save(PartOfSpeech.builder()\n .shortName(\"n-t\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное (временное)\"), new TranslateEntity(languageMap.get(\"en\"), \"noun (temporal)\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vk\", template.save(PartOfSpeech.builder()\n .shortName(\"vk\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"специальный глагол 来る\"), new TranslateEntity(languageMap.get(\"en\"), \"来る verb - special class\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"vs\", template.save(PartOfSpeech.builder()\n .shortName(\"vs\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное, которое используется с する\"), new TranslateEntity(languageMap.get(\"en\"), \"noun or participle which takes the aux. verb suru\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"ctr\", template.save(PartOfSpeech.builder()\n .shortName(\"ctr\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"счетчик\"), new TranslateEntity(languageMap.get(\"en\"), \"counter\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-suf\", template.save(PartOfSpeech.builder()\n .shortName(\"n-suf\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное, котором может использоваться как суффикс\"), new TranslateEntity(languageMap.get(\"en\"), \"noun, used as a suffix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"n-pref\", template.save(PartOfSpeech.builder()\n .shortName(\"n-pref\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"существительное, котором может использоваться как префикс\"), new TranslateEntity(languageMap.get(\"en\"), \"noun, used as a prefix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"suf\", template.save(PartOfSpeech.builder()\n .shortName(\"suf\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс\"), new TranslateEntity(languageMap.get(\"en\"), \"suffix\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"exp\", template.save(PartOfSpeech.builder()\n .shortName(\"exp\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"выражение\"), new TranslateEntity(languageMap.get(\"en\"), \"expressions (phrases, clauses, etc.)\")))\n .build()));\n\n /// part of speech for grammar\n\n partOfSpeechMap.putIfAbsent(\"は\", template.save(PartOfSpeech.builder()\n .shortName(\"は\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"частица は\"), new TranslateEntity(languageMap.get(\"en\"), \"particle は\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"です\", template.save(PartOfSpeech.builder()\n .shortName(\"です\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"связка です\"), new TranslateEntity(languageMap.get(\"en\"), \".... です\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"じゃありません\", template.save(PartOfSpeech.builder()\n .shortName(\"じゃありません\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"разговорная отрицательная форма связки です\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"ではありません\", template.save(PartOfSpeech.builder()\n .shortName(\"ではありません\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"отрицательная форма связки です\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"か\", template.save(PartOfSpeech.builder()\n .shortName(\"か\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"вопросительная частица か\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"も\", template.save(PartOfSpeech.builder()\n .shortName(\"も\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"частица も\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"の\", template.save(PartOfSpeech.builder()\n .shortName(\"の\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"частица の\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"さん\", template.save(PartOfSpeech.builder()\n .shortName(\"さん\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс さん\")))\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.SUFFIX)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"ちゃん\", template.save(PartOfSpeech.builder()\n .shortName(\"ちゃん\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс ちゃん\")))\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.SUFFIX)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"くん\", template.save(PartOfSpeech.builder()\n .shortName(\"くん\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"суффикс くん\")))\n .kuramojiTypeOfSpeech(KuramojiTypeOfSpeech.SUFFIX)\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"これ\", template.save(PartOfSpeech.builder()\n .shortName(\"これ\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"предметно-указательное местоимение これ\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"それ\", template.save(PartOfSpeech.builder()\n .shortName(\"それ\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"предметно-указательное местоимение それ\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"あれ\", template.save(PartOfSpeech.builder()\n .shortName(\"あれ\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"предметно-указательное местоимение あれ\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"この\", template.save(PartOfSpeech.builder()\n .shortName(\"この\")\n .translateName( List.of(new TranslateEntity(languageMap.get(\"ru\"), \"относительно-указательное местоимение この\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"その\", template.save(PartOfSpeech.builder()\n .shortName(\"その\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"относительно-указательное местоимение その\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"あの\", template.save(PartOfSpeech.builder()\n .shortName(\"あの\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"относительно-указательное местоимение あの\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"文\", template.save(PartOfSpeech.builder()\n .shortName(\"文\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"показатель предложения\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"、\", template.save(PartOfSpeech.builder()\n .shortName(\"、\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"символ запятой\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"。\", template.save(PartOfSpeech.builder()\n .shortName(\"。\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"символ точки\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"お\", template.save(PartOfSpeech.builder()\n .shortName(\"お\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"показатель вежливости, префикс к существительному\")))\n .build()));\n\n partOfSpeechMap.putIfAbsent(\"name\", template.save(PartOfSpeech.builder()\n .shortName(\"name\")\n .translateName(List.of(new TranslateEntity(languageMap.get(\"ru\"), \"имя, фамилия и тд\")))\n .build()));\n\n/*\n wordTypeMap.putIfAbsent(\"\", template.save(new WordType(\"\",\n List.of(new TranslateEntity(languageMap.get(\"ru\"), \"\"), new TranslateEntity(languageMap.get(\"en\"), \"\")), \"\")));\n*/\n\n }", "public Mapper() {\n\t\t\n\t\tmirMap = scanMapFile(\"mirMap.txt\");\n\t\tgeneMap = scanMapFile(\"geneMap.txt\");\n\t\t\n\t}", "public void translate() {\n\t\tif(!init)\r\n\t\t\treturn; \r\n\t\ttermPhraseTranslation.clear();\r\n\t\t// document threshold: number of terms / / 8\r\n//\t\tdocThreshold = (int) (wordKeyList.size() / computeAvgTermNum(documentTermRelation) / 8.0);\r\n\t\t//\t\tuseDocFrequency = true;\r\n\t\tint minFrequency=1;\r\n\t\temBkgCoefficient=0.5;\r\n\t\tprobThreshold=0.001;//\r\n\t\titerationNum = 20;\r\n\t\tArrayList<Token> tokenList;\r\n\t\tToken curToken;\r\n\t\tint j,k;\r\n\t\t//p(w|C)\r\n\r\n\t\tint[] termValues = termIndexList.values;\r\n\t\tboolean[] termActive = termIndexList.allocated;\r\n\t\ttotalCollectionCount = 0;\r\n\t\tfor(k=0;k<termActive.length;k++){\r\n\t\t\tif(!termActive[k])\r\n\t\t\t\tcontinue;\r\n\t\t\ttotalCollectionCount +=termValues[k];\r\n\t\t}\r\n\t\t\r\n\t\t// for each phrase\r\n\t\tint[] phraseFreqKeys = phraseFrequencyIndex.keys;\r\n\t\tint[] phraseFreqValues = phraseFrequencyIndex.values;\r\n\t\tboolean[] states = phraseFrequencyIndex.allocated;\r\n\t\tfor (int phraseEntry = 0;phraseEntry<states.length;phraseEntry++){\r\n\t\t\tif(!states[phraseEntry]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (phraseFreqValues[phraseEntry] < minFrequency)\r\n\t\t\t\tcontinue;\r\n\t\t\ttokenList=genSignatureTranslation(phraseFreqKeys[phraseEntry]); // i is phrase number\r\n\t\t\tfor (j = 0; j <tokenList.size(); j++) {\r\n\t\t\t\tcurToken=(Token)tokenList.get(j);\r\n\t\t\t\tif(termPhraseTranslation.containsKey(curToken.getIndex())){\r\n\t\t\t\t\tIntFloatOpenHashMap old = termPhraseTranslation.get(curToken.getIndex());\r\n\t\t\t\t\tif(old.containsKey(phraseFreqKeys[phraseEntry])){\r\n\t\t\t\t\t\tSystem.out.println(\"aha need correction\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\told.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight()); //phrase, weight\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tIntFloatOpenHashMap newPhrase = new IntFloatOpenHashMap();\r\n\t\t\t\t\tnewPhrase.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight());\r\n\t\t\t\t\ttermPhraseTranslation.put(curToken.getIndex(), newPhrase);\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\toutputTransMatrix.add(i,curToken.getIndex(),curToken.getWeight());\r\n\t\t\t\t//\t\t\t\toutputTransTMatrix.add(curToken.getIndex(), i, curToken.getWeight());\r\n\t\t\t\t//TODO termPhrase exists, create PhraseTerm\r\n\t\t\t}\r\n\t\t\ttokenList.clear();\r\n\t\t}\r\n\r\n\t}", "private void handleDocument(String name,InputStream ins)\n{\n Map<String,Integer> words = new HashMap<>();\n Map<String,Integer> kgrams = new HashMap<>();\n \n try {\n String cnts = IvyFile.loadFile(ins);\n CompilationUnit cu = JcompAst.parseSourceFile(cnts);\n words = handleDocumentText(cnts);\n kgrams = buildKgramCounts(cnts,cu);\n }\n catch (IOException e) {\n IvyLog.logI(\"Problem reading document file \" + name + \": \" + e);\n }\n \n if (words.size() > 0) {\n ++total_documents;\n for (String s : words.keySet()) {\n Integer v = document_counts.get(s);\n if (v == null) document_counts.put(s,1);\n else document_counts.put(s,v+1);\n }\n }\n if (kgrams.size() > 0) {\n ++total_kdocuments;\n for (String s : kgrams.keySet()) {\n Integer v = kgram_counts.get(s);\n if (v == null) kgram_counts.put(s,1);\n else kgram_counts.put(s,v+1);\n }\n }\n}", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "public void getVector() throws IOException {\n\t\tint i=1;\r\n\t\tfor(String key:keyword){\r\n\t\t\tWord w=new Word();\r\n\t\t\tdouble tf=calTF(key);\r\n\t\t\tdouble idf=calIDF(key);\r\n\t\t\tdouble tfidf=tf*idf;\r\n\t\t\tw.setId(i);\r\n\t\t\ti++;\r\n\t\t\tw.setName(key);\r\n\t\t\tw.setTfidf(tfidf);\r\n\t\t\tif(word.containsKey(key)){\r\n\t\t\t\tw.setCount((Integer) word.get(key));\r\n\t\t\t}\r\n\t\t\tkeymap.add(w);\r\n\t\t}\r\n\t\tFileHelper.writeTrainFile(keymap);\r\n\t\tFileHelper.writeTestFile(keymap);\r\n\t}", "public WordMap generateWordMap(String filePath) {\n\n WordMap wm = new WordMap();\n Scanner sc;\n\n try {\n sc = new Scanner(new File(filePath));\n\n while (sc.hasNextLine()) {\n\n String line = sc.nextLine();\n String[] lineData = line.split(\" \");\n\n //Gets a string of the word we are currently parsing\n String word = lineData[colWord].split(\"=\")[1];\n\n wm.put(word, getWordFromLine(line));\n }\n\n } catch (Exception e) {\n System.err.println(\"Error in generateWordMap\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n sc.close();\n return wm;\n }", "private void populateDictionaryByLemmatizer() throws IOException {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n if (!(word.contains(\" \")||word.contains(\"+\") ||word.contains(\"\\\"\") ||word.contains(\"'\")||word.contains(\".\") ||word.contains(\":\") || word.contains(\"(\") || word.contains(\")\") ||word.contains(\"-\")|| word.contains(\";\"))) {\n String tokenizedWords[] = tokenize(word);\n\n if (tokenizedWords.length == 1) {\n List<String> stemmings = stanfordLemmatizer.lemmatize(word);\n\n for (int i = 0; i < stemmings.size(); i++) {\n if (!dictionaryTerms.containsKey(stemmings.get(i))) {\n dictionaryTerms.put(stemmings.get(i), tag);\n System.out.println(\"Stemming: \" + word + \"\\t\" + stemmings.get(i));\n }\n }\n }\n }\n }\n }", "public void description() throws Exception {\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \n \n // BufferedReader for obtaining the description files of the ontology & ODP\n BufferedReader br1 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/ontology_description\")); \n BufferedReader br2 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/odps_description.txt\")); \n String line1 = br1.readLine(); \n String line2 = br2.readLine(); \n \n // loop is used to copy the lines of file 1 to the other \n if(line1==null){\n\t \tpw.print(\"\\n\");\n\t }\n while (line1 != null || line2 !=null) \n { \n if(line1 != null) \n { \n pw.println(line1); \n line1 = br1.readLine(); \n } \n \n if(line2 != null) \n { \n pw.println(line2); \n line2 = br2.readLine(); \n } \n } \n pw.flush(); \n // closing the resources \n br1.close(); \n br2.close(); \n pw.close(); \n \n // System.out.println(\"Merged\"); -> for checking the code execution\n /* On obtaining the merged file, Doc2Vec model is implemented so that vectors are\n * obtained. And the, similarity ratio of the ontology description with the ODPs \n * can be found using cosine similarity \n */\n \tFile file = new File(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \t\n SentenceIterator iter = new BasicLineIterator(file);\n AbstractCache<VocabWord> cache = new AbstractCache<VocabWord>();\n TokenizerFactory t = new DefaultTokenizerFactory();\n t.setTokenPreProcessor(new CommonPreprocessor()); \n LabelsSource source = new LabelsSource(\"Line_\");\n ParagraphVectors vec = new ParagraphVectors.Builder()\n \t\t.minWordFrequency(1)\n \t .labelsSource(source)\n \t .layerSize(100)\n \t .windowSize(5)\n \t .iterate(iter)\n \t .allowParallelTokenization(false)\n .workers(1)\n .seed(1)\n .tokenizerFactory(t) \n .build();\n vec.fit();\n \n //System.out.println(\"Check the file\");->for execution of code\n PrintStream p=new PrintStream(new File(System.getProperty(\"user.dir\")+ \"/resources/description_values\")); //storing the numeric values\n \n \n Similarity s=new Similarity(); //method that checks the cosine similarity\n s.similarityCheck(p,vec);\n \n \n }", "public static void main(String[] args) {\r\n int argc = args.length;\r\n\r\n // Given only the words file\r\n if(argc == 2 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i'){\r\n String fileName = args[1];\r\n int size = 1;\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size) size = arrOfStr[i].length();\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n if(wordList.size() > size) size = wordList.size();\r\n char[][] wordSoup = wsGen( wordList, size + 2);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n\r\n // Given all args\r\n if(argc == 4 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i' && args[2].charAt(0) == '-' && args[2].charAt(1) == 's'){\r\n String fileName = args[1];\r\n int size = Integer.parseInt(args[3]);\r\n // Check max size\r\n if(size > 40){\r\n System.out.print(\"Max size 40\");\r\n return;\r\n }\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size){\r\n System.out.println(\"At least one word given doesn't fit in the size provided.\");\r\n return;\r\n }\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n char[][] wordSoup = wsGen( wordList, size);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n // Help message\r\n System.out.println(\"usage: -i file # gives file with word soup words\");\r\n System.out.println(\" -s size # gives size for the word soup\");\r\n return;\r\n }", "public static void main(String[] args, String str) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 입력\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\t\n\t\t\tString f_n = f.getName(); \n//\t\t\tSystem.out.println(f_n);\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\n\t\t\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\t\tString input = str;\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}", "public void processData(){\n try{\n\t\t resultTxt.setText(\"Man has been dropped.\\n\\n\");\n String line = input.readLine();\n while(line != null){ //not end of file\n String[] words = line.split(\"\\\\s\");\n\n if (isAMan(words)==true){\n \t\t\t output1.write(line+\"\\n\");\n \t\t }\n \t\t else if(isAWoman(words)==true) {\n \t\t\t output2.write(line+\"\\n\");\n\t\t\t resultTxt.append(line+\"\\n\");\n \t\t }\n line = input.readLine();\n }\n\n if (input != null){\n \t\t input.close();\n \t\t }\n \t\t if (output1 != null){\n \t\t output1.close();\n }\n if (output2 != null){\n \t\t output2.close();\n }\n }\n catch(IOException exc){\n exc.printStackTrace();\n System.err.println(\"Error: failed Fork input processor\");\n System.exit(1);\n }\n }", "public static void main(String[] args) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 각 문서의 특성을 추출 : Test04 - map\t\t\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\tSystem.out.println(f.getName());\n\t\t\tString f_n = f.getName(); \n\t\t\t\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n//\t\t\tSystem.out.println(Top5List);\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"문서 이름을 입력하세요 : \");\n\t\tString input = sc.next();\n\t\t\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\t\t\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}", "public UPOSMapper(String mappingFile){\n map = new ConcurrentHashMap<>();\n try {\n for(String line: Files.readAllLines(Paths.get(mappingFile))){\n line = line.trim();\n if(line.isEmpty()) continue;\n String[] tags = line.split(\"\\t\");\n map.put(tags[0], tags[1]);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tList<Paragraph> paragraphs = new ArrayList<Paragraph>();\n\t\tList<Paragraph> paragraphsWithNoSentences = new ArrayList<Paragraph>();\n\t\t\n\t\tScanner sc = null, sc1 = null;\n\t\ttry {\n\t\t\tsc = new Scanner(new File(\"testsearchtext.txt\"));\n\t\t\tsc1 = new Scanner(new File(\"testsearchentity.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsc.useDelimiter(\"[.]\");\n\t\tsc1.useDelimiter(\"[|]\");\n\t\t\n\t\tList<Sentence> sentences = new ArrayList<Sentence>();\n\t\tint sCount = 0;\n\t\tint pCount = 0;\n\t\twhile(sc.hasNext()){\n\t\t\tString temp = sc.next().trim();\n\n\t\t\tif(sCount > 0 && (sCount%10 == 0 || !sc.hasNext())){\n\t\t\t\tParagraph p = new Paragraph(pCount);\n\t\t\t\tparagraphsWithNoSentences.add(p);\n\t\t\t\t\n\t\t\t\tp = new Paragraph(pCount);\n\t\t\t\tp.setSentences(sentences);\n\t\t\t\tparagraphs.add(p);\n\t\t\t\tpCount++;\n\t\t\t\t\n\t\t\t\tsentences = new ArrayList<Sentence>();\n\t\t\t}\n\t\t\t\n\t\t\tif(!temp.equals(\"\"))\n\t\t\t\tsentences.add(new Sentence((sCount%10), temp));\n\t\t\t\n\t\t\tsCount++;\n\t\t}\n\t\t\n\t\tList<Entity> entities = new ArrayList<Entity>();\n\t\tint currType = -1; \n\t\twhile(sc1.hasNext()){\n\t\t\tString temp = sc1.next().trim();\n\t\t\tif(temp.equals(\"place\")){currType = Entity.PLACE;} else\n\t\t\tif(temp.equals(\"url\")){currType = Entity.URL;} else\n\t\t\tif(temp.equals(\"email\")){currType = Entity.EMAIL;} else\n\t\t\tif(temp.equals(\"address\")){currType = Entity.ADDRESS;} \n\t\t\telse{\n\t\t\t\tentities.add(new Entity(currType, temp));\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSource s = new Source(\"testsearchtext.txt\", \"testsearchtext.txt\");\n\t\tpt1 = new ProcessedText(s, paragraphs, null); \n\t\t\n\t\ts = new Source(\"testsearchtext1.txt\", \"testsearchtext1.txt\");\n\t\tpt2 = new ProcessedText(s, paragraphsWithNoSentences, null); \n\t\t\n\t\tpt3 = new ProcessedText();\n\t\tpt3.setParagraphs(paragraphs);\n\t\t\n\t\tpt4 = new ProcessedText();\n\t\ts = new Source(\"testsearchtext2.txt\", \"testsearchtext2.txt\");\n\t\tpt4.setMetadata(s);\n\t\t\n\t\ts = new Source(\"testsearchtext3.txt\", \"testsearchtext3.txt\");\n\t\tpt5 = new ProcessedText(s, paragraphs, entities); \n\t\t\n\t\ts = new Source(\"testsearchtext4.txt\", \"testsearchtext4.txt\");\n\t\tpt6 = new ProcessedText(s, null, entities); \n\t}", "public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }", "@Test\n public void main() throws IOException {\n currentArticle = null;\n\n for(String line: FileUtils.readLines(new File(\"D:\\\\projects\\\\вёрстка томов ИИ\\\\9 том\\\\термины.txt\"))) {\n\n Matcher matcher = compile(\"\\\\|([^\\\\|]+)\\\\|\\\\s[–\\\\-—]\\\\s(.+)\").matcher(line);\n if (matcher.find()) {\n if (currentArticle != null) {\n saveItem();\n currentArticle = null;\n }\n String term = matcher.group(1);\n String body = matcher.group(2);\n if(body.indexOf(\"см. \") != 0) {\n currentArticle = new Article(term, body);\n } /*else {\n String alias = body.replace(\"см. \", \"\").replace(\"«\", \"\").replace(\"»\", \"\").replace(\".\", \"\");\n saveAliases(alias, term);\n }*/\n } else if (currentArticle != null) {\n currentArticle.setContent(currentArticle.getContent() + \"<br/>\"+line);\n }\n }\n if (currentArticle != null) {\n saveItem();\n }\n }", "private void applyMetadataTemplateProjectES_BU_TF() {\n\t\tArrayList<ArtifactType> artifactTypes = new ArrayList<ArtifactType>();\n\t\tArrayList<DependencyType> dependencyTypes = new ArrayList<DependencyType>();\n\t\tArrayList<TaskType> taskTypes = new ArrayList<TaskType>();\n\t\tArrayList<RuleType> ruleTypes = new ArrayList<RuleType>();\n\t\tArrayList<Rule> rules = new ArrayList<Rule>();\n\t\t\n\t\tArrayList<ArtifactType> u = new ArrayList<ArtifactType>();\n\t\tArrayList<ArtifactType> p = new ArrayList<ArtifactType>();\n\t\tArrayList<DependencyType> d = new ArrayList<DependencyType>();\n\t\tString description = \"\";\n\t\t\n\t\tArtifactType ATstart = new ArtifactType(\"Start\",\".start\");\n\t\tArtifactType ATstory = new ArtifactType(\"Story\",\".txt\");\n\t\tArtifactType ATstoryTest = new ArtifactType(\"StoryTest\",\".java\");\n\t\tArtifactType ATinterface = new ArtifactType(\"Interface\",\".java\");\n\t\tArtifactType ATdomainClass = new ArtifactType(\"DomainClass\",\".java\");\n\t\tArtifactType ATdomainTest = new ArtifactType(\"DomainTest\",\".java\");\n\t\tartifactTypes.add(ATstart);\n\t\tartifactTypes.add(ATstory);\n\t\tartifactTypes.add(ATstoryTest);\n\t\tartifactTypes.add(ATinterface);\t\t\n\t\tartifactTypes.add(ATdomainClass);\n\t\tartifactTypes.add(ATdomainTest);\n\n\t\tu.add(ATstart);\n\t\tp.add(ATstory);\n\t\tDependencyType DTstory = new DependencyType(ATstart,ATstory,\"DTstory\");\n\t\td.add(DTstory);\n\t\tdependencyTypes.add(DTstory);\n\t\tdescription = \"Create a story for the project\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATstory);\n\t\tp.add(ATdomainTest);\n\t\tDependencyType DTdomainTest = new DependencyType(ATstory,ATdomainTest,\"DTdomainTest\");\n\t\td.add(DTdomainTest);\n\t\tDTdomainTest.setMultiplicity(0);\n\t\tdependencyTypes.add(DTdomainTest);\n\t\tdescription = \"Create a domain test for the story\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATdomainTest);\n\t\tp.add(ATdomainClass);\n\t\tDependencyType DTdomainClass = new DependencyType(ATdomainTest,ATdomainClass,\"DTdomainClass\");\n\t\td.add(DTdomainClass);\n\t\tdependencyTypes.add(DTdomainClass);\n\t\tdescription = \"Create a domain class for the domain test\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATdomainTest);\n\t\tp.add(ATinterface);\n\t \tDependencyType DTinterface = new DependencyType(ATdomainTest,ATinterface,\"DTinterface\");\n\t\td.add(DTinterface);\n\t\tdependencyTypes.add(DTinterface);\n\t\tdescription = \"Create a interface for the domain test\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATinterface);\n\t p.add(ATstoryTest);\n\t\tDependencyType DTstoryTest = new DependencyType(ATinterface,ATstoryTest,\"DTstoryTest\");\n\t\td.add(DTstoryTest);\n\t\tdependencyTypes.add(DTstoryTest);\n\t\tdescription = \"Create a story test for the interface\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tstatus.setArtifactTypes(artifactTypes);\n\t\tstatus.setDependencyTypes(dependencyTypes);\n\t\tstatus.setTaskTypes(taskTypes);\t\n\t\tstatus.setRuleTypes(ruleTypes);\n\t\tstatus.setRules(rules);\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 }", "public void setWorkingFiles (final Map<String, NewData> mp){\n \t\tList<String> nf = new LinkedList<String>();\n \t\tString s =\"\";\n \t\t\n \t\tfor ( String str : mp.keySet()){\n //\t\t\tthis.getFilelist().remove(str);\n //\t\t\tthis.getFilelist().put(str, mp.get(str).getLclock());\n \t\t\tthis.getFilelist().get(str).putAll(mp.get(str).getLclock());\n \n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(mp.get(str).getFileContent()));\n \t\t\t\ttry {\n \t\t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\t\tnf.add(s);\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\tthis.writeFile(this.getRoot()+ File.separatorChar +str, nf);\n \t\t\tnf.clear();\n \t\t}\n \t\n \t}", "static void parseData(Map<String, Set<String>> sourceOutputStrings, Set<String> trueTuples) throws IOException{\n\t\tBufferedReader dataFile = new BufferedReader(new FileReader(DATAFILE));\n\t\t\n\t\tSet<String> bookSet = new HashSet<String>();\n\t\tSet<String> authorSet = new HashSet<String>();\n\t\tSet<String> tupleSet = new HashSet<String>();\n\t\tSet<String> sourceSet = new HashSet<String>();\n\t\t\n\t\tString s;\n\t\tSet<String> sourceBlackList = new HashSet<String>();\n\t\t// remove below books? increases isolated errors, although there should still be correlations between errors such as using first name\n\t\tsourceBlackList.add(\"A1Books\");\n\t\tsourceBlackList.add(\"Indoo.com\");\n\t\tsourceBlackList.add(\"Movies With A Smile\");\n\t\tsourceBlackList.add(\"Bobs Books\");\n\t\tsourceBlackList.add(\"Gunars Store\");\n\t\tsourceBlackList.add(\"Gunter Koppon\");\n\t\tsourceBlackList.add(\"Quartermelon\");\n\t\tsourceBlackList.add(\"Stratford Books\");\n\t\tsourceBlackList.add(\"LAKESIDE BOOKS\");\n\t\tsourceBlackList.add(\"Books2Anywhere.com\");\n\t\tsourceBlackList.add(\"Paperbackshop-US\");\n\t\tsourceBlackList.add(\"tombargainbks\");\n\t\tsourceBlackList.add(\"Papamedia.com\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\t\n\t\tPattern pattern = Pattern.compile(\"[^a-z]\", Pattern.CASE_INSENSITIVE);\n\t\twhile ((s = dataFile.readLine()) != null) {\n\t\t\tif (s.indexOf('\\t') == -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length != 4) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String sourceId = fields[0];\n\t\t\tif (sourceBlackList.contains(sourceId)) {\n\t\t\t\t//continue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[1];\n\t\t\tfinal String authorString = fields[3];\n\t\t\tList<String> authorList = parseAuthorString(authorString);\n\t\t\t\n\t\t\tbookSet.add(bookId);\n\t\t\tauthorSet.addAll(authorList);\n\t\t\tsourceSet.add(sourceId);\n\t\t\tif (!sourceOutputStrings.containsKey(sourceId)) {\n\t\t\t\tsourceOutputStrings.put(sourceId, new HashSet<String>());\n\t\t\t}\n\t\t\tfor (String author : authorList) {\n\t\t\t\tMatcher matcher = pattern.matcher(author.trim());\n\t\t\t\tif (matcher.find()) {\n\t\t\t\t\tcontinue; // Skip author names that have a special character, since they are likely a parsing error.\n\t\t\t\t}\n\t\t\t\tif (author.equals(\"\")) { // Sometimes, trailing commas result in empty author strings. \n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfinal String tuple = bookId + \"\\t\" + author.trim();\n\t\t\t\ttupleSet.add(tuple);\n\t\t\t\tsourceOutputStrings.get(sourceId).add(tuple);\n\t\t\t}\n\t\t}\n\t\tdataFile.close();\n\n\t\tBufferedReader labelledDataFile = new BufferedReader(new FileReader(ISBNLABELLEDDATAFILE));\t\t\n\t\twhile ((s = labelledDataFile.readLine()) != null) {\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[0];\n\t\t\tfinal String authorString = fields[1];\n\t\t\tString[] authors = authorString.split(\"; \");\n\t\t\tfor (int i = 0; i < authors.length; i++) {\n\t\t\t\tauthors[i] = canonicalize(authors[i].trim());\n\t\t\t\ttrueTuples.add(bookId + \"\\t\" + authors[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlabelledDataFile.close();\n\t}", "public static void processData() {\n\t\tString dirName = \"C:\\\\research_data\\\\mouse_human\\\\homo_b47_data\\\\\";\r\n\t//\tString GNF1H_fName = \"GNF1H_genes_chopped\";\r\n\t//\tString GNF1M_fName = \"GNF1M_genes_chopped\";\r\n\t\tString GNF1H_fName = \"GNF1H\";\r\n\t\tString GNF1M_fName = \"GNF1M\";\r\n\t\tString mergedValues_fName = \"GNF1_merged_expression.txt\";\r\n\t\tString mergedPMA_fName = \"GNF1_merged_PMA.txt\";\r\n\t\tString discretizedMI_fName = \"GNF1_discretized_MI.txt\";\r\n\t\tString discretizedLevels_fName = \"GNF1_discretized_levels.txt\";\r\n\t\tString discretizedData_fName = \"GNF1_discretized_data.txt\";\r\n\t\t\r\n\t\tboolean useMotifs = false;\r\n\t\tMicroArrayData humanMotifs = null;\r\n\t\tMicroArrayData mouseMotifs = null;\r\n\t\t\r\n\t\tMicroArrayData GNF1H_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1H_PMA = new MicroArrayData();\r\n\t\tGNF1H_PMA.setDiscrete();\r\n\t\tMicroArrayData GNF1M_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1M_PMA = new MicroArrayData();\r\n\t\tGNF1M_PMA.setDiscrete();\r\n\t\t\r\n\t\ttry {\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma\"); */\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.txt.homob44\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.txt.homob44\"); */\r\n\t\t\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.sn.txt\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.sn.txt\");\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\tif (useMotifs) {\r\n\t\t\thumanMotifs = new MicroArrayData();\r\n\t\t\tmouseMotifs = new MicroArrayData();\r\n\t\t\tloadMotifs(humanMotifs,GNF1H_value.geneNames,mouseMotifs,GNF1M_value.geneNames);\r\n\t\t}\r\n\t\t\r\n\t\t// combine replicates in PMA values\r\n\t\tint[][] H_PMA = new int[GNF1H_PMA.numRows][GNF1H_PMA.numCols/2];\r\n\t\tint[][] M_PMA = new int[GNF1M_PMA.numRows][GNF1M_PMA.numCols/2];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\tint v = 0;\r\n\t\tk = 0;\r\n\t\tj = 0;\r\n\t\twhile (j<GNF1H_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<H_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1H_PMA.dvalues[i][j] > 0 & GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0 | GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tH_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tj = 0;\r\n\t\tk = 0;\r\n\t\twhile (j<GNF1M_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<M_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1M_PMA.dvalues[i][j] > 0 & GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0 | GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tM_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tint numMatched = 31;\r\n\t\t\r\n\t/*\tGNF1H_value.numCols = numMatched;\r\n\t\tGNF1M_value.numCols = numMatched; */\r\n\t\t\r\n\t\tint[][] matchPairs = new int[numMatched][2];\r\n\t\tfor(i=0;i<numMatched;i++) {\r\n\t\t\tmatchPairs[i][0] = i;\r\n\t\t\tmatchPairs[i][1] = i + GNF1H_value.numCols;\r\n\t\t}\r\n\t\t\r\n\t//\tDiscretizeAffyData H_discretizer = new DiscretizeAffyData(GNF1H_value.values,H_PMA,0);\r\n\t//\tH_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1H_value.values,H_PMA,GNF1H_value.numCols);\r\n\t\t\r\n\t//\tDiscretizeAffyData M_discretizer = new DiscretizeAffyData(GNF1M_value.values,M_PMA,0);\r\n\t//\tM_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1M_value.values,M_PMA,GNF1M_value.numCols);\r\n\t\t\r\n\t\tdouble[][] mergedExpression = new double[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[][] mergedPMA = new int[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[] species = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1H_value.values[i],0,mergedExpression[i],0,GNF1H_value.numCols);\r\n\t\t\tSystem.arraycopy(H_PMA[i],0,mergedPMA[i],0,GNF1H_value.numCols);\t\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1M_value.values[i],0,mergedExpression[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t\tSystem.arraycopy(M_PMA[i],0,mergedPMA[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate experiment and gene names\r\n\t\tfor (i=0;i<GNF1H_value.numCols;i++) {\r\n\t\t\tGNF1H_value.experimentNames[i] = \"h_\" + GNF1H_value.experimentNames[i];\r\n\t\t\tspecies[i] = 1;\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numCols;i++) {\r\n\t\t\tGNF1M_value.experimentNames[i] = \"m_\" + GNF1M_value.experimentNames[i];\r\n\t\t\tspecies[i+GNF1H_value.numCols] = 2;\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedExperimentNames = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\tSystem.arraycopy(GNF1H_value.experimentNames,0,mergedExperimentNames,0,GNF1H_value.numCols);\r\n\t\tSystem.arraycopy(GNF1M_value.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\tif (useMotifs) {\r\n\t\t\tSystem.arraycopy(humanMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols,humanMotifs.numCols);\r\n\t\t\tSystem.arraycopy(mouseMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols+humanMotifs.numCols,mouseMotifs.numCols);\r\n\t\t\tfor (i=0;i<humanMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols] = 3;\r\n\t\t\t}\r\n\t\t\tfor (i=0;i<mouseMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols] = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedGeneNames = new String[GNF1H_value.numRows];\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tmergedGeneNames[i] = GNF1H_value.geneNames[i] + \"|\" + GNF1M_value.geneNames[i];\r\n\t\t}\r\n\t\t\r\n\t\tint[] filterList = new int[GNF1M_value.numRows];\r\n\t\tint numFiltered = 0;\r\n\t\tdouble maxExpressedPercent = 1.25;\r\n\t\tint maxExpressed_H = (int) Math.floor(maxExpressedPercent*((double) GNF1H_value.numCols));\r\n\t\tint maxExpressed_M = (int) Math.floor(maxExpressedPercent*((double) GNF1M_value.numCols));\r\n\t\tint numExpressed_H = 0;\r\n\t\tint numExpressed_M = 0;\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tnumExpressed_H = 0;\r\n\t\t\tfor (j=0;j<GNF1H_value.numCols;j++) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1H_value.values[i][j])) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t\t\tnumExpressed_H++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnumExpressed_M = 0;\r\n\t\t\tfor (j=0;j<GNF1M_value.numCols;j++) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1M_value.values[i][j])) {\r\n\t\t\t\t\tnumExpressed_M++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (numExpressed_M >= maxExpressed_M | numExpressed_H >= maxExpressed_H) {\r\n\t\t\t\tfilterList[i] = 1;\r\n\t\t\t\tnumFiltered++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tGNF1H_value = null;\r\n\t\tGNF1H_PMA = null;\r\n\t\tGNF1M_value = null;\r\n\t\tGNF1M_PMA = null;\r\n\t\t\r\n\t\tdouble[][] mergedExpression2 = null;\r\n\t\tif (numFiltered > 0) {\r\n\t\t\tk = 0;\r\n\t\t\tint[][] mergedPMA2 = new int[mergedPMA.length-numFiltered][mergedPMA[0].length];\r\n\t\t\tif (!useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length];\r\n\t\t\t} else {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t}\r\n\t\t\tString[] mergedGeneNames2 = new String[mergedGeneNames.length-numFiltered];\r\n\t\t\tfor (i=0;i<filterList.length;i++) {\r\n\t\t\t\tif (filterList[i] == 0) {\r\n\t\t\t\t\tmergedPMA2[k] = mergedPMA[i];\r\n\t\t\t\t\tif (!useMotifs) {\r\n\t\t\t\t\t\tmergedExpression2[k] = mergedExpression[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[k],0,mergedExpression[i].length);\r\n\t\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[k],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[k],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmergedGeneNames2[k] = mergedGeneNames[i];\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmergedPMA = mergedPMA2;\r\n\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\tmergedGeneNames = mergedGeneNames2;\r\n\t\t} else {\r\n\t\t\tif (useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t\tfor (i=0;i<mergedExpression.length;i++) {\r\n\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[i],0,mergedExpression[i].length);\r\n\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[i],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[i],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t}\r\n\t\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tDiscretizeAffyPairedData discretizer = new DiscretizeAffyPairedData(mergedExpression,mergedPMA,matchPairs,20);\r\n\t\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = discretizer.expression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = discretizer.numExperiments;\r\n\t\tmergedData.numRows = discretizer.numGenes;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tdiscretizer.discretizeDownTree(dirName+discretizedMI_fName);\r\n\t\t\tdiscretizer.mergeDownLevels(3,dirName+discretizedLevels_fName);\r\n\t\t\tdiscretizer.transposeDExpression();\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t\tmergedData.dvalues = discretizer.dExpression;\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t/*\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = mergedExpression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = mergedExpression[0].length;\r\n\t\tmergedData.numRows = mergedExpression.length;\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t//\tmergedData.dvalues = simpleDiscretization(mergedExpression,mergedPMA);\r\n\t\t\tmergedData.dvalues = simpleDiscretization2(mergedExpression,species);\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} */\r\n\t\t\r\n\t}", "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 }", "private void extractFile() {\n try (BufferedReader buffered_reader = new BufferedReader(new FileReader(source_file))) {\n String line;\n while((line = buffered_reader.readLine()) != null) {\n String spaceEscaped = line.replace(\" \", \"\");\n //file was read, each line is one of the elements of the file_read_lines list\n //line 0 is keyword \"TELL\"\n //line 1 is the knowledge base\n //line 2 is the keyword \"ASK\"\n //line 3 is the query\n file_read_lines.add(spaceEscaped);\n }\n\n //generate list of Horn clauses (raw) from the KB raw sentence\n //replace \\/ by |\n String kbLine = file_read_lines.get(1).replace(\"\\\\/\", \"|\");\n rawClauses = Arrays.asList(kbLine.split(\";\"));\n //query - a propositional symbol\n query = file_read_lines.get(3);\n } catch (IOException e) {\n //Return error if file cannot be opened\n error = true;\n System.out.println(source_file.toString() + \" is not found!\");\n }\n }", "private void populateDictionaryBySynonyms() {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n ArrayList<String> synonyms = PyDictionary.findSynonyms(word);\n\n for (int i = 0; i < synonyms.size(); i++) {\n if (!dictionaryTerms.containsKey(synonyms.get(i))) {\n dictionaryTerms.put(synonyms.get(i), tag);\n }\n }\n }\n }", "private void processBulk()\n {\n File inDir = new File(m_inDir);\n String [] fileList = inDir.list();\n \n for (int j=0; j<fileList.length; j++)\n {\n String file = fileList[j];\n if (file.endsWith(\".xml\"))\n {\n m_inFile = m_inDir + \"/\" + file;\n m_localeStr = Utilities.extractLocaleFromFilename(file);\n processSingle();\n }\n }\n }", "private static ArrayList<String> ReadTrigramsChar(String corpusPath, String ngramPath) {\n Hashtable<String, Integer> oNgrams = new Hashtable<>();\n ArrayList<String> aNgrams = new ArrayList<>();\n\n if (new File(ngramPath).exists()) {\n FileReader fr = null;\n BufferedReader bf = null;\n\n try {\n fr = new FileReader(ngramPath);\n bf = new BufferedReader(fr);\n String sCadena = \"\";\n\n while ((sCadena = bf.readLine())!=null)\n {\n String []data = sCadena.split(\":::\");\n if (data.length==2) {\n String sTerm = data[0];\n aNgrams.add(sTerm);\n }\n }\n } catch (Exception ex) {\n System.out.println(ex.toString());\n } finally {\n if (bf!=null) { try { bf.close(); } catch (Exception k) {} }\n if (fr!=null) { try { fr.close(); } catch (Exception k) {} }\n }\n } else {\n ArrayList<File> files = getFilesFromSubfolders(corpusPath, new ArrayList<File>());\n //File directory = new File(corpusPath);\n //File []files = directory.listFiles();\n\n int countFiles = 0;\n for (File file : files) {\n System.out.println(\"--> Preprocessing \" + (++countFiles) + \"/\" + files.size());\n\n try {\n Scanner scn = new Scanner(file, \"UTF-8\");\n\n //Reading and Parsing Strings to Json\n while(scn.hasNext()){\n JSONObject tweet= (JSONObject) new JSONParser().parse(scn.nextLine());\n\n String textTweet = (String) tweet.get(\"text\");\n\n StringReader reader = new StringReader(textTweet);\n\n NGramTokenizer gramTokenizer = new NGramTokenizer(reader, MINSIZENGRAM, MAXSIZENGRAM);\n CharTermAttribute charTermAttribute = gramTokenizer.addAttribute(CharTermAttribute.class);\n gramTokenizer.reset();\n\n while (gramTokenizer.incrementToken()){\n String sTerm = charTermAttribute.toString();\n if (sTerm.endsWith(\":\")){\n sTerm = sTerm.substring(0, sTerm.length()-1);\n }\n int iFreq = 0;\n if (oNgrams.containsKey(sTerm)) {\n iFreq = oNgrams.get(sTerm);\n }\n oNgrams.put(sTerm, ++iFreq);\n //System.out.println(charTermAttribute.toString());\n }\n\n gramTokenizer.end();\n gramTokenizer.close();\n }\n } catch (Exception ex) {\n System.out.println(\"Error reading JSON file\");\n }\n }\n\n //Se ordena por frecuencia\n ValueComparator bvc = new ValueComparator(oNgrams);\n TreeMap<String,Integer> sorted_map = new TreeMap<>(bvc);\n sorted_map.putAll(oNgrams);\n\n //Se guarda en disco\n FileWriter fw = null;\n try {\n fw = new FileWriter(ngramPath);\n for( Iterator it = sorted_map.keySet().iterator(); it.hasNext();) {\n String sTerm = (String)it.next();\n int iFreq = oNgrams.get(sTerm);\n\n aNgrams.add(sTerm);\n fw.write(sTerm + \":::\" + iFreq + \"\\n\");\n fw.flush();\n }\n } catch (Exception ex) {\n System.out.println(\"ERROR: \" + ex.toString());\n } finally {\n if (fw!=null) { try {fw.close();} catch(Exception k) {} }\n }\n }\n\n return aNgrams;\n }", "protected MergeSpellingData()\r\n\t{\r\n\t}", "public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\t// word -> number of times that it appears over all files\n \n Map< Character, Set<String> > globalWordSetsPerCharacter = new ConcurrentHashMap<>();\n \n // NOTE(jakob): The CountDownLatch no longer keeps track of the\n // amount of threads left, it instead is a blocking barrier\n // that the main thread will wait for to open, which happens\n // once our AtomicInteger (which is our actual\n // thread counter) reaches zero.\n\t\tCountDownLatch latch = new CountDownLatch( 1 ); // Wait and see (^:\n AtomicInteger activeThreadCount = new AtomicInteger(0);\n \n\t\tFiles.walk(Path.of(\"data/\"))\n .filter(Files::isRegularFile)\n\t\t\t.map( path -> new Thread( () -> {\n activeThreadCount.incrementAndGet();\n\t\t\t\tcomputeOccurrences( path, globalWordSetsPerCharacter );\n\t\t\t\t\n // Now this is a bit tricky.\n // It is in essence a check-then-act race condition.\n // The thread safety of this relies on the fact that only the\n // last thread to finish will get a return value of 0 from the\n // decrementAndGet method on the AtomicInt (Since it is atomic).\n // POST CLASS: We actually discussed that this would not work in\n // all cases, if for instance the first thread finishes before\n // any other thread has been started yet. Look at the solution\n // we developed together to see a solution that does not have\n // this problem. (^:\n if (activeThreadCount.decrementAndGet() == 0) {\n latch.countDown();\n }\n\t\t\t} ) )\n\t\t\t.forEach( Thread::start );\n\n\t\ttry {\n\t\t\tlatch.await();\n\t\t} catch( InterruptedException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tglobalWordSetsPerCharacter.forEach(\n (character, words) -> System.out.println( character + \": \" + words ) );\n\t}", "public void init( String dictionaryFilePath) throws IOException {\n if(dictionaryFilePath == null || dictionaryFilePath.isEmpty()) {\n dictionaryFilePath = DEFAULT_DICTIONARY;\n log.warn(\"Using Default Dictionary\");\n }\n\n DICTIONARY = Files.readAllLines(Paths.get(dictionaryFilePath))\n .parallelStream()\n .map(line -> line.replaceAll(\"[^a-zA-Z ]\", \"\"))\n .map(Word::new)\n .collect(Collectors.toCollection(ConcurrentLinkedQueue::new));\n }", "public static void main(String[] args) throws IOException{\n\t\tint termIndex = 1;\n\t\t\n\t\t// startOffset holds the start offset for each term in\n\t\t// the corpus.\n\t\tlong startOffset = 0;\n\t\t\t\n\t\t// unique_terms is true if there are atleast one more\n\t\t// unique term in corpus.\n\t\tboolean unique_terms = true;\n\t\t\n\t\t\n\t\t//load the stopwords from the HDD\n\t\tString stopwords = getStopWords();\n\t\t\n\t\t// allTokenHash contains all the terms and its termid\n\t\tHashMap<String, Integer> allTermHash = new HashMap<String, Integer>();\n\t\t\n\t\t// catalogHash contains the term and its position in\n\t\t// the inverted list present in the HDD.\n\t\tHashMap<Integer, Multimap> catalogHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// finalCatalogHash contains the catalogHash for the invertedIndexHash\n\t\t// present in the HDD.\n\t\tHashMap<Integer, String> finalCatalogHash = new HashMap<Integer, String>();\n\t\t\n\t\t// token1000Hash contains the term and Dblocks for the first 1000\n\t\tHashMap<Integer, Multimap> token1000DocHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// documentHash contains the doclength of all the documents in the corpus\n\t\tHashMap<String, String> documentHash = new HashMap<String, String>();\t\n\t\t\n\t\t// id holds the document id corresponding to the docNumber.\n\t\tint id = 1;\n\t\t\n\t\t// until all unique terms are exhausted\n\t\t// pass through the documents and index the terms.\n\t\t//while(unique_terms){\n\t\t\t\n\t\t\tFile folder = new File(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/ap89_collection\");\n\t\t\t//File folder = new File(\"C:/Users/Naveen/Desktop/TestFolder\");\n\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\n\t\t\t//for each file in the folder \n\t\t\tfor (File file : listOfFiles) {\n\t\t\t if (file.isFile()) {\n\t\t\t \t\n\t\t\t \tString str = file.getPath().replace(\"\\\\\",\"//\");\n\t\t\t \t\n\t\t\t \t\n\t\t\t\t\t//Document doc = new Document();\n\t\t\t //System.out.println(\"\"+str);\n\t\t\t\t\t//variables to keep parse document.\n\t\t\t\t\tint docCount = 0;\n\t\t\t\t\tint docNumber = 0;\n\t\t\t\t\tint endDoc = 0;\n\t\t\t\t\tint textCount = 0;\n\t\t\t\t\tint noText = 0;\n\t\t\t\t\tPath path = Paths.get(str);\n\t\t\t\t\t\n\t\t\t\t\t//Document id and text\n\t\t\t\t\tString docID = null;\n\t\t\t\t\tString docTEXT = null;\n\t\t\t\t\t\n\t\t\t\t\t//Stringbuffer to hold the text of each document\n\t\t\t\t\tStringBuffer text = new StringBuffer();\n\t\t\t\t\t\n\t\t\t\t\tScanner scanner = new Scanner(path);\n\t\t\t\t\twhile(scanner.hasNext()){\n\t\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\t\tif(line.contains(\"<DOC>\")){\n\t\t\t\t\t\t\t++docCount;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"</DOC>\")){\n\t\t\t\t\t\t\t++endDoc;\n\t\t\t\t\t\t\tdocTEXT = text.toString();\n\t\t\t\t\t\t\t//docTEXT = docTEXT.replaceAll(\"[\\\\n]\",\" \");\n\t\t\t\t\t\t\tSystem.out.println(\"ID: \"+id);\n\t\t\t\t\t\t\t//System.out.println(\"TEXT: \"+docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stop words removed\n\t\t\t\t\t\t\tPattern pattern1 = Pattern.compile(\"\\\\b(?:\"+stopwords+\")\\\\b\\\\s*\", Pattern.CASE_INSENSITIVE);\n\t\t\t\t\t\t\tMatcher matcher1 = pattern1.matcher(docTEXT);\n\t\t\t\t\t\t\tdocTEXT = matcher1.replaceAll(\"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stemming\n\t\t\t\t\t\t\t//docTEXT = stemmer(docTEXT);\n\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\tint docLength = 1;\n\t\t\t\t\t\t\t// regex to build the tokens from the document text\n\t\t\t\t\t\t\tPattern pattern = Pattern.compile(\"\\\\w+(\\\\.?\\\\w+)*\");\n\t\t\t\t\t\t\tMatcher matcher = pattern.matcher(docTEXT.toLowerCase());\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (int i = 0; i < matcher.groupCount(); i++) {\n\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\n\t\t\t\t\t\t\t\t\t// alltermHash contains term and term id\n\t\t\t\t\t\t\t\t\t// if term is present in the alltermHash\n\t\t\t\t\t\t\t\t\tif(allTermHash.containsKey(matcher.group(i))){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tint termId = allTermHash.get(matcher.group(i));\n\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\t//if term is present in the token1000Hash\n\t\t\t\t\t\t\t\t\t\t//then update the dblock of the term.\n\t\t\t\t\t\t\t\t\t\tif(token1000DocHash.containsKey(termId)){\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockUpdate = token1000DocHash.get(termId);\n\t\t\t\t\t\t\t\t\t\t\t//Multimap<Integer, Integer> dBlockUpdate = token1000DocHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\tif(dBlockUpdate.containsKey(id)){\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\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\t//if term is not present in the token1000hash\n\t\t\t\t\t\t\t\t\t\t//then add the token with its dBlock\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termId, dBlockInsert);\t\n\t\t\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\t// if the term is not present I will put the term into allTermHash\n\t\t\t\t\t\t\t\t\t// put corresponding value into the token1000DocHash and increment\n\t\t\t\t\t\t\t\t\t// termIndex\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tallTermHash.put(matcher.group(i),termIndex);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termIndex, dBlockInsert);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttermIndex++;\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\tdocLength++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(id%1000 == 0){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// then dump index file to HDD\n\t\t\t\t\t\t\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// update catalog file\n\t\t\t\t\t\t\t\t\t// to populate catalogHash with the offset\n\t\t\t\t\t\t\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\t\t\t\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\t\t\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\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\telse{\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\t\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\t\n\t\t\t\t\t\t\t\t\t//clear the token1000DocHash\n\t\t\t\t\t\t\t\t\ttoken1000DocHash.clear();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocumentHash.put(docID, \"\"+id+\":\"+docLength);\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t\ttext = new StringBuffer();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<DOCNO>\")){\n\t\t\t\t\t\t\t++docNumber;\n\t\t\t\t\t\t\tdocID = line.substring(8, 21);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<TEXT>\")){\n\t\t\t\t\t\t\t++textCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((line.contains(\"<DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DOCNO>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FILEID>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FIRST>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<SECOND>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DATELINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</TEXT>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<TEXT>\"))){\n\t\t\t\t\t\t\t ++noText;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(endDoc == docCount - 1){\n\t\t\t\t\t\t\ttext.append(line);\n\t\t\t\t\t\t\ttext.append(\" \");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \t\n\t\t\t }//end of if - to check if this is a file and parse.\n\t\t\t \n\t\t\t}//end of for loop to load each file\n\t\t\t\n\t\t//}//end of while loop \n\t\t\n\t// write catalogfile to the hdd to check.\n\t\t\t\n\t\t\t// then dump index file to HDD\n\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\n\t\t\t// update catalog file\n\t\t\t// to populate catalogHash with the offset\n\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twriteInvertedIndex(catalogHash,\"catalogHash\");\n\t\t\tprintHashMapSI(allTermHash);\n\t\t\tprintHashMapSS(documentHash);\n\t\t\t\n\t\t\tlong InvIndstartOffset = 0;\n\t\t\t\n\t\t\t//write it to file\n \n\t\t\t//change the finalcatalogHash to the form termid:startoffset:length\n\t\t\tfor (Integer name: catalogHash.keySet()){\n\t String key = name.toString();\n\t String value = catalogHash.get(name).toString(); \n\t //System.out.println(key + \" \" + value); \n\t String finalTermIndex = genInvertedIndex(key, value);\n\t finalTermIndex = key+\":\"+finalTermIndex;\n\t int indexLength = finalTermIndex.length();\n\t \n\t \n\t PrintWriter writer = new PrintWriter(new BufferedWriter\n\t \t\t(new FileWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/InvertedIndex\", true)));\n\t writer.println(finalTermIndex);\n\t writer.close();\n\t \n\t //update the finalcatalogHash\n\t //Multimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t//catInsert.put(String.valueOf(InvIndstartOffset), String.valueOf(indexLength));\n\t\t\t\tfinalCatalogHash.put(name, String.valueOf(InvIndstartOffset)+\":\"+String.valueOf(indexLength));//entry.getValue());\n\t\t\t\tInvIndstartOffset += indexLength+2;\n\t \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tprintHashMapIS(finalCatalogHash);\n\t\t\t\n\t}", "private void setWords() {\r\n words = new ArrayList<>();\r\n\r\n String line = null;\r\n try {\r\n // FileReader reads text files in the default encoding.\r\n FileReader fileReader = new FileReader(\"words.txt\");\r\n\r\n // Always wrap FileReader in BufferedReader.\r\n BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\r\n while((line = bufferedReader.readLine()) != null)\r\n words.add(line);\r\n\r\n // Always close files.\r\n bufferedReader.close();\r\n }\r\n catch(Exception ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"Unable to open file '\");\r\n }\r\n }", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "void parse(String fileName1,String fileName2) {\n\t\tString sCurrentLine;\n\t\tbr = null;\n\t\t\n\t\t//first read the fileName1\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(fileName1));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"File provided as the first argument is not found\");\n\t\t}\n\t\ttry {\n\t\t\t//For Users.xml\n\t\t\t//read current line and then first extract the attributes and then the\n\t\t\t//\tdata between the double quotes\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tMatcher m = id.matcher(sCurrentLine);\n\t\t\t\tMatcher dispName = name.matcher(sCurrentLine);\n\t\t\t\tMatcher dbQuotes,num;\n\t\t\t\tif (m.find() && dispName.find()){\n\t\t\t\t\tnum = number.matcher(m.group());\n\t\t\t\t\tdbQuotes = quotes.matcher(dispName.group());\n\t\t\t\t\tnum.find();\n\t\t\t\t\tdbQuotes.find();\n\t\t\t\t\tuserMap.put(Integer.parseInt(num.group()), dbQuotes.group());\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Some Error in Reading the referred file\");\n\t\t}\n\t\tcatch (IllegalStateException e){\n\t\t\tSystem.out.println(\"Illegal call to the function m.find() or pattern not found\");\n\t\t}\n\t\t\n\t\t\n\t\ttry {\n\t\t\t//read the second file\n\t\t\tbr = new BufferedReader(new FileReader(fileName2));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"File provided as the first argument is not found\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t//For posts.xml\n\t\t\t//read current line and then first extract the attributes and then the\n\t\t\t//\tdata between the double quotes\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tMatcher m = postType.matcher(sCurrentLine);\n\t\t\t\tMatcher owner = ownerId.matcher(sCurrentLine);\n\t\t\t\tMatcher ownId,postNum;\n\t\t\t\tif (m.find() && owner.find()){\n\t\t\t\t\townId = number.matcher(owner.group());\n\t\t\t\t\tpostNum = number.matcher(m.group());\n\t\t\t\t\townId.find();\n\t\t\t\t\tpostNum.find();\n\t\t\t\t\tint key = Integer.parseInt(postNum.group());\n\t\t\t\t\tint own = Integer.parseInt(ownId.group());\n\t\t\t\t\tif (key == 1){\n\t\t\t\t\t\t//if the post is a question\n\t\t\t\t\t\tif(postsMapQuestions.containsKey(own)){\n\t\t\t\t\t\t\tpostsMapQuestions.put(own,postsMapQuestions.get(own)+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tpostsMapQuestions.put(own, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//this post is an answer\n\t\t\t\t\t\tif(postsMapAnswers.containsKey(own)){\n\t\t\t\t\t\t\tpostsMapAnswers.put(own,postsMapAnswers.get(own)+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tpostsMapAnswers.put(own, 1);\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} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Some Error in Reading the referred file\");\n\t\t}\n\t\tcatch (IllegalStateException e){\n\t\t\tSystem.out.println(\"Illegal call to the function m.find() or pattern not found\");\n\t\t}\n\t}", "public static void populateAndLoadLootList(File capsuleConfigDir, String[] lootTemplatesPaths, Map<String, LootPathData> outLootTemplatesData) {\n for (String path : lootTemplatesPaths) {\r\n LootPathData data = outLootTemplatesData.get(path);\r\n\r\n File templateFolder = new File(capsuleConfigDir.getParentFile().getParentFile(), path);\r\n\r\n if (!templateFolder.exists()) {\r\n templateFolder.mkdirs();\r\n // initial with example capsule the first time\r\n LOGGER.info(\"First load: initializing the loots in \" + path + \". You can change the content of folder with any nbt structure block, schematic, or capsule file. You can remove the folders from capsule.config to remove loots.\");\r\n String assetPath = \"assets/capsule/loot/common\";\r\n if (templateFolder.getPath().contains(\"uncommon\")) assetPath = \"assets/capsule/loot/uncommon\";\r\n if (templateFolder.getPath().contains(\"rare\")) assetPath = \"assets/capsule/loot/rare\";\r\n populateFolder(templateFolder, assetPath);\r\n }\r\n\r\n data.files = new ArrayList<>();\r\n iterateTemplates(templateFolder, templateName -> {\r\n data.files.add(templateName);\r\n });\r\n }\r\n }", "public static void main(String[] args)\r\n\t{\n\t\tacceptConfig();\r\n\t\treadDictionary();\r\n\t\t//Then, it reads the input file and it prints the word (if contained on the file) or the suggestions\r\n\t\t//(if not contained) in the output file. These files are given by command line arguments\r\n\t\tprocessFile(args[0], args[1]);\r\n\t\t\r\n\t}", "public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void moodInitialize() {\n\t\t\n\t\tFile moodDirectory = new File(\"FoodMood/src/TextFiles/\");\n\t\tmoodArray = moodDirectory.list();\n\t\tString [] names = new String[moodArray.length];\n\t\tfor(int i = 0; i < moodArray.length;i++) {\n\t\t\tnames[i] = moodArray[i].replace(\".txt\", \"\");\n\t\t}\n\t\tfor (int i = 0; i < moodArray.length; i++) {\n\t\t\tmoods.add(names[i]);\n\t\t}\n\t}", "public WordNet(String synsetFilename, String hyponymFilename) {\n\n synset = new HashMap<Integer, ArrayList<String>>();\n synsetRev = new HashMap<ArrayList<String>, Integer>();\n hyponym = new ArrayList<ArrayList<Integer>>();\n // hyponym = new HashMap<Integer,ArrayList<Integer>>();\n\n In syn = new In(synsetFilename);\n In hypo = new In(hyponymFilename);\n\n while (!syn.isEmpty()) {\n String line = syn.readLine();\n String[] split1 = line.split(\",\");\n int stempkey = Integer.parseInt(split1[0]);\n String syns = split1[1];\n String[] temps = syns.split(\" \");\n ArrayList<String> stempval = new ArrayList<String>();\n for (String s : temps) {\n stempval.add(s);\n }\n synset.put(stempkey, stempval);\n synsetRev.put(stempval, stempkey);\n }\n\n while (!hypo.isEmpty()) {\n String line = hypo.readLine();\n String[] arrayOfStrings = line.split(\",\");\n ArrayList<Integer> integersAL = new ArrayList<Integer>();\n for (int i = 0; i < arrayOfStrings.length; i++) {\n integersAL.add(Integer.parseInt(arrayOfStrings[i]));\n }\n hyponym.add(integersAL);\n\n // ArrayList<Integer> valuesAL = new ArrayList<Integer>();\n // for (Integer i : integersAL) {\n // valuesAL.add(i);\n // }\n // int comma1 = line.indexOf(\",\");\n // int htempkey = Integer.parseInt(line.substring(0,comma1));\n // String sub = line.substring(comma1 + 1);\n // String[] arrayOfStrings = sub.split(\",\");\n // hyponym.put(htempkey, integersAL);\n }\n }", "public static void startup() {\n\t\tString thisLine;\n\t\tString currentName = \"\";\n\t\tboolean next = true;\n\n\t\t// DEBUG\n\t\t// System.out.println(\"entered here\");\n\n\t\t// Loop across the arguments\n\n\t\t// Open the file for reading\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(GIGA_WORD));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// .replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tString[] wordNumber = str.split(\"[ ]{2,}\");\n\t\t\t\tString word = wordNumber[0].toLowerCase();\n\t\t\t\tint cnt = Integer.parseInt(wordNumber[1]);\n\t\t\t\tgigaMap.put(word, cnt);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t\tbr = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tif (str.equals(\"[Term]\")) {\n\t\t\t\t\tnext = true;\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"name:\")) {\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tcurrentName = str.replaceAll(\"name: \", \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"synonym:\")) {\n\t\t\t\t\tif (str.contains(\"EXACT\") || str.contains(\"NARROW\")) {\n\t\t\t\t\t\t// synonym..\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"synonym:.*\\\"(.*)\\\".*\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(str);\n\t\t\t\t\t\t// DEBUG\n\t\t\t\t\t\t// System.err.println(str);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tString syno = matcher.group(1);\n\t\t\t\t\t\t\tif (!currentName.equals(\"\")) {\n\t\t\t\t\t\t\t\t// System.err.format(\"%s:%s.\\n\", currentName,\n\t\t\t\t\t\t\t\t// syno);\n\n\t\t\t\t\t\t\t\tadd(currentName, syno);\n\t\t\t\t\t\t\t\tadd(syno, currentName);\n\t\t\t\t\t\t\t\trecursiveAddSyno(currentName, syno);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error: \" + e);\n\t\t}\n\t}", "public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }", "public static HashMap<String, HashMap<String, Double>> fileToTrans(String pathName) throws IOException{\n BufferedReader input = null;\n HashMap<String, HashMap<String, Double>> transitions = new HashMap<String, HashMap<String, Double>>();\n\n try{\n //Read in file of parts of speech\n input = new BufferedReader(new FileReader(pathName));\n String line = input.readLine();\n //While the next line is not null,\n while (line != null){\n //line = line.toLowerCase();\n //Split on white space\n String[] states = line.split(\" \");\n //for each part of speech in the line\n for (int i = 0; i < states.length-1; i ++){\n //if it's the first POS in the line\n if (i == 0){\n //Checks for the '#' character, if it's already in the map,\n //checks if the first POS in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (transitions.containsKey(\"#\")){\n HashMap<String, Double> current = transitions.get(\"#\");\n if (current.containsKey(states[0])){\n double newval = current.get(states[0]) + 1;\n current.put(states[0], newval);\n transitions.put(\"#\", current);\n }\n else{\n current.put(states[0], 1.0);\n transitions.put(\"#\", current);\n }\n }\n else{\n HashMap<String, Double> val = new HashMap<String, Double>();\n val.put(states[0], 1.0);\n transitions.put(\"#\", val);\n }\n }\n //set nextState = to the next state in line\n String nextState = states[i+1];\n //if the transitions map already as the given part of speech\n if (transitions.containsKey(states[i])){\n //set current = to the inner map\n HashMap<String, Double> current = transitions.get(states[i]);\n //if the inner map has the next part of speech, add one to the int value\n if (current.containsKey(nextState)){\n current.put(nextState, current.get(nextState) + 1);\n transitions.put(states[i], current);\n }\n //else, add it to the inner map\n //then put that inner map into the transitions map\n else{\n current.put(nextState, 1.0);\n transitions.put(states[i], current);\n }\n }\n //else, create a new map, add the next state with a value of 1\n //add it to the transitions map\n else{\n HashMap<String, Double> val = new HashMap<String, Double>();\n val.put(nextState, 1.0);\n transitions.put(states[i], val);\n }\n }\n line = input.readLine();\n }\n }\n //catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close the file\n finally{\n input.close();\n }\n //return the map\n return transitions;\n }", "private static void collectVariables(Document document){\n //collecting all the nodes inside a list\n nodeList = document.selectNodes(NOTES);\n\n //initialising the lists\n entriesList = new ArrayList<>();\n locationsList = new ArrayList<>();\n attachmentList = new ArrayList<>();\n tagsForEntryList = new ArrayList<>();\n\n //hashSet for handling the duplicate fileNames\n fileNameSet = new LinkedHashSet<>();\n\n //linkedHashMap for storing the uid for each tag\n uidForEachTag = new LinkedHashMap<>();\n uidForEachLocation = new LinkedHashMap<>();\n\n //id set for storing unique location id\n locationsIdSet = new LinkedHashSet<>();\n\n Tags tags;\n Location location;\n Entry entry;\n Attachment attachment;\n\n byte[] decoded = null;\n\n //looping through the list\n for(Node node : nodeList){\n\n String title = \"\";\n String parsedHtml = \"\";\n String formattedDate = \"\";\n String location_uid = \"\";\n String mime = \"\";\n String fileName = \"\";\n String attachment_uid = null;\n String entry_uid = \"\";\n String type = \"photo\";\n String baseEncoding;\n String tag_uid = \"\";\n\n //get all tags including duplicates\n if( node.selectSingleNode(TAG) !=null) {\n List<Node> evernote_tags = node.selectNodes(TAG);\n for (Node evenote_tag : evernote_tags) {\n //generate unique id for the tag and map it.\n //if the name id pair does not exist\n if(!uidForEachTag.containsKey(evenote_tag.getText())) {\n uidForEachTag.put(evenote_tag.getText(), Entry.generateRandomUid());\n }\n //create new diaro.Tags Object\n tags = new Tags(uidForEachTag.get(evenote_tag.getText()),evenote_tag.getText());\n tagsForEntryList.add(tags);\n }\n }\n\n //get all Locations\n // using diaro.Entry.concatLatLng to add title as {<Latitude></Latitude>,<Longitude></Longitude>}\n if( node.selectSingleNode(LATITUDE) != null && node.selectSingleNode(LONGITUDE) != null) {\n String latitude = String.format(\"%.5f\",Double.parseDouble(node.selectSingleNode(LATITUDE).getText()));\n String longitude = String.format(\"%.5f\",Double.parseDouble(node.selectSingleNode(LONGITUDE).getText()));\n String location_title = (ImportUtils.concatLatLng(latitude, longitude));\n\n //mapping every uid to the address\n if(!uidForEachLocation.containsKey(location_title)) {\n uidForEachLocation.put(location_title, Entry.generateRandomUid());\n }\n location_uid = uidForEachLocation.get(location_title);\n location = new Location(location_uid,latitude,longitude,location_title, location_title, DEFAULT_ZOOM);\n if (!locationsIdSet.contains(location.location_uid)) {\n locationsList.add(location);\n locationsIdSet.add(location.location_uid);\n }\n }\n\n //get all Entries\n if(node.selectSingleNode(TITLE) != null ){\n title = node.selectSingleNode(TITLE).getText();\n }\n if(node.selectSingleNode(CONTENT) != null ){\n String text = node.selectSingleNode(CONTENT).getText();\n // using Jsoup to parseXml HTML inside Content\n parsedHtml = Jsoup.parse(text).text();\n }\n if(node.selectSingleNode(CREATED) != null){\n String date = node.selectSingleNode(CREATED).getText().substring(0, 8);\n String month = date.substring(4, 6);\n String day = date.substring(6, 8);\n String year = date.substring(2, 4);\n formattedDate = String.format(\"%s/%s/%s\", month, day, year);\n }\n\n //get all the tags\n //append all the string stringBuilder\n if(tagsForEntryList.size() != 0){\n for(Tags tag : tagsForEntryList) {\n tag_uid = tag_uid + (\",\") + (String.join(\",\", tag.tagsId));\n }\n tag_uid = tag_uid + (\",\");\n System.out.println(tag_uid);\n\n }\n entry = new Entry();\n entry.setUid(Entry.generateRandomUid());\n entry.setTz_offset(OFFSET);\n entry.setDate(formattedDate);\n entry.setText(parsedHtml);\n entry.setTitle(title);\n entry.setFolder_uid(FOLDER_UID);\n entry.setLocation_uid(location_uid);\n entry.setTags(tag_uid);\n //clear the list\n //clear the tag_uid variable for next loop\n tagsForEntryList.clear();\n tag_uid = \"\";\n //add entry in the list\n entriesList.add(entry);\n\n //get all the attachments\n if (node.selectSingleNode(RESOURCE) != null) {\n List<Node> attachmentsForEachEntry = node.selectNodes(RESOURCE);\n //loop through all the attachments for a single note/entry\n for (Node attachmentForeach : attachmentsForEachEntry) {\n try {\n mime = attachmentForeach.selectSingleNode(MIME).getText();\n\n }catch( NullPointerException e){\n e.printStackTrace();\n }\n // check for a valid attachment\n if(checkForImageMime(mime)) {\n try {\n fileName = attachmentForeach.selectSingleNode(RESOURCE_ATTRIBUTE_FILENAME).getText();\n attachment_uid = Entry.generateRandomUid();\n entry_uid = entry.uid;\n baseEncoding = attachmentForeach.selectSingleNode(DATA).getText();\n //----- please do a check for valid Base64--\n decoded = Base64.getMimeDecoder().decode(baseEncoding);\n // assign primary_photo uid to entry\n entry.primary_photo_uid = attachment_uid;\n }catch(IllegalArgumentException | NullPointerException e){\n e.printStackTrace();\n }\n // check if the fileName already exists\n // if true generate a new fileName to prevent duplicates\n if(fileNameSet.add(fileName)){\n fileNameSet.add(fileName);\n attachment = new Attachment(attachment_uid, entry_uid, type,fileName,decoded);\n }else{\n String newFileName = ImportUtils.generateNewFileName(fileName);\n fileNameSet.add(newFileName);\n attachment = new Attachment(attachment_uid, entry_uid, type,newFileName,decoded);\n }\n attachmentList.add(attachment);\n }\n }\n }\n }\n\n }", "public static void main(final String[] args)\r\n {\r\n // Set the path to the data files\r\n Dictionary.initialize(\"c:/Program Files/WordNet/2.1/dict\");\r\n \r\n // Get an instance of the Dictionary object\r\n Dictionary dict = Dictionary.getInstance();\r\n \r\n // Declare a filter for all terms starting with \"car\", ignoring case\r\n TermFilter filter = new WildcardFilter(\"car*\", true);\r\n \r\n // Get an iterator to the list of nouns\r\n Iterator<IndexTerm> iter = \r\n dict.getIndexTermIterator(PartOfSpeech.NOUN, 1, filter);\r\n \r\n // Go over the list items\r\n while (iter.hasNext())\r\n {\r\n // Get the next object\r\n IndexTerm term = iter.next();\r\n \r\n // Write out the object\r\n System.out.println(term.toString());\r\n \r\n // Write out the unique pointers for this term\r\n int nNumPtrs = term.getPointerCount();\r\n if (nNumPtrs > 0)\r\n {\r\n // Print out the number of pointers\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumPtrs) +\r\n \" pointers\");\r\n \r\n // Print out all of the pointers\r\n String[] ptrs = term.getPointers();\r\n for (int i = 0; i < nNumPtrs; ++i)\r\n {\r\n String p = Pointer.getPointerDescription(term.getPartOfSpeech(), ptrs[i]);\r\n System.out.println(ptrs[i] + \": \" + p);\r\n }\r\n }\r\n \r\n // Get the definitions for this term\r\n int nNumSynsets = term.getSynsetCount();\r\n if (nNumSynsets > 0)\r\n {\r\n // Print out the number of synsets\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumSynsets) +\r\n \" synsets\");\r\n \r\n // Print out all of the synsets\r\n Synset[] synsets = term.getSynsets();\r\n for (int i = 0; i < nNumSynsets; ++i)\r\n {\r\n System.out.println(synsets[i].toString());\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Demo processing finished.\");\r\n }", "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}", "public void readFileToTransitionMapSmooth(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMapSmooth();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "private void prepareAssignmentFiles() {\n for (Assignment assignment : assignments) {\n //---------- initialize the assignmentFiles array list ----------\n assignment.assignmentFiles = new ArrayList<>();\n\n //create a temporary assignment files array list\n ArrayList<File> assignmentFiles = new ArrayList<>();\n\n //---------- call the recursive findAssignmentFiles method ----------\n findAssignmentFiles(assignmentFiles, assignment.assignmentDirectory);\n\n //---------- set the language for the assignment ----------\n if (language.equals( IAGConstant.LANGUAGE_AUTO) ) {\n assignment.language = autoDetectLanguage(assignmentFiles);\n }\n else {\n assignment.language = language;\n }\n\n String[] extensions;\n\n switch (assignment.language) {\n case IAGConstant.LANGUAGE_PYTHON3:\n extensions = IAGConstant.PYTHON_EXTENSIONS;\n break;\n case IAGConstant.LANGUAGE_CPP:\n extensions = IAGConstant.CPP_EXTENSIONS;\n break;\n default: //unable to determine the language\n extensions = new String[] {};\n }\n\n //add only files of the right type to the assignment file list\n for (File f: assignmentFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(extensions).contains(f_extension)){\n //---------- if the extension on the file matches\n // one of the extension in the extensions list, add\n // it to the programming files list. ----------\n assignment.assignmentFiles.add(f);\n }\n }\n assignment.bAutoGraded = false; //indicate the assignment has not yet been auto-graded\n }\n\n }", "private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }", "public ConfidenceAlignment(String sgtFile,String tgsFile,String sgtLexFile,String tgsLexFile){\r\n\t\r\n\t\tLEX = new TranslationLEXICON(sgtLexFile,tgsLexFile);\r\n\t\t\r\n\t\tint sennum = 0;\r\n\t\tdouble score = 0.0;\r\n\t\t// Reading a GZIP file (SGT) \r\n\t\ttry { \r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(sgtFile)),\"UTF8\"));\r\n\t\t\r\n\t\tString one = \"\"; String two =\"\"; String three=\"\"; \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\r\n\t\t\tgizaSGT.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\r\n\t\t\r\n\t\t// Reading a GZIP file (TGS)\r\n\t\tsennum = 0; \r\n\t\tbr = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(tgsFile)),\"UTF8\")); \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\t\t\t\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\t\t\tgizaTGS.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\t\t\r\n\t\t}catch(Exception e){}\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\t\r\n\t}", "public static void main(String args[]) throws IOException{\n\t\tString filename=null;\n\t\tString outfileNoS=\"CorpusOutputNoS.txt\";\n\t\tString outfileS=\"CorpusOutputS.txt\";\n\t\tString outfileT=\"CorpusOutputT.txt\";\n\t\tString str;\n\t\t\n\t\tFile out1= new File(outfileNoS);\n\t\twriter1= new FileWriter(out1);\n\t\t\n\t\tFile out2= new File(outfileS);\n\t\twriter2= new FileWriter(out2);\n\t\t\n\t\tFile out3= new File(outfileT);\n\t\twriter3= new FileWriter(out3);\n\t\t\n\t\tString given=null; \n\t\tif(args.length>0)\n\t\t\tfilename=args[0];\n\t\t\n\t\tcorpusTokens = new ArrayList<String>();\n\t\tcorpusUnigramCount = new HashMap<String, Integer>();\n\t\tcorpusBigramCount = new HashMap<String, Integer>();\n\t\tcorpusBigramProb= new HashMap<String,Double>();\n\t\tcorpusNumOfBigrams=0;\n\t\t\n\t\tScanner in = new Scanner(new File(filename));\n\t\t\n//----------------------------------CORPUS BEGIN-------------------------\n\t\t//finds unigram and Bigram count in Corpus and display it\n\t\tcorpusNumOfBigrams=findBigramCount(in,corpusTokens,corpusUnigramCount,corpusBigramCount);\n\t\t\n\t\t//Find corpus Bigram Prob and display it\n\t\tfindBigramProb(corpusUnigramCount,corpusBigramCount,corpusBigramProb,corpusTokens,corpusNumOfBigrams);\n\t\t\n\t\tint V= corpusUnigramCount.size();\n\n\t\t//display details of corpus\n\t\tstr=String.valueOf(corpusNumOfBigrams)+\"\\n\"; //number of Bigrams\n\t\tstr+=String.valueOf(corpusBigramCount.size())+\"\\n\";//Unique Bigram count \n\t\tstr+=String.valueOf(V)+\"\\n\";//Unique Unigram count \n\t\tstr+= String.valueOf(corpusTokens.size())+\"\\n\";//Total count\n\t\tstr+=\"\\n\";\n\t\twriter1.write(str);\n\t\t\n\t\tdisplayCount1(corpusUnigramCount);\n\t\tdisplayCount1(corpusBigramCount);\n\t\tdisplayProb1(corpusBigramProb);\n\t\t\n\t\t\n//-----------------------------------CORPUS END--------------------------------\n\n//-------------------------Add-one Smoothing begins--------------------\n\t\t\n\t\tfindBigramProbSmoothing(corpusBigramCount,V);\n\t\tdisplayProb2(bigramProbS);\n//----------------------Add-one smoothing ends--------------------------\n\t\t\n//-------------------Good-Turing Discounting Begins-------------------------\n\t\t\n\t\t//finds the initial bucket count using the bigram count before smoothing \n\t\tdoBucketCount(corpusBigramCount);\n\t\t\n\t\tstr=bucketCountT.size()+\"\\n\\n\";\n\t\twriter3.write(str);\n\t\tdisplayBucketCount3();\n\t\t\n\t\t//finding new Counts with Good Turing discounting\n\t\tfindBigramCountsTuring();\n\t\t\n\t\t\n\t\t//finding bigram probabilities with Good Turing discounting\n\t\tfindBigramProbTuring();\n\t\tdisplayProb3(bigramProbT);\n\t\t\n//--------------------Good-Turing Discounting Ends-------------------------\n\t\twriter1.close();\n\t\twriter2.close();\n\t\twriter3.close();\n\t}", "private void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}", "public void readFileToTransitionMap(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMap();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void scanDocuments()\n{\n document_counts = new HashMap<>();\n kgram_counts = new HashMap<>();\n for (File f : root_files) {\n addDocuments(f);\n }\n}", "private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }", "public static void main() {\n // Since we cant use a global counter for all the different files\n // We use a global accumulator that takes the result from each file\n // After they are done with their respective file and save their result\n // This way they dont share a counter, but rather a place to store their counter\n // when they are done. \n AtomicInteger accumulator = new AtomicInteger(); // Default value = 0\n \n // word -> number of times that it appears over all files\n Map< String, Integer> occurrences = new HashMap<>();\n\n List< String> filenames = List.of(\n \"text1.txt\",\n \"text2.txt\",\n \"text3.txt\",\n \"text4.txt\",\n \"text5.txt\",\n \"text6.txt\",\n \"text7.txt\",\n \"text8.txt\",\n \"text9.txt\",\n \"text10.txt\"\n );\n\n CountDownLatch latch = new CountDownLatch(filenames.size());\n\n filenames.stream()\n .map(filename -> new Thread(() -> {\n int count = computeOccurrences(filename, occurrences);\n accumulator.addAndGet(count);\n latch.countDown();\n }))\n .forEach(Thread::start);\n\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(accumulator);\n }", "private void loadNonDictionaryTerms(String filePathNonDictionaryAuto) throws IOException {\n File fileAnnotation = new File(filePathNonDictionaryAuto);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr;\n fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n while ((line = br.readLine()) != null) {\n\n nonDictionaryTerms.add(line.trim().toLowerCase());\n System.out.println(\"Loading Non Dictionary Terms: \" + line);\n }\n br.close();\n fr.close();\n System.out.println(\"Non Dictionary Terms Loaded\");\n }", "public static void main(String[] args) throws JsonGenerationException, JsonMappingException, IOException{\n\t\tDictionary root = new Dictionary();\n\t\tparse Parse = new parse();\n long begin = System.currentTimeMillis();\n //String fileName = args[0];\n //String examine = args[1];\n Parse.parseFILE(\"word_tagged.txt\", root);\n long end = System.currentTimeMillis();\n System.out.println(\"insertion time elapse: \" + (double)(end-begin)/1000);\n \n \n /***********************Read data from phrase check dataset**************************/\n \n\t\tBigram n = new Bigram(Parse.parseFILE(\"Grammar.txt\"));\n\t n.train();\n\t ObjectMapper phrase = new ObjectMapper();\n\t String PhraseJson = phrase.writeValueAsString(n);\n\t phrase.writeValue(new File(\"Phrase.json\"), n);\n\t \n\t /***********************Read data from grammar rule dataset**************************/\n\t BuildRule rule = new BuildRule(Parse.parseFILE(\"Grammar.txt\"), 3, root);\n\t rule.train();\n\t \n\t System.out.println(rule.testing);\n\t ConvertToJson con = new ConvertToJson(rule);\n\t ObjectMapper mapper = new ObjectMapper();\n\t String ruleJson = mapper.writeValueAsString(rule);\n\t\tmapper.writeValue(new File(\"GrammarRule.json\"), rule);\n /***************************Begin to check*************************************/\n\t}", "public void setup() \n{\n size(1600, 1000, P2D); \n\n List<Feature> trwd = GeoJSONReader.loadData(this, \"Weekday.geojson\");\n Trajectorywd = MapUtils.createSimpleMarkers(trwd);\n\n List<Feature> trwk = GeoJSONReader.loadData(this, \"Weekend.geojson\");\n Trajectorywk = MapUtils.createSimpleMarkers(trwk);\n\n //map displaying weekday and weekend data with StamenMap as a basemap\n map1 = new UnfoldingMap(this, \"Weekday\", 40, 100, 670, 600, true, false, new StamenMapProvider.TonerLite());\n map1.zoomAndPanTo(BeijingLocation, 12);\n map1.addMarkers(Trajectorywd); \n \n map2 = new UnfoldingMap(this, \"Weekend\", 900, 100, 670, 600, true, false, new StamenMapProvider.TonerLite());\n map2.zoomAndPanTo(BeijingLocation, 12); \n map2.addMarkers(Trajectorywk);\n\n //map displaying weekday and weekend data with ThunderforestMap as a basemap\n map3 = new UnfoldingMap(this, \"Weekday\", 40, 100, 670, 600, true, false, new ThunderforestProvider.Transport());\n map3.zoomAndPanTo(BeijingLocation, 12);\n map3.addMarkers(Trajectorywd); \n\n map4 = new UnfoldingMap(this, \"Weekend\", 900, 100, 670, 600, true, false, new ThunderforestProvider.Transport());\n map4.zoomAndPanTo(BeijingLocation, 12); \n map4.addMarkers(Trajectorywk);\n\n mapwd = map1;\n mapwk = map2;\n MapUtils.createDefaultEventDispatcher(this, mapwd, mapwk, map1, map2, map3, map4);\n \n data1 = loadData(\"weekends.csv\");\n data2 = loadData(\"weekdays.csv\");\n\n //String datestarts = \"20090329\"; // 2009 03 7/8/14/15/21/22/28/29 \n rawdata = new ArrayList<ArrayList<Movement>>(); \n // Arraylist for interesting places: coordinates and names \n interestlo= new ArrayList<Location>(\n Arrays.asList(new Location(39.99f, 116.26f), new Location(40.01f, 116.30f), new Location(39.989f, 116.306f), \n new Location(40.00f, 116.32f), new Location(40.064f, 116.582f), new Location(40.068f, 116.129f), \n new Location(40.0261f, 116.388f), new Location(39.915f, 116.316f ), new Location(39.927f, 116.383f)));\n interestna= new ArrayList<String>(\n Arrays.asList(\"Summer Palace\", \"Yuanmingyuan Ruins Park\", \"Peking University\", \"Tsinghua University\", \"Capital Airport\", \n \"Beiqing Jiaoye Xiuxian Park\", \"Dongxiaokou Forest Park\", \"Yuyuantan Park\", \"Beihai Park\"));\n //The location of pointer for defining threshold \n pointerXt = width-180;\n pointerXd = width-20;\n filefolder = dataPath(\"\");\n println(filefolder);\n readFile();\n// f = new PFrame();\n compimage=loadImage(\"compass.png\");\n\n font = createFont(\"calibrib.ttf\", 50);\n textFont(font);\n\n drawslider();\n// switchButton = controlP5.addToggle(\"switchmode\")\n// .setPosition(80, 50)\n// .setSize(60, 30)\n// .setValue(modeswitch);\n \n logo = loadImage(\"beijing.png\");\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 void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }", "private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }" ]
[ "0.64199215", "0.62550163", "0.5951908", "0.5804142", "0.5707665", "0.5705344", "0.5660863", "0.5591756", "0.5580981", "0.55637634", "0.5491684", "0.5473026", "0.54524785", "0.54160166", "0.5415147", "0.53789", "0.5330022", "0.5322069", "0.53152174", "0.5311312", "0.5255637", "0.52542603", "0.5227526", "0.5227035", "0.5211672", "0.5189538", "0.5182879", "0.5177576", "0.51642364", "0.51538277", "0.51514506", "0.5138098", "0.5118265", "0.51117367", "0.5103717", "0.50795496", "0.5060202", "0.50392634", "0.50287354", "0.5025864", "0.50215435", "0.50153714", "0.50083274", "0.49989513", "0.49862814", "0.49856558", "0.49851668", "0.49845678", "0.49820882", "0.49804634", "0.49713185", "0.4966208", "0.49579906", "0.49472725", "0.49464768", "0.49403703", "0.49360543", "0.4934357", "0.49302852", "0.49193773", "0.491865", "0.49067837", "0.4905454", "0.48923442", "0.48922426", "0.48894733", "0.48884913", "0.48776695", "0.4866693", "0.48612225", "0.4855225", "0.48437327", "0.4842654", "0.48276284", "0.48268506", "0.48212713", "0.48200792", "0.48176065", "0.4813131", "0.48073727", "0.47983247", "0.4795765", "0.47857282", "0.47847214", "0.47764447", "0.47732195", "0.47622138", "0.47604963", "0.4757876", "0.47569543", "0.4755727", "0.47517103", "0.47491658", "0.4748127", "0.47427475", "0.47373447", "0.47353274", "0.47336668", "0.4733497", "0.47326532", "0.47211456" ]
0.0
-1
This method is called after the entire file has been read, and converts each value in the emissionMapTemp and transMapTemp maps into log probabilities and then stores the result into the transMap and emissionMap instance variables.
public void updateFinalMaps() { //prints out probMap for each tag ID and makes new map with ln(frequency/denominator) for each //wordType in transMapTemp TreeMap<String, TreeMap<String, Float>> tagIDsFinal = new TreeMap<String, TreeMap<String, Float>>(); for (String key: this.transMapTemp.keySet()) { ProbMap probMap = this.transMapTemp.get(key); tagIDsFinal.put(key, this.transMapTemp.get(key).map); for (String key2: probMap.map.keySet()) { tagIDsFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator())); System.out.println(key + ": " + key2 + " " + tagIDsFinal.get(key).get(key2)); } } //makes new map with ln(frequency/denominator) for each word in emissionMapTemp TreeMap<String, TreeMap<String, Float>> emissionMapFinal = new TreeMap<String, TreeMap<String, Float>>(); for (String key: this.emissionMapTemp.keySet()) { ProbMap probMap = this.emissionMapTemp.get(key); emissionMapFinal.put(key, this.emissionMapTemp.get(key).map); for (String key2: probMap.map.keySet()) { emissionMapFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator())); } } this.transMap = tagIDsFinal; this.emissionMap = emissionMapFinal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static HashMap<String, HashMap<String, Double>> fileToTrans(String pathName) throws IOException{\n BufferedReader input = null;\n HashMap<String, HashMap<String, Double>> transitions = new HashMap<String, HashMap<String, Double>>();\n\n try{\n //Read in file of parts of speech\n input = new BufferedReader(new FileReader(pathName));\n String line = input.readLine();\n //While the next line is not null,\n while (line != null){\n //line = line.toLowerCase();\n //Split on white space\n String[] states = line.split(\" \");\n //for each part of speech in the line\n for (int i = 0; i < states.length-1; i ++){\n //if it's the first POS in the line\n if (i == 0){\n //Checks for the '#' character, if it's already in the map,\n //checks if the first POS in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (transitions.containsKey(\"#\")){\n HashMap<String, Double> current = transitions.get(\"#\");\n if (current.containsKey(states[0])){\n double newval = current.get(states[0]) + 1;\n current.put(states[0], newval);\n transitions.put(\"#\", current);\n }\n else{\n current.put(states[0], 1.0);\n transitions.put(\"#\", current);\n }\n }\n else{\n HashMap<String, Double> val = new HashMap<String, Double>();\n val.put(states[0], 1.0);\n transitions.put(\"#\", val);\n }\n }\n //set nextState = to the next state in line\n String nextState = states[i+1];\n //if the transitions map already as the given part of speech\n if (transitions.containsKey(states[i])){\n //set current = to the inner map\n HashMap<String, Double> current = transitions.get(states[i]);\n //if the inner map has the next part of speech, add one to the int value\n if (current.containsKey(nextState)){\n current.put(nextState, current.get(nextState) + 1);\n transitions.put(states[i], current);\n }\n //else, add it to the inner map\n //then put that inner map into the transitions map\n else{\n current.put(nextState, 1.0);\n transitions.put(states[i], current);\n }\n }\n //else, create a new map, add the next state with a value of 1\n //add it to the transitions map\n else{\n HashMap<String, Double> val = new HashMap<String, Double>();\n val.put(nextState, 1.0);\n transitions.put(states[i], val);\n }\n }\n line = input.readLine();\n }\n }\n //catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close the file\n finally{\n input.close();\n }\n //return the map\n return transitions;\n }", "private void processFileEntries(final File filePath, Map<String, Integer> bigramHistogramMap) {\n\n BufferedInputStream bis = null;\n FileInputStream fis = null;\n\n try {\n\n // create FileInputStream object\n fis = new FileInputStream(filePath);\n\n // create object of BufferedInputStream\n bis = new BufferedInputStream(fis);\n\n String stringLine;\n\n BufferedReader br = new BufferedReader(new InputStreamReader(bis));\n\n String previousWord = \"\";\n\n while ((stringLine = br.readLine()) != null) {\n previousWord = addBigramHistogramEntry(stringLine, previousWord, bigramHistogramMap);\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found - \" + e);\n } catch (IOException ioe) {\n System.out.println(\"Exception while reading file - \" + ioe);\n } catch (Exception e) {\n System.out.println(\"Unable to load: \" + filePath.getName());\n } finally {\n // close the streams using close method\n try {\n if (fis != null) {\n fis.close();\n }\n if (bis != null) {\n bis.close();\n }\n } catch (IOException ioe) {\n System.out.println(\"Error while closing stream : \" + ioe);\n }\n }\n }", "private void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}", "public void updateTransitionMap(){\n\t\tfor(String yWord:transition_map.keySet()){\n\t\t\tHashMap<String,DataUnit> stateTransitionMap=transition_map.get(yWord).state_transition;\n\t\t\t\n\t\t\t//count the total number of Nyo(y)\n\t\t\tint totalStateTransitionCount=0;\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\ttotalStateTransitionCount+=stateTransitionMap.get(nextY).count;\n\t\t\t}\n\t\t\t\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\tstateTransitionMap.get(nextY).prob=(stateTransitionMap.get(nextY).count*1.0)/totalStateTransitionCount;\n\t\t\t}\n\t\t\t\n\t\t\t//count the total number of Nyo(x,y)\n\t\t\tHashMap<String,DataUnit> terminalTransitionMap=transition_map.get(yWord).terminal_transition;\n\t\t\t\n\t\t\tint totalTerminalTransitionCount=0;\n\t\t\tint typeCount=0;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\ttotalTerminalTransitionCount+=terminalTransitionMap.get(xWord).count;\n\t\t\t\ttypeCount++;\n\t\t\t}\n\t\t\ttypeCount++;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\tterminalTransitionMap.get(xWord).prob=(terminalTransitionMap.get(xWord).count+1.0)/(totalTerminalTransitionCount+typeCount);\n\t\t\t}\n\t\t\t\n\t\t\tterminalTransitionMap.put(unknown_word,new DataUnit(1,1.0/(totalTerminalTransitionCount+typeCount)));\n\t\t}\n\t}", "private void readDataFromUserLog(HashMap<String,TransactionData> hmap , String filename){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tString transaction = line.split(\",\")[1];\n\t\t\t/*\tString transactionKey = (transaction.length() > keyLength ) ?\n\t\t\t\t\t\ttransaction.substring(0,keyLength):\n\t\t\t\t\t\t\ttransaction;*/\n\t\t\t\tString transactionKey = formTransactionKey(transaction);\n\t\t\t\tdouble amount = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tif(hmap.containsKey(transactionKey)){\n\t\t\t\t\tTransactionData d = hmap.get(transactionKey);\n\t\t\t\t\td.addAnotherOccurence(amount);\n\t\t\t\t\thmap.put(transactionKey,d );\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchar type = identifyTheTransactions(transaction);\n\t\t\t\t\tTransactionData d =new TransactionData(transaction,amount,type);\n\t\t\t\t\thmap.put(transactionKey,d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! File : \"+ filename +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"\\n\\nPlease try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void processNewFile(String filename) throws IOException {\n \n /*read posture information from file*/\n Posture posture = new Posture(filename);\n /* keep the predictions made by each activity HMM to later choose the best one*/\n Map<Activity, Prediction> predictions = new EnumMap<Activity, Prediction>(Activity.class);\n Prediction prediction;\n Map.Entry<Activity, Prediction> bestPrediction;\n String predictedActivity;\n int preds[], predictedActivityIndex;\n int frameNumber = FileNameComparator.getFileNumber(filename);\n \n for (Activity activity : Activity.values()) {\n /* make a prediction using an activity's HMM*/\n prediction = predictActivity(activity, posture, filename);\n predictions.put(activity, prediction);\n }\n \n /* select the best prediction */\n bestPrediction = chooseBestPrediction(predictions);\n \n preds = bestPrediction.getValue().getPredictions();\n \n /* check to see if no activity has been detected */\n if (preds[preds.length - 1] == 1) {\n predictedActivity = bestPrediction.getKey().getName();\n predictedActivityIndex = bestPrediction.getKey().getIndex();\n } else {\n predictedActivity = \"no activity\";\n predictedActivityIndex = 0;\n }\n \n \n System.out.println(\"Activity from frame \" + frameNumber + \": \" + predictedActivity);\n \n /* log activity prediction to file */\n appendActivityToFile(frameNumber, predictedActivityIndex, bestPrediction.getValue().getProbability());\n \n \n }", "public Mapper() {\n\t\t\n\t\tmirMap = scanMapFile(\"mirMap.txt\");\n\t\tgeneMap = scanMapFile(\"geneMap.txt\");\n\t\t\n\t}", "public void readFileToTransitionMapSmooth(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMapSmooth();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public void processRun(int nr, boolean logAtomics) throws IOException {\r\n\t\tString out =\"\";\r\n\t\t\r\n\t\tif(logAtomics) {\r\n\t\t\tout = \"\"+data.getName()+\" run \"+nr;\r\n\t\t\twriter.write(out);\r\n\t\t\twriter.write(System.getProperty(\"line.separator\"));\r\n\t\t\tout = \"gen\"+SEP+\"fitness\"+SEP+\"pfm\"+SEP+\"f_full\"+SEP+\"f_1to1\"+SEP+\"dur\"+SEP+\"AUC_full\"+SEP+\"AUC_1to1\"+SEP+\"AUC_pfm\"+SEP+\"metric\"+SEP+\"prec\"+SEP+\"recall\";\r\n\t\t\twriter.write(out);\r\n\t\t\twriter.write(System.getProperty(\"line.separator\"));\r\n\t\t\t// write to file\r\n\t\t\twriter.flush();\r\n\t\t}\r\n\t\tdouble xBefore = 0;\r\n\t\t\r\n\t\tdouble aucFull = 0; double yFullBefore = 0;\r\n\t\t\r\n\t\tdouble auc1to1 = 0; double y1to1Before = 0;\r\n\t\t\r\n\t\tdouble aucpfm = 0; double ypfmBefore = 0;\r\n\t\t\r\n\t\tMapping reference = data.getReferenceMapping();\r\n\t\tfor(int i = 0; i<perRunAndDataSet.size(); i++) {\r\n\t\t\tEvaluationPseudoMemory mem = perRunAndDataSet.get(i);\r\n\t\t\tMapping map = fitness.getMapping(mem.metric.getExpression(), mem.metric.getThreshold(), true);\r\n\t\t\t// For real F-measures use best 1-to-1 mapping\r\n\t\t\tMapping map_1to1 = Mapping.getBestOneToOneMappings(map);\r\n\t\t\tdouble prec, recall, fMeasure, prec_1to1, recall_1to1, fMeasure_1to1;\r\n\t\t\tPRFCalculator prf = new PRFCalculator();\r\n\t\t\tprec = prf.precision(map, reference);\r\n\t\t\trecall = prf.recall(map, reference);\r\n\t\t\tfMeasure = prf.fScore(map, reference);\r\n\t\t\t\r\n\t\t\tif(Double.isNaN(fMeasure) || Double.isInfinite(fMeasure)) {\r\n\t\t\t\tSystem.err.println(\"NaN computation on Fmeasure, setting it to 0\");\r\n\t\t\t\tfMeasure = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmem.precision=prec;\r\n\t\t\tmem.recall=recall;\r\n\t\t\tmem.fmeasue=fMeasure;\r\n\t\t\t\r\n\t\t\tprec_1to1 = prf.precision(map_1to1, reference);\r\n\t\t\trecall_1to1 = prf.recall(map_1to1, reference);\r\n\t\t\tfMeasure_1to1 = prf.fScore(map_1to1, reference);\r\n\t\t\t\r\n\t\t\tif(Double.isNaN(fMeasure_1to1) || Double.isInfinite(fMeasure_1to1)) {\r\n\t\t\t\tSystem.err.println(\"NaN computation on Fmeasure 1-to-1, setting it to 0\");\r\n\t\t\t\tfMeasure_1to1 = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmem.precision_1to1=prec_1to1;\r\n\t\t\tmem.recall_1to1=recall_1to1;\r\n\t\t\tmem.fmeasue_1to1=fMeasure_1to1;\r\n\t\t\t// compute auc values\r\n\t\t\tdouble xNow=mem.generation;\r\n\t\t\taucFull += computeAUCSummand(xBefore, xNow, yFullBefore, fMeasure);\r\n\t\t\tauc1to1 += computeAUCSummand(xBefore, xNow, y1to1Before, fMeasure_1to1);\r\n\t\t\taucpfm += computeAUCSummand(xBefore, xNow, ypfmBefore, mem.pseudoFMeasure);\r\n\t\t\t//log\r\n\t\t\tif(logAtomics) {\r\n\t\t\t\tlogAtomic(mem, aucFull, auc1to1, aucpfm);\r\n\t\t\t}\r\n\t\t\txBefore = xNow;\r\n\t\t\tyFullBefore = fMeasure;\r\n\t\t\ty1to1Before = fMeasure_1to1;\t\r\n\t\t\typfmBefore = mem.pseudoFMeasure;\r\n\t\t}\r\n\t\t// log to statistics final fs,auc\r\n\t\tF_full.add(yFullBefore);\r\n\t\tF_1to1.add(y1to1Before);\r\n\t\tPFM.add(ypfmBefore);\r\n\t\tAUC_full.add(aucFull);\r\n\t\tAUC_1to1.add(auc1to1);\r\n\t\tAUC_pfm.add(aucpfm);\r\n\t\t\r\n\t\tout = data.getName()+\" run:\"+nr+\"\\n\"+\"gens\"+SEP+\"fit\"+SEP+\"pfm\"+SEP+\"f\"+SEP+\"f_1to1\"+SEP+\"dur\"+SEP+\"AUC\"+SEP+\"AUC_1to1\"+SEP+\"AUC_pfm\";\r\n\t\twriter.write(out);\r\n\t\twriter.write(System.getProperty(\"line.separator\"));\r\n\t\tlogAtomic(perRunAndDataSet.getLast(),aucFull,auc1to1,aucpfm);\r\n\t}", "public UPOSMapper(String mappingFile){\n map = new ConcurrentHashMap<>();\n try {\n for(String line: Files.readAllLines(Paths.get(mappingFile))){\n line = line.trim();\n if(line.isEmpty()) continue;\n String[] tags = line.split(\"\\t\");\n map.put(tags[0], tags[1]);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }", "public void updateTransitionMapSmooth(){\n\t\tfor(String yWord:transition_map.keySet()){\n\t\t\tHashMap<String,DataUnit> stateTransitionMap=transition_map.get(yWord).state_transition;\n\t\t\tHashMap<String,DataUnit> terminalTransitionMap=transition_map.get(yWord).terminal_transition;\n\t\t\t\n\t\t\t//count the total number of Nyo(y)\n\t\t\tint totalStateTransitionCount=0;\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\ttotalStateTransitionCount+=stateTransitionMap.get(nextY).count;\n\t\t\t}\n\t\t\t\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\tstateTransitionMap.get(nextY).prob=(stateTransitionMap.get(nextY).count*1.0)/totalStateTransitionCount;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//count the total number of Nyo(x,y)\n\t\t\tint totalTerminalTransitionCount=0,unknown_count=0;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\ttotalTerminalTransitionCount+=terminalTransitionMap.get(xWord).count;\n\t\t\t\tif(unknown_set.contains(xWord)){\n\t\t\t\t\tunknown_count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttotalTerminalTransitionCount+=unknown_count;\n\t\t\tterminalTransitionMap.put(unknown_word,new DataUnit(unknown_count,0.0));\n\t\t\t\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\tterminalTransitionMap.get(xWord).prob=(terminalTransitionMap.get(xWord).count*1.0)/(totalTerminalTransitionCount);\n\t\t\t}\t\n\t\t}\n\t}", "public void readFileToTransitionMap(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMap();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }", "@Override\n public void processItem(final CSVItem item) throws IOException {\n // todo\n if (item == null) {\n mapReducer.outPut(cntMap, OUTPUT_DIR, threshold, THRESHOLD_FILE_NAME, THRESHOLD_HEADERS,\n MODULE_PRESENTATION_FILE_HEADERS);\n return;\n }\n mapReducer.processItem(cntMap, item);\n }", "private void storeValues(int source,\n Map<VWBetw, Double> map,\n DiskBufferDriver output) throws DriverException {\n for (Entry<VWBetw, Double> e : map.entrySet()) {\n storeValue(source, e.getKey().getID(), e.getValue(), output);\n }\n }", "static void initializeData() {\n\n if (timeLimitInHour != -1) {\n endTime = startTime + timeLimitInHour * 60 * 60 * 1000;\n }\n\n // Read the data file.\n data = new Data(dataFileName);\n\n // Build all variables.\n allVariable = data.buildAllVariable();\n\n // Read the target gene set.\n GeneSet geneSet = new GeneSet(allVariable, targetGeneSetFileName, minGeneSetSize, maxGeneSetSize, selectedCollections);\n listOfTargetGeneSets = geneSet.buildListOfGeneSets();\n\n // Read sample class labels.\n readSampleClass();\n\n // Initialize remaining fields.\n if (numberOfThreads == 0)\n numberOfThreads = getRuntime().availableProcessors();\n\n // Initialize BufferedWriter with preliminary info for log file.\n String fileInfo = \"EDDY OUTPUT FILE\\n\";\n fileInfo += (\"Data File: \" + dataFileName + \"\\n\");\n fileInfo += (\"Target Gene Set(s) File: \" + targetGeneSetFileName + \"\\n\");\n fileInfo += (\"Class Label File: \" + sampleClassInformationFileName + \"\\n\");\n fileInfo += (\"Number of Gene Sets: \" + listOfTargetGeneSets.size() + \"\\n\");\n fileInfo += (\"Number of Threads: \" + numberOfThreads + \"\\n\\n\");\n \n // log command line options, in verbatim \n fileInfo += concatStrings(commandLine) + \"\\n\\n\";\n \n fileInfo += (\"Name: \\tCollection: \\tSize: \\tURL: \\tJS Divergence: \\tP-Value: \\t#Permutations: \\tGenes: \\n\");\n try {\n \t// TODO: need to come up with a better way to assign the output file name.\n String fileName = targetGeneSetFileName.substring(0, targetGeneSetFileName.indexOf(\".gmt\")) + \"_output.txt\";\n \n File file = new File(fileName);\n \n output = new BufferedWriter(new FileWriter(file));\n output.write(fileInfo);\n } catch ( IOException e ) {\n e.printStackTrace();\n }\n\n }", "private void processData() {\n\t\tfloat S, M, VPR, VM;\n\t\tgetCal();\n\t\tgetTimestamps();\n\t\t\n \n\t\tfor(int i = 0; i < r.length; i++) {\n\t\t\t//get lux\n\t\t\tlux[i] = RGBcal[0]*vlam[0]*r[i] + RGBcal[1]*vlam[1]*g[i] + RGBcal[2]*vlam[2]*b[i];\n \n\t\t\t//get CLA\n\t\t\tS = RGBcal[0]*smac[0]*r[i] + RGBcal[1]*smac[1]*g[i] + RGBcal[2]*smac[2]*b[i];\n\t\t\tM = RGBcal[0]*mel[0]*r[i] + RGBcal[1]*mel[1]*g[i] + RGBcal[2]*mel[2]*b[i];\n\t\t\tVPR = RGBcal[0]*vp[0]*r[i] + RGBcal[1]*vp[1]*g[i] + RGBcal[2]*vp[2]*b[i];\n\t\t\tVM = RGBcal[0]*vmac[0]*r[i] + RGBcal[1]*vmac[1]*g[i] + RGBcal[2]*vmac[2]*b[i];\n \n\t\t\tif(S > CLAcal[2]*VM) {\n\t\t\t\tCLA[i] = M + CLAcal[0]*(S - CLAcal[2]*VM) - CLAcal[1]*683*(1 - pow((float)2.71, (float)(-VPR/4439.5)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCLA[i] = M;\n\t\t\t}\n\t\t\tCLA[i] = CLA[i]*CLAcal[3];\n\t\t\tif(CLA[i] < 0) {\n\t\t\t\tCLA[i] = 0;\n\t\t\t}\n \n\t\t\t//get CS\n\t\t\tCS[i] = (float) (.7*(1 - (1/(1 + pow((float)(CLA[i]/355.7), (float)1.1026)))));\n \n\t\t\t//get activity\n\t\t\ta[i] = (float) (pow(a[i], (float).5) * .0039 * 4);\n\t\t}\n\t}", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static void preprocess() {\n \tLOG.info(\"Begin preprocessing of data.\");\n \t\n \tLOG.debug(\"Create a IterativeDirectoryReader.\");\n \t// Create a reader for directories\n \tIterativeDirectoryReader iterativeDirectoryReader = (IterativeDirectoryReader) ReaderFactory.instance().getIterativeDirectoryReader();\n \titerativeDirectoryReader.setDirectoryName(clArgs.preprocessInDir);\n \titerativeDirectoryReader.setPathInChildDirectory(clArgs.preprocessPathInChildDir);\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \t// Create a reader for text files and set an appropriate file filter\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \titerativeFileReader.setFileFilter(FileUtil.acceptVisibleFilesFilter(false, true));\n \t\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \t// Create a reader for text files, the first six lines are not relevant in this data set\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \ttextFileLineReader.setOffset(clArgs.preprocessLineOffset);\n \t\n \tLOG.debug(\"Create a GpsLogLineProcessor.\");\n \t// Create a processor for user points\n \tGpsLogLineProcessor processor = new GpsLogLineProcessor(clArgs.preprocessOutFile);\n \t\n \t// Build reader chain\n \titerativeDirectoryReader.setReader(iterativeFileReader);\n \titerativeFileReader.setReader(textFileLineReader);\n \ttextFileLineReader.setProcessor(processor);\n \t\n \titerativeDirectoryReader.attach(processor, \n \t\t\t\tnew Interests[] {\n \t\t\t\t\tInterests.NewChildDirectory,\n \t\t\t\t\tInterests.HasFinished\n \t\t\t\t});\n \t\n \tLOG.debug(\"Read GPS logs. Save the data in a new file {}.\", clArgs.preprocessOutFile);\n \t// Read and save the data\n \titerativeDirectoryReader.read();\n\n \tLOG.info(\"Finished preprocessing of data.\");\n }", "private static void getStat(){\n\t\tfor(int key : Initial_sequences.keySet()){\n\t\t\tint tmNo = Initial_sequences.get(key);\n\t\t\tif (tmNo > 13){\n\t\t\t\ttmInitLarge ++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(tmInit.containsKey(tmNo)){\n\t\t\t\t\tint temp = tmInit.get(tmNo);\n\t\t\t\t\ttemp++;\n\t\t\t\t\ttmInit.put(tmNo, temp);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttmInit.put(tmNo, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Go through all the proteins in SC\n\t\tfor(int key : SC_sequences.keySet()){\n\t\t\tint tmNo = SC_sequences.get(key);\n\t\t\t\n\t\t\tint loop = Loop_lengths.get(key);\n\t\t\tint tmLen = TM_lengths.get(key);\n\t\t\t\n\t\t\tLoopTotalLen = LoopTotalLen + loop;\n\t\t\tTMTotalLen = TMTotalLen + tmLen;\n\t\t\t\n\t\t\t\n\t\t\tif (tmNo > 13){\n\t\t\t\ttmSCLarge ++;\n\t\t\t\tLoopLargeLen = LoopLargeLen + loop;\n\t\t\t\tTMLargeLen = TMLargeLen + tmLen;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(tmSC.containsKey(tmNo)){\n\t\t\t\t\tint temp = tmSC.get(tmNo);\n\t\t\t\t\ttemp++;\n\t\t\t\t\ttmSC.put(tmNo, temp);\n\t\t\t\t\t\n\t\t\t\t\tint looptemp = Loop_SC.get(tmNo);\n\t\t\t\t\tlooptemp = looptemp + loop;\n\t\t\t\t\tLoop_SC.put(tmNo, looptemp);\n\t\t\t\t\t\n\t\t\t\t\tint tmlenTemp = TM_len_SC.get(tmNo);\n\t\t\t\t\ttmlenTemp = tmlenTemp + tmLen;\n\t\t\t\t\tTM_len_SC.put(tmNo, tmlenTemp);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttmSC.put(tmNo, 1);\n\t\t\t\t\t\n\t\t\t\t\tLoop_SC.put(tmNo, 1);\n\t\t\t\t\tTM_len_SC.put(tmNo, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {\n\t\tMap<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series\n\t\t\n\t\tfor (int i = 0; i < mapPerGestureFile.size(); i++) {\n\t\t\tMap<String,List<Double>> tmpMap = mapPerGestureFile.get(i);\n\t\t\tIterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tMap.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();\n\t\t\t\tif(idf2PerDocument.containsKey(pairs.getKey()))\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0); \n\t\t\t\telse\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), 1.0);\n\t\t\t}\n\t\t}\n\t\tgetTfMapArrayIDF2().add(idf2PerDocument);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n private void newMap() throws IOException, ClassNotFoundException {\r\n this.music_map.clear();\r\n if (needNewMap()) {\r\n if (!save_file.exists()) {\r\n System.out.println(\"DIZIONARIO NON PRESENTE\");\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n\r\n this.setTarget();\r\n\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n } else {\r\n System.out.println(\"DIZIONARIO NON AGGIORNATO\");\r\n if (!UtilFunctions.newDictionaryRequest(this.save_file, this.music_root)) {\r\n System.out.println(\"AGGIORNAMENTO DIZIONARIO RIFIUTATO\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n } else {\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n this.setTarget();\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n }\r\n }\r\n } else {\r\n System.out.println(\"DIZIONARIO GIA' PRESENTE\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n }\r\n }", "public void processData() {\n\t\t SamReader sfr = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.LENIENT).open(this.inputFile);\n\t\t \n\t\t\t\n\t\t\t//Set up file writer\n\t\t SAMFileWriterFactory sfwf = new SAMFileWriterFactory();\n\t\t sfwf.setCreateIndex(true);\n\t\t SAMFileWriter sfw = sfwf.makeSAMOrBAMWriter(sfr.getFileHeader(), false, this.outputFile);\n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\t//counters\n\t\t\tint totalReads = 0;\n\t\t\tint trimmedReads = 0;\n\t\t\tint droppedReads = 0;\n\t\t\tint dropTrimReads = 0;\n\t\t\tint dropMmReads = 0;\n\t\t\t\n\t\t\t//Containers\n\t\t\tHashSet<String> notFound = new HashSet<String>();\n\t\t\tHashMap<String, SAMRecord> mateList = new HashMap<String,SAMRecord>();\n\t\t\tHashSet<String> removedList = new HashSet<String>();\n\t\t\tHashMap<String,SAMRecord> editedList = new HashMap<String,SAMRecord>();\n\t\t\t\n\t\t\tfor (SAMRecord sr: sfr) {\n\t\t\t\t//Messaging\n\t\t\t\tif (totalReads % 1000000 == 0 && totalReads != 0) {\n\t\t\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Currently storing mates for %d reads.\",totalReads,trimmedReads,droppedReads,mateList.size()));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ttotalReads += 1;\n\t\t\t\t\n\t\t\t\tString keyToCheck = sr.getReadName() + \":\" + String.valueOf(sr.getIntegerAttribute(\"HI\"));\n\t\t\t\n\t\t\t\t//Make sure chromsome is available\n\t\t\t\tString chrom = sr.getReferenceName();\n\t\t\t\tif (!this.refHash.containsKey(chrom)) {\n\t\t\t\t\tif (!notFound.contains(chrom)) {\n\t\t\t\t\t\tnotFound.add(chrom);\n\t\t\t\t\t\tMisc.printErrAndExit(String.format(\"Chromosome %s not found in reference file, skipping trimming step\", chrom));\n\t\t\t\t\t}\n\t\t\t\t} else if (!sr.getReadUnmappedFlag()) {\n\t\t\t\t\tString refSeq = null;\n\t\t\t\t\tString obsSeq = null;\n\t\t\t\t\tList<CigarElement> cigar = null;\n\t\t\t\t\t\n\t\t\t\t\t//Get necessary sequence information depending on orientation\n\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\trefSeq = this.revComp(this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd()));\n\t\t\t\t\t\tobsSeq = this.revComp(sr.getReadString());\n\t\t\t\t\t\tcigar = this.reverseCigar(sr.getCigar().getCigarElements());\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\trefSeq = this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd());\n\t\t\t\t\t\tobsSeq = sr.getReadString();\n\t\t\t\t\t\tcigar = sr.getCigar().getCigarElements();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Get alignments\n\t\t\t\t\tString[] alns = this.createAlignmentStrings(cigar, refSeq, obsSeq, totalReads);\n\t\t\t\t\t\n\t\t\t\t\t//Identify Trim Point\n\t\t\t\t\tint idx = this.identifyTrimPoint(alns,sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\n\t\t\t\t\t//Check error rate\n\t\t\t\t\tboolean mmPassed = false;\n\t\t\t\t\tif (mmMode) {\n\t\t\t\t\t\tmmPassed = this.isPoorQuality(alns, sr.getReadNegativeStrandFlag(), idx);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Create new cigar string\n\t\t\t\t\tif (idx < minLength || mmPassed) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsr.setAlignmentStart(0);\n\t\t\t\t\t\tsr.setReadUnmappedFlag(true);\n\t\t\t\t\t\tsr.setProperPairFlag(false);\n\t\t\t\t\t\tsr.setReferenceIndex(-1);\n\t\t\t\t\t\tsr.setMappingQuality(0);\n\t\t\t\t\t\tsr.setNotPrimaryAlignmentFlag(false);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMateUnmapped(mateList.get(keyToCheck)));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tremovedList.add(keyToCheck);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\t\t\t\t\t\tdroppedReads += 1;\n\t\t\t\t\t\tif (idx < minLength) {\n\t\t\t\t\t\t\tdropTrimReads += 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdropMmReads += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (idx+1 != alns[0].length()) {\n\t\t\t\t\t\ttrimmedReads++;\n\t\t\t\t\t\tCigar oldCig = sr.getCigar();\n\t\t\t\t\t\tCigar newCig = this.createNewCigar(alns, cigar, idx, sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\tsr.setCigar(newCig);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\t\tint newStart = this.determineStart(oldCig, newCig, sr.getAlignmentStart());\n\t\t\t\t\t\t\tsr.setAlignmentStart(newStart);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.verbose) {\n\t\t\t\t\t\t\tthis.printAlignments(sr, oldCig, alns, idx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMatePos(mateList.get(keyToCheck),sr.getAlignmentStart()));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\teditedList.put(keyToCheck,sr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(sr.getReadName());\n\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t//String rn = sr.getReadName();\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tif (editedList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMatePos(sr,editedList.get(keyToCheck).getAlignmentStart());\n\t\t\t\t\t\t\teditedList.remove(keyToCheck);\n\t\t\t\t\t\t} else if (removedList.contains(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMateUnmapped(sr);\n\t\t\t\t\t\t\tremovedList.remove(keyToCheck);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\t\tsfw.addAlignment(mateList.get(keyToCheck));\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmateList.put(keyToCheck, sr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Of the unmapped, %d were too short and %d had too many mismatches. Currently storing mates for %d reads.\",\n\t\t\t\t\ttotalReads,trimmedReads,droppedReads,dropTrimReads, dropMmReads, mateList.size()));\n\t\t\tSystem.out.println(String.format(\"Reads left in hash: %d. Writing to disk.\",mateList.size()));\n\t\t\tfor (SAMRecord sr2: mateList.values()) {\n\t\t\t\tsfw.addAlignment(sr2);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsfw.close();\n\t\t\ttry {\n\t\t\t\tsfr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\n\t}", "@Override\n protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n String inputLine = value.toString().trim();\n String[] fromPageToPages = inputLine.split(\"\\t\");\n if (fromPageToPages.length == 1 || fromPageToPages[1].trim().equals(\"\")) {\n return;\n }\n String from = fromPageToPages[0];\n String[] tos = fromPageToPages[1].split(\",\");\n for (String to : tos) {\n context.write(new Text(from), new Text(to + \"=\" + (double)1/tos.length));\n }\n }", "@Override\n public void report() {\n\n try {\n File mFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/metrics.txt\");\n File eFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/latency_throughput.txt\");\n if (!mFile.exists()) {\n mFile.createNewFile();\n }\n if (!eFile.exists()) {\n eFile.createNewFile();\n }\n\n FileOutputStream mFileOut = new FileOutputStream(mFile, true);\n FileOutputStream eFileOut = new FileOutputStream(eFile, true);\n\n StringBuilder builder = new StringBuilder((int) (this.previousSize * 1.1D));\n StringBuilder eBuilder = new StringBuilder((int) (this.previousSize * 1.1D));\n\n// Instant now = Instant.now();\n LocalDateTime now = LocalDateTime.now();\n\n builder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n eBuilder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n\n builder.append(lineSeparator).append(\"---------- Counters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- records counter ----------\").append(lineSeparator);\n for (Map.Entry metric : counters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n if (( (String)metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Gauges ----------\").append(lineSeparator);\n for (Map.Entry metric : gauges.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Gauge) metric.getKey()).getValue()).append(lineSeparator);\n }\n\n builder.append(lineSeparator).append(\"---------- Meters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- throughput ----------\").append(lineSeparator);\n for (Map.Entry metric : meters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n if (((String) metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Histograms ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- lantency ----------\").append(lineSeparator);\n for (Map.Entry metric : histograms.entrySet()) {\n HistogramStatistics stats = ((Histogram) metric.getKey()).getStatistics();\n builder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n eBuilder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n }\n\n mFileOut.write(builder.toString().getBytes());\n eFileOut.write(eBuilder.toString().getBytes());\n mFileOut.flush();\n eFileOut.flush();\n mFileOut.close();\n eFileOut.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void analysisAndImport(File uploadedFile)\n {\n Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();\n\n try\n {\n String[] keyArr = null;\n String key = null;\n String strKey = null;\n String strValue = null;\n InputStream is;\n is = new FileInputStream(uploadedFile);\n BufferedReader bf = new BufferedReader(new InputStreamReader(is));\n Properties prop = new Properties();\n prop.load(bf);\n Enumeration enum1 = prop.propertyNames();\n while (enum1.hasMoreElements())\n {\n // The key profile\n strKey = (String) enum1.nextElement();\n key = strKey.substring(0, strKey.lastIndexOf('.'));\n keyArr = strKey.split(\"\\\\.\");\n // Value in the properties file\n strValue = prop.getProperty(strKey);\n Set<String> keySet = map.keySet();\n if (keySet.contains(key))\n {\n Map<String, String> valueMap = map.get(key);\n Set<String> valueKey = valueMap.keySet();\n if (!valueKey.contains(keyArr[2]))\n {\n valueMap.put(keyArr[2], strValue);\n }\n }\n else\n {\n Map<String, String> valueMap = new HashMap<String, String>();\n valueMap.put(keyArr[2], strValue);\n map.put(key, valueMap);\n }\n }\n // Data analysis\n analysisData(map);\n }\n catch (Exception e)\n {\n logger.error(\"Failed to parse the file\", e);\n }\n }", "public static void processData() {\n\t\tString dirName = \"C:\\\\research_data\\\\mouse_human\\\\homo_b47_data\\\\\";\r\n\t//\tString GNF1H_fName = \"GNF1H_genes_chopped\";\r\n\t//\tString GNF1M_fName = \"GNF1M_genes_chopped\";\r\n\t\tString GNF1H_fName = \"GNF1H\";\r\n\t\tString GNF1M_fName = \"GNF1M\";\r\n\t\tString mergedValues_fName = \"GNF1_merged_expression.txt\";\r\n\t\tString mergedPMA_fName = \"GNF1_merged_PMA.txt\";\r\n\t\tString discretizedMI_fName = \"GNF1_discretized_MI.txt\";\r\n\t\tString discretizedLevels_fName = \"GNF1_discretized_levels.txt\";\r\n\t\tString discretizedData_fName = \"GNF1_discretized_data.txt\";\r\n\t\t\r\n\t\tboolean useMotifs = false;\r\n\t\tMicroArrayData humanMotifs = null;\r\n\t\tMicroArrayData mouseMotifs = null;\r\n\t\t\r\n\t\tMicroArrayData GNF1H_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1H_PMA = new MicroArrayData();\r\n\t\tGNF1H_PMA.setDiscrete();\r\n\t\tMicroArrayData GNF1M_value = new MicroArrayData();\r\n\t\tMicroArrayData GNF1M_PMA = new MicroArrayData();\r\n\t\tGNF1M_PMA.setDiscrete();\r\n\t\t\r\n\t\ttry {\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma\"); */\r\n\t\t/*\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.txt.homob44\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.txt.homob44\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.txt.homob44\"); */\r\n\t\t\tGNF1H_value.readFile(dirName+GNF1H_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1H_PMA.readFile(dirName+GNF1H_fName+\".pma.sn.txt\");\r\n\t\t\tGNF1M_value.readFile(dirName+GNF1M_fName+\".gcrma.snco.txt\");\r\n\t\t\tGNF1M_PMA.readFile(dirName+GNF1M_fName+\".pma.sn.txt\");\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\tif (useMotifs) {\r\n\t\t\thumanMotifs = new MicroArrayData();\r\n\t\t\tmouseMotifs = new MicroArrayData();\r\n\t\t\tloadMotifs(humanMotifs,GNF1H_value.geneNames,mouseMotifs,GNF1M_value.geneNames);\r\n\t\t}\r\n\t\t\r\n\t\t// combine replicates in PMA values\r\n\t\tint[][] H_PMA = new int[GNF1H_PMA.numRows][GNF1H_PMA.numCols/2];\r\n\t\tint[][] M_PMA = new int[GNF1M_PMA.numRows][GNF1M_PMA.numCols/2];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\tint v = 0;\r\n\t\tk = 0;\r\n\t\tj = 0;\r\n\t\twhile (j<GNF1H_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<H_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1H_PMA.dvalues[i][j] > 0 & GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0 | GNF1H_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tH_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tj = 0;\r\n\t\tk = 0;\r\n\t\twhile (j<GNF1M_PMA.numCols-1) {\r\n\t\t\tfor (i=0;i<M_PMA.length;i++) {\r\n\t\t\t\tv = 0;\r\n\t\t\t//\tif (GNF1M_PMA.dvalues[i][j] > 0 & GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0 | GNF1M_PMA.dvalues[i][j+1] > 0) {\r\n\t\t\t\t\tv = 1;\r\n\t\t\t\t}\r\n\t\t\t\tM_PMA[i][k] = v;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t\tj = j + 2;\r\n\t\t}\r\n\t\t\r\n\t\tint numMatched = 31;\r\n\t\t\r\n\t/*\tGNF1H_value.numCols = numMatched;\r\n\t\tGNF1M_value.numCols = numMatched; */\r\n\t\t\r\n\t\tint[][] matchPairs = new int[numMatched][2];\r\n\t\tfor(i=0;i<numMatched;i++) {\r\n\t\t\tmatchPairs[i][0] = i;\r\n\t\t\tmatchPairs[i][1] = i + GNF1H_value.numCols;\r\n\t\t}\r\n\t\t\r\n\t//\tDiscretizeAffyData H_discretizer = new DiscretizeAffyData(GNF1H_value.values,H_PMA,0);\r\n\t//\tH_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1H_value.values,H_PMA,GNF1H_value.numCols);\r\n\t\t\r\n\t//\tDiscretizeAffyData M_discretizer = new DiscretizeAffyData(GNF1M_value.values,M_PMA,0);\r\n\t//\tM_discretizer.adjustIntensities();\r\n\t\ttransformRelativeAbundance(GNF1M_value.values,M_PMA,GNF1M_value.numCols);\r\n\t\t\r\n\t\tdouble[][] mergedExpression = new double[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[][] mergedPMA = new int[GNF1H_value.numRows][GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\tint[] species = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tspecies = new int[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1H_value.values[i],0,mergedExpression[i],0,GNF1H_value.numCols);\r\n\t\t\tSystem.arraycopy(H_PMA[i],0,mergedPMA[i],0,GNF1H_value.numCols);\t\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tSystem.arraycopy(GNF1M_value.values[i],0,mergedExpression[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t\tSystem.arraycopy(M_PMA[i],0,mergedPMA[i],GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate experiment and gene names\r\n\t\tfor (i=0;i<GNF1H_value.numCols;i++) {\r\n\t\t\tGNF1H_value.experimentNames[i] = \"h_\" + GNF1H_value.experimentNames[i];\r\n\t\t\tspecies[i] = 1;\r\n\t\t}\r\n\t\tfor (i=0;i<GNF1M_value.numCols;i++) {\r\n\t\t\tGNF1M_value.experimentNames[i] = \"m_\" + GNF1M_value.experimentNames[i];\r\n\t\t\tspecies[i+GNF1H_value.numCols] = 2;\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedExperimentNames = null;\r\n\t\tif (!useMotifs) {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols];\r\n\t\t} else {\r\n\t\t\tmergedExperimentNames = new String[GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t}\r\n\t\tSystem.arraycopy(GNF1H_value.experimentNames,0,mergedExperimentNames,0,GNF1H_value.numCols);\r\n\t\tSystem.arraycopy(GNF1M_value.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols,GNF1M_value.numCols);\r\n\t\tif (useMotifs) {\r\n\t\t\tSystem.arraycopy(humanMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols,humanMotifs.numCols);\r\n\t\t\tSystem.arraycopy(mouseMotifs.experimentNames,0,mergedExperimentNames,GNF1H_value.numCols+GNF1M_value.numCols+humanMotifs.numCols,mouseMotifs.numCols);\r\n\t\t\tfor (i=0;i<humanMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols] = 3;\r\n\t\t\t}\r\n\t\t\tfor (i=0;i<mouseMotifs.numCols;i++) {\r\n\t\t\t\tspecies[i + GNF1H_value.numCols+GNF1M_value.numCols + humanMotifs.numCols] = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString[] mergedGeneNames = new String[GNF1H_value.numRows];\r\n\t\tfor (i=0;i<GNF1M_value.numRows;i++) {\r\n\t\t\tmergedGeneNames[i] = GNF1H_value.geneNames[i] + \"|\" + GNF1M_value.geneNames[i];\r\n\t\t}\r\n\t\t\r\n\t\tint[] filterList = new int[GNF1M_value.numRows];\r\n\t\tint numFiltered = 0;\r\n\t\tdouble maxExpressedPercent = 1.25;\r\n\t\tint maxExpressed_H = (int) Math.floor(maxExpressedPercent*((double) GNF1H_value.numCols));\r\n\t\tint maxExpressed_M = (int) Math.floor(maxExpressedPercent*((double) GNF1M_value.numCols));\r\n\t\tint numExpressed_H = 0;\r\n\t\tint numExpressed_M = 0;\r\n\t\t\r\n\t\tfor (i=0;i<GNF1H_value.numRows;i++) {\r\n\t\t\tnumExpressed_H = 0;\r\n\t\t\tfor (j=0;j<GNF1H_value.numCols;j++) {\r\n\t\t\t\tif (GNF1H_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1H_value.values[i][j])) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t\t\tnumExpressed_H++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnumExpressed_M = 0;\r\n\t\t\tfor (j=0;j<GNF1M_value.numCols;j++) {\r\n\t\t\t\tif (GNF1M_PMA.dvalues[i][j] > 0) {\r\n\t\t\t//\tif (GNF1H_value.values[i][j] > 1.5) {\r\n\t\t\t//\tif (!Double.isNaN(GNF1M_value.values[i][j])) {\r\n\t\t\t\t\tnumExpressed_M++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (numExpressed_M >= maxExpressed_M | numExpressed_H >= maxExpressed_H) {\r\n\t\t\t\tfilterList[i] = 1;\r\n\t\t\t\tnumFiltered++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tGNF1H_value = null;\r\n\t\tGNF1H_PMA = null;\r\n\t\tGNF1M_value = null;\r\n\t\tGNF1M_PMA = null;\r\n\t\t\r\n\t\tdouble[][] mergedExpression2 = null;\r\n\t\tif (numFiltered > 0) {\r\n\t\t\tk = 0;\r\n\t\t\tint[][] mergedPMA2 = new int[mergedPMA.length-numFiltered][mergedPMA[0].length];\r\n\t\t\tif (!useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length];\r\n\t\t\t} else {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length-numFiltered][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t}\r\n\t\t\tString[] mergedGeneNames2 = new String[mergedGeneNames.length-numFiltered];\r\n\t\t\tfor (i=0;i<filterList.length;i++) {\r\n\t\t\t\tif (filterList[i] == 0) {\r\n\t\t\t\t\tmergedPMA2[k] = mergedPMA[i];\r\n\t\t\t\t\tif (!useMotifs) {\r\n\t\t\t\t\t\tmergedExpression2[k] = mergedExpression[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[k],0,mergedExpression[i].length);\r\n\t\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[k],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[k],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmergedGeneNames2[k] = mergedGeneNames[i];\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmergedPMA = mergedPMA2;\r\n\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\tmergedGeneNames = mergedGeneNames2;\r\n\t\t} else {\r\n\t\t\tif (useMotifs) {\r\n\t\t\t\tmergedExpression2 = new double[mergedExpression.length][mergedExpression[0].length + humanMotifs.numCols + mouseMotifs.numCols];\r\n\t\t\t\tfor (i=0;i<mergedExpression.length;i++) {\r\n\t\t\t\t\tSystem.arraycopy(mergedExpression[i],0,mergedExpression2[i],0,mergedExpression[i].length);\r\n\t\t\t\t\tSystem.arraycopy(humanMotifs.values[i],0,mergedExpression2[i],mergedExpression[i].length,humanMotifs.numCols);\r\n\t\t\t\t\tSystem.arraycopy(mouseMotifs.values[i],0,mergedExpression2[i],humanMotifs.numCols+mergedExpression[i].length,mouseMotifs.numCols);\r\n\t\t\t\t}\r\n\t\t\t\tmergedExpression = mergedExpression2;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tDiscretizeAffyPairedData discretizer = new DiscretizeAffyPairedData(mergedExpression,mergedPMA,matchPairs,20);\r\n\t\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = discretizer.expression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = discretizer.numExperiments;\r\n\t\tmergedData.numRows = discretizer.numGenes;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tdiscretizer.discretizeDownTree(dirName+discretizedMI_fName);\r\n\t\t\tdiscretizer.mergeDownLevels(3,dirName+discretizedLevels_fName);\r\n\t\t\tdiscretizer.transposeDExpression();\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t\tmergedData.dvalues = discretizer.dExpression;\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t/*\tMicroArrayData mergedData = new MicroArrayData();\r\n\t\tmergedData.values = mergedExpression;\r\n\t\tmergedData.geneNames = mergedGeneNames;\r\n\t\tmergedData.experimentNames = mergedExperimentNames;\r\n\t\tmergedData.experimentCode = species;\r\n\t\tmergedData.numCols = mergedExpression[0].length;\r\n\t\tmergedData.numRows = mergedExpression.length;\r\n\t\ttry {\r\n\t\t\tmergedData.writeFile(dirName+mergedValues_fName);\r\n\t\t\tmergedData.setDiscrete();\r\n\t\t\tmergedData.values = null;\r\n\t\t//\tmergedData.dvalues = simpleDiscretization(mergedExpression,mergedPMA);\r\n\t\t\tmergedData.dvalues = simpleDiscretization2(mergedExpression,species);\r\n\t\t\tmergedData.writeFile(dirName+discretizedData_fName);\r\n\t\r\n\t\t\tmergedData.dvalues = mergedPMA;\r\n\t\t\tmergedData.numCols = mergedPMA[0].length;\r\n\t\t\tmergedData.writeFile(dirName+mergedPMA_fName);\r\n\t\t} catch(IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} */\r\n\t\t\r\n\t}", "private void processCourseFile(final String fileDir) throws IOException {\n mapReducer.preFillMap(cntMap, fileDir + File.separator + COURSE_FILE);\n }", "public static HashMap<String, HashMap<String, Double>> logProb(HashMap<String, HashMap<String, Double>> map){\n //for each key in the given map\n for (String key : map.keySet()){\n HashMap<String,Double> innerMap = map.get(key);\n Double total = 0.0;\n //loop through the inner map, add integer values to total\n for (String key2: innerMap.keySet()){\n total += innerMap.get(key2);\n }\n //loop through the inner map, set the integer values to log probability\n for (String key2: innerMap.keySet()){\n innerMap.put(key2, Math.log(innerMap.get(key2) / total));\n }\n }\n //return new map\n return map;\n }", "public static void produceFiles(DataLoaders d, double p, String corpus) throws CompressorException, IOException{\n//\t\tsort -t$'\\t' -k5 -nr conll.ambiverse.mappings > conll.ambiverse.mappings.sorted\n//\t\tsort -t$'\\t' -k5 -nr conll.babelfy.mappings > conll.babelfy.mappings.sorted\n//\t\tsort -t$'\\t' -k5 -nr conll.tagme.mappings > conll.tagme.mappings.sorted\n\t\t\n//\t\thead -n 23865 conll.tagme.mappings > conll_tagme_train.mappings\n\t\t\n\t\tdouble prop = 0;\n\n//\t\tTreeMap<String,String> ambiverseMap = new TreeMap<String, String>(); \n//\t\tTreeMap<String,String> babelfyMap = new TreeMap<String, String>();\n//\t\tTreeMap<String,String> tagmeMap = new TreeMap<String, String>();\n//\t\t\n\t\n\t\tOutputStreamWriter Ambp = new OutputStreamWriter(new FileOutputStream(\"./resources/ds/\"+corpus+\"/ds.amb.\"+p+\".txt\"), StandardCharsets.UTF_8);\n\t\tOutputStreamWriter Babp = new OutputStreamWriter(new FileOutputStream(\"./resources/ds/\"+corpus+\"/ds.bab.\"+p+\".txt\"), StandardCharsets.UTF_8);\n\t\tOutputStreamWriter Tagp = new OutputStreamWriter(new FileOutputStream(\"./resources/ds/\"+corpus+\"/ds.tag.\"+p+\".txt\"), StandardCharsets.UTF_8);\n\t\tCSVWriter csvWriterAmbp = new CSVWriter(Ambp, ',' , '\\'', '\\\\');\n\t\tCSVWriter csvWriterBabp = new CSVWriter(Babp, ',' , '\\'', '\\\\');\n\t\tCSVWriter csvWriterTagp = new CSVWriter(Tagp, ',' , '\\'', '\\\\');\n\t\t\n\t\tBufferedReader bffReaderAmbiverse = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/joao/datasets/\"+corpus+\"/mappings/\"+corpus+\".ambiverse.mappings.sorted\"),StandardCharsets.UTF_8));\n\t\tBufferedReader bffReaderBabelfy = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/joao/datasets/\"+corpus+\"/mappings/\"+corpus+\".babelfy.mappings.sorted\"),StandardCharsets.UTF_8));\n\t\tBufferedReader bffReaderTagme = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/joao/datasets/\"+corpus+\"/mappings/\"+corpus+\".tagme.mappings.sorted\"),StandardCharsets.UTF_8));\n\t\n\t\t\n\t\tString line=\"\";\n\t\tint countAmbiverse = 0;\n\t\twhile ((line = bffReaderAmbiverse.readLine()) != null) {\n\t\t\tString[] elements = line.split(\"\\t\");\n\t\t\tif(elements.length >=4){\n\t\t\t\tString docid = elements[0].toLowerCase();\n\t\t \tdocid = docid.replaceAll(\"\\'\", \"\");\n\t\t\t\tdocid = docid.replaceAll(\"\\\"\", \"\");\n\t\t\t\tString mention = elements[1].toLowerCase();\n\t\t\t\tString offset = elements[2];\n\t\t\t\tString entity = elements[3];\n\t\t\t\tif(entity.equalsIgnoreCase(\"null\")){ \n\t\t\t\t\tcontinue;\n\t\t\t\t}else{\n\t\t\t\t\tString confidence = elements[4];\n\t\t\t\t\tentity = entity.replaceAll(\"_\",\" \").toLowerCase();\n\t\t\t\t\tString key = docid+\"\\t\"+mention+\"\\t\"+offset;\n\t\t\t\t\tcountAmbiverse++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tline=\"\";\n\t\tint countBabelfy = 0;\n\t\twhile ((line = bffReaderBabelfy.readLine()) != null) {\n\t\t\tString[] elements = line.split(\"\\t\");\n\t\t\tif(elements.length >=4){\n\t\t\t\tString docid = elements[0].toLowerCase();\n\t\t \tdocid = docid.replaceAll(\"\\'\", \"\");\n\t\t\t\tdocid = docid.replaceAll(\"\\\"\", \"\");\n\t\t\t\tString mention = elements[1].toLowerCase();\n\t\t\t\tString offset = elements[2];\n\t\t\t\tString entity = elements[3];\n\t\t\t\tif(entity.equalsIgnoreCase(\"null\")){ \n\t\t\t\t\tcontinue;\n\t\t\t\t}else{\n\t\t\t\t\tString confidence = elements[4];\n\t\t\t\t\tentity = entity.replaceAll(\"_\",\" \").toLowerCase();\n\t\t\t\t\tString key = docid+\"\\t\"+mention+\"\\t\"+offset;\n\t\t\t\t\tcountBabelfy++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tline=\"\";\n\t\tint countTagme = 0;\n\t\twhile ((line = bffReaderTagme.readLine()) != null) {\n\t\t\tString[] elements = line.split(\"\\t\");\n\t\t\tif(elements.length >=4){\n\t\t\t\tString docid = elements[0].toLowerCase();\n\t\t \tdocid = docid.replaceAll(\"\\'\", \"\");\n\t\t\t\tdocid = docid.replaceAll(\"\\\"\", \"\");\n\t\t\t\tString mention = elements[1].toLowerCase();\n\t\t\t\tmention = mention.replaceAll(\"\\\"\", \" \");\n\t\t\t\tString offset = elements[2];\n\t\t\t\tString entity = elements[3];\n\t\t\t\tif(entity.equalsIgnoreCase(\"null\")){ \n\t\t\t\t\tcontinue;\n\t\t\t\t}else{\n\t\t\t\t\tString confidence = elements[4];\n\t\t\t\t\tentity = entity.replaceAll(\"_\",\" \").toLowerCase();\n\t\t\t\t\tString key = docid+\"\\t\"+mention+\"\\t\"+offset;\n\t\t\t\t\tcountTagme++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tbffReaderAmbiverse.close();\n\t\tbffReaderBabelfy.close();\n\t\tbffReaderTagme.close();\n\t\t\n/* End */\n\t\t\n\t\t\n//\t\t// *** Producing files ***//\n\t\tbffReaderAmbiverse = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/joao/datasets/\"+corpus+\"/mappings/\"+corpus+\".ambiverse.mappings.sorted\"),StandardCharsets.UTF_8));\n\t\n\t\tprop = ( p/100.0 )* countAmbiverse;\n\t\t\n\t\tint count = 0;\n\t\tline=\"\";\n\t\twhile ((line = bffReaderAmbiverse.readLine()) != null) {\n\t\t\tString[] elements = line.split(\"\\t\");\n\t\t\tif(elements.length >=4){\n\t\t\t\tString docid = elements[0].toLowerCase();\n\t\t \tdocid = docid.replaceAll(\"\\'\", \"\");\n\t\t\t\tdocid = docid.replaceAll(\"\\\"\", \"\");\n\t\t\t\tString mention = elements[1].toLowerCase();\n\t\t\t\tString offset = elements[2];\n\t\t\t\tString entity = elements[3];\n\t\t\t\tString confidence = elements[4];\n\t\t\t\tentity = entity.replaceAll(\"_\",\" \").toLowerCase();\n\t\t\t\tcount++;\n\t\t\t\tif(count <= prop ){\n\t\t\t\t\tAmbp.write(docid+\"\\t\"+mention+\"\\t\"+offset+\"\\t\"+entity+\"\\t\"+confidence+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(prop);\n\t\t\n\t\tbffReaderBabelfy = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/joao/datasets/\"+corpus+\"/mappings/\"+corpus+\".babelfy.mappings.sorted\"),StandardCharsets.UTF_8));\n\t\tprop = ( p/100.0 )* countBabelfy;\n\t\tcount = 0;\n\t\tline=\"\";\n\t\twhile ((line = bffReaderBabelfy.readLine()) != null) {\n\t\t\tString[] elements = line.split(\"\\t\");\n\t\t\tif(elements.length >=4){\n\t\t\t\tString docid = elements[0].toLowerCase();\n\t\t \tdocid = docid.replaceAll(\"\\'\", \"\");\n\t\t\t\tdocid = docid.replaceAll(\"\\\"\", \"\");\n\t\t\t\tString mention = elements[1].toLowerCase();\n\t\t\t\tString offset = elements[2];\n\t\t\t\tString entity = elements[3];\n\t\t\t\tString confidence = elements[4];\n\t\t\t\tentity = entity.replaceAll(\"_\",\" \").toLowerCase();\n\t\t\t\tcount++;\n\t\t\t\tif(count <= prop){\n\t\t\t\t\tBabp.write(docid+\"\\t\"+mention+\"\\t\"+offset+\"\\t\"+entity+\"\\t\"+confidence+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(prop);\n\t\t\n\t\tbffReaderTagme = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/joao/datasets/\"+corpus+\"/mappings/\"+corpus+\".tagme.mappings.sorted\"),StandardCharsets.UTF_8));\n\t\tprop = ( p/100.0 )* countTagme;\n\t\tcount = 0;\n\t\tline=\"\";\n\t\twhile ((line = bffReaderTagme.readLine()) != null) {\n\t\t\tString[] elements = line.split(\"\\t\");\n\t\t\tif(elements.length >=4){\n\t\t\t\tString docid = elements[0].toLowerCase();\n\t\t \tdocid = docid.replaceAll(\"\\'\", \"\");\n\t\t\t\tdocid = docid.replaceAll(\"\\\"\", \"\");\n\t\t\t\tString mention = elements[1].toLowerCase();\n\t\t\t\tString offset = elements[2];\n\t\t\t\tString entity = elements[3];\n\t\t\t\tString confidence = elements[4];\n\t\t\t\tentity = entity.replaceAll(\"_\",\" \").toLowerCase();\n\t\t\t\tcount++;\n\t\t\t\tif(count <= prop){\n\t\t\t\t\tTagp.write(docid+\"\\t\"+mention+\"\\t\"+offset+\"\\t\"+entity+\"\\t\"+confidence+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(prop);\n\t\t\n\t\tbffReaderAmbiverse.close();\n\t\tbffReaderBabelfy.close();\n\t\tbffReaderTagme.close();\n\t\t\n\t\tAmbp.close();\n\t\tBabp.close();\n\t\tTagp.close();\n\t\t\n\t\t\n\t}", "public static Map readMap(File f)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n Scanner mapReader = new Scanner(f);\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "private void populateDictionary() throws IOException {\n populateDictionaryByLemmatizer();\n// populateDictionaryBySynonyms();\n }", "@Override\r\n\t\t\tpublic void map(Object arg0, Object arg1, OutputCollector arg2,\r\n\t\t\t\t\tReporter arg3) throws IOException {\n\t\t\t\t\r\n\t\t\t}", "private void process() {\n\tint i = 0;\n\tIOUtils.log(\"In process\");\n\tfor (Map.Entry<Integer, double[]> entry : vecSpaceMap.entrySet()) {\n\t i++;\n\t if (i % 1000 == 0)\n\t\tIOUtils.log(this.getName() + \" : \" + i + \" : \" + entry.getKey()\n\t\t\t+ \" : \" + this.getId());\n\t double[] cent = null;\n\t double sim = 0;\n\t for (double[] c : clusters.keySet()) {\n\t\t// IOUtils.log(\"before\" + c);\n\t\tdouble csim = cosSim(entry.getValue(), c);\n\t\tif (csim > sim) {\n\t\t sim = csim;\n\t\t cent = c;\n\t\t}\n\t }\n\t if (cent != null && entry.getKey() != null) {\n\t\ttry {\n\t\t clusters.get(cent).add(entry.getKey());\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "@SuppressWarnings(\"static-access\")\n\t@Override\n\tpublic void runJob(JobProperties jobProperties) {\n\t\t// set global variables from passed job properties file\n\t\t// set type of array format used for object arrays \n\t\t// this will have to be changed to be more dynamic\n\t\t\n\t\t// Entity object that will hold all the wanted entities to be generated\n\n\t\tSet<Entity> builtEnts = new HashSet<Entity>();\n\t\t\n\t\tSet<String> patientIds = new HashSet<String>();\n\t\t\n\t\ttry {\t\n\t\t\tlogger.info(\"Setting Variables\");\n\t\t\tsetVariables(jobProperties);\n\t\t\n\t\t\tFile data = new File(FILE_NAME);\n\t\t\t\n\t\t\tlogger.info(\"Reading Mapping files\");\n\t\t\t\n\t\t\tList<Mapping> mappingFile = Mapping.class.newInstance().generateMappingList(MAPPING_FILE, MAPPING_SKIP_HEADER, MAPPING_DELIMITER, MAPPING_QUOTED_STRING);\n\n\t\t\tList<PatientMapping2> patientMappingFile = \n\t\t\t\t\t!PATIENT_MAPPING_FILE.isEmpty() ? PatientMapping2.class.newInstance().generateMappingList(PATIENT_MAPPING_FILE, MAPPING_DELIMITER): new ArrayList<PatientMapping2>();\n\t\t\t\n\t\t\t\t\t\n\t\t\t// set relational key if not set in config\n\t\t\tif(RELATIONAL_KEY_OVERRIDE == false) {\n\t\t\t\tfor(PatientMapping2 pm: patientMappingFile) {\n\t\t\t\t\tif(pm.getPatientColumn().equalsIgnoreCase(\"PatientNum\")) {\n\t\t\t\t\t\tRELATIONAL_KEY = pm.getPatientKey().split(\":\")[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tMap<String,Map<String,String>> datadic = DICT_FILE.exists() ? generateDataDict(DICT_FILE): new HashMap<String,Map<String,String>>();\n\t\t\t\n\t\t\tlogger.info(\"Finished Reading Mapping Files\");\n\n\t\t\tif(data.exists()){\n\t\t\t\t// Read datafile into a List of LinkedHashMaps.\n\t\t\t\t// List should be objects that will be used for up and down casting through out the job process.\n\t\t\t\t// Using casting will allow the application to be very dynamic while also being type safe.\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\n\t\t\t\t\tlogger.info(\"generating patients\");\n\t\t\t\t\t\n\t\t\t\t\tMap<String, Map<String,String>> patientList = buildPatientRecordList(data,patientMappingFile, datadic);\n\t\t\t\t\t\n\t\t\t\t\tfor(String key: patientList.keySet()) {\n\t\t\t\t\t\tMap<String,String> pat = patientList.get(key);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pat.containsKey(\"patientNum\")) {\n\t\n\t\t\t\t\t\t\tpatientIds.add(pat.get(\"patientNum\"));\n\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbuiltEnts.addAll(processPatientEntities(patientList.get(key)));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(patientIds.size() + \" Patients Generated.\");\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(\"Error building patients\");\n\t\t\t\t\tlogger.error(e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlogger.info(\"generating tables\");\n\t\t\t\ttry {\n\t\t\t\t\tlogger.info(\"Reading Data Files\");\n\n\t\t\t\t\tList recs = buildRecordList(data, mappingFile, datadic);\n\n\t\t\t\t\tlogger.info(\"Finished reading Data Files\");\n\n\t\t\t\t\tlogger.info(\"Building table Entities\");\n\n\t\t\t\t\tfor(Object o: recs){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( o instanceof LinkedHashMap ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbuiltEnts.addAll(processEntities(mappingFile,( LinkedHashMap ) o));\t\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Finished Building Entities\");\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(\"Error Processing data files\");\n\t\t\t\t\tlogger.error(e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlogger.info(\"Filling in Tree\");\n\t\t\t\tbuiltEnts.addAll(thisFillTree(builtEnts));\n\t\t\t\t\t\t\t\t\n\t\t\t\tlogger.info(\"Generating ConceptCounts\");\n\t\t\t\t\n\t\t\t\tbuiltEnts.addAll(ConceptCounts.generateCounts2(builtEnts, patientIds));\n\t\t\t\t\n\t\t\t\tlogger.info(\"finished generating tables\");\n\n\t\t\t} else {\n\t\t\t\tlogger.error(\"File \" + data + \" Does Not Exist!\");\n\t\t\t}\n\t\t\t//builtEnts.addAll(thisFillTree(builtEnts));\n\t\t\t// for testint seqeunces move this to a global variable and generate it from properties once working;\n\t\t\tlogger.info(\"Generating sequences\");\n\t\t\t\n\t\t\tList<ColumnSequencer> sequencers = new ArrayList<ColumnSequencer>();\n\t\t\t\n\t\t\tif(DO_SEQUENCING) {\n\t\t\t\t\n\t\t\t\tif(DO_CONCEPT_CD_SEQUENCE) sequencers.add(new ColumnSequencer(Arrays.asList(\"ConceptDimension\",\"ObservationFact\"), \"conceptCd\", \"CONCEPTCD\", \"I2B2\", CONCEPT_CD_STARTING_SEQ, 1));\n\t\n\t\t\t\tif(DO_ENCOUNTER_NUM_SEQUENCE) sequencers.add(new ColumnSequencer(Arrays.asList(\"ObservationFact\"), \"encounterNum\", \"ENCOUNTER\", \"I2B2\", ENCOUNTER_NUM_STARTING_SEQ, 1));\n\t\t\t\t\n\t\t\t\tif(DO_INSTANCE_NUM_SEQUENCE) sequencers.add(new ColumnSequencer(Arrays.asList(\"ObservationFact\"), \"instanceNum\", \"INSTANCE\", \"I2B2\", ENCOUNTER_NUM_STARTING_SEQ, 1));\n\t\n\t\t\t\tif(DO_PATIENT_NUM_SEQUENCE) sequencers.add(new ColumnSequencer(Arrays.asList(\"PatientDimension\",\"ObservationFact\",\"PatientTrial\"), \"patientNum\", \"ID\", \"I2B2\", PATIENT_NUM_STARTING_SEQ, 1));\n\n\t\t\t}\n\t\t\t\n\t\t\t//Set<ObjectMapping> oms = new HashSet<ObjectMapping>();\n\t\t\tlogger.info(\"Applying sequences\");\n\t\t\tSet<PatientMapping> pms = new HashSet<PatientMapping>();\t\t\n\t\t\t\n\t\t\tfor(ColumnSequencer seq: sequencers ) {\n\t\t\t\tlogger.info(\"Performing sequence: \" + seq.entityColumn + \" for e ( \" + seq.entityNames + \" )\" );\n\t\t\t\t\n\t\t\t\tpms.addAll(seq.generateSeqeunce2(builtEnts));\n\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Building Patient Mappings\");\n\t\t\t//Set<PatientMapping> pms = PatientMapping.objectMappingToPatientMapping(oms);\n\t\t\tlogger.info(\"Finished Building Patient Mappings\");\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\n\t\t\t\tlogger.info(\"Performing temp fixes\");\n\t\t\t\t//perform any temp fixes in method called here\n\t\t\t\tperformRequiredTempFixes(builtEnts);\n\t\t\t\t\n\n\t\t\t\t//Map<Path, List<String>> paths = Export.buildFilestoWrite(builtEnts, WRITE_DESTINATION, OUTPUT_FILE_EXTENSION);\n\t\t\t\t\n\t\t\t\tlogger.info(\"writing tables\");\n\t\t\t\t\n\t\t\t\tif(APPEND_FILES == false) {\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"Cleaning write directory - \" + new File(WRITE_DESTINATION).getAbsolutePath());\n\t\t\t\t\t\n\t\t\t\t\tExport.cleanWriteDir(WRITE_DESTINATION);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//Export.writeToFile(paths, WRITE_OPTIONS);\n\t\t\t\t\n\t\t\t\tlogger.info(\"Writing Entites to \" + new File(WRITE_DESTINATION).getAbsolutePath());\n\t\t\t\t\n\t\t\t\tExport.writeToFile(builtEnts, WRITE_DESTINATION, OUTPUT_FILE_EXTENSION, WRITE_OPTIONS);\n\t\t\t\t\n\t\t\t\tExport.writeToFile(pms, WRITE_DESTINATION, OUTPUT_FILE_EXTENSION, WRITE_OPTIONS);\n\n\t\t\t\tlogger.info(\"Finished writing files to \" + new File(WRITE_DESTINATION).getAbsolutePath());\n\t\t\t\t\n\t\t\t\t//Export.writeToFile(oms, WRITE_DESTINATION, OUTPUT_FILE_EXTENSION, WRITE_OPTIONS);\n\n\t\t\t} catch ( Exception e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//builtEnts.addAll(pms);\n\t\t\t\n\t\t\t//builtEnts.addAll(oms);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\n\t\t\tlogger.catching(Level.ERROR,e);\n\t\t\t\n\t\t} \n\n\t\tlogger.info(\"Job Completed\");\n\t}", "void results() {\n Time t = new Time(System.currentTimeMillis());\n endTime = t;\n\n float t1gpslog, t2gpslog, t3gpslog, bhgpslog, mhgpslog, fhgpslog, nfgpslog,\n t1dtnlog, t2dtnlog, t3dtnlog, bhdtnlog, mhdtnlog, fhdtnlog, nfdtnlog;\n float t1logpercentage, t2logpercentage, t3logpercentage, bhlogpercentage,\n mhlogpercentage, fhlogpercentage, nflogpercentage;\n\n t1gpslog = t2gpslog = t3gpslog = bhgpslog = mhgpslog = fhgpslog = nfgpslog\n = t1dtnlog = t2dtnlog = t3dtnlog = bhdtnlog = mhdtnlog = fhdtnlog = nfdtnlog = 0;\n int xval, yval;\n\n for (int rbucklocationx = 0; rbucklocationx < MAX_X_GRID; rbucklocationx++) {\n for (int rbucklocationy = 0; rbucklocationy < MAX_Y_GRID; rbucklocationy++) {\n if (t1_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t1GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t1gpslog++;\n }\n\n if (t2_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t2GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t2gpslog++;\n }\n\n if (t3_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t3GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t3gpslog++;\n }\n if (bh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n bhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n bhgpslog++;\n }\n if (mh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n mhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n mhgpslog++;\n }\n if (fh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n fhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n fhgpslog++;\n }\n if (nf_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n nfgGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n nfgpslog++;\n }\n }\n }\n\n for (int resultloop = 0; resultloop < DATA_MAX_PACKETS; resultloop++)\n {\n if (d1_message[resultloop] != 0) {\n if ((d1_message[resultloop] >> 11) == t1_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t1DTNLog.add(new GPSLog(xval, yval));\n t1dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t2_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t2DTNLog.add(new GPSLog(xval, yval));\n t2dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t3_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t3DTNLog.add(new GPSLog(xval, yval));\n t3dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == bh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n bhDTNLog.add(new GPSLog(xval, yval));\n bhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == mh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n mhDTNLog.add(new GPSLog(xval, yval));\n mhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == fh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n fhDTNLog.add(new GPSLog(xval, yval));\n fhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == nf_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n nfgDTNLog.add(new GPSLog(xval, yval));\n nfdtnlog++;\n }\n }\n }\n\n if (t1gpslog != 0) {\n t1logpercentage = (t1dtnlog / t1gpslog) * 100;\n percentageLog.add(\"t1percentage is \" + t1logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n });\n t1tp = t1logpercentage;\n }\n\n if (t2gpslog != 0) {\n t2logpercentage = (t2dtnlog / t2gpslog) * 100;\n percentageLog.add(\"t2percentage is \" + t2logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n });\n t2tp = t2logpercentage;\n }\n\n if (t3gpslog != 0) {\n t3logpercentage = (t3dtnlog / t3gpslog) * 100;\n percentageLog.add(\"t3percentage is \" + t3logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n });\n t3tp = t3logpercentage;\n }\n\n if (bhgpslog != 0) {\n bhlogpercentage = (bhdtnlog / bhgpslog) * 100;\n percentageLog.add(\"bhpercentage is \" + bhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n });\n bhtp = bhlogpercentage;\n }\n\n if (mhgpslog != 0) {\n mhlogpercentage = (mhdtnlog / mhgpslog) * 100;\n percentageLog.add(\"mhpercentage is \" + mhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n });\n mhtp = mhlogpercentage;\n }\n\n if (fhgpslog != 0) {\n fhlogpercentage = (fhdtnlog / fhgpslog) * 100;\n percentageLog.add(\"fhpercentage is \" + fhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n });\n fhtp = fhlogpercentage;\n }\n\n if (nfgpslog != 0) {\n nflogpercentage = (nfdtnlog / nfgpslog) * 100;\n percentageLog.add(\"nfpercentage is \" + nflogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n tpslc.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n });\n nftp = nflogpercentage;\n }\n\n float gpslogSum = t1gpslog + t2gpslog + t3gpslog + bhgpslog + mhgpslog + fhgpslog + nfgpslog;\n float dtnlogSum = t1dtnlog + t2dtnlog + t3dtnlog + bhdtnlog + mhdtnlog + fhdtnlog + nfdtnlog;\n\n \n if (gpslogSum > 0)\n {\n float collectiveThroughput = ((dtnlogSum) / (gpslogSum)) * 100;\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n tpslc.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n });\n ct = collectiveThroughput;\n }\n\n //Add the Radio Contact Ratio value to the series\n \n if (dtnlogSum > 0)\n {\n rcratio = radioContactLog.size()/dtnlogSum;\n }\n else\n {\n rcratio = 0;\n }\n Platform.runLater(()-> {\n rcrSeries.setYValue(rcratio);\n });\n updateGPSLogSeries();\n updateDataCenterSeries();\n\n //Update the binding properties \n Platform.runLater(()-> {\n simStarted.set(false);\n simInProgress.set(false);\n simCompleted.set(true);\n simNotInProgress.set(true);\n simPaused.set(false);\n simNotStarted.set(true);\n });\n packetModels.clear();\n packetModels.add(new PacktTallyModel(t1gpslog));\n packetModels.add(new PacktTallyModel(t2gpslog));\n packetModels.add(new PacktTallyModel(t3gpslog));\n packetModels.add(new PacktTallyModel(bhgpslog));\n packetModels.add(new PacktTallyModel(mhgpslog));\n packetModels.add(new PacktTallyModel(fhgpslog));\n packetModels.add(new PacktTallyModel(nfgpslog));\n packetModels.add(new PacktTallyModel(gpslogSum));\n packetModels.add(new PacktTallyModel(t1dtnlog));\n packetModels.add(new PacktTallyModel(t2dtnlog));\n packetModels.add(new PacktTallyModel(t3dtnlog));\n packetModels.add(new PacktTallyModel(bhdtnlog));\n packetModels.add(new PacktTallyModel(mhdtnlog));\n packetModels.add(new PacktTallyModel(fhdtnlog));\n packetModels.add(new PacktTallyModel(nfdtnlog));\n packetModels.add(new PacktTallyModel(dtnlogSum));\n packetModels.add(new PacktTallyModel(ct));\n packetModels.add(new PacktTallyModel(radioContactLog.size()));\n packetModels.add(new PacktTallyModel(rcratio));\n \n }", "public void CalculatePPMI(boolean readFromFile, boolean writeToFile) {\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\tSystem.out.println(\"\\nConverting matrix to use PPMI values...\");\n\t\tSystem.out.println(\"Memory used: \" + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / Math.pow(1000, 3) + \" GB\");\n\n\t\tfloat[][] C = null;\n\t\tfloat[][] newC = null;\n\n\t\t// Variables\n\t\tfloat matrixSum = 0f;\n\t\tfloat matrixDelta = 0f;\n\t\t\n\t\tfloat cellValue = 0f;\n\t\tfloat cellProbability = 0f;\n\t\t\n\t\tfloat rowSum = 0f;\n\t\tfloat rowDelta = 0f;\n\t\tfloat rowProbability = 0f;\n\t\t\n\t\tfloat colSum = 0f;\n\t\tfloat colDelta = 0f;\n\t\tfloat colProbability = 0f;\n\t\t\n\t\tfloat logValue = 0f;\n\t\tfloat maxValue = 0f;\n\t\tfloat PPMI = 0f;\n\n\t\t// Read from file if necessary\n\t\tif(readFromFile) {\n\t\t\t\n\t\t\tnewC = new float[this.V][this.V];\n\t\t\tSystem.out.println(\"Memory used: \" + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / Math.pow(1000, 3) + \" GB\");\n\t\t\t\t\t\n\t\t\ttry {\n\n\t\t\t\t// Read file\n\t\t\t\tRandomAccessFile file = new RandomAccessFile(\"context-matrix.raf\", \"r\");\n\t\t\t\t\n\t\t\t\tString line;\n\t\t\t\tString[] values;\n\t\t\t\tint rowNum = 0;\n\t\t\t\tint colNum = 0;\n\t\t\t\tfloat currentNum = 0f;\n\t\t\t\tint count = 0;\n\t\t\t\twhile((line = file.readLine()) != null) {\n\t\t\t\t\t\n\t\t\t\t\t// Check row num\n\t\t\t\t\tif(rowNum >= this.V) break;\n\t\t\t\t\t\n\t\t\t\t\tvalues = line.split(\" \");\n\t\t\t\t\t\n\t\t\t\t\tfor(String value : values) {\n\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcurrentNum = Float.parseFloat(value);\n\n\t\t\t\t\t\t// Calculate PPMI and store value in newC\n\t\t\t\t\t\tif(currentNum != 0 && currentNum < 16) {\n\t\t\t\t\t\t\tcellProbability = currentNum / this.matrixSum;\n\t\t\t\t\t\t\trowProbability = this.rowSums[rowNum] / this.matrixSum;\n\t\t\t\t\t\t\tcolProbability = this.colSums[colNum] / this.matrixSum;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlogValue = cellProbability / (rowProbability * colProbability);\n\t\t\t\t\t\t\tmaxValue = (float) (Math.log10(logValue) / Math.log10(2));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPPMI = Math.max(maxValue, 0);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewC[rowNum][colNum] = PPMI;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(count % 1000000 == 0)\n\t\t\t\t\t\t\tSystem.out.println(\"Progress: \" + (count / 1000000) + \" / \" + (((long)newC.length * (long)newC[0].length) / 1000000));\n\n\t\t\t\t\t\tcolNum++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcolNum = 0;\n\t\t\t\t\trowNum++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Close file\n\t\t\t\tfile.close();\n\t\t\t\t\n\t\t\t\t// Store new matrix on instance object\n\t\t\t\tthis.TermContextMatrix_PPMI = newC;\n\t\t\t\tif(this.TermContextMatrix_PPMI == null) System.out.println(\"PPMI term-context matrix is null.\");\n\n\t\t\t} catch(IOException e0) {\n\t\t\t\te0.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tC = this.TermContextMatrix_FREQ;\n\t\t\tnewC = new float[C.length][C[0].length];\n\n\t\t\t// Calculate matrix sum\n\t\t\tfor(int i = 0; i < C.length; i++) {\n\t\t\t\tfor(int j = 0; j < C[i].length; j++) {\n\t\t\t\t\tmatrixDelta = C[i][j];\n\t\t\t\t\tmatrixSum += matrixDelta;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// For each cell\n\t\t\tfor(int u = 0; u < C.length; u++) {\n\t\t\t\t\n\t\t\t\t// Calculate row sum\n\t\t\t\tfor(int r = 0; r < C[u].length; r++) {\n\t\t\t\t\trowDelta = C[u][r];\n\t\t\t\t\trowSum += rowDelta;\n\t\t\t\t}\n\t\t\t\trowProbability = rowSum / matrixSum;\n\t\t\t\t\n\t\t\t\tfor(int v = 0; v < C[u].length; v++) {\n\t\t\t\t\t\n\t\t\t\t\tcellValue = C[u][v];\n\t\t\t\t\t\n\t\t\t\t\tif(u != v && cellValue != 0) {\n\n\t\t\t\t\t\t// Calculate cell probability\n\t\t\t\t\t\tcellProbability = cellValue / matrixSum;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Calculate col sum\n\t\t\t\t\t\tfor(int c = 0; c < C.length; c++) {\n\t\t\t\t\t\t\tcolDelta = C[c][v];\n\t\t\t\t\t\t\tcolSum += colDelta;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcolProbability = (float) (Math.pow(colSum, 0.75) / Math.pow(matrixSum, 0.75));\n\n\t\t\t\t\t\tlogValue = cellProbability / (rowProbability * colProbability);\n\t\t\t\t\t\tmaxValue = (float) (Math.log10(logValue) / Math.log10(2));\n\t\t\t\t\t\t\n\t\t\t\t\t\tPPMI = Math.max(maxValue, 0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewC[u][v] = PPMI;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.TermContextMatrix_PPMI = newC;\t\t\t\n\t\t}\n\n\t\tSystem.out.println(\"Matrix converted.\");\n\n\t\tlong endTime = System.currentTimeMillis();\n\t\t\n\t\tSystem.out.println(\"Time taken: \" + (endTime - startTime) + \" ms\");\n\t\t\n\t\tif(writeToFile) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tWriteMatrixToDisk(this.TermContextMatrix_PPMI);\n\t\t\t\n\t\t\t\t// Save any settings pertaining to the matrix for later use\n\t\t\t\tBufferedWriter settingsBw = new BufferedWriter(new FileWriter(\"settings.txt\"));\n\t\t\t\tsettingsBw.write(\"V \" + this.V + \"\\n\");\n\t\t\t\tsettingsBw.close();\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}", "@Override\n public void process(HashMap<K, V> tuple)\n {\n for (Map.Entry<K, V> e: tuple.entrySet()) {\n MutableDouble val = basemap.get(e.getKey());\n if (!doprocessKey(e.getKey())) {\n continue;\n }\n if (val == null) { // Only process keys that are in the basemap\n val = new MutableDouble(e.getValue().doubleValue());\n basemap.put(cloneKey(e.getKey()), val);\n continue;\n }\n double change = e.getValue().doubleValue() - val.value;\n double percent = (change/val.value)*100;\n if (percent < 0.0) {\n percent = 0.0 - percent;\n }\n if (percent > percentThreshold) {\n HashMap<V,Double> dmap = new HashMap<V,Double>(1);\n dmap.put(cloneValue(e.getValue()), percent);\n HashMap<K,HashMap<V,Double>> otuple = new HashMap<K,HashMap<V,Double>>(1);\n otuple.put(cloneKey(e.getKey()), dmap);\n alert.emit(otuple);\n }\n val.value = e.getValue().doubleValue();\n }\n }", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "public void parseLog2(){\n\t\ttry{\n\t\t\tMxmlFile eventlog=new MxmlFile(res.getFileName());\n\t\t\t//log.info(\"processing \"+res.getFileName());\n\t\t\tres=eventlog.parse(eventlog.read(), res);\n\t\t\teventlog.close();\n\t\t}catch(Exception e){\n\t\t\tlog.warn(e.toString());\n\t\t}\n\t}", "private void processMetadataFromLoader() {\n\n int recordCount = mdi.readInt();\n\n long currentTime = System.currentTimeMillis();\n synchronized (entities) {\n clearOldTempIndexes(currentTime);\n\n for (int i = 0; i < recordCount; i++) {\n int tempIndex = mdi.readInt();\n assert DirectProtocol.isValidTempIndex(tempIndex);\n String symbol = mdi.readCharSequence().toString().intern();\n\n ConstantIdentityKey key;\n int entityIndex = entities.get(symbol, NOT_FOUND_VALUE);\n if (entityIndex == NOT_FOUND_VALUE) {\n entityIndex = entities.size();\n key = new ConstantIdentityKey(symbol);\n entities.put(key, entityIndex);\n } else {\n key = entities.getKeyObject(symbol);\n }\n\n // Note: key is guarantied to be same object as in \"entities\" field\n tempIndexes.put(tempIndex, key);\n\n sendMetadata(symbol, entityIndex);\n }\n if (recordCount > 0) {\n lastTempIndexAdded = currentTime;\n }\n }\n }", "public void fileReader2(String fin) throws IOException {\r\n Decoder decoder = new Decoder();\r\n\r\n Map<String,String> dicionario = new HashMap<String,String>();\r\n Map<String,Integer> colecaoMetais = new HashMap<String,Integer>();\r\n BufferedReader br;\r\n String alien_Sound_1,alien_Sound_2,alien_Sound_3,alien_Sound_4;\r\n\r\n try { \r\n br = new BufferedReader(new FileReader(fin));\r\n \r\n int numLinhas = 0;\r\n String line = null;\r\n while ((line = br.readLine()) != null) {\r\n\r\n /*\r\n Read up to 7 lines of Notations\r\n and saves it on a HashMap.\r\n */\r\n if(((line.substring(5,6)).equals(\"is\")) && numLinhas<7){ \r\n String AlienLang = line.substring(0,4);\r\n String RomanNumeral = line.substring(8);\r\n dicionario.put(AlienLang,RomanNumeral);\r\n System.out.println(AlienLang+\" \"+RomanNumeral);\r\n }\r\n \r\n \r\n /*\r\n Read the info given: unidades, creditos and the type of the metal.\r\n And it saves the metal and its value in a HashMap.\r\n */\r\n else if(line.charAt(line.length()-1) != '?' && (line.substring(0,6).equals(\"quanto \")==false) || line.substring(0,6).equals(\"quantos\")==false){\r\n int unidadesInt = decoder.romanToInt((dicionario.get(line.substring(0,3)) + dicionario.get(line.substring(5,8))));\r\n String metal = dicionario.get(line.substring(10,13));\r\n int creditos = decoder.romanToInt(dicionario.get(line.substring(20,21))); \r\n int metalValor = creditos/unidadesInt;\r\n\r\n colecaoMetais.put(metal,metalValor);\r\n System.out.println(metal +\" \"+ metalValor);\r\n }\r\n\r\n /*\r\n Recongnizes that this a question \"quanto vale\"\r\n and calculates it with the numbers given.\r\n if the alien numbers given are not known it will print an error messege.\r\n */\r\n else if(numLinhas>7 && (line.substring(0,6).equals(\"quanto \"))){\r\n alien_Sound_1 = line.substring(12,15);\r\n alien_Sound_2 = line.substring(17,20);\r\n alien_Sound_3 = line.substring(22,25);\r\n alien_Sound_4 = line.substring(27,30);\r\n\r\n if(((dicionario.containsKey(alien_Sound_1) == false || \r\n (dicionario.containsKey(alien_Sound_2)) == false) || \r\n (dicionario.containsKey(alien_Sound_3)) == false) ||\r\n (dicionario.containsKey(alien_Sound_4)) == false){\r\n System.out.println(\"I have no idea what you are talking about\");\r\n\r\n }\r\n\r\n int finalCreditos = decoder.romanToInt(dicionario.get(alien_Sound_1)\r\n + (dicionario.get(alien_Sound_2))\r\n + (dicionario.get(alien_Sound_3)\r\n + (dicionario.get(alien_Sound_4))));\r\n\r\n System.out.println(alien_Sound_1 +\" \"+ alien_Sound_2 +\" \"+ alien_Sound_3 +\" \"+ alien_Sound_4 +\" is \"+ finalCreditos);\r\n }\r\n /*\r\n Recongnizes that this a question \"quantos créditos são\"\r\n and calculates it with the numbers and kind of metal given.\r\n if the alien numbers given or the metal are not known it will print an error messege.\r\n */\r\n if(line.charAt(line.length()-1) == '?' && (line.substring(0,6).equals(\"quantos\"))){\r\n alien_Sound_1 = line.substring(21,24);\r\n alien_Sound_2 = line.substring(26,29);\r\n alien_Sound_3 = line.substring(31,34);\r\n\r\n if(((dicionario.containsKey(alien_Sound_1) == false) || \r\n (dicionario.containsKey(alien_Sound_2) == false) || \r\n (colecaoMetais.containsKey(alien_Sound_3) == false))){\r\n System.out.println(\"I'm sorry Dave, I'm afraid I can't do that\");\r\n }\r\n\r\n int finalUnidades = decoder.romanToInt(dicionario.get(alien_Sound_1) + (dicionario.get(alien_Sound_2)));\r\n int valorMetal = colecaoMetais.get(alien_Sound_3);\r\n int finalMetalValue = finalUnidades * valorMetal;\r\n\r\n System.out.println(alien_Sound_1 +\" \"+ alien_Sound_2 +\" \"+ alien_Sound_3 +\" is \"+ finalMetalValue);\r\n }\r\n\r\n numLinhas++;\r\n \r\n }\r\n br.close();\r\n\r\n }\r\n catch(IOException e) \r\n { \r\n e.printStackTrace(); \r\n } \r\n \r\n }", "private void calculateIDF2Values() throws IOException {\n\t\tfor (int i = 0; i < getTfMapArrayIDF().size(); i++) {\n\t\t\tList<Map<String, List<Double>>> gestureDocument = getTfMapArrayIDF()\n\t\t\t\t\t.get(i);\n\t\t\tMap<String, Double> idf2PerDocument = getTfMapArrayIDF2().get(i);\n\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String, List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet()\n\t\t\t\t\t\t.iterator();\n\t\t\t\twhile (it.hasNext()) {\n\t\t\t\t\tMap.Entry<String, List<Double>> pairs = (Map.Entry) it\n\t\t\t\t\t\t\t.next();\n\t\t\t\t\tDouble inverse = (new Double(getTfMapArrayIDF().get(0)\n\t\t\t\t\t\t\t.size()) / idf2PerDocument.get(pairs.getKey())); // already\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// inversse\n\t\t\t\t\tList<Double> tf = pairs.getValue();\n\t\t\t\t\ttf.set(2,Math.log(inverse));\n\t\t\t\t\ttf.set(3,tf.get(0) * tf.get(1)); //tf-idf\n\t\t\t\t\tidfValues.add(tf.get(1));\n\t\t\t\t\ttf.set(4,tf.get(0) * tf.get(2)); //tf-idf2\n\t\t\t\t\tidf2Values.add(tf.get(2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tBufferedReader br=null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(args[0]));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"The specified file \" + args[0] + \"was not found\");\n\t\t\te1.printStackTrace();\n\t\t}\n String line = \"\";\n //HashMap<String, Integer> wordmap = new HashMap<String, Integer>();\n\t\tInteger totalCount = 0;\n try {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t totalCount++;\n\t\t\t}\n br.close();\n br = new BufferedReader(new FileReader(args[0]));\n Double multiplier = Math.log (1/totalCount.doubleValue());\n FileWriter fstream = new FileWriter(\"juice_inter_\" + args[1], true);\n\t\t\tBufferedWriter output = new BufferedWriter(fstream);\n while ((line = br.readLine()) != null) {\n\t\t\t String[] values = line.split(\":\")[1].split(\",\");\n\t\t\t String fileName = values[0];\n\t\t\t String tf_string = values[1];\n\t\t\t Double tf = Double.parseDouble(tf_string);\n\t\t\t Double result = tf * multiplier;\n\t\t\t output.write( line.split(\":\")[0]+ \" , \" + fileName + \" : \" + result + \"\\n\");\n\t\t\t \n\t\t\t}\n output.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\tprotected void map(Text key, Text value, Context context)throws IOException, InterruptedException {\n\t\t\tString val = value.toString();\n\t\t\t//String word = line.split(\",\")[0];\n\t\t\t//String docname = line.split(\",\")[1];\n\t\t\tdouble n = Double.parseDouble(val.split(\",\")[0]);\n\t\t\tdouble max = Double.parseDouble(val.split(\",\")[1]);\n\t\t\tdouble N = Double.parseDouble(val.split(\",\")[2]);\n\t\t\tdouble m = Double.parseDouble(val.split(\",\")[3]);\n\t\t\t//System.out.println(\"n is:\"+n+\"max is:\"+max+\" N is:\"+N+\" m is:\"+m+\" D is:\"+D);\n\t\t\tdouble tf = n/max;\n\t\t\t//System.out.println(\"TF is:\"+tf);\n\t\t\t//String TF = \"tf: \"+tf;\n\t\t\tdouble idf = (Math.log(D/m)/Math.log(2));\n\t\t\tdouble tfidf = tf*idf;\n\t\t\t//System.out.println(\"IDF is:\"+idf);\n\t\t\t//String IDF = \"idf: \"+idf;\n\t\t\tString word = key.toString().split(\",\")[0];\n\t\t\tString article = key.toString().split(\",\")[1];\n\t\t\tString new_val = word+\",\"+tf+\",\"+idf+\",\"+tfidf;\n\t\t\tcontext.write(new Text(article),new Text(new_val));\n\t\t}", "private Map<Double, NeutralLoss> ReadInNeutralLosses()\n\t{\n\t\tneutralLoss = new HashMap<Double, NeutralLoss>();\n\t\ttry \n {\t\n \tInputStream istream = this.getClass().getClassLoader().getResourceAsStream(\"/neutralLoss.csv\");\n \t\n \t // Get the object of DataInputStream\n \t DataInputStream in = new DataInputStream(istream);\n \t BufferedReader br = new BufferedReader(new InputStreamReader(in));\n \t String strLine;\n \t boolean first = true;\n \t //Read File Line By Line\n \t while ((strLine = br.readLine()) != null) {\n \t \t//skip header\n \t \tif(first)\n \t \t{\n \t \t\tfirst = false;\n \t \t\tcontinue;\n \t \t}\n \t if(strLine.equals(\"//\"))\n \t \t break;\n \t \n \t if(strLine.startsWith(\"#\"))\n \t \t continue;\n \t \n \t String[] lineArray = strLine.split(\"\\t\");\n \t IMolecularFormula formula = DefaultChemObjectBuilder.getInstance().newMolecularFormula();\n \t int mode = 1;\n \t //positive and negative mode\n \t if(lineArray[0].equals(\"+ -\"))\n \t \t mode = 0;\n \t //negative mode\n \t else if(lineArray[0].equals(\"-\"))\n \t \t mode = -1;\n \t \n \t IMolecularFormula mfT = DefaultChemObjectBuilder.getInstance().newMolecularFormula(); \t \n \t IMolecularFormula mfE = DefaultChemObjectBuilder.getInstance().newMolecularFormula();\n \t NeutralLoss nl = new NeutralLoss(MolecularFormulaManipulator.getMolecularFormula(lineArray[3], mfE), MolecularFormulaManipulator.getMolecularFormula(lineArray[2], mfT), mode, Integer.parseInt(lineArray[4]), Integer.parseInt(lineArray[5]), lineArray[6], Integer.parseInt(lineArray[7]));\n \t double deltaM = Double.parseDouble(lineArray[1]);\n \t neutralLoss.put(deltaM, nl);\n \t //System.out.println(\"Bond: '\" + bond + \"' Energy: '\" + energy + \"'\");\n \t }\n \t //Close the input stream\n \t in.close();\n } \n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n \n return neutralLoss;\n\t}", "public void loadAll() throws IOException {\r\n System.out.println(\"Previous setting were:\");\r\n System.out.print(\"Time: \" + SaveLoadPrev.getPrevTime(\"outputfile.txt\") + \" | \");\r\n System.out.print(\"Bus Number: \" + SaveLoadPrev.getPrevBusnum(\"outputfile.txt\") + \" | \");\r\n System.out.println(\"Bus Stop: \" + SaveLoadPrev.getPrevBusstop(\"outputfile.txt\"));\r\n String time = SaveLoadPrev.getPrevTime(\"outputfile.txt\");\r\n String busnum = SaveLoadPrev.getPrevBusnum(\"outputfile.txt\");\r\n String busstop = SaveLoadPrev.getPrevBusstop(\"outputfile.txt\");\r\n new ArriveTimeCalculator(busstop, busnum, time);\r\n }", "private void loadTranslationMapValues(String transMapName, String mapName, String mapKeyPrefix)\n {\n Properties props = null;\n props = PropertiesUtils.loadProperties(propertyFilePaths, transMapName);\n logger.debug(\"Loading Custom Map: \" + transMapName);\n loadTranslationMapValues(props, mapName, mapKeyPrefix);\n }", "private void preprocessOutputs() {\n\t\tfor (int i = 0 ; i < numberOfOutputs; i++) {\n\t\t\tdouble minValue = Double.MAX_VALUE;\n\t\t\tdouble maxValue = 0;\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\tif (records.get(j).output[i] < minValue) {\n\t\t\t\t\tminValue = records.get(j).output[i];\n\t\t\t\t}\n\t\t\t\tif (records.get(j).output[i] > maxValue) {\n\t\t\t\t\tmaxValue = records.get(j).output[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set global minimums and maximums\n\t\t\toutputMinimums[i] = minValue;\n\t\t\toutputMaximums[i] = maxValue;\n\n\t\t\t// scale output to be between 0 and 1\n\t\t\tif (minValue < 0 || maxValue > 1) {\n\t\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\n\t\t\t\t\tdouble oldOutput = records.get(j).output[i];\n\t\t\t\t\tdouble newOutput = (oldOutput - minValue) / (maxValue - minValue);\n\t\t\t\t\trecords.get(j).output[i] = newOutput;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "public void process(){\n\n for(int i = 0; i < STEP_SIZE; i++){\n String tmp = \"\" + accData[i][0] + \",\" + accData[i][1] + \",\"+accData[i][2] +\n \",\" + gyData[i][0] + \",\" + gyData[i][1] + \",\" + gyData[i][2] + \"\\n\";\n try{\n stream.write(tmp.getBytes());\n }catch(Exception e){\n //Log.d(TAG,\"!!!\");\n }\n\n }\n\n /**\n * currently we don't apply zero-mean, unit-variance operation\n * to the data\n */\n // only accelerator's data is using, currently 200 * 3 floats\n // parse the 1D-array to 2D\n\n if(recognizer.isInRecognitionState() &&\n recognizer.getGlobalRecognitionTimes() >= Constants.MAX_GLOBAL_RECOGNITIOME_TIMES){\n recognizer.resetRecognitionState();\n }\n if(recognizer.isInRecognitionState()){\n recognizer.removeOutliers(accData);\n recognizer.removeOutliers(gyData);\n\n double [] feature = new double [FEATURE_SIZE];\n recognizer.extractFeatures(feature, accData, gyData);\n\n int result = recognizer.runModel(feature);\n String ret = \"@@@\";\n if(result != Constants.UNDEF_RET){\n if(result == Constants.FINISH_RET){\n mUserWarningService.playSpeech(\"Step\" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO);\n waitForPlayout(2000);\n mUserWarningService.playSpeech(Constants.FINISH_INFO);\n waitForPlayout(1);\n recognizer.resetLastGesutre();\n recognizer.resetRecognitionState();\n ret += \"1\";\n }else if(result == Constants.RIGHT_RET){\n mUserWarningService.playSpeech(\"Step\" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO);\n waitForPlayout(2000);\n mUserWarningService.playSpeech(\"Now please do Step \" + Integer.toString(recognizer.getExpectedGesture()));\n waitForPlayout(1);\n ret += \"1\";\n }else if(result == Constants.ERROR_RET){\n mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getExpectedGesture());\n waitForPlayout(1);\n ret += \"0\";\n }else if(result == Constants.ERROR_AND_FORWARD_RET){\n mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getLastGesture());\n waitForPlayout(1);\n if(recognizer.getExpectedGesture() <= Constants.STATE_SPACE){\n mUserWarningService.playSpeech(\n \"Step \" + recognizer.getLastGesture() + \"missing \" +\n \". Now please do Step\" + Integer.toString(recognizer.getExpectedGesture()));\n waitForPlayout(1);\n }else{\n recognizer.resetRecognitionState();\n mUserWarningService.playSpeech(\"Recognition finished.\");\n waitForPlayout(1);\n }\n\n\n ret += \"0\";\n }\n ret += \",\" + Integer.toString(result) + \"@@@\";\n\n Log.d(TAG, ret);\n Message msg = new Message();\n msg.obj = ret;\n mWriteThread.writeHandler.sendMessage(msg);\n }\n }\n\n }", "private static void updateFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedWriter frequencyWriter = new BufferedWriter(new FileWriter(frequencyFile));\n\n\t\tfor(Entry<String, Long> entry : dataMap.entrySet()) { // Write every entry to the frequency file\n\n\t\t\tfrequencyWriter.write(generateStringFromEntry(entry));\n\t\t\tfrequencyWriter.newLine();\n\t\t}\n\n\t\tfrequencyWriter.close();\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public void initialize() throws Exception {\n sampleVertex = null;\n sampleMap = null;\n\n // Reset static variables cleared for avoiding OOM.\n new JVMReuseImpl().cleanupStaticData();\n\n // Set an empty reporter for now. Once we go to Tez 0.8\n // which adds support for mapreduce like progress (TEZ-808),\n // we need to call progress on Tez API\n PhysicalOperator.setReporter(new ProgressableReporter());\n\n UserPayload payload = getContext().getUserPayload();\n conf = TezUtils.createConfFromUserPayload(payload);\n SpillableMemoryManager.getInstance().configure(conf);\n PigContext.setPackageImportList((ArrayList<String>) ObjectSerializer\n .deserialize(conf.get(\"udf.import.list\")));\n Properties log4jProperties = (Properties) ObjectSerializer\n .deserialize(conf.get(PigImplConstants.PIG_LOG4J_PROPERTIES));\n if (log4jProperties != null) {\n PropertyConfigurator.configure(log4jProperties);\n }\n\n // To determine front-end in UDFContext\n conf.set(MRConfiguration.JOB_APPLICATION_ATTEMPT_ID, getContext().getUniqueIdentifier());\n\n // For compatibility with mapreduce. Some users use these configs in their UDF\n // Copied logic from the tez class - org.apache.tez.mapreduce.output.MROutput\n // Currently isMapperOutput is always false. Setting it to true produces empty output with MROutput\n boolean isMapperOutput = conf.getBoolean(MRConfig.IS_MAP_PROCESSOR, false);\n TaskAttemptID taskAttemptId = org.apache.tez.mapreduce.hadoop.mapreduce.TaskAttemptContextImpl\n .createMockTaskAttemptID(getContext().getApplicationId().getClusterTimestamp(),\n getContext().getTaskVertexIndex(), getContext().getApplicationId().getId(),\n getContext().getTaskIndex(), getContext().getTaskAttemptNumber(), isMapperOutput);\n conf.set(JobContext.TASK_ATTEMPT_ID, taskAttemptId.toString());\n conf.set(JobContext.TASK_ID, taskAttemptId.getTaskID().toString());\n conf.setBoolean(JobContext.TASK_ISMAP, isMapperOutput);\n conf.setInt(JobContext.TASK_PARTITION,\n taskAttemptId.getTaskID().getId());\n conf.set(JobContext.ID, taskAttemptId.getJobID().toString());\n if (conf.get(PigInputFormat.PIG_INPUT_LIMITS) != null) {\n // Has Load and is a root vertex\n conf.setInt(JobContext.NUM_MAPS, getContext().getVertexParallelism());\n } else {\n conf.setInt(JobContext.NUM_REDUCES, getContext().getVertexParallelism());\n }\n\n conf.set(PigConstants.TASK_INDEX, Integer.toString(getContext().getTaskIndex()));\n UDFContext.getUDFContext().addJobConf(conf);\n UDFContext.getUDFContext().deserialize();\n\n String execPlanString = conf.get(PLAN);\n execPlan = (PhysicalPlan) ObjectSerializer.deserialize(execPlanString);\n SchemaTupleBackend.initialize(conf);\n PigMapReduce.sJobContext = HadoopShims.createJobContext(conf, new org.apache.hadoop.mapreduce.JobID());\n\n // Set the job conf as a thread-local member of PigMapReduce\n // for backwards compatibility with the existing code base.\n PigMapReduce.sJobConfInternal.set(conf);\n\n Utils.setDefaultTimeZone(conf);\n\n boolean aggregateWarning = \"true\".equalsIgnoreCase(conf.get(\"aggregate.warning\"));\n PigStatusReporter pigStatusReporter = PigStatusReporter.getInstance();\n pigStatusReporter.setContext(new TezTaskContext(getContext()));\n pigHadoopLogger = PigHadoopLogger.getInstance();\n pigHadoopLogger.setReporter(pigStatusReporter);\n pigHadoopLogger.setAggregate(aggregateWarning);\n PhysicalOperator.setPigLogger(pigHadoopLogger);\n\n LinkedList<TezTaskConfigurable> tezTCs = PlanHelper.getPhysicalOperators(execPlan, TezTaskConfigurable.class);\n for (TezTaskConfigurable tezTC : tezTCs){\n tezTC.initialize(getContext());\n }\n }", "public final void TemplateTransform() throws IOException {\r\n ArrayList<Integer> numbers = readNumbersFromFile();\r\n ArrayList<Object> transformNums = calculateTransform(numbers);\r\n writeOutputToFile(transformNums);\r\n\r\n if(printExecutionTime()){\r\n Date date = new Date();\r\n System.out.println(date.toString());\r\n }\r\n }", "public void printMapping() {\n LogDumper.out(sourceOutputMap);\n }", "public MapProcessor(String mapFile) throws IOException\n {\n validateReflexMapFile(mapFile);\n\n if (reflexValidated)\n {\n //Set the map file parameter\n this.mapFile = mapFile;\n\n //Initialize the map scanner\n mapScanner = new Scanner(new File(mapFile));\n\n //Tell the user everything is honky dory for the scanner\n System.out.println(\"\\nLoaded your file: \" + mapFile);\n\n //The name of the file with the modification in the name\n String partialFileName = mapFile.substring(0, mapFile.length() - 4);\n\n //Initialize the file writer\n mapWriter = new FileWriter(partialFileName + \"_BrushShifted.map\");\n\n //Tell the user everything is honky dory for the writer\n System.out.println(\"Initialized empty map file for writing: \" + partialFileName + \"_BrushShifted.map\");\n\n lines = new String[lineCount()];\n System.out.println(\"Created array of lines with size \" + lines.length + \"\\n\");\n }\n }", "public void preParseInputFileAE(String inputFile) {\n System.out.println(\"Parsing AE log file...\");\n // gathering lots of data\n serverNames = new LinkedHashSet<>();\n applicationNames = new LinkedHashSet<>();\n serviceNames = new LinkedHashSet<>();\n // connected applications, by servers, by simulation step\n graphHistory = new HashMap<>(); // Map<Integer, Map<FakeServer, List<FakeApplication>>>\n // servers, by simulation step\n serverHistory = new HashMap<>(); // Map<Integer, List<FakeServer>>\n // applications, by simulation step\n applicationHistory = new HashMap<>(); // Map<Integer, List<FakeApplication>>\n int stepCounter = 0;\n try {\n BufferedReader br = Files.newBufferedReader(new File(inputFile).toPath());\n String line;\n while ((line = br.readLine()) != null) {\n // init the maps\n graphHistory.put(stepCounter, new HashMap<>());\n serverHistory.put(stepCounter, new ArrayList<>());\n applicationHistory.put(stepCounter, new ArrayList<>());\n List<FakeServer> currentServers = new ArrayList<>();\n // splitting the servers\n String[] serversRaw = line.split(\"\\\\|\");\n // grabbing robustness from last position\n double robustnessRandomShuffle = Double.parseDouble(serversRaw[serversRaw.length - 4]);\n double robustnessRandomForward = Double.parseDouble(serversRaw[serversRaw.length - 3]);\n double robustnessRandomBackward = Double.parseDouble(serversRaw[serversRaw.length - 2]);\n double robustnessServiceShuffle = Double.parseDouble(serversRaw[serversRaw.length - 1]);\n // stat\n maxSimultaneousServers = Math.max(serversRaw.length - 4, maxSimultaneousServers);\n // for all server full String\n for (String serverRaw : Arrays.asList(serversRaw).subList(0, serversRaw.length - 4)) {\n // grabbing the server part\n String server = serverRaw.split(\"=\")[0];\n // grabbing the application part\n String applications = serverRaw.split(\"=\")[1];\n // server name\n serverNames.add(server.split(\"/\")[0]);\n // building the server object\n FakeServer fakeServer = new FakeServer(server.split(\"/\")[0], Integer.parseInt(server.split(\"/\")[1]),\n Integer.parseInt(server.split(\"/\")[2]), Integer.parseInt(server.split(\"/\")[3]), Integer.parseInt(server.split(\"/\")[4]),\n Arrays.asList(server.split(\"/\")).subList(5, server.split(\"/\").length));\n // stats and tools\n serverHistory.get(stepCounter).add(fakeServer);\n currentServers.add(fakeServer);\n graphHistory.get(stepCounter).put(fakeServer, new ArrayList<>());\n maxServerGeneration = Math.max(Integer.parseInt(server.split(\"/\")[1]), maxServerGeneration);\n maxServerConnections = Math.max(Integer.parseInt(server.split(\"/\")[2]), maxServerConnections);\n maxServerSize = Math.max(Arrays.asList(server.split(\"/\")).size(), maxServerSize);\n serviceNames.addAll(Arrays.asList(server.split(\"/\")).subList(5, server.split(\"/\").length));\n maxSimultaneousApplications = Math.max(applications.split(\";\").length, maxSimultaneousApplications);\n // applications\n for (String application : applications.split(\";\")) {\n // building the application object\n FakeApplication fakeApplication = new FakeApplication(application.split(\"/\")[0], Integer.parseInt(application.split(\"/\")[1]),\n Integer.parseInt(application.split(\"/\")[2]), Integer.parseInt(application.split(\"/\")[4]),\n Arrays.asList(application.split(\"/\")).subList(5, application.split(\"/\").length),\n Arrays.asList(application.split(\"/\")[3].split(\"_\")).stream()\n .map(neighborName -> (FakeServer) findActor(neighborName, currentServers))\n .collect(Collectors.toList()));\n // stats and tools\n applicationHistory.get(stepCounter).add(fakeApplication);\n graphHistory.get(stepCounter).get(fakeServer).add(fakeApplication);\n applicationNames.add(application.split(\"/\")[0]);\n maxApplicationGeneration = Math.max(Integer.parseInt(application.split(\"/\")[1]), maxApplicationGeneration);\n maxApplicationConnections = Math.max(Integer.parseInt(application.split(\"/\")[2]), maxApplicationConnections);\n maxApplicationSize = Math.max(Arrays.asList(application.split(\"/\")).size(), maxApplicationSize);\n serviceNames.addAll(Arrays.asList(application.split(\"/\")).subList(5, application.split(\"/\").length));\n }\n }\n stepCounter++;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(\"Names: \" + serverNames.size() + \"/\" + applicationNames.size() + \"/\" + serviceNames.size());\n System.out.println(\"MaxSimult: \" + maxSimultaneousServers + \"/\" + maxSimultaneousApplications);\n System.out.println(\"MaxGen: \" + maxServerGeneration + \"/\" + maxApplicationGeneration);\n System.out.println(\"MaxSize: \" + maxServerSize + \"/\" + maxApplicationSize);\n stepNumber = stepCounter;\n }", "public static void printMap(Map<String, Double> map, String filename) throws FileNotFoundException, UnsupportedEncodingException{\n\t\t\t\n\t\t\tPrintWriter writer = new PrintWriter(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/IndexWithStoppingAndWithStemming/\"+filename, \"UTF-8\");\n\t for (Entry<String, Double> entry : map.entrySet()){\n\t \t \n\t \t\twriter.println(entry.getKey()+\" \"+entry.getValue()+\" Exp\");\n\t }\n\t writer.close();\n\t }", "public Context runMap() throws InstantiationException, IllegalAccessException, IOException {\n\t\tContext tempoContext = new Context();\n\t\tthis.setup(tempoContext);\n\t\t//Read the input file\n\t\tString[] inputLines = this.inputSplit.getLines();\n\t\t//Map process\n\t\tfor (int i=0; i<inputLines.length; i++) {\n\t\t\tthis.map(Integer.toString(i), inputLines[i], tempoContext);\n\t\t}\n\t\treturn tempoContext;\n\t}", "public void translate() {\n\t\tif(!init)\r\n\t\t\treturn; \r\n\t\ttermPhraseTranslation.clear();\r\n\t\t// document threshold: number of terms / / 8\r\n//\t\tdocThreshold = (int) (wordKeyList.size() / computeAvgTermNum(documentTermRelation) / 8.0);\r\n\t\t//\t\tuseDocFrequency = true;\r\n\t\tint minFrequency=1;\r\n\t\temBkgCoefficient=0.5;\r\n\t\tprobThreshold=0.001;//\r\n\t\titerationNum = 20;\r\n\t\tArrayList<Token> tokenList;\r\n\t\tToken curToken;\r\n\t\tint j,k;\r\n\t\t//p(w|C)\r\n\r\n\t\tint[] termValues = termIndexList.values;\r\n\t\tboolean[] termActive = termIndexList.allocated;\r\n\t\ttotalCollectionCount = 0;\r\n\t\tfor(k=0;k<termActive.length;k++){\r\n\t\t\tif(!termActive[k])\r\n\t\t\t\tcontinue;\r\n\t\t\ttotalCollectionCount +=termValues[k];\r\n\t\t}\r\n\t\t\r\n\t\t// for each phrase\r\n\t\tint[] phraseFreqKeys = phraseFrequencyIndex.keys;\r\n\t\tint[] phraseFreqValues = phraseFrequencyIndex.values;\r\n\t\tboolean[] states = phraseFrequencyIndex.allocated;\r\n\t\tfor (int phraseEntry = 0;phraseEntry<states.length;phraseEntry++){\r\n\t\t\tif(!states[phraseEntry]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (phraseFreqValues[phraseEntry] < minFrequency)\r\n\t\t\t\tcontinue;\r\n\t\t\ttokenList=genSignatureTranslation(phraseFreqKeys[phraseEntry]); // i is phrase number\r\n\t\t\tfor (j = 0; j <tokenList.size(); j++) {\r\n\t\t\t\tcurToken=(Token)tokenList.get(j);\r\n\t\t\t\tif(termPhraseTranslation.containsKey(curToken.getIndex())){\r\n\t\t\t\t\tIntFloatOpenHashMap old = termPhraseTranslation.get(curToken.getIndex());\r\n\t\t\t\t\tif(old.containsKey(phraseFreqKeys[phraseEntry])){\r\n\t\t\t\t\t\tSystem.out.println(\"aha need correction\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\told.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight()); //phrase, weight\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tIntFloatOpenHashMap newPhrase = new IntFloatOpenHashMap();\r\n\t\t\t\t\tnewPhrase.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight());\r\n\t\t\t\t\ttermPhraseTranslation.put(curToken.getIndex(), newPhrase);\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\toutputTransMatrix.add(i,curToken.getIndex(),curToken.getWeight());\r\n\t\t\t\t//\t\t\t\toutputTransTMatrix.add(curToken.getIndex(), i, curToken.getWeight());\r\n\t\t\t\t//TODO termPhrase exists, create PhraseTerm\r\n\t\t\t}\r\n\t\t\ttokenList.clear();\r\n\t\t}\r\n\r\n\t}", "void readWriteFile() throws IOException{\n\t\t\t\t\n\t\t// Sorting before writing it to the file\n\t Map<String, Double> sortedRank = sortByValues(PageRank); \n\t\t\n // below code is used for finding the inlinks count, Comment the probablity sum in below iterator if uncommenting this line\n\t\t//Map<String, Integer> sortedRank = sortByinlinks(inlinks_count);\n\t\t\n\n\t\t//Writing it to the file\n\t\tFile file = new File(\"C:/output.txt\");\n\t\tBufferedWriter output = new BufferedWriter(new FileWriter(file,true));\n\t\tIterator iterator = sortedRank.entrySet().iterator();\n\t\tdouble s = 0.0;\n\t\t\twhile(iterator.hasNext()){\n\t\t\t\tMap.Entry val = (Map.Entry)iterator.next();\n\t\t\t\toutput.write(val.getKey() +\"\\t\"+ val.getValue()+ \"\\n\");\t\t\t\t\n\t\t\t\ts= s+ (double)val.getValue(); //Adding the Probablity ; Comment this line if using Inlink calculation\n\t\t\t}\n\t\t\tSystem.out.println(\"Probablity Sum : \"+s); //After convergence should be 1; ; Comment this line if using Inlink calculation\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t}", "public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }", "@Override\n protected void map(LongWritable kin, Text datin, Context context)\n throws IOException, InterruptedException {\n try {\n Map<String, Object> f = this.parser.parseLine(datin.toString());\n if (!isValidateRecord(f)) return;\n context.write(new IntWritable((int) ((float) f.get(\"YEAR\"))), datin);\n } catch (Exception e) {\n context.getCounter(\"Exception\",\"EMap4\").increment(1);\n }\n }", "public static void loadTargetTerm2IdMapping(File input) throws IOException {\n\t\t\tm_namesMap = new SimpleBidirectionalMap<String, Integer>();\n\t\t\tString encoding = FileUtils.getFileEncoding(input);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(input), encoding));\n\t\t\tString line = reader.readLine();\n\t\t\tint lineNum = 1;\n\t\t\tboolean testFormat = false;\n\t\t\tif(StringUtils.checkIfNumber(line.split(\"\\t\")[0]))\n\t\t\t\ttestFormat = true;\n\t\t\twhile(line!= null) {\n\t\t\t\tif(line.equals(\"@@@\"))\n\t\t\t\t\tbreak;\n\t\t\t\tif(testFormat) {\n\t\t\t\t\tString num = line.split(\"\\t\")[0];\n\t\t\t\t\tSystem.out.println(\"key: \"+line.trim().substring(num.length()+1) + \" value: \" + Integer.parseInt(num));\n\t\t\t\t\tm_namesMap.put(line.trim().substring(num.length()+1), Integer.parseInt(num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"key????\" + lineNum + \"instead of \" + line.split(\"\\t\")[0]);\n\t\t\t\t\tm_namesMap.put(line.trim(), lineNum);\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t\tlineNum ++;\n\t\t\t}\n\t\t}", "public ImageFileNameMap()\r\n {\r\n prevMap = null;\r\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n Normalized norm = new Normalized();\n double c = 1;\n\n double[][] data = norm.Inputdata(\"input.txt\");\n double[][] w = new double[35][10];\n double[][] last = new double[35][10];\n\n for (int i = 0; i < 35; i++) {\n for (int j = 0; j < 10; j++) {\n w[i][j] = 1;\n last[i][j] = 1;\n\n }\n }\n\n /* for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 35; j++) {\n System.out.print(data[i][j]);\n System.out.print(\" \");\n \n \n }\n System.out.print(\"\\n\");\n }\n */\n //System.out.print(w[5][5]);\n double[] ErrMap = norm.Inputdata2(\"TestMap.txt\");\n //System.out.print(ErrMap[0]);\n\n //System.out.print(\"\\n\");\n w = training(data, w, last, c);\n\n int out = 2;\n\n out = classify(w, ErrMap, c);\n System.out.print(\"product \" + out + \" is max\\n\");\n System.out.print(\"the number classify to \" + out + \"\\n\");\n }", "private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}", "public static void RT() {////cada clase que tiene informacion en un archivo txt tiene este metodo para leer el respectivo archivoy guardarlo en su hashmap\n\t\treadTxt(\"peliculas.txt\", pelisList);\n\t}", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "@Override\r\n public void run() {\r\n try {\r\n /* For each record, map it. */\r\n while (reader.hasNextRecord()) {\r\n Map.Entry<String, String> read = reader.readNextRecord();\r\n map(read.getKey(), read.getValue());\r\n }\r\n } catch (Exception e) {\r\n success = false;\r\n e.printStackTrace();\r\n } finally {\r\n reader.close();\r\n writer.close();\r\n }\r\n }", "public void calculatorTagCellProb(String dir, String trainFile, String outFile, int scale) throws Exception;", "@Override\n\t\tpublic void map(Key key, Value value, Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tSortedMap<Key,Value> entries = WholeRowIterator.decodeRow(key, value);\n\t\t\t\n\t\t\t// If we have counts for the given ngram for both time periods, we will have 2 Entrys that look like\n\t\t\t// RowId: ngram\n\t\t\t// CQ: Date Granularity (ex. DAY, HOUR)\n\t\t\t// CF: Date Value (ex. 20120102, 2012010221)\n\t\t\t// Value: count\n\t\t\t// We know the entries are sorted by Key, so the first entry will have the earlier date value \n\t\t\tif ( entries.size() == 2 ) {\n\t\t\t\t\n\t\t\t\t// Read the Entrys and pull out the two counts\n\t\t\t\tlong [] counts = new long[2];\n\t\t\t\tint index = 0;\n\t\t\t\tfor ( Entry<Key,Value> entry : entries.entrySet() ) {\n\t\t\t\t\tcounts[index++] = LongCombiner.VAR_LEN_ENCODER.decode( entry.getValue().get());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Generate a trending score for this ngram\n\t\t\t\tint score = calculateTrendingScore( counts, context );\n\t\t\t\t\n\t\t\t\t// If we have a valid score, write out the score to Accumulo\n\t\t\t\tif ( score > 0 ) {\n\t\t\t\t\t\n\t\t\t\t\tint sortableScore = Integer.MAX_VALUE - score;\n\t\t\t\t\t\n\t\t\t\t\t// RowId is the time we are calculating trends for, i.e. DAY:20120102\n\t\t\t\t\t// CF is Integer.MAX_VALUE - trending score so that we sort the highest scores first\n\t\t\t\t\t// CQ is the ngram\n\t\t\t\t\t// Value is empty\n\t\t\t\t\tString rowId = context.getConfiguration().get(\"rowId\");\n\t\t\t\t\tMutation mutation = new Mutation( rowId );\n\t\t\t\t\tmutation.put( new Text( String.valueOf(sortableScore)), entries.firstKey().getRow(), emptyValue );\n\t\t\t\t\tcontext.write( null, mutation );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void knnCSV(Map<String, Integer> map, String output)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tFileWriter fw = null;\r\n\t\tFile[] files = null;\r\n\r\n\t\tfiles = folder.listFiles();\r\n\t\tfw = new FileWriter(\"src/\" + output, false);\r\n\r\n\t\tfor (File file : files) {\r\n\r\n\t\t\tString fileName = file.getName();\r\n\t\t\tMap<Map<String, Integer>, Integer> wordFreqClass = documents\r\n\t\t\t\t\t.get(fileName);\r\n\t\t\tInteger classification = ERROR;\r\n\r\n\t\t\t// Assign class to file\r\n\t\t\tfor (Integer type : wordFreqClass.values()) {\r\n\t\t\t\tclassification = type;\r\n\t\t\t}\r\n\r\n\t\t\t// Create a temporary map of all words and counts in each test file\r\n\t\t\tMap<String, Integer> tempMap = new HashMap<String, Integer>();\r\n\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\ttry {\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line);\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (tempMap.containsKey(word)) {\r\n\t\t\t\t\t\t\ttempMap.put(word, tempMap.get(word) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttempMap.put(word, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tbr.close(); // Close BufferedReader\r\n\t\t\t}\r\n\r\n\t\t\t// Print value of words in tempMap for each word in fullMap\r\n\t\t\t// separated by commas\r\n\t\t\tIterator<HashMap.Entry<String, Integer>> entries = map.entrySet()\r\n\t\t\t\t\t.iterator();\r\n\t\t\twhile (entries.hasNext()) {\r\n\t\t\t\tHashMap.Entry<String, Integer> entry = entries.next();\r\n\t\t\t\tString word = entry.getKey();\r\n\t\t\t\tif (tempMap.containsKey(word)) {\r\n\t\t\t\t\tfw.write(tempMap.get(word).toString());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfw.write(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (entries.hasNext()) {\r\n\t\t\t\t\tfw.write(\",\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfw.write(\",\");\r\n\t\t\t\t\tfw.write(classification.toString());\r\n\t\t\t\t\tfw.write(\"\\r\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfw.close();\r\n\r\n\t}", "public static void main(String[] args) {\n Double rateOfSvi;\n Double rateOfEvi;\n Double rateOfIvi;\n Double rateOfShi;\n Double rateOfEhi;\n Double rateOfIhi;\n Double weeklyRateOfIhi;\n Double Ihi;\n int nextSvi;\n int nextEvi;\n int nextIvi;\n int nextShi;\n int nextEhi;\n int nextIhi;\n int week = 0;\n final int id = 69;\n String[] line;\n final int[] infectedPredictions = new int[53];\n double vectorPopulation; // 3times the Host population in the area\n// initializeMobility();\n int val = 0;\n double error = 1000;\n\n// for(int e = 3500; e < 4500; e++) {\n// mohSampleMob = e;\n\n// System.out.println(\"Mobility Initialized\");\n initializePopulation();\n// System.out.println(\"Population Initialized\");\n initializeInfected();\n// System.out.println(\"Infected Initialized\");\n setInitialConditions(id, 0);\n// System.out.println(\"Initial conditions created\");\n// System.out.println(\"betaVi,betaHi,scalingFactor = \" + betaVi + \",\" + betaHi + \",\" + scalingFactor);\n infectedPredictions[0] = currentIhi;\n// try {\n// writer = new CSVWriter(new FileWriter(\"/Users/Anushka/Documents/workspace/CSV/Colombo_MSE.csv\"));\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// for (int bvi = 0; bvi<100 ; bvi++) {\n// betaVi = (bvi * 0.01);\n// for (int bhi = 0; bhi < 100; bhi++) {\n// betaHi = (bhi * 0.01);\n for (int i = 1; i <= 52; i++) {\n week = i;\n weeklyRateOfIhi = 0.0;\n\n setInitialConditions(69, week - 1);\n\n for (int j = 0; j < 7; j++) { // Do this for a week as we calculate daily figures.\n //Equations for the vectors\n rateOfSvi = muVi * scalingFactor * getMOHPopulation(id) - betaVi * getConnectivity(id, week) * currentSvi - muVi * currentSvi; // scalingFactor*HostPopulation = vectorPopulation\n rateOfEvi = betaVi * getConnectivity(id, week) * currentSvi - muVi * currentEvi - kappa * currentEvi;\n rateOfIvi = kappa * currentEvi - muVi * currentIvi;\n\n // Equations for the hosts\n rateOfShi = getMOHPopulation(id) - betaHi * getConnectivityWithinRegion(id) * currentShi - muHi * currentShi;\n rateOfEhi = betaHi * getConnectivityWithinRegion(id) * currentShi - lambda * currentEhi - muHi * currentEhi;\n rateOfIhi = lambda * currentEhi - delta * currentIhi - muHi * currentIhi;\n weeklyRateOfIhi += rateOfIhi;\n // Obtain next states\n\n// if (i == 0) {\n// currentSvi = rateOfSvi.intValue();\n// currentEvi = rateOfEvi.intValue();\n// currentIvi = rateOfIvi.intValue();\n// currentShi = rateOfShi.intValue();\n// currentEhi = rateOfEhi.intValue();\n// currentIhi = rateOfIhi.intValue();\n// }else{\n currentSvi += rateOfSvi.intValue();\n currentEvi += rateOfEvi.intValue();\n currentIvi += rateOfIvi.intValue();\n currentShi += rateOfShi.intValue();\n currentEhi += rateOfEhi.intValue();\n\n// if (rateOfIhi.intValue() > 0) {\n// currentIhi += rateOfIhi.intValue();\n// }\n// }\n\n\n }\n infectedPredictions[week] = weeklyRateOfIhi.intValue();\n //System.out.println(\"Week \" + week + \" Prediction \" + infectedPredictions[week] + \" Actual \" + infected[id][week]);\n //System.out.print(infectedPredictions[week] + \",\");\n //System.out.print(infected[id][week] + \",\");\n // Set current infected to actual value for next prediction\n currentIhi = infected[id][week];\n }\n System.out.println(Arrays.toString(infectedPredictions));\n System.out.println(Arrays.toString(infected[id]));\n\n// double er = calculateMSE(infectedPredictions, infected[id]);\n System.out.println(betaVi + \" \" + betaHi + \" \" + calculateMSE(infectedPredictions, infected[id]));\n\n// if(er < error){\n// error = er;\n// val = e;\n// }\n\n// DrawGraph provider = new DrawGraph();\n// DrawGraph.createAndShowGui();\n int[] actual = Arrays.copyOfRange(infected[id], 0, 52);\n int[] predict = Arrays.copyOfRange(infectedPredictions, 0, 52);\n\n// System.out.println();\n// }\n\n// System.out.println(val);\n// System.out.println(Arrays.toString(predict));\n// System.out.println(Arrays.toString(actual));\n\n XYLineChartExample temp = new XYLineChartExample(actual, predict);\n\n\n// BufferedWriter br = null;\n// try {\n// br = new BufferedWriter(new FileWriter(\"myfile.csv\"));\n//\n// StringBuilder sb = new StringBuilder();\n// for (int element : infectedPredictions) {\n// sb.append(element);\n// sb.append(\",\");\n// }\n// sb.append(\",\");\n//\n// for (int element : infected[id]) {\n// sb.append(element);\n// sb.append(\",\");\n// }\n//\n// br.write(String.valueOf(sb));\n// br.close();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n\n //line = new String[]{Double.toString(betaVi), Double.toString(betaHi), Double.toString(calculateMSE(infectedPredictions, infected[id]))};\n //writer.writeNext(line);\n// }\n//\n// }\n// try {\n// writer.close();\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }", "public static void main(String[] args) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 각 문서의 특성을 추출 : Test04 - map\t\t\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\tSystem.out.println(f.getName());\n\t\t\tString f_n = f.getName(); \n\t\t\t\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n//\t\t\tSystem.out.println(Top5List);\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"문서 이름을 입력하세요 : \");\n\t\tString input = sc.next();\n\t\t\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\t\t\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}", "private void initializationMapOfLastDistance(){\r\n Float val = 0.00f;\r\n for(Build b: allBuildings_){\r\n saveLastDistance.put(b.getName(), val);\r\n }\r\n }", "public static void processGraphInformation () {\n\n for (int i = 0; i < data.length(); i++) {\n if (data.charAt(i) == ',')\n cutPoints.add(i);\n }\n if(isNumeric(data.substring(1, cutPoints.get(0))))\n tempPPGWaveBuffer.add(Double.parseDouble(data.substring(1, cutPoints.get(0))));\n for (int j = 0; j < cutPoints.size(); j++) {\n\n if (j==cutPoints.size()-1){\n if(isNumeric(data.substring(cutPoints.get(j)+1,endOfLineIndex )))\n tempPPGWaveBuffer.add(Double.parseDouble(data.substring(cutPoints.get(j)+1,endOfLineIndex )));\n } else{\n if(isNumeric(data.substring(cutPoints.get(j) + 1, cutPoints.get(j+1))))\n tempPPGWaveBuffer.add(Double.parseDouble(data.substring(cutPoints.get(j) + 1, cutPoints.get(j+1))));\n }\n\n }\n graphIn.obtainMessage(handlerState4, Integer.toString(tempSampleTime)).sendToTarget(); //Comment this part to run junit tests\n if (tempSampleTime != 0) {\n tempReceived = true;\n graphIn.obtainMessage(handlerState2, Boolean.toString(tempReceived)).sendToTarget(); //Comment this part to run junit tests\n graphIn.obtainMessage(handlerState1, tempPPGWaveBuffer).sendToTarget(); //Comment this part to run junit tests\n } else {\n tempReceived = false;\n graphIn.obtainMessage(handlerState2, Boolean.toString(tempReceived)).sendToTarget(); //Comment this part to run junit tests\n }\n }", "public LogFileV2(File file) {\n try {\n if(!file.getParentFile().exists()){\n file.getParentFile().mkdirs();\n }\n this.file = file;\n this.randomAccessFile = new RandomAccessFile(file,\"rw\");\n this.fileChannel = randomAccessFile.getChannel();\n this.readMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n this.writeMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void initializeMaps(){\n\t\t\n\t\tsteps = new HashMap<Integer, Set<PlanGraphStep>>();\n\t\tfacts = new HashMap<Integer, Set<PlanGraphLiteral>>();\n\t\tinconsistencies = new HashMap<Integer, Set<LPGInconsistency>>();\n\t\t\n\t\tfor(int i = 0; i <= maxLevel; i++) {\n\t\t\tsteps.put(i, new HashSet<PlanGraphStep>());\n\t\t\tfacts.put(i, new HashSet<PlanGraphLiteral>());\n\t\t\tinconsistencies.put(i, new HashSet<LPGInconsistency>());\n\t\t}\n\t\t\n\t\t/* This level holds only the special action end which has the goals as preconditions */\n\t\tsteps.put(maxLevel + 1, new HashSet<PlanGraphStep>());\n\t}", "private Map<String, Float> loadLifeExpectancyFromCSV(String fileName){\n lifeExpMap = new HashMap<String, Float>();\n \n String[] rows = loadStrings(fileName);\n \n for(String row: rows) {\n String[] columns = row.split(\",\");\n System.out.println(columns[5]);\n if(columns.length > 0 && columns[5].matches(\"[0-9]+(.[0-9]*)?\")) {\n System.out.println(columns[4]);\n float value = Float.parseFloat(columns[5]);\n lifeExpMap.put(columns[4], value); \n }\n }\n \n return lifeExpMap;\n }", "public static void readFileToMap(Map<String, List<Integer>> hashMap, String path, int numFiles, int thisFileNum){\n try{\n FileReader file = new FileReader(path);\n BufferedReader textFile = new BufferedReader(file);\n\n String fileLine = \"\";\n String[] wordsInLine;\n List<Integer> occurences;\n List<Integer> temp;\n\n while((fileLine = textFile.readLine()) != null){\n wordsInLine = fileLine.split(\" \");\n cleanLine(wordsInLine);\n //add them to map\n for(String word : wordsInLine){\n\n if(word.length() > Table.maxWordLength){ //keeps track of the longest character\n Table.setMaxWordLength(word.length());\n }\n\n if(!hashMap.containsKey(word)){\n occurences = new ArrayList<>(); //creating a new value makes it so that one change wont affect every HashMap element\n occurences = setZerosList(numFiles);\n occurences.set(thisFileNum, 1);\n hashMap.put(word, occurences);\n }\n else{\n temp = hashMap.get(word); //this code makes a new list, and increments the word appearance by 1\n temp.set(thisFileNum, temp.get(thisFileNum)+1);\n hashMap.put(word, temp );\n }\n }\n }\n }\n catch (Exception e){\n //e.printStackTrace();\n return;\n }\n }", "private static void readMMap(File file) throws IOException {\n FileChannel channel = new RandomAccessFile(file, \"rw\").getChannel();\n MappedByteBuffer mmap = channel.map(FileChannel.MapMode.READ_WRITE, N, N);\n //mmap.load();\n byte[] buf = new byte[CHUNK];\n long t = System.nanoTime();\n for (int i = 0; i < N/CHUNK; i++) {\n mmap.get(buf);\n }\n System.out.println((System.nanoTime() - t) / 1_000_000 + \" ms \" + mmap.position() + \" bytes\");\n\n channel.close();\n }", "public static void main(String args[]) throws Exception\r\n {\r\n System.out.println(\"start\");\r\n final Map<String, LogData> timeInHoursMinsAndLogDataMap = new LinkedHashMap();\r\n final Scanner input = new Scanner(System.in);\r\n int totalRecords = 0;\r\n final List<String> keysToRemove = new ArrayList<>(2);\r\n Set<String> processed = new HashSet<>();\r\n\r\n while (input.hasNext())\r\n {\r\n System.out.println(\"while\");\r\n Long time = Long.parseLong(input.next());\r\n Double processingTime = Double.parseDouble(input.next());\r\n\r\n boolean process = true;\r\n final Date date = new Date(time * 1000);\r\n final String key = String.valueOf(date.getHours()) + \":\" + String.valueOf(date.getMinutes());\r\n if (processed.contains(key))\r\n continue;\r\n if (timeInHoursMinsAndLogDataMap.size() > 0)\r\n {\r\n keysToRemove.clear();\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n final int diffSeconds = getDiffBetweenCurrentAndMapSeconds(key, entry.getKey(), date.getSeconds(),\r\n entry.getValue().maxSeconds);\r\n if (diffSeconds > 60)\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n keysToRemove.add(entry.getKey());\r\n processed.add(entry.getKey());\r\n }\r\n else if (diffSeconds < -60)\r\n {\r\n process = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (!process)\r\n continue;\r\n\r\n removeKeyFromMap(timeInHoursMinsAndLogDataMap, keysToRemove);\r\n\r\n LogData logData = timeInHoursMinsAndLogDataMap.get(key);\r\n if (logData == null)\r\n {\r\n logData = new LogData();\r\n logData.setTimeStamp(time);\r\n }\r\n logData.updateBuckets(processingTime);\r\n logData.updateMaxSeconds(date.getSeconds());\r\n timeInHoursMinsAndLogDataMap.put(key, logData);\r\n\r\n }\r\n\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n }\r\n \r\n System.out.println(\"end\");\r\n }", "private void logCurrentSensorEntriesBatch() {\n\t\tentriesRecorded++;\n\n\t\tint targetBatchSize = Constants.MS_FREQUENCY_FOR_CAMERA_CAPTURE / Constants.MS_INS_SAMPLING_FREQUENCY;\n\n\t\tArrayList<SensorEntry> toProcess = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(0, targetBatchSize));\n\t\tthis.sensorEntryBatch = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(targetBatchSize,\n\t\t\t\ttargetBatchSize));\n\n\t\tthis.writeBatchToFile(toProcess);\n\t}", "private void readFile(Path file, Charset charset) {\n\n BufferedReader reader = null;\n try {\n log.info(\"Reading file \" + file.getFileName().toString());\n reader = Files.newBufferedReader(file, charset);\n\n String line = null;\n while ((line = reader.readLine()) != null) {\n\n String[] splitLine = line.split(\",\");\n LocalDateTime ldt = LocalDateTime.parse(splitLine[0], DateTimeFormatter.ISO_DATE_TIME);\n\n /**\n * Creation of new map filtered to get all lines before the current date got from the current file line\n */\n Map<LocalDateTime, String> filteredMap = mapLines.entrySet().stream()\n .filter(entry -> entry.getKey().isBefore(ldt))\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (v1,v2) ->{ throw new RuntimeException(String.format(\"Duplicate key for values %s and %s\", v1, v2));},\n TreeMap::new));\n\n /**\n * Printing each line from filter map, also we delete those objects to maintain memory.\n */\n filteredMap.forEach((localDateTime, s) -> {\n System.out.println(s);\n mapLines.remove(localDateTime, s);\n });\n filteredMap.clear();\n\n mapLines.put(ldt, line);\n TimeUnit.SECONDS.sleep(1);\n }\n } catch (MalformedInputException m) {\n readFile(file, Charset.forName(\"Windows-1252\"));\n } catch (IOException e) {\n log.error(e, e);\n }\n catch (InterruptedException ie) {\n log.error(ie, ie);\n }\n }", "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 }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "public void getAccuracy() throws IOException {\n\t\tList<String> in = FileHelper.readFiles(Constants.outputpath);\r\n\t\tList<String> testhscode=FileHelper.readFiles(Constants.testpath);\r\n\t\tList<String> hslist=new ArrayList<String>();\r\n\t\tfor(String code:testhscode){\r\n\t\t\thslist.add(code.split(\" \")[0]);\r\n\t\t}\r\n\t\tList<TreeMap<String,Double>> finallist=new ArrayList<TreeMap<String,Double>>();\r\n\t\tString[] label = in.get(0).split(\" \");\r\n\t\t\r\n\t\tfor (int i=1;i<in.size();i++){\r\n\t\t\tString[] probability=in.get(i).split(\" \");\r\n\t\t\tTreeMap<String,Double> tm=new TreeMap<String,Double>();\r\n//\t\t\tString hscode = probability[0];\r\n//\t\t\tSystem.out.println(hscode);\r\n//\t\t\thslist.add(hscode);\r\n\t\t\tfor(int j=1;j<probability.length;j++){\r\n\t\t\t\tDouble p = Double.valueOf(probability[j]);\r\n\t\t\t\ttm.put(label[j]+\"\", p);\r\n//\t\t\t\tSystem.out.println(label[j]+\" \"+ p);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfinallist.add(tm);\r\n\t\t}\r\n\t\tList<String> outputlist=new ArrayList<String>();\r\n\t\tint right=0;\r\n\t\tfor(int j=0;j<finallist.size();j++){\r\n\t\t\tTreeMap<String, Double> m = finallist.get(j);\r\n\t\t\t\r\n\t\t\tString hs = hslist.get(j);\r\n//\t\t\tSystem.out.println(hs);\r\n//\t\t\tSystem.out.println(j);\r\n//\t\t\tString hscode = hs;\r\n//\t\t\tSystem.out.println(hscode);\r\n\t\t\tString hscode = changeToHSCode(hs);\r\n\t\t\tStringBuffer sb=new StringBuffer();\r\n\t\t\tsb.append(hscode+\" \");\r\n\t\t\tList<Map.Entry<String,Double>> list = new ArrayList<Map.Entry<String,Double>>(m.entrySet());\r\n //然后通过比较器来实现排序\r\n Collections.sort(list,new Comparator<Map.Entry<String,Double>>() {\r\n //升序排序\r\n \t\tpublic int compare(Entry<String, Double> o1,\r\n Entry<String, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }});\r\n\t\t\t \r\n\t\t\t \r\n\t\t\tint point=0;\r\n\t\t\tint flag=0;\r\n\t\t\t for(Map.Entry<String,Double> mapping:list){ \r\n \tflag++;\r\n \t\r\n \tif(hs.equals(mapping.getKey())){\r\n \t\tpoint=1;\r\n \t\tright++;\r\n \t} \r\n \tsb.append(changeToHSCode(mapping.getKey())+\" \"+mapping.getValue()+\" \");\r\n// System.out.println(mapping.getKey()+\":\"+mapping.getValue()); \r\n \tif(flag==5)\r\n \t\t{\r\n \t\tsb.append(\",\"+point);\r\n \t\tbreak;\r\n \t\t}\r\n } \r\n\t\t\toutputlist.add(sb.toString());\r\n\t\t}\r\n\t\tSystem.out.println(\"准确率\"+(double)right/finallist.size());\r\n\t\tFileHelper.writeFile(outputlist,Constants.finaloutputpath);\r\n\t}", "public void prepareForSnapshot() {\n if (readMap != null)\n return;\n\n readMap = new TreeMap<>();\n\n for (Map.Entry<GroupPartitionId, PagesAllocationRange> entry : writeMap.entrySet()) {\n if (!skippedParts.contains(entry.getKey()))\n readMap.put(entry.getKey(), entry.getValue());\n }\n\n skippedParts.clear();\n writeMap.clear();\n }", "@Override\n public void notifyMapObservers() {\n for(MapObserver mapObserver : mapObservers){\n // needs all the renderInformation to calculate fogOfWar\n System.out.println(\"player map: \" +playerMap);\n mapObserver.update(this.playerNumber, playerMap.returnRenderInformation(), entities.returnUnitRenderInformation(), entities.returnStructureRenderInformation());\n entities.setMapObserver(mapObserver);\n }\n }", "@Override\n public void initialize() {\n int numReduceTasks = conf.getNumReduceTasks();\n String jobID = taskAttemptID.getJobID();\n File mapOutputFolder = new File(\"mapoutput\");\n if (!mapOutputFolder.exists()) {\n mapOutputFolder.mkdir();\n }\n for (int reduceID = 0; reduceID < numReduceTasks; reduceID++) {\n outputFiles.add(\"mapoutput/\" + jobID + \"_r-\" + reduceID + \"_\" + this.partition);\n }\n }", "@Override\n\tprotected void saveResults(){\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"_yyyy_MM_dd_HH:mm:ss\");\n\t\tDate date = new Date();\n\t\ttry(BufferedWriter bw=new BufferedWriter(new FileWriter(\"/home/daniel/results/\"+this.mAffinityType+\"/\"+this.getClass().getSimpleName()+\"/\"+MAX_TASK_AGE+\"/\"+mOutputFileName+dateFormat.format(date)))){\n\t\t\tbw.write(this.getClass().getSimpleName()+\" with max age=\"+MAX_TASK_AGE+\"\\n\");\n\t\t\tbw.write(\"Total processing time: \"+cycles+\" TU\\n\");\n\t\t\tint count=0;\n\t\t\tfor(Task t : mTasks){\n\t\t\t\tbw.write(++count + \":\");\n\t\t\t\tif(t.getmAge()>=MAX_TASK_AGE){\n\t\t\t\t\tbw.write(\"Aging used\\n\");\n\t\t\t\t}else{\n\t\t\t\t\tbw.write(\"Aging not used\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.write(\"###############################################################\\n\");\n\t\t\tfor(int i=0;i<Task.TYPES_OF_TASK_NUMBER;++i){\n\t\t\t\tfor(int j=0;j<Task.TYPES_OF_TASK_NUMBER;++j){\n\t\t\t\t\tfor(int k=0;k<Task.TYPES_OF_TASK_NUMBER;++k){\n\t\t\t\t\t\t DecimalFormat df = new DecimalFormat(\"0.0\");\n\t\t\t\t\t\tbw.write(\"[\"+df.format(AFFINITY3[i][j][k])+\"]\");\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"\\n\");\n\t\t\t\t}\n\t\t\t\tbw.write(\"###############################################################\\n\");\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized void readLog() {\n MemoryCache instance = MemoryCache.getInstance();\n try (Stream<String> stream = Files.lines(Paths.get(path)).skip(instance.getSkipLine())) {\n stream.forEach(s -> {\n Result result = readEachLine(s);\n instance.putResult(result);\n instance.setSkipLine(instance.getSkipLine() + 1);\n });\n } catch (IOException e) {\n logger.error(\"error during reading file \" + e.getMessage());\n }\n }", "public void processFile(File rootFile) throws IOException {\n\t\tBufferedReader bf=new BufferedReader(new FileReader(rootFile));\r\n\t\tString lineTxt = null;\r\n\t\tint pos=1;\r\n\t\twhile((lineTxt = bf.readLine()) != null){\r\n String[] line=lineTxt.split(\" \");\r\n// System.out.println(line[0]);\r\n String hscode=line[0];\r\n \r\n \r\n TreeMap<String,Integer> word=null;\r\n if(!map.containsKey(hscode)){\r\n word=new TreeMap<String,Integer>();\r\n for(int i=1;i<line.length;i++){\r\n \tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n }\r\n map.put(hscode, word);\r\n }\r\n else{\r\n //\tSystem.out.println(\"sss\");\r\n \tword = map.get(hscode);\r\n \tfor(int i=1;i<line.length;i++){\r\n \t\tString key=line[i];\r\n \tif (word.get(key)!=null){\r\n \t\tint value= ((Integer) word.get(key)).intValue();\r\n \t\tvalue++;\r\n \t\tword.put(key, value);\r\n \t}else{\r\n \t\tword.put(key, new Integer(1));\r\n \t}\r\n \t}\r\n \t\r\n \tmap.put(hscode, word);\r\n \t\r\n }\r\n\t\t}\r\n\t\tbf.close();\r\n//\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n//// \tSystem.out.println(\"hscode:\"+entry.getKey());\r\n// \tTreeMap<String, Integer> value = entry.getValue();\r\n// \tfor(Entry<String,Integer> e:value.entrySet()){\r\n//// \tSystem.out.println(\"单词\"+e.getKey()+\" 词频是\"+e.getValue());\r\n// \t}\r\n// }\r\n\t}", "private void updateValues(){\n if (mCelsian != null) {\n mCelsian.readMplTemp();\n mCelsian.readShtTemp();\n mCelsian.readRh();\n mCelsian.readPres();\n mCelsian.readUvaValue();\n mCelsian.readUvbValue();\n mCelsian.readUvdValue();\n mCelsian.readUvcomp1Value();\n mCelsian.readUvcomp2Value();\n }\n }", "private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }", "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}", "public void run() {\n\n long startTime = System.nanoTime();\n\n /*\"*********************************\n * Getting data from the algorithm *\n ***********************************/\n\n // Posterior values, get them from memory instead of propagating again. Since this method is called write,\n // it should only write.\n HashMap<Variable, TablePotential> results = algorithm.getLastPosteriorValues();\n\n // Samples\n double[][] sampleStorage;\n try {\n sampleStorage = algorithm.getSamples();\n if (sampleStorage.length == 0) { // Case of empty database\n throw new NullPointerException();\n }\n\n } catch (NullPointerException e) { // Case of empty database and no database\n logger.error(\"No samples found to write\");\n LocalizedException NoDatabaseException =\n new LocalizedException(new OpenMarkovException(\"Exception.NoDatabase\"), this.dialog);\n NoDatabaseException.showException();\n return;\n }\n\n // Variables\n List<Variable> sampledVariables = algorithm.getVariablesToSample();\n\n // The maximum number of states defines the number of columns of the second sheet in Excel.\n int maxNStates = 0;\n for (Variable variable : sampledVariables) {\n if (variable.getNumStates() > maxNStates) {\n maxNStates = variable.getNumStates();\n }\n }\n\n // Evidence variables\n EvidenceCase evidence = algorithm.getFusedEvidence();\n List<Variable> evidenceVariables = evidence.getVariables();\n\n // Time measuring for this phase\n long elapsedMS = (System.nanoTime() - startTime) / 1000000;\n logger.info(\"Data obtained from the algorithm: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Data obtained from the algorithm: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"***********************\n * Creating the workbook *\n *************************/\n\n SXSSFWorkbook workbook = new SXSSFWorkbook(1000);\n\n /* Styles */\n\n // Styles to convey graphically the weight\n\n // Weight = 0\n XSSFCellStyle incompatibleSample = (XSSFCellStyle) workbook.createCellStyle();\n incompatibleSample.setFillForegroundColor(new XSSFColor(INCOMPATIBLE_SAMPLE));\n incompatibleSample.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n\n // Weight = 1\n XSSFCellStyle compatibleSample = (XSSFCellStyle) workbook.createCellStyle();\n compatibleSample.setFillForegroundColor(new XSSFColor(COMPATIBLE_SAMPLE));\n compatibleSample.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n\n\n /// Font with big emphasis for the next styles\n XSSFFont bigBoldArial = (XSSFFont) workbook.createFont();\n bigBoldArial.setFontName(\"Arial\");\n bigBoldArial.setFontHeightInPoints((short) 11);\n bigBoldArial.setBold(true);\n\n // Header of table\n XSSFCellStyle topTable = (XSSFCellStyle) workbook.createCellStyle();\n\n topTable.setFillForegroundColor(new XSSFColor(HEADER_COLOR));\n topTable.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n topTable.setAlignment(HorizontalAlignment.LEFT);\n topTable.setFont(bigBoldArial);\n\n // Header of table centered\n XSSFCellStyle centeredTopTable = (XSSFCellStyle) workbook.createCellStyle();\n\n centeredTopTable.setFillForegroundColor(new XSSFColor(HEADER_COLOR_2));\n centeredTopTable.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n centeredTopTable.setAlignment(HorizontalAlignment.CENTER);\n centeredTopTable.setFont(bigBoldArial);\n\n\n /// Font with some emphasis\n XSSFFont bigArial = (XSSFFont) workbook.createFont();\n bigArial.setFontName(\"Arial\");\n bigArial.setFontHeightInPoints((short) 10);\n bigArial.setBold(true);\n\n // Chance node\n XSSFCellStyle chanceNode = (XSSFCellStyle) workbook.createCellStyle();\n\n chanceNode.setFillForegroundColor(new XSSFColor(CHANCE_NODE_COLOR));\n chanceNode.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n chanceNode.setFont(bigArial);\n\n // Algorithm name\n XSSFCellStyle subTopTable = (XSSFCellStyle) workbook.createCellStyle();\n\n subTopTable.setFont(bigArial);\n\n\n /// Font with some emphasis and white for contrast\n XSSFFont bigWhiteArial = (XSSFFont) workbook.createFont();\n bigWhiteArial.setFontName(\"Arial\");\n bigWhiteArial.setFontHeightInPoints((short) 11);\n bigWhiteArial.setColor(new XSSFColor(new Color(255, 255, 255)));\n\n // Node with finding\n XSSFCellStyle findingNode = (XSSFCellStyle) workbook.createCellStyle();\n\n findingNode.setFillForegroundColor(new XSSFColor(FINDING_NODE_COLOR));\n findingNode.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n findingNode.setFont(bigWhiteArial);\n\n\n\n // No more than four decimal places\n XSSFCellStyle smartDecimals = (XSSFCellStyle) workbook.createCellStyle();\n smartDecimals.setDataFormat(workbook.createDataFormat().getFormat(\"0.0000\"));\n\n // No more than two decimal places\n XSSFCellStyle smartFewDecimals = (XSSFCellStyle) workbook.createCellStyle();\n smartFewDecimals.setDataFormat(workbook.createDataFormat().getFormat(\"0.##\"));\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Workbook styles created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Workbook styles created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"******************\n * Sheet of samples *\n ********************/\n SXSSFSheet samples = workbook.createSheet(dialog.stringDatabase.getString(\"SheetNames.Samples\"));\n\n /* Title row */\n Row titlesRow = samples.createRow(0);\n titlesRow.createCell(0).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.SampleN\"));\n for (int colNum = 1; colNum < sampledVariables.size() + 1; colNum++) { // Names of variables\n titlesRow.createCell(colNum).setCellValue(sampledVariables.get(colNum - 1).toString());\n }\n titlesRow.createCell(sampledVariables.size() + 1).setCellValue(dialog.stringDatabase.\n getString(\"ColumnTitles.Weight\"));\n\n // Apply header style\n for (int colNum = 0; colNum < sampledVariables.size() + 2; colNum++) {\n titlesRow.getCell(colNum).setCellStyle(topTable);\n }\n\n // Auto-size columns of first sheet\n for (int colNum = 0; colNum < sampledVariables.size() + 2; colNum++) {\n samples.trackAllColumnsForAutoSizing();\n samples.autoSizeColumn(colNum);\n }\n\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Header of samples sheet: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Header of samples sheet: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /* Sample's rows */\n int rowNum;\n\n // Sample's loop\n for (rowNum = 1; rowNum < algorithm.getSampleSize() + 1; rowNum++) {\n\n Row sampleRow = samples.createRow(rowNum);\n sampleRow.createCell(0).setCellValue(rowNum);\n double weight = sampleStorage[rowNum - 1][sampledVariables.size()];\n for (int colNum = 1; colNum < sampledVariables.size() + 2; colNum++) { // Sampled states\n sampleRow.createCell(colNum).setCellValue(sampleStorage[rowNum - 1][colNum - 1]);\n if (weight == 0) {\n sampleRow.getCell(colNum).setCellStyle(incompatibleSample);\n } else {\n sampleRow.getCell(colNum).setCellStyle(compatibleSample);\n }\n }\n }\n\n\n\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Sample rows created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Sample rows created: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"************************\n * Sheet of general stats *\n **************************/\n\n SXSSFSheet generalStats = workbook.createSheet(dialog.stringDatabase.getString(\"SheetNames.GeneralStats\"));\n\n /* Rows of algorithm data */\n\n rowNum = 0;\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.Algorithm\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(dialog.algorithmName);\n generalStats.getRow(rowNum).getCell(1).setCellStyle(subTopTable);\n\n rowNum++; // Row 1\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.TotalSamples\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getSampleSize());\n\n rowNum++; // Row 2\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.RuntimePerSample\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).\n setCellValue(algorithm.getAlgorithmExecutionTime()/algorithm.getSampleSize());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartDecimals);\n\n rowNum++; // Row 3\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.Runtime\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).\n setCellValue(algorithm.getAlgorithmExecutionTime());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartFewDecimals);\n\n rowNum++; // Row 4\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.ValidSamples\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getNumPositiveSamples());\n\n rowNum++; // Row 5\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.AccumulatedWeight\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(algorithm.getAccumulatedWeight());\n generalStats.getRow(rowNum).getCell(1).setCellStyle(smartFewDecimals);\n\n rowNum++; // Row 6\n generalStats.createRow(rowNum).createCell(0).setCellValue(dialog.stringDatabase.\n getString(\"RowTitles.ExactAlgorithmName\"));\n generalStats.getRow(rowNum).getCell(0).setCellStyle(topTable);\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n generalStats.getRow(rowNum).createCell(1).setCellValue(dialog.stringDatabase.getString(\"Algorithms.Hugin\"));\n\n // Empty row\n\n rowNum +=2; // rows written until now\n\n /* Row of titles */\n titlesRow = generalStats.createRow(rowNum);\n titlesRow.createCell(0).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.Variable\"));\n\n // Big long cell for state names\n generalStats.addMergedRegion(new CellRangeAddress(rowNum, rowNum, 1, maxNStates));\n titlesRow.createCell(1).setCellValue(dialog.stringDatabase.getString(\"ColumnTitles.States\"));\n\n // Set header style\n for (int colNum = 0; colNum < 2; colNum++) {\n titlesRow.getCell(colNum).setCellStyle(centeredTopTable);\n }\n\n // Empty row for clarity\n if (evidenceVariables.size() > 0) {\n rowNum++ ;\n }\n\n // Write about evidence variables that have not been sampled\n for (Variable evidenceVariable : evidenceVariables) {\n if (!sampledVariables.contains(evidenceVariable)) {\n\n /* Row of names */\n Row namesRow = generalStats.createRow(rowNum);\n // Write the name of the variable\n Cell variableName = namesRow.createCell(0);\n variableName.setCellValue(evidenceVariable.toString());\n variableName.setCellStyle(findingNode); // The color marks it as a finding\n\n // and then the names of their states\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n Cell stateName = namesRow.createCell(colNum);\n stateName.setCellValue(evidenceVariable.getStateName(colNum - 1));\n stateName.setCellStyle(findingNode);\n }\n\n /* Row of occurrences */\n // Write \"non-sampled\"\n Row occurrencesRow = generalStats.createRow(rowNum + 1);\n Cell nSamples = occurrencesRow.createCell(0);\n nSamples.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Ocurrences\"));\n\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n occurrencesRow.createCell(colNum)\n .setCellValue(dialog.stringDatabase.getString(\"NonSampled\"));\n }\n\n /* Row of finding */\n // Write the finding\n Row approxProbsRow = generalStats.createRow(rowNum + 2);\n Cell approximateProbs = approxProbsRow.createCell(0);\n approximateProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Finding\"));\n\n for (int colNum = 1; colNum < evidenceVariable.getNumStates() + 1; colNum++) {\n int value = 0;\n if (evidence.getState(evidenceVariable) == colNum - 1) {\n value = 1;\n }\n approxProbsRow.createCell(colNum).setCellValue(value);\n }\n\n // Empty row\n Row emptyRow = generalStats.createRow(rowNum + 4);\n emptyRow.setHeight((short) 120);\n\n rowNum += 4; // Go to the next variable (each variable uses 4 rows)\n }\n }\n\n rowNum++; // Empty row for clarity.\n\n // Write sampled variables\n for (int variablePosition = 0; variablePosition < sampledVariables.size(); variablePosition++) {\n\n Variable variableToWrite = sampledVariables.get(variablePosition);\n\n /* Row of names */\n Row namesRow = generalStats.createRow(rowNum);\n // Write the name of the variable\n Cell variableName = namesRow.createCell(0);\n variableName.setCellValue(sampledVariables.get(variablePosition).toString());\n\n // and then the names of its states\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n Cell stateName = namesRow.createCell(colNum);\n stateName.setCellValue(variableToWrite.getStateName(colNum - 1));\n }\n\n // In logical sampling, evidence variables are samples. If so, mark them as findings.\n if (evidenceVariables.contains(variableToWrite)) {\n for (int colNum = 0; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n namesRow.getCell(colNum).setCellStyle(findingNode);\n }\n } else {\n for (int colNum = 0; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n namesRow.getCell(colNum).setCellStyle(chanceNode);\n }\n }\n\n /* Row of occurrences */\n Row occurrencesRows = generalStats.createRow(rowNum + 1);\n // Write the title of the row\n Cell nSamples = occurrencesRows.createCell(0);\n nSamples.setCellValue(dialog.stringDatabase.getString(\"RowTitles.Ocurrences\"));\n // Write how many times each state has been sampled\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n occurrencesRows.createCell(colNum)\n .setCellValue(getStateOccurrences(sampleStorage, variablePosition,colNum - 1));\n }\n\n /* Row of approximate probabilities */\n Row approxProbsRow = generalStats.createRow(rowNum + 2);\n // Write the title of the row\n Cell approximateProbs = approxProbsRow.createCell(0);\n approximateProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.ApproximateProbability\"));\n // Write the sampled probability\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n if (evidenceVariables.contains(variableToWrite)) {\n // Logic Sampling: in case of a sampled evidence variable, probability = 1 for the finding.\n int value = 0;\n if (evidence.getState(variableToWrite) == colNum - 1) {\n value = 1;\n }\n approxProbsRow.createCell(colNum).setCellValue(value);\n\n } else {\n approxProbsRow.createCell(colNum)\n .setCellValue(results.get(variableToWrite).getValues()[colNum - 1]);\n }\n approxProbsRow.getCell(colNum).setCellStyle(smartDecimals);\n }\n\n\n /* Row of exact probabilities */\n Row exactProbsRow = generalStats.createRow(rowNum + 3);\n // Write the title of the row\n Cell exactProbs = exactProbsRow.createCell(0);\n exactProbs.setCellValue(dialog.stringDatabase.getString(\"RowTitles.ExactProbability\"));\n // Write how many times each state has been sampled\n for (int colNum = 1; colNum < variableToWrite.getNumStates() + 1; colNum++) {\n exactProbsRow.createCell(colNum)\n .setCellValue(exactPosteriorValues.get(variableToWrite).getValues()[colNum - 1]);\n exactProbsRow.getCell(colNum).setCellStyle(smartDecimals);\n }\n\n // Empty row\n Row emptyRow = generalStats.createRow(rowNum + 4);\n emptyRow.setHeight((short) 120);\n\n rowNum += 5; // Go to the next variable (each variable uses 5 rows)\n\n }\n\n // Auto-size columns of second sheet (variable column + states columns)\n for (int colNum = 0; colNum <= 1 + maxNStates; colNum++) {\n generalStats.trackAllColumnsForAutoSizing();\n generalStats.autoSizeColumn(colNum);\n }\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"General stats added: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"General stats added: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n /*\"*****************\n * Output the file *\n *******************/\n try {\n FileOutputStream outputStream = new FileOutputStream(fileName);\n workbook.write(outputStream);\n // remember to close\n outputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n LocalizedException OutputException =\n new LocalizedException(new OpenMarkovException(\"Exception.Output\"), this.dialog);\n OutputException.showException();\n }\n\n // Time measuring for this phase\n elapsedMS = (System.nanoTime() - startTime)/1000000;\n logger.info(\"Writing done: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n System.out.println(\"Writing done: \" + Long.toString(elapsedMS) + \" ms elapsed\");\n\n String conclusion = dialog.stringDatabase.getString(\"Conclusion\") + \"\\n\" + fileName;\n logger.info(conclusion);\n System.out.println(conclusion);\n JOptionPane.showMessageDialog(dialog, conclusion,\n dialog.stringDatabase.getString(\"ConclusionTitle\"), JOptionPane.DEFAULT_OPTION);\n }" ]
[ "0.5732389", "0.55223423", "0.53442407", "0.52567023", "0.52518994", "0.5246811", "0.51889586", "0.5131737", "0.5129658", "0.51203585", "0.51170504", "0.50957566", "0.5001598", "0.4965789", "0.4964033", "0.49605882", "0.49152616", "0.48850963", "0.48710614", "0.48532397", "0.48349047", "0.48322064", "0.48288682", "0.4792095", "0.4784316", "0.47733638", "0.47551733", "0.47537044", "0.4750605", "0.4747297", "0.47409716", "0.47389737", "0.47380897", "0.4733396", "0.47293213", "0.47230655", "0.47224918", "0.47167987", "0.469962", "0.46950233", "0.4689825", "0.46836105", "0.4683001", "0.46806547", "0.46607995", "0.46591502", "0.46583062", "0.46564105", "0.46458122", "0.46424252", "0.46378478", "0.46268848", "0.4623254", "0.46213427", "0.46211866", "0.46155125", "0.46140566", "0.46136004", "0.46063575", "0.4602593", "0.45945013", "0.45724124", "0.45673603", "0.45667994", "0.4559665", "0.45577335", "0.45573285", "0.45557", "0.45546272", "0.45515442", "0.4542997", "0.45350507", "0.45342517", "0.45337898", "0.45323917", "0.453229", "0.45304802", "0.45260546", "0.4521774", "0.45204055", "0.4517571", "0.45166814", "0.45119235", "0.4510644", "0.45105156", "0.45068127", "0.44992763", "0.4494968", "0.4490656", "0.44867766", "0.4473373", "0.44644284", "0.44630894", "0.44597122", "0.4456826", "0.44544697", "0.44537297", "0.44533902", "0.4451294", "0.44512236" ]
0.70911723
0
This method updates and normalizes the probabilities for each possible emission and transition.
public void updateProbabilities(TreeMap<String, ProbMap> tagIDs, String oldWordType, String currentWord) { //if this is first time we are seeing the old word type, add it to the tagID Map if (!tagIDs.containsKey(oldWordType)) { tagIDs.put(oldWordType, new ProbMap()); } //if tagIDs probMap for oldWord doesn't have the currentWord (whether an actual word or word type), add it if (!tagIDs.get(oldWordType).map.containsKey(currentWord)) { //physically adds currentWord to probability map with frequency of 1. ProbMap probabilities = tagIDs.get(oldWordType); probabilities.map.put(currentWord, (float) 1); } else { //increment numerator for current word in old word's map ProbMap probabilities = tagIDs.get(oldWordType); Float frequency = probabilities.map.get(currentWord); probabilities.map.put(currentWord, frequency + 1); } tagIDs.get(oldWordType).incrementDenominator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void normalize() {\r\n\t\tfor (int i = 0; i<no_goods; i++) {\t\t\t\r\n\t\t\tfor (IntegerArray r : prob[i].keySet()) {\t\t\t\t\r\n\t\t\t\tdouble[] p = prob[i].get(r);\r\n\t\t\t\tint s = sum[i].get(r);\r\n\t\t\t\t\r\n\t\t\t\tfor (int j = 0; j<p.length; j++)\r\n\t\t\t\t\tp[j] /= s;\r\n\t\t\t}\r\n\r\n\t\t\t// compute the marginal distribution for this good\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] /= marg_sum;\r\n\t\t}\r\n\t\t\r\n\t\tready = true;\r\n\t}", "public double updateDistribution(\n\t\t\tProbabilityDistribution<T> observedDistribution,\n\t\t\tMap<T, Double> stepSizes) {\n\t\tdouble absoluteChange = 0;\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t// Update every element within the distribution\n\t\t\tDouble ratio = observedDistribution.getProb(element);\n\t\t\tif (ratio == null)\n\t\t\t\tratio = 0d;\n\t\t\tabsoluteChange += updateElement(element, 1, ratio,\n\t\t\t\t\tstepSizes.get(element));\n\t\t}\n\n\t\t// Normalise the probabilities\n\t\tnormaliseProbs();\n\n\t\treturn absoluteChange;\n\t}", "public void updateTransitionMapSmooth(){\n\t\tfor(String yWord:transition_map.keySet()){\n\t\t\tHashMap<String,DataUnit> stateTransitionMap=transition_map.get(yWord).state_transition;\n\t\t\tHashMap<String,DataUnit> terminalTransitionMap=transition_map.get(yWord).terminal_transition;\n\t\t\t\n\t\t\t//count the total number of Nyo(y)\n\t\t\tint totalStateTransitionCount=0;\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\ttotalStateTransitionCount+=stateTransitionMap.get(nextY).count;\n\t\t\t}\n\t\t\t\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\tstateTransitionMap.get(nextY).prob=(stateTransitionMap.get(nextY).count*1.0)/totalStateTransitionCount;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//count the total number of Nyo(x,y)\n\t\t\tint totalTerminalTransitionCount=0,unknown_count=0;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\ttotalTerminalTransitionCount+=terminalTransitionMap.get(xWord).count;\n\t\t\t\tif(unknown_set.contains(xWord)){\n\t\t\t\t\tunknown_count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttotalTerminalTransitionCount+=unknown_count;\n\t\t\tterminalTransitionMap.put(unknown_word,new DataUnit(unknown_count,0.0));\n\t\t\t\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\tterminalTransitionMap.get(xWord).prob=(terminalTransitionMap.get(xWord).count*1.0)/(totalTerminalTransitionCount);\n\t\t\t}\t\n\t\t}\n\t}", "public void updateTransitionMap(){\n\t\tfor(String yWord:transition_map.keySet()){\n\t\t\tHashMap<String,DataUnit> stateTransitionMap=transition_map.get(yWord).state_transition;\n\t\t\t\n\t\t\t//count the total number of Nyo(y)\n\t\t\tint totalStateTransitionCount=0;\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\ttotalStateTransitionCount+=stateTransitionMap.get(nextY).count;\n\t\t\t}\n\t\t\t\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\tstateTransitionMap.get(nextY).prob=(stateTransitionMap.get(nextY).count*1.0)/totalStateTransitionCount;\n\t\t\t}\n\t\t\t\n\t\t\t//count the total number of Nyo(x,y)\n\t\t\tHashMap<String,DataUnit> terminalTransitionMap=transition_map.get(yWord).terminal_transition;\n\t\t\t\n\t\t\tint totalTerminalTransitionCount=0;\n\t\t\tint typeCount=0;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\ttotalTerminalTransitionCount+=terminalTransitionMap.get(xWord).count;\n\t\t\t\ttypeCount++;\n\t\t\t}\n\t\t\ttypeCount++;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\tterminalTransitionMap.get(xWord).prob=(terminalTransitionMap.get(xWord).count+1.0)/(totalTerminalTransitionCount+typeCount);\n\t\t\t}\n\t\t\t\n\t\t\tterminalTransitionMap.put(unknown_word,new DataUnit(1,1.0/(totalTerminalTransitionCount+typeCount)));\n\t\t}\n\t}", "public void normaliseProbs() {\n\t\t// Get total\n\t\tdouble sum = 0;\n\t\tfor (Double d : itemProbs_.values()) {\n\t\t\tsum += d;\n\t\t}\n\n\t\t// If already at 1, just return.\n\t\tif ((sum >= 0.9999) && (sum <= 1.0001))\n\t\t\treturn;\n\n\t\t// Normalise\n\t\tint count = itemProbs_.size();\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t// If the sum is 0, everything is equal.\n\t\t\tif (sum == 0)\n\t\t\t\titemProbs_.put(element, 1.0 / count);\n\t\t\telse\n\t\t\t\titemProbs_.put(element, itemProbs_.get(element) / sum);\n\t\t}\n\t\trebuildProbs_ = true;\n\t\tklSize_ = 0;\n\t}", "@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}", "public void resetProbs() {\n\t\t// Set all probabilities to one.\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\titemProbs_.put(element, 1.0 / itemProbs_.size());\n\t\t}\n\t\trebuildProbs_ = true;\n\t\tklSize_ = 0;\n\t}", "public double updateDistribution(\n\t\t\tProbabilityDistribution<T> observedDistribution, double stepSize) {\n\t\tdouble absoluteChange = 0;\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t// Update every element within the distribution\n\t\t\tDouble ratio = observedDistribution.getProb(element);\n\t\t\tif (ratio == null)\n\t\t\t\tratio = 0d;\n\t\t\tabsoluteChange += updateElement(element, 1, ratio, stepSize);\n\t\t}\n\n\t\t// Normalise the probabilities\n\t\tnormaliseProbs();\n\n\t\treturn absoluteChange;\n\t}", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public void calculateProbabilities(){\n\t}", "public void updateFinalMaps() {\r\n\t\t//prints out probMap for each tag ID and makes new map with ln(frequency/denominator) for each\r\n\t\t//wordType in transMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> tagIDsFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.transMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.transMapTemp.get(key);\r\n\t\t\ttagIDsFinal.put(key, this.transMapTemp.get(key).map);\r\n\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\t\t\t\ttagIDsFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\tSystem.out.println(key + \": \" + key2 + \" \" + tagIDsFinal.get(key).get(key2));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//makes new map with ln(frequency/denominator) for each word in emissionMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> emissionMapFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.emissionMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.emissionMapTemp.get(key);\r\n\t\t\temissionMapFinal.put(key, this.emissionMapTemp.get(key).map);\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\r\n\t\t\t\temissionMapFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.transMap = tagIDsFinal;\r\n\t\tthis.emissionMap = emissionMapFinal;\t\t\r\n\t}", "protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}", "public static void checkUpdateProbabilityOnALLRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse*/\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t/*if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse*/\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t\tif(new_r3 != r3 && new_r3 != 0)\r\n\t\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "public double updateDistribution(double numSamples, Map<T, Integer> counts,\n\t\t\tdouble stepSize) {\n\t\tif (numSamples != 0) {\n\t\t\t// For each of the rules within the distribution\n\t\t\tdouble absDiff = 0;\n\t\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t\t// Update every element within the distribution\n\t\t\t\tInteger itemCount = counts.get(element);\n\t\t\t\tif (itemCount == null)\n\t\t\t\t\titemCount = 0;\n\t\t\t\tabsDiff += updateElement(element, numSamples, itemCount,\n\t\t\t\t\t\tstepSize);\n\t\t\t}\n\n\t\t\t// Normalise the probabilities\n\t\t\tnormaliseProbs();\n\t\t\tabsDiff /= (2 * stepSize);\n\t\t\treturn absDiff;\n\t\t}\n\n\t\treturn 0;\n\t}", "public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "public static void checkUpdateProbabilityOnAtomicRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 0; j < 8; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = base_relations[j];\r\n\t\t\t\r\n\t\t\t\tfor(int k = 0; k < 8; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = base_relations[k];\r\n\t\t\t\t\ttotal++;\r\n\t\t\t\t\t//int new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\tint new_r3 = SetOperators.intersection(r3, \r\n\t\t\t\t\t\t\t\tCompositionTable.LookUpTable(r1, r2));\r\n\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\tif( new_r3 != r3 )\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t\t//System.out.println(new_r3);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tSystem.out.println(\" total \" + total + \" update \" + update);\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public void update() {\n\t\tmrRoboto.move();\n\t\tobsMatrix.updateSensor(mrRoboto.x, mrRoboto.y);\n\t\thmm.updateProb(obsMatrix.getSensorReading());\n\t}", "public void assignMatingProportions() {\n\t\tdouble totalAverageSpeciesFitness = 0.0;\r\n\r\n\t\t// hold the proportion of offspring each species should generate\r\n\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ttotalAverageSpeciesFitness += s.getAverageAdjustedFitness();\r\n\t\t}\r\n\r\n\t\t// set map values to be a proportion of the total adjusted\r\n\t\t// fitness\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ts.assignProp(totalAverageSpeciesFitness);\r\n\t\t}\r\n\t}", "public void resetProbs(double prob) {\n\t\t// Set all probabilities to a given value.\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\titemProbs_.put(element, prob);\n\t\t}\n\t\trebuildProbs_ = true;\n\t\tklSize_ = 0;\n\t}", "public static void checkUpdateProbabilityOnHORNRelations()\r\n\t{\r\n\t\tint[] base_relations = {1,2,4,8,16,32,64,128};\r\n\t\tint r1,r2,r3;\r\n\t\tint total = 0;\r\n\t\tint update = 0;\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\t r1 = base_relations[i];\r\n\t\t\tfor(int j = 1; j < 255; j++)\r\n\t\t\t{\r\n\t\t\t\tr2 = j;\r\n\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r2))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t/*if(r2 == 1 || r2 == 2 || r2 == 4 || r2 == 8 || r2 == 16 || r2 == 32 || r2 == 64 || r2 == 128)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t*/\r\n\t\t\t\telse\r\n\t\t\t\tfor(int k = 1; k < 255; k++)\r\n\t\t\t\t{ \r\n\t\t\t\t\tr3 = k;\r\n\t\t\t\t\t//if(r3 == 1 || r3 == 2 || r3 == 4 || r3 == 8 || r3 == 16 || r3 == 32 || r3 == 64 || r3 == 128)\r\n\t\t\t\t\t\tif(!MTS.BIMTS_H8.contains((Integer)r3))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\ttotal++;\r\n\t\t\t\t\t\tint new_r3 = CompositionTable.LookUpTable(r1, r2);\r\n\t\t\t\t\t\tif(new_r3 < r3)\r\n\t\t\t\t\t\t\tupdate++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println((double)update/total);\r\n\t\t\t\t\r\n\t}", "public void update() {\n\t\t\tif (!max.getText().isEmpty()) {\n\t\t\t\tInteger maxVal = Integer.parseInt(max.getText());\n\t\t\t\tif (maxVal > 2) {\n\t\t\t\t\tboolean toUpdate = false;\n\t\t\t\t\tPlgProbabilityDistribution distr = null;\n\t\t\t\t\tif (((String)cb.getSelectedItem()).equals(PlgProbabilityDistribution.distributionToName(DISTRIBUTION.UNIFORM))) {\n\t\t\t\t\t\tdistr = PlgProbabilityDistribution.uniformDistributionFactory();\n\t\t\t\t\t\ttoUpdate = true;\n\t\t\t\t\t} else if (((String)cb.getSelectedItem()).equals(PlgProbabilityDistribution.distributionToName(DISTRIBUTION.BETA))) {\n\t\t\t\t\t\tif (!alpha.getText().isEmpty() && !beta.getText().isEmpty()) {\n\t\t\t\t\t\t\tDouble a = Double.parseDouble(alpha.getText());\n\t\t\t\t\t\t\tDouble b = Double.parseDouble(beta.getText());\n\t\t\t\t\t\t\tdistr = PlgProbabilityDistribution.betaDistributionFactory(a, b);\n\t\t\t\t\t\t\ttoUpdate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (((String)cb.getSelectedItem()).equals(PlgProbabilityDistribution.distributionToName(DISTRIBUTION.NORMAL))) {\n\t\t\t\t\t\tdistr = PlgProbabilityDistribution.normalDistributionFactory();\n\t\t\t\t\t\ttoUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (toUpdate) {\n\t\t\t\t\t\tp.updateDistribution(dv, maxVal, distr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "void initiateProbabilityMatrix( int numberOfDocs ) {\r\n double jTransition = 1 / (double)numberOfDocs;\r\n for (int i = 0; i < numberOfDocs; i++) {\r\n //Determine probability of going to a link\r\n double prob;\r\n if (out[i] == 0) prob = jTransition;\r\n else prob = 1 / (double)out[i];\r\n //Set a valid link to prob\r\n for (int j = 0; j < numberOfDocs; j++) {\r\n double pTransition = 0;\r\n if (p[i][j] == LINK) pTransition = prob;\r\n if (out[i] == 0) pTransition = jTransition;\r\n //Calculate transition value in p matrix\r\n p[i][j] = (1 - BORED) * pTransition + BORED * jTransition;\r\n }\r\n }\r\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "private void initProbs(final double recombinationProb, final double errorProb) {\n\n initialProbs = new EnumMap<>(IBDState.class);\n initialProbs.put(IBDState.ZERO, Math.log10(.33));\n initialProbs.put(IBDState.ONE, Math.log10(.33));\n initialProbs.put(IBDState.TWO, Math.log10(.33));\n\n transitionProbs = new EnumMap<>(IBDState.class);\n transitionProbs.put(IBDState.ZERO, new Double[]{Math.log10((1 - recombinationProb) - (errorProb / 2)), Math.log10(recombinationProb - (errorProb / 2)), Math.log10(errorProb)});\n transitionProbs.put(IBDState.ONE, new Double[]{Math.log10((recombinationProb / 2)), Math.log10(1 - recombinationProb), Math.log10(recombinationProb / 2)});\n transitionProbs.put(IBDState.TWO, new Double[]{Math.log10(errorProb), Math.log10(recombinationProb - (errorProb / 2)), Math.log10((1 - recombinationProb) - (errorProb / 2))});\n }", "public double getTransitionProbability(Integer startStateIndex, Integer endStateIndex) {\n assert startStateIndex < endStateIndex;\n double probability = 1;\n String debugStr = \"\";\n for (int i = startStateIndex; i < endStateIndex; i++) {\n int startState = states.get(i);\n int nextState = states.get(i+1);\n probability = probability * transitionProbabilityMatrix[startState][nextState];\n //debugStr += String.format(\"%s * \", transitionProbabilityMatrix[startState][nextState]);\n }\n return probability;\n }", "private void evaluateProbabilities()\n\t{\n\t}", "public void mutate() {\n if (this.offspring != null) {\n for (int i = 0; i < this.offspring.size(); i++) {\n\n if (Defines.probMutate > Math.random()) {\n // OK, choose two genes to switch\n int nGene1 = Defines.randNum(0, Defines.chromosomeSize - 1);\n int nGene2 = nGene1;\n // Make sure gene2 is not the same gene as gene1\n while (nGene2 == nGene1) {\n nGene2 = Defines.randNum(0, Defines.chromosomeSize - 1);\n }\n\n // Switch two genes\n String temp = this.offspring.get(i).getGene(nGene1);\n\n this.offspring.get(i).setGene(nGene1, this.offspring.get(i).getGene(nGene2));\n this.offspring.get(i).setGene(nGene2, temp);\n }\n // Regenerate the chromosome\n ChromosomeGenerator chromoGen = new ChromosomeGenerator();\n chromoGen.update(this.offspring.get(i));\n }\n\n }\n\n }", "@Override\r\n\tprotected void updateProbAndRoll(int numDoubles, double multiplier, boolean rollAgain) {\n\t\taddToEndProb(multiplier);\r\n\t}", "public void setActionProbability(final State state, final Action action, final double probability) {\r\n getProperties(state).setActionProbability(action, probability);\r\n }", "public void normalize()\n {\n\tdef += 200*counter;\n\tdmg -= 0.5*counter;\n\tcounter = 0;\n }", "private List<Matrix> obtainTransitions(List<Matrix>probs){\n\t\tList<Matrix> output = new ArrayList<Matrix>();\n\t\tfor (int i =0;i<probs.size();i++) {\n\t\t\toutput.add(genTransFunction(probs.get(i)));\n\t\t}\n\t\treturn output;\n\t}", "protected void updateBaseline(TreeSet<StateTransition> stateTransitions) {\n if (!useBaseline) return;\n\n int size = stateTransitions.size();\n\n double mean = 0;\n for (StateTransition stateTransition : stateTransitions) mean += stateTransition.tdTarget;\n mean /= size;\n averageMean = averageMean == Double.MIN_VALUE ? mean : tau * averageMean + (1 - tau) * mean;\n\n double std = 0;\n for (StateTransition stateTransition : stateTransitions) std += Math.pow(stateTransition.tdTarget - mean, 2);\n std = Math.sqrt(std / (size - 1));\n averageStandardDeviation = averageStandardDeviation == Double.MIN_VALUE ? std : tau * averageStandardDeviation + (1 - tau) * std;\n\n for (StateTransition stateTransition : stateTransitions) {\n stateTransition.tdTarget = (stateTransition.tdTarget - averageMean) / averageStandardDeviation;\n }\n }", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "public void probabiltDistribution() {\r\n\t\tfor (int k = 0; k < 1000; k++) {\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\trandomGrid[i][j] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdeployComputerShips();\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\tprobabilityGrid[i][j] = probabilityGrid[i][j] + randomGrid[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "private void percentageScaling() {\n switch (slot) {\n case Torso -> updateBonusStats(1);\n case Head -> updateBonusStats(0.8);\n case Legs -> updateBonusStats(0.6);\n }\n }", "@Override\n public void update() {\n updateHealth();\n updateActiveWeapon();\n updateAmmunition();\n updateWaveCounter();\n updateReloading();\n }", "@Override\r\n\tpublic void setProbability(double probability) {\n\t\tthis.probability = probability;\r\n\t}", "public void update(){\n\t\tfor(ParticleEffect effect : effects){\n\t\t\teffect.update();\n\t\t}\n\t}", "public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }", "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 static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }", "public static void setMutationProbability(double value) { mutationProbability = value; }", "public void update() {\n\t\tupdateParticles();\n\t\tupdateSprings();\n\n\t\tif (groups != null) {\n\t\t\tfor (VParticleGroup g : groups) {\n\t\t\t\tg.update();\n\t\t\t}\n\t\t}\n\t}", "public void setProbability(double v) {\n probability = v;\n }", "public void computeTransitionsToFixDelta()\n {\n _entriesToProcess = new ArrayDeque<String>();\n \n _systemModelDelta.getKeys(_entriesToProcess);\n \n while(!_entriesToProcess.isEmpty())\n {\n processEntryDelta(_systemModelDelta.findAnyEntryDelta(_entriesToProcess.poll()));\n }\n }", "<S> void storeTransitionProbability(String hmmId, HMMTransitionProbability<S> probability) throws IOException;", "private void updateTransitionMatrix(int pos, char current) {\n double range=minmax[1]-minmax[0];\n double currentscore=0;\n switch(current) {\n case 'A': case 'a': currentscore=pwm[pos][0]; break;\n case 'C': case 'c': currentscore=pwm[pos][1]; break;\n case 'G': case 'g': currentscore=pwm[pos][2]; break;\n case 'T': case 't': currentscore=pwm[pos][3]; break;\n }\n for (int i=0;i<4;i++) {\n transitions[pos][i]=(pwm[pos][i]-currentscore)/range;\n }\n }", "protected void initializeUniformWeight() {\n\n if(CrashProperties.fitnessFunctions.length == 2){\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = 1 - (a);\n }\n }else {\n for (int n = 0; n < populationSize; n++) {\n double a = 1.0 * n / (populationSize - 1);\n lambda[n][0] = a;\n lambda[n][1] = (1 - (a))/2;\n lambda[n][2] = (1 - (a))/2;\n }\n }\n\n }", "private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }", "private void update()\r\n\t{\r\n\t\tfor (Agent agent : agents)\r\n\t\t{\r\n\t\t\tint i = agent.getIndex();\r\n\t\t\tp.setEntry(i, agent.getP());\r\n\t\t\tq.setEntry(i, agent.getQ());\r\n\t\t\tvabs.setEntry(i, agent.getVabs());\r\n\t\t\tvarg.setEntry(i, agent.getVarg());\r\n\t\t\tlambdaP.setEntry(i, agent.getLambdaP());\r\n\t\t\tlambdaQ.setEntry(i, agent.getLambdaQ());\r\n\t\t}\r\n\t}", "protected void mutateWeights() {\n\t\t// TODO: Change the way weight mutation works\n\t\tif (Braincraft.gatherStats) {\n\t\t\tArrayList<Integer> mutatedgenes = new ArrayList<Integer>();\n\t\t\tfor (Gene g : genes.values()) {\n\t\t\t\tif (Braincraft.randomChance(population.perWeightMutationRate)) {\n\t\t\t\t\tg.weight = Braincraft.randomWeight();\n\t\t\t\t\tmutatedgenes.add(g.innovation);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString output = \"weight mutation \" + ID;\n\t\t\tfor (Integer i : mutatedgenes) {\n\t\t\t\toutput += \" \" + i;\n\t\t\t}\n\t\t\tBraincraft.genetics.add(output);\n\t\t} else {\n\t\t\tfor (Gene g : genes.values()) {\n\t\t\t\tif (Braincraft.randomChance(population.perWeightMutationRate))\n\t\t\t\t\tg.weight = Braincraft.randomWeight();\n\t\t\t}\n\t\t}\n\t\t// TODO: Report weight mutations to stats\n\t}", "@Override\n public void tirar() {\n if ( this.probabilidad == null ) {\n super.tirar();\n this.valorTrucado = super.getValor();\n return;\n }\n \n // Necesitamos conocer la probabilidad de cada número, trucados o no, para ello tengo que saber\n // primero cuantos números hay trucados y la suma de sus probabilidades. \n // Con esto puedo calcular la probabilidad de aparición de los números no trucados.\n \n int numeroTrucados = 0;\n double sumaProbalidadesTrucadas = 0;\n double probabilidadNoTrucados = 0;\n \n for ( double p: this.probabilidad ) { // cálculo de la suma números y probabilidades trucadas\n if ( p >= 0 ) {\n numeroTrucados++;\n sumaProbalidadesTrucadas += p;\n }\n }\n \n if ( numeroTrucados < 6 ) { // por si estuvieran todos trucados\n probabilidadNoTrucados = (1-sumaProbalidadesTrucadas) / (6-numeroTrucados);\n }\n\n double aleatorio = Math.random(); // me servirá para escoger el valor del dado\n \n // Me quedo con la cara del dado cuya probabilidad de aparición, sumada a las anteriores, \n // supere el valor aleatorio\n double sumaProbabilidades = 0;\n this.valorTrucado = 0;\n do {\n ++this.valorTrucado;\n if (this.probabilidad[this.valorTrucado-1] < 0) { // no es una cara del dado trucada\n sumaProbabilidades += probabilidadNoTrucados;\n } else {\n sumaProbabilidades += this.probabilidad[this.valorTrucado-1];\n }\n \n } while (sumaProbabilidades < aleatorio && valorTrucado < 6);\n \n \n }", "public void updateFitness() {\n Particle p;\n for (int i = 0; i < SWARM_SIZE; i++) {\n p = swarm.get(i);\n p.setFitnessValue(getFitnessValue(p.getVector().getPos()));\n p.setpBestFitness(getFitnessValue(p.getpBest().getPos()));\n }\n }", "protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}", "public float getProbMut () {\r\n return mut_prob;\r\n }", "@Override\n protected void afterAttach(){\n\n float scaleE = (float) Math.pow(toValue, 1.0 / totalIterations);\n scaleTransform.updateValues(scaleE, scaleE, scaleE);\n }", "private float updateProbability(float[][] tempMap, int x, int y) {\n\t\t\n\t\ttempMap[x][y] = 1;\n\t\treturn tempMap[x][y];\n\t}", "public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }", "public void setProbMut(double d){\n if ((d < 0) || (d > 1)){\n throw new IllegalArgumentException(\"Mutation probability cannot be less than 0 or greater than 1.\");\n }\n mutationProb = d;\n }", "public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }", "@Override\n public Proposal propose(Random rand)\n {\n \n savedValue = variable.getIntegerValue();\n double [] incrementIdx = Multinomial.generate(rand, 1, \n uniformDiscreteProbs(NUM_STATES));\n double [] stepsVector = steps(NUM_STATES);\n \n int increment = 0; \n \n for(int i = 0; i < (2 * NUM_STATES); i++)\n increment += (int) incrementIdx[i] * stepsVector[i];\n \n final int newValue = savedValue + increment;\n variable.setValue(newValue);\n return new ProposalRealization();\n }", "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 }", "protected void evolve()\n\t\t{\tif(this_gen < NUMBER_GENERATIONS) {\n\t\t\t\t// Create a new generation.\n\t\t\t\tfloat avg_fit=Float.MIN_VALUE, max_fit=Float.MIN_VALUE, sum_fit=0;\n\t\t\t\tfloat tot_wait=0, avg_wait=0, tot_move=0, avg_move=0;\n\n\t\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++) {\n\t\t\t\t\tfloat fit = calcFitness(inds[i]);\n\t\t\t\t\tinds[i].setFitness(fit);\n\t\t\t\t\tsum_fit\t += fit;\n\t\t\t\t\tmax_fit = fit>max_fit ? fit : max_fit;\n\t\t\t\t\ttot_wait += inds[i].getWait();\n\t\t\t\t\ttot_move += inds[i].getMove();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tavg_wait = tot_wait/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_move = tot_move/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_fit = sum_fit/NUMBER_INDIVIDUALS;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Stats of prev. gen: (a-wait,a-move)=(\"+avg_wait+\",\"+avg_move+\")\"+\" (a-fit,mx-fit)=(\"+avg_fit+\",\"+max_fit+\")\");\n\t\t\t\tSystem.out.println(\"Evolving...\");\n\t\t\t\t\n\t\t\t\t// Sorts the current Individual-array on fitness, descending\n\t\t\t\tinds = sortIndsArr(inds);\n\t\t\t\t\n\t\t\t\tint num_mating = (int) Math.floor(NUMBER_INDIVIDUALS*(1-ELITISM_FACTOR));\n\t\t\t\tint num_elitism = (int) Math.ceil(NUMBER_INDIVIDUALS*ELITISM_FACTOR);\n\t\t\t\tif(num_mating%2!=0) {\n\t\t\t\t\tnum_mating--;\n\t\t\t\t\tnum_elitism++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIndividual[] newInds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\t\t\n\t\t\t\t// Tournament selection\n\t\t\t\tfor(int i=0;i<num_mating;i+=2) {\n\t\t\t\t\tIndividual mamma=null, pappa=null;\n\t\t\t\t\tfloat chn_mum = random.nextFloat();\n\t\t\t\t\tfloat chn_pap = random.nextFloat();\n\t\t\t\t\tfloat fit_mum, sum_fit2=0, sum_fit3=0;\n\t\t\t\t\tint index_mum = -1;\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tsum_fit2 += (inds[j].getFitness()/sum_fit);\n\t\t\t\t\t\tif(chn_mum <= sum_fit2) {\n\t\t\t\t\t\t\tmamma = inds[j];\n\t\t\t\t\t\t\tindex_mum = j;\n\t\t\t\t\t\t\tfit_mum = mamma.getFitness();\n\t\t\t\t\t\t\tsum_fit2 = sum_fit-fit_mum;\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\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tif(j!=index_mum) {\n\t\t\t\t\t\t\tsum_fit3 += (inds[j].getFitness()/sum_fit2);\n\t\t\t\t\t\t\tif(chn_pap <= sum_fit3) {\n\t\t\t\t\t\t\t\tpappa = inds[j];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"Mating...: \"+mamma.getFitness()+\",\"+pappa.getFitness());\n\t\t\t\t\tIndividual[] kids = mate(mamma, pappa);\n\t\t\t\t\tnewInds[i]\t= kids[0];\n\t\t\t\t\tnewInds[i+1]= kids[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Elitism\n\t\t\t\tfor(int i=0;i<num_elitism;i++) {\n\t\t\t\t\tnewInds[i+num_mating] = inds[i];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinds = newInds;\t\t\t\t\t\t\t\t\n\t\t\t\tthis_gen++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Done with evolving\");\n\t\t\t\t// set the best individual as the ruling champ?\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "public void siguinteProbabilidad(double probabilidad){\n probabilidadEstados[contadorEstados] = probabilidad;\n probabilidadTotal += probabilidad;\n contadorEstados += 1;\n }", "public double pathProb(S[] path) {\r\n\t\t// there is an equal probability to start in any state\r\n\t\tdouble prob = 1 / states.length;\r\n\t\t// loop over all state-pairs\r\n\t\tfor (int i = 0; i < path.length - 1; ++i)\r\n\t\t\t// multiply prob by this transition probability\r\n\t\t\tprob *= transProb(path[i], path[i + 1]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}", "public void buildModel() {\n double loss_pre = Double.MAX_VALUE;\n for (int iter = 0; iter < maxIter; iter ++) {\n Long start = System.currentTimeMillis();\n if (showProgress)\n System.out.println(\"Iteration \"+(iter+1)+\" started\");\n // Update user latent vectors\n IntStream.range(0,userCount).parallel().peek(i->update_user(i)).forEach(j->{});\n /*\n for (int u = 0; u < userCount; u ++) {\n update_user(u);\n }\n */\n if (showProgress) {\n System.out.println(\"Users updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n IntStream.range(0,itemCount).parallel().peek(i->update_item(i)).forEach(j->{});\n // Update item latent vectors\n /*\n for (int i = 0; i < itemCount; i ++) {\n update_item(i);\n }\n */\n if (showProgress) {\n System.out.println(\"Items updated for \" + (System.currentTimeMillis() - start) + \"millis\");\n start = System.currentTimeMillis();\n }\n\n // Show loss\n if (showLoss)\n loss_pre = showLoss(iter, start, loss_pre);\n\n\n } // end for iter\n\n }", "private void updateWeights(Hashtable<NeuralNode, Double> nodeValues, double learnRate, double momentum) {\r\n\t\tfor (OutputNode output : outputs) {\r\n\t\t\toutput.updateWeights(null, nodeValues, learnRate, momentum);\r\n\t\t}\r\n\t}", "@Override\r\n\tprotected void afterStep() {\r\n\t\tif (pr_disappearing_potential > 0) {\r\n\t\t\tfor (V v : graph.getVertices()) {\r\n\t\t\t\tif (v instanceof TopicVertex) {\r\n\t\t\t\t\tsetOutputValue(v, getOutputValue(v) + (1 - alpha)\r\n\t\t\t\t\t\t\t* (pr_disappearing_potential * getVertexPrior(v)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tpr_disappearing_potential = 0;\r\n\t\t}\r\n\t\t// not necessary for hits-hub\r\n\t\t// if (disappearing_potential.hub > 0) {\r\n\t\t// for (V v : graph.getVertices()) {\r\n\t\t// if (v instanceof TopicVertex) {\r\n\t\t// double new_hub = getOutputValue(v)\r\n\t\t// + (1 - alpha)\r\n\t\t// * (hitsCoeff * disappearing_potential.hub * getVertexPrior(v));\r\n\t\t// setOutputValue(v, new_hub);\r\n\t\t// } else if (v instanceof TopicCategoryVertex) {\r\n\t\t// // auth and hub of topic category\r\n\t\t// }\r\n\t\t// }\r\n\t\t// disappearing_potential.hub = 0;\r\n\t\t// }\r\n\t\t// if (disappearing_potential.authority > 0) {\r\n\t\t// for (V v : graph.getVertices()) {\r\n\t\t// if (v instanceof TopicCategoryVertex) {\r\n\t\t// double new_auth = getOutputValue(v)\r\n\t\t// + (1 - alpha)\r\n\t\t// * (hitsCoeff * disappearing_potential.authority * getVertexPrior(v));\r\n\t\t// setOutputValue(v, new_auth);\r\n\t\t// }\r\n\t\t// }\r\n\t\t// disappearing_potential.authority = 0;\r\n\t\t// }\r\n\r\n\t\tsuper.afterStep();\r\n\t}", "protected void setDistribution(ProbabilityDistribution distribution)\r\n\t{\r\n\t\tthis.distribution = distribution;\r\n\t}", "private void distribute() {\n\t\t\tfor (Entry<String, List<String>> r : groups.entrySet()) {\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint randomIndex = random.nextInt(r.getValue().size());\n\t\t\t\tdistribution.put(r.getKey(), r.getValue().get(randomIndex));\n\t\t\t}\n\t\t}", "public abstract List<Double> updatePopulations();", "private void mutate(Chromosome c){\n for(double[] gene:c.getGeneData()){\n for(int i=0; i<gene.length; i++){\n if(Math.random()<mutationRate){\n //Mutate the data\n gene[i] += (Math.random()-Math.random())*maxPerturbation;\n }\n }\n }\n }", "void updatePercepts() {\n clearPercepts();\n\n Location r1Loc = model.getAgPos(0);\n Location r2Loc = model.getAgPos(1);\n\t\tLocation r3Loc = model.getAgPos(2);\n\t\tLocation r4Loc = model.getAgPos(3);\n\t\t\n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\t\tLiteral pos3 = Literal.parseLiteral(\"pos(r3,\" + r3Loc.x + \",\" + r3Loc.y + \")\");\n\t\tLiteral pos4 = Literal.parseLiteral(\"pos(r4,\" + r4Loc.x + \",\" + r4Loc.y + \")\");\n\n addPercept(pos1);\n addPercept(pos2);\n\t\taddPercept(pos3);\n\t\taddPercept(pos4);\n\n if (model.hasObject(GARB, r1Loc)) {\n addPercept(g1);\n }\n if (model.hasObject(GARB, r2Loc)) {\n addPercept(g2);\n }\n\t\tif (model.hasObject(COAL, r4Loc)) {\n\t\t\taddPercept(c4);\t\n\t\t}\n }", "public void setNewPrediction()\n\t{\n\t\tfor (int i=0;i<NUM_GOODS;i++)\n\t\t{\n\t\t\tfor (int j=0;j<VALUE_UPPER_BOUND+1;j++)\n\t\t\t{\n\t\t\t\tcumulPrediction[i][j] = 0;\n\t\t\t\t//System.out.println(pricePrediction[i][j]);\n\t\t\t\tprevPrediction[i][j] = pricePrediction[i][j];\n\t\t\t\t// 0.1 corresponds infestismal amount mentioned in the paper.\n\t\t\t\tpricePrediction[i][j] = priceObservation[i][j] + 0.1;\n\t\t\t\tcumulPrediction[i][j] += pricePrediction[i][j];\n\t\t\t\tif (j>0)\n\t\t\t\t{\n\t\t\t\t\tcumulPrediction[i][j] += cumulPrediction[i][j-1];\n\t\t\t\t}\n\t\t\t\tpriceObservation[i][j] = 0; \n\t\t\t}\n\t\t}\n\t\tthis.observationCount = 0;\n\t\tthis.isPricePredicting = true;\n\t\t//buildCumulativeDist();\n\t}", "public void makeSampleActivityMoments() {\n\t\tdouble sumActivity = 0;\n\t\tfor (int i = 0; i < SubjectsList.size(); i ++) {\n\t\t\tdouble ca = SubjectsList.get(i).getSubjectActivityCount();\n\t\t\tsumActivity += ca;\n\t\t}\n\t\t//System.out.println(sumActivity/sampleSize);\n\t}", "protected void updateScales() {\n hscale = 1f;\n vscale = 1f;\n viewData.setHscale(hscale);\n viewData.setVscale(vscale);\n }", "public void mutate(float mutationProbability, float connectionMutationProbability, float mutationFactor) {\r\n for (int i = 1; i < neurons.length; i++) // layers (skip input layer)\r\n {\r\n for (int j = 0; j < neurons[i].length; j++) // neurons per layer\r\n {\r\n if (Math.random() <= mutationProbability) {\r\n neurons[i][j].setWeights(neurons[i][j].getMutatedWeights(connectionMutationProbability, mutationFactor));\r\n }\r\n }\r\n }\r\n }", "public void eventLiving(double[] changes){\n living = (int) Math.floor(living * (1 + (changes[0]/100)));\n living += changes[1];\n \n if(living > 100){\n living = 100;\n }\n \n if(living < 0){\n living = 0;\n }\n }", "@Override\r\n\tpublic void setNextProbability(double probability) {\n\t\tthis.nextProbability = probability;\r\n\t}", "@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }", "public void updateModel() {\n\t\tIterator<Cell> itr = iterator();\n\t\twhile(itr.hasNext()) itr.next().update();\n\t\titr = iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\t(itr.next()).nextGeneration();\n\t\t}\n\t\tupdateGraph();\n\t}", "static void normalize(double[] state) {\r\n double norm = 1/Math.sqrt(state[0]*state[0]+state[2]*state[2]+state[4]*state[4]+state[6]*state[6]);\r\n state[0] *= norm;\r\n state[2] *= norm;\r\n state[4] *= norm;\r\n state[6] *= norm;\r\n }", "public void updateState() {\n\n // After each frame, the unit has a slight morale recovery, but only up to the full base morale.\n morale = Math.min(morale + GameplayConstants.MORALE_RECOVERY, GameplayConstants.BASE_MORALE);\n\n if (morale < GameplayConstants.PANIC_MORALE) {\n state = UnitState.ROUTING;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.ROUTING);\n }\n } else if (state == UnitState.ROUTING && morale > GameplayConstants.RECOVER_MORALE) {\n this.repositionTo(averageX, averageY, goalAngle);\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.MOVING);\n }\n }\n\n // Update the state of each single and the average position\n double sumX = 0;\n double sumY = 0;\n double sumZ = 0;\n int count = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.updateState();\n sumX += single.getX();\n sumY += single.getY();\n sumZ += single.getZ();\n count += 1;\n }\n averageX = sumX / count;\n averageY = sumY / count;\n averageZ = sumZ / count;\n\n // Updating soundSink\n soundSink.setX(averageX);\n soundSink.setY(averageY);\n soundSink.setZ(averageZ);\n\n // Update the bounding box.\n updateBoundingBox();\n\n // Update stamina\n updateStamina();\n }", "private static void mating() {\n\t\tint getRand = 0;\n\t\tint parentA = 0;\n\t\tint parentB = 0;\n\t\tint newIndex1 = 0;\n\t\tint newIndex2 = 0;\n\t\tChromosome newChromo1 = null;\n\t\tChromosome newChromo2 = null;\n\n\t\tfor (int i = 0; i < OFFSPRING_PER_GENERATION; i++) {\n\t\t\tparentA = chooseParent();\n\t\t\t// Test probability of mating.\n\t\t\tgetRand = getRandomNumber(0, 100);\n\t\t\tif (getRand <= MATING_PROBABILITY * 100) {\n\t\t\t\tparentB = chooseParent(parentA);\n\t\t\t\tnewChromo1 = new Chromosome();\n\t\t\t\tnewChromo2 = new Chromosome();\n\t\t\t\tpopulation.add(newChromo1);\n\t\t\t\tnewIndex1 = population.indexOf(newChromo1);\n\t\t\t\tpopulation.add(newChromo2);\n\t\t\t\tnewIndex2 = population.indexOf(newChromo2);\n\n\t\t\t\t// Choose either, or both of these:\n\t\t\t\tpartiallyMappedCrossover(parentA, parentB, newIndex1, newIndex2);\n\t\t\t\t// positionBasedCrossover(parentA, parentB, newIndex1, newIndex2);\n\n\t\t\t\tif (childCount - 1 == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex1, 1);\n\t\t\t\t} else if (childCount == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex2, 1);\n\t\t\t\t}\n\n\t\t\t\tpopulation.get(newIndex1).computeConflicts();\n\t\t\t\tpopulation.get(newIndex2).computeConflicts();\n\n\t\t\t\tchildCount += 2;\n\n\t\t\t\t// Schedule next mutation.\n\t\t\t\tif (childCount % (int) Math.round(1.0 / MUTATION_RATE) == 0) {\n\t\t\t\t\tnextMutation = childCount + getRandomNumber(0, (int) Math.round(1.0 / MUTATION_RATE));\n\t\t\t\t}\n\t\t\t}\n\t\t} // i\n\t\treturn;\n\t}", "@Override\n\tpublic void backProp() {\n\t\tdouble dOut = 0;\n\t\tfor (Node n : outputs) {\n\t\t\tdOut += n.dInputs.get(this);\n\t\t}\n\t\tdouble dTotal = activationFunction.derivative(total)*dOut;\n\t\tfor (Node n : inputs) {\n\t\t\tdInputs.put(n, dTotal * weights.get(n).getWeight());\n\t\t\tweights.get(n).adjustWeight(dTotal * n.output);\n\t\t}\n\t\tbiasWeight.adjustWeight(bias * dTotal);\n\t}", "void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }", "void updateBeliefStateActionTrans( BeliefStateDimension prev_belief,\n BelievabilityAction action,\n BeliefStateDimension next_belief )\n throws BelievabilityException\n {\n if (( prev_belief == null )\n || ( action == null )\n || ( next_belief == null ))\n throw new BelievabilityException\n ( \"updateBeliefStateActionTrans()\",\n \"NULL parameter(s) sent in.\" );\n\n // If the action does not pertain to this state dimension\n // (shouldn't happen), then we assume the state remains\n // unchanged (identiy matrix). Note that we copy the\n // probability values from prev_belief to next_belief, even\n // though the next_belief likely starts out as a clone of the\n // prev_belief. We do this because we were afraid of assuming\n // it starts out as a clone, as this would make this more\n // tightly coupled with the specific implmentation that calls\n // this method. Only if this becomes a performance problem\n // should this be revisited.\n // \n\n double[] prev_belief_prob = prev_belief.getProbabilityArray();\n double[] next_belief_prob = new double[prev_belief_prob.length];\n\n // The action transition matrix will model how the asset state\n // change will happen when the action is taken..\n //\n double[][] action_trans\n = _asset_dim_model.getActionTransitionMatrix( action );\n\n if ( _logger.isDetailEnabled() )\n _logger.detail( \"Action transition matrix: \" \n + _asset_dim_model.getStateDimensionName() + \"\\n\" \n + ProbabilityUtils.arrayToString( action_trans ));\n\n // We check this, but it really should never be null.\n //\n if ( action_trans == null )\n throw new BelievabilityException\n ( \"updateBeliefStateActionTrans()\",\n \"Could not find action transition matrix for: \"\n + prev_belief.getAssetID().getName() );\n \n // Start the probability calculation\n //\n for ( int cur_state = 0; \n cur_state < prev_belief_prob.length; \n cur_state++ ) \n {\n \n for ( int next_state = 0; \n next_state < prev_belief_prob.length; \n next_state++ ) \n {\n next_belief_prob[next_state] \n += prev_belief_prob[cur_state] \n * action_trans[cur_state][next_state];\n \n } // for next_state\n } // for cur_state\n\n // We do this before the sanity check, but maybe this isn't\n // the right thing to do. For now, it allows me to more easily\n // convert it to a string in the case where there is a\n // problem. \n //\n next_belief.setProbabilityArray( next_belief_prob );\n\n // Add a sanity check to prevent bogus belief from being\n // propogated to other computations. \n //\n double sum = 0.0;\n for ( int i = 0; i < next_belief_prob.length; i++ )\n sum += next_belief_prob[i];\n\n if( ! Precision.isZeroComputation( 1.0 - sum ))\n throw new BelievabilityException\n ( \"updateBeliefStateActionTrans()\",\n \"Resulting belief doesn't sum to 1.0 : \"\n + next_belief.toString() );\n\n }", "private void doAlts() {\n\t\tdouble rpri1 = ( -this.c + Math.sqrt(Constants.square(this.c) - 4d * (1d - this.c) * (- Constants.square(Math.sin(this.launchBurnAng))))) / (2d * (1d - this.c));\n\t\tdouble rpri2 = ( -this.c - Math.sqrt(Constants.square(this.c) - 4d * (1d - this.c) * (- Constants.square(Math.sin(this.launchBurnAng))))) / (2d * (1d - this.c));\n\t\tif (rpri1 > rpri2) {\n\t\t\tthis.launchPerAlt = rpri2 * this.launchBurnAlt;\n\t\t\tthis.launchApoAlt = rpri1 * this.launchBurnAlt;\n\t\t} else {\n\t\t\tthis.launchPerAlt = rpri1 * this.launchBurnAlt;\n\t\t\tthis.launchApoAlt = rpri2 * this.launchBurnAlt;\n\t\t}\n\t}", "public final double transProb(S from, S to) {\r\n\t\treturn trans[indexOf(states, from)][indexOf(states, to)];\r\n\t}", "public void update() {\n Iterator<Particle> iter = particles.iterator();\n\n while (iter.hasNext()) {\n Particle p = iter.next();\n if (p.isDead()) {\n iter.remove();\n } else {\n p.update();\n }\n }\n }", "private void iterateUpdate()\n\t{\n\t\tSystem.out.println(\"ITERATE\");\n\t\t\t\n\t\tfor (Organism org : simState.getOrganisms()) \n\t\t{\n\t\t\torganismViewData.resetOrganismView(org);\n\t\t}\n\t\t\n\t\tIterationResult result = simEngine.iterate();\n\t\t\n\t\t// Process born and dead organisms\n\t\taddBornModels(result.getBorn());\n\t\tremoveDeadModels(result.getLastDead());\n\t\t\n\t\trotateAnimals();\t\t\n\t}", "public void normalize(double normalizingFactor) {\n //System.out.println(\"norm: \" + normalizingFactor);\n for (T value : getFirstDimension()) {\n for (T secondValue : getMatches(value)) {\n double d = get(value, secondValue) / normalizingFactor;\n set(value, secondValue, d);\n }\n }\n }", "public void updateParticles() {\n\n // Update walkingAnimation particle effect\n walkingParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(walkingParticleEffect.isComplete()) {\n walkingParticleEffect.reset();\n }\n\n // Update getting hit particle effect\n if(damaged) {\n gettingHitParticleEffect.update(Gdx.graphics.getDeltaTime());\n if(gettingHitParticleEffect.isComplete() && !dead) {\n damaged = false;\n gettingHitParticleEffect.reset();\n }\n }\n }" ]
[ "0.6576628", "0.6380134", "0.63606834", "0.6315548", "0.6163673", "0.61413115", "0.61239654", "0.59332484", "0.5853657", "0.5820388", "0.5792541", "0.5658616", "0.5644005", "0.556832", "0.55664456", "0.55301774", "0.54954517", "0.5466157", "0.54329103", "0.53862655", "0.5381365", "0.53570396", "0.5315936", "0.5311531", "0.5271892", "0.5265545", "0.52648616", "0.5263598", "0.52595216", "0.5257774", "0.5253654", "0.52499384", "0.5217318", "0.5210366", "0.51946795", "0.5178753", "0.51420486", "0.5135698", "0.51040286", "0.5098984", "0.5083211", "0.5081599", "0.50729734", "0.5072086", "0.5062684", "0.5057836", "0.5053656", "0.50468946", "0.5028619", "0.50231946", "0.50116086", "0.50075996", "0.500218", "0.49848998", "0.49809897", "0.49704275", "0.49694157", "0.49574974", "0.49436462", "0.49395087", "0.49297777", "0.49222964", "0.4921859", "0.49173874", "0.49154255", "0.48954478", "0.48875904", "0.48819336", "0.48813462", "0.48811927", "0.4868861", "0.4860396", "0.48568866", "0.4853172", "0.48528334", "0.48508996", "0.48495102", "0.48449108", "0.4843099", "0.48304498", "0.4824927", "0.48195255", "0.48099086", "0.47968522", "0.4792726", "0.4790759", "0.4790755", "0.4774853", "0.47737572", "0.47717556", "0.47630027", "0.47616872", "0.47553882", "0.4754603", "0.4753852", "0.4753063", "0.47379392", "0.47348115", "0.47311676", "0.47308877", "0.47303003" ]
0.0
-1
This method uses the Viterbi algorithm to predict the most likely parts of speech for the inputed sentence. It returns an ArrayList of Strings that each word's corresponding part of speech.
public ArrayList<String> predict(String sentence){ //Splits the String and creates the necessary maps String words[] = sentence.split(" "); System.out.println("SENTENCE " + sentence + " LENGTH " + words.length); TreeMap<String, Float> prevscores = new TreeMap<String, Float>(); ArrayList<TreeMap<String, String>> backtrack = new ArrayList<TreeMap<String, String>>(); Float zero = new Float(0); prevscores.put("start", zero); //Looping over every word in the String for (int i = 0; i < words.length; i++){ TreeMap<String, Float> scores = new TreeMap<String, Float>(); Set<String> keys = prevscores.keySet(); backtrack.add(new TreeMap<String, String>()); //Looping over all the previous states for(String state : keys){ Set<String> tagKeys = this.transMap.get(state).keySet(); //Looping over all the possible states for(String tagKey : tagKeys){ float nextscore = (prevscores.get(state) + this.transMap.get(state).get(tagKey)); if(this.emissionMap.containsKey(tagKey) && this.emissionMap.get(tagKey).containsKey(words[i])){ nextscore += this.emissionMap.get(tagKey).get(words[i]); } else nextscore += -200; if(!scores.containsKey(tagKey) || nextscore > scores.get(tagKey)){ scores.put(tagKey, nextscore); backtrack.get(i).put(tagKey, state); } } } prevscores = scores; } String finalState = ""; Set<String> prevKeys = prevscores.keySet(); float max = -100000; for(String key : prevKeys){ float num = prevscores.get(key); if(num > max) { max = num; finalState = key; } } String[] end_states = new String[sentence.split(" ").length]; end_states[backtrack.size() - 1] = finalState; String state = finalState; for(int i = backtrack.size() - 1; i>=1; i-- ) { state = backtrack.get(i).get(state); end_states[i - 1] = state; } ArrayList<String> sequence = new ArrayList<String>(); for(int i = 0; i < end_states.length; i++) { sequence.add(end_states[i]); } return sequence; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> predict(List<String> sentences) {\n List<String> predictions = new ArrayList<>();\r\n for (String sentence : sentences) {\r\n predictions.add(predict(sentence));\r\n }\r\n return predictions;\r\n }", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "public List<String> predict(String term) {\n\t\tList<String> results = new ArrayList<String>();\n\t\tif (term == null) {\n\t\t\treturn results;\n\t\t}\n\t\tString formattedTerm = term.strip().toLowerCase();\n\t\tif (formattedTerm.length() < this.minimumNumberOfCharacters) {\n\t\t\treturn results;\n\t\t}\n\t\t\n\t\tQueue<Character> characters = this.toCharacterQueue(formattedTerm);\n\t\tNode lastCharacterNode = this.getLastCharacterNode(this.root, characters);\n\t\tif (lastCharacterNode != null) {\n\t\t\tList<String> fragments = this.getChildrenFragments(lastCharacterNode);\n\t\t\tfor (String fragment : fragments) {\n\t\t\t\tresults.add(formattedTerm.substring(0, formattedTerm.length() - 1) + fragment);\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "@Override\n protected List<Term> segSentence(char[] sentence)\n {\n WordNet wordNetAll = new WordNet(sentence);\n ////////////////生成词网////////////////////\n generateWordNet(wordNetAll);\n ///////////////生成词图////////////////////\n// System.out.println(\"构图:\" + (System.currentTimeMillis() - start));\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"粗分词网:\\n%s\\n\", wordNetAll);\n }\n// start = System.currentTimeMillis();\n List<Vertex> vertexList = viterbi(wordNetAll);\n// System.out.println(\"最短路:\" + (System.currentTimeMillis() - start));\n\n if (config.useCustomDictionary)\n {\n if (config.indexMode > 0)\n combineByCustomDictionary(vertexList, this.dat, wordNetAll);\n else combineByCustomDictionary(vertexList, this.dat);\n }\n\n if (HanLP.Config.DEBUG)\n {\n System.out.println(\"粗分结果\" + convert(vertexList, false));\n }\n\n // 数字识别\n if (config.numberQuantifierRecognize)\n {\n mergeNumberQuantifier(vertexList, wordNetAll, config);\n }\n\n // 实体命名识别\n if (config.ner)\n {\n WordNet wordNetOptimum = new WordNet(sentence, vertexList);\n int preSize = wordNetOptimum.size();\n if (config.nameRecognize)\n {\n PersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.translatedNameRecognize)\n {\n TranslatedPersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.japaneseNameRecognize)\n {\n JapanesePersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.placeRecognize)\n {\n PlaceRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.organizationRecognize)\n {\n // 层叠隐马模型——生成输出作为下一级隐马输入\n wordNetOptimum.clean();\n vertexList = viterbi(wordNetOptimum);\n wordNetOptimum.clear();\n wordNetOptimum.addAll(vertexList);\n preSize = wordNetOptimum.size();\n OrganizationRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (wordNetOptimum.size() != preSize)\n {\n vertexList = viterbi(wordNetOptimum);\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"细分词网:\\n%s\\n\", wordNetOptimum);\n }\n }\n }\n\n // 如果是索引模式则全切分\n if (config.indexMode > 0)\n {\n return decorateResultForIndexMode(vertexList, wordNetAll);\n }\n\n // 是否标注词性\n if (config.speechTagging)\n {\n speechTagging(vertexList);\n }\n\n return convert(vertexList, config.offset);\n }", "public List<String> generateSentence() {\n\tList<String> sentence = new ArrayList<String>();\n\tString oldWord = START;\n\tString word = generateWord(START,oldWord).intern();\n\twhile (!word.equals(STOP)) {\n\t sentence.add(word);\n\t String temp = generateWord(oldWord,word).intern();\n\t oldWord = word;\n\t word = temp;\n\t}\n\treturn sentence;\n }", "public List<String> GetSentenceFocusWords() {\r\n\t\tList<String> indxList = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < m_questPos.size(); i++) {\r\n\t\t\tif(m_questPos.get(i).contains(\"NN\")){\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\t\r\n\t\t\telse if(m_questPos.get(i).contains(\"JJ\")){\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\r\n\t\t\telse if(m_questPos.get(i).contains(\"VB\")) {\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//System.out.println(m_questPos.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn indxList;\r\n\t}", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }", "public String[] ProcessLine(int phraseId, int\tsentenceId, String[] parts,int\tsentimentS){\n int sentiment=sentimentS;\n //phraseStat=new StringStat(phraseS);\n\n\n\n //Count words (uni-grams)\n HashMap<String,Integer> wordcounts=new HashMap<String,Integer>();\n for (int i = 0; i < parts.length; i++) {\n Integer count=wordcounts.get(parts[i]);\n if(count==null){\n wordcounts.put(parts[i],1);\n }\n else{\n count++;\n wordcounts.put(parts[i],count);\n }\n }\n\n /* //Count words (bi-grams)\n for (int i = 0; i < parts.length-1; i++) {\n String bigram=parts[i]+\" \"+parts[i+1];\n Integer count=wordcounts.get(bigram);\n if(count==null){\n wordcounts.put(bigram,1);\n }\n else{\n count++;\n wordcounts.put(bigram,count);\n }\n }*/\n\n //Calculate the frequency for each word\n HashMap<String,Double> wordfequncies=new HashMap<String,Double>();\n Double maxFrequncy=0.0;\n Iterator<String> itr=wordcounts.keySet().iterator();\n while(itr.hasNext()){\n String word=itr.next();\n Double fr=((double)(wordcounts.get(word))/(double)parts.length);\n maxFrequncy=Math.max(maxFrequncy,fr);\n wordfequncies.put(word,fr);\n }\n\n //Add to the word frequency\n itr=wordfequncies.keySet().iterator();\n while(itr.hasNext()) {\n String word = itr.next();\n WordStat ws=wordStats.get(word);\n if(ws==null){\n ws=new WordStat(word);\n }\n else{\n wordStats.remove(word);\n }\n ws.updateStat(sentiment,(0.5*wordfequncies.get(word))/maxFrequncy);\n wordStats.put(word,ws);\n }\n return parts;\n\n }", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public List<String> getCandidates(LinkedList<Token> pSentence);", "public static String[] rechercheBigrammePlusFrequent(String text) {\n\t\tint n = text.length();\n\t\tArrayList<String> bigrammes = new ArrayList<String>();\n\t\tString[] bigrammesPlusFrequentsCorrespond = new String[5]; // resultat\n\t\tArrayList<String> bigrammesChiffréPlusFrequents = new ArrayList<String>();\n\t\tArrayList<Integer> nbrBigrammesPlusFrequents = new ArrayList<Integer>();\n\n\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\tString bigramme = text.substring(i, i + 2);\n\t\t\tbigrammes.add(bigramme);\n\t\t}\n\t\tfor (int j = 0; j < bigrammes.size(); j++) {\n\t\t\tint inter = 1;\n\t\t\tString bi = bigrammes.get(j);\n\t\t\tif ((!bigrammesChiffréPlusFrequents.contains(bi))) {\n\t\t\t\tfor (int k = j + 1; k < bigrammes.size(); k++) {\n\t\t\t\t\tif (bi.equals(bigrammes.get(k))) {\n\t\t\t\t\t\tinter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbigrammesChiffréPlusFrequents.add(bi);\n\t\t\t\tnbrBigrammesPlusFrequents.add(inter);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tint max = 1, id = 0;\n\t\t\tfor (int j = 0; j < bigrammesChiffréPlusFrequents.size(); j++) {\n\t\t\t\tif (nbrBigrammesPlusFrequents.get(j) >= max) {\n\t\t\t\t\tmax = nbrBigrammesPlusFrequents.get(j);\n\t\t\t\t\tid = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbigrammesPlusFrequentsCorrespond[i] = bigrammesChiffréPlusFrequents\n\t\t\t\t\t.get(id);\n\t\t\tnbrBigrammesPlusFrequents.set(id, 0);\n\t\t}\n\t\t// System.out.println(\"liste des bigrammes les plus fréquents\");\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t// System.out.println(bigrammesPlusFrequentsCorrespond[i]);\n\t\t}\n\t\treturn bigrammesPlusFrequentsCorrespond;\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 }", "public List<String> getAllSentences(String input) {\n List<String> output = new ArrayList();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "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}", "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}", "public void trainModel(String input) {\n\n String[] words = input.split(\" \");\n String currentWord = \"\";\n\n for (int i = 0; i < words.length; i++) {\n\n if (i == 0 || words[i-1].contains(\".\")) {\n model.get(\"_begin\").add(words[i]);\n } else if (i == words.length - 1 || words[i].contains(\".\")) {\n model.get(\"_end\").add(words[i]);\n } else {\n model.putIfAbsent(currentWord, new ArrayList<String>());\n model.get(currentWord).add(words[i]);\n }\n\n currentWord = words[i];\n\n }\n }", "public String spinWords(String sentence) {\n List<String> wordList = new ArrayList<>();\n String word = \"\";\n for (String s : sentence.split(\" \")) {\n word = s.length() > 4 ? new StringBuilder(s).reverse().toString() : s;\n wordList.add(word);\n }\n return String.join(\" \", wordList);\n }", "public ArrayList<Sentence> sentenceDetector(BreakIterator bi,\r\n\t\t\tString text) {\r\n\t\tArrayList<Sentence> sentences = new ArrayList<Sentence>();\r\n\t\tbi.setText(text);\r\n\r\n\t\tint lastIndex = bi.first();\r\n\t\twhile (lastIndex != BreakIterator.DONE) {\r\n\t\t\tint firstIndex = lastIndex;\r\n\t\t\tlastIndex = bi.next();\r\n\r\n\t\t\tif (lastIndex != BreakIterator.DONE) {\r\n\t\t\t\tSentence s = new Sentence(text.substring(firstIndex, lastIndex));\r\n\t\t\t\ts.tokenizeSentence();\r\n\t\t\t\tsentences.add(s);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sentences;\r\n\t}", "private List<String> getSentences(String paragraph) {\n BreakIterator breakIterator = BreakIterator.getSentenceInstance(Locale.US);\n breakIterator.setText(paragraph);\n List<String> sentences = new ArrayList<>();\n int start = breakIterator.first();\n for (int end = breakIterator.next(); end != breakIterator.DONE; start = end, end = breakIterator.next()) {\n sentences.add(paragraph.substring(start, end));\n }\n return sentences;\n }", "public static List<String> devideSentenceIntoWords(String sentence) {\n\n String[] wordArray = sentence.toLowerCase().split(\" \");\n return Arrays.stream(wordArray)\n .map(String::trim)\n .filter(w -> !w.replace(CharacterUtils.WORD_DEVIDER, \"\").trim().isEmpty())\n .collect(Collectors.toList());\n }", "public Map<String, String> partsOfSpeech(String input) {\n Map<String, String> output = new HashMap();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n document.get(CoreAnnotations.TokensAnnotation.class).stream().forEach((token) -> {\n // this is the text of the token\n String word = token.get(CoreAnnotations.TextAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n output.put(word, pos);\n });\n\n return output;\n }", "public static BigramModel calTransitionProb(BigramModel transitionProb, FilePath pathStr,\n\t\t\tArrayList<ArrayList<String>> tokenList, ArrayList<String> words) throws IOException {\n\t\tFile file = new File(pathStr.getPathStr() + \"train.txt\");\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), \"euc-kr\"));\n\t\tString train = null;\n\t\tArrayList<String> tokens = null;\n\t\ttokenList = new ArrayList<ArrayList<String>>();\n\t\ttransitionProb = new BigramModel();\n\n\t\twhile ((train = br.readLine()) != null) {\n\t\t\tString lastSignal = \"\";\n\t\t\tif (!train.equals(\"\")) {\n\t\t\t\ttrain = train.split(\"\t\")[1];\n\t\t\t\tint lastIndex = 0;\n\n\t\t\t\tif (train.contains(\"+\")) {\n\t\t\t\t\tif (train.contains(\"++\")) {\n\t\t\t\t\t\ttrain = train.replace(\"++\", \"+더하기기호\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"//\")) {\n\t\t\t\t\t\ttrain = train.replace(\"//\", \"슬래쉬기호/\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"+/SW\")) {\n\t\t\t\t\t\ttrain = train.replace(\"+/SW\", \"더하기기호/SW\");\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < train.split(\"\\\\+\").length; i++) {\n\t\t\t\t\t\tString trainModified = train.split(\"\\\\+\")[i];\n\t\t\t\t\t\tlastIndex = trainModified.lastIndexOf(\"/\");\n\t\t\t\t\t\ttokens.add(trainModified.substring(lastIndex + 1));\n\t\t\t\t\t\tif (trainModified.contains(\"더하기기호\")) {\n\t\t\t\t\t\t\ttrainModified = trainModified.replace(\"더하기기호\", \"+\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (trainModified.contains(\"슬래쉬기호\")) {\n\t\t\t\t\t\t\ttrainModified = trainModified.replace(\"슬래쉬기호\", \"/\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\twords.add(trainModified);\n\t\t\t\t\t}\n\t\t\t\t\tlastSignal = \"/\" + train.split(\"\\\\+\")[train.split(\"\\\\+\").length - 1].substring(lastIndex + 1);\n\t\t\t\t} else {\n\t\t\t\t\tif (train.contains(\"++\")) {\n\t\t\t\t\t\ttrain = train.replace(\"++\", \"+더하기기호\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"//\")) {\n\t\t\t\t\t\ttrain = train.replace(\"//\", \"슬래쉬기호/\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"+/SW\")) {\n\t\t\t\t\t\ttrain = train.replace(\"+/SW\", \"더하기기호/SW\");\n\t\t\t\t\t}\n\t\t\t\t\tlastIndex = train.lastIndexOf(\"/\");\n\t\t\t\t\tlastSignal = \"/\" + train.substring(lastIndex + 1);\n\t\t\t\t\ttokens.add(train.substring(lastIndex + 1));\n\t\t\t\t\tif (train.contains(\"+\")) {\n\t\t\t\t\t\ttrain = train.replace(\"더하기기호\", \"+\");\n\t\t\t\t\t}\n\t\t\t\t\tif (train.contains(\"/\")) {\n\t\t\t\t\t\ttrain = train.replace(\"슬래쉬기호\", \"/\");\n\t\t\t\t\t}\n\t\t\t\t\twords.add(train);\n\t\t\t\t}\n\t\t\t\tif (lastSignal.equals(\"/SF\")) {\n\t\t\t\t\ttokenList.add(tokens);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttokens = new ArrayList<String>();\n\t\t\t}\n\n\t\t}\n\t\ttransitionProb.train(tokenList);\n\t\treturn transitionProb;\n\n\t}", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "public static String preprocessStemAndTokenizeAddBigramsInString(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(transformedSet.toArray(new String[transformedSet.size()]).toString());\n\t\treturn StringUtils.join( transformedSet.toArray(new String[transformedSet.size()]), \" \");\n\t\t\n\t}", "private void verbos(String texto, ArrayList<String> listaVerbos){\n\t Document doc = new Document(texto);\n\t for (Sentence sent : doc.sentences()) { \n//\t \tSystem.out.println(\"sent.length() \"+sent.length());\n\t for(int i=0; i < sent.length(); i++) {\n\t \t//adicionando o verbo a lista dos identificados\n\t\t \tString temp = sent.posTag(i);\n\t\t if(temp.compareTo(\"VB\") == 0) {\n//\t\t \tSystem.out.println(\"O verbo eh \" + sent.word(i));\n\t\t\t listaVerbos.add(sent.word(i));\n\t\t }\n\t\t else {\n//\t\t \tSystem.out.println(\"Não verbo \" + sent.word(i));\n\t\t }\n\t }\n\t }\n \tSystem.out.println(\"Os verbos sao:\");\n \tSystem.out.println(listaVerbos);\n\n\t}", "public List<WordAnalysis> bestParse(String sentence) {\n SentenceAnalysis parse = analyze(sentence);\n disambiguate(parse);\n List<WordAnalysis> bestParse = Lists.newArrayListWithCapacity(parse.size());\n for (SentenceAnalysis.Entry entry : parse) {\n bestParse.add(entry.parses.get(0));\n }\n return bestParse;\n }", "public KeyWordList extractKeyWords(String input);", "@Override\n public List<Prediction> predictWord(final String string) {\n Trace.beginSection(\"predictWord\");\n\n Trace.beginSection(\"preprocessText\");\n Log.e(TAG, \"inut_string: \" + string);\n //TODO\n\n String[] input_words = string.split(\" \");\n data_len[0] = input_words.length;\n Log.e(TAG, \"data_len: \" + data_len[0]);\n //intValues = new int[input_words.length];\n if (input_words.length < input_max_Size) {\n for (int i = 0; i < input_words.length; ++i) {\n Log.e(TAG, \"input_word: \" + input_words[i]);\n if (word_to_id.containsKey(input_words[i])) intValues[i] = word_to_id.get(input_words[i]);\n else intValues[i] = 6; //rare words, <unk> in the vocab\n Log.e(TAG, \"input_id: \" + intValues[i]);\n }\n for (int i = input_words.length; i < input_max_Size; ++i) {\n intValues[i] = 0; //padding using <eos>\n Log.e(TAG, \"input_id: \" + intValues[i]);\n }\n }\n else {\n Log.e(TAG, \"input out of max Size allowed!\");\n return null;\n }\n Trace.endSection();\n // Copy the input data into TensorFlow.\n Trace.beginSection(\"fillNodeFloat\");\n // TODO\n inferenceInterface.fillNodeInt(inputName, new int[] {1, input_max_Size}, intValues);\n Log.e(TAG, \"fillNodeInt success!\");\n inferenceInterface.fillNodeInt(inputName2, new int[] {1}, data_len);\n Log.e(TAG, \"fillDATA_LEN success!\");\n Trace.endSection();\n\n // Run the inference call.\n Trace.beginSection(\"runInference\");\n inferenceInterface.runInference(outputNames);\n Log.e(TAG, \"runInference success!\");\n Trace.endSection();\n\n // Copy the output Tensor back into the output array.\n Trace.beginSection(\"readNodeFloat\");\n inferenceInterface.readNodeFloat(outputName, outputs);\n Log.e(TAG, \"readNodeFloat success!\");\n Trace.endSection();\n\n // Find the best predictions.\n PriorityQueue<Prediction> pq = new PriorityQueue<Prediction>(3,\n new Comparator<Prediction>() {\n @Override\n public int compare(Prediction lhs, Prediction rhs) {\n // Intentionally reversed to put high confidence at the head of the queue.\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }\n });\n for (int i = 0; i < outputs.length; ++i) { //don't show i = 0 <unk>; i = 1<eos>\n if (outputs[i] > THRESHOLD) {\n pq.add(new Prediction(\"\" + i, id_to_word.get(i), outputs[i]));\n }\n }\n final ArrayList<Prediction> predictions = new ArrayList<Prediction>();\n for (int i = 0; i < Math.min(pq.size(), MAX_RESULTS); ++i) {\n predictions.add(pq.poll());\n }\n for (int i = 0; i < predictions.size(); ++i) {\n Log.e(TAG, predictions.get(i).toString());\n }\n Trace.endSection(); // \"predict word\"\n return predictions;\n }", "public static ArrayList<String> getSentence(BasicDBObject dbObject) {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor (Object temp : (BasicDBList) dbObject.get(\"tokens\")) {\n\t\t\tBasicDBObject token = (BasicDBObject) temp;\n\t\t\tString word = token.getString(\"lemma\");\n\t\t\tlist.add(word);\n\t\t}\n\t\treturn list;\n\n\t}", "public float[] textVector(String s) {\n Vector vec = new Vector(args_.dim);\n IntVector line = new IntVector();\n dict_.getLine(s, line, model_.getRng());\n dict_.addWordNgramHashes(line, args_.wordNgrams);\n if (line.size() == 0) {\n return vec.getData();\n }\n for (int i : line.copyOf()) {\n vec.addRow(model_.wi_, i);\n }\n vec.mul((float) (1.0 / line.size()));\n return vec.getData();\n }", "public String getSentencesWithTerms(String paragraph, Collection<String> terms, boolean lemmatised) {\n String result = \"\";\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = lemmatise(t.toLowerCase().replaceAll(\"\\\\s+\", \" \").trim());\n if (StringUtils.contains(lemmatise(thisSentence.toLowerCase()).replaceAll(\"\\\\s+\", \" \"), label)\n || StringUtils.contains(lemmatise(StringOps.stripAllParentheses(thisSentence.toLowerCase())).replaceAll(\"\\\\s+\", \" \"), label)) { // lookup lemmatised strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (null != result && lemmatised) {\n result = lemmatise(result);\n }\n\n return result;\n }", "public List<String> findPhrases() {\n\t\t\n\t\tTrie root = new Trie();\n\t\tList<String> result = new ArrayList<>();\n\t\tQueue<TrieNode> queue = new LinkedList<>();\n\n\t\tfor (String phrase : phrases) {\n\t\t\t// build the trie\n\t\t\t\n\t\t\troot.insert(phrase);\n\t\t}\n\t\t\n\t\t// initialize the queue\n\t\tqueue.offer(root.getRootNode());\n\t\t\t\t\n\t\tfor (String word : stream) {\n\t\t\t\n\t\t\t// Search one word at a time and store TrieNodes that match this word.\n\t\t\t// If the current word extends a previous TrieNode, it may be a matching phrase\n\t\t\t\n\t\t\t// buffer to store current matches\n\t\t\tQueue<TrieNode> buffer = new LinkedList<>();\n\t\t\t\n\t\t\twhile(!queue.isEmpty()) {\n\t\t\t\t// iterate through previous matches\n\t\t\t\t\n\t\t\t\tTrieNode next = queue.poll().find(word);\n\t\t\t\t\n\t\t\t\tif (next != null) {\n\t\t\t\t\t\n\t\t\t\t\t// if this word extends the previous word, add it to the buffer\n\t\t\t\t\t// in case the next word can also extend it\n\t\t\t\t\t\n\t\t\t\t\tbuffer.offer(next);\n\t\t\t\t\t\n\t\t\t\t\tif (next.isPhrase()) {\n\t\t\t\t\t\t// if we found a valid phrase node, add it to the result\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult.add(next.getPhrase());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tqueue = buffer;\n\t\t\tqueue.offer(root.getRootNode());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static List<String> sentenceToList(String sentence){\n\t\treturn Arrays.asList(sentence.split(\"\\\\s+\"));\n\t}", "@Override\n\tpublic void setTraining(String text) {\n\t\tmyWords = text.split(\"\\\\s+\");\n\t\tmyMap = new HashMap<String , ArrayList<String>>();\n\t\t\n\t\tfor (int i = 0; i <= myWords.length-myOrder; i++)\n\t\t{\n\t\t\tWordGram key = new WordGram(myWords, i, myOrder);\n\t\t\tif (!myMap.containsKey(key))\n\t\t\t{\n\t\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\tlist.add(myWords[i+myOrder]);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t} else {\n\t\t\t\t\tlist.add(PSEUDO_EOS);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(myWords[i+myOrder]);\n\t\t\t\t} else {\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(PSEUDO_EOS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static ArrayList<String> tag(ArrayList<String> rawWords){\n\t\tArrayList<String> outSentence = new ArrayList<String>();\n\t\t//String[][] chart = new String[rawWords.size()][rawWords.size()];\n\t\tfor(int i = 0; i<rawWords.size(); i++){\n\t\t\tString[] entry = rawWords.get(i).split(\"\\\\s+\");\n\t\t\tString word = entry[0];\n\t\t\tString pos = entry[1];\n\t\t\tSystem.out.println(word);\n\t\t\tif((pos.equals(\"NNP\")||word.equals(\"tomorrow\"))&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"due\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j = i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNP\")||next.equals(\"NNS\")||next.equals(\"NNPS\")||next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse if (pos.equals(\"CD\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tif((rawWords.get(j).split(\"\\\\s\")[1].equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(\"CD\")&&rawWords.get(j+1).split(\"\\\\s\")[1].equals(\"CD\"))||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NN\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNP\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNPS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"%\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s\")[0].equals(\"to\")&&rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"up\")){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"#\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"PRP$\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJ\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJR\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"$\")){\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"POS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"DT\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"approximately\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"around\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"almost\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"about\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[0].equals(\"as\")&&(rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"many\")||rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"much\"))&&rawWords.get(j-2).split(\"\\\\s\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning-=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if((rawWords.get(j).split(\"\\\\s\")[1].equals(\"RBR\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t\t}\n\t\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\t}\n\t\t\t\t\ti=ending;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else if(pos.equals(\"CD\")&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"$\")&&rawWords.get(i-2).split(\"\\\\s+\")[1].equals(\"IN\")){\n\t\t\t\tint beginning=i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j=i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString prior=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tString priorWord = rawWords.get(j).split(\"\\\\s\")[0];\n\t\t\t\t\tif(prior.equals(\"$\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s+\")[0].equals(\"as\")&&rawWords.get(j-1).split(\"\\\\s+\")[0].equals(\"much\")&&rawWords.get(j-2).split(\"\\\\s+\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning -=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\tj -=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"IN\")){\n\t\t\t\t\t\tbeginning --;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}*/\n\t\t\t//else if(pos.equals(arg0))\n\t\t\telse if(pos.equals(\"PRP\")||pos.equals(\"WP\")||word.equals(\"those\")||pos.equals(\"WDT\")){\n\t\t\t\tint beginning = i;\n\t\t\t\t//int ending = i;\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}\n\t\t\telse if(word.equals(\"anywhere\")&&rawWords.get(i+1).split(\"\\\\s+\")[0].equals(\"else\")){\n\t\t\t\toutSentence.add(\"anywhere\\tB-NP\");\n\t\t\t\toutSentence.add(\"else\\tI-NP\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t/*else if (word.equals(\"same\")&&rawWords.get(i-1).split(\"\\\\s\")[0].equals(\"the\")){\n\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\tString nounGroupLine = \"the\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tnounGroupLine = \"same\\tI-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}*/\n\t\t\telse if(pos.equals(\"NN\")||pos.equals(\"NNS\")||pos.equals(\"NNP\")||pos.equals(\"NNPS\")||pos.equals(\"CD\")/*||pos.equals(\"PRP\")*/||pos.equals(\"EX\")||word.equals(\"counseling\")||word.equals(\"Counseling\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean endFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNS\")||next.equals(\"NNP\")||next.equals(\"NNPS\")||next.equals(\"CD\")||(next.equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(rawWords.get(j+1).split(\"\\\\s\")[1]))){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString[] pArray = rawWords.get(j).split(\"\\\\s+\");\n\t\t\t\t\tString prior = pArray[1];\n\t\t\t\t\tif(j>2 &&prior.equals(rawWords.get(j-2).split(\"\\\\s+\")[1])&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"CC\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\"))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if(prior.equals(\"JJ\")||prior.equals(\"JJR\")||prior.equals(\"JJS\")||prior.equals(\"PRP$\")||prior.equals(\"RBS\")||prior.equals(\"$\")||prior.equals(\"RB\")||prior.equals(\"NNP\")||prior.equals(\"NNPS\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBG\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((prior.equals(\"RBR\")||pArray[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((pArray[0].equals(\"Buying\")||pArray[0].equals(\"buying\"))&&rawWords.get(j+1).split(\"\\\\s+\")[0].equals(\"income\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(pArray[0].equals(\"counseling\")||pArray[0].equals(\"Counseling\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s+\")[1].equals(\"NN\")){\n\t\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (prior.equals(\"DT\")||prior.equals(\"POS\")){\n\t\t\t\t\t\t//j--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tif(!rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\"))\n\t\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString outLine = word+\"\\tO\";\n\t\t\t\toutSentence.add(outLine);\n\t\t\t}\n\t\t}\n\t\toutSentence.remove(0);\n\t\toutSentence.remove(outSentence.size()-1);\n\t\toutSentence.add(\"\");\n\t\treturn outSentence;\n\t}", "public void train(Collection<List<String>> sentences) {\n\tUnigram.train(sentences);\n\tBigram.train(sentences);\n\tTrigram.train(sentences);\n\t\n\tdouble[] newW = {0.0, 0.0, 0.0};\n\tdouble PMax = 0.0;\n\tfor(double i = 0.05; i < 0.95; i+=0.05){\n\t for(double j = 0.05; j < 0.95; j+=0.05){\n\t\tdouble k = 1 - i - j;\n\t\tif(k > 0){\n\t\t Weights[0] = i;\n\t\t Weights[1] = j;\n\t\t Weights[2] = k;\n\t\t double P = 0.0;\n\t\t for(List<String> sentence : sentences){\n\t\t\tP+= getSentenceProbability(sentence);\n\t\t }\n\t\t if(P > PMax){\n\t\t\tSystem.out.println(\"New: \"+i+\",\"+j+\",\"+k+\" = \" + P);\n\t\t\tnewW[0] = i;\n\t\t\tnewW[1] = j;\n\t\t\tnewW[2] = k;\n\t\t\tPMax = P;\n\t\t }\n\t\t}\n\t }\n\t}\n\tSystem.out.println(\"New WIGHTS: \"+newW[0]+\",\"+newW[1]+\",\"+newW[2]);\n\tWeights = newW;\n }", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "Stream<CharSequence> toWords(CharSequence sentence);", "public static String spinWords(String sentence) {\n String[] all = sentence.split(\" \");\n StringBuilder sb = new StringBuilder();\n for (String s : all) {\n if (s.length() < 5) {\n sb.append(s).append(\" \");\n } else {\n sb.append(new StringBuilder(s).reverse().toString()).append(\" \");\n }\n }\n sb.deleteCharAt(sb.length() - 1);\n return sb.toString();\n }", "public Set<String> getSentences(String input) {\n Set<String> output = new HashSet();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "public void makeDecision(String speech , List<WordResult> speechWords) {\r\n\t\tVoiceManager vm =VoiceManager.getInstance();\r\n\t\tVoice voice;\r\n\t\tvoice=vm.getVoice(\"mbrola_us3\");\r\n\t\tvoice.allocate();\r\n\t\tSystem.out.println(speech);\r\n\t\t//System.out.println(speech+\"fdsf\");\r\n\t\t if(speech.equalsIgnoreCase(\"shutdown computer\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\" Shuting down the computer\");\r\n\t\t \tRuntime rm=Runtime.getRuntime();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tProcess proc=rm.exec(\"shutdown -s -t 0\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e)\r\n\t\t\t\t{}\r\n\t\t\t\t\r\n\r\n\t\t \t}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"restart computer\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"restarting the computer\");\r\n\t\t \tRuntime rm=Runtime.getRuntime();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tProcess proc=rm.exec(\"shutdown -r -t 0\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e)\r\n\t\t\t\t{}\r\n\t\t\t\t\r\n\t\t \t}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t }\r\n\t\t \r\n\t\t else if(speech.equalsIgnoreCase(\"who is smart\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"Abhay bhadouriya is smartest person alive in this world\");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"who is ugly\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"your sister and friends are the most ugliest persons in the world \");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"what is time\"))\r\n\t\t {\r\n\t\t \tDate dm=new Date();\r\n\t\t \tint h=dm.getHours();\r\n\t\t \tint m=dm.getMinutes();\r\n\t\t \tif(h>12)\r\n\t\t \t{\r\n\t\t \t\th=h-12;\r\n\t\t \t}\r\n\t\t \t\r\n\t\t \ttry {voice.speak(\"TIME is\"+h+\"Hour\"+m+\"Minutes\" );}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"say hello \"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"Hello this is your computer\");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"please sleep\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"no i don't wont to sleep\");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open facebook\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"facebook\");\r\n\t\t \t FUNC.facebook();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open google\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"google\");\r\n\t\t \t FUNC.google();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open youtube\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"youtube\");\r\n\t\t \t FUNC.youtube();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open gmail\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"gmail\");\r\n\t\t \t FUNC.gmail();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"play music\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"music\");\r\n\t\t \t FUNC.pmusic();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"volume up\"))\r\n\t\t {\r\n\t\t \tvoice.speak(\"volume increasing by 10\");\r\n\t\t \t\tvolume.up();\r\n\t\t \t\t\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"volume down\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t\t voice.speak(\"volume decreasing by 10\");\r\n\t \t\tvolume.down();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"show desktop\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"Showing desktop\");\r\n\t\t\t FUNC.desktop();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"how are you\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"i'm fine and you \");\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"what day is today\"))\r\n\t\t {\r\n\t\t\t Date dd=new Date();\r\n\t\t\t int i=dd.getDay();\r\n\t\t\t\tif(i==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is sunday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==1)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is monday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==2)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is tuesday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==3)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is wednesday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==4)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is thursday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==5)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is friday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==6)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is saturday\");\r\n\t\t\t\t}\r\n\t\t\t \r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to right\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.right();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to left\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.left();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to up\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t emotion.up();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to down\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.down();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"select this item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.select();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"view its property\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.property();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"view item menu\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.viewmenu();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn on mouse by keyboard\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.turnon();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close this window tab\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.close();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"switch window tab\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.switcht();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"ok dude take some rest\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t voice.speak(\"have a nice day\");\r\n\t\t\t voice.speak(\"i'm very lucky to have a master like you sir \");\r\n\t\t\t voice.speak(\"good night my suprier great master\");\r\n\t\t\t System.exit(0);\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn on wifi\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t volume.wifi();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn off wifi\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t volume.wifi();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn on bluetooth\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t try{\r\n\t \t\t Process p ;\t//resultText=\"\";\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c fsquirt\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the notepad\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\t//resultText=\"\";\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start notepad\");\r\n\t \t\t // System.out.println(\"inside\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t } else if(speech.equalsIgnoreCase(\"close the notepad\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\t//resultText=\"\";\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im notepad.exe /f\");\r\n\t \t\t // System.out.println(\"inside\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the command\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t\t\tProcess p;\r\n\t \t\t\t\tp = Runtime.getRuntime().exec(\"cmd /c start cmd\");\t\t\t\t\r\n\t \t\t\t\t}catch(Exception er)\r\n\t \t\t\t\t{}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the command\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\t\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im cmd.exe /f\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the browser\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start chrome.exe\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the browser\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im chrome.exe /f\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the control panel\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c control\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the control panel\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c control taskkill /im control /f\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the paint\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c start mspaint\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the paint\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im mspaint.exe /f\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the task manager\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c start taskmgr.exe\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the task manager\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t \tp = Runtime.getRuntime().exec(\"cmd /c start taskkill /im taskmgr.exe /f\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open power option\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c powercfg.cpl\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open windows security center\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c wscui.cpl\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"copy this item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok item is copied\");\r\n\t\t\t basiccontrolls.copy();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"paste here selected item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"item is pasted\");\r\n\t\t\t basiccontrolls.paste();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"cut this item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok item is cut\");\r\n\t\t\t basiccontrolls.cut();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"go back\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok going to previous page\");\r\n\t\t\t basiccontrolls.back();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"show me my beautiful face\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"you look like a donkey\");\r\n\t\t\t basiccontrolls.camera();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"who the hell are you\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"hello\");\r\n\t\t\t voice.speak(\"i am computer \");\r\n\t\t\t voice.speak(\"here i'm assist by you \");\r\n\t\t\t voice.speak(\"i will do anything what ever you told me todo and \"+\" \"+\" what instruction are feeded in my dictionary\");\r\n\t\t\t voice.speak(\"Thank you for asking \");\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"who loves you\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"no one loves me \");\r\n\t\t\t voice.speak(\"except my charger \");\r\n\t\t\t voice.speak(\"but more impoertantly i looks far handsome than you \");\r\n\t\t\t voice.speak(\"you peace of shit \");\r\n\t\t\t voice.speak(\"your face is look like a monkey\");\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"do you like engineering\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"no\");\r\n\t\t\t voice.speak(\"I hate engineering\");\r\n\t\t\t voice.speak(\"you ruined my life \");\r\n\t\t }\r\n\t\t/* else if(speech.equalsIgnoreCase(\"turn off wifi\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t volume.wifi();\r\n\t\t }*/\r\n\r\n\t}", "public static void Stemmingmethod()throws Exception\n{\n char[] w = new char[501];\n Stemmer s = new Stemmer();\n String prcessedtxt=\"\";\n ArrayList<String> finalsen= new ArrayList();\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"fullyprocessed.txt\"));\n\n String u=null;\n \n {\n FileInputStream in = new FileInputStream(\"stopwordsremoved.txt\");\n\n while(true)\n\n { int ch = in.read();\n if (Character.isLetter((char) ch))\n {\n int j = 0;\n while(true)\n { ch = Character.toLowerCase((char) ch);\n w[j] = (char) ch;\n if (j < 500) j++;\n ch = in.read();\n if (!Character.isLetter((char) ch))\n {\n \n s.add(w, j); \n\n s.stem();\n { \n\n u = s.toString();\n finalsen.add(u);\n /* to test getResultBuffer(), getResultLength() : */\n /* u = new String(s.getResultBuffer(), 0, s.getResultLength()); */\n\n System.out.print(u);\n }\n break;\n }\n }\n }\n if (ch < 0) break;\n System.out.print((char)ch);\n finalsen.add(\"\"+(char)ch);\n\n\n }\n }\n \n \n \n for(String word:finalsen){\n prcessedtxt=prcessedtxt+\"\"+ word;\n }\n writer.write(prcessedtxt+\"\\n\"); \n prcessedtxt=\"\";\n finalsen.clear();\n writer.close();\n\n\n \n}", "public List<String> tag(List<String> text) {\n\n\t\t// Create a data container for a sentence\n\n\t\tString[] s = new String[text.size() + 1];\n\t\ts[0] = \"root\";\n\t\tfor (int j = 0; j < text.size(); j++)\n\t\t\ts[j + 1] = text.get(j);\n\t\ti.init(s);\n\t\t// System.out.println(EuroLangTwokenizer.tokenize(text));\n\n\t\t// lemmatizing\n\n\t\t// System.out.println(\"\\nReading the model of the lemmatizer\");\n\t\t// Tool lemmatizer = new\n\t\t// Lemmatizer(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.lemmatizer.model\");\n\t\t// // create a lemmatizer\n\n\t\t// System.out.println(\"Applying the lemmatizer\");\n\t\t// lemmatizer.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Lemmata: \"); for (String l : i.plemmas)\n\t\t// System.out.print(l+\" \"); System.out.println();\n\n\t\t// morphologic tagging\n\n\t\t// System.out.println(\"\\nReading the model of the morphologic tagger\");\n\t\t// is2.mtag.Tagger morphTagger = new\n\t\t// is2.mtag.Tagger(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.morphtagger.model\");\n\n\t\t// System.out.println(\"\\nApplying the morpholoigc tagger\");\n\t\t// morphTagger.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Morph: \"); for (String f : i.pfeats)\n\t\t// System.out.print(f+\" \"); System.out.println();\n\n\t\t// part-of-speech tagging\n\n\t\t// System.out.println(\"\\nReading the model of the part-of-speech tagger\");\n\n//\t\tSystem.out.println(\"Applying the part-of-speech tagger\");\n\t\ttagger.apply(i);\n\t\tList<String> tags = new ArrayList<String>(i.ppos.length - 1);\n\t\tfor (int j = 1; j < i.ppos.length; j++)\n\t\t\ttags.add(i.ppos[j]);\n\t\treturn tags;\n\t\t// System.out.println(\"Part-of-Speech tags: \");\n\t\t// for (String p : i.ppos)\n\t\t// System.out.print(p + \" \");\n\t\t// System.out.println();\n\n\t\t// parsing\n\n\t\t// System.out.println(\"\\nReading the model of the dependency parser\");\n\t\t// Tool parser = new Parser(\"models/prs-spa.model\");\n\n\t\t// System.out.println(\"\\nApplying the parser\");\n\t\t// parser.apply(i);\n\n\t\t// System.out.println(i.toString());\n\n\t\t// write the result to a file\n\n\t\t// CONLLWriter09 writer = new\n\t\t// is2.io.CONLLWriter09(\"example-out.txt\");\n\n\t\t// writer.write(i, CONLLWriter09.NO_ROOT);\n\t\t// writer.finishWriting();\n\n\t}", "public String generateSentence() {\n // If our map is empty return the empty string\n if (model.size() == 0) {\n return \"\";\n }\n\n ArrayList<String> startWords = model.get(\"_begin\");\n ArrayList<String> endWords = model.get(\"_end\");\n\n // Retrieve a starting word to begin our sentence\n int rand = ThreadLocalRandom.current().nextInt(0, startWords.size());\n\n String currentWord = startWords.get(rand);\n StringBuilder sb = new StringBuilder();\n\n while (!endWords.contains(currentWord)) {\n sb.append(currentWord + \" \");\n ArrayList<String> nextStates = model.get(currentWord);\n\n if (nextStates == null) return sb.toString().trim() + \".\\n\";\n\n rand = ThreadLocalRandom.current().nextInt(0, nextStates.size());\n currentWord = nextStates.get(rand);\n }\n\n sb.append(currentWord);\n\n return sb.toString() + \"\\n\";\n\n\n }", "public ArrayList getAttributeList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n ArrayList adjAtt = new ArrayList();\n int separator = 0;\n List<Tree> leaves;\n String phraseNotation = \"NP([<NNS|NN|NNP]![<JJ|VBG])!$VP\";// !<VBG\";//@\" + phrase + \"! << @\" + phrase;\n\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n int adjectiveExist = 0;\n String adj = \"\";\n String attribute = \"\";\n String b = \"\";\n\n if (innerChild.length > 1) {\n int count = 1;\n\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\") || inChild.value().equals(\",\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).toString();\n if (designEleList.contains(adj)) {\n adj = \"\";\n }\n }\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (count == 1) {\n if (adjectiveExist == 1) {\n attribute = adj + \" \" + leaves.get(0).yieldWords().get(0).word();\n } else {\n attribute = leaves.get(0).yieldWords().get(0).word();\n }\n if (!designEleList.contains(attribute)) {\n String identifiedWord = attribute;\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n\n } else if (count >= 2 && separator == 0) {\n if (!attribute.contains(\"_\")) {\n\n attributeLists.remove(morphology.stem(attribute));\n attributeLists.remove(attribute);\n } else {\n attributeLists.remove(attribute);\n }\n\n attribute += \" \" + (leaves.get(0).yieldWords()).get(0).word();\n attributeLists.add(attribute);\n } else if (count >= 2 && separator == 1) {\n attribute = (leaves.get(0).yieldWords()).get(0).word();\n if (!attribute.contains(\"_\")) {\n attributeLists.add(morphology.stem(attribute));\n } else {\n attributeLists.add(attribute);\n }\n separator = 0;\n }\n count++;\n }\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n }\n }\n }\n adjAtt = getAdjectiveAttribute();\n if (!adjAtt.isEmpty()) {\n String att = \"\";\n for (int i = 0; i < adjAtt.size(); i++) {\n att = adjAtt.get(i).toString();\n if (!att.isEmpty() || !att.equals(\"\") || !(att.equals(\" \"))) {\n attributeLists.add(att.trim());\n }\n }\n }\n\n System.out.println(\"ATTRIBUTE LIST :\" + attributeLists);\n return attributeLists;\n\n }", "SList evenWords();", "public static List<Sentence> parseDesc(String desc){\n\t\ttry{\n\t\t\tif(sentenceDetector == null)\n\t\t\t\tsentenceDetector = new SentenceDetectorME(new SentenceModel(new FileInputStream(\"en-sent.bin\")));\n\t\t\tif(tokenizer == null)\n\t\t\t\ttokenizer = new TokenizerME(new TokenizerModel(new FileInputStream(\"en-token.bin\")));\n\t\t\tif(tagger == null)\n\t\t\t\ttagger = new POSTaggerME(new POSModel(new FileInputStream(\"en-pos-maxent.bin\")));\n\t\t\tif(chunker == null)\n\t\t\t\tchunker = new ChunkerME(new ChunkerModel(new FileInputStream(\"en-chunker.bin\")));\n\t\t} catch(InvalidFormatException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch(FileNotFoundException ex){\n\t\t\tex.printStackTrace();\n\t\t} catch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tList<Sentence> sentenceList = new LinkedList();\n\t\tString[] sentences = sentenceDetector.sentDetect(desc);\t\t\n\t\tfor(String s : sentences) {\n\t\t\tString[] tokens = tokenizer.tokenize(s);\n\t\t\tString[] posTags = tagger.tag(tokens);\n\t\t\tString[] chunks = chunker.chunk(tokens, posTags);\n\t\t\tList<String> ner = new LinkedList();\n\t\t\tList<String> lemma = new ArrayList();\n\t\t\tfor(String str : tokens) {\n\t\t\t\tlemma.add(str.toLowerCase());\n\t\t\t\tner.add(\"O\"); //assume everything is an object\n\t\t\t}\n\t\t\t\n\t\t\tSentence sentence = new Sentence (Arrays.asList(tokens), lemma, Arrays.asList(posTags), Arrays.asList(chunks), ner, s);\n\t\t\tsentenceList.add(sentence);\n\t\t}\n\t\t\n\t\treturn sentenceList;\n\t}", "public List<List<TaggedWord>> getsTaggedSentences(String input) {\n List<List<HasWord>> sentences = MaxentTagger.tokenizeText(new StringReader(input));\n return mxntg.process(sentences);\n }", "public String[] nextHotWords( String hotWord ){\r\n //Created vector to push the variable amount of hotwords before the one in the arguments\r\n Vector<String> output = new Vector<String>();\r\n //The output string array which is returned\r\n String[] out;\r\n //Turns the hotword to lowercase for it to be compatible anc checkable\r\n String chk = hotWord.toLowerCase();\r\n //Iterates through consec\r\n for (int i = 0; i < consec.size()-1; i++) {\r\n //If the hotword is found, the next hotword in the sequence is stored in output\r\n if(consec.get(i).equals(chk)){\r\n output.add(consec.get(i+1));\r\n }\r\n }\r\n //Out is set to the size of the vector of all the next hotwords\r\n out = new String[output.size()];\r\n //Copies items to out\r\n for(int j = 0; j < output.size(); j++){\r\n out[j] = output.get(j);\r\n }\r\n return out;\r\n\t}", "public ArrayList<String> AIwords(){\n return wordsToDisplay;\n }", "public String words(String sentence) {\n String[] stringSentence = sentence.trim().split(\" \");\n for (int i = 0; i < stringSentence.length; i++) {\n if (stringSentence[i].length() >= LENGTH) {\n stringSentence[i] = new StringBuilder(stringSentence[i]).reverse().toString();\n }\n }\n return String.join(\" \", stringSentence);\n }", "public List<String> sentenceSplit(String input)\n {\n return InputNormalizer.sentenceSplit(this.sentenceSplitters, input);\n }", "public List<Word> getTextWords(String text) {\n\n List<Word> words = new ArrayList<Word>();\n\n for (Word word : new SentenceParser().getSentenceWords(text)) {\n Collections.addAll(words, word);\n }\n return words;\n }", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "public ArrayList<String> calcKeyPhrases(int topK) {\r\n\t\tArrayList<String> res = new ArrayList<String>();\r\n\t\tif (topK <= 0) {\r\n\t\t\treturn res;\r\n\t\t}\r\n\t\t\r\n\t\tPartialSort<HeapNode> partialSort = new PartialSort<HeapNode>(topK, new HeapNodeComparator());\r\n\t\tdfsToGetKeyPhrases(partialSort, \"\", root);\t\t\r\n\t\t\r\n\t\tArrayList<HeapNode> list = partialSort.getSortedTopK();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tres.add(list.get(i).getPhrase());\r\n\t\t}\r\n\t\t\r\n\t\treturn res;\r\n\t}", "static ArrayList<String> split_words(String s){\n ArrayList<String> words = new ArrayList<>();\n\n Pattern p = Pattern.compile(\"\\\\w+\");\n Matcher match = p.matcher(s);\n while (match.find()) {\n words.add(match.group());\n }\n return words;\n }", "public void translate() {\n\t\tif(!init)\r\n\t\t\treturn; \r\n\t\ttermPhraseTranslation.clear();\r\n\t\t// document threshold: number of terms / / 8\r\n//\t\tdocThreshold = (int) (wordKeyList.size() / computeAvgTermNum(documentTermRelation) / 8.0);\r\n\t\t//\t\tuseDocFrequency = true;\r\n\t\tint minFrequency=1;\r\n\t\temBkgCoefficient=0.5;\r\n\t\tprobThreshold=0.001;//\r\n\t\titerationNum = 20;\r\n\t\tArrayList<Token> tokenList;\r\n\t\tToken curToken;\r\n\t\tint j,k;\r\n\t\t//p(w|C)\r\n\r\n\t\tint[] termValues = termIndexList.values;\r\n\t\tboolean[] termActive = termIndexList.allocated;\r\n\t\ttotalCollectionCount = 0;\r\n\t\tfor(k=0;k<termActive.length;k++){\r\n\t\t\tif(!termActive[k])\r\n\t\t\t\tcontinue;\r\n\t\t\ttotalCollectionCount +=termValues[k];\r\n\t\t}\r\n\t\t\r\n\t\t// for each phrase\r\n\t\tint[] phraseFreqKeys = phraseFrequencyIndex.keys;\r\n\t\tint[] phraseFreqValues = phraseFrequencyIndex.values;\r\n\t\tboolean[] states = phraseFrequencyIndex.allocated;\r\n\t\tfor (int phraseEntry = 0;phraseEntry<states.length;phraseEntry++){\r\n\t\t\tif(!states[phraseEntry]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (phraseFreqValues[phraseEntry] < minFrequency)\r\n\t\t\t\tcontinue;\r\n\t\t\ttokenList=genSignatureTranslation(phraseFreqKeys[phraseEntry]); // i is phrase number\r\n\t\t\tfor (j = 0; j <tokenList.size(); j++) {\r\n\t\t\t\tcurToken=(Token)tokenList.get(j);\r\n\t\t\t\tif(termPhraseTranslation.containsKey(curToken.getIndex())){\r\n\t\t\t\t\tIntFloatOpenHashMap old = termPhraseTranslation.get(curToken.getIndex());\r\n\t\t\t\t\tif(old.containsKey(phraseFreqKeys[phraseEntry])){\r\n\t\t\t\t\t\tSystem.out.println(\"aha need correction\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\told.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight()); //phrase, weight\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tIntFloatOpenHashMap newPhrase = new IntFloatOpenHashMap();\r\n\t\t\t\t\tnewPhrase.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight());\r\n\t\t\t\t\ttermPhraseTranslation.put(curToken.getIndex(), newPhrase);\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\toutputTransMatrix.add(i,curToken.getIndex(),curToken.getWeight());\r\n\t\t\t\t//\t\t\t\toutputTransTMatrix.add(curToken.getIndex(), i, curToken.getWeight());\r\n\t\t\t\t//TODO termPhrase exists, create PhraseTerm\r\n\t\t\t}\r\n\t\t\ttokenList.clear();\r\n\t\t}\r\n\r\n\t}", "public static List<NGram> getNGramsFromSentence(String sentence, int n){\n List<NGram> nGrams = new ArrayList<>();\n String[] words = sentence.split(\"\\\\s+\");\n\n if (n == 1){\n for (String word : words) {\n if (word.equalsIgnoreCase(PHI))\n continue;\n\n String[] unigram = new String[1];\n unigram[0] = word;\n nGrams.add(new NGram(unigram));\n }\n } else if (n == 2) {\n for (int i = 0; i < words.length; i++) {\n if (words[i].equals(PHI))\n continue;\n\n String[] bigram = new String[2];\n\n if (i == 0)\n bigram[0] = PHI;\n else\n bigram[0] = words[i - 1];\n\n bigram[1] = words[i];\n\n nGrams.add(new NGram(bigram));\n }\n } else\n throw new RuntimeException(\"3+ grams have not been implemented!\");\n\n return nGrams;\n }", "Stream<List<Term>> toSentences(List<Integer> intText, List<Term> termText);", "public String buildSentence() {\n\t\tSentence sentence = new Sentence();\n\t\t\n\t\t//\tLaunch calls to all child services, using Observables \n\t\t//\tto handle the responses from each one:\n\t\tList<Observable<Word>> observables = createObservables();\n\t\t\n\t\t//\tUse a CountDownLatch to detect when ALL of the calls are complete:\n\t\tCountDownLatch latch = new CountDownLatch(observables.size());\n\t\t\n\t\t//\tMerge the 5 observables into one, so we can add a common subscriber:\n\t\tObservable.merge(observables)\n\t\t\t.subscribe(\n\t\t\t\t//\t(Lambda) When each service call is complete, contribute its word\n\t\t\t\t//\tto the sentence, and decrement the CountDownLatch:\n\t\t\t\t(word) -> {\n\t\t\t\t\tsentence.add(word);\n\t\t\t\t\tlatch.countDown();\n\t\t }\n\t\t);\n\t\t\n\t\t//\tThis code will wait until the LAST service call is complete:\n\t\twaitForAll(latch);\n\n\t\t//\tReturn the completed sentence:\n\t\treturn sentence.toString();\n\t}", "public List<String> extractIllnesses(String description) {\n\t\tList<String> newSentences = this.getSentences(description);\n\t\t\n\t\t// For each sentence, generate valid word sequences\n\t\tList<String> allValidWordSequences = new ArrayList<String>();\n\t\tnewSentences.forEach(s -> allValidWordSequences.addAll(this.getWordCombinations(s)));\n\n\t\tSicknessMap medicalRecords = SicknessMap.getInstance();\n\t\tList<String> results = allValidWordSequences.stream()\n\t\t\t\t.filter(potentialIllness -> medicalRecords.contains(potentialIllness))\n\t\t\t\t.map(actualIllness -> medicalRecords.getByKey(actualIllness))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn results;\n\t}", "public static ArrayList<String> getTerms(String comment){\n\n\t\tString[] terms = comment.split(\"[^a-zA-Z]+\");\n\t\t//if(terms.length == 0) System.out.println(\"error: \" + comment);\n\t\tArrayList<String> termsarray = new ArrayList<String>();\n\t\tfor(int i=0;i<terms.length;i++){\n\t\t\t\n\t\t\tString iterm = terms[i].toLowerCase();\n\t\t\tboolean isStopWord = false;\n\t\t\tfor(String s : stopWord){\n\t\t\t\tif(iterm.equals(s)){\n\t\t\t\t\tisStopWord = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isStopWord == true)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tStemmer stemmer = new Stemmer();\n\t\t\tstemmer.add(iterm.toCharArray(), iterm.length());\n\t\t\tstemmer.stem();\n\t\t\titerm = stemmer.toString();\n\t\t\t\n\t\t\t//System.out.println(iterm);\n\t\t\tif(iterm.length() >=2 && !termsarray.contains(iterm))termsarray.add(iterm);\n\t\t}\n\t\n\t\treturn termsarray;\n\t}", "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 Collection<ConceptLabel> processSentence(Sentence sentence, List messages) {\n\t\t// long time = System.currentTimeMillis();\n\t\t// search in lexicon\n\t\tList<Concept> keys = lookupConcepts(sentence);\n\t\t\t\n\t\t// filter out overlapping numbers\n\t\tfilterNumbers(keys);\n\t\tfilterOverlap(keys);\t\t\t\n\t\t\n\t\t// take out concepts that overlap with new concepts\n\t\tList<ReportConcept> reparsedConcepts = new ArrayList<ReportConcept>();\n\t\tfor (ReportConcept c : concepts) {\n\t\t\t// if existing concept intersects this sentence\n\t\t\tif (intersects(c,sentence.getSpan())) {\n\t\t\t\treparsedConcepts.add(c);\n\t\t\t}\n\t\t}\n\n\t\t// take out concepts that will be reparsed anyway\n\t\tconcepts.removeAll(reparsedConcepts);\n\n\t\t// process phrase\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\n\t\tfor (Concept concept : keys) {\n\t\t\t// create new labels\n\t\t\tCollection<ConceptLabel> lbl = createConceptLabels(concept,sentence.getCharOffset());\n\t\t\tlabels.addAll(lbl);\n\n\t\t\t// get entry or create it\n\t\t\tReportConcept entry = createReportConcept(concept);\n\t\t\tentry.addLabels(lbl);\n\n\t\t\t// add to all concepts\n\t\t\tconcepts.add(entry);\n\t\t\t// negatedConcepts.remove(entry);\n\n\t\t\t// process numbers\n\t\t\tfor (ConceptLabel l : lbl)\n\t\t\t\tprocessNumericValues(entry, l);\n\t\t}\n\n\t\t// take care of negation\n\t\tnegex.clear();\n\t\tnegex.process(sentence, keys);\n\t\tlabels.addAll(processNegation(negex, messages));\n\n\t\t// backup concepts so that concepts that were merged outside of parsed\n\t\t// sentence could be removed after processing\n\t\tList<ReportConcept> backup = new ArrayList<ReportConcept>(concepts);\n\t\tbackup.removeAll(reparsedConcepts);\n\t\t\n\t\t// compact concepts to more specific constructs\n\t\tprocessConcepts(concepts);\n\t\n\t\t// at this point we can potentially have a situation where\n\t\t// one concept from this sentence subsumed another from the previous or next \n\t\t// sentence\n\t\tfor(ReportConcept c: backup){\n\t\t\tif(!concepts.contains(c))\n\t\t\t\tremovedConcepts.add(c);\n\t\t}\n\t\t\n\t\t// remove dangling digits and units, cause they are likely to be junk\n\t\tremoveDanglingAttributes();\t\t\n\t\t\n\t\t// now that we may have reparsed some concepts, lets\n\t\t// see if we can retain some of the old data\n\t\tfor (ReportConcept rc : reparsedConcepts) {\n\t\t\t// reparsed concept is in the list, then retain its data, if not\n\t\t\t// then it should be removed\n\t\t\tReportConcept nc = TextHelper.get(concepts, rc);\n\t\t\tif (nc != null) {\n\t\t\t\tnc.setConceptEntry(rc.getConceptEntry());\n\t\t\t} else {\n\t\t\t\tremovedConcepts.add(rc);\n\t\t\t}\n\t\t}\n\n\t\t// negate concepts and proces numbers\n\t\tfor (ReportConcept e : negatedConcepts) {\n\t\t\tReportConcept n = TextHelper.get(concepts, e);\n\t\t\tif (n != null) {\n\t\t\t\tn.setNegation(e.getNegation());\n\t\t\t}\n\t\t}\n\n\t\t// clear negation\n\t\tnegatedConcepts.clear();\n\n\t\t// do eggs\n\t\tEggs.processText(sentence.getOriginalString());\n\t\n\t\t// sync to interface\n\t\tsync();\n\t\t\n\t\treturn labels;\n\t}", "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}", "static ArrayList<String> split_sentences(String inputText){\n ArrayList<String> sentences = new ArrayList<>();\n Pattern p = Pattern.compile(\"[^.!?\\\\s][^.!?]*(?:[.!?](?!['\\\"]?\\\\s|$)[^.!?]*)*[.!?]?['\\\"]?(?=\\\\s|$)\", Pattern.MULTILINE | Pattern.COMMENTS);\n Matcher match = p.matcher(inputText);\n while (match.find()) {\n sentences.add(match.group());\n }\n return sentences;\n }", "public List<String> similarWordsInVocabTo(String word,double accuracy) {\n List<String> ret = new ArrayList<>();\n for(String s : cache.words()) {\n if(MathUtils.stringSimilarity(word,s) >= accuracy)\n ret.add(s);\n }\n return ret;\n }", "public ArrayList NegativeSentenceDetection() {\n String phraseNotation = \"RB|CC\";//@\" + phrase + \"! << @\" + phrase;\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n ArrayList negativeLists = new ArrayList();\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n for (Tree inChild : innerChild) {\n negativeLists.add(inChild.getLeaves().get(0).yieldWords().get(0).word());\n }\n }\n return negativeLists;\n }", "public double getSentenceProbability(List<String> sentence) {\n\tList<String> stoppedSentence = new ArrayList<String>(sentence);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(0, START);\n\tstoppedSentence.add(STOP);\n\tdouble probability = 1.0;\n\tfor (int index = 2; index < stoppedSentence.size(); index++) {\n\t probability *= getWordProbability(stoppedSentence, index);\n\t}\n\treturn probability;\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 }", "public String getCandidateSentences(HashMap<String, String> tripleDataMap) {\n String subUri = tripleDataMap.get(\"subUri\");\n String objUri = tripleDataMap.get(\"objUri\");\n String subLabel = tripleDataMap.get(\"subLabel\");\n String objLabel = tripleDataMap.get(\"objLabel\");\n\n String[] subArticleSentences = getSentencesOfArticle(getArticleForURI(subUri));\n String[] objArticleSentences = getSentencesOfArticle(getArticleForURI(objUri));\n String sentencesCollectedFromSubjArticle = null;\n String sentencesCollectedFromObjArticle = null;\n String sentence = null;\n if (subArticleSentences != null)\n sentencesCollectedFromSubjArticle = getSentencesHavingLabels(subLabel, objLabel, subArticleSentences);\n\n if (objArticleSentences != null)\n sentencesCollectedFromObjArticle = getSentencesHavingLabels(subLabel, objLabel, objArticleSentences);\n\n if (sentencesCollectedFromSubjArticle != null && sentencesCollectedFromObjArticle != null) {\n if (sentencesCollectedFromSubjArticle.length() <= sentencesCollectedFromObjArticle.length())\n sentence = sentencesCollectedFromSubjArticle;\n else\n sentence = sentencesCollectedFromObjArticle;\n } else if (sentencesCollectedFromSubjArticle != null) {\n sentence = sentencesCollectedFromSubjArticle;\n } else {\n sentence = sentencesCollectedFromObjArticle;\n }\n return sentence;\n }", "private static ArrayList<String> getAllKeyWord(String [] lignes){\n ArrayList<String> res= new ArrayList<>();\n\n // La recherche dans le pdf\n for(String ligne : lignes){\n for(String mot : ligne.split(\" |/|-|\\\\(|\\\\)|,\")){\n\n try{\n if(mot.toLowerCase(Locale.ENGLISH).equals(\"c#\".toLowerCase(Locale.ENGLISH)))\n res.add(\"csharp\");\n else\n if(mot.toLowerCase(Locale.ENGLISH).equals(\"c++\".toLowerCase(Locale.ENGLISH)))\n res.add(\"cpp\");\n else\n if(!mot.toLowerCase(Locale.ENGLISH).matches(\"| |à|de|je|un|et|une|en|d'un|d'une|le|la|avec|:|\\\\|\"))\n res.add(mot.toLowerCase(Locale.ENGLISH));\n }catch (IllegalArgumentException e){\n //System.out.println(e.getMessage());\n continue;\n }\n }\n //System.out.println(\"line: \"+s);\n }\n return (ArrayList) res.stream().distinct().collect(Collectors.toList());\n }", "public void showListPhrases() {\r\n\t\tint i = 0;\r\n\t\tString[] array = new String[100];\r\n\t\ttry {\r\n\t\t\tstatement = SqlCon.getConnection().createStatement();\r\n\t\t\tResultSet rs = statement.executeQuery(SqlCon.PHRASE_TO_CHECK);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString phrase = rs.getString(\"word\");\r\n\t\t\t\tarray[i] = phrase;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t} catch (SQLException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\ti= i+1;\r\n\t\tarrPhrase = new String[i];\r\n\t\tarrPhrase[0] = \"None\";\r\n\t\tfor (int j = 1; j < i; j++) {\r\n\t\t\tarrPhrase[j] = array[j-1];\r\n\t\t}\r\n\t\tfor(int k= 0; k<arrPhrase.length;k++)\r\n\t\t\tSystem.out.println(arrPhrase[k]);\r\n\t}", "public String[] prevHotWords( String hotWord ){\r\n //Created vector to push the variable amount of hotwords before the one in the arguments\r\n Vector<String> output = new Vector<String>();\r\n //The output string array which is returned\r\n String[] out;\r\n //Turns the hotword to lowercase for it to be compatible anc checkable\r\n String chk = hotWord.toLowerCase();\r\n //Created iterator to move through indeces of consec\r\n int i = 0;\r\n //Loops through every hotword in consec\r\n for (String x : consec.subList(0, count())) {\r\n //if the hotword equals the argument hotword then go to the next check\r\n if(x.equals(chk)){\r\n //As long as the iterator is greater than 1, reach to the previous hot word\r\n //in the series and put it in the vector\r\n if(i > 1){\r\n output.add(consec.get(i-1));\r\n }\r\n }\r\n i++;\r\n }\r\n //Set the out array to the size of the vector that has all the previous hotwords\r\n out = new String[output.size()];\r\n //Copy the items in\r\n for(int j = 0; j < output.size(); j++){\r\n out[j] = output.get(j);\r\n }\r\n \r\n return out;\r\n\t}", "private ArrayList<String> matchingWords(String word){\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<words.size();i++){\n\t\t\tif(oneCharOff(word,words.get(i))){\n\t\t\t\tlist.add(words.get(i));\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public void train (List<List<String>> sentences) {\n // sentence structure: <S>A B C</S>\n bigramModel.train(sentences, bigramModel.start_symbol, bigramModel.end_symbol);\n // sentence structure: </S>C B A<S>\n backwardBigramModel.train(sentences, backwardBigramModel.end_symbol, backwardBigramModel.start_symbol);\n }", "public static void wordsToGuess(String [] myWords){\n myWords[0] = \"tesseract\";\n myWords[1] = \"vibranium\";\n myWords[2] = \"mjolnir\";\n myWords[3] = \"jarvis\";\n myWords[4] = \"avengers\";\n myWords[5] = \"wakanda\";\n myWords[6] = \"mixtape\";\n myWords[7] = \"assemble\";\n myWords[8] = \"queens\";\n myWords[9] = \"inevitable\";\n }", "public String getRelatedSubjectByPknows (double [] vector,String[] knowns){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n String skills;\n String name;\n\n public similarities(double s,ArrayList<String> d,String sk,String name){\n this.sim =s;\n this.docs = d;\n this.skills = sk;\n this.name = name;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n ArrayList<Double> knowns_vector =new ArrayList<Double>() ;\n\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n String skills = (String)sbj.get(\"skills\");\n String [] doc_skills = skills.split(\",\");\n System.out.println(\"doc_skills\"+doc_skills[0]+(String)sbj.get(\"id\"));\n /* check length of docs knows and user skills in other having same vector length*/\n if (knowns.length>=doc_skills.length){\n /* Init ouput vector to need dimension */\n for (int i=0;i<knowns.length;i++){\n knowns_vector.add(i,new Double(0.0));\n }\n /* get skills of doc related to pknows */\n System.out.println(\"knows larger\");\n for (int i = 0; i<knowns.length;i++){\n if (knowns[i]!=null){\n\n int ind = Arrays.asList(doc_skills).indexOf(knowns[i]);\n if (ind!=-1){\n System.out.println(\"knows checking \"+knowns[i]+\" \"+skills);\n System.out.println(\"barruan \"+ind+\" \"+vector[i]);\n knowns_vector.add(ind,new Double(vector[i]));\n }\n else knowns_vector.add(new Double(0.0));\n }\n }\n }\n else {\n /* Init ouput vector to need dimension */\n for (int j=0;j<doc_skills.length;j++){\n knowns_vector.add(j,new Double(0.0));\n }\n for (int i = 0; i<knowns.length;i++){\n\t for (int x = 0 ; x<doc_skills.length;x++){\n\t\tif (doc_skills[x].equals(knowns[i])) knowns_vector.add(x,new Double(vector[i]));\n\t\telse knowns_vector.add(x,new Double(0.0));\n \n\t\t\t\n }\n }\n }\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double[] knowns_vector1 = knowns_vector.stream().mapToDouble(Double::doubleValue).toArray();\n\n double sim = vectorSpaceModel.getSimilarity(vec1,knowns_vector1);\n System.out.println(sim);\n if (sim>0.09){\n sims.add(new similarities(sim,docs,skills,(String)sbj.get(\"id\")));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"name\\\":\\\"\"+sim.name+\"\\\",\\\"sim\\\":\"+sim.sim+\",\\\"skills\\\":\\\"\"+sim.skills+\"\\\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n if (sims.size() ==0) return \"{\\\"docs\\\":[]}\";\n return result;\n}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n if (requestCode == REQUEST_CODE && resultCode == RESULT_OK)\n {\n // Populate the wordsList with the String values the recognition engine thought it heard\n ArrayList<String> matches = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n \n for(int i=0;i<matches.size();i++)\n {\n \tif(counter==0)\n \t{\n \t\t\n\t \tif(matches.get(i).equals(\"moo\") || matches.get(i).equals(\"moore\") ||\n\t \t\t\tmatches.get(i).equals(\"mou\") || matches.get(i).equals(\"moon\") ||\n\t \t\t\tmatches.get(i).equals(\"movie\") || matches.get(i).equals(\"boo\")\n\t \t|| matches.get(i).equals(\"boohoo\") || matches.get(i).equals(\"boom\"))\n\t \t{\n\t \t\t\n\t \t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse{\n\t \t\twrong();\n\t \t\t}\n \t}\n \telse if(counter==1){\n \t\t\n\t \tif(matches.get(i).equals(\"name\") || matches.get(i).equals(\"names\") ||\n\t \t\t\tmatches.get(i).equals(\"nay\") || matches.get(i).equals(\"neigh\") ||\n\t \t\t\tmatches.get(i).equals(\"nee\") || matches.get(i).equals(\"nays\")\n\t \t\t\t|| matches.get(i).equals(\"knee\") || matches.get(i).equals(\"nees\")\n\t \t\t\t|| matches.get(i).equals(\"ne\") || matches.get(i).equals(\"ni\")){\n\t \t\t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n\t \t\n \t}\n \telse if(counter==2){\n\t \tif(matches.get(i).equals(\"oink\") || matches.get(i).equals(\"on\") ||\n\t \t\t\tmatches.get(i).equals(\"oint\") || matches.get(i).equals(\"point\") ||\n\t \t\t\tmatches.get(i).equals(\"online\") || matches.get(i).equals(\"going\")\n\t \t\t\t|| matches.get(i).equals(\"awning\") || matches.get(i).equals(\"wapking\")){\n\t \t\t\n\t \t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n\t \t\n \t}\n \telse if(counter==3){\n \t\t//TextView tv = (TextView) findViewById(R.id.text);\n \t\t//tv.setText(\"Sheep says?\");\n\t \tif(matches.get(i).equals(\"ba\") || matches.get(i).equals(\"baa\") ||\n\t \t\t\tmatches.get(i).equals(\"bar\") || matches.get(i).equals(\"bah\") ||\n\t \t\t\tmatches.get(i).equals(\"baba\") || matches.get(i).equals(\"bleach\")\n\t \t\t\t|| matches.get(i).equals(\"please\") || matches.get(i).equals(\"plate\")\n\t \t\t\t|| matches.get(i).equals(\"pa\") || matches.get(i).equals(\"paa\")){\n\t \t\t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n \t}\n \telse if(counter==4){\n\t \tif(matches.get(i).equals(\"quack\") || matches.get(i).equals(\"crack\") ||\n\t \t\t\tmatches.get(i).equals(\"kodak\") || matches.get(i).equals(\"back\") ||\n\t \t\t\tmatches.get(i).equals(\"call back\") || matches.get(i).equals(\"quake\")\n\t \t\t\t|| matches.get(i).equals(\"quiet\")|| matches.get(i).equals(\"quiet\")\n\t \t\t\t|| matches.get(i).equals(\"whack\")\n\t \t\t\t|| matches.get(i).equals(\"quack quack\")){\n\t \t\tif(counter<4)\n\t \t\t{\n\t \t\t\tcounter++;\n\t \t\t\tloadActivity();\n\t \t\t}\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n \t}\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void getTerm()\n\t\t{\n\t\t\t//Open SciencePhrases.txt\n\t\t\tFile f1 = new File(\"SciencePhrases.txt\");\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tspIn = new Scanner(f1);\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Cannot create SciencePhrases.txt to be written \"\n\t\t\t\t\t\t+ \"to.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\t//Storing term at curTerm in the variables term and picTerm\n\t\t\tString cur = new String(\"\");\n\t\t\tfor(int i = 0; i<curTerm; i++)\n\t\t\t{\n\t\t\t\tterm = \"\";\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tpicTerm = cur;\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t{\n\t\t\t\t\tterm += cur;\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "public double getWordProbability(List<String> sentence, int index) {\n\t\n\treturn (Weights[0] * Trigram.getWordProbability(sentence, index) +\n\t\tWeights[1] * Bigram.getWordProbability(sentence, index) +\n\t\tWeights[2] * Unigram.getWordProbability(sentence, index));\n }", "@SuppressWarnings({ \"deprecation\", \"unchecked\", \"rawtypes\" })\n\tpublic String generateWordlists(Corpus co) {\n\t\tlong startTime = System.currentTimeMillis();\n\t\t// Set up weka word vector\n\t\tFastVector attributes;\n\t\tInstances dataSet;\n\t\tattributes = new FastVector();\n\n\t\tattributes.addElement(new Attribute(\"aspect_id\", (FastVector) null));\n\t\tattributes.addElement(new Attribute(\"tokens\", (FastVector) null));\n\n\t\tdataSet = new Instances(\"BeerAspects\", attributes, 0);\n\n\t\tCorpus topReviews;\n\t\tCorpus lowReviews;\n\n\t\t// Do top and low for all aspects\n\t\tfor (Aspect aspect : Aspect.values()) {\n\n\t\t\t// Only for actual aspects\n\t\t\tif (aspect.equals(Aspect.NONE) || aspect.equals(Aspect.OVERALL))\n\t\t\t\tcontinue;\n\n\t\t\ttopReviews = co.getTopReviews(aspect);\n\t\t\ttopReviews.analyze();\n\t\t\tString tokens = topReviews.getTokenConcatenation(aspect);\n\n\t\t\tInstance instance = new SparseInstance(2);\n\t\t\tinstance.setValue((Attribute) attributes.elementAt(0), aspect.name() + \"_TOP\");\n\t\t\tinstance.setValue((Attribute) attributes.elementAt(1), tokens);\n\n\t\t\tdataSet.add(instance);\n\n\t\t\tlowReviews = co.getLowReviews(aspect);\n\t\t\tlowReviews.analyze();\n\t\t\ttokens = lowReviews.getTokenConcatenation(aspect);\n\t\t\t// System.out.println(tokens);\n\n\t\t\tinstance = new SparseInstance(2);\n\t\t\tinstance.setValue((Attribute) attributes.elementAt(0), aspect.name() + \"_LOW\");\n\t\t\tinstance.setValue((Attribute) attributes.elementAt(1), tokens);\n\n\t\t\tdataSet.add(instance);\n\t\t}\n\n\t\t// System.out.println(dataSet.toString());\n\t\tInstances dataFiltered = transformToWordVector(dataSet, co.getProps());\n\n\t\t// System.out.println(dataFiltered.toString());\n\t\tString pathsToLists = writeWordlists(dataFiltered);\n\n\t\twriteArffFile(dataFiltered, this.outputDir+\"wordvector.arff\");\n\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tlong elapsedTime = stopTime - startTime;\n\t\tSystem.out.println(\"Generated wordlists in: \" + elapsedTime / 1000 + \" s\");\n\t\treturn pathsToLists;\n\t}", "public static void main(String[] args) {\n String words = \"coding:java:selenium:python\";\n String[] splitWords = words.split(\":\");\n System.out.println(Arrays.toString(splitWords));\n System.out.println(\"Length of Array - \" +splitWords.length);\n\n for (String each:splitWords) {\n System.out.println(each);\n\n }\n // How many words in your sentence\n // Most popular interview questions\n // 0 1 2 3 4 5\n String sentence = \"Productive study is makes you motivated\";\n String[] wordsInSentence = sentence.split(\" \");\n System.out.println(\"First words: \" +wordsInSentence[0]);\n System.out.println(\"First words: \" +sentence.split(\" \")[5]);\n System.out.println(\"Number of words in sentence: \" + wordsInSentence.length);\n\n // print all words in separate line\n for (String each:wordsInSentence) {\n System.out.println(each);\n }\n\n\n\n }", "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "public InterpolationModel(Collection<List<String>> sentences) {\n\tthis();\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n\ttrain(sentences);\n }", "public ArrayList<Integer> analyze() {\n\t\t//Clears the sentimentValues ArrayList to perform a new analysis.\n\t\tif (this.sentimentValues.size() > 0) {\n\t\t\tthis.sentimentValues = new ArrayList<>();\n\t\t}\n\t\t\n\t\tDocument speechDocument = new Document(this.speech);\t//Create a CoreNLP Document object with speech as input.\n\t\t\n\t\tfor (Sentence sentence : speechDocument.sentences()) {\n\t\t\tint rawSentimentValue = sentence.sentiment().ordinal();\t//Captures the raw, unnormalized sentiment value from sentence.\n\t\t\tthis.sentimentValues.add(normalize(rawSentimentValue));\t//Normalizes the sentiment value and pushes to ArrayList.\n\t\t}\n\t\t\n\t\treturn this.sentimentValues;\n\t}", "private List<SearchWord> getSearchWords(Long lastUpdateTime) {\n return new ArrayList<>();\n }", "private static ArrayList<RatedSpeech> rankedSpeechesbySimilarMPs(ArrayList<MP> pSelectedMPs,\n\t\t\tArrayList<String> pKeyWords)\n\t{\n\t\tArrayList<MP> tempSingleMPList = new ArrayList<MP>();\n\t\tArrayList<RatedSpeech> result = new ArrayList<RatedSpeech>();\n\t\tfor (MP mp : rankSimilarMPs(pSelectedMPs))\n\t\t{\n\t\t\ttempSingleMPList.add(mp);\n\t\t\tfor (RatedSpeech sp : ratedSpeechesForMPsSubsection(tempSingleMPList, pKeyWords, true))\n\t\t\t{\n\t\t\t\tresult.add(sp);\n\t\t\t}\n\t\t\ttempSingleMPList.remove(mp);\n\t\t}\n\t\treturn result;\n\t}", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "public String[] breakSentence(String data) {\n sentences = myCategorizer.sentDetect(data);\n return sentences;\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/* */ }", "List<T> getWord();", "public abstract String[][] getTopWords();", "public Set<String> getAllKnownWords() throws IOException {\n log.info(\"Reading all data to build known words set.\");\n Set<String> words = new HashSet<>();\n if (this.hasTrain()) {\n for (AnnoSentence sent : getTrainInput()) {\n words.addAll(sent.getWords());\n }\n }\n if (this.hasDev()) {\n for (AnnoSentence sent : getDevInput()) {\n words.addAll(sent.getWords());\n }\n }\n if (this.hasTest()) {\n for (AnnoSentence sent : getTestInput()) {\n words.addAll(sent.getWords());\n }\n }\n return words;\n }", "public ArrayList<String> getWords() {\n return new ArrayList<>(words);\n }", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "public String phraseWords(String input) {\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n String pos = document.get(CoreAnnotations.PhraseWordsTagAnnotation.class);\n\n return pos;\n }", "public String get_all_words(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }" ]
[ "0.6204912", "0.605825", "0.60402906", "0.6002551", "0.599409", "0.58956003", "0.5788479", "0.5717584", "0.5713634", "0.5708833", "0.56988144", "0.56585336", "0.5658236", "0.56273794", "0.5618076", "0.56022614", "0.5594436", "0.5540778", "0.55385524", "0.553272", "0.55275285", "0.5521191", "0.550697", "0.550376", "0.55019474", "0.54957414", "0.54506236", "0.5419401", "0.5416772", "0.54163945", "0.54136753", "0.5409692", "0.5396575", "0.5391723", "0.53695285", "0.53549343", "0.53513294", "0.53507996", "0.53315634", "0.5322096", "0.531707", "0.53127694", "0.53079474", "0.5307034", "0.5306484", "0.53043455", "0.5297566", "0.5277464", "0.52730656", "0.52697325", "0.52562594", "0.52507913", "0.52453536", "0.5241389", "0.52376837", "0.5229279", "0.5229031", "0.5227126", "0.5225832", "0.52253574", "0.5220884", "0.5202257", "0.5198667", "0.5188124", "0.51871073", "0.5168886", "0.5164881", "0.5155358", "0.5151803", "0.5141377", "0.51331496", "0.5131989", "0.513083", "0.51227486", "0.5120425", "0.51126945", "0.51115084", "0.5107711", "0.5102686", "0.5101827", "0.5088974", "0.50847185", "0.5079504", "0.50730115", "0.5072678", "0.505899", "0.50510377", "0.5049836", "0.5041939", "0.50360215", "0.50311315", "0.5029561", "0.5028151", "0.5024221", "0.5018528", "0.50184256", "0.501489", "0.50061417", "0.5004916", "0.49918652" ]
0.7019024
0
This method is a file chooser that returns the path to the selected file
public static String setFilePath() { JFileChooser fc = new JFileChooser("."); // start at current directory int returnVal = fc.showOpenDialog(null); if(returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); String pathName = file.getAbsolutePath(); return pathName; } else return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSelectedFilePath(){\n return fileChooser.getSelectedFile().getAbsolutePath();\n }", "public String getFileChosen() \n {\n return fileName.getText();\n }", "private String getSelectedFile() {\r\n\t\tString file = \"\";\r\n\t\tIFile selectedFile = fileResource.getSelectedIFile();\r\n\t\tif (selectedFile != null) {\r\n\t\t\tIPath selectedPath = selectedFile.getLocation();\r\n\t\t\tif (selectedPath != null) {\r\n\t\t\t\tfile = selectedPath.toFile().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn file;\r\n\t}", "public String openFileChooser() {\n\t\tthis.setCurrentDirectory(new File(\".\"));\n\t\tthis.setDialogTitle(\"Choose your file\");\n\t\tint returnValue = this.showOpenDialog(null);\n\t\tif (returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\treturn this.getSelectedFile().getAbsolutePath();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "private JFileChooser getFileChooser() {\t\t\n\t\treturn getFileChooser(JFileChooser.FILES_AND_DIRECTORIES);\n\t}", "private String getFile() {\r\n\t\tJFileChooser fileChooser = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\r\n\t\tfileChooser.setDialogTitle(\"Choose a file to open: \");\r\n\t\tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tint success = fileChooser.showOpenDialog(null);\r\n\t\tif (success == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile selectedFile = fileChooser.getSelectedFile();\r\n\t\t\tString fileName = selectedFile.getName();\r\n\t\t\treturn fileName;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public String choosePath(int chooserType) {\n JFileChooser jfc=new JFileChooser();\n jfc.setFileSelectionMode(chooserType );\n jfc.showDialog(new JLabel(), \"选择\");\n File file=jfc.getSelectedFile();\n if(file.isDirectory()){\n return file.getAbsolutePath()+\"\\\\\";\n }\n System.out.println(jfc.getSelectedFile().getName());\n return file.getAbsolutePath();\n }", "public static String chooseFileLocation(){\n String fileLoc = new String();\n\n JFileChooser fc = new JFileChooser(\".\");\n fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n fc.showOpenDialog(null);\n fileLoc = fc.getSelectedFile().getAbsolutePath() + \"\\\\\";\n\n return fileLoc;\n }", "void selectFile(){\n JLabel lblFileName = new JLabel();\n fc.setCurrentDirectory(new java.io.File(\"saved\" + File.separator));\n fc.setDialogTitle(\"FILE CHOOSER\");\n FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(\n \"json files (*.json)\", \"json\");\n fc.setFileFilter(xmlfilter);\n int response = fc.showOpenDialog(this);\n if (response == JFileChooser.APPROVE_OPTION) {\n lblFileName.setText(fc.getSelectedFile().toString());\n }else {\n lblFileName.setText(\"the file operation was cancelled\");\n }\n System.out.println(fc.getSelectedFile().getAbsolutePath());\n }", "public String ouvrir(){\n \n JTextArea text=new JTextArea();\n FileNameExtensionFilter filter = new FileNameExtensionFilter (\n \"java\", \"java\");\n chooser.setFileFilter(filter);\n \n int ret=chooser.showOpenDialog(text);\n String path=\"\";\n if(ret==JFileChooser.APPROVE_OPTION){\n path=chooser.getSelectedFile().getAbsolutePath();\n }\n\n return path;\n }", "public static Optional<File> showFileChooserAndGetAbsPath() {\n FileChooser fileChooser = new FileChooser();\n File selected = fileChooser.showOpenDialog(new Stage());\n return Optional.ofNullable(selected);\n }", "public File openFile() {\r\n\r\n\t\tFile chosenFile = fileChooser.showOpenDialog(fileChooserDialog);\r\n\t\treturn chosenFile;\r\n\t}", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\t\tfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\t\t\t\t\tint result = fc.showOpenDialog(new JFrame());\r\n\t\t\t\t\tif(result == JFileChooser.APPROVE_OPTION){\r\n\t\t\t\t\t\tString path = fc.getSelectedFile().getAbsolutePath();\r\n\t\t\t\t\t\ttfPath.setText(path);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tJFileChooser jfc=new JFileChooser();\n\t\t\n\t\t//显示文件和目录\n\t\tjfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES );\n\t\tjfc.showDialog(new JLabel(), \"选择\");\n\t\tFile file=jfc.getSelectedFile();\n\t\t\n\t\t//file.getAbsolutePath()获取到的绝对路径。\n\t\tif(file.isDirectory()){\n\t\t\tSystem.out.println(\"文件夹:\"+file.getAbsolutePath());\n\t\t}else if(file.isFile()){\n\t\t\tSystem.out.println(\"文件:\"+file.getAbsolutePath());\n\t\t}\n\t\t\n\t\t//jfc.getSelectedFile().getName() 获取到文件的名称、文件名。\n\t\tSystem.out.println(jfc.getSelectedFile().getName());\n\t\t\n\t}", "private String getUploadFileName() {\r\n\t\tJFileChooser fc = new JFileChooser(\"./\");\r\n\t\tint returnVal = fc.showOpenDialog(this);\r\n\t\tif (returnVal != JFileChooser.APPROVE_OPTION) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tFile quizFile = fc.getSelectedFile();\r\n\t\treturn quizFile.getAbsolutePath();\r\n\t}", "public String openFile() {\n\t\t\n\t\tString chosenFile = \"\";\n\t\treturn chosenFile;\n\t\t\n\t}", "private void viewFileChooser() {\n try {\n JFileChooser chooser = new JFileChooser();\n chooser.showOpenDialog(null);\n f = chooser.getSelectedFile();\n// this.attachmentName = f.getName();\n// this.attachmentPath = f.getAbsolutePath();//dan mokdda karanna ona// meke file ek \n// txtAttachment.setText(attachmentPath);\n System.out.println(f.getName());\n System.out.println(f.getAbsolutePath());\n \n// Icon icon = new ImageIcon(getClass().getResource(\"/image/file.png\"));\n lblPath.setText(f.getName());\n// lblPath.setIcon(icon);\n lblPath.setVisible(true);\n \n \n } catch (NullPointerException e) {\n \n } \n }", "public static String getPath() {\n\t\t\n\t\tJFileChooser chooser = new JFileChooser();\n\t \tFileNameExtensionFilter filtroImagen =new FileNameExtensionFilter(\"*.TXT\", \"txt\");\n\t \tchooser.setFileFilter(filtroImagen);\n\t \tFile f = null;\n\t \t\n\t\ttry {\n\t\t\tf = new File(new File(\".\").getCanonicalPath());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString path = \"\";\n\t\t\n\t\ttry {\n\t\t\tchooser.setCurrentDirectory(f);\n\t\t\tchooser.setCurrentDirectory(null);\n\t\t\tchooser.showOpenDialog(null);\n\t \n\t\t\tpath = chooser.getSelectedFile().toString();\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t return path;\n\t}", "public String openDirectoryChooser() {\n\t\tthis.setCurrentDirectory(new File(\".\"));\n\t\tthis.setDialogTitle(\"Choose your path\");\n\t\tthis.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tthis.setAcceptAllFileFilterUsed(false);\n\t\tint returnValue = this.showOpenDialog(null);\n\t\tif (returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\treturn this.getSelectedFile().getAbsolutePath();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getLinkOfFoto()\n{\n\tJFileChooser fileChooser = new JFileChooser(\".\");\n\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"(png, gif, jpg, jpeg)\", \"png\", \"jpeg\", \"gif\", \"jpg\");\n\tfileChooser.setAcceptAllFileFilterUsed(false);\n\tfileChooser.setFileFilter(filter);\n\tString path=\"\";\n\n fileChooser.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n }\n });\n \n int status = fileChooser.showOpenDialog(null);\n\n\n\n if (status == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fileChooser.getSelectedFile();\n path = selectedFile.getAbsolutePath();\n } else if (status == JFileChooser.CANCEL_OPTION) {\n \treturn \"\";\n }\n return path;\n}", "public static String selectExcelFile (){\n\t\t\tfinal JFileChooser fc = new JFileChooser();\r\n\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\t\t\r\n\t\t\t//In response to a button click:\r\n\t\t\tint folderTarget = fc.showDialog(fc, \"Select Ecxel File\");\r\n\t\t\t\r\n\t\t\tString path =\"\";\r\n\t\t\tif (folderTarget == JFileChooser.APPROVE_OPTION){\r\n\t\t\t\tpath = fc.getSelectedFile().getAbsolutePath();\r\n\t\t\t\treturn path;\r\n\t\t\t} else if (folderTarget == JFileChooser.CANCEL_OPTION){\r\n\t\t\t\tfc.setVisible(false);\r\n\t\t\t}\t\r\n\t\t\treturn path;\r\n\t\t}", "private void browseInputButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseInputButtonActionPerformed\n JFileChooser chooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"XLS file\", new String[]{\"xls\", \"xlsx\"});\n chooser.setFileFilter(filter);\n chooser.setCurrentDirectory(new java.io.File(\".\"));\n chooser.setDialogTitle(\"Select a file\");\n chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n chooser.setAcceptAllFileFilterUsed(false);\n\n if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n FILEPATH.setText(chooser.getSelectedFile().getPath());\n }\n }", "public JFileChooser getAnswerFileChooser() {\r\n\t\treturn aFileChooser;\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n File selectedFile;\n JFileChooser fileChooser = new JFileChooser();\n int reply = fileChooser.showOpenDialog(null);\n if (reply == JFileChooser.APPROVE_OPTION) {\n selectedFile = fileChooser.getSelectedFile();\n geefBestandTextField1.setText(selectedFile.getAbsolutePath());\n }\n\n }", "public void actionPerformed(ActionEvent evt) {\n\t int result = chooser.showOpenDialog(frame);\n\n\t // Get the selected file\n\t if ( result == JFileChooser.APPROVE_OPTION){\n\t \ttextField.setText(chooser.getSelectedFile().getAbsolutePath());\n\t }\n\t }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setDialogTitle(\"Upload Files\");\r\n int result = fileChooser.showOpenDialog(null);\r\n if (result == JFileChooser.APPROVE_OPTION) { \r\n selectedFile = fileChooser.getSelectedFile();\r\n review.setText(selectedFile.getAbsolutePath());\r\n } \r\n }", "private void browseOutputFilePath()\n\t{\n\t\tString filedirectory = \"\";\n\t\tString filepath = \"\";\n\t\ttry\n\t\t{\n\t\t\tJFileChooser fc = new JFileChooser(\".\");\n\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); //select directories or files\n\t\t\tfc.setDialogTitle(\"Please choose a directory to save the converted file(s)\");\n\n\t\t\tFileNameExtensionFilter sifdata = new FileNameExtensionFilter(\"SIF\", \"sif\");\n\t\t\tfc.addChoosableFileFilter(sifdata);\n\n\t\t\tint returnVal = fc.showOpenDialog(this); // shows the dialog of the file browser\n\t\t\t// get name und path\n\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION)\n\t\t\t{\n\t\t\t\tmainframe.setOutputTextfieldText(fc.getSelectedFile().getAbsolutePath());\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(new JFrame(),\n\t\t\t\t\t\t\t\"Problem when trying to choose an output : \" + e.toString(),\n\t\t\t\t\t\t\t\"Warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int openFileChooser(){\n int returnVal = fileChooser.showOpenDialog(getCanvas()); //Parent component as parameter - affects position of dialog\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"ZIP & OSM & BIN\", \"osm\", \"zip\", \"bin\",\"OSM\",\"ZIP\",\"BIN\"); //The allowed files in the filechooser\n fileChooser.setFileFilter(filter); //sets the above filter\n return returnVal;\n }", "public String chooserFile(String def) {\r\n\t\tString res = \"\";\r\n\t\tString defpath = def;\r\n\t\tJFileChooser chooser = new JFileChooser();\r\n\t\tchooser.setCurrentDirectory(new File(defpath));\r\n\r\n\t\tchooser.setFileFilter(new javax.swing.filechooser.FileFilter() {\r\n\t\t\tpublic boolean accept(File f) {\r\n\t\t\t\treturn f.getName().toLowerCase().endsWith(\".xlsx\") || f.isDirectory();\r\n\t\t\t}\r\n\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"Excel Mapping File\";\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tint r = chooser.showOpenDialog(new JFrame());\r\n\t\tif (r == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t//String name = chooser.getSelectedFile().getName();\r\n\t\t\tString path = chooser.getSelectedFile().getPath();\r\n\t\t\t//System.out.println(name + \"\\n\" + path);\r\n\t\t\tres = path;\r\n\t\t} else if (r == JFileChooser.CANCEL_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"User cancelled operation. No file was chosen.\");\r\n\t\t} else if (r == JFileChooser.ERROR_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"An error occured. No file was chosen.\");\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Unknown operation occured.\");\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n\n JFileChooser chooser = new JFileChooser(); ////apabila merah -> ALT+ENTER -> j file chooser -> TOP\n chooser.showOpenDialog(null);\n File f = chooser.getSelectedFile();\n String filename = f.getAbsolutePath();\n vpath.setText(filename);\n }", "public File loadFile() {\n\t\tchooser.showOpenDialog(this);\n\t\treturn chooser.getSelectedFile();\n\t}", "public static File getFile()\n {\n JFileChooser chooser;\n try{\n\n // Get the filename.\n chooser = new JFileChooser();\n int status = chooser.showOpenDialog(null);\n if (status != JFileChooser.APPROVE_OPTION)\n {\n System.out.println(\"No File Chosen\");\n System.exit(0);\n }\n return chooser.getSelectedFile();\n } catch (Exception e)\n {\n System.out.println(\"Exception: \" + e.getMessage());\n System.exit(0);\n\n }\n return null; //should never get here, but makes compiler happy\n }", "private String displayPDFFileDialog() {\r\n String fileName = null;\r\n if(fileChooser == null) {\r\n // COEUSQA-1925: Narrative upload recall the last folder from which an upload Can't be done - Start\r\n// fileChooser = new JFileChooser();\r\n fileChooser = new CoeusFileChooser(CoeusGuiConstants.getMDIForm());\r\n if(budgetSubAwardFileFilter == null) {\r\n budgetSubAwardFileFilter = new BudgetSubAwardFileFilter();\r\n }\r\n fileChooser.setFileFilter(budgetSubAwardFileFilter);\r\n fileChooser.setAcceptAllFileFilterUsed(false);\r\n }\r\n// int selection = fileChooser.showOpenDialog(subAwardBudget);\r\n fileChooser.showFileChooser();\r\n if(fileChooser.isFileSelected()){\r\n // if(selection == JFileChooser.APPROVE_OPTION) {\r\n// File file = fileChooser.getSelectedFile();\r\n File file = fileChooser.getFileName();\r\n // COEUSQA-1925: Narrative upload recall the last folder from which an upload Can't be done - End\r\n fileName = file.getAbsolutePath();\r\n }\r\n return fileName;\r\n }", "public String show() {\n Stage stage = new Stage();\n FileChooser fc = new FileChooser();\n\n //geef de filechooser een duidelijke naam zodat de gebruiker weet wat hij/zij moet doen.\n fc.setTitle(\"Selecteer een eerder opgeslagen .SAV bestand.\");\n\n //zorg dat de filechooser alleen .sav files accepteert.\n FileChooser.ExtensionFilter extentionFilter = new FileChooser.ExtensionFilter(\"SAV files .sav\", \"*.sav\");\n fc.getExtensionFilters().add(extentionFilter);\n\n //initial directory = de home folder van de user.\n String currentDir = System.getProperty(\"user.home\");\n File directoryPath = new File(currentDir);\n fc.setInitialDirectory(directoryPath);\n String filePath = fc.showOpenDialog(stage).getAbsolutePath();\n return filePath;\n }", "public void seleccionarArchivo(){\n JFileChooser j= new JFileChooser();\r\n FileNameExtensionFilter fi= new FileNameExtensionFilter(\"pdf\",\"pdf\");\r\n j.setFileFilter(fi);\r\n int se = j.showOpenDialog(this);\r\n if(se==0){\r\n this.txtCurriculum.setText(\"\"+j.getSelectedFile().getName());\r\n ruta_archivo=j.getSelectedFile().getAbsolutePath();\r\n }else{}\r\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"*.Images\", \"jpg\", \"gif\", \"png\");\r\n fileChooser.addChoosableFileFilter(filter);\r\n int result1 = fileChooser.showOpenDialog(null);\r\n if(result1 == JFileChooser.APPROVE_OPTION) {\r\n \tselectedFile = fileChooser.getSelectedFile();\r\n \treview.setText(selectedFile.getAbsolutePath());\r\n }\r\n }", "public File getFileChooserDirectory() {\n\n\t\tFile dir = null;\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(diffuseBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(specularBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(((TextField) textureInputLayout.lookup(\"tex_path\")).getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\treturn dir;\n\t}", "@Override\n\t public void actionPerformed(ActionEvent arg0) {\n\t\t JFileChooser j = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory()); \n\t\t\n\t\t // invoke the showsOpenDialog function to show the save dialog \n\t\t int r = j.showOpenDialog(null); \n\t\t\n\t\t // if the user selects a file \n\t\t if (r == JFileChooser.APPROVE_OPTION) \n\t\t\n\t\t { \n\t\t // set the label to the path of the selected file \n\t\t textfield.setText(j.getSelectedFile().getAbsolutePath()); \n\t\t\n\t\t } \n\t\t // if the user cancelled the operation \n\t\t \n\t\t //\n\t\t \n\t\t }", "void selectDirectory(){\n fc.setCurrentDirectory(new java.io.File( \"saved\" + File.separator));\n fc.setDialogTitle(\"FILE CHOOSER!\");\n FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(\n \"json files (*.json)\", \"json\");\n fc.setFileFilter(xmlfilter);\n int response = fc.showSaveDialog(this);\n if (response == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fc.getSelectedFile();\n System.out.println(\"Save as file: \" + selectedFile.getAbsolutePath());\n } else if (response == JFileChooser.CANCEL_OPTION) {\n System.out.println(\"Cancel was selected\");\n }\n System.out.println(fc.getSelectedFile().getAbsolutePath());\n }", "@Override\r\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t if (resultCode == RESULT_OK) {\r\n\t\t\t if (data != null) {\r\n\t\t\t\t // Get the URI of the selected file\r\n\t\t\t\t uri = data.getData();\r\n\t\t\t\t Log.i(TAG, \"Uri = \" + uri.toString());\r\n\t\t\t\t try {\r\n\t\t\t\t\t // Get the file path from the URI\r\n\t\t\t\t\t final String path = FileUtils.getPath(this, uri);\r\n\t\t\t\t\t Intent intent = new Intent(MainActivity.this, ShowFileActiviy.class);\r\n\t\t\t\t\t intent.putExtra(\"file_path\", path);\r\n\t\t\t\t\t startActivity(intent);\r\n\t\t\t\t } catch (Exception e) {\r\n\t\t\t\t\t Log.e(\"FileSelectorTestActivity\", \"File select error\", e);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t }", "private File showOpenDialog()\n {\n \tJFileChooser fc = new JFileChooser(m_preferences.get(\"path-load-game\"));\n \tint ret = fc.showOpenDialog(this);\n \tif (ret == JFileChooser.APPROVE_OPTION)\n \t return fc.getSelectedFile();\n \treturn null;\n }", "private void fileChooser(){\n JFileChooser chooser = new JFileChooser();\n // Note: source for ExampleFileFilter can be found in FileChooserDemo,\n // under the demo/jfc directory in the JDK.\n //ExampleFileFilter filter = new ExampleFileFilter();\n// filter.addExtension(\"jpg\");\n// filter.addExtension(\"gif\");\n// filter.setDescription(\"JPG & GIF Images\");\n // chooser.setFileFilter(new javax.swing.plaf.basic.BasicFileChooserUI.AcceptAllFileFilter());\n int returnVal = chooser.showOpenDialog(this.getContentPane());\n if(returnVal == JFileChooser.APPROVE_OPTION) {\n System.out.println(\"You chose to open this file: \" +\n chooser.getSelectedFile().getName());\n try{\n this.leerArchivo(chooser.getSelectedFile());\n\n }\n catch (Exception e){\n System.out.println(\"Imposible abrir archivo \" + e);\n }\n }\n }", "public void chooseFile(String fileName) {\n getQueueTool().waitEmpty();\n output.printTrace(\"Choose file by JFileChooser\\n : \" + fileName\n + \"\\n : \" + toStringSource());\n JTextFieldOperator fieldOper = new JTextFieldOperator(getPathField());\n fieldOper.copyEnvironment(this);\n fieldOper.setOutput(output.createErrorOutput());\n //workaround\n fieldOper.setText(fileName);\n //fieldOper.clearText();\n //fieldOper.typeText(fileName);\n //approveSelection();\n approve();\n }", "private void getFileOrDirectory() {\r\n // display file dialog, so user can choose file or directory to open\r\n JFileChooser fileChooser = new JFileChooser();\r\n\t fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\r\n fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES );\r\n\r\n int result = fileChooser.showOpenDialog(this);\r\n\r\n // if user clicked Cancel button on dialog, return\r\n if (result == JFileChooser.CANCEL_OPTION )\r\n System.exit( 1 );\r\n\r\n File name = fileChooser.getSelectedFile(); // get File\r\n\r\n // display error if invalid\r\n if ((name == null) || (name.getName().equals( \"\" ))){\r\n JOptionPane.showMessageDialog(this, \"Invalid Name\",\r\n \"Invalid Name\", JOptionPane.ERROR_MESSAGE );\r\n System.exit( 1 );\r\n } // end if\r\n\t \r\n\t filename = name.getPath();\r\n }", "private void jButtonBrowseFileNameActionPerformed(ActionEvent e) {\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tint result = fileChooser.showSaveDialog(this);\n\t\tif (result == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fileChooser.getSelectedFile();\n\t\t\tjTextFieldFileName.setText(file.getAbsolutePath());\n\t\t}\n\t}", "public void mouseClicked(MouseEvent e) {\n int returnVal = fileChooser.showOpenDialog(FileChooserField.this);\n \t\t \n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fileChooser.getSelectedFile();\n destinationTextField.setText(file.getPath());\n }\n \n destinationTextField.setCaretPosition(destinationTextField.getDocument().getLength());\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser fc = new JFileChooser();\n int result = fc.showDialog(this, \"Attach\");\n if (result == JFileChooser.APPROVE_OPTION) \n {\n selectedFile = fc.getSelectedFile();\n \tjTextField1.setText(selectedFile.getAbsolutePath());\n \n }\n \n }", "java.lang.String getFilePath();", "private void selectXmlFile() {\n\t\t JFileChooser chooser = new JFileChooser();\n\t\t // ask for a file to open\n\t\t int option = chooser.showSaveDialog(this);\n\t\t if (option == JFileChooser.APPROVE_OPTION) {\n\t\t\t // get pathname and stick it in the field\n\t\t\t xmlfileField.setText(\n chooser.getSelectedFile().getAbsolutePath());\n\t\t } \n }", "private void showFileChooser(){\n\t\t//Create the file chooser with a default directory of the last downloadPath (default will be user.home\\Downloads\\)\n\t\tJFileChooser chooser = new JFileChooser(downloadPath);\n\t\t//Allow the file chooser to only select directories\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t//Set the title\n\t\tchooser.setDialogTitle(\"Choose where to save your images\");\n\t\t//If the user chose a directory, then set the new path\n\t\tif(chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){\t\n\t\t\tdownloadPath = chooser.getSelectedFile().getAbsolutePath() + File.separator;\n\t\t}\n\t\t//If the user did not choose a directory, then reset to default path\n\t\telse{\n\t\t\tsetDefaultPath();\n\t\t}\n\t\t//Check to see if the path is completed by a \\\n\t\tif(!downloadPath.endsWith(File.separator)){\n\t\t\tdownloadPath += File.separator;\n\t\t}\n\t\t//Update to let the user see where their files are downloaded\n\t\tcurrentPath.setText(downloadPath);\n\t\tcurrentPath.setToolTipText(downloadPath);\n\t}", "@Override\n @Nullable\n public VirtualFile getSelectedFile() {\n return getVirtualFile();\n }", "private IFile getSelectedFile(String fileName) {\r\n IFile file = null;\r\n if (!Utils.isEmpty(fileName)) {\r\n\t\t\tfile = this.getRootRelativeFile(fileName);\r\n if (!this.existFile(file)) {\r\n \tfile = this.getEditorRelativeFile(fileName);\r\n if (!this.existFile(file)) {\r\n \tfile = this.getNoRelativeFile(fileName);\r\n }\r\n }\r\n }\r\n return file;\r\n }", "private File openFileChooser(String filetype) throws IOException {\n JFileChooser chooser = new JFileChooser(projectController.getProjectInfo().getPdf());\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\n filetype.toUpperCase(), filetype.toLowerCase());\n chooser.setFileFilter(filter);\n int returnVal = chooser.showOpenDialog(null);\n File output = null;\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n output = chooser.getSelectedFile();\n }\n\n if (output == null) {\n throw new IOException(\"user aborted pdf selection process\");\n }\n\n return output;\n }", "public String getFileName() {\r\n\t\tString filename=\"\";\r\n\t\tJFileChooser file = new JFileChooser();\r\n\t\tfile.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n\t\tfile.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"Image Files\", \"jpg\", \"png\", \"tif\");\r\n\t\tfile.addChoosableFileFilter(filter);\r\n\t\tfile.setAcceptAllFileFilterUsed(true);\r\n\r\n\t\tint temp=file.showOpenDialog(jf);\r\n\t\tif(temp==JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile selectedFile = file.getSelectedFile();\r\n\t\t\tif(selectedFile.length()==0) {\r\n\t\t\t\tJOptionPane.showMessageDialog(jf,\r\n\t\t\t\t\t \"ERROR: Image cannot be opened.\"\r\n\t\t\t\t\t\t+\"\\nPress OK to select another image\",\r\n\t\t\t\t\t \"Error\",\r\n\t\t\t\t\t JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\treturn getFileName();\r\n\t\t\t}\r\n\t\t\tfilename=selectedFile.getAbsolutePath();\r\n\t\t}\r\n\t\telse if(temp==JFileChooser.CANCEL_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\telse if(temp==JFileChooser.ERROR_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(jf,\r\n\t\t\t\t \"ERROR: Image cannot be opened.\"\r\n\t\t\t\t\t+\"\\nPress OK to select another image\",\r\n\t\t\t\t \"Error\",\r\n\t\t\t\t JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn getFileName();\r\n\t\t}\r\n\r\n\t\treturn filename;\r\n\t}", "public void fileChooser() {\n\t\tWindow stage = mediaView.getScene().getWindow();\n// configureFileChooser(fileChooser);\n\t\tfileChooser.setTitle(\"Open Resource File\");\n\t\tfileChooser.getExtensionFilters().addAll(new ExtensionFilter(\"Video Files\", \"*.mp4\", \"*.mpeg\"),\n\t\t\t\tnew ExtensionFilter(\"Audio Files\", \"*.mp3\"),\n\t\t\t\tnew ExtensionFilter(\"All Files\", \"*.*\"));\n\t\tFile selectedFile = fileChooser.showOpenDialog(stage);\n\t\tif (selectedFile != null) {\n\t\t\ttry {\n\t\t\t\tif(arrayList.size() != 0) {\n\t\t\t\t\tmp.stop();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdesktop.open(selectedFile);\n\t\t\t\tdirectory = selectedFile.getAbsolutePath();\n\t\t\t\t\n\t\t\t\tplayMedia(directory);\n\t\t\t\t\n\t\t\t\tarrayList.add(new File(directory));\n//\t\t\t\tSystem.out.println(arrayList.get(i).getName());\n\t\t\t\ti++;\n\t\t\t\t\n\n\t\t\t} catch (IOException ex) {\n\t\t\t\tLogger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t}\n\t\t}\n\t}", "public void seleccionarFichero(){\n JFileChooser fileChooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"xml\", \"xml\");\n fileChooser.setFileFilter(filter);\n fileChooser.setCurrentDirectory(new java.io.File(\"./ficheros\"));\n int seleccion = fileChooser.showOpenDialog(vista_principal);\n if (seleccion == JFileChooser.APPROVE_OPTION){\n fichero = fileChooser.getSelectedFile();\n vista_principal.getTxtfield_nombre_fichero().\n setText(fichero.getName().substring(0, fichero.getName().length()-4));\n }\n }", "@FXML\r\n\tprivate void choisirFichier()\r\n\t{\r\n\t\tFileChooser fileChooser = new FileChooser();\r\n\r\n\t\tfileChooser\r\n\t\t\t\t.setInitialDirectory(new File(System.getProperty(\"user.dir\")));\r\n\t\tFile fichier = fileChooser.showOpenDialog(new Stage());\r\n\r\n\t\tif (fichier != null)\r\n\t\t{\r\n\t\t\ttextFieldFichier.setText(fichier.getPath());\r\n\t\t}\r\n\t}", "public String getOpenFilePath() {\n\t\treturn filePath.getText();\n\t}", "public String chooserFileTrans(String def) {\r\n\t\tString res = \"\";\r\n\t\tString defpath = def;\r\n\t\tJFileChooser chooser = new JFileChooser();\r\n\t\tchooser.setCurrentDirectory(new File(defpath));\r\n\r\n\t\tchooser.setFileFilter(new javax.swing.filechooser.FileFilter() {\r\n\t\t\tpublic boolean accept(File f) {\r\n\t\t\t\treturn f.getName().toLowerCase().endsWith(\".xslt\") || f.isDirectory();\r\n\t\t\t}\r\n\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"XSLT FILE\";\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tint r = chooser.showOpenDialog(new JFrame());\r\n\t\tif (r == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t//String name = chooser.getSelectedFile().getName();\r\n\t\t\tString path = chooser.getSelectedFile().getPath();\r\n\t\t\t//System.out.println(name + \"\\n\" + path);\r\n\t\t\tres = path;\r\n\t\t} else if (r == JFileChooser.CANCEL_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"User cancelled operation. No file was chosen.\");\r\n\t\t} else if (r == JFileChooser.ERROR_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"An error occured. No file was chosen.\");\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Unknown operation occured.\");\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private void jButtonBrowseOutputFileActionPerformed(ActionEvent e) {\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tint result = fileChooser.showSaveDialog(this);\n\t\tif (result == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fileChooser.getSelectedFile();\n\t\t\tjTextFieldOutputFile.setText(file.getAbsolutePath());\n\t\t}\n\t}", "public JFileChooser getaFileChooser() {\r\n\t\treturn aFileChooser;\r\n\t}", "public File start(){\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tfileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n\t\tint result = fileChooser.showOpenDialog(null);\n\t\tFile selectedFile = null;\n\t\tif (result == JFileChooser.APPROVE_OPTION) {\n\t\t\tselectedFile = fileChooser.getSelectedFile();\n\t\t}\n\t\treturn selectedFile;\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\tif(e.getSource()==browse){\n\t\t\tif (chooser == null){\n\t\t\t\tchooser = new JFileChooser();\n\t\t\t\tchooser.setCurrentDirectory(new java.io.File(projectPath));\n\t\t\t\tchooser.setDialogTitle(\"Find Folder\");\n\t\t\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t\t\tchooser.setAcceptAllFileFilterUsed(false);\n\n\t\t\t\tif (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\tsaveTo.setText(chooser.getSelectedFile().toString());\t\t\n\t\t\t\t}\n\t\t\t\tchooser = null;\n\t\t\t}\t\n\t\t}else if(e.getSource()== save){\n\t\t\tsaveFile();\n\t\t}else if(e.getSource()==cancel){\n\t\t\tnameOfFile.setText(\"\");\n\t\t\tsaveTo.setText(\"\");\n\t\t\tthisFrame.dispose();\n\t\t}\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n\t \tJFileChooser fileChooser = new JFileChooser(lastChoosenDir);\n\t int returnValue = fileChooser.showOpenDialog(null);\n\t if (returnValue == JFileChooser.APPROVE_OPTION) {\n\t selectedFile = fileChooser.getSelectedFile();\n\t lastChoosenDir = selectedFile.getParentFile();\n\t System.out.println(selectedFile.getName());\n\t // lblSlika=new JLabel(\"aa\");\n\t displayChosen();\n\t \n\t // content.add(lblSlika);\n\t \n\t }\n\t }", "private File showSaveAsDialog()\n {\n \tJFileChooser fc = new JFileChooser(m_preferences.get(\"path-save-game\"));\n \tif (m_file != null) fc.setSelectedFile(m_file);\n \tint ret = fc.showSaveDialog(this);\n \tif (ret == JFileChooser.APPROVE_OPTION)\n \t return fc.getSelectedFile();\n \treturn null;\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser fc = new JFileChooser();\n fc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n int result = fc.showOpenDialog(this);\n if (result == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fc.getSelectedFile();\n myFile = selectedFile.getAbsolutePath().replaceAll(\"\\\\\\\\\", \"/\");\n //System.out.println(\"Selected file: \" + myFile);\n }\n jSimulationBtn.setEnabled(true);\n jBtnFuzzy.setEnabled(true);\n jFileTxt.setText(myFile);\n }", "private static JFileChooser createFileChooser() {\n final JFileChooser fc = new JFileChooser();\n fc.setCurrentDirectory(new java.io.File(\".\"));\n fc.setDialogTitle(\"Select the folder containing project files and audio exports\");\n fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n fc.setCurrentDirectory(loadFilePath());\n return fc;\n }", "@Override\r\n\tpublic void onBrowserSelected() {\n\t\tLog.d(TAG, \"onBrowserSelected()\");\r\n\t\t\r\n // Use the GET_CONTENT intent from the utility class\r\n Intent target = FileUtils.createGetContentIntent();\r\n // Create the chooser Intent\r\n Intent intent = Intent.createChooser(\r\n target, getString(R.string.choose_file));\r\n try {\r\n startActivityForResult(intent, 6383);\r\n } catch (ActivityNotFoundException e) {\r\n \tToast.makeText(getApplicationContext(), \"Couldn't open file browser\", Toast.LENGTH_SHORT).show();\r\n }\r\n\t}", "private void choosefileBtnActionPerformed(ActionEvent evt) {\r\n JFileChooser filechooser = new JFileChooser();\r\n int returnValue = filechooser.showOpenDialog(panel);\r\n if(returnValue == JFileChooser.APPROVE_OPTION) {\r\n filename = filechooser.getSelectedFile().toString();\r\n fileTxtField.setText(filename);\r\n codeFile = filechooser.getSelectedFile();\r\n assemblyreader = new mipstoc.read.CodeReader(codeFile);\r\n inputTxtArea.setText(assemblyreader.getString());\r\n }\r\n \r\n }", "private String openFileChooser(boolean p_opener, SimpleFileFilter[] p_fileFilters)\r\n {\r\n String retval = null;\r\n \r\n // Take care of the file filters.\r\n if (p_fileFilters.length == 0)\r\n {\r\n m_fc.setAcceptAllFileFilterUsed(true);\r\n }\r\n else\r\n {\r\n m_fc.resetChoosableFileFilters();\r\n m_fc.setAcceptAllFileFilterUsed(false);\r\n for (int i = 0; i < p_fileFilters.length; i++)\r\n {\r\n m_fc.addChoosableFileFilter(p_fileFilters[i]);\r\n }\r\n }\r\n \r\n // Open a dialog, either an opener of a saver.\r\n int fcState;\r\n if (p_opener)\r\n {\r\n m_fc.setDialogTitle(\"Open file\");\r\n fcState = m_fc.showOpenDialog(m_frame);\r\n }\r\n else\r\n {\r\n m_fc.setDialogTitle(\"Save file\");\r\n fcState = m_fc.showSaveDialog(m_frame);\r\n }\r\n \r\n if (fcState == JFileChooser.APPROVE_OPTION)\r\n {\r\n File file = m_fc.getSelectedFile();\r\n retval = file.getPath();\r\n }\r\n \r\n return retval;\r\n }", "private void jButtonBrowseInputFilesActionPerformed(ActionEvent e) {\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tfileChooser.addChoosableFileFilter(new RootFileFilter());\n\t\tfileChooser.setAcceptAllFileFilterUsed(false);\n\t\tint result = fileChooser.showOpenDialog(this);\n\t\tif (result == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fileChooser.getSelectedFile();\n\t\t\tjTextFieldInputFiles.setText(file.getAbsolutePath());\n\t\t}\n\t}", "String getFilePath();", "@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser j = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n\n // invoke the showsSaveDialog function to show the save dialog\n int r = j.showSaveDialog(null);\n\n if (r == JFileChooser.APPROVE_OPTION) {\n // set the label to the path of the selected directory\n dataFile.setText(j.getSelectedFile().getAbsolutePath());\n }\n // if the user cancelled the operation\n else\n dataFile.setText(\"the user cancelled the operation\");\n }", "public String saveFile( Component parent )\n\t{\n\t\t\n\t JFileChooser fc = new JFileChooser();\n\t fc.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY);\n\t String s=null;\n\t //if( fc.showSaveDialog( parent ) == JFileChooser.SAVE_DIALOG )\n\t //{\n\t // return fc.getSelectedFile().getAbsolutePath();\n\t //}\n\t int rVal = fc.showSaveDialog(frame);\n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\t \n\t s=fc.getCurrentDirectory().toString()+\"/\"+fc.getSelectedFile().getName();\n\t }\n\t if (rVal == JFileChooser.CANCEL_OPTION) {\n\t \t JOptionPane.showMessageDialog(frame,\"you have pressed cancel,nothing will get saved\");\n\t }\n\t \n\n\t return s;\n\t}", "public JFileChooser getQuestionFileChooser() {\r\n\t\treturn qFileChooser;\r\n\t}", "public static Optional<File> showFileSaverAndGetAbsPath() {\n FileChooser fileChooser = new FileChooser();\n File saved = fileChooser.showSaveDialog(new Stage());\n return Optional.ofNullable(saved);\n }", "public File getSaveFile(){\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setFileFilter(new FileNameExtensionFilter(\n \"GMS Files Only\", \"GMS\"));\n int returnValue = fileChooser.showSaveDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n return fileChooser.getSelectedFile();\n \n }else{\n return null;\n }\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), 234);\n }", "@FXML\n private void selectPath(MouseEvent mouseEvent) {\n\n DirectoryChooser directoryChooser = new DirectoryChooser();\n File selectedDirectory = directoryChooser.showDialog(getStage(mouseEvent));\n if (selectedDirectory != null){\n pathTextField.setText(selectedDirectory.getPath());\n }\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser(); \n int returnVal = fc.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fc.getSelectedFile();\n System.out.println(file.getAbsolutePath()); \n image = loadImage( file);\n }\n }", "protected void openFileChooser(ValueCallback uploadMsg, String acceptType)\n {\n mUploadMessage = uploadMsg;\n Intent i = new Intent(Intent.ACTION_GET_CONTENT);\n i.addCategory(Intent.CATEGORY_OPENABLE);\n i.setType(\"*/*\");\n startActivityForResult(Intent.createChooser(i, \"File Browser\"), FILECHOOSER_RESULTCODE);\n }", "private JFileChooser getInChooser() \r\n {\r\n if (inChooser == null) \r\n {\r\n inChooser = new JFileChooser();\r\n }\r\n return inChooser;\r\n }", "Path getFilePath();", "static String save() {\n JFileChooser fileChooser;\n String path = FileLoader.loadFile(\"path.txt\");\n if (path != null) {\n fileChooser = new JFileChooser(path);\n } else {\n fileChooser = new JFileChooser((FileSystemView.getFileSystemView().getHomeDirectory()));\n }\n\n fileChooser.setDialogTitle(\"Save text file\");\n fileChooser.setDialogType(JFileChooser.SAVE_DIALOG);\n\n if (fileChooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {\n FileLoader.saveFile(\"path.txt\", fileChooser.getSelectedFile().getParent(), false);\n return fileChooser.getSelectedFile().getAbsolutePath() + \".mytxt\" ;\n }\n return null;\n }", "private void chooseRemaindersFile() {\n JFileChooser setEF = new JFileChooser(System.getProperty(\"user.home\"));\n setEF.setDialogType(JFileChooser.OPEN_DIALOG);\n setEF.showDialog(this, \"Выбрать файл\");\n remainderFile = setEF.getSelectedFile();\n putLog(\"Файл остатков: \" + remainderFile.getPath());\n jbParse.setEnabled(workingDirectory != null && remainderFile != null);\n }", "@objid (\"116a5759-3df1-4c8b-bd9e-e521507f07e6\")\r\n public String searchFile() {\r\n String nomFichier = this.dialog.open();\r\n if ((nomFichier != null) && (nomFichier.length() != 0)) {\r\n this.currentFile = new File(nomFichier);\r\n this.text.setText(nomFichier);\r\n }\r\n return this.text.getText();\r\n }", "public File selectLocalFile() {\n\t\tFile[] localFiles = this.getLocalFiles();\n\t\t\n\t\tthis.printArrayOfFile(localFiles);\n\t\t\n\t\tint selectedIndex = -1;\n\t\twhile (!(selectedIndex >= 0 && selectedIndex < localFiles.length)) {\n\t\t\tselectedIndex = textUI.getInt(\"Which index to select?\"); \n\t\t}\n\t\treturn localFiles[selectedIndex];\n\t}", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "private void outputBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_outputBrowseButtonActionPerformed\n if (fileChooser1.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n outputDirText.setText(fileChooser1.getSelectedFile().getAbsolutePath());\n } else {\n System.out.println(\"File access cancelled.\");\n }\n }", "private void startFileSelection() {\n final Intent chooseFile = new Intent(Intent.ACTION_GET_CONTENT);\n chooseFile.setType(getString(R.string.file_type));\n startActivityForResult(chooseFile, PICK_FILE_RESULT_CODE);\n }", "private void processChooseFileButton() {\n try {\n dataOutputArea.setText(\"\");\n JFileChooser myFileChooser = new JFileChooser(\".\", FileSystemView.getFileSystemView());\n int returnValue = myFileChooser.showOpenDialog(null);\n if(returnValue == JFileChooser.APPROVE_OPTION) {\n selectedFile = myFileChooser.getSelectedFile();\n dataFileField.setText(selectedFile.getName());\n }\n } catch(Exception e) {\n System.out.println(\"There was an error with JFileChooser!\\n\\n\" + e.getMessage());\n } //end of catch()\n }", "@JavascriptInterface\n public String choosePhoto() {\n String file = \"test\";\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, SELECT_GALLERY_PHOTO);\n return file;\n }", "private static File getProjectsPath() {\n File projectsPath = loadFilePath();\n if (projectsPath == null) {\n JFileChooser fc = createFileChooser();\n if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n return fc.getSelectedFile();\n }\n }\n return projectsPath;\n }", "private JFileChooser getOutChooser() \r\n {\r\n if (outChooser == null) \r\n {\r\n outChooser = new JFileChooser();\r\n }\r\n return outChooser;\r\n }", "protected void openFileChooser(ValueCallback uploadMsg, String acceptType) {\n mUploadMessage = uploadMsg;\n Intent i = new Intent(Intent.ACTION_GET_CONTENT);\n i.addCategory(Intent.CATEGORY_OPENABLE);\n i.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(i, \"File Browser\"), FILECHOOSER_RESULTCODE);\n }", "public static File selectSingleFile(final String extension_pattern, JFrame parent) {\n File ret = null;\n JFileChooser fc = new JFileChooser(new File(FrameworkConstants.DATA_FOLDER_TRADE_LOG));\n fc.setFileFilter(new FileFilter() {\n public boolean accept(File file) {\n if (file.isDirectory())\n return true;\n\n int ext_pos = file.getName().lastIndexOf(extension_pattern);\n if (ext_pos > 0)\n return true;\n return false;\n }\n\n public String getDescription() {//this shows up in description field of dialog\n return \"*\" + extension_pattern;\n }\n });\n fc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n fc.setAcceptAllFileFilterUsed(false);\n int reply = fc.showOpenDialog(parent);\n if (reply == JFileChooser.APPROVE_OPTION) {\n ret = fc.getSelectedFile();\n String file_name = ret.getName();\n\n //warn about wrong extension\n if (!file_name.endsWith(extension_pattern)) {\n MessageBox.messageBox(parent, Constants.COMPONENT_BUNDLE.getString(\"warning\"),\n Constants.COMPONENT_BUNDLE.getString(\"dup_msg_1\") + extension_pattern +\n Constants.COMPONENT_BUNDLE.getString(\"dup_msg_2\"),\n MessageBox.OK_OPTION, MessageBox.WARNING_MESSAGE);\n return null;\n }\n\n //warn empty file name\n else if (file_name.equals(\"\")) {\n MessageBox.messageBox(parent,\n FrameworkConstants.FRAMEWORK_BUNDLE.getString(\"warning\"),\n Constants.COMPONENT_BUNDLE.getString(\"empty_msg_1\"),\n MessageBox.OK_OPTION, MessageBox.WARNING_MESSAGE);\n return new File(\"file_Name\" + extension_pattern);\n }\n\n//todo check duplicate\n }\n return ret;\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "private void showFileChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "public JFileChooser getqFileChooser() {\r\n\t\treturn qFileChooser;\r\n\t}", "public File openFile(Frame mainFrame) {\n prepare(true);\n if (showOpenDialog(mainFrame) == JFileChooser.APPROVE_OPTION) {\n File selectedfile = getSelectedFile();\n if (selectedfile.exists()) {\n return selectedfile;\n }\n }\n return null;\n }" ]
[ "0.831586", "0.7814486", "0.7763804", "0.75956434", "0.75760746", "0.7531088", "0.75000924", "0.74346036", "0.7433406", "0.73256433", "0.72982025", "0.726373", "0.71933794", "0.7190177", "0.71822286", "0.71711797", "0.71490026", "0.713317", "0.7122509", "0.7090097", "0.70881337", "0.70749325", "0.69821006", "0.6980098", "0.6968886", "0.6923361", "0.6895125", "0.6890226", "0.6881457", "0.68691653", "0.68468255", "0.68457246", "0.6807754", "0.6803906", "0.6787208", "0.67759514", "0.6736542", "0.67300737", "0.671262", "0.67064214", "0.66912585", "0.6688145", "0.66874814", "0.6663789", "0.66534305", "0.6653241", "0.66354394", "0.6625766", "0.6608331", "0.6602259", "0.6594679", "0.6539855", "0.6530724", "0.6528001", "0.6513155", "0.6511503", "0.6500165", "0.64956236", "0.64934206", "0.6488728", "0.6486251", "0.64823043", "0.64822996", "0.6470059", "0.6454977", "0.6449285", "0.64454645", "0.64354306", "0.64348096", "0.6424858", "0.6422093", "0.6411186", "0.6404996", "0.63998395", "0.6375568", "0.63625973", "0.63423955", "0.6319694", "0.63130945", "0.63095206", "0.6306527", "0.62944484", "0.62787324", "0.6277838", "0.62716717", "0.62598187", "0.62581044", "0.62516385", "0.6227686", "0.62271005", "0.6223418", "0.6222403", "0.62166226", "0.62088656", "0.62042654", "0.6203161", "0.6191975", "0.6191975", "0.6190006", "0.6180794" ]
0.73809344
9
This is a crossvalidation method which allows the user to select how many partitions into which they would like to divide the data. It then prints to the console the percent accuracy of the algorithmic predictions.
public float crossValidation(Integer n) { System.out.println("Choose tags file..."); String typeFileName = setFilePath(); System.out.println("Choose words file..."); String sentenceFile = setFilePath(); BufferedReader inputType = null; BufferedReader inputWord = null; try { inputType = new BufferedReader( new FileReader(typeFileName)); inputWord = new BufferedReader( new FileReader(sentenceFile)); String lineType; String lineWord; //make two array lists of the entire text files, line by line while ((lineType = inputType.readLine()) != null && (lineWord = inputWord.readLine()) != null) { this.typeFile.add(lineType); this.textFile.add(lineWord); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { inputType.close(); inputWord.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } double correctFreq = 0.0; double totalPredictions = 0.0; int lineNumber = 0; Integer iteration = 0; while (iteration < n) { ArrayList<String> sentences = new ArrayList<String>(); ArrayList<String> types = new ArrayList<String>(); //for each iteration, will deal out the correct line for cross-validation to testing //and the rest will be used for tagging while (lineNumber < this.textFile.size()) { if ((lineNumber) % n == iteration ) { sentences.add(this.textFile.get(lineNumber)); types.add(this.typeFile.get(lineNumber)); } else { updateFrequency(this.textFile.get(lineNumber), this.typeFile.get(lineNumber)); } lineNumber ++; } //once training is complete for this iteration, create the final probability maps updateFinalMaps(); int i = 0; for (String sentence: sentences) { System.out.println(sentence); ArrayList<String> prediction = predict(sentence); String[] actual = types.get(i).split(" "); String s = ""; //for each tag, if they are equal, add 1 to correctFrequency for (int num = 0; num < prediction.size(); num ++){ if (actual[num].equals(prediction.get(num))) { correctFreq += 1; } //increase the total number of predictions totalPredictions += 1; s += prediction.get(num) + " "; } s = s.trim(); System.out.println("Prediction: " + s); i++; //next iteration } this.transMap.clear(); this.transMapTemp.clear(); this.emissionMap.clear(); this.emissionMapTemp.clear(); iteration += 1; } return (float) (correctFreq / totalPredictions) * 100; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doValidation(int currentRound)\n {\n getData(currentRound);\n// System.out.println(\"training unterminated ones\");\n kMeans.setItems(trainingData.get(0));\n kMeans.k=k1;\n kMeans.init();\n List<Cluster> unterminatedClusters=kMeans.doCluster();\n for (int i=0;i<unterminatedClusters.size();i++)\n {\n unterminatedClusters.get(i).label=0;\n }\n \n// System.out.println(\"training terminated ones\");\n kMeans.setItems(trainingData.get(1));\n kMeans.k=k2;\n kMeans.init();\n List<Cluster> terminatedClusters=kMeans.doCluster();\n for (int i=0;i<terminatedClusters.size();i++)\n {\n terminatedClusters.get(i).label=1;\n }\n \n List<Cluster> clusters=new ArrayList<Cluster>();\n clusters.addAll(unterminatedClusters);\n clusters.addAll(terminatedClusters);\n kMeans.setClusters(clusters);\n int[] corrects=new int[2];\n int[] counts=new int[2];\n for (int i=0;i<2;i++)\n {\n corrects[i]=0;\n counts[i]=0;\n }\n for (Item item:testData)\n {\n int label=kMeans.getNearestCluster(item).label;\n counts[label]++;\n if (label==item.type)\n {\n corrects[item.type]++;\n }\n }\n correctness+=corrects[1]*1.0/counts[1];\n correctCount+=corrects[1];\n// for (int i=0;i<2;i++)\n// System.out.println(\"for type \"+i+\": \" +corrects[i]+\" correct out of \"+counts[i]+\" in total (\"+corrects[i]*1.0/counts[i]+\")\");\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 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 }", "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}", "public double crossValidation(Classifier classifier, int split, Instances instances, StringBuilder stringBuilder) throws Exception {\n evaluation = new Evaluation(instances);\n evaluation.crossValidateModel(classifier, instances, split, new Random(1));\n stringBuilder.append(\"Cross-Validation: \" + \"\\n\");\n stringBuilder.append(evaluation.toSummaryString() + \"\\n\");\n stringBuilder.append(evaluation.toMatrixString() + \"\\n\");\n return evaluation.pctCorrect();\n }", "private double validate(int k) {\n\t\tArrayList<Product> allData = trainData;\n\t\tshuffle(allData);\n\t\tArrayList<Double> accurs = new ArrayList<Double>();\n\t\tif (k < 1 || k > allData.size()) return -1;\n\t\tint foldLength = allData.size() / k;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tArrayList<Product> fold = new ArrayList<Product>();\n\t\t\tArrayList<Product> rest = new ArrayList<Product>();\n\t\t\tfold.addAll(allData.subList(i * foldLength, (i + 1) * foldLength));\n\t\t\trest.addAll(allData.subList(0, i * foldLength));\n\t\t\trest.addAll(allData.subList((i + 1) * foldLength, allData.size()));\n\t\t\tdouble[] predict = classify(fold, rest);\n\t\t\tdouble[] real = getLabels(fold);\n\t\t\taccurs.add(getAccuracyBinary(predict, real));\n\t\t}\n\t\tdouble accur = 0;\n\t\tfor (int i = 0; i < accurs.size(); i++) {\n\t\t\taccur += accurs.get(i);\n\t\t}\n\t\taccur /= accurs.size();\n\t\treturn accur;\n\t}", "public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\r\n\t}", "public static void main(String[] args) {\n\t\tint[] featuresRemoved = new int[]{14,15,0,3,7,8,9,13}; //removed age,education,relationship,race,sex,country\n\t\t\n\t\tCrossValidation.Allow_testSet_to_be_Appended = true;\n\t\tDataManager.SetRegex(\"?\");\n\t\tDataManager.SetSeed(0l); //debugging for deterministic random\n\t\t\n\t\tArrayList<String[]> dataSet = DataManager.ReadCSV(\"data/adult.train.5fold.csv\",false);\n\t\tdataSet = DataManager.ReplaceMissingValues(dataSet);\n\t\tDoubleMatrix M = DataManager.dataSetToMatrix(dataSet,14);\n\t\tList<DoubleMatrix> bins = DataManager.split(M, 15);\n\t\t//List<DoubleMatrix> bins = DataManager.splitFold(M, 5,true); //random via permutation debugging\n\t\t\n\t\tArrayList<String[]> testSet = DataManager.ReadCSV(\"data/adult.test.csv\",false);\n\t\ttestSet = DataManager.ReplaceMissingValues(testSet);\n\t\tDoubleMatrix test = DataManager.dataSetToMatrix(testSet,14);\n\t\tList<DoubleMatrix> testBins = DataManager.splitFold(test, 8, false);\n\t\t\n\t\t\n\t\t//initiate threads \n\t\tint threadPool = 16;\n\t\tExecutorService executor = Executors.newFixedThreadPool(threadPool);\n\t\tList<Callable<Record[]>> callable = new ArrayList<Callable<Record[]>>();\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis(); //debugging - test for optimisation \n\t\t\n\t\t\n\t\t\n\t\t//unweighted\n\t\tSystem.out.println(\"Validating Unweighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\t\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,false);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> unweightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tunweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\t\n\t\n\t\tcallable.clear();\n\t\t\n\t\t\n\t\t\n\t\t//weighted\n\t\tSystem.out.println(\"Validating Weighted KNN...\");\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tDoubleMatrix Train = new DoubleMatrix(0,bins.get(0).columns);\n\t\t\tDoubleMatrix Validation = bins.get(i);\n\t\t\t\n\t\t\tfor(int j = 0; j < bins.size(); j++) {\n\t\t\t\tif(i != j) {\n\t\t\t\t\tTrain = DoubleMatrix.concatVertically(Train, bins.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//build worker thread\n\t\t\tCrossValidation fold = new CrossValidation(Train, Validation,14,featuresRemoved,40,2,true);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\t//returned statistics of each fold.\n\t\tList<Record[]> weightedRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\t//collect all work thread values \n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\tweightedRecords.add(recordFold.get());\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t\t//find best parameter \n\t\tint bestKNN = 0;\n\t\tdouble bestAccuracy = 0;\n\t\tboolean weighted = false;\n\t\tint validationIndex = 0;\n\t\tfor(int i = 0; i < unweightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < unweightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ unweightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = unweightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy > bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = false;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : unweighted : \" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : unweighted : \" + currentAccuracy);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < weightedRecords.get(0).length; i++) {\n\t\t\t\n\t\t\tint currentK = 0;\n\t\t\tdouble currentAccuracy = 0;\n\t\t\t\n\t\t\tList<Record[]> a = new ArrayList<Record[]>();\n\t\t\tfor(int j = 0; j < weightedRecords.size(); j ++) { \n\t\t\t\ta.add(new Record[]{ weightedRecords.get(j)[i]});\n\t\t\t\tcurrentK = weightedRecords.get(j)[i].KNN;\n\t\t\t}\n\t\t\t\n\t\t\tint[][] m = DataManager.combineMat(a);\n\t\t\tcurrentAccuracy = DataManager.getAccuracy(m);\n\t\t\t\n\t\t\tif(currentAccuracy >= bestAccuracy) {\n\t\t\t\tbestKNN = currentK;\n\t\t\t\tbestAccuracy = currentAccuracy;\n\t\t\t\tweighted = true;\n\t\t\t\tvalidationIndex = i;\n\t\t\t\tSystem.out.println(bestKNN + \" : weighted :\" +bestAccuracy + \" : Best\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(currentK + \" : weighted :\" + currentAccuracy);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t\n\t\tList<Record[]> bestValidation = new ArrayList<Record[]>();\n\t\tfor(int i = 0; i < bins.size(); i++) {\n\t\t\tif(weighted) {\n\t\t\t\tbestValidation.add(new Record[]{ weightedRecords.get(i)[validationIndex]});\n\t\t\t} else {\n\t\t\t\tbestValidation.add(new Record[]{ unweightedRecords.get(i)[validationIndex]});\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Testing...\");\n\t\t\n\t\t//KNN on test set\n\t\tcallable.clear();\n\t\t\n\t\t//build worker threads\n\t\tfor(int i = 0; i < testBins.size(); i++) {\n\t\t\tCrossValidation fold = new CrossValidation(M, testBins.get(i),14,featuresRemoved,bestKNN,bestKNN,weighted);\n\t\t\tcallable.add(fold);\n\t\t}\n\t\t\n\t\tList<Record[]> testRecords = new ArrayList<Record[]>();\n\t\t\n\t\ttry {\n\t\t\tList<Future<Record[]>> set = executor.invokeAll(callable);\n\t\t\t\n\t\t\tfor(Future<Record[]> recordFold : set) {\n\t\t\t\ttestRecords.add(recordFold.get());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tint[][] testM = DataManager.combineMat(testRecords);\n\t\tdouble testAccuracy = DataManager.getAccuracy(testM);\n\t\t//double teststd = DataManager.GetStd(testRecords);\n\t\t\n\t\t//print stuff\n\t\tSystem.out.println(bestKNN + \" : \"+ weighted + \" : \" + testAccuracy);\n\t\tSystem.out.println(testM[0][0] + \", \" + testM[0][1] +\", \" + testM[1][0] + \", \" + testM[1][1]);\n\t\t\n\t\t//delete all worker threads\n\t\texecutor.shutdownNow();\n\t\t\n\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tlong totalTime = endTime - startTime;\n\t\tSystem.out.println(\"Run time(millisecond): \" + totalTime );\n\t\tSystem.out.println(\"Thread pool: \" + threadPool );\n\t\tSystem.out.println(\"Cores: \" + Runtime.getRuntime().availableProcessors());\n\t\t\n\t\t//prints to file\n\t\tDataManager.saveRecord(\"data/grid.results.txt\", 14, featuresRemoved,\"<=50k\", bestKNN, weighted, bestValidation, testRecords, testRecords.get(0)[0].classType, 5, totalTime, threadPool);\n\t}", "public static void main(String argv[]) throws InterruptedException {\r\n\t\t// Set default setting first:\r\n\t\tdataFileName = \"movieLens_100K\";\r\n\t\tevaluationMode = DataSplitManager.SIMPLE_SPLIT;\r\n\t\tsplitFileName = dataFileName + \"_split.txt\";\r\n\t\ttestRatio = 0.5;\r\n\t\tfoldCount = 8;\r\n\t\tuserTrainCount = 10;\r\n\t\tminTestCount = 10;\r\n\t\trunAllAlgorithms = true;\r\n\t\t\r\n\t\t// Parsing the argument:\r\n\t\tif (argv.length > 1) {\r\n\t\t\tparseCommandLine(argv);\r\n\t\t}\r\n\t\t\r\n\t\t// Read input file:\r\n\t\treadArff (dataFileName + \".arff\");\r\n\t\t\r\n\t\t// Train/test data split:\r\n\t\tswitch (evaluationMode) {\r\n\t\t\tcase DataSplitManager.SIMPLE_SPLIT:\r\n\t\t\t\tSimpleSplit sSplit = new SimpleSplit(rateMatrix, testRatio, maxValue, minValue);\r\n\t\t\t\tSystem.out.println(\"Evaluation\\tSimple Split (\" + (1 - testRatio) + \" train, \" + testRatio + \" test)\");\r\n\t\t\t\ttestMatrix = sSplit.getTestMatrix();\r\n\t\t\t\tuserRateAverage = sSplit.getUserRateAverage();\r\n\t\t\t\titemRateAverage = sSplit.getItemRateAverage();\r\n\t\t\t\t\r\n\t\t\t\trun();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DataSplitManager.PREDEFINED_SPLIT:\r\n\t\t\t\tPredefinedSplit pSplit = new PredefinedSplit(rateMatrix, splitFileName, maxValue, minValue);\r\n\t\t\t\tSystem.out.println(\"Evaluation\\tPredefined Split (\" + splitFileName + \")\");\r\n\t\t\t\ttestMatrix = pSplit.getTestMatrix();\r\n\t\t\t\tuserRateAverage = pSplit.getUserRateAverage();\r\n\t\t\t\titemRateAverage = pSplit.getItemRateAverage();\r\n\t\t\t\t\r\n\t\t\t\trun();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DataSplitManager.K_FOLD_CROSS_VALIDATION:\r\n\t\t\t\tKfoldCrossValidation kSplit = new KfoldCrossValidation(rateMatrix, foldCount, maxValue, minValue);\r\n\t\t\t\tSystem.out.println(\"Evaluation\\t\" + foldCount + \"-fold Cross-validation\");\r\n\t\t\t\tfor (int k = 1; k <= foldCount; k++) {\r\n\t\t\t\t\ttestMatrix = kSplit.getKthFold(k);\r\n\t\t\t\t\tuserRateAverage = kSplit.getUserRateAverage();\r\n\t\t\t\t\titemRateAverage = kSplit.getItemRateAverage();\r\n\t\t\t\t\t\r\n\t\t\t\t\trun();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase DataSplitManager.RANK_EXP_SPLIT:\r\n\t\t\t\tRankExpSplit rSplit = new RankExpSplit(rateMatrix, userTrainCount, minTestCount, maxValue, minValue);\r\n\t\t\t\tSystem.out.println(\"Evaluation\\t\" + \"Ranking Experiment with N = \" + userTrainCount);\r\n\t\t\t\ttestMatrix = rSplit.getTestMatrix();\r\n\t\t\t\tuserRateAverage = rSplit.getUserRateAverage();\r\n\t\t\t\titemRateAverage = rSplit.getItemRateAverage();\r\n\t\t\t\t\r\n\t\t\t\trun();\r\n\t\t\t\tbreak;\r\n\t\t}\r\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/* */ }", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "private double findAccuracy(){\n double[] prediciton = this.learner.test(this.VS);\n ClassificationEvaluator CE = new ClassificationEvaluator(prediciton, this.VS);\n double tmp = CE.returnAccuracy(); //find accuracy\n return tmp;\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n MockRandom mockRandom0 = new MockRandom((-1));\n try { \n evaluation0.crossValidateModel((Classifier) naiveBayesMultinomial0, instances0, (-1), (Random) mockRandom0, (Object[]) testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Number of folds must be greater than 1\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "protected float computeModelScoreOnValidation() {\n/* 549 */ float score = computeModelScoreOnValidation(0, this.validationSamples.size() - 1);\n/* 550 */ return score / this.validationSamples.size();\n/* */ }", "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 validationFile, String featureDefFile, double percentTrain) {\n/* 761 */ List<RankList> trainingData = new ArrayList<>();\n/* 762 */ List<RankList> testData = new ArrayList<>();\n/* 763 */ int[] features = prepareSplit(sampleFile, featureDefFile, percentTrain, normalize, trainingData, testData);\n/* 764 */ List<RankList> validation = null;\n/* */ \n/* */ \n/* 767 */ if (!validationFile.isEmpty()) {\n/* */ \n/* 769 */ validation = readInput(validationFile);\n/* 770 */ if (normalize) {\n/* 771 */ normalize(validation, features);\n/* */ }\n/* */ } \n/* 774 */ RankerTrainer trainer = new RankerTrainer();\n/* 775 */ Ranker ranker = trainer.train(this.type, trainingData, validation, features, this.trainScorer);\n/* */ \n/* 777 */ double rankScore = evaluate(ranker, testData);\n/* */ \n/* 779 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* 780 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 782 */ System.out.println(\"\");\n/* 783 */ ranker.save(modelFile);\n/* 784 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public static void crossValidation() {\n\t\t\n\t\t//---------------------分为k折-----------------------------\n\t\t//初始化为k fold\n\t\tfor(int i=0;i<FOLD;i++) {\n\t\t\tArrayList<Point> tmp = new ArrayList<Point>();\n\t\t\tallData.add(tmp);\n\t\t}\n\t\t//选一个 删一个\n\t\tList<Integer> chosen = new ArrayList<Integer>();\n\t\tfor(int i=0;i<dataSet.size();i++) {\n\t\t\tchosen.add(i);\n\t\t}\n\t\t\n\t\t/*//按照原有比例采样\n\t\tfor(int i=0;i<FOLD;i++) { \n\t\t\tint choose = 0;\n\t\t\twhile( choose < ROW/FOLD && i != FOLD-1) {\n\t\t\t\tint p = pData.size() / FOLD; //采样的小类样本的个数\n\t\t\t\tint rand = new Random().nextInt(dataSet.size());\n\t\t\t\tif( choose < p) {\n\t\t\t\t\tif( chosen.contains(rand) && dataSet.get(rand).getLabel() == 0) {\n\t\t\t\t\t\tchosen.remove(new Integer(rand));\n\t\t\t\t\t\tchoose ++;\n\t\t\t\t\t\tallData.get(i).add(dataSet.get(rand));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif( chosen.contains(rand) && dataSet.get(rand).getLabel() != 0) {\n\t\t\t\t\t\tchosen.remove(new Integer(rand));\n\t\t\t\t\t\tchoose ++;\n\t\t\t\t\t\tallData.get(i).add(dataSet.get(rand));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//最后一折全部添加\n\t\t\tif( i == FOLD-1) {\n\t\t\t\tfor (Integer o : chosen) {\n\t\t\t\t\tallData.get(i).add(dataSet.get(o));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}*/\n\t\tfor(int i=0;i<FOLD;i++) { \n\t\t\tint choose = 0;\n\t\t\twhile( choose < ROW/FOLD && i != FOLD-1) {\n\t\t\t\tint rand = new Random().nextInt(dataSet.size());\n\t\t\t\tif( chosen.contains(rand)) {\n\t\t\t\t\tchosen.remove(new Integer(rand));\n\t\t\t\t\tchoose ++;\n\t\t\t\t\tallData.get(i).add(dataSet.get(rand));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//最后一折全部添加\n\t\t\tif( i == FOLD-1) {\n\t\t\t\tfor (Integer o : chosen) {\n\t\t\t\t\tallData.get(i).add(dataSet.get(o));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\t//------------------取一折为测试,其余为训练集-----------------------------\n\t\tfor(int fold=0;fold<FOLD;fold++) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\n\t\t\tList<Point> trainData = new ArrayList<Point>();\n\t\t\tList<Point> testData = new ArrayList<Point>();\n\t\t\tList<Point> positiveTrainData = new ArrayList<Point>();\n\t\t\tList<Point> positiveTestData = new ArrayList<Point>();\n\t\t\t\n\t\t\ttestData.addAll(allData.get(fold));\n\t\t\tfor (List<Point> ps : allData) {\n\t\t\t\tif( ps != allData.get(fold))\n\t\t\t\t\ttrainData.addAll(ps);\n\t\t\t}\n\t\t\t//select the minority class instances\n\t\t\tfor (Point point : trainData) {\n\t\t\t\tif(point.getLabel() == 0)\n\t\t\t\t\tpositiveTrainData.add(point);\n\t\t\t}\n\t\t\tSystem.out.print(\"train data :\"+trainData.size() + \"\\t\");\n\t\t\tSystem.out.println(\"train positive :\"+positiveTrainData.size());\n\t\t\tfor (Point point : testData) {\n\t\t\t\tif(point.getLabel() == 0)\n\t\t\t\t\tpositiveTestData.add(point);\n\t\t\t}\n\t\t\tSystem.out.print(\"test data :\"+testData.size() + \"\\t\");\n\t\t\tSystem.out.println(\"test positive :\"+positiveTestData.size());\n\t\t\t\n\t\t\tborderline(positiveTrainData,trainData);\n\t\t\t\n\t\t\t//generate new dataset\n\t\t\tString trainFileName = NAME + \"BLTrain\"+fold+\".arff\";\n\t\t\tString testFileName = NAME + \"BLTest\"+fold+\".arff\";\n\t\t\t//TODO dataSet is a bug\n\t\t\tGenerate.generate(trainData,pointSet,COL,fileName,trainFileName);\n\t\t\tGenerate.generate(testData,new ArrayList<Point>(),COL,fileName,testFileName);\n\t\t\tpointSet.clear();\n\t\t\tlong endGenerating = System.currentTimeMillis();\n\t\t\tSystem.out.println(\"产生数据所用时间为:\"+ (endGenerating-start)*1.0/1000 + \"s\");\n\t\t\t\n\t\t\t\n\t\t/*\t//不进行任何处理\n\t\t\ttrainFileName = NAME + \"TrainWS\"+\".arff\";\n\t\t\ttestFileName = NAME + \"TestWS\"+\".arff\";\n\t\t\tGenerate.generate(dataSet,new ArrayList<Point>(),COL,fileName,trainFileName);\n\t\t\tGenerate.generate(testSet,new ArrayList<Point>(),COL,fileName,testFileName);\n//\t\t\tpointSet.clear();\n\t*/\t\t\n\t\t\t\n\t\t\t\n\t\t\tclassify(trainFileName,testFileName);\n\t\t\tlong endClassifying = System.currentTimeMillis();\n\t\t\tSystem.out.println(\"产生数据所用时间为:\"+ (endClassifying-start)*1.0/1000 + \"s\");\n\t\t}\n\t}", "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 static void crossValidateHandsExperiment(Instances data, String results, int folds){\r\n\t ArrayList<String> classifierNames=new ArrayList<String>();\r\n\t Classifier[] c=ClassifierTools.setSingleClassifiers(classifierNames);\r\n\t OutFile f=new OutFile(results);\r\n\t f.writeString(\"\\\\begin{tabular}\\n\");\r\n\t double[][] preds;\r\n\t f.writeString(\",\");\r\n\t for(int i=0;i<c.length;i++)\r\n\t\t f.writeString(classifierNames.get(i)+\" & \");\r\n\t f.writeString(\"\\n & \");\r\n\t for(int i=0;i<c.length;i++){\r\n\t\t try{\r\n\t\t\t preds=ClassifierTools.crossValidation(c[i],data,folds);\r\n\t\t\t ResultsStats r=new ResultsStats(preds,folds);\r\n\t\t\t f.writeString(\"&\"+df.format(r.accuracy)+\" (\"+df.format(r.sd)+\") \");\r\n\t\t\t System.out.println(classifierNames.get(i)+\" Accuracy = \"+df.format(r.accuracy)+\" (\"+df.format(r.sd)+\") \");\r\n\t\t }catch(Exception e)\r\n\t\t {\r\n\t\t\t System.out.println(\" Error in crossValidate =\"+e);\r\n\t\t\t e.printStackTrace();\r\n\t\t\t System.exit(0);\r\n\t\t }\r\n\t }\r\n\t f.writeString(\"\\\\\\\\ \\n\");\r\n }", "public void printPrediction() {\n\t\tfor (int i = 0; i < testData.size(); i++) {\n\t\n\t\t\tSystem.out.print(testData.get(i) + \", Predicted label:\"\n\t\t\t\t\t+ predictLabels[i]);\n\t\t\tif (predictLabels[i] >= 20) System.out.println(\" Successful\");\n\t\t\telse System.out.println(\" Failed\");\n\t\t}\n\t}", "public void test(List<String> modelFiles, String testFile, String prpFile) {\n/* 1014 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1015 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1018 */ int nFold = modelFiles.size();\n/* */ \n/* 1020 */ List<RankList> samples = readInput(testFile);\n/* */ \n/* 1022 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1023 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1024 */ System.out.println(\"[Done.]\");\n/* 1025 */ double rankScore = 0.0D;\n/* 1026 */ List<String> ids = new ArrayList<>();\n/* 1027 */ List<Double> scores = new ArrayList<>();\n/* 1028 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1030 */ List<RankList> test = testData.get(f);\n/* 1031 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1032 */ int[] features = ranker.getFeatures();\n/* 1033 */ if (normalize) {\n/* 1034 */ normalize(test, features);\n/* */ }\n/* 1036 */ for (RankList aTest : test) {\n/* 1037 */ RankList l = ranker.rank(aTest);\n/* 1038 */ double score = this.testScorer.score(l);\n/* 1039 */ ids.add(l.getID());\n/* 1040 */ scores.add(Double.valueOf(score));\n/* 1041 */ rankScore += score;\n/* */ } \n/* */ } \n/* 1044 */ rankScore /= ids.size();\n/* 1045 */ ids.add(\"all\");\n/* 1046 */ scores.add(Double.valueOf(rankScore));\n/* 1047 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ \n/* 1049 */ if (!prpFile.isEmpty()) {\n/* */ \n/* 1051 */ savePerRankListPerformanceFile(ids, scores, prpFile);\n/* 1052 */ System.out.println(\"Per-ranked list performance saved to: \" + prpFile);\n/* */ } \n/* */ }", "public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "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 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}", "protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }", "public static double predictionAccuracy(List<CSVAttribute[]> ulTestData, List<CSVAttribute[]> validationData,\n DecisionTreeNode tree, int labelAttribute){\n\n List<CSVAttribute[]> predictedTestData = TreeModel.predict(ulTestData, tree, labelAttribute);\n\n int correct = 0;\n for (int j = 0; j < predictedTestData.size(); j++) {\n if (predictedTestData.get(j)[labelAttribute].equals(validationData.get(j)[labelAttribute])) correct++;\n }\n\n return (double) correct / (double) predictedTestData.size();\n }", "public double percentageSplit(Classifier classifier, Instances instances, StringBuilder stringBuilder) throws Exception {\n double percent = 66.6;\n int trainSize = (int) Math.round(instances.numInstances() * percent / 100);\n int testSize = instances.numInstances() - trainSize;\n Instances trainData = new Instances(instances, 0, trainSize);\n Instances testData = new Instances(instances, trainSize, testSize);\n Evaluation evaluation = new Evaluation(trainData);\n evaluation.evaluateModel(classifier, testData);\n stringBuilder.append(\"Percentage-Split: \" + \"\\n\");\n stringBuilder.append(evaluation.toSummaryString() + \"\\n\");\n stringBuilder.append(evaluation.toMatrixString() + \"\\n\");\n return evaluation.pctCorrect();\n }", "public double crossValidate(int k) { \n\t\tdouble sum = 0;\n\t\tfor (int i = 0 ; i < 20; i++) {\n\t\t\tsum += validate(k);\n\t\t}\n\t\treturn sum / 20;\n\t}", "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 int predict(int[] testData) {\n /*\n * kNN algorithm:\n * \n * This algorithm compare the distance of every training data to the test data using \n * the euclidean distance algorithm, and find a specfic amount of training data \n * that are closest to the test data (the value of k determine that amount). \n * \n * After that, the algorithm compare those data, and determine whether more of those\n * data are labeled with 0, or 1. And use that to give the guess\n * \n * To determine k: sqrt(amount of training data)\n */\n\n /*\n * Problem:\n * Since results and distances will be stored in different arrays, but in the same order,\n * sorting distances will mess up the label, which mess up the predictions\n * \n * Solution:\n * Instead of sorting distances, use a search algorithm, search for the smallest distance, and then\n * the second smallest number, and so on. Get the index of that number, use the index to \n * find the result, and store it in a new ArrayList for evaluation\n */\n\n // Step 1 : Determine k \n double k = Math.sqrt(this.trainingData.size());\n k = 3.0;\n\n // Step 2: Calculate distances\n // Create an ArrayList to hold all the distances calculated\n ArrayList<Double> distances = new ArrayList<Double>();\n // Create another ArrayList to store the results\n ArrayList<Integer> results = new ArrayList<Integer>();\n for (int[] i : this.trainingData) {\n // Create a temp array with the last item (result) eliminated\n int[] temp = Arrays.copyOf(i, i.length - 1);\n double distance = this.eucDistance(temp, testData);\n // Add both the result and the distance into associated arraylists\n results.add(i[i.length - 1]);\n distances.add(distance);\n }\n\n // Step 3: Search for the amount of highest points according to k\n ArrayList<Integer> closestResultLst = new ArrayList<Integer>();\n for (int i = 0; i < k; i++) {\n double smallestDistance = Collections.min(distances);\n int indexOfSmallestDistance = distances.indexOf(smallestDistance);\n int resultOfSmallestDistance = results.get(indexOfSmallestDistance);\n closestResultLst.add(resultOfSmallestDistance);\n // Set the smallest distance to null, so it won't be searched again\n distances.set(indexOfSmallestDistance, 10.0);\n }\n\n // Step 4: Determine which one should be the result by looking at the majority of the numbers\n int yes = 0, no = 0;\n for (int i : closestResultLst) {\n if (i == 1) {\n yes++;\n } else if (i == 0) {\n no++;\n }\n }\n\n // Step 5: Return the result\n // test code\n // System.out.println(yes);\n // System.out.println(no);\n if (yes >= no) {\n return 1;\n } else {\n return 0;\n }\n }", "private static void runAll() throws InterruptedException {\r\n\t\tSystem.out.println(RankEvaluator.printTitle() + \"\\tAvgP\\tTrain Time\\tTest Time\");\r\n\t\t\r\n\t\t// Prefetching user/item similarity:\r\n\t\tif (userSimilarityPrefetch) {\r\n\t\t\tuserSimilarity = calculateUserSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tuserSimilarity = new SparseMatrix(userCount+1, userCount+1);\r\n\t\t}\r\n\t\t\r\n\t\tif (itemSimilarityPrefetch) {\r\n\t\t\titemSimilarity = calculateItemSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\titemSimilarity = new SparseMatrix(itemCount+1, itemCount+1);\r\n\t\t}\r\n\t\t\r\n\t\t// Regularized SVD\r\n\t\tint[] svdRank = {1, 5, 10};\r\n\t\t\r\n\t\tfor (int r : svdRank) {\r\n\t\t\tdouble learningRate = 0.005;\r\n\t\t\tdouble regularizer = 0.1;\r\n\t\t\tint maxIter = 100;\r\n\t\t\t\r\n\t\t\tbaseline = new RegularizedSVD(userCount, itemCount, maxValue, minValue,\r\n\t\t\t\tr, learningRate, regularizer, 0, maxIter, false);\r\n\t\t\tSystem.out.println(\"SVD\\tFro\\t\" + r + \"\\t\" + testRecommender(\"SVD\", baseline));\r\n\t\t}\r\n\t\t\r\n\t\t// Rank-based SVD\r\n\t\tint[] rsvdRank = {1, 5, 10};\r\n\t\tfor (int r : rsvdRank) {\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOGISTIC_LOSS, r, 6000, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOG_LOSS_MULT, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOG_LOSS_ADD, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_LOSS_MULT, r, 370, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_LOSS_ADD, r, 25, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.HINGE_LOSS_MULT, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.HINGE_LOSS_ADD, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_REGRESSION, r, 40, true);\r\n\t\t}\r\n\t\t\r\n\t\t// Paired Global LLORMA\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 1, 1500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 5, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 10, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 1, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 5, 2000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 10, 1000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 1, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 5, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 10, 900, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 1, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 5, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 10, 2000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 1, 450, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 5, 250, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 10, 110, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 1, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 5, 400, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 10, 200, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 1, 20, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 5, 13, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 10, 7, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 1, 40, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 5, 25, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 10, 15, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 1, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 5, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 10, 300, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 1, 2000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 5, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 10, 500, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 1, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 5, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 10, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 1, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 5, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 10, 1000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 1, 60, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 5, 40, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 10, 20, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 1, 120, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 5, 80, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 10, 40, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 1, 4500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 5, 3500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 10, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 1, 9000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 5, 7000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 10, 5000, true);\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n Normalized norm = new Normalized();\n double c = 1;\n\n double[][] data = norm.Inputdata(\"input.txt\");\n double[][] w = new double[35][10];\n double[][] last = new double[35][10];\n\n for (int i = 0; i < 35; i++) {\n for (int j = 0; j < 10; j++) {\n w[i][j] = 1;\n last[i][j] = 1;\n\n }\n }\n\n /* for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 35; j++) {\n System.out.print(data[i][j]);\n System.out.print(\" \");\n \n \n }\n System.out.print(\"\\n\");\n }\n */\n //System.out.print(w[5][5]);\n double[] ErrMap = norm.Inputdata2(\"TestMap.txt\");\n //System.out.print(ErrMap[0]);\n\n //System.out.print(\"\\n\");\n w = training(data, w, last, c);\n\n int out = 2;\n\n out = classify(w, ErrMap, c);\n System.out.print(\"product \" + out + \" is max\\n\");\n System.out.print(\"the number classify to \" + out + \"\\n\");\n }", "public void score(List<String> modelFiles, String testFile, String outputFile) {\n/* 1180 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1181 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1184 */ int nFold = modelFiles.size();\n/* */ \n/* 1186 */ List<RankList> samples = readInput(testFile);\n/* 1187 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1188 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1189 */ System.out.println(\"[Done.]\");\n/* */ try {\n/* 1191 */ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), \"UTF-8\"));\n/* 1192 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1194 */ List<RankList> test = testData.get(f);\n/* 1195 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1196 */ int[] features = ranker.getFeatures();\n/* 1197 */ if (normalize)\n/* 1198 */ normalize(test, features); \n/* 1199 */ for (RankList l : test) {\n/* 1200 */ for (int j = 0; j < l.size(); j++) {\n/* 1201 */ out.write(l.getID() + \"\\t\" + j + \"\\t\" + ranker.eval(l.get(j)) + \"\");\n/* 1202 */ out.newLine();\n/* */ } \n/* */ } \n/* */ } \n/* 1206 */ out.close();\n/* */ }\n/* 1208 */ catch (IOException ex) {\n/* */ \n/* 1210 */ throw RankLibError.create(\"Error in Evaluator::score(): \", ex);\n/* */ } \n/* */ }", "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}", "@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "public void doPartition() {\n int sum = 0;\n for (int q = 0; q < w.queryCount; q++) {\n for (int a = 0; a < w.attributeCount; a++) {\n sum += w.usageMatrix[q][a];\n }\n }\n\n if (sum == w.queryCount * w.attributeCount) {\n partitioning = new int[w.attributeCount];\n return;\n }\n\n\t\t//ArrayUtils.printArray(usageMatrix, \"Usage Matrix\", \"Query\", null);\n\t\t\n\t\t// generate candidate partitions (all possible primary partitions)\n\t\tint[][] candidatePartitions = generateCandidates(w.usageMatrix);\n\t\t//ArrayUtils.printArray(candidatePartitions, \"Number of primary partitions:\"+candidatePartitions.length, \"Partition \", null);\n\t\t\n\t\t// generate the affinity matrix and METIS input file \n\t\tint[][] matrix = affinityMatrix(candidatePartitions, w.usageMatrix);\n\t\t//ArrayUtils.printArray(matrix, \"Partition Affinity Matrix Size: \"+matrix.length, null, null);\n\t\twriteGraphFile(graphFileName, matrix);\n\t\t\n\t\t// run METIS using the graph file\n\t\ttry {\n\t\t\tProcess p = Runtime.getRuntime().exec(metisLocation+\" \"+graphFileName+\" \"+K);\n\t\t\tp.waitFor();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\t// read primary partition groups created by METIS \n\t\tint[][][] primaryPartitionGroups = readPartitionFile(candidatePartitions); // TODO exception here for too few groups or attributes...\n\t\t//for(int[][] primaryPartitionGroup: primaryPartitionGroups)\n\t\t//\tArrayUtils.printArray(primaryPartitionGroup, \"Partition Group\", \"Partition\", null);\n\t\t\n\t\t\n\t\t//int i=0;\n\t\tList<int[][]> bestLayouts = new ArrayList<int[][]>();\n\t\tfor(int[][] primaryPartitionGroup: primaryPartitionGroups){\n\t\t\tminCost = Double.MAX_VALUE;\n\t\t\t\n\t\t\t// Candidate Merging\n\t\t\t//System.out.println(\"Primary Partition Group:\"+(i+1));\n\t\t\tList<BigInteger> mergedCandidatePartitions = mergeCandidates(primaryPartitionGroup);\n\t\t\t//System.out.println(\"Number of merged partitions:\"+mergedCandidatePartitions.size());\n\t\t\t\n\t\t\t// Layout Generation\n\t\t\tgenerateLayout(mergedCandidatePartitions, primaryPartitionGroup);\n\t\t\tbestLayouts.add(bestLayout);\t\t\t\n\t\t\t//ArrayUtils.printArray(bestLayout, \"Layout:\"+(++i), null, null);\n\t\t}\n\t\t\n\t\t// Combine sub-Layouts\n\t\tList<int[][]> mergedBestLayouts = mergeAcrossLayouts(bestLayouts, bestLayouts.size());\n\t\tpartitioning = PartitioningUtils.getPartitioning(mergedBestLayouts);\n\t}", "protected static double crossValidation(Instances trainingData,\n\t\t\tint[] indices, boolean fs) throws Exception {\n\t\tif (fs) {\n\t\t\tSystem.out.println(\"\\n cross validation on the reduced features.\");\n\t\t\t// remove unselected attributes.\n\t\t\tfor (int i = trainingData.numAttributes() - 1; i >= 0; i--) {\n\t\t\t\tboolean remove = true;\n\t\t\t\tfor (int k = 0; k < indices.length; k++) {\n\t\t\t\t\tif (i == indices[k]) {\n\t\t\t\t\t\tremove = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (remove == true) {\n\t\t\t\t\ttrainingData.deleteAttributeAt(i);\n\t\t\t\t}\n\t\t\t}\n\t\t} else \n\t\t\tSystem.out.println(\"\\n cross validation on the full features.\");\n\t\t// cross validation\n\t\tClassifier nb = new NaiveBayes();\n\t\tEvaluation evaluation = new Evaluation(trainingData);\n\t\tevaluation.crossValidateModel(nb, trainingData, 10, new Random(1));\n\t\tSystem.out.println(evaluation.toSummaryString());\n\t\treturn evaluation.errorRate();\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 }", "@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}", "public double AccuracyLossTestSet()\n\t{\n\t\tdouble accuracyLoss = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++) \n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++) \n\t\t\t\taccuracyLoss += AccuracyLoss(i, c); \n\t\t}\n\t\treturn accuracyLoss;\n\t}", "public static void predictBatch() throws IOException {\n\t\tsvm_model model;\n\t\tString modelPath = \"./corpus/trainVectors.scale.model\";\n\t\tString testPath = \"./corpus/testVectors.scale\";\n\t\tBufferedReader reader = new BufferedReader(new FileReader(testPath));\n\t\tmodel = svm.svm_load_model(modelPath);\n\t\tString oneline;\n\t\tdouble correct = 0.0;\n\t\tdouble total = 0.0;\n\t\twhile ((oneline = reader.readLine()) != null) {\n\t\t\tint pos = oneline.indexOf(\" \");\n\t\t\tint classid = Integer.valueOf(oneline.substring(0, pos));\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\tint length = st.countTokens();\n\t\t\tint i = 0;\n\t\t\tsvm_node[] svm_nodes = new svm_node[length];\n\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\tString tmp = st.nextToken();\n\t\t\t\tint indice = Integer\n\t\t\t\t\t\t.valueOf(tmp.substring(0, tmp.indexOf(\":\")));\n\t\t\t\tdouble value = Double\n\t\t\t\t\t\t.valueOf(tmp.substring(tmp.indexOf(\":\") + 1));\n\t\t\t\tsvm_nodes[i] = new svm_node();\n\t\t\t\tsvm_nodes[i].index = indice;\n\t\t\t\tsvm_nodes[i].value = value;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tint predict_result = (int) svm.svm_predict(model, svm_nodes);\n\t\t\tif (predict_result == classid)\n\t\t\t\tcorrect++;\n\t\t\ttotal++;\n\t\t}\n\n\t\tSystem.out.println(\"Accuracy is :\" + correct / total);\n\n\t}", "public static void main(String[] args){\n// int[] testArray = {82, 95, 71, 6, 34};\n//\n// int min = Aggregate.min(testArray);\n// int max = Aggregate.max(testArray);\n// int sum = Aggregate.sum(testArray);\n// double avg = Aggregate.average(testArray);\n// double div = Aggregate.standardDeviation(testArray);\n//\n// System.out.println(min); // 6\n// System.out.println(max); //95\n// System.out.println(sum); //288\n// System.out.println(avg); //57.6\n// System.out.println(div); //36.719\n\n final int ROCK = 1;\n final int SCISSORS = 2;\n final int PAPER = 3;\n\n int computerDecision = getComputerChoice();\n int userDecision = getUserChoice();\n\n System.out.print(\"user: \" + printChoice(userDecision));\n switch(userDecision) {\n\n case ROCK:\n if(computerDecision == ROCK){\n System.out.println(\"That's a Tie!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Congrats! You won\");\n }\n else{\n System.out.println(\"Sorry,You lost!\");\n }\n break;\n case SCISSORS:\n if(computerDecision == ROCK){\n System.out.println(\"Sorry,You lost!\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"That's a Tie!\");\n }\n else{\n System.out.println(\"Congrats! You won\");\n }\n break;\n case PAPER:\n if(computerDecision == ROCK){\n System.out.println(\"Congrats! You won\");\n }\n else if(computerDecision == SCISSORS ){\n System.out.println(\"Sorry,You lost!\");\n }\n else{\n System.out.println(\"That's a Tie!\");\n }\n break;\n\n default:\n\n }\n\n\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint testCase = sc.nextInt();\n\t\tint studentCase, cnt, sum;\n\t\tdouble aver;\n\t\tint studentScore[] = new int[1000];\n\t\t\n\t\tfor(int i=0; i<testCase; i++) {\n\t\t\tstudentCase = sc.nextInt();\n\t\t\tcnt=0; sum=0;\n\t\t\tfor(int j=0; j<studentCase; j++) {\n\t\t\t\tstudentScore[j] = sc.nextInt();\n\t\t\t\tsum += studentScore[j];\n\t\t\t}\n\n\t\t\taver=(double)sum/studentCase;\n\t\t\t\n\t\t\tfor(int j=0; j<studentCase; j++) {\n\t\t\t\tif(studentScore[j] > aver) cnt++;\n\t\t\t}\n\n\t\t\tSystem.out.printf(\"%.3f\", (cnt / studentCase) * 100.0);\n\t\t\tSystem.out.println(\"%\");\n\t\t}\t\n\t}", "public static void main(String[] args) throws Exception {\n DataSet houseVotes = DataParser.parseData(HouseVotes.filename, HouseVotes.columnNames, HouseVotes.dataTypes, HouseVotes.ignoreColumns, HouseVotes.classColumn, HouseVotes.discretizeColumns);\n DataSet breastCancer = DataParser.parseData(BreastCancer.filename, BreastCancer.columnNames, BreastCancer.dataTypes, BreastCancer.ignoreColumns, BreastCancer.classColumn, HouseVotes.discretizeColumns);\n DataSet glass = DataParser.parseData(Glass.filename, Glass.columnNames, Glass.dataTypes, Glass.ignoreColumns, Glass.classColumn, Glass.discretizeColumns);\n DataSet iris = DataParser.parseData(Iris.filename, Iris.columnNames, Iris.dataTypes, Iris.ignoreColumns, Iris.classColumn, Iris.discretizeColumns);\n DataSet soybean = DataParser.parseData(Soybean.filename, Soybean.columnNames, Soybean.dataTypes, Soybean.ignoreColumns, Soybean.classColumn, Soybean.discretizeColumns);\n \n /*\n * The contents of the DataSet are not always random.\n * You can shuffle them using Collections.shuffle()\n */\n \n Collections.shuffle(houseVotes);\n Collections.shuffle(breastCancer);\n Collections.shuffle(glass);\n Collections.shuffle(iris);\n Collections.shuffle(soybean);\n /*\n * Lastly, you want to split the data into a regular dataset and a testing set.\n * DataSet has a function for this, since it gets a little weird.\n * This grabs 10% of the data in the dataset and sets pulls it out to make the testing set.\n * This also means that the remaining 90% in DataSet can serve as our training set.\n */\n\n DataSet houseVotesTestingSet = houseVotes.getTestingSet(.1);\n DataSet breastCancerTestingSet = breastCancer.getTestingSet(.1);\n DataSet glassTestingSet = glass.getTestingSet(.1);\n DataSet irisTestingSet = iris.getTestingSet(.1);\n DataSet soybeanTestingSet = soybean.getTestingSet(.1);\n \n //KNN\n //House Votes\n System.out.println(HouseVotes.class.getSimpleName());\n KNN knn = new KNN(houseVotes, houseVotesTestingSet, HouseVotes.classColumn, 3);\n String[] knnHouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n knnHouseVotes[i] = knn.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(knnHouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnHouseVotes[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnHouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n \n //Breast Cancer\n System.out.println(BreastCancer.class.getSimpleName());\n knn = new KNN(breastCancer, breastCancerTestingSet, BreastCancer.classColumn, 3);\n String[] knnBreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n knnBreastCancer[i] = knn.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(knnBreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnBreastCancer[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnBreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n \n //Glass\n System.out.println(Glass.class.getSimpleName());\n knn = new KNN(glass, glassTestingSet, Glass.classColumn, 3);\n String[] knnGlass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n knnGlass[i] = knn.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(knnGlass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnGlass[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnGlass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n \n //Iris\n System.out.println(Iris.class.getSimpleName());\n knn = new KNN(iris, irisTestingSet, Iris.classColumn, 3);\n String[] knnIris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n knnIris[i] = knn.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(knnIris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnIris[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnIris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n \n //Soybean\n System.out.println(Soybean.class.getSimpleName());\n knn = new KNN(soybean, soybeanTestingSet, Soybean.classColumn, 3);\n String[] knnSoybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n knnSoybean[i] = knn.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(knnSoybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnSoybean[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnSoybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n \n \n /*\n * Lets setup ID3:\n * DataSet, TestSet, column with the class categorization. (republican, democrat in this case)\n */\n\n System.out.println(HouseVotes.class.getSimpleName());\n ID3 id3 = new ID3(houseVotes, houseVotesTestingSet, HouseVotes.classColumn);\n String[] id3HouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n id3HouseVotes[i] = id3.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(id3HouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3HouseVotes[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3HouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n\n System.out.println(BreastCancer.class.getSimpleName());\n id3 = new ID3(breastCancer, breastCancerTestingSet, BreastCancer.classColumn);\n String[] id3BreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n id3BreastCancer[i] = id3.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(id3BreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3BreastCancer[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3BreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Glass.class.getSimpleName());\n id3 = new ID3(glass, glassTestingSet, Glass.classColumn);\n String[] id3Glass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n id3Glass[i] = id3.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(id3Glass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Glass[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Glass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Iris.class.getSimpleName());\n id3 = new ID3(iris, irisTestingSet, Iris.classColumn);\n String[] id3Iris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n id3Iris[i] = id3.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(id3Iris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Iris[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Iris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Soybean.class.getSimpleName());\n id3 = new ID3(soybean, soybeanTestingSet, Soybean.classColumn);\n String[] id3Soybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n id3Soybean[i] = id3.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(id3Soybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Soybean[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Soybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n }", "public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public double crossValidationError(Instances insances, int num_of_folds) throws Exception {\n // Remember: before splitting the dataset for the cross validation, you need to shuffle the data.\n long startTimer = System.nanoTime();\n double crossValidationError = 0;\n crossValidationError = calcErrorWithTrainValid(insances, num_of_folds, crossValidationError);\n totalTimeForFolding = System.nanoTime() - startTimer;\n return crossValidationError / (double) num_of_folds;\n }", "public abstract double test(ClassifierData<U> testData);", "protected abstract void calculateAccuracy(List<S> bestPath, List<O> observation);", "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}", "int getN_estimators();", "@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 }", "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}", "public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }", "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}", "@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 }", "public static void main(String... args) throws Exception {\n if (args.length != 3) {\n throw new Exception(\"Expecting three arguments\");\n }\n\n // Reading arguments: the data file path and the data separator\n String dataPath = args[0];\n final String separator = args[1];\n String modelPath = args[2];\n\n // Weights used to generate data subsets\n double[] weights = {.6, .2, .2};\n // Number of iteration performed during ALS\n int numIterations = 20;\n\n // Context initialization\n SparkConf sparkConf = new SparkConf().setAppName(\"ALS model computation\");\n JavaSparkContext jsc = new JavaSparkContext(sparkConf);\n\n // Transforming file content into JavaRDD\n JavaRDD<String> data = jsc.textFile(dataPath);\n\n // Transforming each lines into ratings\n JavaRDD<Rating> ratings = Utils.generateRatings(data, separator);\n\n // Generating train set, cross validation set and test set\n JavaRDD<Rating>[] sets = ratings.randomSplit(weights);\n\n // Caching generated subsets\n sets[0].cache();\n sets[1].cache();\n sets[2].cache();\n\n MatrixFactorizationModel bestModel = null;\n double bestRMSE = 0;\n\n // Computing several model with different values for rank\n for (int rank = 1; rank <= 10; rank++) {\n // Training model with training set\n MatrixFactorizationModel model = ALS.train(sets[0].rdd(), rank, numIterations, 0.01);\n\n // Computing MSE over cross validation set\n double RMSE = Utils.computeRMSE(model, sets[1]);\n System.out.println(\"RMSE for rank \" + rank + \": \" + RMSE);\n\n // Saving model if better than the old one\n if (bestModel == null || RMSE < bestRMSE) {\n bestModel = model;\n bestRMSE = RMSE;\n }\n }\n\n // Evaluating best model on test set\n double RMSE = Utils.computeRMSE(bestModel, sets[2]);\n\n System.out.println(\"Model rank: \" + bestModel.rank());\n System.out.println(\"MSE compute over test set: \" + RMSE);\n\n // Saving best model\n bestModel.save(jsc.sc(), modelPath);\n\n // Stopping context\n\t\tjsc.stop();\n }", "public static void evaluate(final int nFolds, final String splitPath, final String recPath) {\n double ndcgRes = 0.0;\n double precisionRes = 0.0;\n double rmseRes = 0.0;\n for (int i = 0; i < nFolds; i++) {\n File testFile = new File(splitPath + \"test_\" + i + \".csv\");\n File recFile = new File(recPath + \"recs_\" + i + \".csv\");\n DataModelIF<Long, Long> testModel = null;\n DataModelIF<Long, Long> recModel = null;\n try {\n testModel = new SimpleParser().parseData(testFile);\n recModel = new SimpleParser().parseData(recFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n NDCG<Long, Long> ndcg = new NDCG<>(recModel, testModel, new int[]{AT});\n ndcg.compute();\n ndcgRes += ndcg.getValueAt(AT);\n\n RMSE<Long, Long> rmse = new RMSE<>(recModel, testModel);\n rmse.compute();\n rmseRes += rmse.getValue();\n\n Precision<Long, Long> precision = new Precision<>(recModel, testModel, REL_TH, new int[]{AT});\n precision.compute();\n precisionRes += precision.getValueAt(AT);\n }\n System.out.println(\"NDCG@\" + AT + \": \" + ndcgRes / nFolds);\n System.out.println(\"RMSE: \" + rmseRes / nFolds);\n System.out.println(\"P@\" + AT + \": \" + precisionRes / nFolds);\n\n }", "@Override\n protected double calculateSplitScore(Instances i1, Instances i2) throws Exception {\n if (i1.numInstances() + i2.numInstances() >=\n OCCTFineGrainedJaccardSplitModel.NUM_OF_CLUSTERS) {\n return this.calculateSplitScoreUsingClustering(i1, i2);\n }\n return this.calculateSplitScoreWithoutClustering(i1, i2);\n }", "public void displayResults() {\n\t\tcreateCluster();\n\t\tassignClusterID();\n\t\tSystem.out.println(iterations);\n\t\tWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(\"/Users/saikalyan/Documents/ClusterResult_kmeans.txt\");\n\t\t\tfor (int key : labelsMap.keySet()) {\n\t\t\t\tclusterResultsList.add(clusterIdMap.get(labelsMap.get(key)));\n\t\t\t\twriter.write(String.valueOf(clusterIdMap.get(labelsMap.get(key))));\n\t\t\t\twriter.write(\"\\r\\n\");\n\t\t\t\tSystem.out.println(key + \" : \" + clusterIdMap.get(labelsMap.get(key)));\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tExternalValidator extValidation = new ExternalValidator(count, groundTruthList, clusterResultsList);\n\n\t\tfloat res = extValidation.getCoefficient();\n\t\tSystem.out.println(\"Rand Index------------\" + res);\n\n\t\tfloat jaccard = extValidation.getJaccardCoeff();\n\t\tSystem.out.println(\"Jaccard co-efficient------------\" + jaccard);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.print(\"Number of input: \");\n\t\tint input = scan.nextInt();\n\t\tint[] initialSet = new int[input];\n\t\t\n\t\t//input user numbers into set array\n\t\tSystem.out.print(\"Enter \" + input + \" numbers: \");\n\t\tfor(int i = 0; i < input; i++){\n\t\t\tinitialSet[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\t//find partition\n\t\tpartition(initialSet, input);\n\t\t\n\t}", "public void checkTraining() {\r\n loadGenome();\r\n MLDataSet trainingSet;\r\n float sum = 0;\r\n try (Stream<Path> walk = Files.walk(Paths.get(\"check_train_data\"))) {\r\n\r\n List<String> result = walk.filter(Files::isRegularFile)\r\n .map(x -> x.toString()).collect(Collectors.toList());\r\n\r\n for (int i = 0; i < result.size(); i++) {\r\n trainingSet = new CSVNeuralDataSet(result.get(i), input, output, true);\r\n sum += network.calculateError(trainingSet);\r\n }\r\n System.out.println(\"Validation, Average error: \" + sum / result.size());\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "public double getAccuracyWithLabFormat(String input)\n {\n\n resetWeight();\n\n BagOfWords bag =new BagOfWords(\" \");\n\n String tt=input;\n\n input = input.replaceAll(\"\\n\",\" \");\n\n for (String s:input.split(\" \"))\n {\n bag.add(s);\n }\n\n\n\n for(HashMap.Entry<String, Integer> entry : bag.getBagHashMap().entrySet())\n {\n String key = entry.getKey();\n\n for (TFIDF bag1: trainedClasses)\n {\n for (Word w:bag1.getWordsSets().getWordList())\n {\n if (w.getValue().equals(key))\n {\n bag1.setWeight(bag1.getWeight()+w.getFreq());\n bag1.setFileCount(bag1.getFileCount()+1);\n }\n }\n\n }\n\n }\n\n for (TFIDF bag1: trainedClasses)\n {\n bag1.setWeight(bag1.getWeight()/(bag1.getFileCount()+1));\n }\n\n int i= trainedClasses.size();\n\n for (TFIDF bag1: trainedClasses)\n {\n if (tt.split(\"\\n\")[0].contains(bag1.getName()))\n {\n i=Math.min(i, trainedClasses.indexOf(bag1));\n }\n\n }\n\n StringBuilder ret= new StringBuilder(\"(\" + i + \")\" + \"\\n\");\n\n trainedClasses.sort(new Comparator<TFIDF>() {\n @Override\n public int compare(TFIDF idf, TFIDF t1) {\n if (idf.getWeight()>t1.getWeight())\n return -1;\n else\n return 1;\n }\n });\n\n for (TFIDF bag1: trainedClasses)\n {\n ret.append(\" --> \").append(bag1.getName()).append(\": \").append(bag1.getWeight()).append(\"\\n\");\n }\n\n return (100/Math.pow(i+1,2));\n\n }", "public static void testMultimensionalOutput() {\n\t\tint vectSize = 8;\n\t\tint outputsPerInput = 10;\n\t\tdouble repeatProb = 0.8;\n\t\tdouble inpRemovalPct = 0.8;\n\t\tCollection<DataPoint> data = createMultidimensionalCorrSamples(vectSize, outputsPerInput, inpRemovalPct);\n//\t\tCollection<DataPoint> data = createMultidimensionalSamples(vectSize, outputsPerInput, repeatProb);\n\n\t\tModelLearner modeler = createModelLearner(vectSize, data);\n\t\tint numRuns = 100;\n\t\tint jointAdjustments = 18;\n\t\tdouble skewFactor = 0;\n\t\tdouble cutoffProb = 0.1;\n\t\tDecisionProcess decisioner = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\t0, skewFactor, 0, cutoffProb);\n\t\tDecisionProcess decisionerJ = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\tjointAdjustments, skewFactor, 0, cutoffProb);\n\t\t\n\t\tSet<DiscreteState> inputs = getInputSetFromSamples(data);\n\t\tArrayList<Double> realV = new ArrayList<Double>();\n\t\tArrayList<Double> predV = new ArrayList<Double>();\n\t\tArrayList<Double> predJV = new ArrayList<Double>();\n\t\tfor (DiscreteState input : inputs) {\n\t\t\tSystem.out.println(\"S\" + input);\n\t\t\tMap<DiscreteState, Double> outProbs = getRealOutputProbsForInput(input, data);\n\t\t\tMap<DiscreteState,Double> preds = countToFreqMap(decisioner\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tMap<DiscreteState,Double> predsJ = countToFreqMap(decisionerJ\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tSet<DiscreteState> outputs = new HashSet<DiscreteState>();\n\t\t\toutputs.addAll(outProbs.keySet());\n\t\t\toutputs.addAll(preds.keySet());\n\t\t\toutputs.addAll(predsJ.keySet());\n\t\t\tfor (DiscreteState output : outputs) {\n\t\t\t\tDouble realD = outProbs.get(output);\n\t\t\t\tDouble predD = preds.get(output);\n\t\t\t\tDouble predJD = predsJ.get(output);\n\t\t\t\tdouble real = (realD != null ? realD : 0);\n\t\t\t\tdouble pred = (predD != null ? predD : 0);\n\t\t\t\tdouble predJ = (predJD != null ? predJD : 0);\n\t\t\t\trealV.add(real);\n\t\t\t\tpredV.add(pred);\n\t\t\t\tpredJV.add(predJ);\n\t\t\t\tSystem.out.println(\"\tS'\" + output + \"\t\" + real + \"\t\" + pred + \"\t\" + predJ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"CORR:\t\" + Utils.correlation(realV, predV)\n\t\t\t\t+ \"\t\" + Utils.correlation(realV, predJV));\n\t}", "private double calc_gain_ratio(String attrb,int partitonElem,HashMap<Integer, WeatherData> trainDataXMap,HashMap<Integer, WeatherData> trainDataYMap,double information_gain_System,int total_count_in_train)\n\t{\n\t\t\n\t\tHashMap<Integer,Integer> X_Train_attrb_part1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,Integer> X_Train_attrb_part2 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part1 = new HashMap<Integer,WeatherData>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part2 = new HashMap<Integer,WeatherData>();\n\t\t//System.out.println(\"the partition elem is\"+partitonElem);\n\t\tfor(int i=1;i<=trainDataXMap.size();i++)\n\t\t{\n\t\t\tWeatherData wd = trainDataXMap.get(i);\n\t\t\t\n\t\t\tfor(Feature f: wd.getFeatures())\n\t\t\t{\n\t\t\t\tif(f.getName().contains(attrb))\n\t\t\t\t{\n\t\t\t\t\tint attrb_val = Integer.parseInt(f.getValues().get(0).toString());\n\t\t\t\t\tint xTRainKey = getKey(wd);\n\t\t\t\t\tif(attrb_val <= partitonElem)\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part1.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part1.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part2.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part2.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Size of first partition\n\t\tint Total_Count_attr_part1 = X_Train_attrb_part1.size();\n\t\t//System.out.println(\"the size of X first partition\"+Total_Count_attr_part1);\n\t\t//System.out.println(\"the size of Y first partition\"+Y_Train_attrb_part1.size());\n\t\t\n\t\t//Size of second partition\n\t\tint Total_Count_attr_part2 = X_Train_attrb_part2.size();\n\t\t//System.out.println(\"the size of X second partition\"+Total_Count_attr_part2);\n\t\t//System.out.println(\"the size of Y second partition\"+Y_Train_attrb_part2.size());\n\t\t\n\t\t//No of records in first partition where EVENT = RAIN \n\t\tint count_rain_yes_part1 = getCountsOfRain(Y_Train_attrb_part1,true,Total_Count_attr_part1);\n\t\t//System.out.println(\"count of rain in first part1\"+count_rain_yes_part1);\n\t\t\n\t\t//No of records in first partition where EVENT != RAIN Y_Train_attrb_part1\n\t\tint count_rain_no_part1 = getCountsOfRain(Y_Train_attrb_part1,false,Total_Count_attr_part1);\t\t\n\t\t//System.out.println(\"count of no rain in first part1\"+count_rain_no_part1);\n\t\t\n\t\t//Compute the Information Gain in first partition\n\t\t\n\t\tdouble prob_yes_rain_part1 = 0.0;\n\t\tdouble prob_no_rain_part1 = 0.0;\n\t\tdouble prob_yes_rain_part2 = 0.0;\n\t\tdouble prob_no_rain_part2 = 0.0;\n\t\tdouble getInfoGain_part1 = 0.0;\n\t double getInfoGain_part2 = 0.0;\n\t double gain_ratio_partition = 0.0;\n\t\tif(Total_Count_attr_part1!=0){\n\t\t\tprob_yes_rain_part1 = (count_rain_yes_part1/(double)Total_Count_attr_part1);\n\t\t\tprob_no_rain_part1 = (count_rain_no_part1/(double)Total_Count_attr_part1);\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part1!=0.0) && (prob_no_rain_part1!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part1 = getInformationGain(prob_yes_rain_part1,prob_no_rain_part1);\n\t\t}\t\t\n\t\t\n\t\t//System.out.println(\"the info gain from part1\"+getInfoGain_part1);\n\t\t//No of records in second partition where EVENT = RAIN \n int count_rain_yes_part2 = getCountsOfRain(Y_Train_attrb_part2,true,Total_Count_attr_part2);\n\t\t\n //No of records in first partition where EVENT != RAIN\n\t\tint count_rain_no_part2 = getCountsOfRain(Y_Train_attrb_part2,false,Total_Count_attr_part2);\t\n\t\t\n\t\t//Compute the Information Gain in second partition\n\t\tif(Total_Count_attr_part2!=0)\n\t\t{\n\t\t\tprob_yes_rain_part2 = (count_rain_yes_part2/(double)Total_Count_attr_part2);\n\t\t\tprob_no_rain_part2 = (count_rain_no_part2/(double)Total_Count_attr_part2);\n\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part2!=0.0) && (prob_no_rain_part2!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part2 = getInformationGain(prob_yes_rain_part2,prob_no_rain_part2);\n\t\t}\n\t\t//System.out.println(\"the info gain from part2\"+getInfoGain_part2);\n\t\t\n\t\t//Total Information from both partitions\n\t\tdouble infoGainFrom_Partition = getInfoGain_part1 + getInfoGain_part2;\n\t\t\n\t\t//Gain from the Partition\n\t\tdouble Gain_from_partition = information_gain_System - infoGainFrom_Partition;\n\t\t//System.out.println(\"The inf gain from system\"+information_gain_System);\n\t\t//System.out.println(\"The inf gain from part\"+infoGainFrom_Partition);\n\t\t//System.out.println(\"The gain from part\"+Gain_from_partition);\n\t\t\n\t\t//Split information of partition\n\t\tif((Total_Count_attr_part1!=0) && (Total_Count_attr_part2!=0))\n\t\t{\n\t\n\t\t\tdouble splitInfoFromPartition = getInformationGain(((double)Total_Count_attr_part1/total_count_in_train),\n ((double)Total_Count_attr_part2/total_count_in_train));\n\t\t\t\n\t\t\t//System.out.println(\"The split info from partition\"+splitInfoFromPartition);\n \n\t\t\t//Gain ratio of Partition\n gain_ratio_partition = Gain_from_partition/splitInfoFromPartition;\n\t\t}\n\t\t//System.out.println(\"The gain ratio info from partition\"+gain_ratio_partition);\n\t\treturn gain_ratio_partition;\n\t}", "public void process()\n {\n for (int i = 0; i <= names.length-1; i++)\n {\n int x = 0;\n System.out.println(\"\");\n System.out.print(names[i] + \" had test scores of \");\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n System.out.print(scores[i][j] + \", \");\n \n x += scores[i][j];\n \n }\n System.out.print(\" Test average is \" + x/4 + \".\");\n }\n System.out.println(\"\");\n findL();\n findH();\n findAvg();\n }", "public static void main(String[] args) {\n\t\tSparkConf conf = new SparkConf().setAppName(\"NB\").setMaster(\"local[*]\").set(\"spark.ui.port\",\"4040\");;\n\t JavaSparkContext jsc = new JavaSparkContext(conf);\n\t\tString path = \"localpath\";\n\t\tJavaRDD<LabeledPoint> inputData = MLUtils.loadLabeledPoints(jsc.sc(), path).toJavaRDD();\n\t\tJavaRDD<LabeledPoint>[] tmp = inputData.randomSplit(new double[]{0.6, 0.4});\n\t\tJavaRDD<LabeledPoint> training = tmp[0]; // training set\n\t\tJavaRDD<LabeledPoint> test = tmp[1]; // test set\n\t\tNaiveBayesModel model = NaiveBayes.train(training.rdd(), 1.0);\n\t\tJavaPairRDD<Double, Double> predictionAndLabel =\n\t\t test.mapToPair(p -> new Tuple2<>(model.predict(p.features()), p.label()));\n\t\t// Save and load model\n\t\tmodel.save(jsc.sc(), \"localotuput_path\");\n\t\tNaiveBayesModel sameModel = NaiveBayesModel.load(jsc.sc(), \"localotuput_path\");\n\t\t\n\t\tdouble accuracy =\n\t\t\t\t predictionAndLabel.filter(pl -> pl._1().equals(pl._2())).count() / (double) test.count();\n\t\t\t\t\n\t\tSystem.out.println(\"The final accuracy is\"+accuracy);\n//\t\tpredictionAndLabel.foreach(data -> {\n//\t\t System.out.println(\"final model=\"+data._1() + \"final label=\" + data._2());\n//\t\t}); \n\t}", "public static void main(String[] args) {\n\t\t\n\t\tfinal int K = 1;\n\t\tSystem.out.println(\"Reading raw data...\");\n\t\tList <List<Float>> data = CsvReader.read(\"src/mypackage/abalone.data.csv\");\n\t\t\n\t\t//choose training set and test set\n\t\tRandomNumberGenerator random = new RandomNumberGenerator(data.size());\n\t\tint nRemaining = data.size(); // size of data\n\t\tint nNeeded = nRemaining / 10; // number of sample needed\n\t\t\t\n\t\trandom.algorithm(nNeeded, nRemaining); \n\t\tdouble [] chosenData = random.getData(); //get the result\n\t\t\t\t\n\t\t//split the data into training and test set\n\t\tList<List<Float>> training = new ArrayList();\n\t\tList<List<Float>> test = new ArrayList();\n\t\t\t\t\n\t\tfor(int i = 0; i < data.size(); i++){ // iterate through the dataset\n\t\t\t//String[] currentData = (String[])data.get(i);\n\t\t\tif(chosenData[i] != 0)\n\t\t\t\ttraining.add(data.get(i));\n\t\t\telse\n\t\t\t\ttest.add(data.get(i));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Finished choosing training...\");\n\t\t\t\n\t\tfloat[][] trainingMatrix = UtilFunctions.listToMatrix(training);\n\t\tfloat[][] testMatrix = UtilFunctions.listToMatrix(test);\n\t\t\t\t\n\t\tdouble[][] trainingMatrixDouble = new double[trainingMatrix.length] [trainingMatrix[0].length];\n\t\t\n\t\tfor(int i = 0; i < trainingMatrix.length; i++){\n\t\t\ttrainingMatrixDouble[i] = floatToDouble(trainingMatrix[i]);\n\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t//do z-scaling of the training set\n\t\tdouble [] meanTrain = UtilFunctions.getMean(trainingMatrixDouble); //store the mean until column n-1\n\t\tdouble [] sdTrain = UtilFunctions.getSD(trainingMatrixDouble); //store the SD until n-1\n\t\tdouble [] [] normalMatrix = UtilFunctions.normalizeMatrix(trainingMatrixDouble);\n\t\t\t\t\n\t\tfor(int i = 0; i < trainingMatrix.length; i++){\n\t\t\ttrainingMatrix[i] = doubleToFloat(normalMatrix[i]);\n\t\t}\t\n\t\t\n\t\ttraining.clear();\n\t\tfor(int i = 0; i < trainingMatrix.length; i++){\n\t\t\tList<Float> temp = new ArrayList();\n\t\t\tfor(int j = 0; j < trainingMatrix[i].length; j++){\n\t\t\t\ttemp.add(trainingMatrix[i][j]);\n\t\t\t}\n\t\t\ttraining.add(temp);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Done z-scaling...\");\n\t\t\n\t\tKMeans kmeans = new KMeans(training, K); // create a KMeans object\n\t\t\n\t\tSystem.out.println(\"Done making Kmeans object\");\n\t\t\n\t\tkmeans.executeKMeans(); // execute the algorithm\n\t\t\n\t\tSystem.out.println(\"Done executing K-means...\");\n\t\t\n\t\tSystem.out.println(\"K used is: \" + K);\n\t\t\n\t\tList<Centroid> clusters = kmeans.getClusters(); //get the resulting centroid\n\t\tfor(int i = 0; i < clusters.size(); i++){\n\t\t\tSystem.out.println(\"Centoid ID: \" + clusters.get(i).getID());\n\t\t\tSystem.out.println(clusters.get(i).getCoordinate().toString());\n\t\t}\t\n\t\t\n\t\tdouble wcss = 0;\n\t\t\n\t\t//calculate the mean and standard deviation of each cluster\n\t\tfor(int i = 0; i < clusters.size(); i++){\n\t\t\tCentroid cluster = clusters.get(i);\n\t\t\tdouble[] mean = UtilFunctions.getMean(cluster.makeDoubleMatrix());\n\t\t\t\n\t\t\tdouble[] SD = UtilFunctions.getSD(cluster.makeDoubleMatrix());\n\t\t\t\n\t\t\tSystem.out.println(\"Centroid ID: \" + cluster.getID());\n\t\t\tSystem.out.print(\"Mean: \");\n\t\t\tfor(int j = 0; j < mean.length; j++){\n\t\t\t\tSystem.out.print(mean[j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Standard Deviation: \");\n\t\t\tfor(int j = 0; j < SD.length; j++){\n\t\t\t\tSystem.out.print(SD[j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\n\t\tSystem.out.println(\"\\nThe WCSS of this run is: \" + kmeans.getWCSS());\t\n\t\t\n\t\t\n\t\t// run linear regression K times\n\t\tdouble sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K; i++){\n\t\t\t// Y = age of abalone = clusters.get(i).getMemberSize() x 1 matrix (last column of data)\n\t\t\t// X = clusters.get(i).getPointsMember()\n\t\t\t// solves for beta for each cluster\n\t\t\t// getCoordinate() returns List <Float>\n\t\t\t\n\t\t\t// X_Train\n\t\t\tPoint tempPoint = (Point) clusters.get(i).getPointsMember().get(0);\n\t\t\tfloat[][] xFloat = new float [clusters.get(i).getMemberSize()] [tempPoint.getCoordinate().size()];\n\t\t\tdouble[][] xDouble = new double [clusters.get(i).getMemberSize()] [tempPoint.getCoordinate().size()];\n\t\t\t\n\t\t\tfor(int j = 0; j < clusters.get(i).getMemberSize(); j++){\n\t\t\t\tPoint p = (Point) clusters.get(i).getPointsMember().get(j);\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < tempPoint.getCoordinate().size() - 1; k++){\n\t\t\t\t\txFloat[j][k] = (float) p.getCoordinate().get(k);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int j = 0; j < xFloat.length; j++){\n\t\t\t\txDouble[j] = floatToDouble(xFloat[j]);\n\t\t\t}\n\t\t\t\n\t\t\t// Y_Train\n\t\t\tdouble[][] yDouble = new double [clusters.get(i).getMemberSize()] [1];\n\t\t\t\n\t\t\tfor(int j = 0; j < clusters.get(i).getMemberSize(); j++){\n\t\t\t\tyDouble[j][0] = xDouble[j][xDouble[0].length-1];\n\t\t\t}\n\t\t\n\t\t\tSimpleMatrix xTrain = new SimpleMatrix(xDouble);\n\t\t\tSimpleMatrix yTrain = new SimpleMatrix(yDouble);\n\n\t\t\t// xTrain beta = yTrain -> beta = pinv(xTrain) yTrain\n\t\t\tSimpleMatrix beta = (xTrain.pseudoInverse()).mult(yTrain);\n\t\t\t//System.out.println(beta);\n\t\t\t\n\t\t\t// X_Test & Y_Test\n//\t\t\tSimpleMatrix xTest = new SimpleMatrix(xtDouble);\n//\t\t\tSimpleMatrix yTest = new SimpleMatrix(ytDouble);\n\t\t\t\n\t\t\t//sum += mean((xTest.dot(beta) - yTest));\t\n\t\t}\n\t\t\n\t\t// RMSE \n\t\t// np.sqrt(np.mean(((np.dot(X_test, beta) - Y_test) + ... )** 2))\n\t\tdouble rmse = Math.sqrt((1/K)* Math.pow(sum,2));\n\t\tSystem.out.println(\"RMSE: \" + (2.171512325471245 - (K*0.013)));\n\t}", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\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 }", "@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 }", "private double validation(ArrayList<Triple<Integer, Integer, Integer>> devTriples, double margin, int k){\n int count = 0;\n for (Triple<Integer, Integer, Integer> triple : devTriples){\n int head = triple.getLeft();\n int relation = triple.getMiddle();\n int tail = triple.getRight();\n double[] headVector = entityVectors.get(head);\n double[] relationVector = relationVectors.get(relation);\n double[] tailVector = entityVectors.get(tail);\n double[] normalVector = normalVectors.get(relation);\n double[] projectHead = helper.planeProjection(headVector, normalVector);\n double[] projectTail = helper.planeProjection(tailVector, normalVector);\n double distanceL2 = helper.distanceL2(projectHead, relationVector, projectTail, k);\n if (distanceL2 < margin){\n count ++;\n }\n }\n double accuracy = count / devTriples.size();\n return accuracy;\n }", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "public void printError(int epoch, ArrayList<LSTMSequence> seqsArray, boolean isTrain) {\n\n int numSeqs;\n String what = \"\";\n String pre = \"\";\n float fnp = 1.0f;\n\n if (isTrain) {\n numSeqs = numSeqsTrain;\n what = \"training\";\n pre = \"\";\n rankMean = compRankMean(rankTrain, numSeqs);\n compAUC(rankTrain, rankTrainSorted, numSeqs);\n } else {\n numSeqs = numSeqsTest;\n what = \"test\";\n pre = \"TEST: \";\n rankMean = compRankMean(rankTest, numSeqs);\n compAUC(rankTest, rankTestSorted, numSeqs);\n //cr.computeAUC(roclist, numpostest, numnegtest, rocn);\n }\n\n int countTop1 = 0;\n int countTop5 = 0;\n int[] ranks;\n\n if (isTrain) {\n ranks = rankTrain;\n } else {\n ranks = rankTest;\n }\n\n for (int i = 0; i < numSeqs; i++) {\n if (ranks[i] > 1) {\n countTop1++;\n }\n if (ranks[i] > 5) {\n countTop5++;\n }\n }\n\n float top1Error = countTop1 / (float) numSeqs * 100.0f;\n float top5Error = countTop5 / (float) numSeqs * 100.0f;\n float[] crossEntropyErrors = (isTrain) ? crossEntropyErrorsTrain : crossEntropyErrorsTest;\n float min = Integer.MAX_VALUE;\n float max = Integer.MIN_VALUE;\n float sumCEE = 0;\n\n for (int i = 0; i < numSeqs; i++) {\n float crossEntropyError = crossEntropyErrors[i];\n min = Math.min(crossEntropyError, min);\n max = Math.max(crossEntropyError, max);\n sumCEE += crossEntropyError;\n }\n\n float crossEntropyErrorMean = sumCEE / numSeqs;\n int[] labels = new int[numSeqs];\n\n for (int seqNr = 0; seqNr < numSeqs; seqNr++) {\n LSTMSequence seq = seqsArray.get(seqNr);\n float[] seqTargets = seq.getTargets();\n for (int j = 0; j < seqTargets.length; j++) {\n if (seqTargets[j] == 1.0) labels[seqNr] = j + 1;\n }\n }\n\n\t\t/*\n float auc = cr.getAuc();\n float aucn = cr.getAucn();\n\t\t */\n\n fnp = (float) falseneg / (float) numSeqs;\n //float fpp = (numneg != 0) ? (float) falsepos / (float) numneg : 0;\n float mse = epochError / (1.0f * numSeqs);\n\n BufferedWriter out = null;\n\n try {\n\n out = new BufferedWriter(new FileWriter(\"out.txt\", true));\n\n out.write(\"epoch: \" + epoch);\n out.newLine();\n out.write(pre + \"MSE \");\n out.write(new DecimalFormat(\"#.######\").format(mse));\n out.newLine();\n\n out.write(pre + \"errors:\");\n out.write(falseneg + \" (out of \" + numSeqs + \" \" + what + \" examples) \");\n out.write(new DecimalFormat(\"#0.0\").format(fnp * 100) + \"%\");\n out.newLine();\n\n out.write(pre + \"Top 1 Error: \");\n out.write(new DecimalFormat(\"#0.00\").format(top1Error));\n out.newLine();\n out.write(pre + \"Top 5 Error: \");\n out.write(new DecimalFormat(\"#0.00\").format(top5Error));\n out.newLine();\n\n out.write(pre + \"Crossentropy Loss: \");\n out.write(new DecimalFormat(\"#0.00\").format(crossEntropyErrorMean));\n out.newLine();\n\n\t\t\t/*\n out.write(pre + \"false-positive:\");\n out.write(falsepos + \" (out of \" + numneg + \" negative \" + what + \" examples) \");\n out.write(new DecimalFormat(\"#0.0\").format(fpp * 100) + \"%\");\n out.newLine();\n\t\t\t */\n out.write(pre + \"ROC \");\n out.write(new DecimalFormat(\"#0.000\").format(aucVal));\n out.newLine();\n out.write(pre + \"ROC\" + rocn + \" \");\n out.write(new DecimalFormat(\"#0.000\").format(aucNVal));\n out.newLine();\n\n if (!isTrain) {\n out.write(pre + \"Ranks: \");\n for (int i = 0; i < this.numSeqsTest; i++) {\n out.write(this.rankTest[i] + \" \");\n }\n out.newLine();\n out.write(pre + \"CEL: \");\n for (int i = 0; i < this.numSeqsTest; i++) {\n out.write(this.crossEntropyErrorsTest[i] + \" \");\n }\n out.newLine();\n out.write(pre + \"Label: \");\n for (int i = 0; i < this.numSeqsTest; i++) {\n out.write(labels[i] + \" \");\n }\n out.newLine();\n } else {\n out.write(\"Ranks: \");\n for (int i = 0; i < this.numSeqsTrain; i++) {\n out.write(this.rankTrain[i] + \" \");\n }\n out.newLine();\n out.write(\"CEL: \");\n for (int i = 0; i < this.numSeqsTrain; i++) {\n out.write(this.crossEntropyErrorsTrain[i] + \" \");\n }\n out.newLine();\n out.write(\"Label: \");\n for (int i = 0; i < this.numSeqsTrain; i++) {\n out.write(labels[i] + \" \");\n }\n out.newLine();\n }\n out.write(pre + \"Rank mean: \" + new DecimalFormat(\"#0.00\").format(rankMean));\n out.newLine();\n out.newLine();\n out.close();\n\n } catch (IOException e) {\n System.err.println(e);\n } finally {\n try {\n if (out != null) out.close();\n } catch (IOException e) {\n }\n }\n\n System.out.println(\"Thread: \" + threadNr);\n System.out.println(\"epoch: \" + epoch);\n System.out.printf(\"%sMSE:%f\\n\", pre, mse);\n System.out.printf(\"%serrors:%d (out of %d %s examples) %.1f%%\\n\", pre, falseneg, numSeqs, what, fnp * 100);\n\n System.out.print(pre + \"Top 1 Error: \");\n System.out.print(new DecimalFormat(\"#0.00\").format(top1Error));\n System.out.println();\n System.out.print(pre + \"Top 5 Error: \");\n System.out.print(new DecimalFormat(\"#0.00\").format(top5Error));\n System.out.println();\n\n\t\t/*\n System.out.printf(\"%sfalse-positive:%d (out of %d negative %s examples) %.1f%%\\n\", pre, falsepos, numneg, what, fpp * 100);\n\t\t */\n System.out.printf(\"%sROC %.3f\\n\", pre, aucVal);\n System.out.printf(\"%sROC\" + rocn + \" %.3f\\n\", pre, aucNVal);\n\n\n if (!isTrain) {\n System.out.print(\"Ranks: \");\n for (int i = 0; i < this.numSeqsTest; i++) {\n System.out.print(this.rankTest[i] + \" \");\n }\n System.out.println();\n }\n System.out.printf(pre + \"Rank mean: %.2f\", rankMean);\n System.out.println();\n\n }", "public abstract void fit(BinaryData trainingData);", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "protected void calculateAccuracyOfTrainFile( double threshold )\n\t{\n\t\tint result = 0, n = this.class_data.attribute_data.size();\n\t\tdouble sum, total = 0;\n\t\tAttribute temp;\n\n\t\tfor ( int i = 0; i < n; i++ )\n\t\t{\n\t\t\tsum = 0;\n\t\t\tfor ( int j = 0; j < this.attribute_list.size(); j++ )\n\t\t\t{\n\t\t\t\ttemp = this.attribute_list.get( j );\n\t\t\t\tsum += temp.attribute_data.get( i ) * temp.getWeigth();\n\t\t\t}\n\n\t\t\tif ( sum < threshold )\n\t\t\t\tresult = 0;\n\t\t\telse\n\t\t\t\tresult = 1;\n\n\t\t\tif ( result == this.class_data.attribute_data.get( i ) )\n\t\t\t\ttotal++;\n\t\t}\n\n\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\tSystem.out.println( \"Accuracy of training file ( \" + n + \" instance ) = \" + df.format( (total * 100.00 / n) ) );\n\t}", "private int selectFeature(int[] partition, int[] features) {\r\n\t\tdouble[] probs = new double[classes.length]; // allocate space for\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// storing the ratio of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// each output class\r\n\t\t// for each of the output classes\r\n\t\tfor (int c = 0; c < classes.length; c++) {\r\n\t\t\t// check how many samples that map to the class\r\n\t\t\tint[] subset = matches(partition, classes[c]);\r\n\t\t\t// calculate the ratio (to be seen as the probability of its\r\n\t\t\t// occurrence)\r\n\t\t\tprobs[c] = (double) subset.length / (double) partition.length;\r\n\t\t}\r\n\t\t// use the current partition's entropy as reference point\r\n\t\tdouble infoContent = infobits(probs);\r\n\t\t// while we iterate through possible features, keep track of the best\r\n\t\t// gain so far\r\n\t\tdouble bestGain = -.999;\r\n\t\tint bestFeature = features[0];\r\n\t\tfor (int a = 0; a < features.length; a++) {\r\n\t\t\tdouble remainder = 0;\r\n\t\t\t// extract which samples that have the true value in the studied\r\n\t\t\t// feature\r\n\t\t\tint[] subsetTrue = matches(partition, features[a], true);\r\n\t\t\t// extract which samples that have the false value in the studied\r\n\t\t\t// feature\r\n\t\t\tint[] subsetFalse = matches(partition, features[a], false);\r\n\t\t\t// there will be two probability distributions (one for each of the\r\n\t\t\t// above subsets) over the classes\r\n\t\t\tdouble[] probsTrue = new double[classes.length];\r\n\t\t\tdouble[] probsFalse = new double[classes.length];\r\n\t\t\t// check so that we have two groups of samples\r\n\t\t\tif (subsetTrue.length != 0 && subsetFalse.length != 0) {\r\n\t\t\t\t// if so, go through each of the output classes\r\n\t\t\t\tfor (int c = 0; c < classes.length; c++) {\r\n\t\t\t\t\t// and extract the samples that match them, to be used for\r\n\t\t\t\t\t// determining the probability distributions\r\n\t\t\t\t\tint[] subset = matches(subsetTrue, classes[c]);\r\n\t\t\t\t\tprobsTrue[c] = (double) subset.length\r\n\t\t\t\t\t\t\t/ (double) subsetTrue.length;\r\n\t\t\t\t\tsubset = matches(subsetFalse, classes[c]);\r\n\t\t\t\t\tprobsFalse[c] = (double) subset.length\r\n\t\t\t\t\t\t\t/ (double) subsetFalse.length;\r\n\t\t\t\t}\r\n\t\t\t\t// now we calculate what remains after we've split the partition\r\n\t\t\t\t// into the subsets with studied feature\r\n\t\t\t\tremainder = ((double) subsetTrue.length / (double) partition.length)\r\n\t\t\t\t\t\t* infobits(probsTrue)\r\n\t\t\t\t\t\t+ ((double) (subsetFalse.length) / (double) partition.length)\r\n\t\t\t\t\t\t* infobits(probsFalse);\r\n\t\t\t} else {\r\n\t\t\t\t// one subset was empty...\r\n\t\t\t\tremainder = infoContent;\r\n\t\t\t}\r\n\t\t\t// using the reference point, how much do we gain by using this\r\n\t\t\t// feature?\r\n\t\t\tdouble gain = infoContent - remainder;\r\n\t\t\t// if best so far, remember...\r\n\t\t\tif (gain > bestGain) {\r\n\t\t\t\tbestGain = gain;\r\n\t\t\t\tbestFeature = features[a];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bestFeature;\r\n\t}", "public void evaluate ( String predictionFileName ) \n\t\t\t\tthrows IOException\t\n\t{\n\t\tdouble MAE = 0.0, RMSE = 0.0;\n\t\tint countRatings = 0, countTotal = 0;\n\t\t\t\t\n\t\tBufferedWriter wr = new BufferedWriter(new FileWriter(predictionFileName));\n\t\tfor (Integer user : dao.getTestUsers())\t{\n\t\t\tfor (Integer item : dao.getTestItems(user))\t{\n\t\t\t\tcountTotal++;\n\t\t\t\tdouble P = predict(user, item);\n\t\t\t\t// A prediction of -INF is used to indicate that the prediction cannot be made\n\t\t\t\tif (P == Double.NEGATIVE_INFINITY)\n\t\t\t\t\tcontinue;\n\t\t\t\tcountRatings++;\n\t\t\t\tdouble R = dao.getTestRating(user, item);\n\t\t\t\tdouble tmp = P - R;\n\t\t\t\tMAE += Math.abs(tmp);\n\t\t\t\tRMSE += tmp * tmp;\n\t\t\t\twr.write(String.format(\"%d %d %f %f\\n\", user, item, R, P));\n\t\t\t}\n\t\t}\n\t\twr.flush();\n\t\twr.close();\n\n\t\tSystem.out.println(\"Recommender evaluation on test data...\");\n\t\tif (countRatings == 0)\n\t\t\tSystem.out.println(\"Coverage : 0%\");\n\t\telse {\n\t\t\tMAE /= countRatings;\n\t\t\tRMSE = Math.sqrt(RMSE / countRatings);\n\t\t\tSystem.out.printf(\"Coverage %f%%\\n\", (countRatings * 100.0) / countTotal);\n\t\t\tSystem.out.printf(\"MAE : %f\\n\", MAE);\n\t\t\tSystem.out.printf(\"RMSE : %f\\n\", RMSE);\n\t\t}\t\t\n\t}", "CrossValidation createCrossValidation();", "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}", "private void fitFold(int k, int foldNum, DataFold fold) {\n\t\tMLMethod method = this.createMethod();\n\t\tMLTrain train = this.createTrainer(method, fold.getTraining());\n\n\t\tif (train.getImplementationType() == TrainingImplementationType.Iterative) {\n\t\t\tEarlyStoppingStrategy earlyStop = new EarlyStoppingStrategy(\n\t\t\t\t\tfold.getValidation());\n\t\t\ttrain.addStrategy(earlyStop);\n\n\t\t\tStringBuilder line = new StringBuilder();\n\t\t\twhile (!train.isTrainingDone()) {\n\t\t\t\ttrain.iteration();\n\t\t\t\tline.setLength(0);\n\t\t\t\tline.append(\"Fold #\");\n\t\t\t\tline.append(foldNum);\n\t\t\t\tline.append(\"/\");\n\t\t\t\tline.append(k);\n\t\t\t\tline.append(\": Iteration #\");\n\t\t\t\tline.append(train.getIteration());\n\t\t\t\tline.append(\", Training Error: \");\n\t\t\t\tline.append(Format.formatDouble(train.getError(), 8));\n\t\t\t\tline.append(\", Validation Error: \");\n\t\t\t\tline.append(Format.formatDouble(earlyStop.getValidationError(),\n\t\t\t\t\t\t8));\n\t\t\t\treport.report(k, foldNum, line.toString());\n\t\t\t}\n\t\t\tfold.setScore(earlyStop.getValidationError());\n\t\t\tfold.setMethod(method);\n\t\t} else if (train.getImplementationType() == TrainingImplementationType.OnePass) {\n\t\t\ttrain.iteration();\n\t\t\tdouble validationError = calculateError(method,\n\t\t\t\t\tfold.getValidation());\n\t\t\tthis.report.report(k, k,\n\t\t\t\t\t\"Trained, Training Error: \" + train.getError()\n\t\t\t\t\t\t\t+ \", Validatoin Error: \" + validationError);\n\t\t\tfold.setScore(validationError);\n\t\t\tfold.setMethod(method);\n\t\t} else {\n\t\t\tthrow new EncogError(\"Unsupported training type for EncogModel: \"\n\t\t\t\t\t+ train.getImplementationType());\n\t\t}\n\t}", "private boolean stepDivision(){\r\n\t\tif(stepNumber == 2){//the first step, k = 2\r\n\t\t\t//do division for all attributes on currentTable\r\n\t\t\tint attrNum = currentTable.getNumberofAttributes();\r\n\t\t\tint caseNum = currentTable.getnumberofCases();\r\n\t\t\tallmaxmin = currentTable.calcuateAllMaxMin();\r\n\t\t\tBigDecimal tempcutPoint;\r\n\t\t\tBigDecimal tempcompare;\r\n\t\t\tfor(int i = 0; i < attrNum; i++){\r\n\t\t\t\ttempcutPoint = allmaxmin[i*2].add(allmaxmin[i*2+1]).multiply(new BigDecimal(0.5));\r\n\t\t\t\tfor(int j = 0;j < caseNum;j++){\r\n\t\t\t\t\ttempcompare = new BigDecimal(originalTable.getItemByIndexinTable(j, i));\r\n\t\t\t\t\tif(tempcompare.compareTo(tempcutPoint) == -1){\r\n\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(j,i,Utils.Round2(allmaxmin[i*2+1])+\"..\"+Utils.Round2(tempcutPoint));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(j,i,Utils.Round2(tempcutPoint)+\"..\"+Utils.Round2(allmaxmin[i*2]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcutPointsNumber[i] = 1; //at first, only one cut point for each attribute\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{//only divide the worst case\r\n\t\t\tcutPointsNumber[currentWorstAttribute]++;\r\n\t\t\tint cutSize = cutPointsNumber[currentWorstAttribute];\r\n\t\t\tBigDecimal[] maxmin = originalTable.calcuateMaxandMinAttribute(currentWorstAttribute);\r\n\t\t\tBigDecimal interval = (maxmin[0].subtract(maxmin[1])).divide(new BigDecimal(cutSize+1),3, RoundingMode.HALF_UP);\r\n\t\t\tif(interval.compareTo(new BigDecimal(0)) == 0){\r\n\t\t\t\t//System.out.println();\r\n\t\t\t}\r\n\t\t\tBigDecimal intervalstart,intervalend;\r\n\t\t\tint caseNum = currentTable.getnumberofCases();\r\n\t\t\tBigDecimal tempcompare;\r\n\t\t\tfor(int i = 0;i < caseNum;i++){\r\n\t\t\t\tfor(int j = 0;j < cutSize+1;j++){\r\n\t\t\t\t\ttempcompare = new BigDecimal(originalTable.getItemByIndexinTable(i, currentWorstAttribute));\r\n\t\t\t\t\tintervalstart = maxmin[1].add(interval.multiply(new BigDecimal(j)));\r\n\t\t\t\t\tif(j == cutSize){\r\n\t\t\t\t\t\tintervalend = maxmin[0];\r\n\t\t\t\t\t\tif(tempcompare.compareTo(intervalstart) >= 0&&tempcompare.compareTo(intervalend) <= 0){\r\n\t\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(i, currentWorstAttribute, Utils.Round2(intervalstart)+\"..\"+Utils.Round2(intervalend));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tintervalend = intervalstart.add(interval);\r\n\t\t\t\t\t\tif(tempcompare.compareTo(intervalstart) >= 0&&tempcompare.compareTo(intervalend) == -1){\r\n\t\t\t\t\t\t\tcurrentTable.setItemByIndexinTable(i, currentWorstAttribute, Utils.Round2(intervalstart)+\"..\"+Utils.Round2(intervalend));\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\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\tcurrentTable.printoutDecisionTable();\r\n\t\t\t//System.out.println();\r\n\t\t}\r\n\t\tConsistencyChecker newchecker = new ConsistencyChecker(currentTable);\r\n\t\tif(newchecker.ifConsistency() == true){\r\n\t\t\tSystem.out.println(\"Discretization Succeed!\");\r\n\t\t\t//currentTable.enablePrint = true;\r\n\t\t\tcurrentTable.printoutDecisionTable();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tstepNumber++;\r\n\t\t\tcurrentTable.printoutDecisionTable();\r\n\t\t\tcurrentWorstAttribute = getWorstAttributeNo();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public interface MultiLabelClassifier extends Serializable{\n int getNumClasses();\n MultiLabel predict(Vector vector);\n default MultiLabel[] predict(MultiLabelClfDataSet dataSet){\n\n List<MultiLabel> results = IntStream.range(0,dataSet.getNumDataPoints()).parallel()\n .mapToObj(i -> predict(dataSet.getRow(i)))\n .collect(Collectors.toList());\n return results.toArray(new MultiLabel[results.size()]);\n }\n\n default void serialize(File file) throws Exception{\n File parent = file.getParentFile();\n if (!parent.exists()){\n parent.mkdirs();\n }\n try (\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(bufferedOutputStream);\n ){\n objectOutputStream.writeObject(this);\n }\n }\n\n default void serialize(String file) throws Exception{\n serialize(new File(file));\n }\n\n\n FeatureList getFeatureList();\n\n LabelTranslator getLabelTranslator();\n\n interface ClassScoreEstimator extends MultiLabelClassifier{\n double predictClassScore(Vector vector, int k);\n default double[] predictClassScores(Vector vector){\n return IntStream.range(0,getNumClasses()).mapToDouble(k -> predictClassScore(vector,k))\n .toArray();\n\n }\n }\n\n\n\n interface ClassProbEstimator extends MultiLabelClassifier{\n double[] predictClassProbs(Vector vector);\n\n /**\n * in some cases, this can be implemented more efficiently\n * @param vector\n * @param classIndex\n * @return\n */\n default double predictClassProb(Vector vector, int classIndex){\n return predictClassProbs(vector)[classIndex];\n }\n }\n\n interface AssignmentProbEstimator extends MultiLabelClassifier{\n double predictLogAssignmentProb(Vector vector, MultiLabel assignment);\n default double predictAssignmentProb(Vector vector, MultiLabel assignment){\n return Math.exp(predictLogAssignmentProb(vector, assignment));\n }\n\n /**\n * batch version\n * can be implemented more efficiently in individual classifiers\n * @param vector\n * @param assignments\n * @return\n */\n default double[] predictAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n return Arrays.stream(predictLogAssignmentProbs(vector, assignments)).map(Math::exp).toArray();\n }\n\n\n default double[] predictLogAssignmentProbs(Vector vector, List<MultiLabel> assignments){\n double[] logProbs = new double[assignments.size()];\n for (int c=0;c<assignments.size();c++){\n logProbs[c] = predictLogAssignmentProb(vector, assignments.get(c));\n }\n return logProbs;\n }\n }\n\n}", "public double getAccuracy(){\n return (numOfHits/numOfGuesses);\n }", "private double[] calculateScores(LACInstance testInstance) throws Exception\n\t{\n\t\tList<Integer> testInstanceFeatures = new ArrayList<Integer>();\n\t\ttestInstanceFeatures.addAll(testInstance.getIndexedFeatures());\n\t\tCollections.sort(testInstanceFeatures);\n\t\t\n\t\tList<LACRule> allRulesForFeatures = new ArrayList<LACRule>(10000);\n\t\tint[] numPatterns = {0};\n\t\tfor(int i = 0; i < testInstanceFeatures.size(); i++)\n\t\t{\n\t\t\tList<Integer> featCombination = new ArrayList<Integer>();\n\t\t\tfeatCombination.add(testInstanceFeatures.get(i));\n\t\t\textractRules(featCombination, testInstanceFeatures, allRulesForFeatures, numPatterns);\n\t\t}\n\t\t\n\t\tint numClasses = trainingSet.getAllClasses().size();\n\t\tdouble[] scores = new double[numClasses];\n\t\tint numRules = allRulesForFeatures.size();\n\t\tif (numRules > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < numRules; i++)\n\t\t\t{\n\t\t\t\tLACRule rule = allRulesForFeatures.get(i);\n\t\t\t\tscores[rule.getPredictedClass()] = scores[rule.getPredictedClass()] + rule.getConfidence();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tscores = null;\n\t\t}\n\t\t\n\t\treturn scores;\n\t}", "public static void main(String[] args) throws InterruptedException,\n\t\t\tException {\n\t\tString[] rType = new String[] { \"MART\", \"RankNet\", \"RankBoost\",\n\t\t\t\t\"AdaRank\", \"Coordinate Ascent\", \"LambdaRank\", \"LambdaMART\",\n\t\t\t\t\"ListNet\", \"Random Forests\", \"Logistic RanKSVM\" };\n\t\tRANKER_TYPE[] rType2 = new RANKER_TYPE[] { RANKER_TYPE.MART,\n\t\t\t\tRANKER_TYPE.RANKNET, RANKER_TYPE.RANKBOOST,\n\t\t\t\tRANKER_TYPE.ADARANK, RANKER_TYPE.COOR_ASCENT,\n\t\t\t\tRANKER_TYPE.LAMBDARANK, RANKER_TYPE.LAMBDAMART,\n\t\t\t\tRANKER_TYPE.LISTNET, RANKER_TYPE.RANDOM_FOREST,\n\t\t\t\tRANKER_TYPE.LOGISTIC_RANKSVM };\n\n\t\tString trainFile = \"\";\n\t\tString featureDescriptionFile = \"\";\n\t\tdouble ttSplit = 0.0;// train-test split\n\t\tdouble tvSplit = 0.0;// train-validation split\n\t\tint foldCV = -1;\n\t\tString validationFile = \"\";\n\t\tString testFile = \"\";\n\t\tint rankerType = 10;// our own logistic ranksvm\n\t\tString trainMetric = \"ERR@10\";\n\t\tString testMetric = \"\";\n\n\t\tString savedModelFile = \"\";\n\t\tString rankFile = \"\";\n\t\tboolean printIndividual = false;\n\n\t\t// for my personal use\n\t\tString indriRankingFile = \"\";\n\t\tString scoreFile = \"\";\n\t\tif (args.length < 2) {\n\n\t\t\tSystem.out.println(\"not enough parameter\");\n\t\t\treturn;\n\t\t}\n\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (args[i].compareTo(\"-train\") == 0)\n\t\t\t\ttrainFile = args[++i];\n\t\t\telse if (args[i].compareTo(\"-ranker\") == 0)\n\t\t\t\trankerType = Integer.parseInt(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-feature\") == 0)\n\t\t\t\tfeatureDescriptionFile = args[++i];\n\t\t\telse if (args[i].compareTo(\"-metric2t\") == 0)\n\t\t\t\ttrainMetric = args[++i];\n\t\t\telse if (args[i].compareTo(\"-metric2T\") == 0)\n\t\t\t\ttestMetric = args[++i];\n\t\t\telse if (args[i].compareTo(\"-nThread\") == 0)\n\t\t\t\tnThread = Integer.parseInt(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-learningRate\") == 0)\n\t\t\t\tlearningRate = Double.parseDouble(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-maxIterations\") == 0)\n\t\t\t\tmaxIterations = Double.parseDouble(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-writeMatrixVInterval\") == 0)\n\t\t\t\twriteMatrixVInterval = Double.parseDouble(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-output_interval\") == 0)\n\t\t\t\toutput_interval = Double.parseDouble(args[++i]);\n\t\t\t\n\t\t\telse if (args[i].compareTo(\"-epsilon\") == 0)\n\t\t\t\tepsilon = Double.parseDouble(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-gmax\") == 0)\n\t\t\t\tERRScorer.MAX = Math.pow(2, Double.parseDouble(args[++i]));\n\t\t\telse if (args[i].compareTo(\"-tts\") == 0)\n\t\t\t\tttSplit = Double.parseDouble(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-tvs\") == 0)\n\t\t\t\ttvSplit = Double.parseDouble(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-allFile_prefix\") == 0)\n\t\t\t\tallFile_prefix = (args[++i]+\"-\");\n\t\t\telse if (args[i].compareTo(\"-kcv\") == 0)\n\t\t\t\tfoldCV = Integer.parseInt(args[++i]);\n\t\t\telse if (args[i].compareTo(\"-validate\") == 0)\n\t\t\t\tvalidationFile = args[++i];\n\t\t\telse if (args[i].compareTo(\"-test\") == 0)\n\t\t\t\ttestFile = args[++i];\n\t\t\telse if (args[i].compareTo(\"-norm\") == 0) {\n\n\t\t\t\tString n = args[++i];\n\t\t\t\tif (n.compareTo(\"sum\") == 0) {\n\t\t\t\t\tnml = new SumNormalizor();\n\t\t\t\t\tnormalize = true;\n\t\t\t\t} else if (n.compareTo(\"zscore\") == 0) {\n\t\t\t\t\tnml = new ZScoreNormalizor();\n\t\t\t\t\tnormalize = true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Unknown normalizor: \" + n);\n\t\t\t\t\tSystem.out.println(\"System will now exit.\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Unknown command-line parameter: \" + args[i]);\n\t\t\t\tSystem.out.println(\"System will now exit.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\t\t\n\t\tLogisticRankSVM logi_rankSvm = new LogisticRankSVM();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tSystem.out.println(\"program starts\");\n\t\tlogi_rankSvm.evaluate(trainFile, validationFile, testFile, \"\");\n\t\tlong endTime = System.currentTimeMillis();\n\t\tSystem.out.println(\"past time:\" + (endTime - startTime) / 1000 + \"s\");\n\n\t}", "private void test() {\r\n \ttry {\r\n\t\t\ttestWriter.write(\"Testing started...\");\r\n\t\t\r\n\t\t\tpredictions = new HashMap<>();\r\n \trightAnswers = new HashMap<>();\r\n\r\n\r\n \t// Get results and check them\r\n \tEvaluation eval = new Evaluation(numLabels);\r\n \tfinalTestIterator.reset();\r\n\r\n \tint metaDataCounter = 0;\r\n \tint addrCounter = 0;\r\n\r\n \twhile(finalTestIterator.hasNext()) {\r\n \t// If iterator has next dataset\r\n \tfinalTestData = finalTestIterator.next();\r\n \t// Get meta-data from this dataset\r\n\r\n \t@SuppressWarnings(\"rawtypes\")\r\n \tList<?> exampleMetaData = finalTestData.getExampleMetaData();\r\n \tIterator<?> exampleMetaDataIterator = exampleMetaData.iterator();\r\n \ttestWriter.write(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n \tSystem.out.println(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n\r\n \t// Normalize data\r\n \tnormalizer.fit(finalTestData);\r\n\r\n \t// Count processed images\r\n \tnumProcessed = (metaDataCounter + 1) * batchSizeTesting;\r\n \tloaded.setText(\"Loaded and processed: \" + numProcessed + \" pictures\");\r\n\r\n \tINDArray features = finalTestData.getFeatures();\r\n \tINDArray labels = finalTestData.getLabels();\r\n \tSystem.out.println(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \t// Get right answers of NN for every input object\r\n \tint[][] rightLabels = labels.toIntMatrix();\r\n \tfor (int i = 0; i < rightLabels.length; i++) {\r\n \tRecordMetaDataURI metaDataUri = (RecordMetaDataURI) exampleMetaDataIterator.next();\r\n \t// Print address of image\r\n \tSystem.out.println(metaDataUri.getLocation());\r\n \tfor (int j = 0; j < rightLabels[i].length; j++) {\r\n \tif(rightLabels[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=right class label\r\n \trightAnswers.put(metaDataUri.getLocation(), j);\r\n \tthis.addresses.add(metaDataUri.getLocation());\r\n \t}\r\n \t}\r\n \t}\r\n \tSystem.out.println(\"\\nRight answers:\");\r\n \ttestWriter.write(\"\\nRight answers:\");\r\n \t// Print right answers\r\n \tfor(Map.Entry<String, Integer> answer : predictions.entrySet()){\r\n \t\ttestWriter.write(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \tSystem.out.printf(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \t}\r\n\r\n \t// Evaluate on the test data\r\n \tINDArray predicted = vgg16Transfer.outputSingle(features);\r\n \tint predFoundCounter = 0;\r\n \tSystem.out.println(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \t// Get predictions of NN for every input object\r\n \tint[][] labelsPredicted = predicted.toIntMatrix();\r\n \tfor (int i = 0; i < labelsPredicted.length; i++) {\r\n \tfor (int j = 0; j < labelsPredicted[i].length; j++) {\r\n \tpredFoundCounter++;\r\n \tif(labelsPredicted[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=predicted class label\r\n \tpredFoundCounter = 0;\r\n \tthis.predictions.put(this.addresses.get(addrCounter), j);\r\n \t}\r\n \telse {\r\n \tif (predFoundCounter == 3) {\r\n \t// To fix bug when searching positive predictions\r\n \tthis.predictions.put(this.addresses.get(addrCounter), 2);\r\n \t}\r\n \t}\r\n \t}\r\n \taddrCounter++;\r\n \t}\r\n \tSystem.out.println(\"\\nPredicted:\");\r\n \ttestWriter.write(\"\\nPredicted:\");\r\n \t// Print predictions\r\n \tfor(Map.Entry<String, Integer> pred : rightAnswers.entrySet()){\r\n \tSystem.out.printf(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString());\r\n \ttestWriter.write(String.format(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString()));\r\n \t}\r\n \tmetaDataCounter++;\r\n\r\n \teval.eval(labels, predicted);\r\n \t}\r\n\r\n \tSystem.out.println(\"\\n\\n Cheack loaded model on test data...\");\r\n \tSystem.out.println(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \tSystem.out.println(eval.stats());\r\n \tSystem.out.println(eval.confusionToString());\r\n \ttestWriter.write(\"\\n\\n Cheack loaded model on test data...\");\r\n \ttestWriter.write(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \ttestWriter.write(eval.stats());\r\n \ttestWriter.write(eval.confusionToString());\r\n\r\n \t// Save test rates\r\n \tthis.f1_score = eval.f1();\r\n \tthis.recall_score = eval.recall();\r\n \tthis.accuracy_score = eval.accuracy();\r\n \tthis.precision_score = eval.precision();\r\n \tthis.falseNegativeRate_score = eval.falseNegativeRate();\r\n \tthis.falsePositiveRate_score = eval.falsePositiveRate();\r\n\r\n \tthis.f1.setText(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \tthis.recall.setText(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \tthis.accuracy.setText(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \tthis.precision.setText(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \tthis.falseNegativeRate.setText(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \tthis.falsePositiveRate.setText(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n \r\n \ttestWriter.write(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \ttestWriter.write(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \ttestWriter.write(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \ttestWriter.write(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \ttestWriter.write(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \ttestWriter.write(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n\r\n \tshowBarChart();\r\n \t} catch (IOException e) {\r\n \t\tSystem.err.println(\"Error while writing to log file\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public abstract int predict(double[] testingData);", "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 }", "@Test\n public void testHardClustersWithOverlappingPartitions()\n {\n check(hardClustersWithOverlappingPartitions(), 0.0, 1.0);\n }", "void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }", "public static void multipleRun(WeightedDataSet trainingDataSet,\n ArrayList<Attribute> attributes,\n Attribute classAttribute,\n int boostIterations,\n int iterations,\n int maxDepth) {\n\n double[] accuracies = new double[iterations];\n double boostingDepthAverage = 0.0;\n\n\n for (int i = 0; i < iterations; i++) {\n WeightedDataSet iterationTrainingSet = new WeightedDataSet(trainingDataSet);\n\n System.out.println(\"Round: \" + i);\n System.out.println(\"Splitting data\");\n WeightedDataSet testDataSet = iterationTrainingSet\n .extractTestDataSet(0.33).transformToWeightedDataSet();\n WeightedDataSet predictionSet = new WeightedDataSet(testDataSet);\n\n System.out.println(\"Starting training\");\n\n AdaBoostDT model = new AdaBoostDT(iterationTrainingSet,\n attributes, classAttribute);\n model.modelGeneration(boostIterations, maxDepth);\n boostingDepthAverage += model.getNumModels();\n\n System.out.println(\"Making prediction\");\n model.predict(predictionSet);\n\n accuracies[i] = testDataSet.computeAccuracy(predictionSet, classAttribute);\n System.out.println(\"Accuracy : \" + accuracies[i]);\n System.out.println();\n }\n\n double mean = Utils.computeMean(accuracies);\n double stdVar = Utils.computeStdVar(mean, accuracies);\n boostingDepthAverage /= iterations;\n\n System.out.println(\"Accuracy mean : \" + mean);\n System.out.println(\"Accuracy std. var. : \" + stdVar);\n System.out.println(\"Average boosting depth : \" + boostingDepthAverage);\n }", "public void calculateMetrics(){\n //precision\n precisionFinal = precision.stream().mapToDouble(f -> f).sum()/precision.size();\n System.out.print(\"Precision: \");\n System.out.println(precisionFinal);\n //recall\n recallFinal = recall.stream().mapToDouble(f -> f).sum()/recall.size();\n System.out.print(\"Recall: \");\n System.out.println(recallFinal);\n //fMeasures\n fMeausureFinal = fMeasures.stream().mapToDouble(f -> f).sum()/fMeasures.size();\n System.out.print(\"Fmeasure: \");\n System.out.println(fMeausureFinal);\n\n //MAP\n mapFinal = apRes.stream().mapToDouble(d->d).sum()/apRes.size();\n System.out.print(\"Mean Avarage Precision: \");\n System.out.println(mapFinal);\n \n mapLimitedFinal = apResRankedTopLimited.stream().mapToDouble(d->d).sum()/apResRankedTopLimited.size();\n System.out.print(\"Mean Precision at rank 10: \");\n System.out.println(mapLimitedFinal);\n \n //NDCG\n ndcgResultsFinal =0;\n ndcgResults.stream().forEach(l-> {\n //it is always true, only added to ensure that doesnt' break with another examples where some queries doens't have results.\n if(l.size()>0){\n ndcgResultsFinal= l.get(l.size()-1)+ndcgResultsFinal;\n }\n });\n ndcgResultsFinal=ndcgResultsFinal/ndcgResults.size();\n \n System.out.print(\"NDCG: \");\n System.out.println(ndcgResultsFinal);\n }", "public static void main(String[] args) throws Exception {\n\t\tfinal double[][] perfMeasures = {\n\t\t\t{10, 11, 9, 10, 11},\n\t\t\t{1, 2, 3, 2, 3}, // Best\n\t\t\t{10, 9, 8, 7, 6}, // Worst\n\t\t\t{7, 5, 6, 6, 6},\n\t\t};\n\n\t\tExplorationFrequency exploFreq = new ExplorationFrequency(1);\n\t\texploFreq.remainingFailCount = 2;\n\t\tdouble expectedBestFreq = Double.NEGATIVE_INFINITY;\n\n\t\tfor(int i = 0; i < 4; i++) {\n\t\t\tdouble freq = exploFreq.get();\n\t\t\tif(i == 1)\n\t\t\t\texpectedBestFreq = freq;\n\n\t\t\tfor(int j = 0; j < 5; j++) {\n\t\t\t\tif(exploFreq.get() != freq)\n\t\t\t\t\tthrow new Exception();\n\n\t\t\t\texploFreq.addMeasure(perfMeasures[i][j]);\n\t\t\t}\n\t\t}\n\n\t\t// Check best is still returned\n\t\tif(exploFreq.get() != expectedBestFreq)\n\t\t\tthrow new Exception();\n\t}", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "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 }", "@Test\n\tpublic void irisTest() throws Exception {\n\t\tint numIters = 10;\n\t\tInstances data = loadIris();\n\t\tDl4jMlpClassifier cls = getMlp();\n\t\tcls.setTrainBatchSize(50);\n\t\tcls.setNumIterations(numIters);\n\t\tString tmpFile = System.getProperty(\"java.io.tmpdir\") + File.separator + \"irisTest.txt\";\n\t\tSystem.err.println(\"irisTest() tmp file: \" + tmpFile);\n\t\tcls.setDebugFile(tmpFile);\n\t\tcls.buildClassifier(data);\n\t\tcls.distributionsForInstances(data);\n\t\tList<String> lines = Files.readAllLines(new File(tmpFile).toPath());\n\t\tassertEquals(lines.size(), numIters+1);\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter number of males and females: \");\r\n\t\tint numOfMales = scan.nextInt();\r\n\t\tint numOfFemales = scan.nextInt();\r\n\t\t\r\n\t\tdouble sumOfClass=numOfMales+numOfFemales;\r\n\t\t\r\n\t\tdouble percentageOfmales = (numOfMales/sumOfClass)*100;\r\n\t\tdouble percentageOffemales = (numOfFemales/sumOfClass)*100;\r\n\t\t\r\n\t\tSystem.out.println(percentageOfmales);\r\n\t\tSystem.out.println(percentageOffemales);\r\n\t\t\r\n\t}", "public final EObject ruleEvaluationType() throws RecognitionException {\n EObject current = null;\n\n EObject this_Partition_0 = null;\n\n EObject this_CrossValidation_1 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMLRegression.g:667:2: ( (this_Partition_0= rulePartition | this_CrossValidation_1= ruleCrossValidation ) )\n // InternalMLRegression.g:668:2: (this_Partition_0= rulePartition | this_CrossValidation_1= ruleCrossValidation )\n {\n // InternalMLRegression.g:668:2: (this_Partition_0= rulePartition | this_CrossValidation_1= ruleCrossValidation )\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==23) ) {\n alt10=1;\n }\n else if ( (LA10_0==24) ) {\n alt10=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 10, 0, input);\n\n throw nvae;\n }\n switch (alt10) {\n case 1 :\n // InternalMLRegression.g:669:3: this_Partition_0= rulePartition\n {\n\n \t\t\tnewCompositeNode(grammarAccess.getEvaluationTypeAccess().getPartitionParserRuleCall_0());\n \t\t\n pushFollow(FOLLOW_2);\n this_Partition_0=rulePartition();\n\n state._fsp--;\n\n\n \t\t\tcurrent = this_Partition_0;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n\n }\n break;\n case 2 :\n // InternalMLRegression.g:678:3: this_CrossValidation_1= ruleCrossValidation\n {\n\n \t\t\tnewCompositeNode(grammarAccess.getEvaluationTypeAccess().getCrossValidationParserRuleCall_1());\n \t\t\n pushFollow(FOLLOW_2);\n this_CrossValidation_1=ruleCrossValidation();\n\n state._fsp--;\n\n\n \t\t\tcurrent = this_CrossValidation_1;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n\n }\n break;\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static void main(String[] args) throws Exception {\n\t\tint i;\r\n\t\tint [][]preci_recall = new int [5][6]; \r\n\r\n\t\tNGRAM ngram = new NGRAM();\r\n\t\t\r\n\t\tfor(i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println((i+1) + \" th FOLD IS A TEST SET\");\r\n\t\t\t\r\n\t\t\tdouble[][] test_ngram_features = ngram.feature(i,1);\r\n\t\t\tdouble[][] train_ngram_features = ngram.feature(i,0);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NGRAM FEATURES...OK\");\r\n\t\r\n//\t\t\t\r\n//\t\t\tLIWC liwc = new LIWC();\r\n//\t\t\t\r\n//\t\t\tdouble[][] test_liwc_features = liwc.feature(i,1,test_ngram_features.length);\r\n//\t\t\tdouble[][] train_liwc_features = liwc.feature(i,0,train_ngram_features.length);\r\n//\r\n//\t\t\tSystem.out.println(\"LIWC FEATURES..OK\");\r\n//\t\t\t\r\n//\t\t\tCOMBINE combine = new COMBINE();\r\n//\t\t\tdouble[][] train_features = combine.sum(train_liwc_features,train_ngram_features);\r\n//\t\t\tdouble[][] test_features = combine.sum(test_liwc_features,test_ngram_features);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"COMBINE...OK\");\r\n\t\t\r\n\t\t\tSVMLIGHT svmlight = new SVMLIGHT();\r\n\t\t\tpreci_recall[i]=svmlight.calcc(train_ngram_features, test_ngram_features);\r\n\r\n\t\t}\r\n\t\t\r\n//\t 0 : truthful TP\r\n//\t 1 : truthful TP+FP\r\n//\t 2 : truthful TP+FN\r\n//\t 3 : deceptive TP\r\n//\t 4 : deceptive TP+FP\r\n//\t 5 : deceptive TP+FN\r\n\t\t\r\n\t\tint truthful_TP_sum=0,truthful_TPFP_sum=0,truthful_TPFN_sum=0;\r\n\t\tint deceptive_TP_sum=0,deceptive_TPFP_sum=0,deceptive_TPFN_sum=0;\r\n\t\t\r\n\t\tfor(i=0;i<5;i++) {\r\n\t\t\ttruthful_TP_sum+=preci_recall[i][0];\r\n\t\t\ttruthful_TPFP_sum+=preci_recall[i][1];\r\n\t\t\ttruthful_TPFN_sum+=preci_recall[i][2];\r\n\t\t\t\r\n\t\t\tdeceptive_TP_sum+=preci_recall[i][3];\r\n\t\t\tdeceptive_TPFP_sum+=preci_recall[i][4];\r\n\t\t\tdeceptive_TPFN_sum+=preci_recall[i][5];\r\n\t\t}\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\n\\nTRUTHFUL_TP_SUM : \" + truthful_TP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFP_SUM : \" + truthful_TPFP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFN_SUM : \" + truthful_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE_TP_SUM : \" + deceptive_TP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFP_SUM : \" + deceptive_TPFP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFN_SUM : \" + deceptive_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nTRUTHFUL PRECISION : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFP_sum));\r\n\t\tSystem.out.println(\"TRUTHFUL RECALL : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFN_sum));\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE PRECISION : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFP_sum));\r\n\t\tSystem.out.println(\"DECEPTIVE RECALL : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFN_sum));\r\n\t\t\r\n\r\n\t}" ]
[ "0.6583196", "0.6442161", "0.6422108", "0.63288414", "0.6175834", "0.6093979", "0.60061926", "0.6005769", "0.5907021", "0.5883354", "0.5876558", "0.5812143", "0.57750815", "0.5749301", "0.5743816", "0.5712676", "0.5688861", "0.56881", "0.5679193", "0.55533797", "0.55060756", "0.54921055", "0.5490301", "0.54853755", "0.54459906", "0.54404026", "0.54096955", "0.53987676", "0.53581744", "0.5340125", "0.5326521", "0.53251517", "0.5305839", "0.5294744", "0.5279098", "0.52331847", "0.5230918", "0.52306896", "0.5223835", "0.5221104", "0.52185005", "0.5211247", "0.5201936", "0.51952577", "0.5194096", "0.51880604", "0.51868695", "0.518501", "0.5174924", "0.51730597", "0.5166553", "0.5166126", "0.51622033", "0.5152607", "0.5146244", "0.5136833", "0.513288", "0.5121214", "0.5120218", "0.5095101", "0.50909483", "0.5082837", "0.5080642", "0.5054567", "0.504902", "0.5045345", "0.5043357", "0.50419545", "0.5033417", "0.5030573", "0.5019112", "0.50174004", "0.5012936", "0.50015384", "0.5001292", "0.49955007", "0.498578", "0.4983189", "0.4977355", "0.4975545", "0.49500746", "0.4944795", "0.49247432", "0.49204218", "0.4920269", "0.49167377", "0.49104235", "0.4907419", "0.4898649", "0.48939183", "0.48932064", "0.48908284", "0.4889545", "0.4883284", "0.48785058", "0.48730385", "0.48617804", "0.48602498", "0.48578888", "0.48550436", "0.48534286" ]
0.0
-1
TODO Autogenerated method stub
@Override public void setDebug(boolean isDebug) { }
{ "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 requestHandle(IPlayer player, IMessage message) { }
{ "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
Created by Gilson Maciel on 06/08/2015.
@PerActivity @Component(dependencies = ApplicationComponent.class, modules = { HomePresenterModule.class }) public interface HomePresenterComponent { void inject(HomeFragment fragment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "private void m50366E() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void method_4270() {}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void kk12() {\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\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "public void m23075a() {\n }", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo91715d() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "private Rekenhulp()\n\t{\n\t}", "private void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n }", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "public void mo12628c() {\n }", "public abstract void mo56925d();", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private void m50367F() {\n }", "@Override\n\tpublic void einkaufen() {\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 init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "protected boolean func_70041_e_() { return false; }", "@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 void init() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo21877s() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo21779D() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "protected abstract Set method_1559();", "@Override\n\tpublic void one() {\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 void mo12930a() {\n }", "@Override\n\tpublic void jugar() {}", "@Override\n\tpublic void nghe() {\n\n\t}", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void init()\n\t{\n\n\t}" ]
[ "0.5739653", "0.57353693", "0.5662932", "0.5662632", "0.5638406", "0.5584623", "0.5569366", "0.5563628", "0.55341953", "0.5530631", "0.55191904", "0.55191904", "0.55187684", "0.54821855", "0.5420265", "0.5385848", "0.53679365", "0.53676975", "0.53651404", "0.53594786", "0.535462", "0.5352298", "0.5340657", "0.5339625", "0.5335413", "0.53309256", "0.53298306", "0.53298306", "0.53298306", "0.53298306", "0.53298306", "0.53259903", "0.5291138", "0.5281175", "0.527253", "0.526257", "0.52569187", "0.52569187", "0.52539283", "0.52455145", "0.5241295", "0.52336097", "0.52276266", "0.52256393", "0.5222969", "0.52217144", "0.5221257", "0.52205026", "0.52202964", "0.5214741", "0.5212103", "0.52044564", "0.5200322", "0.5188792", "0.5188099", "0.5185582", "0.51664233", "0.51616853", "0.51616853", "0.51616853", "0.51616853", "0.51616853", "0.51616853", "0.51609826", "0.51591545", "0.5157067", "0.51543427", "0.51543427", "0.51543427", "0.51543427", "0.51543427", "0.51543427", "0.51543427", "0.515322", "0.515322", "0.515322", "0.51473176", "0.51453215", "0.51453215", "0.51453215", "0.51433784", "0.5142803", "0.5138559", "0.51374346", "0.5133915", "0.5133446", "0.513135", "0.51213676", "0.51179075", "0.5117764", "0.5113446", "0.51071256", "0.51071256", "0.51071256", "0.50965375", "0.5096176", "0.5092056", "0.5083496", "0.508185", "0.50791997", "0.50754666" ]
0.0
-1
Creates new form update_and_search_vendor
public update_and_search_vendor() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String updateVendor(Vendor v) {\n\t\treturn dao.updateVendorDetails(v);\r\n\t}", "public void setVendor(String vendor) {\n this.vendor = vendor;\n }", "public void setVendor(String vendor) {\n this.vendor = vendor;\n }", "public void setVendor(String vendor) {\n this.vendor = vendor;\n }", "public void updateNewTandC(Integer vendorId, String userName);", "@Override\n public boolean doAction(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) {\n SearchAdvVendorContactFormBean formBean = (SearchAdvVendorContactFormBean) form;\n VendorContactBean bean = new VendorContactBean();\n\n bean.setVenId(formBean.getVenId());\n bean.setName(formBean.getName());\n bean.setPosition(formBean.getPosition());\n bean.setHandPhone(formBean.getHandPhone());\n bean.setHomePhone(formBean.getHomePhone());\n bean.setOfficePhone(formBean.getOfficePhone());\n bean.setEmail(formBean.getEmail());\n// bean.setBirthday(formBean.getBirthday());\n\n ArrayList vendorContactList = null;\n VendorDAO vendorDAO = new VendorDAO();\n try {\n vendorContactList = vendorDAO.searchAdvVendorContact(bean);\n } catch (Exception ex) {\n LogUtil.error(\"FAILED:VenderContact:searchAdv-\" + ex.getMessage());\n ex.printStackTrace();\n }\n request.setAttribute(Constants.VENDOR_CONTACT_LIST, vendorContactList);\n return true;\n }", "public static void saveBasicInfo(Vendor vendor, HttpServletRequest request)\n throws EnvoyServletException\n {\n String buf = (String) request.getParameter(\"usernameSelect\");\n if (buf != null && !buf.equals(\"\"))\n {\n User user = UserHandlerHelper.getUser(buf);\n vendor.setUser(user);\n }\n buf = (String) request.getParameter(\"userName\");\n if (buf != null && !buf.equals(\"\"))\n {\n vendor.setUserId(buf);\n String password = (String) request.getParameter(\"password\");\n vendor.setPassword(password);\n }\n\n buf = (String) request.getParameter(\"customVendorId\");\n if (buf != null && !buf.equals(\"\"))\n {\n vendor.setCustomVendorId(buf);\n }\n\n if (\"0\".equals(request.getParameter(\"accessAllowed\")))\n vendor.useInAmbassador(false);\n else\n vendor.useInAmbassador(true);\n\n buf = (String) request.getParameter(\"status\");\n if (buf != null)\n vendor.setStatus(buf);\n buf = (String) request.getParameter(\"firstName\");\n if (buf != null)\n vendor.setFirstName(buf);\n buf = (String) request.getParameter(\"lastName\");\n if (buf != null)\n vendor.setLastName(buf);\n buf = (String) request.getParameter(\"userTitle\");\n if (buf != null)\n vendor.setTitle(buf);\n if (request.getParameter(\"company\").equals(\"false\"))\n {\n vendor.setCompanyName((String) request.getParameter(\"companies\"));\n }\n else\n {\n vendor.setCompanyName((String) request.getParameter(\"companyName\"));\n }\n if (\"0\".equals(request.getParameter(\"vendorType\")))\n vendor.isInternalVendor(false);\n else\n vendor.isInternalVendor(true);\n buf = (String) request.getParameter(\"notes\");\n if (buf != null)\n vendor.setNotes(buf);\n buf = (String) request.getParameter(\"countries\");\n if (buf != null)\n vendor.setNationalities(buf);\n buf = (String) request.getParameter(\"dateOfBirth\");\n if (buf != null)\n vendor.setDateOfBirth(buf);\n buf = (String) request.getParameter(\"alias\");\n if (buf != null)\n vendor.setPseudonym(buf);\n\n }", "public Vendor(VendorBuilder builder){\r\n this.owner = builder.owner;\r\n this.address = builder.address;\r\n this.firstBrand = builder.firstBrand;\r\n this.secondBrand = builder.secondBrand;\r\n }", "public static List searchVendors(HttpServletRequest request, User user,\n SessionManager sessionMgr) throws EnvoyServletException\n {\n try\n {\n boolean setAtLeastOneCriteria = false;\n\n // adding search criteria\n VendorSearchParameters sp = new VendorSearchParameters();\n\n // set parameters\n\n // name\n String buf = (String) request.getParameter(\"nameField\");\n if (buf.trim().length() != 0)\n {\n setAtLeastOneCriteria = true;\n sp.setVendorName(buf);\n sp.setVendorNameType(request.getParameter(\"nameTypeField\"));\n sp.setVendorKey(request.getParameter(\"nameOptions\"));\n }\n\n // company name\n buf = (String) request.getParameter(\"company\");\n if (buf.trim().length() != 0)\n {\n setAtLeastOneCriteria = true;\n sp.setCompanyName(buf);\n sp.setCompanyNameKey(request.getParameter(\"companyOptions\"));\n }\n\n // source locale\n buf = (String) request.getParameter(\"srcLocale\");\n if (!buf.equals(\"-1\"))\n {\n setAtLeastOneCriteria = true;\n sp.setSourceLocale(ServerProxy.getLocaleManager()\n .getLocaleById(Long.parseLong(buf)));\n }\n\n // target locale\n buf = (String) request.getParameter(\"targLocale\");\n if (!buf.equals(\"-1\"))\n {\n setAtLeastOneCriteria = true;\n sp.setTargetLocale(ServerProxy.getLocaleManager()\n .getLocaleById(Long.parseLong(buf)));\n }\n\n // rate/cost\n buf = (String) request.getParameter(\"cost\");\n if (buf.trim().length() != 0)\n {\n setAtLeastOneCriteria = true;\n sp.setRateValue(Float.parseFloat(buf));\n buf = (String) request.getParameter(\"costingRate\");\n sp.setRateType(new Integer(buf));\n sp.setRateCondition(request.getParameter(\"costingOptions\"));\n }\n\n // activity\n buf = (String) request.getParameter(\"activities\");\n if (!buf.equals(\"-1\"))\n {\n setAtLeastOneCriteria = true;\n sp.setActivityId(Long.parseLong(buf));\n }\n\n // custom form keywords\n buf = (String) request.getParameter(\"keywords\");\n if (buf != null && buf.trim().length() != 0)\n {\n setAtLeastOneCriteria = true;\n sp.setCustomPageKeyword(buf);\n }\n\n // Do search\n if (setAtLeastOneCriteria)\n {\n if (request.getParameter(\"caseSensitive\") != null)\n sp.isCaseSensitive(true);\n\n // save the search params in the session for when the user\n // does an action from the results page and the action should\n // take them back to the results page\n sessionMgr.setAttribute(\"vendorSearch\", sp);\n\n return ServerProxy.getVendorManagement().findVendors(user, sp);\n }\n else\n {\n return ServerProxy.getVendorManagement().getVendors(user);\n }\n\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "Product editProduct(Product product);", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.automotor);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.automotor);\n return \"view?faces-redirect=true&id=\" + this.automotor.getId();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = LayoutInflater.from(getContext()).inflate(R.layout.fragment_vendor_list, null, false);\n ButterKnife.bind(this, v);\n apiCommunicator = this;\n communicator = (Communicator) getActivity();\n btnAddVendor = v.findViewById(R.id.btnAddVendor);\n searchVendorEditText = v.findViewById(R.id.searchVendorEditText);\n ((NavigationActivity) getActivity()).onProgress();\n StringRequest stringRequest = new GetVendor(apiCommunicator, new PrefManager(getContext()).getVendorId()).getStringRequest();\n stringRequest.setShouldCache(false);\n MySingleton.getInstance(getContext()).addToRequestQue(stringRequest);\n\n searchVendorEditText.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (adapter != null) {\n adapter.getFilter().filter(s);\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n btnAddVendor.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n NavigationActivity.fm.beginTransaction()\n .replace(R.id.productMainSubMenu, new AddVendorFragment())\n .commit();\n }\n });\n return v;\n }", "@Override\n public void onClick(View v) {\n if(checkEmptyFields() && !productBrand.isEmpty()) // check for empty fields then upload\n {\n updateProduct();\n }\n }", "public Vendor(int vendorid, String vendorName, String vendorContact, String vendorPhone) {\r\n this.vendorId = vendorid;\r\n this.name = vendorName;\r\n this.contactName = vendorContact;\r\n this.phNumber = vendorPhone;\r\n }", "public interface VendorService {\n VendorListDTO getVendors();\n VendorDTO getVendorById(Long id);\n VendorDTO createNewVendor(VendorDTO vendorDTO);\n void deleteVendor(Long id);\n VendorDTO patchVendor(VendorDTO vendorDTO, Long id);\n VendorDTO updateVendor(VendorDTO vendorDTO, Long id);\n}", "@PostMapping(\"/register\")\n\tpublic String processRegistration(@ModelAttribute (name=\"vendor_details\") Vendor v,BindingResult res , RedirectAttributes flashMap)\n\t{\n\t\tSystem.out.println(\"inside registration method\");\n\t\tSystem.out.println(\"in process reg form : vendor details \" + v);\n\t\tSystem.out.println(\"in process reg form : payment details \" + v.getDetails());\n\t\tSystem.out.println(\"binding result \" + res );\n\t\tflashMap.addFlashAttribute(\"message\", vendorService.registerVendor(v));\n\t\t//after inserting the details : redirect client to vendor list\n\t\treturn \"redirect:/admin/list\";\n\t}", "@RequestMapping(path=\"/actualizaFormulario\")\r\n public String viewUpdateForm(@RequestParam(name=\"id\")int id,Model model)\r\n {\n \tProducto producto=productoDAO.getProducto(id);\r\n \t//Introducimos el producto en el modelo\r\n \tmodel.addAttribute(\"producto\", producto);\r\n \t//Llamamos al formulario de actualizacion\r\n \treturn \"formularioProducto2\";\r\n }", "void update(Seller obj);", "void update(Seller obj);", "public String navigateProductvendorList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Productvendor_items\", this.getSelected().getProductvendorList());\n }\n return \"/productvendor/index\";\n }", "public void prepareSearchForUpdate(Search search) {\r\n\t\tDouble rate = currencyService.getCurrencyRate(search.getEbayCountry().getCurrency(), search.getUser());\r\n\t\tsearch.setMinPrice((int)(search.getMinPrice() * rate));\r\n\t\tsearch.setMaxPrice((int)(search.getMaxPrice() * rate));\r\n\t}", "public boolean addVendorAddress(VendorAddress vaddress);", "public String update()\r\n {\r\n this.conversation.end();\r\n\r\n try\r\n {\r\n \t \r\n \t createUpdateImage(this.item);\r\n createUpdateSound(this.item);\r\n \t \r\n \t \r\n if (this.id == null)\r\n {\r\n this.entityManager.persist(this.item);\r\n return \"search?faces-redirect=true\";\r\n }\r\n else\r\n {\r\n this.entityManager.merge(this.item);\r\n return \"view?faces-redirect=true&id=\" + this.item.getId();\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\r\n return null;\r\n }\r\n }", "public void handleAddButton(ActionEvent actionEvent) throws IOException {\n try {\n updateCustomer(Integer.parseInt(idTextbox.getText()),\n nameTextbox.getText(),\n addressTextbox.getText(),\n postalCodeTextbox.getText(),\n phoneTextbox.getText(),\n returnDivisionID(divisionDropdown.getValue()));\n } catch (SQLException e) {\n AlertBox.display(2, \"SQLException in handleAddButton\",e.getMessage());\n } finally {\n ScreenLoader.display(\"customerSearchScreen\",\"Customer Search\",actionEvent);\n }\n }", "public TVendor(Long id) {\r\n\t\tthis.id = id;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n l_no = new javax.swing.JTextField();\n l_search = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n VIN_field = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n name_field = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n state_field = new javax.swing.JTextField();\n Update_button = new javax.swing.JButton();\n insert_button = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n license_field = new javax.swing.JTextField();\n contact_field = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n cid_field = new javax.swing.JTextField();\n pin_field = new javax.swing.JTextField();\n street_field = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n Instock = new javax.swing.JTable();\n selective = new javax.swing.JComboBox<>();\n jPanel2 = new javax.swing.JPanel();\n mode_field = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n price_field = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n tran_field = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"License no.\");\n\n l_no.setToolTipText(\"Enter license number\");\n\n l_search.setBackground(new java.awt.Color(204, 255, 255));\n l_search.setText(\"search\");\n l_search.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n l_searchActionPerformed(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel9.setText(\"VIN\");\n\n VIN_field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n VIN_fieldActionPerformed(evt);\n }\n });\n\n jLabel8.setText(\"State\");\n\n jLabel3.setText(\"License No.\");\n\n jLabel5.setText(\"Street\");\n\n state_field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n state_fieldActionPerformed(evt);\n }\n });\n\n Update_button.setBackground(new java.awt.Color(204, 255, 204));\n Update_button.setText(\"Update\");\n Update_button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Update_buttonActionPerformed(evt);\n }\n });\n\n insert_button.setBackground(new java.awt.Color(204, 255, 255));\n insert_button.setText(\"Insert\");\n insert_button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n insert_buttonActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Customer ID\");\n\n jLabel4.setText(\"Contact No.\");\n\n jLabel2.setText(\"Customer Name\");\n\n license_field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n license_fieldActionPerformed(evt);\n }\n });\n\n contact_field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n contact_fieldActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\" Pin code\");\n\n cid_field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cid_fieldActionPerformed(evt);\n }\n });\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.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(name_field, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(license_field)\n .addComponent(contact_field)\n .addComponent(street_field)\n .addComponent(pin_field)\n .addComponent(cid_field, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(insert_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(state_field)\n .addComponent(Update_button, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cid_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(name_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(license_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(contact_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(street_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pin_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(state_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(insert_button)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Update_button)\n .addContainerGap())\n );\n\n Instock.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(Instock);\n\n selective.setBackground(new java.awt.Color(204, 204, 255));\n selective.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"model\" }));\n selective.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n selectivePopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n selective.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectiveActionPerformed(evt);\n }\n });\n\n jLabel10.setText(\"Transaction ID\");\n\n price_field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n price_fieldActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Confirm\");\n jButton2.setToolTipText(\"Click to confirm\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel11.setText(\"Mode of payment\");\n\n jLabel12.setText(\"Final Price\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE)\n .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(mode_field, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(tran_field, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(price_field, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE))\n .addContainerGap(26, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tran_field, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(13, 13, 13)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(mode_field, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(price_field, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton2))\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(VIN_field, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 132, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(454, 454, 454))\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(selective, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(69, 69, 69))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(l_search, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(l_no, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(40, 40, 40)))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 391, 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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(l_no, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(VIN_field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(l_search)\n .addGap(53, 53, 53)\n .addComponent(selective, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(110, 110, 110))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(145, 145, 145))\n );\n\n pack();\n }", "VendorNotificationResponseDTO update(String id, VendorNotificationRequestDTO VendorDataNotificationRequestDTO)throws Exception;", "public String save() {\r\n\t\tVendorMasterModel model = new VendorMasterModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tboolean result;\r\n\t\tif (vendorMaster.getVendorCode().equals(\"\")) {\r\n\t\t\tresult = model.add(vendorMaster);\r\n\t\t\tif (result) {\r\n\t\t\t\taddActionMessage(\"Record saved successfully.\");\r\n\t\t\t\t//reset();\r\n\t\t\t\tgetNavigationPanel(3);\r\n\t\t\t}// end of if\r\n\t\t\telse {\r\n\t\t\t\taddActionMessage(\"Duplicate entry found.\");\r\n\t\t\t\tmodel.Data(vendorMaster, request);\r\n\t\t\t\tgetNavigationPanel(1);\r\n\t\t\t\treset();\r\n\t\t\t\treturn \"success\";\r\n\t\t\t\t\r\n\t\t\t}// end of else\r\n\t\t}// end of if\r\n\t\telse {\r\n\t\t\tresult = model.mod(vendorMaster);\r\n\t\t\tif (result) {\r\n\t\t\t\taddActionMessage(\"Record updated Successfully.\");\r\n\t\t\t\t//reset();\r\n\t\t\t\tgetNavigationPanel(3);\r\n\t\t\t}// end of if\r\n\t\t\telse {\r\n\t\t\t\tgetNavigationPanel(1);\r\n\t\t\t\tmodel.Data(vendorMaster, request);\r\n\t\t\t\taddActionMessage(\"Duplicate entry found.\");\r\n\t\t\t\treset();\r\n\t\t\t\treturn \"success\";\r\n\t\t\t\t\r\n\t\t\t}// end of else\r\n\t\t}// end of else\r\n\t\tmodel.calforedit(vendorMaster,vendorMaster.getVendorCode());\t\r\n\t\tmodel.terminate();\r\n\t\treturn \"Data\";\r\n\t}", "@GetMapping(\"/showFormForUpdate\")\r\n\tpublic String showFormForUpdate(@RequestParam(\"customerId\") int id, Model theModel){\n\t\tCustomer theCustomer = customerService.getCustomer(id);\r\n\t\t\r\n\t\t//set customer as model attribute to pre-populate\r\n\t\ttheModel.addAttribute(\"customer\",theCustomer);\r\n\t\t\r\n\t\t//send over to our form\r\n\t\treturn \"customer-form\";\r\n\t}", "@Override\n\tprotected Object process() throws SiDCException, Exception {\n\t\tfinal int id = ShopManager.getInstance().insertVendor(entity.getStatus(), entity.getTex(), entity.getEmail(),\n\t\t\t\tentity.getAddress(), entity.getList());\n\t\tLogAction.getInstance().debug(\"step 1/\" + STEP + \":insert success(ShopManager|insertVendor).\");\n\n\t\treturn id;\n\t}", "@GetMapping(\"/showFormForUpdate\")\n\tpublic String showFormForUpdate(@RequestParam(\"customerId\") int id, Model model) {\n\t\tCustomer customer = customerService.getById(id);\n\t\t\n\t\t\n\t\tmodel.addAttribute(\"customer\", customer);\n\t\t\n\t\treturn \"customer-form\";\n\t}", "@Override\n\tpublic void updateProduct(ProductVO vo) {\n\n\t}", "@GetMapping(\"/updatePharmacist\")\n public String pharmacistFormUpdate(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"updatePharmacist\";\n }", "@RequestMapping(\"/addVendorSOI\")\r\n public String addVendorSOI(@RequestParam(value=\"vendor\") String vendor, \r\n \t\t @RequestParam(value=\"clientId\") String clientId) {\r\n //return \"Vendor = \"+vendor+\", Client = \"+clientId;\r\n\t\t\r\n\t\t//if(service != null)\r\n\t\tclientService.addVendorSOI(vendor, clientId);\r\n\t\tlog.info(vendor +\"Size = \"+ClientSecurityOfInterest.vendorSOI.get(vendor).size());\r\n\t\treturn String.valueOf(ClientSecurityOfInterest.vendorSOI.size());\r\n }", "public void updateDb(View view) {\n String productName = getIntent().getStringExtra(\"product\");\n Product p = db.getProductByName(productName);\n p.setName(name.getText().toString());\n p.setAvail(availSpinner.getSelectedItem().toString());\n p.setDescription(desc.getText().toString());\n p.setPrice(new BigDecimal(price.getText().toString()));\n p.setWeight(Double.parseDouble(weight.getText().toString()));\n db.updateProduct(p);\n finish();\n }", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.paramIntervento);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.paramIntervento);\n return \"view?faces-redirect=true&id=\" + this.paramIntervento.getNome();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "public void searchField(String name) {\r\n\t\tsafeType(addVehiclesHeader.replace(\"Add Vehicle\", \"Search\"), name);\r\n\t\t;\r\n\t}", "int updateByPrimaryKey(TVmManufacturer record);", "@Override\n public void insertUpdate(DocumentEvent e) {\n String order = \"\";\n if(fromSplit != null && toSplit != null){\n String query = \n \"Select * from StockOut where cast(dbo.StockOut.Date as date ) between '\"+fromSplit[0]+\"' and \"\n + \" '\"+toSplit[0]+\"' and \" +\n \" (ProductId like '%\"+searchtf.getText()+\"%' or Barcode like '%\"+searchtf.getText()+\"%' or\"\n + \" ProductName like '%\"+searchtf.getText()+\"%' or ProductDesc like '%\"+searchtf.getText()+\"%' or \"\n + \"Category \" \n + \" like '%\"+searchtf.getText()+\"%' or Quantity like '%\"+searchtf.getText()+\"' or \"\n + \"SellPrice like '%\"+searchtf.getText()+\"'or Total like '%\"+searchtf.getText()+\"%' or \"\n + \"InvoiceNo like '%\"+searchtf.getText()+\"%' ) order by invoiceNo \";\n findUsers(query);\n }else{\n String query = \"Select * from StockOut where ProductId like '%\"+searchtf.getText()+\"%' or Barcode like '%\"+searchtf.getText()+\"%' or\"\n + \" ProductName like '%\"+searchtf.getText()+\"%' or ProductDesc like '%\"+searchtf.getText()+\"%' or \"\n + \"Category \" \n + \" like '%\"+searchtf.getText()+\"%' or Quantity like '%\"+searchtf.getText()+\"' or \"\n + \"SellPrice like '%\"+searchtf.getText()+\"'or Total like '%\"+searchtf.getText()+\"%' or \"\n + \"InvoiceNo like '%\"+searchtf.getText()+\"%' order by invoiceNo\";\n findUsers(query);\n }\n \n }", "public static synchronized void addOrSaveVendor(Vendor vendor, Session session)\n {\n try\n {\n session.beginTransaction();\n session.saveOrUpdate(vendor);\n session.getTransaction().commit();\n }\n catch(Exception e)\n {\n log.error(\"Error adding vendor to database\");\n e.printStackTrace();\n }\n }", "public void prepareUpdate() {\r\n\t\tlog.info(\"prepare for update customer...\");\r\n\t\tMap<String, String> params = FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getRequestParameterMap();\r\n\t\tString id = params.get(\"customerIdParam\");\r\n\t\tlog.info(\"ID==\" + id);\r\n\t\tCustomer customer = customerService.searchCustomerById(new Long(id));\r\n\t\tcurrent.setCustomerId(customer.getCustomerId());\r\n\t\tcurrent.setCustomerCode(customer.getCustomerCode());\r\n\t\tcurrent.setCustomerName(customer.getCustomerName());\r\n\t\tcurrent.setTermOfPayment(customer.getTermOfPayment());\r\n\t\tcurrent.setCustomerGrade(customer.getCustomerGrade() != null ? customer.getCustomerGrade() : \"\");\r\n\t\tcurrent.setAddress(customer.getAddress());\r\n\t\tlog.info(\"prepare for update customer end...\");\r\n\t}", "private void addOrUpdate() {\n try {\n Stokdigudang s = new Stokdigudang();\n if (!tableStok.getSelectionModel().isSelectionEmpty()) {\n s.setIDBarang(listStok.get(row).getIDBarang());\n }\n s.setNamaBarang(tfNama.getText());\n s.setHarga(new Integer(tfHarga.getText()));\n s.setStok((int) spJumlah.getValue());\n s.setBrand(tfBrand.getText());\n s.setIDKategori((Kategorimotor) cbKategori.getSelectedItem());\n s.setIDSupplier((Supplier) cbSupplier.getSelectedItem());\n s.setTanggalDidapat(dateChooser.getDate());\n\n daoStok.addOrUpdateStok(s);\n JOptionPane.showMessageDialog(this, \"Data berhasil disimpan!\");\n showAllDataStok();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Data gagal disimpan!\");\n }\n }", "public updateBrandCart() {\n initComponents();\n setSize(750,500);\n tbBrand.getTableHeader().setFont(new Font(\"DialogInput\",Font.BOLD,14));\n tbBrand.getTableHeader().setOpaque(false);\n tbBrand.getTableHeader().setBackground(new Color(204, 204, 255));\n lbErrorNameBrandEmpty.setVisible(false);\n lbErrorExisting.setVisible(false);\n lbErrorIDEmpty.setVisible(false);\n lbErrorNameBrand.setVisible(false);\n lbErrorlID.setVisible(false);\n btUpdating.setVisible(false);\n lbUpdating.setVisible(false);\n lbDelete.setVisible(false);\n btDelete.setVisible(false);\n getInforBrand();\n }", "public void updateLicensePlate(LicensePlateForm form) {\n\t}", "LicenseUpdate create(LicenseUpdate newLicenseUpdate);", "private DynamicForm createSearchBox() {\r\n\t\tfinal DynamicForm filterForm = new DynamicForm();\r\n\t\tfilterForm.setNumCols(4);\r\n\t\tfilterForm.setAlign(Alignment.LEFT);\r\n\t\tfilterForm.setAutoFocus(false);\r\n\t\tfilterForm.setWidth(\"59%\"); //make it line up with sort box\r\n\t\t\r\n\t\tfilterForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tfilterForm.setOperator(OperatorId.OR);\r\n\t\t\r\n\t\t//Visible search box\r\n\t\tTextItem nameItem = new TextItem(\"name\", \"Search\");\r\n\t\tnameItem.setAlign(Alignment.LEFT);\r\n\t\tnameItem.setOperator(OperatorId.ICONTAINS); // case insensitive\r\n\t\t\r\n\t\t//The rest are hidden and populated with the contents of nameItem\r\n\t\tfinal HiddenItem companyItem = new HiddenItem(\"company\");\r\n\t\tcompanyItem.setOperator(OperatorId.ICONTAINS);\r\n\t\tfinal HiddenItem ownerItem = new HiddenItem(\"ownerNickName\");\r\n\t\townerItem.setOperator(OperatorId.ICONTAINS);\r\n\r\n\t\tfilterForm.setFields(nameItem,companyItem,ownerItem);\r\n\t\t\r\n\t\tfilterForm.addItemChangedHandler(new ItemChangedHandler() {\r\n\t\t\tpublic void onItemChanged(ItemChangedEvent event) {\r\n\t\t\t\tString searchTerm = filterForm.getValueAsString(\"name\");\r\n\t\t\t\tcompanyItem.setValue(searchTerm);\r\n\t\t\t\townerItem.setValue(searchTerm);\r\n\t\t\t\tif (searchTerm==null) {\r\n\t\t\t\t\titemsTileGrid.fetchData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tCriteria criteria = filterForm.getValuesAsCriteria();\r\n\t\t\t\t\titemsTileGrid.fetchData(criteria);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn filterForm;\r\n\t}", "public void updateFromSearchFilters() {\n this.businessTravelReadyModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isBusinessTravelReady());\n ExploreHomesFiltersFragment.this.businessTravelAccountManager.setUsingBTRFilter(this.businessTravelReadyModel.checked());\n this.instantBookModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isInstantBookOnly());\n this.entireHomeModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.EntireHome));\n this.privateRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.SharedRoom));\n SearchMetaData homeTabMetadata = ExploreHomesFiltersFragment.this.dataController.getHomesMetadata();\n if (homeTabMetadata != null && homeTabMetadata.hasFacet()) {\n SearchFacets facets = homeTabMetadata.getFacets();\n this.entireHomeModel.show(facets.facetGreaterThanZero(C6120RoomType.EntireHome));\n this.privateRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.SharedRoom));\n }\n this.priceModel.minPrice(ExploreHomesFiltersFragment.this.searchFilters.getMinPrice()).maxPrice(ExploreHomesFiltersFragment.this.searchFilters.getMaxPrice());\n if (homeTabMetadata == null) {\n this.priceModel.histogram(null).metadata(null);\n } else {\n this.priceModel.histogram(homeTabMetadata.getPriceHistogram()).metadata(homeTabMetadata.getSearch());\n }\n this.priceButtonsModel.selection(ExploreHomesFiltersFragment.this.searchFilters.getPriceFilterSelection());\n this.bedCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBeds());\n this.bedroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBedrooms());\n this.bathroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBathrooms());\n addCategorizedAmenitiesIfNeeded();\n updateOtherAmenitiesModels();\n updateFacilitiesAmenitiesModels();\n updateHouseRulesAmenitiesModels();\n notifyModelsChanged();\n }", "@RequestMapping(\"updat\")\r\n\tpublic String update(Model m) \r\n\t{\n\t\tm.addAttribute(\"update1\",new Employee());\r\n\t\treturn \"update\";//register.jsp==form action=register\r\n\t}", "public String f9action() throws Exception {\r\n\r\n\t\tString query = \"SELECT VENDOR_CODE,NVL(VENDOR_NAME,''),NVL(VENDOR_ADDRESS,''),NVL(VENDOR_CONTACT_NO,''),\"\r\n\t\t\t\t+ \" NVL(VENDOR_CITY,''),NVL(VENDOR_STATE,''), NVL(L1.LOCATION_NAME,'') AS CITY,NVL(L2.LOCATION_NAME,'') AS CITY FROM HRMS_VENDOR\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_LOCATION L1 ON(HRMS_VENDOR.VENDOR_CITY=L1.LOCATION_CODE)\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_LOCATION L2 ON(HRMS_VENDOR.VENDOR_STATE=L2.LOCATION_CODE) ORDER BY VENDOR_CODE \";\r\n\r\n\t\tString[] headers = { \"Vendor Code\", getMessage(\"vendor.name\")};\r\n\r\n\t\tString[] headerWidth = { \"30\", \"50\" };\r\n\r\n\t\tString[] fieldNames = { \"vendorCode\", \"vendorName\", \"vendorAdd\",\r\n\t\t\t\t\"vendorCon\", \"ctyId\", \"stateId\", \"vendorCty\", \"vendorState\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1, 2, 3, 4, 5, 6, 7 };\r\n\r\n\t\tString submitFlag = \"true\";\r\n\r\n\t\tString submitToMethod = \"VendorMaster_setData.action\";\r\n\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public void addUpdateBtn() {\n if (isInputValid()) {\n if ( action.equals(Constants.ADD) ) {\n addCustomer(createCustomerData());\n } else if ( action.equals(Constants.UPDATE) ){\n updateCustomer(createCustomerData());\n }\n cancel();\n }\n }", "private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}", "TVmManufacturer selectByPrimaryKey(String vendorid);", "@PutMapping(\"/update\")\r\n\tpublic ProductDetails updateProduct(@RequestBody @Valid UpdateProduct request) {\r\n\t\r\n\t\tProduct product = productService.searchProduct(request.getProduct_Id());\r\n\t\tproduct.setProduct_Name(request.getProduct_Name());\r\n\t\tproduct.setProduct_Price(request.getProduct_Price());\r\n\t\tproduct.setProduct_Quantity(request.getProduct_Quantity());\r\n\t\tproduct.setProduct_Availability(request.isProduct_Availability());\r\n\t\treturn productUtil.toProductDetails(productService.updateProduct(product));\r\n\t}", "@GetMapping(\"/register\")\n\tpublic String provideRegistrationForm(Model map)\n\t{\n\t\tSystem.out.println(\"inside vendor reg form\" + getClass().getName());\n\t\tmap.addAttribute(\"vendor_details\", new Vendor());\n\t\tmap.addAttribute(\"payment_modes\", PaymentMode.values());\n\t\tSystem.out.println(map);\n\t\treturn \"/admin/register\";\n\t}", "public static void add(String vendor, String phone) {\n String errors = \"\";\n boolean valid = true;\n if (vendor.trim().equals(\"\") || vendor.length() > 20) // Check if a blank vendor was added or the vendor's length is longer than database field\n {\n valid = false;\n if (vendor.trim().equals(\"\"))\n errors += \"blank vendor name\\n\";\n else\n errors += \"vendor name is longer than 20 characters\\n\";\n }\n if (phone.trim().equals(\"\") || phone.length() > 12) // We'll make the same checks against the phone field\n {\n valid = false;\n if (phone.trim().equals(\"\"))\n errors += \"blank phone number\\n\";\n else\n errors += \"phone number is longer than 20 characters\\n\";\n }\n \n if (valid)\n {\n // Then create the database connection and insert the new vendor\n DBConnect db = new DBConnect();\n db.SqlInsert(\"vendor\", \"vendor_id, title, phone\", \"'\" + GetNewID() + \"', '\" + vendor + \"', '\" + phone + \"'\");\n db.Dispose(); // Remember to run this to ensure that the database connection is closed\n System.out.println(\"Vendor \" + vendor + \" added successfully!\");\n }\n else\n System.out.println(\"The vendor could not be added for the following reason(s):\\n\" + errors);\n }", "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public void treatmentSearch(){\r\n searchcb.getItems().addAll(\"treatmentID\",\"treatmentName\",\"medicineID\", \"departmentID\", \"diseaseID\");\r\n searchcb.setValue(\"treatmentID\");;\r\n }", "int updateByExample(TVmManufacturer record, TVmManufacturerExample example);", "@Override\r\n\tpublic void updateforSTA(ManufacturersVO ManufacturersVO) {\n\t\t\r\n\t}", "@RequestMapping(\"/edit/{key}\")\n public String edit(@PathVariable(\"key\") String key, Model model) {\n List<CompanyVo> autogenCompanyList = autogenMgr.getAllCompany();\n \n model.addAttribute(\"autogenCompanyList\", autogenCompanyList);\n \n String[] keys = StringUtils.split(key, \"|\");\n \n Autogen autogen = autogenMgr.getAutogen(keys[0], keys[1]);\n \n model.addAttribute(\"autogen\", autogen);\n \n return \"/management/autogen/edit\";\n }", "@FXML\n\tpublic void updateProduct(ActionEvent event) {\n\t\tProduct productToUpdate = restaurant.returnProduct(LabelProductName.getText());\n\t\tif (!txtUpdateProductName.getText().equals(\"\") && !txtUpdateProductPrice.getText().equals(\"\")\n\t\t\t\t&& selectedIngredients.isEmpty() == false) {\n\n\t\t\ttry {\n\t\t\t\tproductToUpdate.setName(txtUpdateProductName.getText());\n\t\t\t\tproductToUpdate.setPrice(txtUpdateProductPrice.getText());\n\t\t\t\tproductToUpdate.setSize(ComboUpdateSize.getValue());\n\t\t\t\tproductToUpdate.setType(toProductType(ComboUpdateType.getValue()));\n\t\t\t\tproductToUpdate.setIngredients(toIngredient(selectedIngredients));\n\n\t\t\t\tproductToUpdate.setEditedByUser(restaurant.returnUser(empleadoUsername));\n\n\t\t\t\trestaurant.saveProductsData();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Producto actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtUpdateProductName.setText(\"\");\n\t\t\t\ttxtUpdateProductPrice.setText(\"\");\n\t\t\t\tComboUpdateSize.setValue(\"\");\n\t\t\t\tComboUpdateType.setValue(\"\");\n\t\t\t\tChoiceUpdateIngredients.setValue(\"\");\n\t\t\t\tLabelProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\toptionsFxml.setController(this);\n\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public static Result save() {\n List<Manufacturer> manufacturers = Manufacturer.find.all();\n if(request().method() == \"POST\")\n {\n // Read form data\n Form<Product> form = Form.form(Product.class).bindFromRequest();\n\n // Validate the name\n if(form.field(\"name\").valueOr(\"\").isEmpty()){\n Logger.info(form.field(\"name\").valueOr(\"\"));\n form.reject(\"name\", \"Product name cannot be empty!!\");\n }\n // Validate the description\n if(form.field(\"description\").valueOr(\"\").isEmpty()){\n Logger.info(form.field(\"description\").valueOr(\"\"));\n form.reject(\"description\", \"Product description cannot be empty!!\");\n }\n // If errors, return the form\n if(form.hasErrors()){\n Logger.info(\"Why am I here!!!\");\n flash(\"danger\", \"Product form submission has error!!!\");\n return badRequest(views.html.product.form.render(form, manufacturers));\n }\n else{\n Manufacturer manufacturer = Manufacturer.findById(Integer.parseInt(form.field(\"manufacturer_id\").value()));\n Product p = form.get();\n p.manufacturer = manufacturer;\n if(p.id == 0)\n p.save();\n else\n p.update();\n flash(\"success\", \"Product created/updated successfully!!!\");\n return redirect(routes.ProductController.list());\n }\n }\n else{\n flash(\"danger\", \"Invalid product edit request!!!\");\n return redirect(routes.ProductController.list());\n }\n }", "@GetMapping(\"/showFormForUpdate\")\r\n\tpublic String showUpdateVehicleForm(@RequestParam(\"vehicleIdToUpdate\") int vehicleId, Model theModel) {\n\t\tVehiclePersonHelper theVehicleXperson = vehicleService.getVehicleAndOwnerFromDatabase(vehicleId);\r\n\t\ttheModel.addAttribute(\"vehicleXperson\", theVehicleXperson);\r\n\t\treturn \"add-vehicle\";\r\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/{id}\", params = \"form\", method = RequestMethod.GET) \n\tpublic String updateForm(@PathVariable(\"id\") Long id, Model uiModel) {\n\t\tuiModel.addAttribute(\"customer\", customerService.findById(id));\n\t\treturn \"customers/update\"; \n\t}", "@Override\n\tpublic String updateGoods(String hql) {\n\t\treturn super.updateByHql(hql);\n\t}", "public int addVendor(VendorContact vendorContact) {\r\n\r\n\t\t\tString sql1 = \"insert into vendorTable(vendorname,vendoraddress,vendorlocation,vendorservice,vendorpincode,isActive) values \"\r\n\t\t\t\t\t+ \"('\"\r\n\t\t\t\t\t+ vendorContact.getVendorName()\r\n\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t+ vendorContact.getVendorAddress()\r\n\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t+ vendorContact.getVendorLocation()\r\n\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t+ vendorContact.getVendorService()\r\n\t\t\t\t\t+ \"',\"\r\n\t\t\t\t\t+ vendorContact.getVendorPincode()\r\n\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t+ 0\r\n\t\t\t\t\t+ \")\";\r\n\r\n\t\t\t template.update(sql1);\r\n\t\t\t \r\n\t\t\t Integer maxId = getSequence();\r\n\t\t\t String sql2=\"insert into contactTable(vendorid,contactname,contactDepartment,contactEmail,contactPhone) values (\"\r\n\t\t\t\t\t + maxId\r\n\t\t\t\t\t\t+ \",'\"\r\n\t\t\t\t\t\t+ vendorContact.getContactName()\r\n\t\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t\t+ vendorContact.getContactDepartment()\r\n\t\t\t\t\t\t+ \"','\"\r\n\t\t\t\t\t\t+ vendorContact.getContactEmail()\r\n\t\t\t\t\t\t+ \"','\" + vendorContact.getContactPhone() + \"')\";\r\n\t\t\t return template.update(sql2);\r\n\r\n\t\t\t\t\t \r\n\t\t\t \r\n\t\t}", "public allProductUpdate() {\n initComponents();\n }", "@Override\n public\n void\n updateView()\n {\n // Stop responding to events.\n setAllowEvents(false);\n\n getAccountChooser().displayElements(getAccounts());\n getPanel().removeAll();\n\n // Get new reference to account incase the type or collection has changed.\n setAccount(getProperAccountReference());\n\n if(getAccount() != null)\n {\n setRegisterPanel(new RegisterPanel(getAccount()));\n\n getAccountChooser().setSelectedItem(getAccount().getIdentifier());\n getFilter().updateFormats();\n\n // Build panel.\n getPanel().setFill(GridBagConstraints.BOTH);\n getPanel().add(getRegisterPanel(), 0, 0, 1, 1, 100, 100);\n\n displayTransactions(null);\n }\n\n // Resume responding to events.\n setAllowEvents(true);\n }", "@GetMapping(\"/admin/addCompany\")\n public String addCompanyForm(Model model){\n model.addAttribute(\"company\", new Company());\n model.addAttribute(\"Countries\", adminRepository.getCountries());\n return \"addCompany\";\n }", "public FindOrdersForm(boolean autoLoad) {\n super(UtilUi.MSG.crmFindOrders());\n \n // change the form dimensions to accommodate two columns\n setLabelLength(100);\n setInputLength(180);\n setFormWidth(675);\n \n orderIdInput = new TextField(UtilUi.MSG.orderOrderId(), \"orderId\", getInputLength());\n externalIdInput = new TextField(UtilUi.MSG.orderExternalId(), \"externalId\", getInputLength());\n orderNameInput = new TextField(UtilUi.MSG.orderOrderName(), \"orderName\", getInputLength());\n customerInput = new CustomerAutocomplete(UtilUi.MSG.crmCustomer(), \"partyIdSearch\", getInputLength());\n productStoreInput = new ProductStoreAutocomplete(UtilUi.MSG.orderProductStore(), \"productStoreId\", getInputLength());\n orderStatusInput = new OrderStatusAutocomplete(UtilUi.MSG.commonStatus(), \"statusId\", getInputLength());\n correspondingPoIdInput = new TextField(UtilUi.MSG.opentapsPONumber(), \"correspondingPoId\", getInputLength());\n fromDateInput = new DateField(UtilUi.MSG.commonFromDate(), \"fromDate\", getInputLength());\n thruDateInput = new DateField(UtilUi.MSG.commonThruDate(), \"thruDate\", getInputLength());\n createdByInput = new TextField(UtilUi.MSG.commonCreatedBy(), \"createdBy\", getInputLength());\n lotInput = new LotAutocomplete(UtilUi.MSG.productLotId(), \"lotId\", getInputLength());\n serialNumberInput = new TextField(UtilUi.MSG.productSerialNumber(), \"serialNumber\", getInputLength());\n productInput = new ProductAutocomplete(UtilUi.MSG.orderProduct(), \"productId\", getInputLength());\n findAllInput = new CheckboxField(UtilUi.MSG.commonFindAll(), \"findAll\");\n \n // add a listener to disable the find all option if a status is specified\n // since this option will be ignored\n orderStatusInput.addListener(new FieldListenerAdapter() {\n @Override public void onChange(Field field, Object newVal, Object oldVal) {\n if (orderStatusInput.getText() != null && !\"\".equals(orderStatusInput.getText())) {\n findAllInput.setValue(false);\n }\n }\n });\n // and vice versa if find all is selected clear the status input\n findAllInput.addListener(new FieldListenerAdapter() {\n @Override public void onChange(Field field, Object newVal, Object oldVal) {\n if (findAllInput.getValue()) {\n orderStatusInput.setValue(\"\");\n }\n }\n });\n \n // Build the filter tab\n filterPanel = getMainForm().addTab(UtilUi.MSG.crmFindOrders());\n Panel mainPanel = new Panel();\n mainPanel.setLayout(new ColumnLayout());\n \n SubFormPanel columnOnePanel = new SubFormPanel(getMainForm());\n SubFormPanel columnTwoPanel = new SubFormPanel(getMainForm());\n \n mainPanel.add(columnOnePanel, new ColumnLayoutData(.5));\n mainPanel.add(columnTwoPanel, new ColumnLayoutData(.5));\n \n columnOnePanel.addField(orderIdInput);\n columnTwoPanel.addField(externalIdInput);\n \n columnOnePanel.addField(correspondingPoIdInput);\n columnTwoPanel.addField(orderNameInput);\n \n columnOnePanel.addField(customerInput);\n columnTwoPanel.addField(productStoreInput);\n \n columnOnePanel.addField(orderStatusInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n \n columnOnePanel.addField(productInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n \n columnOnePanel.addField(lotInput);\n columnTwoPanel.addField(serialNumberInput);\n \n columnOnePanel.addField(fromDateInput);\n columnTwoPanel.addField(thruDateInput);\n \n columnOnePanel.addField(createdByInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n \n columnOnePanel.addField(findAllInput);\n columnTwoPanel.add(UtilUi.makeBlankFormCell());\n filterPanel.add(mainPanel);\n \n shippingToNameInput = new TextField(UtilUi.MSG.partyToName(), \"toName\", getInputLength());\n shippingAttnNameInput = new TextField(UtilUi.MSG.partyAttentionName(), \"attnName\", getInputLength());\n shippingAddressInput = new TextField(UtilUi.MSG.address(), \"address\", getInputLength());\n shippingCityInput = new TextField(UtilUi.MSG.city(), \"city\", getInputLength());\n shippingPostalCodeInput = new TextField(UtilUi.MSG.postalCode(), \"postalCode\", getInputLength());\n shippingCountryInput = new CountryAutocomplete(UtilUi.MSG.country(), \"country\", getInputLength());\n shippingStateInput = new StateAutocomplete(UtilUi.MSG.stateOrProvince(), \"state\", shippingCountryInput, getInputLength());\n // Build the filter by advanced tab\n filterByAdvancedTab = getMainForm().addTab(UtilUi.MSG.findByShippingAddress());\n Panel advancedPanel = new Panel();\n advancedPanel.setLayout(new ColumnLayout());\n \n SubFormPanel columnOneAdvancedPanel = new SubFormPanel(getMainForm());\n SubFormPanel columnTwoAdvancedPanel = new SubFormPanel(getMainForm());\n \n advancedPanel.add(columnOneAdvancedPanel, new ColumnLayoutData(.5));\n advancedPanel.add(columnTwoAdvancedPanel, new ColumnLayoutData(.5));\n \n columnOneAdvancedPanel.addField(shippingToNameInput);\n columnTwoAdvancedPanel.addField(shippingAttnNameInput);\n \n columnOneAdvancedPanel.addField(shippingAddressInput);\n columnTwoAdvancedPanel.add(UtilUi.makeBlankFormCell());\n \n columnOneAdvancedPanel.addField(shippingCityInput);\n columnTwoAdvancedPanel.add(UtilUi.makeBlankFormCell());\n \n columnOneAdvancedPanel.addField(shippingCountryInput);\n columnTwoAdvancedPanel.addField(shippingStateInput);\n \n columnOneAdvancedPanel.addField(shippingPostalCodeInput);\n columnTwoAdvancedPanel.add(UtilUi.makeBlankFormCell());\n \n filterByAdvancedTab.add(advancedPanel);\n \n orderListView = new SalesOrderListView();\n orderListView.setAutoLoad(autoLoad);\n orderListView.init();\n addListView(orderListView);\n \n \n }", "public void setVendorValue(int vendorValue)\r\n {\r\n\tthis.vendorValue = vendorValue;\r\n }", "private HStack createEditForm() {\r\n\t\teditFormHStack = new HStack();\r\n\t\t\r\n\t\tVStack editFormVStack = new VStack();\r\n\t\teditFormVStack.addMember(addStarRatings());\r\n\t\t\r\n\t\tboundSwagForm = new DynamicForm();\r\n\t\tboundSwagForm.setNumCols(2);\r\n//\t\tboundSwagForm.setLongTextEditorThreshold(40);\r\n\t\tboundSwagForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tboundSwagForm.setAutoFocus(true);\r\n\r\n\t\tHiddenItem keyItem = new HiddenItem(\"key\");\r\n\t\tTextItem nameItem = new TextItem(\"name\");\r\n\t\tnameItem.setLength(50);\r\n\t\tnameItem.setSelectOnFocus(true);\r\n\t\tTextItem companyItem = new TextItem(\"company\");\r\n\t\tcompanyItem.setLength(20);\r\n\t\tTextItem descriptionItem = new TextItem(\"description\");\r\n\t\tdescriptionItem.setLength(100);\r\n\t\tTextItem tag1Item = new TextItem(\"tag1\");\r\n\t\ttag1Item.setLength(15);\r\n\t\tTextItem tag2Item = new TextItem(\"tag2\");\r\n\t\ttag2Item.setLength(15);\r\n\t\tTextItem tag3Item = new TextItem(\"tag3\");\r\n\t\ttag3Item.setLength(15);\r\n\t\tTextItem tag4Item = new TextItem(\"tag4\");\r\n\t\ttag4Item.setLength(15);\r\n\t\t\r\n\t\tStaticTextItem isFetchOnlyItem = new StaticTextItem(\"isFetchOnly\");\r\n\t\tisFetchOnlyItem.setVisible(false);\r\n\t\tStaticTextItem imageKeyItem = new StaticTextItem(\"imageKey\");\r\n\t\timageKeyItem.setVisible(false);\r\n\t\t\r\n\t\tTextItem newImageURLItem = new TextItem(\"newImageURL\");\r\n\r\n\t\tboundSwagForm.setFields(keyItem, nameItem, companyItem, descriptionItem, tag1Item,\r\n\t\t\t\ttag2Item, tag3Item, tag4Item, isFetchOnlyItem, imageKeyItem, newImageURLItem);\r\n\t\teditFormVStack.addMember(boundSwagForm);\r\n\t\t\r\n\t\tcurrentSwagImage = new Img(\"/images/no_photo.jpg\"); \r\n\t\tcurrentSwagImage.setImageType(ImageStyle.NORMAL); \r\n\t\teditFormVStack.addMember(currentSwagImage);\r\n\t\teditFormVStack.addMember(createImFeelingLuckyImageSearch());\r\n\t\t\r\n\t\tIButton saveButton = new IButton(\"Save\");\r\n\t\tsaveButton.setAutoFit(true);\r\n\t\tsaveButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t//TODO\r\n\t\t\t\t//uploadForm.submitForm();\r\n\t\t\t\t//Turn off fetch only (could have been on from them rating the item\r\n\t\t\t\tboundSwagForm.getField(\"isFetchOnly\").setValue(false);\r\n\t\t\t\tboundSwagForm.saveData();\r\n\t\t\t\thandleSubmitComment(); //in case they commented while editing\r\n\t\t\t\t//re-sort\r\n\t\t\t\tdoSort();\r\n\t\t\t\tif (boundSwagForm.hasErrors()) {\r\n\t\t\t\t\tWindow.alert(\"\" + boundSwagForm.getErrors());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\t\t\r\n\t\t\t\t\teditFormHStack.hide();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tIButton cancelButton = new IButton(\"Cancel\");\r\n\t\tcancelButton.setAutoFit(true);\r\n\t\tcancelButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tIButton deleteButton = new IButton(\"Delete\");\r\n\t\tdeleteButton.setAutoFit(true);\r\n\t\tdeleteButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tshowConfirmRemovePopup(itemsTileGrid.getSelectedRecord());\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\teditButtonsLayout = new HLayout();\r\n\t\teditButtonsLayout.setHeight(20);\r\n\t\teditButtonsLayout.addMember(saveButton);\r\n\t\teditButtonsLayout.addMember(cancelButton);\r\n\t\teditButtonsLayout.addMember(deleteButton);\r\n\t\t\r\n\t\teditFormVStack.addMember(editButtonsLayout);\r\n\t\t\r\n\t\ttabSet = new TabSet();\r\n\t\ttabSet.setDestroyPanes(false);\r\n tabSet.setTabBarPosition(Side.TOP);\r\n tabSet.setTabBarAlign(Side.LEFT);\r\n tabSet.setWidth(570);\r\n tabSet.setHeight(570);\r\n \r\n\r\n Tab viewEditTab = new Tab();\r\n viewEditTab.setPane(editFormVStack);\r\n\r\n commentsTab = new Tab(\"Comments\");\r\n commentsTab.setPane(createComments());\r\n \r\n tabSet.addTab(viewEditTab);\r\n tabSet.addTab(commentsTab);\r\n //put focus in commentsEditor when they click the Comments tab\r\n tabSet.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tTab selectedTab = tabSet.getSelectedTab();\r\n\t\t\t\tif (commentsTab==selectedTab) {\r\n\t\t\t\t\trichTextCommentsEditor.focus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n \r\n VStack tabsVStack = new VStack();\r\n itemEditTitleLabel = new Label(); \r\n itemEditTitleLabel.setHeight(30); \r\n itemEditTitleLabel.setAlign(Alignment.LEFT); \r\n itemEditTitleLabel.setValign(VerticalAlignment.TOP); \r\n itemEditTitleLabel.setWrap(false); \r\n tabsVStack.addMember(itemEditTitleLabel);\r\n //make sure this is drawn since we set the tab names early\r\n tabSet.draw();\r\n tabsVStack.addMember(tabSet);\r\n\t\teditFormHStack.addMember(tabsVStack);\r\n\t\teditFormHStack.hide();\r\n\t\treturn editFormHStack;\r\n\t}", "public Builder setCouponVendor(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n couponVendor_ = value;\n onChanged();\n return this;\n }", "@RequestMapping(value=\"/selectShoe\",method=RequestMethod.GET)\r\n\tpublic String searchForm(ModelMap model){\r\n\t\tString message=\"Image Got\";\r\n\t\tSystem.out.println(\"In controller\");\r\n\t\tProductTO productTO=new ProductTO();\r\n\t\tmodel.addAttribute(\"productTO\", productTO);\r\n\t\treturn \"SearchResult\";\r\n\t}", "@Override\r\n\tpublic void k_update(ManufacturersVO MANUFACTURERSVO) {\n\t\t\r\n\t}", "public interface VendorRepository extends CrudRepository<Vendor, Integer> {\n Vendor findByName(String name);\n Iterable<Vendor> findByNameLike(String search);\n Iterable<Vendor> findByLocation(String location);\n Vendor findByUser(User user);\n}", "void fillEditTransactionForm(Transaction transaction);", "@Override\n\tpublic void update(Brand brand) {\n\t\tsql=\"update brands set Name=? where Id=?\";\n \ttry {\n\t\t\tquery=connection.prepareStatement(sql);\n\t\t\tquery.setString(1, brand.getName());\n\t\t\tquery.setInt(2, brand.getId());\n\t\t\tquery.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tnew Exception(e);\n\t\t}\n\t}", "@Override\n\tpublic void updateIntoSupplierView(SupplierProduct supplierview) {\n\t String sql=\"UPDATE supplier_product SET product_product_id=?, quantity=?, cost=?, buy_date=? WHERE supplier_supplier_id=?\";\n\t getJdbcTemplate().update(sql, new Object[] {supplierview.getProductId(),supplierview.getQuantity(),supplierview.getCost(),supplierview.getBuyDate(),supplierview.getSupplierId()});\n\t}", "public UpdateProduct() {\n\t\tsuper();\t\t\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\t\n\t\t\tTableRow buttonTableRow = (TableRow) v.getParent();\n\t\t\tButton searchButton = (Button)buttonTableRow.findViewById(R.id.newTagButton);\n\t\t\t\n\t\t\tString tag = searchButton.getText().toString();\n\t\t\t\n\t\t\t//sets edittexts to match the chosen tag and query \n\t\t\ttagEditText.setText(tag);\n\t\t\tQueryEditText.setText(savedSearches.getString(tag, null));\n\t\t}", "public InwardEntity updateInvoice(InwardEntity entity , String companyId, String customerId) throws EntityException\n\t\t\t{\n\n\t\t\t\tDatastore ds = null;\n\t\t\t\tCompany cmp = null;\n\t\t\t\tBusinessPlayers customer = null;\n\t\t\t\tProducts prod = null;\n\t\t\t\tTax tax = null;\n\t\t\t\tKey<InwardEntity> key = null;\n\t\t\t\tObjectId oid = null;\n\t\t\t\tObjectId customerOid = null;\n\t\t\t\tObjectId prodOid = null;\n\t\t\t\tObjectId taxOid = null;\n\t\t\t\tInwardEntity invoice = null;\n\t\t\t\tboolean customerChange = false;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\t\tcmp = query.get();\n\t\t\t\t\tif(cmp == null)\n\t\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t//check if invoice exists with object id for update , fetch invoice, make changes to it\n\t\t\t\t\n\t\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true).\n\t\t\t\t\t\t\tfilter(\"id\",entity.getId());\n\n\t\t\t\t\tinvoice = iQuery.get();\n\t\t\t\t\tif(invoice == null)\n\t\t\t\t\t\tthrow new EntityException(512, \"invoice not found\", null, null); //cant update\n\n\n\t\t\t\t\t/*check if vendor changed in update, if so then check if new vendor exists\n\t\t\t\t\t * if vendor hasnt changed bt was deleted - let it be\n\t\t\t\t\t */\n\n\t\t\t\t\tif(!(customerId.equals(invoice.getCustomer().getId().toString())))\n\t\t\t\t\t{\n\t\t\t\t\t\tcustomerChange = true;\n\t\t\t\t\t\tcustomerOid = new ObjectId(customerId);\n\t\t\t\t\t\tQuery<BusinessPlayers> bpquery = ds.createQuery(BusinessPlayers.class).field(\"company\").equal(cmp).field(\"isCustomer\").equal(true).field(\"id\").equal(customerOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\t\tcustomer = bpquery.get();\n\t\t\t\t\t\tif(customer == null)\n\t\t\t\t\t\t\tthrow new EntityException(512, \"customer not found\", null, null);\n\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/*if bill number is editable, do check if there is new /old vendor + new/old bill number combo unique\n\t\t\t\t\t * if vendor hasnt changed and bill number hasnt chngd - no prob\n\t\t\t\t\t * if vendor/bill number has chngd do check\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// front end list cant be null\n\t\t\t\t\tList<OrderDetails> invoiceDetails = entity.getInvoiceDetails();\n\n\t\t\t\t\tfor(OrderDetails details : invoiceDetails)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t//check tax exists, if not deleted\n\t\t\t\t\t\tif(details.getTax().getId() != null && details.getTax().isDeleted() == false)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\ttaxOid = new ObjectId(details.getTax().getId().toString());\n\t\t\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //has been deleted in due course\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//check tax exists, if deleted\n\t\t\t\t\t\tif(details.getTax().getId() != null && details.getTax().isDeleted() == true)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\ttaxOid = new ObjectId(details.getTax().getId().toString());\n\t\t\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //tax doesn't exists / may not be deleted\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(details.getProduct().isDeleted() == false)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tprodOid = new ObjectId(details.getProduct().getId().toString());\n\t\t\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //has been deleted in due course\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(details.getProduct().isDeleted() == true)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tprodOid = new ObjectId(details.getProduct().getId().toString());\n\t\t\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //product doesn't exists / may not be deleted\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdetails.setId(new ObjectId());\n\t\t\t\t\t\tdetails.setTax(tax);\n\t\t\t\t\t\tdetails.setProduct(prod);\n\n\t\t\t\t\t\ttax = null;\n\t\t\t\t\t\ttaxOid = null;\n\t\t\t\t\t\tprod = null;\n\t\t\t\t\t\tprodOid = null;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(\"protax\");\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setInvoiceDetails(invoiceDetails);\n\t\t\t\t\tinvoice.setCompany(cmp);\n\t\t\t\t\tif(customerChange == true)\n\t\t\t\t\t\tinvoice.setCustomer(customer); //set only if vendor has changed\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setInvoiceDate(entity.getInvoiceDate());\n\t\t\t\t\tinvoice.setInvoiceDate(entity.getInvoiceDate());\n\t\t\t\t\tinvoice.setInvoiceDuedate(entity.getInvoiceDuedate());\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setInvoiceGrandtotal(entity.getInvoiceGrandtotal());\n\t\t\t\t\tinvoice.setInvoiceSubtotal(entity.getInvoiceSubtotal());\n\t\t\t\t\tinvoice.setInvoiceTaxtotal(entity.getInvoiceTaxtotal());\n\t\t\t\t\tjava.math.BigDecimal balance = invoice.getInvoiceGrandtotal().subtract(invoice.getInvoiceAdvancetotal()); //grand total is just set, read prev advance\n\t\t\t\t\tinvoice.setInvoiceBalance(balance);\n\n\t\t\t\t\tkey = ds.merge(invoice);\n\t\t\t\t\tif(key == null)\n\t\t\t\t\t\tthrow new EntityException(515, \"could not update\", null, null);\n\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(EntityException e)\n\t\t\t\t{\n\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tthrow new EntityException(500, null , e.getMessage(), null);\n\t\t\t\t}\n\n\t\t\t\treturn invoice;\n\t\t\t}", "@Auth({User.Role.Admin, User.Role.Customer})\n public static Result create(Long id) {\n Form<Product> form = null;\n List<Manufacturer> manufacturers = Manufacturer.find.all();\n if(id == 0)\n form = Form.form(Product.class).fill(new Product());\n else\n form = Form.form(Product.class).fill(Product.findById(id.intValue()));\n return ok(views.html.product.form.render(form, manufacturers));\n }", "Optional<Vendors> findByVendorID(String s);", "@RequestMapping(value=\"/update\", method = RequestMethod.GET)\n public String conferenceUpdateForm(Model model) {\n model.addAttribute(\"conference\", new Conference());\n return \"admin/updateForm\";\n }", "private void fillSearchFields() {\n view.setMinPrice(1);\n view.setMaxPrice(10000);\n view.setMinSQM(1);\n view.setMaxSQM(10000);\n view.setBedrooms(1);\n view.setBathrooms(1);\n view.setFloor(1);\n view.setHeating(false);\n view.setLocation(\"Athens\");\n }", "public void Editproduct(Product objproduct) {\n\t\t\n\t}", "public AddSupplierForm(java.awt.Frame parent, int index, boolean isUpdate, boolean modal) {\n super(parent, modal);\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"Thêm nhà cung cấp\");\n\n _sC = new SupplierController();\n _lS = _sC.getSuppliersInfo();\n _parent = parent;\n\n if (isUpdate && index >= 0) {\n this.setTitle(\"Cập nhật nhà cung cấp\");\n fillOutInfo(index);\n } else {\n txtMaNCC.setText(_lS.get(_lS.size() - 1).getSupplierId() + 1 + \"\");\n }\n\n txtMaNCC.setEditable(false);\n txtMaNCC.setFocusable(false);\n txtTenNCC.requestFocus();\n\n initAlert();\n }", "public void selectVenue() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void ManageProduct() {\n\t\tint id = this.view.enterId();\r\n\t\tString name = this.view.enterName();\r\n\t\tfloat price = this.view.enterPrice();\r\n\t\tint quantity = this.view.enterQuantity();\r\n\t\t\r\n\t\tthis.model.updProduct(id, name, price, quantity);\r\n\t}", "@RequestMapping(value = \"/add\")\n public String addForm(Model model) {\n model.addAttribute(\"service\",fservice.findAllServices());\n model.addAttribute(\"customer\", mservice.findAllCustomer());\n model.addAttribute(\"customer\", new Customer());\n return \"customer-form\";\n }", "int updateByPrimaryKeySelective(TVmManufacturer record);", "@FXML\n\tpublic void addUpdateIngredientToProduct(ActionEvent event) {\n\t\tif (ChoiceUpdateIngredients.getValue() != null) {\n\t\t\tselectedIngredients.add(ChoiceUpdateIngredients.getValue());\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Ingrediente \" + ChoiceUpdateIngredients.getValue() + \" ha sido añadido al producto\");\n\t\t\tdialog.setTitle(\"Adicion de Ingrediente satisfactoria\");\n\t\t\tdialog.show();\n\t\t\tChoiceUpdateIngredients.setValue(null);\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Debe escoger algun ingrediente para que pueda ser añadido\");\n\t\t\tdialog.setTitle(\"Campo requerido\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public String getVendor()\r\n {\r\n return vendor;\r\n }", "private void update(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString id = req.getParameter(\"id\");\n\t\tString name = req.getParameter(\"name\");\n\t\tString address = req.getParameter(\"address\");\n\t\tString phone = req.getParameter(\"phone\");\n\t\tString oldName = req.getParameter(\"oldName\");\n\t\t\n\t\t//2. check if the name exists\n\t\t//2.1. check if name and oldName are same\n\t\tif(!oldName.equalsIgnoreCase(name)) {\n\t\t\t//2.2. if not same, call customerDAO.getCountByName() to know if the name exists in the database\n\t\t\tlong count = customerDAO.getCountByName(name);\n\t\t\t//2.3. if the return value > 0, forward to newcustomer.jsp\n\t\t\tif(count > 0) {\n\t\t\t\t//2.3.1. display an error message in updatecustomer.jsp page (by request.setAttribute)\n\t\t\t\treq.setAttribute(\"message\", \"Name \\\"\" + name + \"\\\" exists, please enter a different name!\");\n\t\t\t\t//2.3.2. keep the values in the form from previous submission by forwarding to updatecustomer.jsp\n\t\t\t\treq.getRequestDispatcher(\"/updatecustomer.jsp\").forward(req, resp);\n\t\t\t\t//2.3.3. return, end the function\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//3. if not exists, encapsulate parameters into a Customer object\n\t\tCustomer customer = new Customer(name, address, phone);\n\t\tcustomer.setId(Integer.parseInt(id));\n\t\t//4. call customerDAO.update()\n\t\tcustomerDAO.update(customer);\n\t\t//5. redirect to query.do\n\t\tresp.sendRedirect(\"query.do\");\n\t}", "public void okButtonAction(ActionEvent actionEvent){\n\n\n System.out.println(\"okkkkkk\");\n querySpecial=null;\n\n PersistenceUtil pu= PersistenceUtil.getInstance();\n EntityManagerFactory emf =pu.getEmf();\n EntityManager em = emf.createEntityManager();\n\n ArtistRepository ar= ArtistRepository.getInstance();\n\n\n if(textField1.getText()!=null)\n {\n System.out.println(textField1.getText());\n resultArtist=ar.findById(Integer.parseInt(textField1.getText()));\n System.out.println(resultArtist.get().getName());\n writeTable();\n }\n\n\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增商品\",\"输入商品信息,用空格分开,例如:001 方便面 6.8\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Goods values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t\t//compositeGoodsShow.layout(true);\r\n\t\t\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif(productBySearch.size() > 0){\r\n\t\t\t\t\tproductBySearch.clear();\r\n\t\t\t\t}\r\n\t\t\t\tif(productByLike == null){\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse if(productByLike.size() > 0){\r\n\t\t\t\t\tpreviousValue.clear();\r\n\t\t\t\t}\r\n\t\t\t\tif(previousValue.size() > 0){\r\n\t\t\t\t\tpreviousValue.clear();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttempProductSearch = new Product();\r\n\t\t\t\tsubtotal_textField.setText(\"Subtotal: $0.0\");\r\n\t\t\t\ttax_textField.setText(\"Tax: $0.0\");\r\n\t\t\t\ttotal_textField.setText(\"Total: $0.0\");\r\n\t\t\t\t\r\n\t\t\t\ttextField_productID_input.setText(\"\");\r\n\t\t\t\ttextField_name_input.setText(\"\");\r\n\t\t\t\ttextField_description_input.setText(\"\");\r\n\t\t\t\ttextField_quantity_input.setText(\"\");\r\n\t\t\t\ttextPane_productID_notFound.setText(\"\");\r\n\t\t\t\t\r\n\t\t\t\t//Table\r\n\t\t\t\t//private JTable table;\r\n\t\t\t\tremoveTableRows(model); //Clears table rows, model.\r\n\t\t\t\t\r\n\t\t\t\tif(data.size() > 0){\r\n\t\t\t\t\tdata.clear();\r\n\t\t\t\t}\r\n\t\t\t\ttableListenerCount = 0;\r\n\t\t\t\t\r\n\t\t\t\t//Sales Total\r\n\t\t\t\tsubTotal = 0;\r\n\t\t\t\ttax = 0;\r\n\t\t\t\ttotal = 0;\r\n\t\t\t\tc = 0;\r\n\t\t\t\tstringTempPrice = null;\r\n\t\t\t\ttransactionType = null;\r\n\t\t\t\ttransactionMethod = null;\r\n\t\t\t\tpromotionID = 0;\r\n\t\t\t\t\r\n\t\t\t\t//Discount\r\n\t\t\t\tdetail_discountID = 0;\r\n\t\t\t\tdetail_discountType = null;\r\n\t\t\t\toneTimeDiscountCheck = false;\r\n\t\t\t\t//discount_option.setText(\"\");\r\n\t\t\t\tdetail_discountValue = 0;\r\n\t\t\t\t\r\n\t\t\t\t//Discount buttons\r\n\t\t\t\tbutton_discount.setVisible(true);\r\n\t\t\t\tbtnDiscountDetails.setVisible(false);\r\n\t\t\t\t\r\n\t\t\t\ttextField_productID_input.requestFocusInWindow();\r\n\t\t\t}", "@Override\n public void handle(Event event) {\n FXMLCustomerController controller = new FXMLCustomerController();\n controller = (FXMLCustomerController) controller.load();\n\n SearchRowItem whichCustomer = searchResultsTable.getSelectionModel().getSelectedItem();\n controller.setCustomerDetails(whichCustomer);\n\n controller.getStage().showAndWait();\n if (controller.isUpdated()) {\n // refresh Customer against server\n // CustomerTO updatedCustomer = SoapHandler.getCustomerByID(whichCustomer.getCustomerId());\n // whichCustomer.setCustomerTO(updatedCustomer);\n // if there's a partner, set the name\n CustomerTO updatedCustomer = controller.getCustomer();\n Integer partnerId = whichCustomer.getPartnerId();\n if (partnerId != null && partnerId != 0) {\n if (whichCustomer.getPartnerProperty() == null) {\n whichCustomer.setPartnerProperty(new SimpleStringProperty());\n }\n SimpleStringProperty partnerName = (SimpleStringProperty) whichCustomer.getPartnerProperty();\n SearchRowItem partner = customerSet.get(partnerId);\n partnerName.setValue(partner.getForename());\n if (partner.getPartnerProperty() != null) {\n partner.getPartnerProperty().setValue(whichCustomer.getForename());\n } else {\n partner.setPartnerProperty(new SimpleStringProperty(whichCustomer.getForename()));\n }\n } else if (whichCustomer.getPartnerProperty() != null) {\n whichCustomer.getPartnerProperty().setValue(\"\");\n }\n whichCustomer.setCustomer(updatedCustomer);\n whichCustomer.refresh(updatedCustomer);\n // SearchRowItem customer = customerSet.get(whichCustomer.getCustomerId());\n // customer.setCustomerTO(whichCustomer);\n\n searchResultsTable.refresh();\n }\n }", "public VehicleSearchRequest createSearchVechicle() {\r\n\r\n\t\tVehicleSearchRequest searchRequest = new VehicleSearchRequest();\r\n\r\n\t\tif (StringUtils.isBlank(searchLocation)) {\r\n\t\t\tsearchRequest.setLocation(DefaultValues.LOCATION_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setLocation(searchLocation);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchVehicleType)) {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(DefaultValues.VEHICLE_TYPE_DEFAULT.getDef()));\r\n\t\t} else {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(searchVehicleType));\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFin)) {\r\n\t\t\tsearchRequest.setFin(DefaultValues.FIN_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFin(searchFin);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchModel)) {\r\n\t\t\tsearchRequest.setModel(DefaultValues.MODEL_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setModel(searchModel);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFuelType)) {\r\n\t\t\tsearchRequest.setFuelType(FuelType.DEFAULT);\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFuelType(FuelType.getEnum(searchFuelType));\r\n\t\t}\r\n\r\n\t\tif (searchMaxCapacity == 0) {\r\n\t\t\tsearchRequest.setMaxCapacity(DefaultValues.MAX_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxCapacity(searchMaxCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinCapacity == 0) {\r\n\t\t\tsearchRequest.setMinCapacity(DefaultValues.MIN_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinCapacity(searchMinCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinYear == 0) {\r\n\t\t\tsearchRequest.setMinYear(DefaultValues.MIN_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinYear(searchMinYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxYear == 0) {\r\n\t\t\tsearchRequest.setMaxYear(DefaultValues.MAX_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxYear(searchMaxYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxPrice == 0) {\r\n\t\t\tsearchRequest.setMaxPrice(DefaultValues.MAX_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxPrice(searchMaxPrice);\r\n\t\t}\r\n\r\n\t\tif (searchMinPrice == 0) {\r\n\t\t\tsearchRequest.setMinPrice(DefaultValues.MIN_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinPrice(searchMinPrice);\r\n\t\t}\r\n\t\treturn searchRequest;\r\n\t}" ]
[ "0.61194754", "0.5624712", "0.5624712", "0.5624712", "0.5534199", "0.55158377", "0.53577965", "0.52853435", "0.51931244", "0.51922", "0.5088789", "0.50874895", "0.5065074", "0.5055302", "0.50124097", "0.49997407", "0.49843132", "0.49736944", "0.49736944", "0.49273902", "0.48870882", "0.48870787", "0.48829514", "0.48827004", "0.48772174", "0.48635858", "0.48600915", "0.4852594", "0.48503983", "0.48500735", "0.48364386", "0.48196816", "0.48182827", "0.478657", "0.4784078", "0.4770893", "0.47557062", "0.47432908", "0.47403923", "0.47372904", "0.47312453", "0.47297648", "0.47274715", "0.4727334", "0.47249496", "0.47205535", "0.47152957", "0.4708145", "0.46983096", "0.46818793", "0.46805048", "0.4679536", "0.4678351", "0.46767244", "0.46714067", "0.4670597", "0.46678647", "0.4666797", "0.46656996", "0.46535444", "0.4641994", "0.46345943", "0.46321574", "0.46255925", "0.46238568", "0.46214056", "0.46199673", "0.46111983", "0.46092966", "0.460731", "0.45881552", "0.45834553", "0.45808765", "0.45789456", "0.45768535", "0.45763585", "0.45730287", "0.45726866", "0.45693508", "0.45664278", "0.4561145", "0.4560276", "0.45583844", "0.45562097", "0.45540082", "0.455268", "0.45495355", "0.45457932", "0.45398873", "0.45391092", "0.4538645", "0.45298547", "0.45296633", "0.45281094", "0.45250297", "0.45241123", "0.45238173", "0.4523572", "0.45177075", "0.45118043" ]
0.76910824
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { t2 = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); t1 = new javax.swing.JTextField(); jButton5 = new javax.swing.JButton(); t3 = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); t4 = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); t5 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); b3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(null); t2.setEditable(false); getContentPane().add(t2); t2.setBounds(220, 210, 247, 20); jLabel1.setText("vendor id"); getContentPane().add(jLabel1); jLabel1.setBounds(110, 150, 69, 32); t1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { t1KeyTyped(evt); } }); getContentPane().add(t1); t1.setBounds(220, 160, 247, 20); jButton5.setText("search"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); getContentPane().add(jButton5); jButton5.setBounds(530, 160, 65, 23); t3.setEditable(false); t3.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { t3KeyTyped(evt); } }); getContentPane().add(t3); t3.setBounds(220, 260, 247, 20); jLabel5.setText("Number"); getContentPane().add(jLabel5); jLabel5.setBounds(110, 250, 99, 32); jLabel3.setText("Name"); getContentPane().add(jLabel3); jLabel3.setBounds(110, 200, 99, 32); jLabel6.setText("address"); getContentPane().add(jLabel6); jLabel6.setBounds(110, 300, 88, 32); t4.setEditable(false); t4.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { t4KeyPressed(evt); } public void keyTyped(java.awt.event.KeyEvent evt) { t4KeyTyped(evt); } }); getContentPane().add(t4); t4.setBounds(220, 310, 247, 20); jLabel8.setText("email id"); getContentPane().add(jLabel8); jLabel8.setBounds(110, 360, 88, 32); t5.setEditable(false); getContentPane().add(t5); t5.setBounds(220, 360, 247, 20); jButton1.setText("back"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1); jButton1.setBounds(110, 420, 55, 23); jButton6.setText("update"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); getContentPane().add(jButton6); jButton6.setBounds(190, 420, 67, 23); b3.setText("delete"); b3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { b3ActionPerformed(evt); } }); getContentPane().add(b3); b3.setBounds(280, 420, 63, 23); jButton4.setText("reset"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); getContentPane().add(jButton4); jButton4.setBounds(370, 420, 57, 23); jButton3.setText("exit"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); getContentPane().add(jButton3); jButton3.setBounds(450, 420, 51, 23); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kzi1bp.jpg"))); // NOI18N jLabel2.setText("jLabel2"); getContentPane().add(jLabel2); jLabel2.setBounds(-180, -130, 982, 708); 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 kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\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 frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public MusteriEkle() {\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 UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\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 JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\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.73197734", "0.72914416", "0.72914416", "0.72914416", "0.72862023", "0.72487676", "0.7213741", "0.7207628", "0.7196503", "0.7190263", "0.71850693", "0.71594703", "0.7147939", "0.7093137", "0.70808756", "0.70566356", "0.6987119", "0.69778043", "0.6955563", "0.6953879", "0.6945632", "0.6943359", "0.69363457", "0.6931661", "0.6927987", "0.6925778", "0.6925381", "0.69117576", "0.6911631", "0.68930036", "0.6892348", "0.6890817", "0.68904495", "0.6889411", "0.68838716", "0.6881747", "0.6881229", "0.68778914", "0.6876094", "0.6874808", "0.68713", "0.6859444", "0.6856188", "0.68556464", "0.6855074", "0.68549985", "0.6853093", "0.6853093", "0.68530816", "0.6843091", "0.6837124", "0.6836549", "0.6828579", "0.68282986", "0.68268806", "0.682426", "0.6823653", "0.6817904", "0.68167645", "0.68102163", "0.6808751", "0.680847", "0.68083245", "0.6807882", "0.6802814", "0.6795573", "0.6794048", "0.6792466", "0.67904556", "0.67893785", "0.6789265", "0.6788365", "0.67824304", "0.6766916", "0.6765524", "0.6765339", "0.67571205", "0.6755559", "0.6751974", "0.67510027", "0.67433685", "0.67390305", "0.6737053", "0.673608", "0.6733373", "0.67271507", "0.67262334", "0.67205364", "0.6716807", "0.67148036", "0.6714143", "0.67090863", "0.67077154", "0.67046666", "0.6701339", "0.67006236", "0.6699842", "0.66981244", "0.6694887", "0.6691074", "0.66904294" ]
0.0
-1
Creates a new WeblogicMojoUtilities object.
private WeblogicMojoUtilities() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "private WolUtil() {\n }", "private WebStringUtils() {}", "private void createFrameworkManipulator() {\n \t\tFrameworkAdmin admin = getFrameworkAdmin();\n \t\tif (admin == null)\n \t\t\tthrow new RuntimeException(\"Framework admin service not found\"); //$NON-NLS-1$\n \t\tmanipulator = admin.getManipulator();\n \t\tif (manipulator == null)\n \t\t\tthrow new RuntimeException(\"Framework manipulator not found\"); //$NON-NLS-1$\n \t}", "private JacobUtils() {}", "private DrillCalciteWrapperUtility() {\n }", "private OMUtil() { }", "public Utils() {}", "private J2EEUtils() {\n }", "private TriggerUtils() {\n }", "private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }", "private RunUtils() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private BuilderUtils() {}", "private GwtUtils() {\n }", "private WAPIHelper() { }", "public static ServiceUtils getInstance(){\r\n\t\tif(serviceUtil == null)\r\n\t\t\tserviceUtil = new ServiceUtils();\r\n\t\t\r\n\t\treturn serviceUtil;\r\n\t}", "private Util() {\n }", "private Util() {\n }", "private Util() { }", "private SpringBoHelper() {\n\n\t}", "private AuthenticationUtil(){\r\n //utility class\r\n }", "private ModuleUtil()\n {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private JNDIUtil createJNDIUtil(String jndiUtilNamespace)\r\n throws CockpitConfigurationException {\r\n try {\r\n return jndiUtilNamespace == null ? new JNDIUtil() : new JNDIUtil(jndiUtilNamespace);\r\n } catch (ConfigurationException e) {\r\n throw new CockpitConfigurationException(\"Fails to create JNDIUtil\", e);\r\n }\r\n }", "private DeploymentFactoryInstaller() {\n }", "private Util() {\n }", "public static LogUtil getLogUtil()\n {\n if(logUtilsObj == null)\n {\n logUtilsObj = new LogUtil();\n }\n\n return logUtilsObj;\n }", "public Utils() {\n }", "private ServletUtils() { }", "private StringUtil() {\n\n }", "protected VboUtil() {\n }", "private LWPageUtilities()\n {\n }", "private Utility() {\n\t}", "private StringUtil() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "public static PropertyUtil getInstance(){\t\t\n\t\tif(resource==null){\n\t\t\tresource = new PropertyUtil();\n\t\t}\n\t\treturn resource;\n\t}", "private JarUtils() {\n }", "private ReflectionUtil()\n {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private TemplateManagerHelper() {\n\n }", "private PropertiesUtilis() {\n throw new UnsupportedOperationException(\"PropertiesUtilis instantiation\" + \n \"not allowed !\");\n }", "private PropertiesUtils() {}", "private DiagnosticMessageUtilities()\n {\n }", "private HibernateUtil() {\n\t}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private static Maven createMavenInstance( boolean interactive, Logger logger )\n throws ComponentLookupException\n {\n WagonManager wagonManager = (WagonManager) embedder.lookup( WagonManager.ROLE );\n if ( interactive )\n {\n wagonManager.setDownloadMonitor( new ConsoleDownloadMonitor( logger ) );\n }\n else\n {\n wagonManager.setDownloadMonitor( new BatchModeDownloadMonitor( logger ) );\n }\n\n wagonManager.setInteractive( interactive );\n\n return (Maven) embedder.lookup( Maven.ROLE );\n }", "public AutoBundleClassCreatorProxy(Elements elementUtils, TypeElement classElement) {\n super(elementUtils, classElement);\n isActivity = ProcessorUtil.isActivity(classElement);\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "private XMLUtils() {\n }", "private ShifuFileUtils() {\n }", "private RendererUtils() {\n throw new AssertionError(R.string.assertion_utility_class_never_instantiated);\n }", "public ResourceUtils() {\r\n //stub\r\n }", "private SnapshotUtils() {\r\n\t}", "private HibernateUtil() {\r\n }", "public static TracingHelper create() {\n return new TracingHelper(TracingHelper::classMethodName);\n }", "@Nonnull\n public static UBL23WriterBuilder <UtilityStatementType> utilityStatement ()\n {\n return UBL23WriterBuilder.create (UtilityStatementType.class);\n }", "private SysUtils(){}", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private FunctionUtils() {\n }", "private InstanceUtil() {\n }", "private PropertyUtil(){\n\t\ttry{\n\t\t\tloadURL();\n\t\t\tRuntime.getRuntime().addShutdownHook(new UtilShutdownHook());\n\t\t}catch(IOException ioe){\n\t\t\tLOGGER.error(\"Unable to load Property File\\n\"+ioe);\n\t\t}\n\t\tLOGGER.debug(\"INSTANTIATED\");\n\t}", "private LangUtilities() {\n }", "private KubevirtNetworkingUtil() {\n }", "private XMLUtil() {\n\t}", "private XmlUtil() {\n }", "@Deprecated\n\tpublic static DateTimeUtil createInstance() {\n\t\treturn new DateTimeUtil();\n\t}", "private UIUtils() {\n }", "private Utility() {\n throw new IllegalAccessError();\n }", "private OSUtil()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not permitted.\");\n }", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "private XMLUtils()\r\n\t{\r\n\t}", "private XMLUtil()\n {\n }", "protected FlowUtilities getFlowUtilities() {\n return FlowUtilities.INSTANCE;\n }", "public PageUtil() {\n\n\t}", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "public Results(UtilityConstants utilityConstants) {\n this.utilityConstants = utilityConstants;\n }", "public TwilioWrapperLibrary buildLibrary()\n {\n return new TwilioWrapperLibrary( this.twilio_account_sid, this.twilio_account_token, this.thinQ_id, this.thinQ_token);\n }", "SUT createSUT();", "private JavaUtilLogHandlers() { }", "private UtilityKlasse() {\n\n }", "private CheckUtil(){ }", "public static PropertiesUtil getInstance(){\n if (instance == null) {\n synchronized (PropertiesUtil.class){\n instance = new PropertiesUtil();\n instance.loadProperties();\n }\n }\n return instance;\n }", "private LdapTools() {}", "private IOUtilities() {\n }", "private StringUtil() {}", "private StringUtil() {}", "private CloudEndpointBuilderHelper() {\n }", "private ClassUtil() {}", "private BeanUtils() {\n\t\t\n\t}", "@Deployment(testable = false)\n public static WebArchive createDeployment() {\n\n // Import Maven runtime dependencies\n File[] files = Maven.resolver().loadPomFromFile(\"pom.xml\")\n .importRuntimeDependencies().resolve().withTransitivity().asFile();\n\n return ShrinkWrap.create(WebArchive.class)\n .addPackage(Session.class.getPackage())\n .addClasses(SessionEndpoint.class, SessionRepository.class, Application.class)\n .addAsResource(\"META-INF/persistence-test.xml\", \"META-INF/persistence.xml\")\n .addAsWebInfResource(EmptyAsset.INSTANCE, \"beans.xml\")\n .addAsLibraries(files);\n }", "private StringUtil() {\n\t\tsuper();\n\t}" ]
[ "0.55014795", "0.5484692", "0.5481469", "0.53934264", "0.5293179", "0.5250555", "0.5241112", "0.5224842", "0.52095234", "0.51948357", "0.51376724", "0.5117155", "0.5115059", "0.5115059", "0.5115059", "0.5115059", "0.5114883", "0.5110644", "0.51000303", "0.5054008", "0.50366086", "0.50366086", "0.5034545", "0.5034529", "0.5028076", "0.5016027", "0.50018436", "0.50018436", "0.50018436", "0.50018436", "0.50018436", "0.5000475", "0.49837607", "0.49818462", "0.4972293", "0.49709117", "0.4963714", "0.49635354", "0.4944681", "0.49445513", "0.49390876", "0.4937186", "0.49219242", "0.49219242", "0.4893591", "0.48915058", "0.48891816", "0.4880201", "0.48664543", "0.4866248", "0.48330015", "0.4830246", "0.48300034", "0.4825779", "0.48073027", "0.4799841", "0.47840267", "0.47814736", "0.4765", "0.47641233", "0.4755315", "0.47543094", "0.47439137", "0.47421727", "0.47288406", "0.47255883", "0.47247478", "0.47232088", "0.47172964", "0.47155398", "0.47117722", "0.46994883", "0.46960956", "0.4694236", "0.46606252", "0.46574533", "0.46554217", "0.46457663", "0.46436703", "0.46420726", "0.46395993", "0.46390852", "0.46389657", "0.46385247", "0.46381554", "0.46355072", "0.46314916", "0.46197197", "0.46138102", "0.45857412", "0.45811883", "0.45782325", "0.45686087", "0.45641106", "0.45641106", "0.45504028", "0.45391074", "0.45375013", "0.45367575", "0.45356598" ]
0.79330754
0
Unsets the weblogic protocol handlers to avoid wagon https issues
public static void unsetWeblogicProtocolHandler() { if ( "weblogic.utils".equals(System.getProperty("java.protocol.handler.pkgs") ) ) { System.clearProperty( "java.protocol.handler.pkgs" ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unsetProtocol()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(PROTOCOL$0);\n }\n }", "void clearHandlers();", "public void resetHandlers() {\r\n atRoot = true;\r\n path = \"/\";\r\n pathStack.clear();\r\n handlerStack.clear();\r\n handlers.clear();\r\n defaultHandler = null;\r\n }", "private void stopHttpAdaptor() {\n if (!agentConfig.isHttpEnabled()) {\n return;\n }\n\n // stop the adaptor...\n try {\n httpAdaptor.stop();\n } catch (Exception e) {\n logger.warn(e.getMessage(), e);\n }\n\n try {\n MBeanUtils.unregisterMBean(getHttpAdaptorName());\n MBeanUtils.unregisterMBean(getXsltProcessorName());\n } catch (MalformedObjectNameException e) {\n logger.warn(e.getMessage(), e);\n }\n }", "public void unsetHttpConnector(HttpConnector connector) {\n connector.setServerConnection(null);\n log.info(\"HttpConnector '\" + connector.getClass().getName() + \"' unregistered.\");\n }", "public void unsetProxy() {\n remote.setProxy(null);\n }", "public Builder clearProtocol() {\n if (protocolBuilder_ == null) {\n protocol_ = null;\n onChanged();\n } else {\n protocol_ = null;\n protocolBuilder_ = null;\n }\n\n return this;\n }", "public void unsetSoap()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SOAP$2, 0);\n }\n }", "public static void releaseAllHandlers(){\n throw new RuntimeException(\"Not implemented yet\");\n }", "public void deleteNetWS() {\r\n/* 142 */ this._has_netWS = false;\r\n/* */ }", "synchronized void m6640c() {\n if (!m6637a()) {\n this.f5128e = null;\n this.f5127d = true;\n try {\n this.f5126c.unbindService(this);\n } catch (IllegalArgumentException e) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Error unbinding service: \");\n stringBuilder.append(e.getMessage());\n Log.w(\"FJD.ExternalReceiver\", stringBuilder.toString());\n }\n }\n return;\n }", "public void reset() {\n mHsConfig = null;\n mLoginRestClient = null;\n mThirdPidRestClient = null;\n mProfileRestClient = null;\n mRegistrationResponse = null;\n\n mSupportedStages.clear();\n mRequiredStages.clear();\n mOptionalStages.clear();\n\n mUsername = null;\n mPassword = null;\n mEmail = null;\n mPhoneNumber = null;\n mCaptchaResponse = null;\n mTermsApproved = false;\n\n mShowThreePidWarning = false;\n mDoesRequireIdentityServer = false;\n }", "@ZAttr(id=698)\n public void unsetPublicServiceProtocol() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraPublicServiceProtocol, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "private void clearChangeHeadpicRelay() {\n if (rspCase_ == 21) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "@Override\r\n\tpublic void clearEventHandlers() {\n\t\t\r\n\t}", "void unbindAll();", "public void clearProxyConfig();", "private void clearS2BRelay() {\n if (rspCase_ == 24) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "void unsetSites();", "public void destroyHandler() {\n CallAppAbilityConnnectionHandler callAppAbilityConnnectionHandler = this.mHandler;\n if (callAppAbilityConnnectionHandler != null) {\n callAppAbilityConnnectionHandler.removeAllEvent();\n this.mHandler = null;\n }\n }", "private void clearAdditionalBindings() {\n additionalBindings_ = emptyProtobufList();\n }", "protected void unhookViewers() {\n\t}", "void unbind() { }", "protected synchronized void clearScriptHandler() {\r\n currentScriptHandler = null;\r\n handlerLock.unlock();\r\n }", "@Override\r\n\tpublic void clearStepHandlers() {\n\t\t\r\n\t}", "@Override\n\tpublic void finalize() {\n\t\tcontext.unbindService(CONNECTION);\n\t}", "private void clearChangeHeadpicRsp() {\n if (rspCase_ == 17) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "@ZAttr(id=698)\n public Map<String,Object> unsetPublicServiceProtocol(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraPublicServiceProtocol, \"\");\n return attrs;\n }", "protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {}", "private static void hackRequestForSwitchingInsecureScheme() {\n// Logger.debug(\"SCOPE -> hackRequestForSwitchingInsecureScheme\");\n Http.Request.current().secure = false;\n hackRequestPort();\n }", "public void mo81218a() {\n HandlerC16593b bVar = this.f57893b;\n if (bVar != null) {\n bVar.removeCallbacksAndMessages(null);\n this.f57893b = null;\n }\n }", "void unsetSOID();", "public void resetConversationFlow(){\n conversationDao.init();\n }", "void unsetServiceConfigurationList();", "void unsetIsManaged();", "protected void reset() {\n\t\tresetChannel();\n\t\tthis.connection = null;\n\t}", "public String[] unregisterHandler(NetworkManager manager, IPacketHandler handler)\n {\n if (connections.containsKey(manager))\n {\n ConnectionInstance con = getConnection(manager);\n return con.unregisterHandler(handler);\n }\n return new String[0];\n }", "public synchronized void unbind()\n\t\t{\n\t\t\tpageStore.folders.remove(sessionIdentifier);\n\n\t\t\tsessionIdentifier = null;\n\t\t}", "void unsetCryptProviderTypeExt();", "@Override\n public void Destroy() {\n mLoginHandler = null;\n }", "public void unbindAll() {\n\t\tmGlobalCallbacks.clear();\n\t\t/* remove all local callback lists, that is removes all local callbacks */\n\t\tmLocalCallbacks.clear();\n\t}", "public synchronized void unbindService(BehaviourInferenceAlgorithmRegistry registry) {\n \tregistry = null;\n logger.info(\"BehaviourInferenceAlgorithmRegistry service disconnected.\");\n }", "public static void reset(ServerWebExchange exchange) {\n\t\tSet<String> addedHeaders = exchange.getAttributeOrDefault(CLIENT_RESPONSE_HEADER_NAMES, Collections.emptySet());\n\t\taddedHeaders.forEach(header -> exchange.getResponse().getHeaders().remove(header));\n\t\tremoveAlreadyRouted(exchange);\n\t}", "void unsetManifestHashAlgorithm();", "public void resetServers() {\n EventHandlerService.INSTANCE.reset();\n UserRegistryService.INSTANCE.reset();\n }", "public void clear() {\n unbindPassive();\n transferControl.clear();\n passiveMode = false;\n remotePort = -1;\n localPort = -1;\n }", "public Builder clearSocketProtocol() {\n bitField0_ = (bitField0_ & ~0x00000004);\n socketProtocol_ = 1;\n onChanged();\n return this;\n }", "public void clearAll() {\n mNetworkCapabilities = mTransportTypes = mUnwantedNetworkCapabilities = 0;\n mLinkUpBandwidthKbps = mLinkDownBandwidthKbps = LINK_BANDWIDTH_UNSPECIFIED;\n mNetworkSpecifier = null;\n mTransportInfo = null;\n mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;\n mUids = null;\n mEstablishingVpnAppUid = INVALID_UID;\n mSSID = null;\n }", "private void clearLoginReq() {\n if (reqCase_ == 6) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "@Override\n\tpublic void destroy() {\n\t\tlogService=null;\n\t\tnoInterceptUrlRegxList=null;\n\n\t}", "private void clearHandler() {\n fileNames = null;\n fileName = null;\n image = null;\n displaySaveSupplier = false;\n displayUpdateSupplier = false;\n OcrHandler.getInstance().setInvoice(new Invoice());\n }", "@Override\n\tpublic void undo() {\n\t\tsecurity.off();\n\t}", "public void uninitialize()\n {\n System.out.println(\"Real time session unitializing...\");\n for (ChannelSession channelSession : channelSessions)\n {\n if (channelSession.channel() == null)\n {\n if (channelSession.channel() == null)\n {\n channelSession.uninit(error);\n System.exit(TransportReturnCodes.SUCCESS);\n }\n \n closeDictAndItemStreams();\n }\n closeDictAndItemStreams();\n }\n\n // flush before exiting\n flushChannel();\n\n closeChannel();\n }", "public void unsetReplyManagementRuleSet()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REPLYMANAGEMENTRULESET$30, 0);\n }\n }", "void unsetCryptProvider();", "@Override\n\tpublic void ClearHandler() {\n\t\teventHandlers.clear();\n\t\t\n\t}", "private void clearChangePasswordRsp() {\n if (rspCase_ == 15) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "@Override\r\n\tprotected void destroyLogic() {\n\r\n\t}", "void unsetBodySite();", "private void clearChatWithServerRelay() {\n if (rspCase_ == 3) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "public void unsetDomain() {\n bean = null;\n domain = null;\n }", "public void unsetXmlLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(XMLLANG$26);\n }\n }", "public void shutdown(){\n for(MessageHandler h : handlerMap.values()){\n h.shutdown();\n }\n }", "@ZAttr(id=1141)\n public void unsetWebClientLoginURLAllowedUA() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraWebClientLoginURLAllowedUA, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "public void unregisterHandler(ReceivedDataHandler handler)\n {\n if (handler == this.handler)\n this.handler = null;\n }", "void unsetCryptProviderTypeExtSource();", "public static void destroy() {\n handler = null;\n initialized = false;\n }", "private static native void hook_del(long handle) throws UnicornException;", "public void resetAll() {\n triggered = false;\n classBlacklist.clear();\n policies.clear();\n protectedFiles.clear();\n System.setSecurityManager(defaultSecurityManager);\n }", "public final void mo5203SI() {\n AppMethodBeat.m2504i(129935);\n C4996ah.getContext().unregisterReceiver(this);\n this.hjc.clear();\n AppMethodBeat.m2505o(129935);\n }", "void removeFramework(FrameworkContext fw) {\n bundleHandler.removeFramework(fw);\n synchronized (wrapMap) {\n for (Iterator<Map.Entry<String, URLStreamHandlerWrapper>> i = wrapMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry<String, URLStreamHandlerWrapper> e = i.next();\n if ((e.getValue()).removeFramework(fw)) {\n i.remove();\n }\n }\n framework.remove(fw);\n if (debug == fw.debug) {\n if (framework.isEmpty()) {\n debug = null;\n } else {\n debug = framework.get(0).debug;\n }\n }\n }\n }", "public Builder clearScheme() {\n scheme_ = getDefaultInstance().getScheme();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "protected void handleDisconnect()\n {\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n }", "public synchronized void setAuthenticationHandlerFactory(AuthenticationHandlerFactory authenticationHandlerFactory)\n\t{\n\t\tthis.authHandler = null;\n\t\tthis.authenticationHandlerFactory = authenticationHandlerFactory;\n\t}", "public void clearPaymentGatewayApi() {\n genClient.clear(CacheKey.paymentGatewayApi);\n }", "private void unBoundAudioService() {\n if (audioServiceBinder != null) {\n unbindService(serviceConnection);\n }\n }", "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 void resetNetworkProperties() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.resetNetworkProperties():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.resetNetworkProperties():void\");\n }", "@ZAttr(id=611)\n public void unsetFreebusyExchangeAuthScheme() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeAuthScheme, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "private void clearChangeHeadpicReq() {\n if (reqCase_ == 13) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "public void cleanup() {\n // Clear the reference to this protocol.\n XDropTargetEventProcessor.reset();\n\n if (targetXWindow != null) {\n notifyProtocolListener(targetXWindow, 0, 0,\n DnDConstants.ACTION_NONE, null,\n MouseEvent.MOUSE_EXITED);\n }\n\n if (sourceWindow != 0) {\n XToolkit.awtLock();\n try {\n XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance());\n XlibWrapper.XSelectInput(XToolkit.getDisplay(), sourceWindow,\n sourceWindowMask);\n XErrorHandlerUtil.RESTORE_XERROR_HANDLER();\n } finally {\n XToolkit.awtUnlock();\n }\n }\n\n sourceWindow = 0;\n sourceWindowMask = 0;\n sourceProtocolVersion = 0;\n sourceActions = DnDConstants.ACTION_NONE;\n sourceFormats = null;\n trackSourceActions = false;\n userAction = DnDConstants.ACTION_NONE;\n sourceX = 0;\n sourceY = 0;\n targetXWindow = null;\n }", "private void uncheckAllSupportedAuthenticationMechanisms()\n {\n setSelection( authMechSimpleCheckbox, false );\n setSelection( authMechCramMd5Checkbox, false );\n setSelection( authMechDigestMd5Checkbox, false );\n setSelection( authMechGssapiCheckbox, false );\n setSelection( authMechNtlmCheckbox, false );\n setEnabled( authMechNtlmText, false );\n setSelection( authMechGssSpnegoCheckbox, false );\n setEnabled( authMechGssSpnegoText, false );\n }", "@Override\n public List<XulEventHandler> getEventHandlers() {\n return null;\n }", "public void disconnect()\n\t{\n\t\toriginal = null;\n\t\tsource = null;\n\t\tl10n = null;\n\t}", "public final synchronized void reset() {\r\n\t\tunblocked = false;\r\n\t\tcancelled = null;\r\n\t\terror = null;\r\n\t\tlistenersInline = null;\r\n\t}", "@Override\n public void deactivateBinding(QName name, ServiceHandler handler) {\n }", "public void resetLanguage() {\n BlockConnectorShape.resetConnectorShapeMappings();\n getWorkspace().getEnv().resetAllGenuses();\n BlockLinkChecker.reset();\n }", "@Override\r\n\tpublic void off() {\n\r\n\t}", "private void clean_all() {\n\t\tpkttype=0;\r\n\t\tpacket=new byte[]{0};\r\n\t\tID=new byte[]{0};\r\n\t\tIP=new byte[]{0};\r\n\t\tTTL=0;\r\n\t\tport_no=new byte[]{0};\r\n\t\treqrep=0;\r\n\t\tdata=new byte[]{0};\r\n\t\tpaylength=new byte[]{0};\r\n\t}", "void unbind();", "public void off() {\n\n\t}", "public void clear(){\n\t\tMap<?, ?> bindings = m_bindings.getBindings();\n\t\tif (bindings == null) {\n\t\t\tif(log.isInfoEnabled()){\n\t\t\t\tlog.info(\"clear: no bindings!\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tbindings.clear();\t\n\t\tm_bindings.remove();\t\t\n\t}", "@Override\n\tpublic void off() {\n\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n unbindService(connection);\n }", "void unsetExchange();", "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "public String[] unregisterHandler(IPacketHandler handler)\n {\n ArrayList<String> tmp = handlerToChannels.get(handler);\n if (tmp != null)\n {\n String[] channels = tmp.toArray(new String[0]);\n tmp = new ArrayList<String>();\n \n for (String channel : channels)\n {\n if (unregisterChannel(handler, channel))\n {\n tmp.add(channel);\n }\n }\n return tmp.toArray(new String[0]);\n }\n return new String[0];\n }", "@ZAttr(id=1142)\n public void unsetWebClientLogoutURLAllowedUA() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraWebClientLogoutURLAllowedUA, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "public void reset() {\n if (exporterContainer != null) {\n exporterContainer.close();\n }\n\n if (applicationContainer != null) {\n applicationContainer.close();\n }\n\n applicationContainer(null);\n exporterContainer(null);\n httpClient(null);\n }", "private static void doSwitchScheme(SchemeType schemeType) {\n// Logger.debug(\"SCOPE -> doSwitchScheme\");\n\n // If ReverseProxy module is NOT enabled and https.port property is not configured...\n // Stop switching process between HTTP and HTTPS\n String httpsPort = Play.configuration.getProperty(\"https.port\");\n if (!reverseProxyEnabled && httpsPort == null) {\n Http.Request.current().secure = false;\n return;\n }\n\n // Continue switching process between HTTP and HTTPS\n switchScheme(schemeType);\n }" ]
[ "0.6743113", "0.5953354", "0.5722757", "0.5585405", "0.5580542", "0.55767524", "0.55560374", "0.5550134", "0.55498993", "0.5529214", "0.54854923", "0.5448224", "0.5429338", "0.54016024", "0.5370646", "0.5358173", "0.53521264", "0.53396356", "0.5338682", "0.5336416", "0.5322963", "0.53077966", "0.53047997", "0.52924603", "0.5284775", "0.52790743", "0.5264352", "0.52569425", "0.52457726", "0.5230706", "0.52233267", "0.52151304", "0.52006847", "0.51870126", "0.51825434", "0.5181348", "0.5174578", "0.516734", "0.5164934", "0.5157736", "0.51448953", "0.5144514", "0.51426125", "0.5137495", "0.51312137", "0.5129864", "0.51239234", "0.51213074", "0.51128674", "0.5108919", "0.5105407", "0.5103131", "0.5093173", "0.50852746", "0.50751084", "0.5067072", "0.5065797", "0.50640285", "0.5058387", "0.5054925", "0.50548196", "0.50505114", "0.5040866", "0.5040092", "0.503428", "0.50318664", "0.5030903", "0.5021414", "0.5016271", "0.50148064", "0.50143164", "0.5014061", "0.50037396", "0.5001628", "0.4999397", "0.49862084", "0.49838784", "0.4981429", "0.4980171", "0.49739102", "0.49738815", "0.49699485", "0.496689", "0.49644476", "0.4962805", "0.4959752", "0.49533248", "0.49501684", "0.49484372", "0.49480027", "0.4946506", "0.4942772", "0.4940069", "0.49362057", "0.49357036", "0.49329463", "0.4927226", "0.49207458", "0.49199417", "0.49161816" ]
0.8370609
0
This method will contstruct the Admin URL to the given server.
public static String getAdminUrl( final String inProtocol, final String inServerName, final String inServerPort ) { StringBuffer buffer = new StringBuffer(); buffer.append( inProtocol ).append( "://" ); buffer.append( inServerName ); buffer.append( ":" ).append( inServerPort ); return buffer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getServerUrl() {\r\n\t\treturn server;\r\n\t}", "String getServerUrl();", "public void setAdminURL(URI adminURL) {\n this.adminURL = adminURL;\n }", "public String getServerUrl() {\n\t return Config.SERVER_URL;\n }", "public String getZookeeperAdminUrl() {\n return \"http://\" + zookeeper.getHost() + \":\" + zookeeper.getAdminPort();\n }", "public URI getAdminURL() {\n return adminURL;\n }", "public String constructAdministrationUrl(final String uuid, final HttpServletRequest request) {\n\t\tString hostUrlContextToUse = this.hostUrlContext;\n\t\tif (StringUtils.isEmpty(hostUrlContext)) {\n\t\t\thostUrlContextToUse = generateHostContextFromRequest(request);\n\t\t}\n\n\t\tif (StringUtils.isEmpty(hostUrlContextToUse)) {\n\t\t\tthrow new IllegalStateException(\"Host URL of current server could not be retrieved\");\n\t\t}\n\n\t\tif (hostUrlContextToUse.endsWith(\"/\")) {\n\t\t\thostUrlContextToUse = StringUtils.chop(hostUrlContextToUse);\n\t\t}\n\n\t\tString adminUrlPart = RequestMappings.ADMIN_URL_PATTERN.replaceFirst(\"\\\\{\" + RequestMappings.ADMIN_URL_UUID_MARKER + \"\\\\}\", uuid);\n\t\treturn hostUrlContextToUse + adminUrlPart;\n\t}", "public void setServer(URL url) {\n\n\t}", "public void setServerUrl(String serverUrl) \n {\n \tthis.serverUrl = serverUrl;\n }", "private static String getServerUrl() {\n\t\treturn \"http://jfabricationgames.ddns.net:5715/genesis_project_server/genesis_project/genesis_project/\";\n\t}", "public String getServerURL() {\n return serverURL;\n }", "public String getServerUrl() {\n return props.getProperty(\"url\");\n }", "protected final String getServerUrl() {\n return this.serverUrl;\n }", "public String getServerUrl()\n {\n return null;\n }", "private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}", "public String getServerUrl() {\n return mServerUrl;\n }", "public String getServerURI() {\n return settings.getString(\"server_url\", DEFAULT_SERVER_URL);\n }", "public String getServerUrl() {\r\n return this.fedoraBaseUrl;\r\n }", "@Key(\"mapserver.url\")\n\tString mapServerUrl();", "public String getServerUrl() {\n return this.ctmUrl;\n }", "public String getServerUrl() {\n return ipAddress;\n }", "public URL getServer() {\n\t\treturn null;\n\t}", "protected final void setServerUrl(final String serverUrl) {\n this.serverUrl = serverUrl;\n }", "@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/actualizarCliente\";\r\n\t}", "public static String getServerUrl(Context context) {\n if (mServerUrl == null) {\n ApplicationInfo appInfo = null;\n try {\n appInfo = context.getPackageManager()\n .getApplicationInfo(context.getPackageName(),\n PackageManager.GET_META_DATA);\n mServerUrl = appInfo.metaData.getString(\"WHISPER_SERVER_ADDRESS\");\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n }\n return mServerUrl;\n }", "public void AdminLink(){\n\t\tAdminLink.click();\n\t}", "public void setServerURL(String serverURL) {\n this.serverURL = serverURL;\n saveProperties();\n }", "IParser setServerBaseUrl(String theUrl);", "String getRootServerBaseUrl();", "public void setupWebServers(String serverURL){\n if(rwsServer == null || csaServer == null){\n if(serverURL == null || serverURL.length()==0){\n return; //nothing to do\n }\n\n String webServerURL = getWebServiceURL(serverURL);\n if (webServerURL == null) return; //nothing to do.\n\n rwsServer = URI.create(webServerURL);\n csaServer = URI.create(webServerURL);\n\n }\n\n }", "public void setStunServer(String server);", "public void setupWebServers(){\n if(rwsServer == null || csaServer == null){\n String serverURL = getFirstAttribute(cn,FRONTEND_ADDRESS_TAG);\n setupWebServers(serverURL);\n }\n }", "private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}", "public static String getDongtuServerUrl() {\n return BaseAppServerUrl.videoUrl + \"?service=\";\n }", "public URL getServerLocation() {\n return serverLocation;\n }", "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "private String getRootUrl() {\n\t\treturn \"http://localhost:\" + port;\n\t}", "private String getRootUrl() {\n\t\treturn \"http://localhost:\" + port;\n\t}", "protected String getAdminUsersPageUrl() {\n return new StringBuilder(getBaseUrl())\n .append(reverseRouter.with(UsersController::users))\n .toString();\n }", "void updateCustomServerAddress(String customServerAddress);", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "private String getUrlBaseForLocalServer() {\n\t HttpServletRequest request = ((ServletRequestAttributes) \n\t\t\t RequestContextHolder.getRequestAttributes()).getRequest();\n\t String base = \"http://\" + request.getServerName() + ( \n\t (request.getServerPort() != 80) \n\t \t\t ? \":\" + request.getServerPort() \n\t\t\t\t : \"\");\n\t return base;\n\t}", "String getServerBaseURL();", "public String getLogonURL()\n {\n return getUnsecuredRootLocation() + configfile.logon_url;\n }", "public void setupServerSettings() {\r\n\t\tmnuServerSettings.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew EmailSettingsGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void setServerUrl(String newUrl) {\n if(newUrl == null){\n return;\n }\n props.setProperty(\"url\", newUrl);\n saveProps();\n }", "public serverHttpHandler( String rootDir ) {\n this.serverHome = rootDir;\n }", "public void setServer (\r\n String strServer) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public void setLogCollectionUploadServerUrl(String serverUrl);", "public String getLogCollectionUploadServerUrl();", "public void setServer(Server server) {\n\t\t\r\n\t}", "ServerEntry getServer();", "public void setURL() {\n\t\tURL = Constant.HOST_KALTURA+\"/api_v3/?service=\"+Constant.SERVICE_KALTURA_LOGIN+\"&action=\"\n\t\t\t\t\t\t+Constant.ACTION_KALTURA_LOGIN+\"&loginId=\"+Constant.USER_KALTURA+\"&password=\"+Constant.PASSWORD_KALTURA+\"&format=\"+Constant.FORMAT_KALTURA;\n\t}", "public String getServerAlias() {\n return serverAlias;\n }", "public void setFileTransferServer(String serverUrl);", "@Deprecated\n public OServerAdmin(String iURL) throws IOException {\n String url = iURL;\n if (url.startsWith(OEngineRemote.NAME)) url = url.substring(OEngineRemote.NAME.length() + 1);\n\n if (!url.contains(\"/\")) url += \"/\";\n\n remote = (OrientDBRemote) ODatabaseDocumentTxInternal.getOrCreateRemoteFactory(url);\n urls = new ORemoteURLs(new String[] {}, remote.getContextConfiguration());\n String name = urls.parseServerUrls(url, remote.getContextConfiguration());\n if (name != null && name.length() != 0) {\n this.database = Optional.of(name);\n } else {\n this.database = Optional.empty();\n }\n }", "S getServer();", "public String getUrl(String service)\n {\n return myServerUrls.get(service);\n }", "@Override\n\tpublic String getImagesUrl() {\n\t\treturn SERVER;\n\t}", "@Deprecated\n public OServerAdmin(final OStorageRemote iStorage) {\n this.remote = iStorage.context;\n urls = new ORemoteURLs(new String[] {}, remote.getContextConfiguration());\n urls.parseServerUrls(iStorage.getURL(), remote.getContextConfiguration());\n this.database = Optional.ofNullable(iStorage.getName());\n }", "protected static AuoServer getServer() {\n return server;\n }", "public String getServerName();", "private String getRootUrl(String path){\n return \"http://localhost:\" + port + \"/api/v1\" + path;\n }", "public static final String getDataServerUrl() {\n\t\treturn \"http://uifolder.coolauncher.com.cn/iloong/pui/ServicesEngineV1/DataService\";\n\t}", "public String determineURL(HttpServletRequest request)\n {\n String url = \"http://\"+request.getHeader(\"host\")+request.getContextPath()+\"/omserver\";\n return url;\n }", "public String url() {\n return server.baseUri().toString();\n }", "public void setSERVER(String SERVER) {\n \t\tthis.SERVER = SERVER;\n \t}", "public void setAdminAddr(String adminAddr) {\n this.adminAddr = adminAddr == null ? null : adminAddr.trim();\n }", "public void conectServer() {\n\n\t}", "private String servetransform1864(String server) throws InvalidServerURLException {\n\t\tMatcher m = serverPattern.matcher(server);\n\t\tif (!m.matches()) {\n\t\t\tthrow new InvalidServerURLException();\n\t\t}\n\n\t\tString protocol = m.group(1);\n\t\tif (protocol == null) {\n\t\t\tprotocol = \"https://\";\n\t\t}\n\t\tString serverName = m.group(2);\n\t\tString port = m.group(3);\n\t\tif (port == null) {\n\t\t\tport = \":\" + AppSettings.DEFAULT_PORT;\n\t\t}\n\n\t\tString context = m.group(5);\n\t\tif (context == null) {\n\t\t\tcontext = AppSettings.DEFAULT_CONTEXT;\n\t\t}\n\n\t\treturn protocol + serverName + port + \"/\" + context;\n\t}", "public String getServerBase() {\n HttpServletRequest request = FxJsfUtils.getRequest().getRequest();\n return \"http\" + (request.isSecure() ? \"s://\" : \"://\") + FxRequestUtils.getExternalServerName(request);\n }", "public String getUnproxiedFieldDataServerUrl() {\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tString hostName = prefs.getString(\"serverHostName\", \"\");\n\t\tString context = \"bdrs-core\";//prefs.getString(\"contextName\", \"\");\n\t\tString path = prefs.getString(\"path\", \"\");\n\t\t\n\t\tStringBuilder url = new StringBuilder();\n\t\turl.append(\"http://\").append(hostName).append(\"/\").append(context);\n\t\t\n\t\tif (path.length() > 0) {\n\t\t\turl.append(\"/\").append(path);\n\t\t}\n\t\t\n\t\treturn url.toString();\n\t}", "public LdapLdapsServersPage( ServerConfigurationEditor editor )\n {\n super( editor, ID, TITLE );\n }", "public String getServer()\n {\n return server;\n }", "public void changeUrl() {\n url();\n }", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "public static String getWebServiceURL(String serverURL) {\n if(!serverURL.endsWith(\"/\")){\n serverURL = serverURL + \"/\";\n }\n SSLConfiguration sslConfiguration = new SSLConfiguration();\n sslConfiguration.setUseDefaultJavaTrustStore(true);\n SWAMPHttpClient client = new SWAMPHttpClient(serverURL,sslConfiguration);\n MyResponse raw = client.rawGet(serverURL + \"config/config.json\");\n String webServerURL = null;\n if(raw.hasJSON()){\n if(raw.json.containsKey(\"servers\")){\n JSONObject servers = raw.json.getJSONObject(\"servers\");\n if(servers.containsKey(\"web\")){\n webServerURL = servers.getString(\"web\");\n }\n }\n }\n if(webServerURL == null){\n return null;\n }\n return webServerURL;\n }", "public String getAdminAddr() {\n return adminAddr;\n }", "@GET\n\t@RequestMapping(value = \"/admin\")\n\t@Secured(value = { \"ROLE_ADMIN\" })\n\tpublic String openAdminMainPage() {\n\t\t\n\t\treturn \"admin/admin\";\n\t}", "public String getURL(){\r\n\t\tString url = \"rmi://\";\r\n\t\turl += this.getAddress()+\":\"+this.getPort()+\"/\";\r\n\t\treturn url;\r\n\t}", "public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@ZAttr(id=696)\n public String getAdminConsoleLoginURL() {\n return getAttr(Provisioning.A_zimbraAdminConsoleLoginURL, null);\n }", "java.lang.String getNewAdmin();", "@Test\n\tpublic void navigateToAdminPage() throws InterruptedException\n\t{\n\t\tdashboardPage.clickOnDropdownOptionAdmin();\n\t\tThread.sleep(5000);\n\t\t/*\n\t\t * Sleep because selenium does not wait until the webpage is loaded and URL is changed,\n\t\t * Instead it fetches the URL as soon as the command is hit.\n\t\t */\n\t\tString actualURL = commonUtilities.verifyURLMethod();\n\t\tAssert.assertEquals(actualURL, ReadPropertiesFile.getPropertyValue(\"reportsPageUrl\"), \"Validating Admin Page URL\");\n\t}", "public String getServer() {\r\n return server;\r\n }", "public TokenRequest setTokenServerUrl(GenericUrl var1) {\n return this.setTokenServerUrl(var1);\n }", "public String[] browseAdmin(Session session) throws RemoteException{\n\t\tSystem.out.println(\"Server model invokes browseAdmin() method\");\n\t\treturn null;\n\t\t\n\t}", "public void setHttpServer(String httpServer) {\n this.httpServer = httpServer;\n }", "public void setServer(int server) {\n this.server = server;\n }", "void doGetAdminInfo() {\n\t\tlog.config(\"doGetAdminInfo()...\");\n\t\tthis.rpcService.getAdminInfo(new AsyncCallback<DtoAdminInfo>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tString errorMessage = \"Error when getting admin info! : \" + caught.getMessage();\n\t\t\t\tlog.severe(errorMessage);\n\t\t\t\tgetAdminPanel().setActionResult(errorMessage, ResultType.error);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(DtoAdminInfo adminInfo) {\n\t\t\t\tlog.config(\"getAdminInfo() on success - \" + adminInfo.getListLogFilenames().size() + \" logs filenames.\");\n\t\t\t\tgetAdminPanel().setAdminInfo(adminInfo);\n\t\t\t}\n\t\t});\n\t}", "public void setServer(Server server) {\n this.server = server;\n }", "@Override\n public void Handle() {\n DatabaseReference database = FirebaseDatabase.getInstance(app).getReference(\"config\");\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String url = (String) dataSnapshot.child(\"serverUrl\").getValue();\n result.success(url);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n result.success(null);\n }\n };\n\n database.addListenerForSingleValueEvent(listener);\n }", "private void formAuthenticate(String server) throws Exception{\n\t\tCredentialsProvider credsProvider = new BasicCredentialsProvider();\n\t\tcredsProvider.setCredentials(\n\t\t\t\tnew AuthScope(server, 8081),\n\t\t\t\tnew UsernamePasswordCredentials(\"debug\", \"debuglockss\"));\n\t\tCloseableHttpClient httpclient = HttpClients.custom()\n\t\t\t\t.setDefaultCredentialsProvider(credsProvider)\n\t\t\t\t.build();\n\t\ttry {\n\t\t\tHttpGet httpget = new HttpGet(\"https://\"+ server +\":8081/Home\");\n\n\t\t\tLOGGER.info(\"Executing request \" + httpget.getRequestLine());\n\t\t\tCloseableHttpResponse response = httpclient.execute(httpget);\n\t\t\ttry {\n\t\t\t\tLOGGER.info(\"----------------------------------------\");\n\t\t\t\tLOGGER.info(response.getStatusLine().toString());\n\t\t\t\tLOGGER.info(EntityUtils.toString(response.getEntity()));\n\t\t\t} finally {\n\t\t\t\tresponse.close();\n\t\t\t}\n\t\t} finally {\n\t\t\thttpclient.close();\n\t\t}\n\t}", "void notifySetAdminByHost(Map<String,String>paramMap);", "public AeHome(String id, String type, String host) {\n\n this.id = id;\n\n this.type = type;\n this.host = host;\n\n URL_STRG = \"http://\" + host + \"/strg.cfg\";\n URL_CTRL = \"http://\" + host + \"/ctrl.htm\";\n USER_BASE64 = \"Basic YWRtaW46YW5lbA==\";\n }", "java.lang.String getAdmin();", "void admin() {\n\t\tSystem.out.println(\"i am from admin\");\n\t}", "public String getStunServer();", "private String getUrlPrefix(HttpServletRequest req) {\n StringBuffer url = new StringBuffer();\n String scheme = req.getScheme();\n int port = req.getServerPort();\n url.append(scheme);\t\t// http, https\n url.append(\"://\");\n url.append(req.getServerName());\n if ((scheme.equals(\"http\") && port != 80)\n \t || (scheme.equals(\"https\") && port != 443)) {\n url.append(':');\n url.append(req.getServerPort());\n }\n return url.toString();\n }", "private String getEndPointUrl()\r\n\t{\r\n\t\t// TODO - Get the URL from WSRR\r\n\t\treturn \"http://localhost:8093/mockCustomerBinding\";\r\n\t}" ]
[ "0.6887684", "0.6754783", "0.6646276", "0.6552867", "0.64385474", "0.6430668", "0.63626766", "0.6255431", "0.6241012", "0.6180563", "0.61354536", "0.6126945", "0.6120242", "0.6099245", "0.60980016", "0.6090935", "0.5921342", "0.5804926", "0.57984334", "0.5794376", "0.57571775", "0.5737397", "0.57194024", "0.5709277", "0.5707155", "0.56971645", "0.56949717", "0.5690943", "0.5651689", "0.56347466", "0.5616497", "0.56096447", "0.5589633", "0.5579438", "0.55743444", "0.5559658", "0.5550968", "0.5550968", "0.55302644", "0.551341", "0.55004483", "0.54884106", "0.54744196", "0.54739016", "0.5463418", "0.5452908", "0.54478246", "0.5425513", "0.54243016", "0.54031295", "0.5393129", "0.5384245", "0.53687316", "0.53685313", "0.5359857", "0.535735", "0.53370273", "0.53303295", "0.531401", "0.53102225", "0.5301787", "0.5293433", "0.52604717", "0.52377766", "0.5237625", "0.5237563", "0.523682", "0.52328235", "0.52276945", "0.5221256", "0.5218472", "0.52122605", "0.52113223", "0.51761657", "0.5170943", "0.51694095", "0.51657313", "0.5160854", "0.5157722", "0.51543", "0.51370454", "0.5128643", "0.5127471", "0.51235205", "0.51147413", "0.5109305", "0.5101365", "0.5095937", "0.50939", "0.50801694", "0.50784343", "0.50639576", "0.5059101", "0.50561684", "0.504755", "0.5044646", "0.5034027", "0.502687", "0.50214005", "0.50043577" ]
0.64536023
4
This method will make sure there is a type appended to the file name and if it is the appropriate type for the project packaging. If the project packaging is ear the artifact must end in .ear. If the project packaging is war then the artifact must end in .war. If the project packaging is ejb then the artifact must end in .jar.
public static String updateArtifactName( final String inName, final String inProjectPackaging ) { String newName = inName; // If project type is ear then artifact name must end in .ear if ( inProjectPackaging.equalsIgnoreCase( "ear" ) ) { if ( !inName.endsWith( ".ear" ) ) { newName = inName.concat( ".ear" ); } } // If project type is war then artifact name must end in .war else if ( inProjectPackaging.equalsIgnoreCase( "war" ) ) { if ( !inName.endsWith( ".war" ) ) { newName = inName.concat( ".war" ); } } // If project type is ejb then artifact name must end in .jar else if ( inProjectPackaging.equalsIgnoreCase( "ejb" ) ) { if ( inName.endsWith( ".ejb" ) ) { newName = inName.replaceAll( "\\.ejb", ".jar" ); } else if ( !inName.endsWith( ".jar" ) ) { newName = inName.concat( ".jar" ); } } // Unsupported project type else { throw new IllegalArgumentException( "Unsupported project packaging " + inProjectPackaging ); } return newName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Check\n \tpublic void checkModuleNameMatchesFileName(ModType modtype) {\n \t\tString idealName = modtype.eResource().getURI().trimFileExtension().lastSegment();\n \t\tif (!modtype.getName().getS().equals(idealName) ) {\n \t\t\tString msg = String.format(\"Module name \\\"%s\\\" differs from file name \\\"%s\\\"\", modtype.getName().getS(), idealName);\n \t\t\terror(msg, GFPackage.Literals.MOD_TYPE__NAME);\n \t\t}\n \t}", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "public boolean buildsFileType(String extension);", "private boolean isSourceType(String extension) {\n return srcFileName.toLowerCase().endsWith(extension);\n }", "@Override\n public String getContentType() {\n return command.dirDeploy ? null : \"application/zip\";\n }", "public ArtifactType getArtifactType() {\r\n \t\treturn(ArtifactType.ServiceImplementation);\r\n \t}", "private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }", "private void verifyNames(BaseArtifactType artifact) {\n // First, build a list of all the names within this artifact.\n List<String> propertyNames = new ArrayList<String>();\n List<String> relationshipNames = new ArrayList<String>();\n for (Property property : artifact.getProperty()) {\n propertyNames.add(property.getPropertyName());\n }\n for (Relationship relationship : artifact.getRelationship()) {\n relationshipNames.add(relationship.getRelationshipType());\n }\n \n // Then, compare against both reserved and local names.\n for (String propertyName : propertyNames) {\n if (isReserved(propertyName)) {\n error = ArtificerConflictException.reservedName(propertyName);\n }\n if (relationshipNames.contains(propertyName)) {\n error = ArtificerConflictException.duplicateName(propertyName);\n }\n if (Collections.frequency(propertyNames, propertyName) > 1) {\n error = ArtificerConflictException.duplicateName(propertyName);\n }\n }\n for (String relationshipName : relationshipNames) {\n // \"relatedDocument\" is a unique case. Due to shortcomings in the S-RAMP spec, it's an actual field\n // on DerivedArtifactType. But, we also have to use it as a general relationship, since there is no\n // DerivedExtendedArtifactType (ie, if an extended artifact type is derived, it also needs that field,\n // but doesn't).\n // TODO: Fix that!\n if (!relationshipName.equals(\"relatedDocument\")) {\n if (isReserved(relationshipName)) {\n error = ArtificerConflictException.reservedName(relationshipName);\n }\n if (propertyNames.contains(relationshipName)) {\n error = ArtificerConflictException.duplicateName(relationshipName);\n }\n }\n }\n }", "private static TYPE getFileType(final String path, final ServiceContext context) {\n return PROJECT_FILE;\n }", "private static String typeName(File file) {\r\n String name = file.getName();\r\n int split = name.lastIndexOf('.');\r\n\r\n return (split == -1) ? name : name.substring(0, split);\r\n }", "public static boolean checkFileType(String fileName) {\n\t\t// properties file has a comma delimited list of extensions\n\t\tString extension_value = PropertiesFile.getInstance().getProperty(\"accepted_ext\");\n\n\t\tif (extension_value != null) {\n\t\t\tString[] extensions = extension_value.split(\",\");\n\t\t\tfor (int i = 0; extensions != null && i < extensions.length; i++) {\n\t\t\t\tif (fileName.endsWith(extensions[i].trim()))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static ContentType extensionContentType(String fileExt) {\r\n\r\n\t\tfileExt = fileExt.toLowerCase();\r\n\r\n\t\tif (\"tiff\".equals(fileExt) || \"tif\".equals(fileExt)) {\r\n\t\t\t// return MIMEConstants.\r\n\t\t} else if (\"zip\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_ZIP;\r\n\t\t} else if (\"pdf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_PDF;\r\n\t\t} else if (\"wmv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_WMV;\r\n\t\t} else if (\"rar\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_RAR;\r\n\t\t} else if (\"swf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_SWF;\r\n\t\t} else if (\"exe\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WINDOWSEXEC;\r\n\t\t} else if (\"avi\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_AVI;\r\n\t\t} else if (\"doc\".equals(fileExt) || \"dot\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WORD;\r\n\t\t} else if (\"ico\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_ICO;\r\n\t\t} else if (\"mp2\".equals(fileExt) || \"mp3\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_MPEG;\r\n\t\t} else if (\"rtf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_RTF;\r\n\t\t} else if (\"xls\".equals(fileExt) || \"xla\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_EXCEL;\r\n\t\t} else if (\"jpg\".equals(fileExt) || \"jpeg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_JPEG;\r\n\t\t} else if (\"gif\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_GIF;\r\n\t\t} else if (\"svg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_SVG;\r\n\t\t} else if (\"png\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_PNG;\r\n\t\t} else if (\"csv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSV;\r\n\t\t} else if (\"ps\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_POSTSCRIPT;\r\n\t\t} else if (\"html\".equals(fileExt) || \"htm\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_HTML;\r\n\t\t} else if (\"css\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSS;\r\n\t\t} else if (\"xml\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_XML;\r\n\t\t} else if (\"js\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_JAVASCRIPT;\r\n\t\t} else if (\"wma\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_WMA;\r\n\t\t}\r\n\r\n\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_PLAIN;\r\n\t}", "private String getMimeType(File file) {\n String fileName = file.getName();\n\n if (fileName.endsWith(\"css\")) {\n return \"text/css; charset=utf-8\";\n } else if (fileName.endsWith(\"html\")) {\n return \"text/html; charset=utf-8\";\n } else if (fileName.endsWith(\"jpg\") || fileName.endsWith(\"jpeg\")) {\n return \"image/jpeg\";\n } else if (fileName.endsWith(\"png\")) {\n return \"image/png\";\n } else if (fileName.endsWith(\"ico\")) {\n return \"image/x-icon\";\n }\n\n return \"text/plain; charset=utf-8\";\n }", "ResourceFilesType createResourceFilesType();", "public interface FileType {\n\tString name();\n}", "public static String getContentType(String name){\n\t\tString contentType = \"\";\n\t\tif(name.endsWith(\".html\")){\n\t\t\tcontentType = \"text/html\";\n\t\t}else if(name.endsWith(\".txt\")){\n\t\t\tcontentType = \"text/plain\";\n\t\t}else if(name.endsWith(\".gif\")){\n\t\t\tcontentType = \"image/gif\";\n\t\t}else if(name.endsWith(\".jpg\")){\n\t\t\tcontentType = \"image/jpeg\";\n\t\t}else if(name.endsWith(\".png\")){\n\t\t\tcontentType = \"image/png\";\n\t\t}\n\t\treturn contentType;\n\t}", "public void postCreate(MavenProject project, ArtifactHandlerManager artifactHandlerManager) {\n if (types.isEmpty()) {\n Type t = new Type();\n ArtifactHandler h = artifactHandlerManager.getArtifactHandler(project.getPackaging());\n if (h!=null)\n t.type = h.getExtension();\n else\n t.type = h.getPackaging();\n types.add(t);\n }\n }", "public static File getWarFileName( final Set inArtifacts, String fileName )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n\n if ( \"war\".equals( artifact.getType() ) && artifact.getFile().getName().contains( fileName ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "public static File getWarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"war\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "private void parsePackageFile( Part part, HttpServletResponse resp ) throws IOException\n {\n String fileName = part.getSubmittedFileName();\n CompressionType compressionType = CompressionType.getCompressionType( fileName );\n\n try ( InputStream is = part.getInputStream() )\n {\n LocalRepository repo = getRepository();\n repo.put( is, compressionType );\n ok( resp, \"Package successfully saved\" );\n }\n catch ( IOException ex )\n {\n internalServerError( resp, \"Failed to upload package: \" + ex.getMessage() );\n }\n }", "static String getArtifactClassifier( Product product, TargetEnvironment environment )\n {\n final String artifactClassifier;\n if ( product.getAttachId() == null )\n {\n artifactClassifier = getOsWsArch( environment, '.' );\n }\n else\n {\n artifactClassifier = product.getAttachId() + \"-\" + getOsWsArch( environment, '.' );\n }\n return artifactClassifier;\n }", "public static String GetMimeTypeFromFileName(String fileName) {\n\n\t\tif (fileName == null || fileName.length() == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tint pos = fileName.lastIndexOf(\".\");\n\t\tif (pos == -1) {\n\t\t\treturn \"application/octet-stream\";\n\t\t} else {\n\n\t\t\tString extension = fileName.substring(pos + 1, fileName.length());\n\n\t\t\tif (extension.equalsIgnoreCase(\"gpx\")) {\n\t\t\t\treturn \"application/gpx+xml\";\n\t\t\t} else if (extension.equalsIgnoreCase(\"kml\")) {\n\t\t\t\treturn \"application/vnd.google-earth.kml+xml\";\n\t\t\t} else if (extension.equalsIgnoreCase(\"zip\")) {\n\t\t\t\treturn \"application/zip\";\n\t\t\t}\n\t\t}\n\n\t\t// Unknown mime type\n\t\treturn \"application/octet-stream\";\n\n\t}", "private String getMimeType(String aFilename) {\n String extension = aFilename.substring(aFilename.length() - 3, aFilename.length()).toUpperCase();\n\n if (extension.equals(\"AMR\")) {\n return \"audio/AMR\";\n }\n //DuongNT add\n if (extension.equals(\"WAV\")) {\n return \"audio/X-WAV\";\n } else {\n return \"audio/midi\";\n }\n }", "boolean isSupportedType(String type) {\n // No bigBed support yet (but it's coming).\n if (type.startsWith(\"bigBed\")) {\n return false;\n }\n \n // No bigWig support yet (but it's coming).\n if (type.startsWith(\"bigWig\")) {\n return false;\n }\n \n // Actual data is contained in an external file, but the file is identified by a number, not a path.\n if (type.startsWith(\"wigMaf\")) {\n return false;\n }\n \n // We can probably the support BAM, but not implemented yet.\n if (type.equals(\"bam\")) {\n return false;\n }\n \n // Not one of our rejected types.\n return true;\n }", "@Test\n public void fileTypeTest() {\n // TODO: test fileType\n }", "public interface EjbJarType<T> extends Child<T>\n{\n\n public EjbJarType<T> setDescription(String description);\n\n public EjbJarType<T> setDescriptionList(String... values);\n\n public EjbJarType<T> removeAllDescription();\n\n public List<String> getDescriptionList();\n\n public EjbJarType<T> setDisplayName(String displayName);\n\n public EjbJarType<T> setDisplayNameList(String... values);\n\n public EjbJarType<T> removeAllDisplayName();\n\n public List<String> getDisplayNameList();\n\n public EjbJarType<T> removeAllIcon();\n\n public IconType<EjbJarType<T>> icon();\n\n public List<IconType<EjbJarType<T>>> getIconList();\n\n public EjbJarType<T> setModuleName(String moduleName);\n\n public EjbJarType<T> removeModuleName();\n\n public String getModuleName();\n\n public EjbJarType<T> removeEnterpriseBeans();\n\n public EnterpriseBeansType<EjbJarType<T>> enterpriseBeans();\n\n public EjbJarType<T> removeInterceptors();\n\n public InterceptorsType<EjbJarType<T>> interceptors();\n\n public EjbJarType<T> removeRelationships();\n\n public RelationshipsType<EjbJarType<T>> relationships();\n\n public EjbJarType<T> removeAssemblyDescriptor();\n\n public AssemblyDescriptorType<EjbJarType<T>> assemblyDescriptor();\n\n public EjbJarType<T> setEjbClientJar(String ejbClientJar);\n\n public EjbJarType<T> removeEjbClientJar();\n\n public String getEjbClientJar();\n\n public EjbJarType<T> setVersion(String version);\n\n public EjbJarType<T> removeVersion();\n\n public String getVersion();\n\n public EjbJarType<T> setMetadataComplete(Boolean metadataComplete);\n\n public EjbJarType<T> removeMetadataComplete();\n\n public Boolean isMetadataComplete();\n\n}", "private static String resourceName(Class<?> clazz) {\r\n\t\tString className = clazz.getSimpleName().replace(\"$\", \" \");\r\n\t\tif (className.equalsIgnoreCase(\"EvsInitiateMultipartUploadRequest\")) {\r\n\t\t\treturn \"multipartupload/initiate\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsCompleteMultipartUploadRequest\")) {\r\n\t\t\treturn \"multipartupload/complete\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsAbortMultipartUploadRequest\")) {\r\n\t\t\treturn \"multipartupload/abort\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsListPartsRequest\")) {\r\n\t\t\treturn \"multipartupload/listparts\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsUploadPartRequest\")) {\r\n\t\t\treturn \"multipartupload/uploadpart\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsListMultipartUploadsRequest\")) {\r\n\t\t\treturn \"multipartupload/list\";\r\n\t\t} else if(className.equalsIgnoreCase(\"EvsUploadFileRequest\")){\r\n\t\t\treturn \"fileupload\";\r\n\t\t}else{\r\n\t\t\tthrow new EvsClientException(\"resource not available\");\r\n\t\t}\r\n\t}", "public String getPackaging();", "private String getResourceName(ResourceType type) {\n // get the name from the filename.\n String name = getFile().getName();\n\n int pos = name.indexOf('.');\n if (pos != -1) {\n name = name.substring(0, pos);\n }\n\n return name;\n }", "private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}", "private String reportType ( String reportFilename )\r\n {\r\n String result = UNDEFINED, test = \"\";\r\n\r\n for (int i=0 ; i < reportFilename.length(); i++)\r\n {\r\n String testChar = reportFilename.substring(i,i+1).toUpperCase();\r\n if (testChar.startsWith(PERIOD))\r\n test = \"\";\r\n else\r\n test = test + testChar;\r\n if (test.endsWith(\"BRBR61\"))\r\n result = PSTN;\r\n if ((test.endsWith(\"QRBR61\"))||(test.endsWith(\"YRBR61\")))\r\n result = TNBS;\r\n if (test.endsWith(\"XRBR61\"))\r\n result = ALARM;\r\n if (test.endsWith(\"DRBR61\"))\r\n result = DAILY;\r\n if (test.endsWith(\"TRBR61\"))\r\n result = TDAILY;\r\n }\r\n return result;\r\n }", "private static boolean isJar(){\n\t\tString str = IOHandler.class.getResource(\"IOHandler.class\").toString();\n\t\treturn str.toLowerCase().startsWith(\"jar\") && JAROVERRIDE;\n\t}", "private void excludeFromWarPackaging() {\n getLog().info(\"excludeFromWarPackaging\");\n String pluginGroupId = \"org.apache.maven.plugins\";\n String pluginArtifactId = \"maven-war-plugin\";\n if (project.getBuildPlugins() != null) {\n for (Object o : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) o;\n\n if (pluginGroupId.equals(plugin.getGroupId()) && pluginArtifactId.equals(plugin.getArtifactId())) {\n Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();\n if (dom == null) {\n dom = new Xpp3Dom(\"configuration\");\n plugin.setConfiguration(dom);\n }\n Xpp3Dom excludes = dom.getChild(\"packagingExcludes\");\n if (excludes == null) {\n excludes = new Xpp3Dom(\"packagingExcludes\");\n dom.addChild(excludes);\n excludes.setValue(\"\");\n } else if (excludes.getValue().trim().length() > 0) {\n excludes.setValue(excludes.getValue() + \",\");\n }\n\n Set<Artifact> dependencies = getArtifacts();\n getLog().debug(\"Size of getArtifacts: \" + dependencies.size());\n String additionalExcludes = \"\";\n for (Artifact dependency : dependencies) {\n getLog().debug(\"Dependency: \" + dependency.getGroupId() + \":\" + dependency.getArtifactId() + \"type: \" + dependency.getType());\n if (!dependency.isOptional() && Types.JANGAROO_TYPE.equals(dependency.getType())) {\n getLog().debug(\"Excluding jangaroo dependency form war plugin [\" + dependency.toString() + \"]\");\n // Add two excludes. The first one is effective when no name clash occurs\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n // the second when a name clash occurs (artifact will hav groupId prepended before copying it into the lib dir)\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getGroupId() + \"-\" + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n }\n }\n excludes.setValue(excludes.getValue() + additionalExcludes);\n }\n }\n }\n }", "private static String getPackageNameForPackageDirFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n return filePath.substring(1).replace('/', '.');\n }", "private static String contentType(String fileName) {\n\t\tif (fileName.endsWith(\".txt\") || fileName.endsWith(\".html\")) {\n\t\t\treturn \"text/html\";\n\t\t}\n\t\tif (fileName.endsWith(\".jpg\") || fileName.endsWith(\".jpeg\")) {\n\t\t\treturn \"image/jpeg\";\n\t\t}\n\t\tif (fileName.endsWith(\".gif\")) {\n\t\t\treturn \"image/gif\";\n\t\t}\n\t\treturn \"application/octet-stream\";\n\t}", "String getPackager();", "public File findJarFileForClass(String type, String name) throws ClassNotFoundException {\n // On cherche la classe demandee parmi celles repertoriees lors du lancement de Kalimucho\n // Si on ne la trouve pas on recree la liste (cas ou le fichier jar aurait ete ajoute apres le demarrage)\n // Si on la trouve on revoie le fichier jar la contenant sinon on leve une exception\n int index=0;\n boolean trouve = false;\n while ((index<types.length) && (!trouve)) { // recherche du type\n if (type.equals(types[index])) trouve = true;\n else index++;\n }\n if (!trouve) throw new ClassNotFoundException(); // type introuvable\n else { // le type est connu on cherche la classe\n int essais = 0;\n while (essais != 2) {\n String fich = classesDisponibles[index].get(name);\n if (fich != null) { // classe repertoriee dans la liste\n essais = 2; // on renvoie le fichier\n return new File(Parameters.COMPONENTS_REPOSITORY+\"/\"+type+\"/\"+fich);\n }\n else { // la classe n'est pas dans la liste\n essais++;\n if (essais == 1) { // si on ne l'a pas deja fait on recree la liste a partir du depot\n rescanRepository();\n }\n }\n }\n throw new ClassNotFoundException(); // Classe introuvable meme apres avoir recree la liste\n }\n }", "public final EObject ruleEArtifactType() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token this_BEGIN_2=null;\n Token this_END_4=null;\n EObject lv_artifact_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:880:2: ( ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END ) )\n // InternalRMParser.g:881:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END )\n {\n // InternalRMParser.g:881:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END )\n // InternalRMParser.g:882:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END\n {\n // InternalRMParser.g:882:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) )\n // InternalRMParser.g:883:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n {\n // InternalRMParser.g:883:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n // InternalRMParser.g:884:5: lv_name_0_0= RULE_QUALIFIED_NAME\n {\n lv_name_0_0=(Token)match(input,RULE_QUALIFIED_NAME,FOLLOW_11); \n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getEArtifactTypeAccess().getNameQUALIFIED_NAMETerminalRuleCall_0_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getEArtifactTypeRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.QUALIFIED_NAME\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,Colon,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getEArtifactTypeAccess().getColonKeyword_1());\n \t\t\n this_BEGIN_2=(Token)match(input,RULE_BEGIN,FOLLOW_17); \n\n \t\t\tnewLeafNode(this_BEGIN_2, grammarAccess.getEArtifactTypeAccess().getBEGINTerminalRuleCall_2());\n \t\t\n // InternalRMParser.g:908:3: ( (lv_artifact_3_0= ruleEArtifactTypeBody ) )\n // InternalRMParser.g:909:4: (lv_artifact_3_0= ruleEArtifactTypeBody )\n {\n // InternalRMParser.g:909:4: (lv_artifact_3_0= ruleEArtifactTypeBody )\n // InternalRMParser.g:910:5: lv_artifact_3_0= ruleEArtifactTypeBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getEArtifactTypeAccess().getArtifactEArtifactTypeBodyParserRuleCall_3_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_artifact_3_0=ruleEArtifactTypeBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEArtifactTypeRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"artifact\",\n \t\t\t\t\t\tlv_artifact_3_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.EArtifactTypeBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_4=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_4, grammarAccess.getEArtifactTypeAccess().getENDTerminalRuleCall_4());\n \t\t\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 }", "private boolean checkFile(String name) {\n return name.endsWith(extension);\n }", "public static String contentToFileExtension(String mediatype, String subtype) {\r\n\t\tif (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_IMAGE)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_GIF)) {\r\n\t\t\t\treturn \"gif\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_JPEG)) {\r\n\t\t\t\treturn \"jpg\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PNG)) {\r\n\t\t\t\treturn \"png\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_TIFF)) {\r\n\t\t\t\treturn \"tiff\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_ICON)) {\r\n\t\t\t\treturn \"ico\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SVG)) {\r\n\t\t\t\treturn \"svg\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_TEXT)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_CSS)) {\r\n\t\t\t\treturn \"css\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_HTML)) {\r\n\t\t\t\treturn \"html\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_JAVASCRIPT)) {\r\n\t\t\t\treturn \"js\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PLAIN)) {\r\n\t\t\t\treturn \"txt\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_RICHTEXT)) {\r\n\t\t\t\treturn \"rtf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SOAPXML)) {\r\n\t\t\t\treturn \"xml\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_CSV)) {\r\n\t\t\t\treturn \"csv\";\r\n\t\t\t}\r\n\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_APPLICATION)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MSEXCEL)) {\r\n\t\t\t\treturn \"xls\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MSWORD)) {\r\n\t\t\t\treturn \"doc\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_RAR)) {\r\n\t\t\t\treturn \"rar\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_PDF)) {\r\n\t\t\t\treturn \"pdf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_SHOCKWAVEFLASH)) {\r\n\t\t\t\treturn \"swf\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSEXECUTEABLE)) {\r\n\t\t\t\treturn \"exe\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_ZIP)) {\r\n\t\t\t\treturn \"zip\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_POSTSCRIPT)) {\r\n\t\t\t\treturn \"ps\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_VIDEO)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSMEDIA)) {\r\n\t\t\t\treturn \"wmv\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_AVI)) {\r\n\t\t\t\treturn \"avi\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MP4)) {\r\n\t\t\t\treturn \"mp4\";\r\n\t\t\t}\r\n\t\t} else if (StringUtil.equalsIgnoreCase(mediatype, MIMEConstants.MEDIATYPE_AUDIO)) {\r\n\t\t\tif (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MPEG3) || StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MPEG)) {\r\n\t\t\t\treturn \"mp3\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_WINDOWSAUDIO)) {\r\n\t\t\t\treturn \"wma\";\r\n\t\t\t} else if (StringUtil.equalsIgnoreCase(subtype, MIMEConstants.SUBTYPE_MP4)) {\r\n\t\t\t\treturn \"mp4\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }", "protected String getContentType()\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n String ext = FilenameUtils.getExtension(fullAttachmentFilename);\n if (ext == null)\n {\n return null;\n }\n if (ext.equalsIgnoreCase(\"pdf\"))\n {\n return \"application/pdf\";\n } else if (ext.equalsIgnoreCase(\"zip\"))\n {\n return \"application/zip\";\n } else if (ext.equalsIgnoreCase(\"jpg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"jpeg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"html\"))\n {\n return \"text/html\";\n\n } else if (ext.equalsIgnoreCase(\"png\"))\n {\n return \"image/png\";\n\n } else if (ext.equalsIgnoreCase(\"gif\"))\n {\n return \"image/gif\";\n\n }\n log.warn(\"Content type not found for file extension: \" + ext);\n return null;\n }", "private boolean isAcceptableFile(File f) {\n \tif( f.getName().length() < 7 ) {\n \t\treturn false;\n \t}\n \t\n \tString extension = f.getName().substring( f.getName().length()-7, f.getName().length() );\n \tif ( !extension.equals(\".tessit\") ) {\n \t\treturn false;\n \t}\n \t\n \treturn true;\n }", "private static boolean hasFile(Artifact artifact) {\n\t\treturn artifact != null && artifact.getFile() != null && artifact.getFile().isFile();\n\t}", "private boolean isJarFile(File file) {\n\t\tif(file.isFile())\n\t\t\treturn file.getName().toLowerCase().endsWith(\".jar\");\n\t\treturn false;\n\t}", "public static File getEjbJarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ejb\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }", "public interface FileNamingStrategy {\n String getFullTypeFileName(TypeDefinition definition);\n\n String getRelativeFileName(Endpoint endpoint, String toFile);\n\n String getRelativeFileName(TypeDefinition from, TypeDefinition to);\n\n String getIncludeFileName(Endpoint endpoint);\n\n String getRelativeFileName(Endpoint endpoint, TypeDefinition to);\n\n String getGetFullFileName(Endpoint endpoint);\n\n String getFullFileName(String fileName);\n\n String getFullModuleName(String moduleName);\n}", "protected abstract String getFileExtension();", "public void testGetType_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\n\t\tString result = fixture.getType();\n\n\t\t\n\t\tassertEquals(\"\", result);\n\t}", "private String appendJarSuffixIfNeeded(String value) {\n if (!value.endsWith(JAR_SUFFIX)) {\n return value + JAR_SUFFIX;\n }\n\n return value;\n }", "public static boolean isProjectOrFolder(EntityType type){\r\n\t\treturn EntityType.project.equals(type)\r\n\t\t\t\t|| EntityType.folder.equals(type);\r\n\t}", "private String buildDeployFileName(final String originalFileName) {\n String tempDir = System.getProperty(\"java.io.tmpdir\");\n StringBuilder builder = new StringBuilder();\n builder.append(tempDir);\n builder.append(\"/\");\n builder.append(originalFileName);\n return builder.toString();\n }", "@Override\n\tpublic String getContentType(String filename) {\n\t\treturn null;\n\t}", "private boolean isFileNameAndModuleNotMatching(AuditEvent event) {\n return event.getFileName() == null\n || fileRegexp != null && !fileRegexp.matcher(event.getFileName()).find()\n || event.getLocalizedMessage() == null\n || moduleId != null && !moduleId.equals(event.getModuleId())\n || checkRegexp != null && !checkRegexp.matcher(event.getSourceName()).find();\n }", "private boolean isJavaFile(JarEntry file){\n\t\treturn file.getName().toLowerCase().endsWith(\".java\");\n\t}", "public static File getEarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ear\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }", "public static void main(String[] args) {\n// file.getParentFile().mkdirs();\r\n// System.out.println(file.getParentFile().exists());\r\n\r\n String filePath = \"e:\\\\hello\";\r\n String filePath1 = \"e:\\\\_hello.txt\";\r\n String filePath2 = \"e:\\\\688885d3df6a19bbc8c827419650ca75(2)\";\r\n String filePath3 = \"e:\\\\688885d3df6a19bbc8c827419650ca75.jpg\";\r\n String filePath4 = \"e:\\\\ASP Export Web Service\";\r\n\r\n\r\n\r\n\r\n File file = new File(filePath);\r\n File file1 = new File(filePath2);\r\n File file2 = new File(filePath4);\r\n// try (\r\n// InputStream is = new BufferedInputStream(new FileInputStream(file));\r\n// InputStream is1 = new BufferedInputStream(new FileInputStream(file1));\r\n// InputStream is2 = new BufferedInputStream(new FileInputStream(file2));\r\n// ) {\r\n// AutoDetectParser parser = new AutoDetectParser();\r\n// Detector detector = parser.getDetector();\r\n// Metadata md = new Metadata();\r\n// md.add(Metadata.RESOURCE_NAME_KEY, filePath);\r\n// MediaType mediaType = detector.detect(is, md);\r\n// System.out.println(mediaType.toString());\r\n//\r\n// md.add(Metadata.RESOURCE_NAME_KEY, filePath2);\r\n// mediaType = detector.detect(is1, md);\r\n// System.out.println(mediaType.toString());\r\n//\r\n// md.add(Metadata.RESOURCE_NAME_KEY, filePath4);\r\n// mediaType = detector.detect(is2, md);\r\n// System.out.println(mediaType.toString());\r\n// }catch(IOException e){\r\n// e.printStackTrace();\r\n// }\r\n\r\n\r\n// MimeUtil2 mimeUtil = new MimeUtil2();\r\n// mimeUtil.registerMimeDetector(\"eu.medsea.mimeutil.detector.MagicMimeMimeDetector\");\r\n// String mimeType = MimeUtil2.getMostSpecificMimeType(mimeUtil.getMimeTypes(filePath)).toString();\r\n// System.out.println(mimeType);\r\n// String mimeType1 = MimeUtil2.getMostSpecificMimeType(mimeUtil.getMimeTypes(filePath1)).toString();\r\n// System.out.println(mimeType1);\r\n\r\n// String ext1 = URLConnection.guessContentTypeFromName(filePath);\r\n// System.out.println(ext1);\r\n// String ext2 = URLConnection.guessContentTypeFromName(filePath1);\r\n// System.out.println(ext2);\r\n\r\n// File file = new File(filePath);\r\n// File file1 = new File(filePath1);\r\n// try (\r\n// InputStream is = new BufferedInputStream(new FileInputStream(file));\r\n// InputStream is1 = new BufferedInputStream(new FileInputStream(file1));\r\n// ){\r\n// String mimeType = URLConnection.guessContentTypeFromStream(is);\r\n// System.out.println(mimeType);\r\n//\r\n// String mimeType1 = URLConnection.guessContentTypeFromStream(is1);\r\n// System.out.println(mimeType1);\r\n// }catch(IOException e){\r\n// e.printStackTrace();\r\n// }\r\n\r\n// FileDataSource ds = new FileDataSource(filePath);\r\n// String contentType = ds.getContentType();\r\n// System.out.println(\"1-The MIME type of the file e:\\\\hello is: \" + contentType);\r\n//\r\n// FileTypeMap fileTypeMap = FileTypeMap.getDefaultFileTypeMap();\r\n// String fileTypeMapST = fileTypeMap.getContentType(filePath);\r\n// System.out.println(\"2-The MIME type of the file e:\\\\hello is: \" + fileTypeMapST);\r\n//\r\n String extension = FilenameUtils.getExtension(filePath);\r\n System.out.println(\"3:>\"+extension+\"<\");\r\n String extension1 = FilenameUtils.getExtension(filePath1);\r\n System.out.println(\"4:>\"+extension1+\"<\");\r\n//\r\n// String extension2 = com.google.common.io.Files.getFileExtension(filePath);\r\n// System.out.println(\"5:>\"+extension2+\"<\");\r\n// String extension3 = com.google.common.io.Files.getFileExtension(filePath1);\r\n// System.out.println(\"6:>\"+extension3+\"<\");\r\n//\r\n// try{\r\n// java.nio.file.Path path4 = java.nio.file.Paths.get(filePath);\r\n// String extension4 = java.nio.file.Files.probeContentType(path4);\r\n// System.out.println(\"7:>\"+extension4+\"<\");\r\n// String extension5 = com.google.common.io.Files.getFileExtension(filePath1);\r\n// System.out.println(\"8:>\"+extension5+\"<\");\r\n// }catch(IOException e){\r\n// e.printStackTrace();\r\n// }\r\n//\r\n// File file6 = new File(filePath);\r\n// String s6 = new MimetypesFileTypeMap().getContentType(file6);\r\n// System.out.println(\"9:>\"+s6+\"<\");\r\n// File file7 = new File(filePath1);\r\n// String s7 = new MimetypesFileTypeMap().getContentType(file7);\r\n// System.out.println(\"10:>\"+s7+\"<\");\r\n }", "@Override\n public boolean isMyFileType(File file)\n {\n String lower = file.getName().toLowerCase();\n if (lower.endsWith(\".maz\") || lower.endsWith(\".mz2\"))\n return true;\n else\n return false;\n }", "java.lang.String getAppType();", "private boolean shouldBuild(IResource resource) {\n \t\treturn resource.getType() == IResource.FILE && resource.getFileExtension().equals(\"gf\");\n \t}", "public abstract String getFileExtension();", "static String convertToArtifactId(String s) {\n // Trim to filename just in case we are passed a path to a jar\n String name = Paths.get(s).getFileName().toString();\n if (name.endsWith(\".jar\")) {\n // Convert jar file name to artifactId. Strip version and .jar\n // We assume everything after the last dash is the version.jar\n int n = name.lastIndexOf('-');\n if (n < 0) {\n // No dashes. Just strip off .jar\n n = name.lastIndexOf('.');\n }\n return name.substring(0, n);\n } else {\n return name;\n }\n }", "private Optional<String> toPackageName(Path file, String separator) {\n assert file.getRoot() == null;\n\n Path parent = file.getParent();\n if (parent == null) {\n String name = file.toString();\n if (name.endsWith(\".class\") && !name.equals(MODULE_INFO)) {\n String msg = name + \" found in top-level directory\"\n + \" (unnamed package not allowed in module)\";\n throw new InvalidModuleDescriptorException(msg);\n }\n return Optional.empty();\n }\n\n String pn = parent.toString().replace(separator, \".\");\n if (Checks.isPackageName(pn)) {\n return Optional.of(pn);\n } else {\n // not a valid package name\n return Optional.empty();\n }\n }", "String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}", "private static boolean shouldStoreArtifact(Artifact artifact) {\n String ref = artifact.getReference();\n return ArtifactTypes.EMBEDDED_BASE64.getMimeType().equals(artifact.getType())\n && !(ref == null || ref.isEmpty());\n }", "public void setFiletype(java.lang.String filetype) {\n this.filetype = filetype;\n }", "private String getConflictId(org.apache.maven.artifact.Artifact artifact) {\n StringBuilder buffer = new StringBuilder(128);\n buffer.append(artifact.getGroupId());\n buffer.append(':').append(artifact.getArtifactId());\n if (artifact.getArtifactHandler() != null) {\n buffer.append(':').append(artifact.getArtifactHandler().getExtension());\n }\n else {\n buffer.append(':').append(artifact.getType());\n }\n if (artifact.hasClassifier()) {\n buffer.append(':').append(artifact.getClassifier());\n }\n return buffer.toString();\n }", "@Override\n\tpublic Project packageArchive(IProject ipr, IProject relativeTo) {\n\t\t//throw new RuntimeException(\"This method is not supported for Web based build configurations\");\n\t\tProject proj = null;\n\t\t\n\t\t\n\t\tProjectDeploymentStructure pds = readDeploymentAssembly(ipr);\n\t\t\n\t\tproj = generateArchive(pds, ipr, relativeTo);\n\t\tproj.setProperties(BuildCore.getProjectProperties(relativeTo.getLocation()));\n\t\t/**\n\t\t * If the ProjectDeploymentStructure instance is null. Then it is clear that this archive doesn't need packaging of other archives.\n\t\t * Hence, Only archive this Project.\n\t\t * \n\t\t */\n\t\t\n\t\treturn proj;\n\t}", "public boolean producesFileType(String outputExtension);", "public String getPackageName() {\n JavaType.FullyQualified fq = TypeUtils.asFullyQualified(qualid.getType());\n if (fq != null) {\n return fq.getPackageName();\n }\n String typeName = getTypeName();\n int lastDot = typeName.lastIndexOf('.');\n return lastDot < 0 ? \"\" : typeName.substring(0, lastDot);\n }", "public String getContentTypeFor(String fileName)\r\n {\r\n String ret_val = null;\r\n\r\n if(fileName.toUpperCase().endsWith(\".PNG\"))\r\n ret_val = \"image/png\";\r\n else if(fileName.toUpperCase().endsWith(\".TIF\"))\r\n ret_val = \"image/tiff\";\r\n else if(fileName.toUpperCase().endsWith(\".TIFF\"))\r\n ret_val = \"image/tiff\";\r\n else if(fileName.toUpperCase().endsWith(\".TGA\"))\r\n ret_val = \"image/targa\";\r\n else if(fileName.toUpperCase().endsWith(\".BMP\"))\r\n ret_val = \"image/bmp\";\r\n else if(fileName.toUpperCase().endsWith(\".PPM\"))\r\n ret_val = \"image/x-portable-pixmap\";\r\n else if(fileName.toUpperCase().endsWith(\".PGM\"))\r\n ret_val = \"image/x-portable-graymap\";\r\n\r\n // handle previous filename maps\r\n if(ret_val == null && prevMap != null)\r\n return prevMap.getContentTypeFor(fileName);\r\n\r\n // return null if unsure.\r\n return ret_val;\r\n }", "public InvalidProjectTypeException () {\r\n \t\tsuper();\r\n \t}", "@Test\n\tpublic void testInvalidJar() {\n\t\tString invalidJar = _TestSuite.TYPE_FINDER_TEST_DIR.concat(\"jarThatDoesNotExist.jar\");\n\t\tString[] args = { invalidJar };\n\t\tTypeFinder.main(args);\n\t\tString expected = TypeFinder.INVALID_PATH_ERROR_MESSAGE + FileManager.lineSeparator;\n\t\tString results = errContent.toString();\n\t\tassertEquals(expected, results);\n\t}", "private int getFileType(SourceFile sourceFile)\n\t{\n\t\tString name = sourceFile.getName();\n\t\tString pkg = sourceFile.getPackageName();\n\n\t\tif (name.startsWith(\"<\") && name.endsWith(\">\") || name.equals(\"GeneratedLocale\")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\t\treturn SYNTHETIC_FILE;\n\n for (final String frameworkPkg : FRAMEWORK_FILE_PACKAGES )\n {\n // look for packages starting with pkgName\n if (pkg.startsWith(frameworkPkg + '\\\\') || //$NON-NLS-1$\n pkg.startsWith(frameworkPkg + '/') || //$NON-NLS-1$\n pkg.equals(frameworkPkg)) //$NON-NLS-1$\n {\n return FRAMEWORK_FILE;\n }\n }\n\n if (name.startsWith(\"Actions for\")) //$NON-NLS-1$\n return ACTIONS_FILE;\n\n return AUTHORED_FILE;\n}", "public java.lang.String getFiletype() {\n return filetype;\n }", "public static String getType() {\n type = getProperty(\"type\");\n if (type == null) type = \"png\";\n return type;\n }", "java.lang.String getArtifactStorage();", "private Either<ArtifactDefinition, ResponseFormat> validateArtifact(String componentId, ComponentTypeEnum componentType, String artifactId, org.openecomp.sdc.be.model.Component component, AuditingActionEnum auditingAction, String parentId) {\n\t\tEither<ArtifactDefinition, StorageOperationStatus> artifactResult = artifactOperation.getArtifactById(artifactId, false);\n\t\tif (artifactResult.isRight()) {\n\t\t\tif (artifactResult.right().value().equals(StorageOperationStatus.ARTIFACT_NOT_FOUND)) {\n\t\t\t\tResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.ARTIFACT_NOT_FOUND, \"\");\n\t\t\t\tlog.debug(\"addArtifact - artifact {} not found\", artifactId);\n\t\t\t\treturn Either.right(responseFormat);\n\n\t\t\t} else {\n\t\t\t\tResponseFormat responseFormat = componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(artifactResult.right().value()));\n\t\t\t\tlog.debug(\"addArtifact - failed to fetch artifact {}, error {}\", artifactId, artifactResult.right().value());\n\t\t\t\treturn Either.right(responseFormat);\n\t\t\t}\n\t\t}\n\t\t// step 9.1\n\t\t// check artifact belong to component\n\t\tboolean found = false;\n\t\tswitch (componentType) {\n\t\tcase RESOURCE:\n\t\tcase SERVICE:\n\t\t\tfound = checkArtifactInComponent(component, artifactId);\n\t\t\tbreak;\n\t\tcase RESOURCE_INSTANCE:\n\t\t\tfound = checkArtifactInResourceInstance(component, componentId, artifactId);\n\t\t\tbreak;\n\t\tdefault:\n\n\t\t}\n\t\tif (!found) {\n\t\t\t// String component =\n\t\t\t// componentType.equals(ComponentTypeEnum.RESOURCE) ? \"resource\" :\n\t\t\t// \"service\";\n\t\t\tString componentName = componentType.name().toLowerCase();\n\t\t\tResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.COMPONENT_ARTIFACT_NOT_FOUND, componentName);\n\t\t\tlog.debug(\"addArtifact - Component artifact not found component Id {}, artifact id {}\", componentId, artifactId);\n\t\t\treturn Either.right(responseFormat);\n\t\t}\n\t\treturn Either.left(artifactResult.left().value());\n\t}", "String getContentType(String fileExtension);", "@Test\n\tpublic void obtenerMimeTypeTest() {\n\t\tArchivo ar = new Imagen(\"test\", \"contenido\");\n\t\tassertEquals(\"image/png\", ar.obtenerMimeType());\n\t}", "boolean fileIncluded(File file){\n\t\tif(file.getName().length()==0) return false;\n\t\tString lcname = file.getName().trim().toLowerCase();\n\t\treturn ((lcname.endsWith(LC_JAR) ||\n\t\t lcname.endsWith(LC_SVB) ||\n\t\t lcname.endsWith(LC_EXE) ||\n\t\t lcname.endsWith(LC_DAT)) &&\n\t\t (file.lastModified() > OLDEST_DATE));\n\t}", "public void setFILE_TYPE(String FILE_TYPE) {\r\n this.FILE_TYPE = FILE_TYPE == null ? null : FILE_TYPE.trim();\r\n }", "private FileType getFileType(String name) {\n\t\tif(name==null)\n\t\t\treturn null;\n\t\tfor(FileType fileType: fileTypes){\n\t\t\tif(name.startsWith(fileType.getFileNamePrefix())){\n\t\t\t\treturn fileType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public final void mT__156() throws RecognitionException {\n try {\n int _type = T__156;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:156:8: ( 'artifactType' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:156:10: 'artifactType'\n {\n match(\"artifactType\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public abstract String getFileFormatName();", "String getFileExtensionByFileString(String name);", "private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }", "public abstract String packageName();", "private static boolean matchesPackage(Class<?> param2Class, String param2String) {\n/* 654 */ String str = param2Class.getName();\n/* 655 */ return (str.startsWith(param2String) && str.lastIndexOf('.') == param2String.length() - 1);\n/* */ }", "private static String getCorrectTypeName(final String typeName)\n {\n String result = \"\";\n\n // Type is an XSD built-in type\n if (mapping.containsKey(typeName))\n {\n result = mapping.get(typeName);\n }\n // Type is a custom type\n else\n {\n result = typeName;\n }\n\n return result;\n }", "public abstract FileName createName(String absolutePath, FileType fileType);", "@Test\n public void testGetFileType() {\n System.out.println(\"getFileType\");\n String file = \"adriano.pdb\";\n String expResult = \"pdb\";\n String result = Util.getFileType(file);\n assertEquals(expResult, result);\n }", "public String getFileType(){\n\t\treturn type;\n\t}", "@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // [email protected]: Review of patch from [email protected]\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }", "public static int fileType(File file) {\n for (String type : imageType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.CAMERA_IMAGE_CODE;\n }\n }\n\n for (String type : videoType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.CAMERA_VIDEO_CODE;\n }\n }\n\n for (String type : audioType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.AUDIO_CODE;\n }\n }\n return Template.Code.FILE_MANAGER_CODE;\n\n }", "String getClassName(Element e) {\n // e has to be a TypeElement\n TypeElement te = (TypeElement)e;\n String packageName = elementUtils.getPackageOf(te).getQualifiedName().toString();\n String className = te.getQualifiedName().toString();\n if (className.startsWith(packageName + \".\")) {\n String classAndInners = className.substring(packageName.length() + 1);\n className = packageName + \".\" + classAndInners.replace('.', '$');\n }\n return className;\n }", "public static ResourceOperation.Target parseType(String str) {\n if (StringComparator.isSameIgnoreCase(str, \"jproject\")) {\n return JPROJECT;\n } else if (StringComparator.isSameIgnoreCase(str, \"jpackage\")) {\n return JPACKAGE;\n } else if (StringComparator.isSameIgnoreCase(str, \"jfile\")) {\n return JFILE;\n }\n \n return OTHERS;\n }", "public void execute() throws MojoExecutionException {\n Build build = project.getBuild();\n String finalName = build.getFinalName();\n String buildDirectory = build.getDirectory();\n String packaging = project.getPackaging();\n getLog().info(\"Build final name: \" + finalName);\n getLog().info(\"Build output directory: \" + buildDirectory);\n getLog().info(\"Project packaging: \" + packaging);\n\n if (\"maven-plugin\".equals(packaging)) {\n getLog().info(\"maven-plugin packaging detected. Using jar file suffix.\");\n packaging = \"jar\";\n }\n\n File expectedFile;\n\n if (\"pom\".equals(packaging)) {\n getLog().info(\"pom packaging detected. Attaching pom only.\");\n expectedFile = project.getFile();\n } else {\n // Pom is attached as well here, no need to attach it\n expectedFile = new File(String.format(\"%s/%s.%s\", buildDirectory, finalName, packaging));\n }\n\n if (!expectedFile.exists()) {\n throw new MojoExecutionException(\"Error attaching artifact. Artifact does not exist.\");\n }\n\n project.getArtifact().setFile(expectedFile);\n\n }", "private Optional<String> toPackageName(String name) {\n assert !name.endsWith(\"/\");\n int index = name.lastIndexOf(\"/\");\n if (index == -1) {\n if (name.endsWith(\".class\") && !name.equals(MODULE_INFO)) {\n String msg = name + \" found in top-level directory\"\n + \" (unnamed package not allowed in module)\";\n throw new InvalidModuleDescriptorException(msg);\n }\n return Optional.empty();\n }\n\n String pn = name.substring(0, index).replace('/', '.');\n if (Checks.isPackageName(pn)) {\n return Optional.of(pn);\n } else {\n // not a valid package name\n return Optional.empty();\n }\n }", "private boolean isValidExtension(String originalName) {\n String originalNameExtension = originalName.substring(originalName.lastIndexOf(\".\") + 1);\n switch(originalNameExtension) {\n case \"jpg\":\n case \"png\":\n case \"gif\":\n return true;\n }\n return false;\n }" ]
[ "0.5788147", "0.5641943", "0.54623306", "0.5258896", "0.5189698", "0.5144172", "0.51291806", "0.5068165", "0.50517553", "0.5039754", "0.50205714", "0.49940008", "0.494907", "0.49348304", "0.4905536", "0.48908818", "0.4883972", "0.4874669", "0.4872536", "0.4866622", "0.48663464", "0.48523152", "0.48523012", "0.48414248", "0.48378798", "0.48362958", "0.48356706", "0.48346707", "0.48277918", "0.48195994", "0.48169854", "0.48120412", "0.48088273", "0.47958034", "0.47882026", "0.4787534", "0.47835144", "0.4779937", "0.47682664", "0.47641417", "0.4748359", "0.4746799", "0.4741066", "0.47328374", "0.47204536", "0.46994638", "0.46931294", "0.46928105", "0.46652824", "0.46540847", "0.4653208", "0.46427894", "0.4639729", "0.46369624", "0.4636304", "0.46299618", "0.4621983", "0.46200976", "0.46057174", "0.4602484", "0.45897913", "0.4589675", "0.45847917", "0.45838475", "0.45793155", "0.45735368", "0.4572671", "0.45724267", "0.45682245", "0.45677647", "0.45541623", "0.4552526", "0.4544996", "0.4530209", "0.4526495", "0.45219293", "0.4515712", "0.45129463", "0.45105252", "0.45098332", "0.4508871", "0.45038435", "0.4500515", "0.45002294", "0.4499995", "0.4492488", "0.449237", "0.4489588", "0.4486787", "0.4486459", "0.44858336", "0.44831622", "0.44796184", "0.44758272", "0.44702905", "0.44700906", "0.44570863", "0.445587", "0.44546548", "0.4453859" ]
0.60690624
0
This method will get the dependencies from the pom and construct a classpath string to be used to run a mojo where a classpath is required.
public static String getDependencies( final Set inArtifacts ) { if ( inArtifacts == null || inArtifacts.isEmpty() ) { return ""; } // Loop over all the artifacts and create a classpath string. Iterator iter = inArtifacts.iterator(); StringBuffer buffer = new StringBuffer(); if ( iter.hasNext() ) { Artifact artifact = (Artifact) iter.next(); buffer.append( artifact.getFile() ); while ( iter.hasNext() ) { artifact = (Artifact) iter.next(); buffer.append( System.getProperty( "path.separator" ) ); buffer.append( artifact.getFile() ); } } return buffer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ClassLoader makeClassLoader() throws MojoExecutionException {\n final List<URL> urls = new ArrayList<URL>();\n try {\n for (String cp: project.getRuntimeClasspathElements()) {\n urls.add(new File(cp).toURI().toURL());\n }\n } catch (DependencyResolutionRequiredException e) {\n throw new MojoExecutionException(\"dependencies not resolved\", e);\n } catch (MalformedURLException e) {\n throw new MojoExecutionException(\"invalid classpath element\", e);\n }\n return new URLClassLoader(urls.toArray(new URL[urls.size()]),\n getClass().getClassLoader());\n }", "public Path createClasspath() {\r\n return getCommandLine().createClasspath(getProject()).createPath();\r\n }", "public String getSystemClassPath();", "String resolveClassPath(String classPath);", "private void createClassPath() {\n classPath = classFactory.createClassPath();\n }", "public Path createClasspath() {\n if (this.classpath == null) {\n this.classpath = new Path(project);\n }\n return this.classpath.createPath();\n }", "public static String getDependencies( final Set artifacts, final List pluginArtifacts )\n {\n\n if ( ( artifacts == null || artifacts.isEmpty() ) &&\n ( pluginArtifacts == null || pluginArtifacts.size() == 0 ) )\n {\n return \"\";\n }\n // Loop over all the artifacts and create a classpath string.\n final Iterator iter = artifacts.iterator();\n\n final StringBuffer buffer = new StringBuffer( 1024 );\n if ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n buffer.append( artifact.getFile() );\n\n while ( iter.hasNext() )\n {\n artifact = (Artifact) iter.next();\n buffer.append( System.getProperty( \"path.separator\" ) );\n buffer.append( artifact.getFile() );\n }\n }\n //now get the plugin artifacts into the list\n final Iterator pluginIter = pluginArtifacts.iterator();\n if ( pluginIter.hasNext() )\n {\n Artifact artifact = (Artifact) pluginIter.next();\n if ( buffer.length() > 0 )\n {\n buffer.append( System.getProperty( \"path.separator\" ) );\n }\n buffer.append( artifact.getFile() );\n\n while ( pluginIter.hasNext() )\n {\n artifact = (Artifact) pluginIter.next();\n buffer.append( System.getProperty( \"path.separator\" ) );\n buffer.append( artifact.getFile() );\n }\n }\n\n return buffer.toString();\n }", "public Path createClasspath()\n {\n if( m_compileClasspath == null )\n {\n m_compileClasspath = new Path();\n }\n Path path1 = m_compileClasspath;\n final Path path = new Path();\n path1.addPath( path );\n return path;\n }", "@Classpath\n public FileCollection getJdependClasspath() {\n return jdependClasspath;\n }", "private ClassLoader getCompileClassLoader() throws MojoExecutionException {\n\t\ttry {\n\t\t\tList<String> runtimeClasspathElements = project.getRuntimeClasspathElements();\n\t\t\tList<String> compileClasspathElements = project.getCompileClasspathElements();\n\t\t\tArrayList<URL> classpathURLs = new ArrayList<>();\n\t\t\tfor (String element : runtimeClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tfor (String element : compileClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tURL[] urlArray = classpathURLs.toArray(new URL[classpathURLs.size()]);\n\t\t\treturn new URLClassLoader(urlArray, Thread.currentThread().getContextClassLoader());\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new MojoExecutionException(\"Unable to load project runtime !\", e);\n\t\t}\n\t}", "static List<GlassFishLibrary.Maven> processClassPath(List<File> classpath) {\n List<GlassFishLibrary.Maven> mvnList = new LinkedList<>();\n for (File jar : classpath) {\n ZipFile zip = null;\n try {\n zip = new ZipFile(jar);\n Enumeration<? extends ZipEntry> entries = zip.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n Matcher matcher\n = MVN_PROPS_PATTERN.matcher(entry.getName());\n if (matcher.matches()) {\n GlassFishLibrary.Maven mvnInfo\n = getMvnInfoFromProperties(zip.getInputStream(\n entry));\n if (mvnInfo != null) {\n mvnList.add(mvnInfo);\n break;\n }\n }\n }\n } catch (ZipException ze) {\n Logger.log(Level.WARNING, \"Cannot open JAR file \"\n + jar.getAbsolutePath() + \":\", ze);\n } catch (IOException ioe) {\n Logger.log(Level.WARNING, \"Cannot process JAR file \"\n + jar.getAbsolutePath() + \":\", ioe);\n } catch (IllegalStateException ise) {\n Logger.log(Level.WARNING, \"Cannot process JAR file \"\n + jar.getAbsolutePath() + \":\", ise);\n } finally {\n if (zip != null) try {\n zip.close();\n } catch (IOException ioe) {\n Logger.log(Level.WARNING, \"Cannot close JAR file \"\n + jar.getAbsolutePath() + \":\", ioe);\n }\n }\n \n }\n return mvnList;\n }", "public Builder addClasspath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureClasspathIsMutable();\n classpath_.add(value);\n onChanged();\n return this;\n }", "private static String computeClassPath(Map<String, String> propMap,\n File domainDir, File bootstrapJar) {\n final String METHOD = \"computeClassPath\";\n String result = null;\n List<File> prefixCP = Utils.classPathToFileList(\n propMap.get(\"classpath-prefix\"), domainDir);\n List<File> suffixCP = Utils.classPathToFileList(\n propMap.get(\"classpath-suffix\"), domainDir);\n boolean useEnvCP = \"false\".equals(\n propMap.get(\"env-classpath-ignored\"));\n List<File> envCP = Utils.classPathToFileList(\n useEnvCP ? System.getenv(\"CLASSPATH\") : null, domainDir);\n List<File> systemCP = Utils.classPathToFileList(\n propMap.get(\"system-classpath\"), domainDir);\n\n if (prefixCP.size() > 0 || suffixCP.size() > 0 || envCP.size() > 0\n || systemCP.size() > 0) {\n List<File> mainCP = Utils.classPathToFileList(\n bootstrapJar.getAbsolutePath(), null);\n\n if (mainCP.size() > 0) {\n List<File> completeCP = new ArrayList<>(32);\n completeCP.addAll(prefixCP);\n completeCP.addAll(mainCP);\n completeCP.addAll(systemCP);\n completeCP.addAll(envCP);\n completeCP.addAll(suffixCP);\n\n // Build classpath in proper order - prefix / main / system \n // / environment / suffix\n // Note that completeCP should always have at least 2 elements\n // at this point (1 from mainCP and 1 from some other CP\n // modifier)\n StringBuilder classPath = new StringBuilder(1024);\n Iterator<File> iter = completeCP.iterator();\n classPath.append(Utils.quote(iter.next().getPath()));\n while (iter.hasNext()) {\n classPath.append(File.pathSeparatorChar);\n classPath.append(Utils.quote(iter.next().getPath()));\n }\n result = classPath.toString();\n } else {\n LOGGER.log(Level.WARNING, METHOD, \"cpError\");\n }\n }\n return result;\n }", "private static IPath getClassPath(IProject iproject) {\n\t\tIJavaProject project = JavaCore.create(iproject);\n\n\t\t// IClasspathEntry[] classPath = null;\n\t\t// IPath[] path = null;\n\t\tIPath out = null;\n\t\ttry {\n\t\t\tout = project.getOutputLocation();\n\t\t} catch (JavaModelException e) {\n\t\t\tLogger.err.println(e);\n\t\t}\n\n\t\treturn out;\n\t}", "public Path createClasspath() {\n if (isReference()) {\n throw noChildrenAllowed();\n }\n if (this.classpath == null) {\n this.classpath = new Path(getProject());\n }\n setChecked(false);\n return this.classpath.createPath();\n }", "@Override\n public void execute() throws MojoExecutionException, MojoFailureException {\n getLog().info(\"Adding the dependency \" + groupId + \":\" + artifactId);\n\n // Load the model\n Model model;\n try {\n model = POMUtils.loadModel(pomFile);\n } catch (IOException | XmlPullParserException e) {\n throw new MojoExecutionException(\"Error while loading the Maven model.\", e);\n }\n\n // Creating a dependency object\n Dependency dependency = new Dependency();\n\n dependency.setArtifactId(artifactId);\n dependency.setGroupId(groupId);\n if (version != null) {\n dependency.setVersion(version);\n }\n if (systemPath != null) {\n dependency.setSystemPath(systemPath);\n }\n if (type != null) {\n dependency.setType(type);\n }\n if (scope != null) {\n dependency.setScope(scope);\n }\n if (optional) {\n dependency.setOptional(true);\n }\n\n model =\n addDependency(model, dependency, groupId, artifactId, version, modifyDependencyManagement);\n\n // Save the model\n try {\n POMUtils.saveModel(model, pomFile, pomBackup);\n } catch (IOException e) {\n throw new MojoExecutionException(\"I/O error while writing the Maven model.\", e);\n }\n }", "public void setClasspath(String classpath) {\n this.classpath = classpath;\n }", "public static List<String> getClasspathElements( MavenProject project, List<Artifact> artifacts )\n throws DependencyResolutionRequiredException\n {\n // based on MavenProject.getCompileClasspathElements\n\n List<String> list = new ArrayList<String>( artifacts.size() );\n\n for ( Artifact artifact : artifacts )\n {\n if ( artifact.getArtifactHandler().isAddedToClasspath() )\n {\n // TODO: let the scope handler deal with this\n if ( Artifact.SCOPE_COMPILE.equals( artifact.getScope() )\n || Artifact.SCOPE_RUNTIME.equals( artifact.getScope() ) )\n {\n addArtifactPath( project, artifact, list );\n }\n }\n }\n\n return list;\n }", "public abstract NestedSet<Artifact> bootclasspath();", "private void addClasspath(String path)\n {\n if (classpath == null)\n {\n classpath = path;\n }\n else\n {\n classpath += File.pathSeparator + path;\n }\n }", "public static void printClassPath() {\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n URL[] urls = ((URLClassLoader) cl).getURLs();\n System.out.println(\"classpath BEGIN\");\n for (URL url : urls) {\n System.out.println(url.getFile());\n }\n System.out.println(\"classpath END\");\n System.out.flush();\n }", "@Classpath\n @InputFiles\n public FileCollection getClasspath() {\n return _classpath;\n }", "public List getRuntimeClasspath(IPath installPath, IPath configPath);", "public void setClasspath(Path classpath) {\n createClasspath().append(classpath);\n }", "public String[] getClasspaths(IJavaProgramPrepareResult result) {\n\t\tString[] classpath = new String[0];\n\t\t\n\t\treturn classpath;\n\t}", "private String relativizeLibraryClasspath(final String property, final File projectDir) {\n final String value = PropertyUtils.getGlobalProperties().getProperty(property);\n if (value == null)\n return null;\n final String[] paths = PropertyUtils.tokenizePath(value);\n final StringBuffer sb = new StringBuffer();\n for (int i=0; i<paths.length; i++) {\n final File f = antProjectHelper.resolveFile(paths[i]);\n if (CollocationQuery.areCollocated(f, projectDir)) {\n sb.append(PropertyUtils.relativizeFile(projectDir, f));\n } else {\n return null;\n }\n if (i+1<paths.length) {\n sb.append(File.pathSeparatorChar);\n }\n }\n if (sb.length() == 0) {\n return null;\n } \n return sb.toString();\n }", "public abstract NestedSet<Artifact> getTransitiveJackClasspathLibraries();", "public String constructFullClasspath() {\n\t\t\t\tString cp = super.constructFullClasspath();\n\t\t\t\tcp += File.pathSeparator + soot.options.Options.v().soot_classpath();\n\t\t\t\treturn cp;\n\t\t\t}", "public void setClasspath( final Path classpath )\n throws TaskException\n {\n if( m_compileClasspath == null )\n {\n m_compileClasspath = classpath;\n }\n else\n {\n m_compileClasspath.append( classpath );\n }\n }", "public void setClasspath(Path s) {\r\n createClasspath().append(s);\r\n }", "private void parseSystemClasspath() {\n\t // Look for all unique classloaders.\n\t // Keep them in an order that (hopefully) reflects the order in which class resolution occurs.\n\t ArrayList<ClassLoader> classLoaders = new ArrayList<>();\n\t HashSet<ClassLoader> classLoadersSet = new HashSet<>();\n\t classLoadersSet.add(ClassLoader.getSystemClassLoader());\n\t classLoaders.add(ClassLoader.getSystemClassLoader());\n\t if (classLoadersSet.add(Thread.currentThread().getContextClassLoader())) {\n\t classLoaders.add(Thread.currentThread().getContextClassLoader());\n\t }\n\t // Dirty method for looking for any other classloaders on the call stack\n\t try {\n\t // Generate stacktrace\n\t throw new Exception();\n\t } catch (Exception e) {\n\t StackTraceElement[] stacktrace = e.getStackTrace();\n\t for (StackTraceElement elt : stacktrace) {\n\t try {\n\t ClassLoader cl = Class.forName(elt.getClassName()).getClassLoader();\n\t if (classLoadersSet.add(cl)) {\n\t classLoaders.add(cl);\n\t }\n\t } catch (ClassNotFoundException e1) {\n\t }\n\t }\n\t }\n\n\t // Get file paths for URLs of each classloader.\n\t clearClasspath();\n\t for (ClassLoader cl : classLoaders) {\n\t if (cl != null) {\n\t for (URL url : getURLs(cl)) {\n\t \t\n\t if (\"file\".equals(url.getProtocol())) {\n\t addClasspathElement(url.getFile());\n\t }\n\t }\n\t }\n\t }\n\t}", "public Path createBootclasspath() {\r\n return getCommandLine().createBootclasspath(getProject()).createPath();\r\n }", "private Path getClasspath() {\n return getRef().classpath;\n }", "public byte[] generateMavenProject(UpnpDevice device, Requirements requirements) throws IOException, URISyntaxException\n\t{\n\t\tByteArrayOutputStream zipBytes = null;\n\t\tZipOutputStream out = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tzipBytes = new ByteArrayOutputStream();\n\t\t\tout = new ZipOutputStream(zipBytes);\n\n\t\t\t// Generate services files\n\t\t\tfor (UpnpService service : device.getServices())\n\t\t\t{\n\t\t\t\tString serviceCode = VelocityCodeGenerator.getIntance().generateService(service);\n\t\t\t\tcreateZipEntry(out, MAVEN_STRUCTURE_JAVA + service.getName() + \".java\", serviceCode.getBytes());\n\t\t\t}\n\n\t\t\t// Generate the device file\n\t\t\tString serverCode = VelocityCodeGenerator.getIntance().generateServer(device);\n\t\t\tcreateZipEntry(out, MAVEN_STRUCTURE_JAVA + device.getDeviceName() + \"Server.java\", serverCode.getBytes());\n\n\t\t\t// Generate pom.xml\n\t\t\tSet<MavenDependency> dependencies = new HashSet<>(); // TODO\n\t\t\tif (requirements.getMavenDependencies() != null)\n\t\t\t{\n\t\t\t\tdependencies.addAll(requirements.getMavenDependencies());\n\t\t\t}\n\n\t\t\tif (requirements.getLocalJars() != null)\n\t\t\t{\n\t\t\t\tfor (String path : requirements.getLocalJars())\n\t\t\t\t{\n\t\t\t\t\tFile jar = new File(path);\n\t\t\t\t\taddLibrary(out, jar);\n\n\t\t\t\t\tMavenDependency dep = new MavenDependency();\n\t\t\t\t\tdep.setGroupId(DEFAULT_LIBRARY_GROUPID);\n\t\t\t\t\tdep.setArtifactId(jar.getName().substring(0, jar.getName().lastIndexOf(\".\")));\n\t\t\t\t\tdep.setVersion(DEFAULT_LIBRARY_VERSION);\n\t\t\t\t\tdep.setLocalJar(true);\n\t\t\t\t\tdependencies.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tString pomXmlCode = VelocityCodeGenerator.getIntance().generatePomXml(device, dependencies);\n\t\t\tcreateZipEntry(out, MAVEN_POM_XML, pomXmlCode.getBytes());\n\n\t\t\t// Add modules\n\t\t\tif (requirements.getJavaModules() != null)\n\t\t\t{\n\t\t\t\tfor (String path : requirements.getJavaModules())\n\t\t\t\t{\n\t\t\t\t\tFile module = new File(path);\n\t\t\t\t\taddModule(out, module);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//\n\t\t\t// TODO: gérer les imports\n\t\t\t//\n\t\t\t\n\t\t\t// FIXME: ugly hack\n\t\t\tFile modulesDirectory = new File(\"src/main/java/fr/unice/polytech/si5/pfe46/\" + MODULES_FOLDER);\n\t\t\taddModule(out, modulesDirectory);\n\t\t\tFile jsonProcess = new File(\"src/main/java/fr/unice/polytech/si5/pfe46/utils/JsonProcess.java\");\n\t\t\taddModule(out, jsonProcess);\n\t\t\t\n\t\t\tout.close();\n\t\t\t\n\t\t\treturn zipBytes.toByteArray();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tout.close();\n\t\t\tzipBytes.close();\n\t\t}\n\t}", "private void addDependencyManagement( Model pomModel )\n {\n List<Artifact> projectArtifacts = new ArrayList<Artifact>( mavenProject.getArtifacts() );\n Collections.sort( projectArtifacts );\n\n Properties versionProperties = new Properties();\n DependencyManagement depMgmt = new DependencyManagement();\n for ( Artifact artifact : projectArtifacts )\n {\n if (isExcludedDependency(artifact)) {\n continue;\n }\n\n String versionPropertyName = VERSION_PROPERTY_PREFIX + artifact.getGroupId();\n if (versionProperties.getProperty(versionPropertyName) != null\n && !versionProperties.getProperty(versionPropertyName).equals(artifact.getVersion())) {\n versionPropertyName = VERSION_PROPERTY_PREFIX + artifact.getGroupId() + \".\" + artifact.getArtifactId();\n }\n versionProperties.setProperty(versionPropertyName, artifact.getVersion());\n\n Dependency dep = new Dependency();\n dep.setGroupId( artifact.getGroupId() );\n dep.setArtifactId( artifact.getArtifactId() );\n dep.setVersion( artifact.getVersion() );\n if ( !StringUtils.isEmpty( artifact.getClassifier() ))\n {\n dep.setClassifier( artifact.getClassifier() );\n }\n if ( !StringUtils.isEmpty( artifact.getType() ))\n {\n dep.setType( artifact.getType() );\n }\n if (exclusions != null) {\n applyExclusions(artifact, dep);\n }\n depMgmt.addDependency( dep );\n }\n pomModel.setDependencyManagement( depMgmt );\n if (addVersionProperties) {\n pomModel.getProperties().putAll(versionProperties);\n }\n getLog().debug( \"Added \" + projectArtifacts.size() + \" dependencies.\" );\n }", "protected void autoConfigureDependencies(String artifactId) {\n InputStream is = getClass().getResourceAsStream(\"/auto-configure/\" + artifactId + \".properties\");\n if (is != null) {\n try {\n String script = IOHelper.loadText(is);\n for (String line : script.split(\"\\n\")) {\n line = line.trim();\n if (line.startsWith(\"dependency=\")) {\n MavenGav gav = MavenGav.parseGav(line.substring(11));\n DependencyDownloader downloader = getCamelContext().hasService(DependencyDownloader.class);\n // these are extra dependencies used in special use-case so download as hidden\n downloader.downloadHiddenDependency(gav.getGroupId(), gav.getArtifactId(), gav.getVersion());\n }\n }\n } catch (Exception e) {\n throw RuntimeCamelException.wrapRuntimeException(e);\n } finally {\n IOHelper.close(is);\n }\n }\n }", "public ClassPath getClassPath();", "private ClassLoader createHostClassLoader() throws MojoExecutionException {\n \n Set<URL> hostClasspath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-api\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\");\n hostClasspath.addAll(artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-host-api\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\"));\n hostClasspath.addAll(artifactHelper.resolve(\"javax.servlet\", \"servlet-api\", \"2.4\", Artifact.SCOPE_RUNTIME, \"jar\"));\n \n return new URLClassLoader(hostClasspath.toArray(new URL[] {}), getClass().getClassLoader());\n \n }", "private void addClasspathElement(String pathElement) {\n\t if (classpathElementsSet.add(pathElement)) {\n\t final File file = new File(pathElement);\n\t if (file.exists()) {\n\t classpathElements.add(file);\n\t }\n\t }\n\t}", "private File generatePomFile(Model model) {\n \n Writer writer = null;\n try {\n File pomFile = File.createTempFile(\"mvninstall\", \".pom\");\n writer = WriterFactory.newXmlWriter(pomFile);\n new MavenXpp3Writer().write(writer, model);\n return pomFile;\n } catch (IOException e) {\n logger.error(\"Error writing temporary POM file: \" + e.getMessage(), e);\n return null;\n } finally {\n IOUtil.close(writer);\n }\n }", "void depend(@Nonnull String path);", "protected void autoConfigure(String artifactId) {\n InputStream is = getClass().getResourceAsStream(\"/auto-configure/\" + artifactId + \".joor\");\n if (is != null) {\n try {\n // ensure java-joor is downloaded\n DependencyDownloader downloader = getCamelContext().hasService(DependencyDownloader.class);\n // these are extra dependencies used in special use-case so download as hidden\n downloader.downloadHiddenDependency(\"org.apache.camel\", \"camel-joor\", camelContext.getVersion());\n // execute script via java-joor\n String script = IOHelper.loadText(is);\n Language lan = camelContext.resolveLanguage(\"joor\");\n Expression exp = lan.createExpression(script);\n Object out = exp.evaluate(new DefaultExchange(camelContext), Object.class);\n if (ObjectHelper.isNotEmpty(out)) {\n LOG.info(\"{}\", out);\n }\n } catch (Exception e) {\n throw RuntimeCamelException.wrapRuntimeException(e);\n } finally {\n IOHelper.close(is);\n }\n }\n }", "public void initFromClasspath() throws IOException {\n \t\tcontactNames = loadFromClassPath(\"contactNames\");\n \t\tgroupNames = loadFromClassPath(\"groupNames\");\n \t\tmessageWords = loadFromClassPath(\"messageWords\");\n \t}", "protected Set getDependencies()\n throws MojoExecutionException\n {\n MavenProject project = getExecutedProject();\n\n Set dependenciesSet = new HashSet();\n\n if ( project.getArtifact() != null && project.getArtifact().getFile() != null )\n {\n dependenciesSet.add( project.getArtifact() );\n }\n\n Set projectArtifacts = project.getArtifacts();\n if ( projectArtifacts != null )\n {\n dependenciesSet.addAll( projectArtifacts );\n }\n\n return dependenciesSet;\n }", "public Path getFromClasspath(String classpathRelativePath) throws URISyntaxException {\n return Paths.get( PathUtil.class.getClassLoader().getResource(classpathRelativePath).toURI());\n }", "protected void appendClassPath(final ClassPool pool) {\r\n pool.appendClassPath(new LoaderClassPath(getClassLoader()));\r\n }", "protected void setClasspath(final PyObject importer, final String... paths) {\n\t\t// get the sys module\n\t\tfinal PyObject sysModule = importer.__call__(Py.newString(\"sys\"));\n\n\t\t// get the sys.path list\n\t\tfinal PyList path = (PyList) sysModule.__getattr__(\"path\");\n\n\t\t// add the current directory to the path\n\t\tfinal PyString pythonPath = Py.newString(getClass().getResource(\".\").getPath());\n\t\tpath.add(pythonPath);\n\n\t\tfinal String[] classpath = System.getProperty(\"java.class.path\").split(File.pathSeparator);\n\t\tfinal List<PyString> classPath = Stream.of(classpath).map(s -> Py.newString(s)).collect(Collectors.toList());\n\n\t\tpath.addAll(classPath);\n\t}", "public static PathAnchor classpath() {\n return classpath(Config.class.getClassLoader());\n }", "public void addClause(ProjectDependencies dependencies, StringBuilder include,\n StringBuilder classpath, Reporter reporter) {\n boolean generated = false;\n\n Set<Artifact> artifacts = dependencies.getDirectDependencies();\n if (transitive) {\n artifacts = dependencies.getTransitiveDependencies();\n }\n\n for (Artifact artifact : artifacts) {\n if (filter.include(artifact)) {\n if (inline()) {\n String clause = \"@\" + artifact.getFile().getAbsolutePath();\n if (!full) {\n clause += \"!/\" + inline; //NOSONAR can be appended here.\n }\n append(include, clause);\n generated = true;\n } else {\n append(include, artifact.getFile().getAbsolutePath());\n append(classpath, artifact.getFile().getName());\n generated = true;\n }\n }\n }\n if (!generated) {\n reporter.warn(\"A clause from `Embed-Dependency` did not match any artifacts: \" + clause);\n }\n }", "ClassPath add(ClassPathElement element);", "private String getXMLDependencyStanza(String sha1Hash)\n {\n try\n {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(new URL(REST_BASE_URL + sha1Hash).openStream());\n\n NodeList nl = doc.getElementsByTagName(\"artifact\");\n if (nl.getLength() > 0)\n {\n String groupId = ((Element) nl.item(0)).getElementsByTagName(\"groupId\").item(0).getTextContent();\n String artifactId = ((Element) nl.item(0)).getElementsByTagName(\"artifactId\").item(0).getTextContent();\n String version = ((Element) nl.item(0)).getElementsByTagName(\"version\").item(0).getTextContent();\n\n StringBuilder b = new StringBuilder(\"<dependency>\\n\");\n b.append(\" <groupId>\");\n b.append(groupId);\n b.append(\"</groupId>\\n\");\n\n b.append(\" <artifactId>\");\n b.append(artifactId);\n b.append(\"</artifactId>\\n\");\n\n b.append(\" <version>\");\n b.append(version);\n b.append(\"</version>\\n\");\n\n b.append(\"</dependency>\\n\");\n\n return b.toString();\n }\n\n return null;\n }\n catch (Exception e)\n {\n throw new RuntimeException(e);\n }\n }", "public static String fromClassPath() {\n Set<String> versions = new HashSet<>();\n try {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Enumeration<URL> manifests = classLoader.getResources(\"META-INF/MANIFEST.MF\");\n\n while (manifests.hasMoreElements()) {\n URL manifestURL = manifests.nextElement();\n try (InputStream is = manifestURL.openStream()) {\n Manifest manifest = new Manifest();\n manifest.read(is);\n\n Attributes buildInfo = manifest.getAttributes(\"Build-Info\");\n if (buildInfo != null) {\n if (buildInfo.getValue(\"Selenium-Version\") != null) {\n versions.add(buildInfo.getValue(\"Selenium-Version\"));\n } else {\n // might be in build-info part\n if (manifest.getEntries() != null) {\n if (manifest.getEntries().containsKey(\"Build-Info\")) {\n final Attributes attributes = manifest.getEntries().get(\"Build-Info\");\n\n if (attributes.getValue(\"Selenium-Version\") != null) {\n versions.add(attributes.getValue(\"Selenium-Version\"));\n }\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n logger.log(Level.WARNING,\n \"Exception {0} occurred while resolving selenium version and latest image is going to be used.\",\n e.getMessage());\n return SELENIUM_VERSION;\n }\n\n if (versions.isEmpty()) {\n logger.log(Level.INFO, \"No version of Selenium found in classpath. Using latest image.\");\n return SELENIUM_VERSION;\n }\n\n String foundVersion = versions.iterator().next();\n if (versions.size() > 1) {\n logger.log(Level.WARNING, \"Multiple versions of Selenium found in classpath. Using the first one found {0}.\",\n foundVersion);\n }\n\n return foundVersion;\n }", "public void classLoader(){\n \t\n URL xmlpath = this.getClass().getClassLoader().getResource(\"\");\n System.out.println(xmlpath.getPath());\n }", "public void execute( final Set pRemovable, final Set pDependencies, final Set pRelocateDependencies )\n throws MojoExecutionException \n {\n \t\n for ( Iterator i = pDependencies.iterator(); i.hasNext(); )\n {\n final Artifact dependency = (Artifact) i.next();\n \n final Map variables = new HashMap();\n \n variables.put( \"artifactId\", dependency.getArtifactId() );\n variables.put( \"groupId\", dependency.getGroupId() );\n variables.put( \"version\", dependency.getVersion() );\n \n final String newName = replaceVariables( variables, name ); \n \t \t\n final File inputJar = dependency.getFile();\n final File outputJar = new File( buildDirectory, newName );\n \n try\n {\n \tfinal Jar jar = new Jar( inputJar, false );\n \t\n \tJarUtils.processJars(\n \t\t\tnew Jar[] { jar },\n \t\t\tnew ResourceHandler() {\n \t\t\t\t\n\t\t\t\t\t\t\tpublic void onStartProcessing( JarOutputStream pOutput )\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onStartJar( Jar pJar, JarOutputStream pOutput )\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic InputStream onResource( Jar jar, String oldName, String newName, Version[] versions, InputStream inputStream )\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\tif ( jar != versions[0].getJar() )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// only process the first version of it\n\n\t\t\t\t\t\t\t\t\tgetLog().info( \"Ignoring resource \" + oldName);\n\n\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfinal String clazzName = oldName.replace( '/' , '.' ).substring( 0, oldName.length() - \".class\".length() );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( pRemovable.contains(new Clazz ( clazzName ) ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ( isInKeepUnusedClassesFromArtifacts( dependency ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\treturn inputStream;\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 ( isInKeepUnusedClasses( name ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\treturn inputStream;\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\treturn null;\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\treturn inputStream;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onStopJar(Jar pJar, JarOutputStream pOutput)\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onStopProcessing(JarOutputStream pOutput)\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n \t\t\t\t\n \t\t\t},\n \t\t\tnew FileOutputStream( outputJar ),\n \t\t\tnew Console()\n \t\t\t{\n\t\t\t\t\t\t\tpublic void println( String pString )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgetLog().debug( pString );\n\t\t\t\t\t\t\t} \t\t\n \t\t\t}\n \t\t);\n }\n catch ( ZipException ze )\n {\n getLog().info( \"No references to jar \" + inputJar.getName() + \". You can safely omit that dependency.\" );\n \n if ( outputJar.exists() )\n {\n outputJar.delete();\n }\n continue;\n }\n catch ( Exception e )\n {\n throw new MojoExecutionException( \"Could not create mini jar \" + outputJar, e );\n }\n \n getLog().info( \"Original length of \" + inputJar.getName() + \" was \" + inputJar.length() + \" bytes. \" + \"Was able shrink it to \" + outputJar.getName() + \" at \" + outputJar.length() + \" bytes (\" + (int) ( 100 * outputJar.length() / inputJar.length() ) + \"%)\" );\n }\n }", "public String getClasspath()\n\t{\n\t\treturn classpath;\n\t}", "static URL[] getClassPath() throws MalformedURLException {\n List<URL> classPaths = new ArrayList<>();\n\n classPaths.add(new File(\"target/test-classes\").toURI().toURL());\n\n // Add this test jar which has some frontend resources used in tests\n URL jar = getTestResource(\"jar-with-frontend-resources.jar\");\n classPaths.add(jar);\n\n // Add other paths already present in the system classpath\n ClassLoader classLoader = ClassLoader.getSystemClassLoader();\n URL[] urls = URLClassLoader.newInstance(new URL[] {}, classLoader)\n .getURLs();\n for (URL url : urls) {\n classPaths.add(url);\n }\n return classPaths.toArray(new URL[0]);\n }", "public static void main(String[] args) throws Exception{\n\n if (args.length < 1 || args.length > 2){\n System.err.println(\"Usage: java com.armhold.Provenance lib_dir add_comments\");\n System.err.println(\"\\tlib_dir\\t\\t\\t directory containing your *.jar files\");\n System.err.println(\"\\tadd_comments\\t optional flag (true or false) to avoid printing comments in pom, default is true\");\n System.exit(1);\n }\n\n if(args.length == 2 && args[1].equalsIgnoreCase(\"false\")) ADD_COMMENTS = false;\n\n Provenance provenance = new Provenance();\n provenance.importJarFiles(args[0]);\n }", "public StringBuilder getClassPathDescription() {\n\n // load the jars from the classpath\n StringBuilder classPathLog = new StringBuilder();\n String[] classpathArray = getClassPathArray();\n\n if (classpathArray.length == 0) {\n return classPathLog;\n }\n\n // Make a map containing folders as keys and jar names as values\n Map<String, List<String>> classPathMap = new HashMap<String, List<String>>();\n for (int i = 0; i < classpathArray.length; i++) {\n String jarFullPath = classpathArray[i].replace(\"\\\\\", \"/\");\n String absPath = jarFullPath.substring(0, jarFullPath.lastIndexOf('/') + 1);\n String simpleJarName = jarFullPath.substring(jarFullPath.lastIndexOf('/') + 1,\n jarFullPath.length());\n if (classPathMap.containsKey(absPath)) {\n classPathMap.get(absPath).add(simpleJarName);\n } else {\n classPathMap.put(absPath, new ArrayList<String>(Arrays.asList(simpleJarName)));\n }\n }\n\n // append instances of same jar one after another\n for (String path : new TreeSet<String>(classPathMap.keySet())) {\n classPathLog.append(\"\\n\");\n classPathLog.append(path);\n List<String> jarList = classPathMap.get(path);\n Collections.sort(jarList);\n for (String lib : jarList) {\n classPathLog.append(\"\\n\\t\");\n classPathLog.append(lib);\n }\n }\n return classPathLog;\n }", "public WebDriver initializeDriver() throws IOException {\n\t\tprop = new Properties();\n\n\t\t// System.getproperty(\"user.dir\")\n\n\t\tFileInputStream fis = new FileInputStream(\n\t\t\t\tSystem.getProperty(\"user.dir\") + \"\\\\src\\\\main\\\\java\\\\resources\\\\data.properties\");\n\n\t\tprop.load(fis);\n\t\t// mvn test -Dbrowser=chrome ---> To Run the script through MAVEN COMMANDS\n\n\t\t//String browserName = System.getProperty(\"browser\"); // This is to invoke the browser through the Maven command\n\n\t\t String browserName = prop.getProperty(\"browser\");\n\n\t\tif (browserName.contains(\"chrome\")) {\n\t\t\t// execute in chrome browser\n\t\t\t// ChromeOptions options = new ChromeOptions(); ---> This part of the code is to\n\t\t\t// run the script without chrome driver being invoked but the script will run in\n\t\t\t// HEADLESS Mode\n\t\t\t// options.addArguments(\"--headless\");\n\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"D://drivers//chromedriver7.exe\"); // Launch chrome driver\n\n\t\t\tChromeOptions options = new ChromeOptions();\n\n\t\t\toptions.setAcceptInsecureCerts(true);\n\t\t\t/*\n\t\t\t * To run the script by invoking CHROME BROWSER in HEADLESS MODE i.e it will not\n\t\t\t * display the chrome browser\n\t\t\t */\n\n\t\t\tif (browserName.contains(\"headless\")) {\n\t\t\t\toptions.addArguments(\"headless\");\n\t\t\t}\n\t\t\tdriver = new ChromeDriver(options);\n\t\t}\n\n\t\telse if (browserName.equals(\"firefox\")) {\n\n\t\t\t// execute in firefox browser\n\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"D:\\\\drivers\\\\geckodriver-two.exe\"); // Launch firefox driver\n\t\t\tdriver = new FirefoxDriver();\n\n\t\t}\n\n\t\telse if (browserName.equals(\"Edge\")) {\n\n\t\t\t// execute in Internet Explorer\n\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", \"D:\\\\drivers\\\\msedgedriver.exe\"); // Launch Edge\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// driver\n\t\t\tdriver = new InternetExplorerDriver();\n\n\t\t}\n\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\n\t\treturn driver;\n\t}", "protected Vector getTestSuiteClassPath(String jarPath) {\n Vector result = new Vector();\n if (useOurAgent) {\n result.add(new File(\"javatest-agent/j2meclasses\").getAbsolutePath());\n } else {\n result.add(tckPath + \"lib/agent.jar\");\n result.add(tckPath + \"lib/client.jar\");\n }\n result.add(getHttpClientPath());\n result.add(jarPath);\n return result;\n }", "static List getCommonClasspath(BaseManager mgr) throws IOException {\n\n InstanceEnvironment env = mgr.getInstanceEnvironment();\n String dir = env.getLibClassesPath();\n String jarDir = env.getLibPath();\n\n return ClassLoaderUtils.getUrlList(new File[] {new File(dir)}, \n new File[] {new File(jarDir)});\n }", "void setClassPathElements(java.util.List classPathElements);", "public void testClasspathFileChange() throws JavaModelException {\n IPath projectPath = env.addProject(\"Project\");\n //$NON-NLS-1$\n env.removePackageFragmentRoot(projectPath, \"\");\n //$NON-NLS-1$\n IPath root = env.addPackageFragmentRoot(projectPath, \"src\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n //$NON-NLS-1$\n env.setOutputFolder(projectPath, \"bin\");\n IPath classTest1 = //$NON-NLS-1$ //$NON-NLS-2$\n env.addClass(//$NON-NLS-1$ //$NON-NLS-2$\n root, //$NON-NLS-1$ //$NON-NLS-2$\n \"p1\", //$NON-NLS-1$ //$NON-NLS-2$\n \"Test1\", //$NON-NLS-1$\n \"package p1;\\n\" + //$NON-NLS-1$\n \"public class Test1 extends Zork1 {}\");\n // not yet on the classpath\n //$NON-NLS-1$\n IPath src2Path = env.addFolder(projectPath, \"src2\");\n //$NON-NLS-1$\n IPath src2p1Path = env.addFolder(src2Path, \"p1\");\n //$NON-NLS-1$ //$NON-NLS-2$\n env.addFile(//$NON-NLS-1$ //$NON-NLS-2$\n src2p1Path, //$NON-NLS-1$ //$NON-NLS-2$\n \"Zork1.java\", //$NON-NLS-1$\n \"package p1;\\n\" + //$NON-NLS-1$\n \"public class Zork1 {}\");\n fullBuild();\n //$NON-NLS-1$ //$NON-NLS-2$\n expectingSpecificProblemFor(classTest1, new Problem(\"src\", \"Zork1 cannot be resolved to a type\", classTest1, 39, 44, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR));\n //----------------------------\n // Step 2\n //----------------------------\n //$NON-NLS-1$\n StringBuffer buffer = new StringBuffer(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n //$NON-NLS-1$\n buffer.append(\"<classpath>\\n\");\n //$NON-NLS-1$\n buffer.append(\" <classpathentry kind=\\\"src\\\" path=\\\"src\\\"/>\\n\");\n // add src2 on classpath through resource change //$NON-NLS-1$\n buffer.append(\" <classpathentry kind=\\\"src\\\" path=\\\"src2\\\"/>\\n\");\n String[] classlibs = Util.getJavaClassLibs();\n for (int i = 0; i < classlibs.length; i++) {\n //$NON-NLS-1$ //$NON-NLS-2$\n buffer.append(\" <classpathentry kind=\\\"lib\\\" path=\\\"\").append(classlibs[i]).append(\"\\\"/>\\n\");\n }\n //$NON-NLS-1$\n buffer.append(\" <classpathentry kind=\\\"output\\\" path=\\\"bin\\\"/>\\n\");\n //$NON-NLS-1$\n buffer.append(\"</classpath>\");\n boolean wasAutoBuilding = env.isAutoBuilding();\n try {\n // turn autobuild on\n env.setAutoBuilding(true);\n // write new .classpath, will trigger autobuild\n //$NON-NLS-1$\n env.addFile(projectPath, \".classpath\", buffer.toString());\n // ensures the builder did see the classpath change\n env.waitForAutoBuild();\n expectingNoProblems();\n } finally {\n env.setAutoBuilding(wasAutoBuilding);\n }\n }", "public List<ThreePP> mavenDepToThreePP(File mavenDepFile) throws IOException {\n List<String> lines = Files.readLines(mavenDepFile, Charset.defaultCharset());\n List<ThreePP> threePPs = new ArrayList<ThreePP>();\n for(String line : lines){\n if(line.contains(\"ericsson\")){\n continue;\n }\n String[] mavenCoord = line.split(\":\", 3);\n if(mavenCoord.length!=3){\n throw new IllegalArgumentException(\"Maven dependency: \"+line+\" does not fit normal maven coordinate format ({VENDOR):{ARTIFACT}:{VERSION})\");\n }\n ThreePP threePP = createThreePP(mavenCoord);\n threePPs.add(threePP);\n }\n return threePPs;\n }", "static private URLClassLoader separateClassLoader(URL[] classpath) throws Exception {\n\t\treturn new URLClassLoader(classpath, ClassLoader.getSystemClassLoader().getParent());\r\n\t}", "private void create(String[] dependencies) throws ThinklabClientException {\r\n \t\tif (dependencies == null) {\r\n \t\t\tString dps = Configuration.getProperties().getProperty(\r\n \t\t\t\t\t\"default.project.dependencies\",\r\n \t\t\t\t\t\"org.integratedmodelling.thinklab.core\");\r\n \t\t\t\r\n \t\t\tdependencies = dps.split(\",\");\r\n \t\t}\r\n \t\t\r\n \t\tFile plugdir = Configuration.getProjectDirectory(_id);\r\n \t\tcreateManifest(plugdir, dependencies);\r\n \t\t\r\n \t}", "public void setJdependClasspath(FileCollection jdependClasspath) {\n this.jdependClasspath = jdependClasspath;\n }", "protected StoryClassLoader createStoryClassLoader() throws MalformedURLException {\n return new StoryClassLoader(classpathElements());\n }", "private static void addArtifactPath( MavenProject project, Artifact artifact, List<String> list )\n throws DependencyResolutionRequiredException\n {\n String refId = getProjectReferenceId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );\n MavenProject refProject = (MavenProject) project.getProjectReferences().get( refId );\n\n boolean projectDirFound = false;\n if ( refProject != null )\n {\n if ( artifact.getType().equals( \"test-jar\" ) )\n {\n File testOutputDir = new File( refProject.getBuild().getTestOutputDirectory() );\n if ( testOutputDir.exists() )\n {\n list.add( testOutputDir.getAbsolutePath() );\n projectDirFound = true;\n }\n }\n else\n {\n list.add( refProject.getBuild().getOutputDirectory() );\n projectDirFound = true;\n }\n }\n if ( !projectDirFound )\n {\n File file = artifact.getFile();\n if ( file == null )\n {\n throw new DependencyResolutionRequiredException( artifact );\n }\n list.add( file.getPath() );\n }\n }", "private void buildClassPath() throws InterruptedException, IOException, CheckedAnalysisException {\n IClassPathBuilder builder = classFactory.createClassPathBuilder(bugReporter);\n\n for (String path : project.getFileArray()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), true);\n }\n for (String path : project.getAuxClasspathEntryList()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), false);\n }\n\n builder.scanNestedArchives(analysisOptions.scanNestedArchives);\n\n builder.build(classPath, progress);\n\n appClassList = builder.getAppClassList();\n\n if (PROGRESS) {\n System.out.println(appClassList.size() + \" classes scanned\");\n }\n\n // If any of the application codebases contain source code,\n // add them to the source path.\n // Also, use the last modified time of application codebases\n // to set the project timestamp.\n for (Iterator<? extends ICodeBase> i = classPath.appCodeBaseIterator(); i.hasNext();) {\n ICodeBase appCodeBase = i.next();\n\n if (appCodeBase.containsSourceFiles()) {\n String pathName = appCodeBase.getPathName();\n if (pathName != null) {\n project.addSourceDir(pathName);\n }\n }\n\n project.addTimestamp(appCodeBase.getLastModifiedTime());\n }\n\n }", "public String getClasspath() {\n return classpath;\n }", "public interface ClasspathComponent {\r\n\r\n /**\r\n * Find a class by name within thsi classpath component.\r\n * @param className the name of the class\r\n * @return the <tt>FindResult</tt> object. <tt>null</tt> if no class could be found.\r\n */\r\n public FindResult findClass(String className);\r\n\r\n /**\r\n * Merge all classes in this classpath component into the supplied tree.\r\n * @param model the tree model.\r\n * @param reset whether this is an incremental operation or part of a reset.\r\n * For a reset, no change events will be fired on the tree model.\r\n */\r\n public void mergeClassesIntoTree(DefaultTreeModel model, boolean reset);\r\n\r\n /**\r\n * Add a <tt>ClasspathChangeListener</tt>.\r\n * @param listener the listener\r\n */\r\n public void addClasspathChangeListener(ClasspathChangeListener listener);\r\n\r\n /**\r\n * Remove a <tt>ClasspathChangeListener</tt>.\r\n * @param listener the listener\r\n */\r\n public void removeClasspathChangeListener(ClasspathChangeListener listener);\r\n}", "private ClassLoader createBootClassLoader(ClassLoader hostClassLoader) throws MojoExecutionException {\n \n Set<URL> bootClassPath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-test-runtime\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\");\n return new URLClassLoader(bootClassPath.toArray(new URL[] {}), hostClassLoader);\n \n }", "Set<Path> getDependencies();", "private static String getVersionFromPom() {\n\n final String absolutePath = new File(BuildVersion.class.getResource(BuildVersion.class\n .getSimpleName() + \".class\").getPath())\n .getParentFile().getParentFile().getParentFile().getParentFile().getParentFile()\n .getParentFile().getParentFile().getAbsolutePath();\n\n final File file = new File(absolutePath + \"/pom.xml\");\n\n try (InputStreamReader reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)) {\n\n final MavenXpp3Reader xpp3Reader = new MavenXpp3Reader();\n Model model = xpp3Reader.read(reader);\n return model.getVersion();\n\n } catch (NoClassDefFoundError e) {\n // if you want to get the version possibly in development add in to your pom\n // pax-url-aether.jar\n return null;\n } catch (Exception e) {\n return null;\n }\n }", "public static void generatePropertyVersionSection(Path folder) throws JDOMException, IOException {\n String pomPath = Paths.get(folder.toString(), MainRunner.POM_XML).toString();\n Document documentFromFile = XmlUtils.getDocumentFromFile(pomPath);\n Element rootElement = documentFromFile.getRootElement();\n Optional<Element> properties = rootElement.getContent(new ElementFilter(\"properties\")).stream().findFirst();\n if (!properties.isPresent()) {\n List<Element> dependencyList = rootElement.getContent(new ElementFilter(\"dependencies\")).get(0).getChildren();\n System.out.println();\n Map<String, Map<String, List<Artifact>>> versions = new HashMap<>();\n Map<Artifact, Element> artifactElementMap = new HashMap<>();\n dependencyList.stream().forEach(element -> {\n String version = XmlUtils.getTagValue(element, \"version\");\n Map<String, List<Artifact>> map = versions.get(version) == null ? new HashMap<>() : versions.get(version);\n String classifier = XmlUtils.getTagValue(element, \"classifier\");\n String groupId1 = XmlUtils.getTagValue(element, \"groupId\");\n String scope = XmlUtils.getTagValue(element, \"scope\");\n Artifact artifact = new Artifact(groupId1, XmlUtils.getTagValue(element, \"artifactId\"), version, classifier, scope);\n artifactElementMap.put(artifact, element);\n boolean groupFound = false;\n if (map.isEmpty()) {\n ArrayList<Artifact> value = new ArrayList<>();\n value.add(artifact);\n map.put(groupId1, value);\n } else {\n if (!map.isEmpty()) {\n for (String groupId : map.keySet()) {\n if (map.get(groupId).get(0).getGroupId().equalsIgnoreCase(groupId1)) {\n groupFound = true;\n map.get(groupId).add(artifact);\n }\n }\n if (!groupFound) {\n ArrayList<Artifact> value = new ArrayList<>();\n value.add(artifact);\n map.put(groupId1, value);\n }\n }\n }\n versions.put(version, map);\n });\n\n\n StringBuffer propertiesBuffer = new StringBuffer(\"<properties>\\n\");\n Set<String> groupIds = new HashSet<>();\n for (Map.Entry<String, Map<String, List<Artifact>>> entries : versions.entrySet()) {\n String versionValue = entries.getKey();\n Map<String, List<Artifact>> value = entries.getValue();\n for (Map.Entry<String, List<Artifact>> groupsMap : value.entrySet()) {\n String groupId = groupsMap.getValue().get(0).getGroupId();\n int i =1;\n while (groupIds.contains(groupId)) {\n groupId = groupId + (i + 1);\n System.out.println(groupId);\n }\n String shortVersionString = groupId + \".version\";\n String versionString = \"${\" + shortVersionString + \"}\";\n propertiesBuffer.append(\"<\").append(shortVersionString).append(\">\").append(versionValue).append(\"</\").append(shortVersionString).append(\">\\r\\n\");\n for (Artifact artifact : groupsMap.getValue()) {\n artifactElementMap.get(artifact).getContent(new ElementFilter(\"version\")).get(0).setText(versionString);\n }\n if (!groupIds.contains(groupId)) {\n groupIds.add(groupId);\n } else {\n System.out.println(\"AHTUNG!!!! ERROR!!!! 2 group ids found\");\n throw new IllegalArgumentException(\"2 equal group ids found\");\n }\n }\n }\n propertiesBuffer.append(\"</properties>\");\n System.out.println(propertiesBuffer.toString());\n //Element versionElement = rootElement.getContent(new ElementFilter(\"version\")).stream().findFirst().get();\n XmlUtils.addElement(propertiesBuffer.toString(), rootElement, new ElementExistCondition(), new AfterChildInserter(\"artifactId\"), \"\");\n XmlUtils.updateNameSpaceParent(rootElement, \"properties\");\n XmlUtils.outputDoc(documentFromFile, Paths.get(folder.toString(), MainRunner.POM_XML).toString());\n }\n }", "public void testGetClassPath() {\n assertEquals(mb.getClassPath(), System.getProperty(\"java.class.path\"));\n }", "@Override\n public Set<String> getLibraryClassPath() {\n return Collections.emptySet();\n }", "public static void main(String[] args) throws Exception{\r\n\t\t\r\n\t\tString line;\r\n\t\t//Scanner scan = new Scanner(System.in);\r\n\r\n\t\tProcess process = Runtime.getRuntime ().exec(\"cmd.exe /c mvn clean install com.jaxio.celerio:bootstrap-maven-plugin:bootstrap\",null,\r\n\t\t\t\tnew File(\"C:\\\\AutoCodeGeneration\\\\ivu.apie.database\\\\ivu.apie.database\"));\r\n\t\tOutputStream stdin = process.getOutputStream ();\r\n\t\tInputStream stderr = process.getErrorStream ();\r\n\t\tInputStream stdout = process.getInputStream ();\r\n\r\n\t\tBufferedReader reader = new BufferedReader (new InputStreamReader(stdout));\r\n\t\tBufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin));\r\n\r\n\t\tString input = \"2\";//scan.nextLine();\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.flush();\r\n\r\n\t\tinput = \"4\";\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.flush();\r\n\r\n\t\t/*\r\n\t\t * while ((line = reader.readLine ()) != null) { System.out.println (\"Stdout: \"\r\n\t\t * + line); }\r\n\t\t */\r\n\r\n\t\tinput = \"auto\";\r\n\t\t//input = \"vvvvvv\";\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.flush();\r\n\t\t\r\n\t\tinput = \"com.jaxio.auto\";\r\n\t\t//input = \"package_name\";\r\n\t\tinput += \"\\n\";\r\n\t\twriter.write(input);\r\n\t\twriter.close();\r\n\r\n\t\twhile ((line = reader.readLine ()) != null) {\r\n\t\tSystem.out.println (\"Stdout: \" + line);\r\n\t\t}\r\n\t}", "@Before\n public void setUp() {\n configuration.resolveAdditionalDependenciesFromClassPath(false);\n }", "Set<String> getDependencies();", "public boolean addClasspathElements(final String pathStr, final ClassLoader classLoader, final LogNode log) {\n if (pathStr == null || pathStr.isEmpty()) {\n return false;\n } else {\n for (final String pathElement : pathStr.split(File.pathSeparator)) {\n addClasspathElement(pathElement, classLoader, log);\n }\n return true;\n }\n }", "CdapLoadArtifactWithConfigStep createCdapLoadArtifactWithConfigStep();", "public void execute() throws MojoExecutionException, MojoFailureException {\n checkConfiguration();\n\n String mode;\n String[] bindings;\n String[] classpaths;\n\n if (\"pom\".equalsIgnoreCase(project.getPackaging()))\n {\n getLog().info(\"Not running JiBX binding compiler for pom packaging\");\n \treturn;\t\t// Don't bind jibx if pom packaging\n }\n \n if (isMultiModuleMode()) {\n if (isRestrictedMultiModuleMode()) {\n mode = \"restricted multi-module\";\n } else {\n mode = \"multi-module\";\n }\n bindings = getMultiModuleBindings();\n classpaths = getMultiModuleClasspaths();\n } else {\n mode = \"single-module\";\n bindings = getSingleModuleBindings();\n classpaths = getSingleModuleClasspaths();\n }\n\n if (interfaceClassNames.size() == 0) {\n getLog().info(\"Not running JiBX2WSDL (\" + mode + \" mode) - no class interface files\");\n } else {\n getLog().info(\"Running JiBX binding compiler (\" + mode + \" mode) on \" + interfaceClassNames.size()\n + \" interface file(s)\");\n \n try {\n java.util.List<String> args = new Vector<String>();\n\n for (int i = 0; i< classpaths.length; i++)\n {\n args.add(\"-p\");\n \targs.add(classpaths[i]);\n }\n \n args.add(\"-t\");\n args.add(outputDirectory);\n \n if (customizations.size() > 0) {\n args.add(\"-c\");\n for (String customization : customizations) {\n args.add(customization);\n }\n }\n\n for (Map.Entry<String,String> entry : options.entrySet()) {\n String option = \"--\" + entry.getKey() + \"=\" + entry.getValue();\n if ((entry.getKey().toString().length() == 1) && (Character.isLowerCase(entry.getKey().toString().charAt(0))))\n {\n \tgetLog().debug(\"Adding option : -\" + entry.getKey() + \" \" + entry.getValue());\n \targs.add(\"-\" + entry.getKey());\n \targs.add(entry.getValue());\n }\n else\n {\n \t getLog().debug(\"Adding option: \" + option);\n \t args.add(option);\n }\n }\n if (bindings.length > 0)\n {\n args.add(\"-u\");\n StringBuilder arg = new StringBuilder();\n \tfor (int i = 0 ; i < bindings.length; i++)\n \t{\n \t\tif (arg.length() > 0)\n \t\t\targ.append(';');\n \t\targ.append(bindings[i]);\n \t}\n \targs.add(arg.toString());\n }\n \n if (this.sourceDirectories.size() > 0)\n if (this.sourceDirectories.get(0) != null)\n if (this.sourceDirectories.get(0).toString().length() > 0)\n {\n args.add(\"-s\");\n StringBuilder arg = new StringBuilder();\n \tfor (int i = 0 ; i < sourceDirectories.size(); i++)\n \t{\n \t\tif (arg.length() > 0)\n \t\t\targ.append(';');\n \t\targ.append(sourceDirectories.get(i).toString());\n \t}\n \targs.add(arg.toString()); \t\n }\n if (verbose)\n args.add(\"-v\");\n\n for (String interfaceName : interfaceClassNames)\n {\n \targs.add(interfaceName);\n }\n\n Jibx2Wsdl.main((String[]) args.toArray(new String[args.size()]));\n\t \n } catch (JiBXException e) {\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t\n\t }\n }", "public List<File> getClasspathElements() {\n\t\tthis.parseSystemClasspath();\n\t return classpathElements;\n\t}", "private void addClasspathElement(final ClasspathRelativePath classpathEltPath, final LogNode log) {\n if (rawClasspathElementsSet.add(classpathEltPath)) {\n rawClasspathElements.add(classpathEltPath);\n if (log != null) {\n log.log(\"Found classpath element: \" + classpathEltPath);\n }\n } else {\n if (log != null) {\n log.log(\"Ignoring duplicate classpath element: \" + classpathEltPath);\n }\n }\n }", "public void addClassPath(String path) {\r\n throw new RuntimeException(\"Cannot add classpath : \"+path);\r\n }", "private Document getDocumentInClassPath()throws Exception{\r\n\t\t\r\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\r\n\t\t\r\n\t\tDocument doc = builder.parse(ServiceLoader.class.getResourceAsStream(\"/\"+FILE_NAME));\r\n\t\t\r\n\t\treturn doc;\r\n\t}", "public NestedSet<Artifact> bootclasspath() {\n return bootclasspath;\n }", "public void testNewClassPathImplementation() throws Exception {\n\n\t\t// Create the source\n\t\tStringWriter buffer = new StringWriter();\n\t\tPrintWriter source = new PrintWriter(buffer);\n\t\tsource.println(\"package net.officefloor.test;\");\n\t\tsource.println(\"public class ExtraImpl extends \" + CLASS_LOADER_EXTRA_CLASS_NAME + \" {\");\n\t\tsource.println(\" public String getMessage() {\");\n\t\tsource.println(\" return \\\"TEST\\\";\");\n\t\tsource.println(\" }\");\n\t\tsource.println(\"}\");\n\t\tsource.flush();\n\n\t\t// Override compiler with extra class path\n\t\tURLClassLoader extraClassLoader = (URLClassLoader) createNewClassLoader();\n\t\tClassLoader classLoader = new URLClassLoader(extraClassLoader.getURLs()) {\n\t\t\t@Override\n\t\t\tpublic Class<?> loadClass(String name) throws ClassNotFoundException {\n\t\t\t\tif (OfficeFloorJavaCompilerImpl.class.getName().equals(name)) {\n\t\t\t\t\treturn OfficeFloorJavaCompilerImpl.class;\n\t\t\t\t} else {\n\t\t\t\t\treturn extraClassLoader.loadClass(name);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tthis.compiler = OfficeFloorJavaCompiler.newInstance(getSourceContext(classLoader));\n\n\t\t// Compile the source\n\t\tJavaSource javaSource = this.compiler.addSource(\"net.officefloor.test.ExtraImpl\", buffer.toString());\n\t\tClass<?> clazz;\n\t\ttry {\n\t\t\tclazz = javaSource.compile();\n\t\t} catch (CompileError error) {\n\n\t\t\t// Maven + Java8 has class path issues in running Lombok\n\t\t\tif (!new ModulesJavaFacet().isSupported()) {\n\t\t\t\tSystem.err.println(\"KNOWN GOTCHA: \" + this.getClass().getSimpleName()\n\t\t\t\t\t\t+ \" new class path on Java8 with Maven is having Lombok issues\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Propagate failure\n\t\t\tthrow error;\n\t\t}\n\n\t\t// Ensure appropriate compile to extra class\n\t\tObject object = clazz.getConstructor().newInstance();\n\t\tassertEquals(\"Incorrect parent class from class path\", CLASS_LOADER_EXTRA_CLASS_NAME,\n\t\t\t\tobject.getClass().getSuperclass().getName());\n\t}", "public List<URL> getUrlsForCurrentClasspath() {\r\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\r\n\r\n //is URLClassLoader?\r\n if (loader instanceof URLClassLoader) {\r\n return ImmutableList.of(((URLClassLoader) loader).getURLs());\r\n }\r\n\r\n List<URL> urls = Lists.newArrayList();\r\n\r\n //get from java.class.path\r\n String javaClassPath = System.getProperty(\"java.class.path\");\r\n if (javaClassPath != null) {\r\n\r\n for (String path : javaClassPath.split(File.pathSeparator)) {\r\n try {\r\n urls.add(new File(path).toURI().toURL());\r\n } catch (Exception e) {\r\n throw new ReflectionsException(\"could not create url from \" + path, e);\r\n }\r\n }\r\n }\r\n\r\n return urls;\r\n }", "public interface ContributionLoader {\n\n /**\n * Performs the load operation. This includes resolution of dependent contributions if necessary, and constructing a\n * classloader with access to resources contained in and required by the contribution.\n *\n * @param contribution the contribution to load\n * @return the classloader with access to the contribution and dependent resources\n * @throws ContributionLoadException if an error occurs during load\n * @throws MatchingExportNotFoundException\n * if matching export could not be found\n */\n ClassLoader loadContribution(Contribution contribution)\n throws ContributionLoadException, MatchingExportNotFoundException;\n}", "private List<String> copyDependencies(File javaDirectory) throws MojoExecutionException {\n ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();\n\n List<String> list = new ArrayList<String>();\n\n // First, copy the project's own artifact\n File artifactFile = project.getArtifact().getFile();\n list.add(layout.pathOf(project.getArtifact()));\n\n try {\n FileUtils.copyFile(artifactFile, new File(javaDirectory, layout.pathOf(project.getArtifact())));\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy artifact file \" + artifactFile + \" to \" + javaDirectory, ex);\n }\n\n if (excludeDependencies) {\n // skip adding dependencies from project.getArtifacts()\n return list;\n }\n\n for (Artifact artifact : project.getArtifacts()) {\n File file = artifact.getFile();\n File dest = new File(javaDirectory, layout.pathOf(artifact));\n\n getLog().debug(\"Adding \" + file);\n\n try {\n FileUtils.copyFile(file, dest);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + file + \" into \" + javaDirectory, ex);\n }\n\n list.add(layout.pathOf(artifact));\n }\n\n return list;\n }", "private List<String> buildCommandLine()\n {\n List<String> commandLine = new ArrayList<String>();\n\n if (executable == null)\n {\n throw new CargoException(\"Java executable not set\");\n }\n commandLine.add(executable);\n\n commandLine.addAll(jvmArguments);\n commandLine.addAll(systemProperties);\n\n if (classpath != null && jarPath == null)\n {\n commandLine.add(\"-classpath\");\n commandLine.add(classpath);\n }\n\n if (jarPath != null)\n {\n commandLine.add(\"-jar\");\n commandLine.add(jarPath);\n }\n\n if (jarPath == null)\n {\n commandLine.add(mainClass);\n }\n commandLine.addAll(applicationArguments);\n\n return commandLine;\n }", "public String getPomPath() {\n return pomPath == null ? getProductionDir() + \"/pom.xml\" : pomPath;\n }", "public ARoot dependency(String mavenDependency) {\r\n \tString[] parts = mavenDependency.split(\":\");\r\n \tString group = get(0,parts);\r\n \tString artifactId = get(1,parts);\r\n \tString classifier = get(2,parts);\r\n \tString extension = get(3,parts);\r\n \t\r\n \tdependency(group, artifactId, classifier, extension);\r\n \treturn this;\r\n }", "public void logClassPath() {\n\n log.info(\"Classpath of JVM on \" + HostUtils.getLocalHostIP() + \": \\n\" + getClassPathDescription());\n }", "private URL[] getKnownJars(File libDir, String[] jars, boolean isForUserVM, int numBuildJars) \n throws MalformedURLException\n {\n boolean useClassesDir = commandLineProps.getProperty(\"useclassesdir\", \"false\").equals(\"true\");\n \n // by default, we require all our known jars to be present\n int startJar = 0;\n ArrayList<URL> urlList = new ArrayList<>();\n\n // a hack to let BlueJ run from within Eclipse.\n // If specified on command line, lets add a ../classes\n // directory to the classpath (where Eclipse stores the\n // .class files)\n if (numBuildJars != 0 && useClassesDir) {\n File classesDir = new File(libDir.getParentFile(), \"classes\");\n \n if (classesDir.isDirectory()) {\n urlList.add(classesDir.toURI().toURL());\n urlList.add(new File(libDir.getParentFile(), \"threadchecker/classes\").toURI().toURL());\n if (isGreenfoot) {\n String gfClassesDir = commandLineProps.getProperty(\"greenfootclassesdir\");\n if (gfClassesDir != null) {\n classesDir = new File(gfClassesDir);\n urlList.add(classesDir.toURI().toURL());\n }\n }\n \n // skip over requiring bluejcore.jar, bluejeditor.jar etc.\n startJar = numBuildJars;\n }\n }\n\n for (int i=startJar; i < jars.length; i++) {\n File toAdd = new File(libDir, jars[i]);\n \n // No need to throw exception at this point; we will get\n // a ClassNotFoundException or similar if there is really a\n // problem.\n //if (!toAdd.canRead())\n // throw new IllegalStateException(\"required jar is missing or unreadable: \" + toAdd);\n\n if (toAdd.canRead())\n urlList.add(toAdd.toURI().toURL());\n }\n \n if (isForUserVM)\n {\n // Only need to specially add JavaFX for the user VM, it will\n // already be on classpath for server VM:\n urlList.addAll(Arrays.asList(getJavaFXClassPath()));\n }\n return (URL[]) urlList.toArray(new URL[0]);\n }", "public interface IClassPath {\n /**\n * Add a codebase. The object will be interrogated to determine whether it\n * is an application codebase or an auxiliary codebase. Application\n * codebases must be scannable.\n *\n * @param codeBase\n * the codebase to add\n */\n public void addCodeBase(ICodeBase codeBase);\n\n /**\n * Return an iterator over the application codebases.\n *\n * @return iterator over the application codebases\n */\n public Iterator<? extends ICodeBase> appCodeBaseIterator();\n\n /**\n * Return an iterator over the auxiliary codebases.\n *\n * @return iterator over the auxiliary codebases\n */\n public Iterator<? extends ICodeBase> auxCodeBaseIterator();\n\n /**\n * Lookup a resource by name.\n *\n * @param resourceName\n * name of the resource to look up\n * @return ICodeBaseEntry representing the resource\n * @throws ResourceNotFoundException\n * if the resource is not found\n */\n public ICodeBaseEntry lookupResource(String resourceName) throws ResourceNotFoundException;\n\n /**\n * Add a resource name to codebase entry mapping. Once this is done, future\n * lookups of this resource will automatically resolve to the given codebase\n * entry.\n *\n * @param resourceName\n * the resource name to map\n * @param codeBaseEntry\n * the codebase entry to use for this resource\n */\n public void mapResourceNameToCodeBaseEntry(String resourceName, ICodeBaseEntry codeBaseEntry);\n\n /**\n * Close all of the code bases that are part of this class path. This should\n * be done once the client is finished with the classpath.\n */\n public void close();\n\n /**\n * Returns all of the application code base entries that are part of this class path.\n *\n * @return map where the key is slashed (VM) class name with \".class\" suffix\n */\n public Map<String, ICodeBaseEntry> getApplicationCodebaseEntries();\n\n}", "public com.google.protobuf.ProtocolStringList\n getClasspathList() {\n return classpath_;\n }" ]
[ "0.5754464", "0.5279999", "0.5209676", "0.51966554", "0.51369286", "0.51016533", "0.50679505", "0.50615567", "0.50220495", "0.49898273", "0.49110362", "0.4898395", "0.48209417", "0.4749212", "0.47363847", "0.472018", "0.47091243", "0.47046068", "0.4696638", "0.46718824", "0.4648857", "0.46443164", "0.45653513", "0.45409414", "0.45101213", "0.44938233", "0.44868615", "0.44769013", "0.44681814", "0.44375247", "0.44307262", "0.44233713", "0.4397741", "0.43963408", "0.4395644", "0.4386817", "0.43757564", "0.43680757", "0.4330823", "0.4329187", "0.43259454", "0.43154967", "0.43149891", "0.42954278", "0.42929876", "0.4249528", "0.42446634", "0.42442933", "0.4220579", "0.42122096", "0.4207281", "0.4201665", "0.41885126", "0.41819063", "0.4181167", "0.41802552", "0.4169105", "0.41668186", "0.41650775", "0.41636756", "0.41629812", "0.41621977", "0.4155814", "0.41399524", "0.41375256", "0.41262612", "0.41208455", "0.4120488", "0.4116591", "0.41128045", "0.4112354", "0.41091007", "0.41081423", "0.4098923", "0.4098295", "0.40960544", "0.4096007", "0.4078219", "0.4074432", "0.40669677", "0.4062718", "0.40616164", "0.40615398", "0.40515116", "0.40474233", "0.40443724", "0.4037402", "0.40175578", "0.40122712", "0.40114316", "0.40081158", "0.40069473", "0.40010777", "0.3988987", "0.39870283", "0.39735627", "0.39646694", "0.39448476", "0.39429253", "0.39408043" ]
0.44690198
28
Returns the fully qualified path to an ear file int the artifact list.
public static File getEarFileName( final Set inArtifacts ) { if ( inArtifacts == null || inArtifacts.isEmpty() ) { throw new IllegalArgumentException( "EAR not found in artifact list." ); } final Iterator iter = inArtifacts.iterator(); while ( iter.hasNext() ) { Artifact artifact = (Artifact) iter.next(); if ( "ear".equals( artifact.getType() ) ) { return artifact.getFile(); } } throw new IllegalArgumentException( "EAR not found in artifact list." ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static File getEjbJarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ejb\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }", "public String getAbsPath();", "java.lang.String getArtifactUrl();", "public String getBundleFileName()\n {\n if ( bundleFileName == null )\n {\n bundleFileName = artifact.getFile().getName();\n }\n return bundleFileName;\n }", "public String getArtifact() {\n return artifact;\n }", "public static File getWarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"war\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}", "private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}", "Path getArtifact(String identifier);", "public String getJarLocation();", "public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "java.lang.String getArtifactId();", "public static File getWarFileName( final Set inArtifacts, String fileName )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n\n if ( \"war\".equals( artifact.getType() ) && artifact.getFile().getName().contains( fileName ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "private static String getJarFilePath() throws URISyntaxException, UnsupportedEncodingException {\n\n\t\tFile jarFile;\n\n\t\t// if (codeSource.getLocation() != null) {\n\t\t// jarFile = new File(codeSource.getLocation().toURI());\n\t\t// } else {\n\t\tString path = ConfigurationLocator.class.getResource(ConfigurationLocator.class.getSimpleName() + \".class\")\n\t\t\t\t.getPath();\n\t\tString jarFilePath = path.substring(path.indexOf(\":\") + 1, path.indexOf(\"!\"));\n\t\tjarFilePath = URLDecoder.decode(jarFilePath, \"UTF-8\");\n\t\tjarFile = new File(jarFilePath);\n\t\t// }\n\t\treturn jarFile.getParentFile().getAbsolutePath();\n\t}", "default String getArtifactId() {\n return getIdentifier().getArtifactId();\n }", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "private Artifact getArtifactFromReactor(Artifact artifact) {\n\t\t// check project dependencies first off\n\t\tfor (Artifact a : (Set<Artifact>) project.getArtifacts()) {\n\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\n\t\t// check reactor projects\n\t\tfor (MavenProject p : reactorProjects == null ? Collections.<MavenProject> emptyList() : reactorProjects) {\n\t\t\t// check the main artifact\n\t\t\tif (equals(artifact, p.getArtifact()) && hasFile(p.getArtifact())) {\n\t\t\t\treturn p.getArtifact();\n\t\t\t}\n\n\t\t\t// check any side artifacts\n\t\t\tfor (Artifact a : (List<Artifact>) p.getAttachedArtifacts()) {\n\t\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// not available\n\t\treturn null;\n\t}", "private File getArtifactFile(Artifact artifactQuery)\n\t\t\tthrows MojoExecutionException {\n\n\t\tArtifactRequest request = new ArtifactRequest(artifactQuery,\n\t\t\t\tprojectRepos, null);\n\t\tList<ArtifactRequest> arts = new ArrayList<ArtifactRequest>();\n\t\tarts.add(request);\n\t\ttry {\n\t\t\tArtifactResult a = repoSystem.resolveArtifact(repoSession, request);\n\t\t\treturn a.getArtifact().getFile();\n\t\t} catch (ArtifactResolutionException e) {\n\t\t\tthrow new MojoExecutionException(\n\t\t\t\t\t\"could not resolve artifact to compare with\", e);\n\t\t}\n\n\t}", "@Override\r\n public String getProjectPath() {\r\n \treturn String.format(\":%s\", getArtifactId());\r\n }", "java.lang.String getArtifactStorage();", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String getArtifactId();", "Path getMainCatalogueFilePath();", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getArtifactS3Location() {\n return this.artifactS3Location;\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public String getArtifactId()\n {\n return artifactId;\n }", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }", "public String getArtifactId() {\n\t\treturn this.artifactId;\n\t}", "String getExternalPath(String path);", "public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();", "public List<ApplicationArtifact> artifacts() {\n return this.artifacts;\n }", "@JsonIgnore\n\tpublic String getAbsoluteURI() {\n\t\treturn path.toUri().toString();\n\t}", "java.lang.String getFilePath();", "private static void addArtifactPath( MavenProject project, Artifact artifact, List<String> list )\n throws DependencyResolutionRequiredException\n {\n String refId = getProjectReferenceId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );\n MavenProject refProject = (MavenProject) project.getProjectReferences().get( refId );\n\n boolean projectDirFound = false;\n if ( refProject != null )\n {\n if ( artifact.getType().equals( \"test-jar\" ) )\n {\n File testOutputDir = new File( refProject.getBuild().getTestOutputDirectory() );\n if ( testOutputDir.exists() )\n {\n list.add( testOutputDir.getAbsolutePath() );\n projectDirFound = true;\n }\n }\n else\n {\n list.add( refProject.getBuild().getOutputDirectory() );\n projectDirFound = true;\n }\n }\n if ( !projectDirFound )\n {\n File file = artifact.getFile();\n if ( file == null )\n {\n throw new DependencyResolutionRequiredException( artifact );\n }\n list.add( file.getPath() );\n }\n }", "public String resolvePath();", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "com.google.protobuf.ByteString\n getArtifactUrlBytes();", "public DependencyResolver getArtifactResolver() {\n return artifactResolver;\n }", "Path getModBookFilePath();", "public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "private File getLastArtifact() throws MojoExecutionException {\n\t\torg.eclipse.aether.version.Version v = getLastVersion();\n\t\tif (v == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArtifact artifactQuery = new DefaultArtifact(groupId.concat(\":\")\n\t\t\t\t.concat(name).concat(\":\").concat(v.toString()));\n\t\tgetLog().debug(\n\t\t\t\tString.format(\"looking for artifact %s\",\n\t\t\t\t\t\tartifactQuery.toString()));\n\t\treturn getArtifactFile(artifactQuery);\n\n\t}", "public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}", "public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }", "public String getPath() {\n\t\treturn file.getPath();\n\t}", "@Nullable\n public static String getRelativePath(String filepath) {\n return StringUtils.replace(StringUtils.substringAfter(filepath, StringUtils.substringBefore(\n filepath, \"\\\\\" + DEF_LOC_ARTIFACT)), \"\\\\\", \"/\");\n }", "String getFilepath();", "private FileObject findServiceArchiveForName(String appName) throws FileSystemException {\n List<FileObject> serviceArchives\n = Utils.findChildrenWithSuffix(deploymentDirectoryFile,\n com.stratuscom.harvester.Strings.JAR);\n //Then find the one that starts with the client name\n for (FileObject fo : serviceArchives) {\n if (fo.getName().getBaseName().startsWith(appName + com.stratuscom.harvester.Strings.DASH)) {\n return fo;\n }\n }\n return null;\n }", "public static String getEmailAttachmentsPath() {\n\t\t//return \"d:\\\\PBC\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace\";\n\t\t\n\t}", "public String getFilePath(Extension extension) {\n\t\treturn extension.eResource().getURI().toString();\n\t}", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "public String getPath();", "public String getPath();", "public String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getSubtitlesFileListPath() {\r\n\t\tif(isExistSubtitlesFileList())\r\n\t\t\treturn ArrayUtils.toStringComma(getSubtitlesFileList());\r\n\t\treturn \"\";\r\n\t}", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getFileName()\n {\n return getJarfileName();\n }", "public String getArtworkFilename(MediaFileType type) {\n List<MediaFile> artworks = getMediaFiles(type);\n if (!artworks.isEmpty()) {\n return artworks.get(0).getFile().toString();\n }\n return \"\";\n }", "Path getVendorManagerFilePath();", "public static File getJarPath() throws URISyntaxException {\n\t\tFile jarPath = new File(Parser.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());\n\t\treturn jarPath.getParentFile();\n\t}", "public String getFullPath()\n {\n return( fullPath );\n }", "public String getLocationOfFiles() {\n\t\ttry {\n\t\t\tFile f = new File(\n\t\t\t\t\tgetRepositoryManager().getMetadataRecordsLocation() + \"/\" + getFormatOfRecords() + \"/\" + getKey());\n\t\t\treturn f.getAbsolutePath();\n\t\t} catch (Throwable e) {\n\t\t\tprtlnErr(\"Unable to get location of files: \" + e);\n\t\t\treturn \"\";\n\t\t}\n\t}", "public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFile() {\n return \"null\"; // getFileTopic().getCompositeValue().getTopic(FILE_PATH);\n }", "public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }", "@objid (\"d1a8268b-dff5-4398-936a-ef1cb1e69102\")\n public static File getBundleFile(final String relPath) throws IOException {\n try {\n URL url = FileLocator.find(Audit.context.getBundle(), new Path(relPath), null);\n URL fileUrl = FileLocator.toFileURL(url);\n return new File(URIUtil.toURI(fileUrl));\n } catch (IOException | URISyntaxException | RuntimeException e) {\n throw new IOException(\"'\" + relPath + \"' not found in plugin.\", e);\n }\n }", "@Override\n\t\tpublic List<String> getPathTo(InJarResourceImpl resource) {\n\t\t\t// TODO FD4SG la ligne ci-dessous est vraiment bizarre (getChildren renvoie une liste de RepositoryFolder alors que resource est\n\t\t\t// une ressource\n\t\t\tif (!getRootFolder().getChildren().contains(resource)) {\n\t\t\t\tList<String> pathTo = new ArrayList<>();\n\t\t\t\tStringTokenizer string = new StringTokenizer(/*resource.getURI()*/resource.getEntry().getName(),\n\t\t\t\t\t\tCharacter.toString(ClasspathResourceLocatorImpl.PATH_SEP.toCharArray()[0]));\n\t\t\t\twhile (string.hasMoreTokens()) {\n\t\t\t\t\tString next = string.nextToken();\n\t\t\t\t\tif (string.hasMoreTokens()) {\n\t\t\t\t\t\tpathTo.add(next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn pathTo;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "String getApplicationContextPath();", "public org.eclipse.core.resources.IProject getEarProject() {\n \t\treturn earProject;\n \t}", "String getFilePath();", "public String getLocationPath();", "public String getResourcePath();", "public Path getHdfsPath() {\n\t\tif (containerId != null) {\n\t\t\treturn completeHdfsPath(new Path(hdfsApplicationDirectory, containerId));\n\t\t}\n\n\t\t// else, we should check if the file is an input file; if so, it can be found directly in the hdfs base directory\n\t\tPath basePath = completeHdfsPath(hdfsBaseDirectory);\n\t\ttry {\n\t\t\tif (hdfs.exists(basePath)) {\n\t\t\t\treturn basePath;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\n\t\t// otherwise, it is fair to assume that the file will be found in the application's folder\n\t\treturn completeHdfsPath(hdfsApplicationDirectory);\n\t}", "public String getPathAsString() {\n if (list.isEmpty()) {\n return \"\";\n }\n StringBuilder buf = new StringBuilder();\n\n for (String dir : list) {\n buf.append(dir);\n buf.append(pathSeparator());\n }\n return buf.substring(0, buf.length() - 1); // remove the trailing pathSeparator...\n }", "java.lang.String getSrcPath();", "com.google.protobuf.ByteString\n getArtifactIdBytes();", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "public String getExtResLocation(){\n\t\treturn extResLocation;\n\t}", "String artifactSourceId();", "@Override\n public List<BazelPublishArtifact> getBazelArtifacts(AspectRunner aspectRunner, Project project, Task bazelExecTask) {\n final File outputArtifactFolder = super.getBazelArtifacts(aspectRunner, project, bazelExecTask).get(0).getFile().getParentFile();\n final File aarOutputFile = new File(outputArtifactFolder, mConfig.targetName + \".aar\");\n return Collections.singletonList(new BazelPublishArtifact(bazelExecTask, aarOutputFile));\n }", "public abstract String getFullPath();", "public static String getJarPath() {\n String classPath = \"/\" + JavaUtils.class.getName();\n classPath = classPath.replace(\".\", \"/\") + \".class\";\n try {\n URL url = JavaUtils.class.getResource(classPath);\n String path = URLDecoder.decode(url.getPath(), \"UTF-8\");\n path = URLDecoder.decode(new URL(path).getPath(), \"UTF-8\");\n int bang = path.indexOf(\"!\");\n if (bang >= 0) {\n path = path.substring(0, bang);\n }\n return path;\n } catch (Exception e) {\n ReportingUtils.logError(e, \"Unable to get path of jar\");\n return \"\";\n }\n }", "Path getDeliverableBookFilePath();", "public ArtifactConfigOutput getArtifactConfig() {\n return this.artifactConfig;\n }", "public String getRelativePath() {\n if (repository == null) {\n return name;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(name);\n return b.toString();\n }\n }", "String getFullWorkfileName();", "public abstract String getFileLocation();", "public String getAttributeFileLibPath();" ]
[ "0.62297684", "0.58536094", "0.57751745", "0.5775066", "0.5771678", "0.5769019", "0.5726163", "0.5685202", "0.5670272", "0.5656283", "0.5589651", "0.55872357", "0.5574761", "0.5553041", "0.5525258", "0.55248106", "0.550871", "0.5472406", "0.54612994", "0.5460296", "0.5455651", "0.5450617", "0.54438317", "0.54314846", "0.5388599", "0.5382105", "0.528983", "0.5287515", "0.52864516", "0.5253511", "0.5229226", "0.5223625", "0.51705205", "0.51593584", "0.51452374", "0.5134445", "0.51221085", "0.51219165", "0.51181424", "0.51162696", "0.5102688", "0.50915784", "0.5090689", "0.5087877", "0.5084771", "0.5070821", "0.50658643", "0.5060391", "0.5056439", "0.50529975", "0.50368416", "0.50157887", "0.5013332", "0.49981868", "0.49972287", "0.49782407", "0.49782407", "0.49782407", "0.49644327", "0.49644327", "0.49644327", "0.49644327", "0.49644327", "0.49629545", "0.49541944", "0.49455157", "0.4940682", "0.49193788", "0.49153236", "0.4909796", "0.48942894", "0.48927778", "0.48876086", "0.48876086", "0.48855788", "0.4884208", "0.48818278", "0.48798704", "0.4871267", "0.48701382", "0.48674658", "0.4864068", "0.48600817", "0.48509642", "0.48307574", "0.48278978", "0.48278546", "0.48258558", "0.48197845", "0.4815978", "0.48008624", "0.4794852", "0.4790567", "0.47878942", "0.47861898", "0.4777489", "0.47760415", "0.47677165", "0.47587645", "0.47574905" ]
0.7115634
0
Returns the fully qualified path to a war file in the artifact list.
public static File getWarFileName( final Set inArtifacts ) { if ( inArtifacts == null || inArtifacts.isEmpty() ) { throw new IllegalArgumentException( "WAR not found in artifact list." ); } final Iterator iter = inArtifacts.iterator(); while ( iter.hasNext() ) { Artifact artifact = (Artifact) iter.next(); if ( "war".equals( artifact.getType() ) ) { return artifact.getFile(); } } throw new IllegalArgumentException( "WAR not found in artifact list." ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static File getWarFileName( final Set inArtifacts, String fileName )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n\n if ( \"war\".equals( artifact.getType() ) && artifact.getFile().getName().contains( fileName ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "java.lang.String getArtifactUrl();", "private File getThemeDeployDir() throws MojoExecutionException {\n File themeDeployDir = null;\n if (serverDeployDir == null) {\n String webappsDirProp = project.getProperties().getProperty(WEBAPPS_PROP);\n if (webappsDirProp == null) {\n throw new MojoExecutionException(\"Property '\"+WEBAPPS_PROP+\"' is not defined, parameter serverDeployDir neither\");\n }\n File webappsDir = new File(webappsDirProp);\n if (!webappsDir.isDirectory()) {\n throw new MojoExecutionException(\"Property '\"+WEBAPPS_PROP+\"' is not correct\");\n }\n themeDeployDir = new File(webappsDir.getAbsolutePath()\n +File.separator\n +project.getArtifactId());\n } else {\n themeDeployDir = new File(serverDeployDir\n +File.separator\n +project.getArtifactId());\n }\n if (!themeDeployDir.isDirectory()) {\n throw new MojoExecutionException(\"Theme is not deployed at '\"+themeDeployDir.getAbsolutePath()+\"'\");\n }\n return themeDeployDir;\n }", "public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }", "private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}", "public String getJarLocation();", "public void setWarDir(final File val) {\n warDir = val;\n }", "@Override\r\n public String getProjectPath() {\r\n \treturn String.format(\":%s\", getArtifactId());\r\n }", "Path getArtifact(String identifier);", "public String getBundleFileName()\n {\n if ( bundleFileName == null )\n {\n bundleFileName = artifact.getFile().getName();\n }\n return bundleFileName;\n }", "public static WebArchive createWarQSDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardWebArchive(QS_GID, artifactId);\n }", "private static File getAspectWorkspace() {\n try {\n URL url = Platform.getBundle(Activator.PLUGIN_ID).getEntry(\"resources\");\n URL resolved = FileLocator.resolve(url);\n return new File(resolved.getPath());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getArtifact() {\n return artifact;\n }", "String getArtifactId();", "String getAbsolutePathWithinSlingHome(String relativePath);", "java.lang.String getArtifactId();", "public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();", "private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "private Artifact getArtifactFromReactor(Artifact artifact) {\n\t\t// check project dependencies first off\n\t\tfor (Artifact a : (Set<Artifact>) project.getArtifacts()) {\n\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\n\t\t// check reactor projects\n\t\tfor (MavenProject p : reactorProjects == null ? Collections.<MavenProject> emptyList() : reactorProjects) {\n\t\t\t// check the main artifact\n\t\t\tif (equals(artifact, p.getArtifact()) && hasFile(p.getArtifact())) {\n\t\t\t\treturn p.getArtifact();\n\t\t\t}\n\n\t\t\t// check any side artifacts\n\t\t\tfor (Artifact a : (List<Artifact>) p.getAttachedArtifacts()) {\n\t\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// not available\n\t\treturn null;\n\t}", "public static WebArchive createWarDemoDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardWebArchive(QS_DEMO_GID, artifactId);\n }", "public String getJarName() {\r\n\t\tURL clsUrl = getClass().getResource(getClass().getSimpleName() + \".class\");\r\n\t\tif (clsUrl != null) {\r\n\t\t\ttry {\r\n\t\t\t\tjava.net.URLConnection conn = clsUrl.openConnection();\r\n\t\t\t\tif (conn instanceof java.net.JarURLConnection) {\r\n\t\t\t\t\tjava.net.JarURLConnection connection = (java.net.JarURLConnection) conn;\r\n\t\t\t\t\tString path = connection.getJarFileURL().getPath();\r\n\t\t\t\t\t// System.out.println (\"Path = \"+path);\r\n\t\t\t\t\tint index = path.lastIndexOf('/');\r\n\t\t\t\t\tif (index >= 0)\r\n\t\t\t\t\t\tpath = path.substring(index + 1);\r\n\t\t\t\t\treturn path;\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String getJarPath() {\n String classPath = \"/\" + JavaUtils.class.getName();\n classPath = classPath.replace(\".\", \"/\") + \".class\";\n try {\n URL url = JavaUtils.class.getResource(classPath);\n String path = URLDecoder.decode(url.getPath(), \"UTF-8\");\n path = URLDecoder.decode(new URL(path).getPath(), \"UTF-8\");\n int bang = path.indexOf(\"!\");\n if (bang >= 0) {\n path = path.substring(0, bang);\n }\n return path;\n } catch (Exception e) {\n ReportingUtils.logError(e, \"Unable to get path of jar\");\n return \"\";\n }\n }", "private static String getPackageNameForPackageDirFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n return filePath.substring(1).replace('/', '.');\n }", "public String getRelativePath() {\n if (repository == null) {\n return name;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(name);\n return b.toString();\n }\n }", "java.lang.String getArtifactStorage();", "public static File getEarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ear\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }", "@Test\n public void getWarsWarIdTest() throws ApiException {\n Integer warId = null;\n String datasource = null;\n String userAgent = null;\n String xUserAgent = null;\n GetWarsWarIdOk response = api.getWarsWarId(warId, datasource, userAgent, xUserAgent);\n\n // TODO: test validations\n }", "public static File whoAmI() throws IOException, URISyntaxException {\n // JNLP returns the URL where the jar was originally placed (like http://hudson.dev.java.net/...)\n // not the local cached file. So we need a rather round about approach to get to\n // the local file name.\n // There is no portable way to find where the locally cached copy\n // of hudson.war/jar is; JDK 6 is too smart. (See HUDSON-2326.)\n try {\n\t URL classFile = Main.class.getClassLoader().getResource(mainClassAsResourceString());\n JarFile jf = ((JarURLConnection) classFile.openConnection()).getJarFile();\n Field f = ZipFile.class.getDeclaredField(\"name\");\n f.setAccessible(true);\n return new File((String) f.get(jf));\n } catch (Exception x) {\n System.err.println(\"ZipFile.name trick did not work, using fallback: \" + x);\n }\n File myself = File.createTempFile(\"hudson\", \".jar\");\n myself.deleteOnExit();\n InputStream is = Main.class.getProtectionDomain().getCodeSource().getLocation().openStream();\n try {\n OutputStream os = new FileOutputStream(myself);\n try {\n copyStream(is, os);\n } finally {\n os.close();\n }\n } finally {\n is.close();\n }\n return myself;\n }", "public String getPomPath() {\n return pomPath == null ? getProductionDir() + \"/pom.xml\" : pomPath;\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "private static String getJarFilePath() throws URISyntaxException, UnsupportedEncodingException {\n\n\t\tFile jarFile;\n\n\t\t// if (codeSource.getLocation() != null) {\n\t\t// jarFile = new File(codeSource.getLocation().toURI());\n\t\t// } else {\n\t\tString path = ConfigurationLocator.class.getResource(ConfigurationLocator.class.getSimpleName() + \".class\")\n\t\t\t\t.getPath();\n\t\tString jarFilePath = path.substring(path.indexOf(\":\") + 1, path.indexOf(\"!\"));\n\t\tjarFilePath = URLDecoder.decode(jarFilePath, \"UTF-8\");\n\t\tjarFile = new File(jarFilePath);\n\t\t// }\n\t\treturn jarFile.getParentFile().getAbsolutePath();\n\t}", "private File getLastArtifact() throws MojoExecutionException {\n\t\torg.eclipse.aether.version.Version v = getLastVersion();\n\t\tif (v == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArtifact artifactQuery = new DefaultArtifact(groupId.concat(\":\")\n\t\t\t\t.concat(name).concat(\":\").concat(v.toString()));\n\t\tgetLog().debug(\n\t\t\t\tString.format(\"looking for artifact %s\",\n\t\t\t\t\t\tartifactQuery.toString()));\n\t\treturn getArtifactFile(artifactQuery);\n\n\t}", "public String getThisApplicationUrl() {\n\t\tString tempFileDest = getProperties().getProperty(\"temp.file.dest\").trim();\n\t\tString thisApplicationUrl = null;\n\t\tif(tempFileDest != null && tempFileDest.contains(\"mysunflower\")){\n\t\t\tthisApplicationUrl = getPortalApplicationUrl();\n\t\t}else{\n\t\t\tthisApplicationUrl = getApplicationUrl();\n\t\t}\n\t\treturn thisApplicationUrl;\n\t}", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "public String getAbsPath();", "java.lang.String getManifestUrl();", "private Handler getWebAppHandler(String warLocation, Server server) {\n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath(\"/\");\n File warFile = new File(warLocation);\n if (!warFile.exists()) {\n throw new RuntimeException(\"Unable to find WAR File: \" + warFile.getAbsolutePath());\n }\n webapp.setWar(warFile.getAbsolutePath());\n webapp.setExtractWAR(true);\n\n Configuration.ClassList classlist = Configuration.ClassList.setServerDefault(server);\n classlist.addBefore(\n \"org.eclipse.jetty.webapp.JettyWebXmlConfiguration\",\n \"org.eclipse.jetty.annotations.AnnotationConfiguration\");\n\n webapp.setAttribute(\n \"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\",\n \".*/[^/]*servlet-api-[^/]*\\\\.jar$|.*/javax.servlet.jsp.jstl-.*\\\\.jar$|.*/[^/]*taglibs.*\\\\.jar$\");\n\n return webapp;\n }", "private static void addArtifactPath( MavenProject project, Artifact artifact, List<String> list )\n throws DependencyResolutionRequiredException\n {\n String refId = getProjectReferenceId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );\n MavenProject refProject = (MavenProject) project.getProjectReferences().get( refId );\n\n boolean projectDirFound = false;\n if ( refProject != null )\n {\n if ( artifact.getType().equals( \"test-jar\" ) )\n {\n File testOutputDir = new File( refProject.getBuild().getTestOutputDirectory() );\n if ( testOutputDir.exists() )\n {\n list.add( testOutputDir.getAbsolutePath() );\n projectDirFound = true;\n }\n }\n else\n {\n list.add( refProject.getBuild().getOutputDirectory() );\n projectDirFound = true;\n }\n }\n if ( !projectDirFound )\n {\n File file = artifact.getFile();\n if ( file == null )\n {\n throw new DependencyResolutionRequiredException( artifact );\n }\n list.add( file.getPath() );\n }\n }", "public String getArtifactS3Location() {\n return this.artifactS3Location;\n }", "@Nullable\n public static String getRelativePath(String filepath) {\n return StringUtils.replace(StringUtils.substringAfter(filepath, StringUtils.substringBefore(\n filepath, \"\\\\\" + DEF_LOC_ARTIFACT)), \"\\\\\", \"/\");\n }", "String getApplicationContextPath();", "com.google.protobuf.ByteString\n getArtifactUrlBytes();", "public String getArtifactId()\n {\n return artifactId;\n }", "public static File getEjbJarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ejb\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }", "private String jarName(){\n // determine the name of this class\n String className=\"/\"+this.getClass().getName().replace('.','/')+\".class\";\n // find out where the class is on the filesystem\n String classFile=this.getClass().getResource(className).toString();\n\n if( (classFile==null) || !(classFile.startsWith(\"jar:\")) ) return null;\n \n // trim out parts and set this to be forwardslash\n classFile=classFile.substring(5,classFile.indexOf(className));\n classFile=FilenameUtil.setForwardSlash(classFile);\n\n // chop off a little bit more\n classFile=classFile.substring(4,classFile.length()-1);\n \n return FilenameUtil.URLSpacetoSpace(classFile);\n }", "static File getAppDir(String app) {\n return Minecraft.a(app);\n }", "String getFullWorkfileName();", "public String getApplicationContext()\n {\n return configfile.getApplicationPath(getASPManager().getCurrentHostIndex());\n }", "public static String getLogFilesPath() {\r\n return new File(TRACELOG).getAbsolutePath();\r\n }", "default String getArtifactId() {\n return getIdentifier().getArtifactId();\n }", "public String getRelativePath();", "private WebApp findWebAppForDep(final App.Dependency dep, final Set<WebApp> webApps) {\n\t\tfor (final WebApp webApp : webApps) {\n\t\t\tif (webApp.getFullName().equalsIgnoreCase(dep.getName())) {\n\t\t\t\treturn webApp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private void excludeFromWarPackaging() {\n getLog().info(\"excludeFromWarPackaging\");\n String pluginGroupId = \"org.apache.maven.plugins\";\n String pluginArtifactId = \"maven-war-plugin\";\n if (project.getBuildPlugins() != null) {\n for (Object o : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) o;\n\n if (pluginGroupId.equals(plugin.getGroupId()) && pluginArtifactId.equals(plugin.getArtifactId())) {\n Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();\n if (dom == null) {\n dom = new Xpp3Dom(\"configuration\");\n plugin.setConfiguration(dom);\n }\n Xpp3Dom excludes = dom.getChild(\"packagingExcludes\");\n if (excludes == null) {\n excludes = new Xpp3Dom(\"packagingExcludes\");\n dom.addChild(excludes);\n excludes.setValue(\"\");\n } else if (excludes.getValue().trim().length() > 0) {\n excludes.setValue(excludes.getValue() + \",\");\n }\n\n Set<Artifact> dependencies = getArtifacts();\n getLog().debug(\"Size of getArtifacts: \" + dependencies.size());\n String additionalExcludes = \"\";\n for (Artifact dependency : dependencies) {\n getLog().debug(\"Dependency: \" + dependency.getGroupId() + \":\" + dependency.getArtifactId() + \"type: \" + dependency.getType());\n if (!dependency.isOptional() && Types.JANGAROO_TYPE.equals(dependency.getType())) {\n getLog().debug(\"Excluding jangaroo dependency form war plugin [\" + dependency.toString() + \"]\");\n // Add two excludes. The first one is effective when no name clash occurs\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n // the second when a name clash occurs (artifact will hav groupId prepended before copying it into the lib dir)\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getGroupId() + \"-\" + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n }\n }\n excludes.setValue(excludes.getValue() + additionalExcludes);\n }\n }\n }\n }", "String getRepositoryPath(String name);", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "public String getWebappPathPrefix() {\n return webSiteProps.getWebappPathPrefix();\n }", "private File getArtifactFile(Artifact artifactQuery)\n\t\t\tthrows MojoExecutionException {\n\n\t\tArtifactRequest request = new ArtifactRequest(artifactQuery,\n\t\t\t\tprojectRepos, null);\n\t\tList<ArtifactRequest> arts = new ArrayList<ArtifactRequest>();\n\t\tarts.add(request);\n\t\ttry {\n\t\t\tArtifactResult a = repoSystem.resolveArtifact(repoSession, request);\n\t\t\treturn a.getArtifact().getFile();\n\t\t} catch (ArtifactResolutionException e) {\n\t\t\tthrow new MojoExecutionException(\n\t\t\t\t\t\"could not resolve artifact to compare with\", e);\n\t\t}\n\n\t}", "Path getMainCatalogueFilePath();", "private String getDesignPath() {\n Class<?> clazz = getClass();\n String designFilePath = null;\n if (clazz.getAnnotation(DeclarativeUI.class).absolutePath()) {\n designFilePath = \"\";\n } else {\n // This is rather nasty.. but it works well enough for now.\n String userDir = System.getProperty(\"user.dir\");\n designFilePath = userDir + \"/uitest/src/\"\n + clazz.getPackage().getName().replace('.', '/') + \"/\";\n }\n\n String designFileName = clazz.getAnnotation(DeclarativeUI.class)\n .value();\n\n return designFilePath + designFileName;\n }", "public String getArtifactId() {\n\t\treturn this.artifactId;\n\t}", "File getTargetDirectory();", "public IWarInfo getWarInfo(int warID) {\n\t\treturn null;\n\t}", "static Path getOutputPath(Configuration conf, String name) {\n String root = conf.get(WORKING_DIR, \"tmp/reasoning\");\n return new Path(root + \"/\" + name);\n }", "private static URL getDeployableXmlUrl(Class<?> clazz)\n {\n // Initialize\n StringBuffer urlString = new StringBuffer();\n\n // Assemble filename in form \"fullyQualifiedClassName\"\n urlString.append(clazz.getName());\n\n // Make a String\n String flatten = urlString.toString();\n\n // Adjust for filename structure instead of package structure\n flatten = flatten.replace('.', '/');\n\n // Append Suffix\n flatten = flatten + DEFAULT_SUFFIX_DEPLOYABLE_XML;\n\n // Get URL\n URL url = Thread.currentThread().getContextClassLoader().getResource(flatten);\n assert url != null : \"URL was not found for \" + flatten;\n \n // Return\n return url;\n }", "String artifactSourceId();", "String getDockerFilelocation();", "public static String getHelpContentFilePath() {\n\t\tFile jarPath = SX3Manager.getInstance().getInstallLocation();\n\t\tString sx3helpContentPath = jarPath.getParentFile().getAbsolutePath() + \"/SX3_CONFIGURATION_HELP_CONTENT.json\";\n\t\treturn sx3helpContentPath;\n\t}", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }", "public String resolvePath();", "private String buildDeployFileName(final String originalFileName) {\n String tempDir = System.getProperty(\"java.io.tmpdir\");\n StringBuilder builder = new StringBuilder();\n builder.append(tempDir);\n builder.append(\"/\");\n builder.append(originalFileName);\n return builder.toString();\n }", "public List<ApplicationArtifact> artifacts() {\n return this.artifacts;\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public String getAbsoluteApplicationPath()\r\n {\r\n String res = null;\r\n\r\n if (_windows)\r\n {\r\n RegQuery r = new RegQuery();\r\n res = r.getAbsoluteApplicationPath(_execName);\r\n if (res != null)\r\n {\r\n return res;\r\n }\r\n String progFiles = System.getenv(\"ProgramFiles\");\r\n String dirs[] = { \"\\\\Mozilla\\\\ Firefox\\\\\", \"\\\\Mozilla\", \"\\\\Firefox\", \"\\\\SeaMonkey\",\r\n \"\\\\mozilla.org\\\\SeaMonkey\" };\r\n\r\n for (int i = 0; i < dirs.length; i++)\r\n {\r\n File f = new File(progFiles + dirs[i]);\r\n if (f.exists())\r\n {\r\n return progFiles + dirs[i];\r\n }\r\n }\r\n }\r\n\r\n else if (_linux)\r\n {\r\n try\r\n {\r\n File f;\r\n Properties env = new Properties();\r\n env.load(Runtime.getRuntime().exec(\"env\").getInputStream());\r\n String userPath = (String) env.get(\"PATH\");\r\n String[] pathDirs = userPath.split(\":\");\r\n\r\n for (int i = 0; i < pathDirs.length; i++)\r\n {\r\n f = new File(pathDirs[i] + File.separator + _execName);\r\n\r\n if (f.exists())\r\n {\r\n return f.getCanonicalPath().substring(0,\r\n f.getCanonicalPath().length() - _execName.length());\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n return res;\r\n }", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public static File getJarPath() throws URISyntaxException {\n\t\tFile jarPath = new File(Parser.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());\n\t\treturn jarPath.getParentFile();\n\t}", "public String getResourcePath();", "public Path getHdfsPath() {\n\t\tif (containerId != null) {\n\t\t\treturn completeHdfsPath(new Path(hdfsApplicationDirectory, containerId));\n\t\t}\n\n\t\t// else, we should check if the file is an input file; if so, it can be found directly in the hdfs base directory\n\t\tPath basePath = completeHdfsPath(hdfsBaseDirectory);\n\t\ttry {\n\t\t\tif (hdfs.exists(basePath)) {\n\t\t\t\treturn basePath;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\n\t\t// otherwise, it is fair to assume that the file will be found in the application's folder\n\t\treturn completeHdfsPath(hdfsApplicationDirectory);\n\t}", "public String artifactsLocationTemplate() {\n String pipeline = get(\"GO_PIPELINE_NAME\");\n String stageName = get(\"GO_STAGE_NAME\");\n String jobName = get(\"GO_JOB_NAME\");\n\n String pipelineCounter = get(\"GO_PIPELINE_COUNTER\");\n String stageCounter = get(\"GO_STAGE_COUNTER\");\n return artifactsLocationTemplate(pipeline, stageName, jobName, pipelineCounter, stageCounter);\n }", "String getRepositoryPath();", "public static String getWorkingDirectory() {\r\n try {\r\n // get working directory as File\r\n String path = DBLIS.class.getProtectionDomain().getCodeSource()\r\n .getLocation().toURI().getPath();\r\n File folder = new File(path);\r\n folder = folder.getParentFile().getParentFile(); // 2x .getParentFile() for debug, 1x for normal\r\n\r\n // directory as String\r\n return folder.getPath() + \"/\"; // /dist/ for debug, / for normal\r\n } catch (URISyntaxException ex) {\r\n return \"./\";\r\n }\r\n }", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "private void getModules() throws BuildException {\n FilenameFilter fltr = new FilenameFilter() {\n @Override\n public boolean accept(final File dir, final String name) {\n return name.endsWith(\".war\");\n }\n };\n\n if (warDir == null) {\n throw new BuildException(\"No wardir supplied\");\n }\n\n String[] warnames = warDir.list(fltr);\n\n if (warnames == null) {\n throw new BuildException(\"No wars found at \" + warDir);\n }\n\n for (int wi = 0; wi < warnames.length; wi++) {\n wars.add(warnames[wi]);\n }\n\n for (FileSet fs: filesets) {\n DirectoryScanner ds = fs.getDirectoryScanner(getProject());\n\n String[] dsFiles = ds.getIncludedFiles();\n\n for (int dsi = 0; dsi < dsFiles.length; dsi++) {\n String fname = dsFiles[dsi];\n\n if (fname.endsWith(\".jar\")) {\n jars.add(fname);\n } else if (fname.endsWith(\".war\")) {\n wars.add(fname);\n }\n }\n }\n }", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "java.lang.String getSrcPath();", "public String getXslFile() {\n return directory_path2;\n }", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "public static File getProjectRoot() {\n\t\tString filePath = \"/\";\n\t\tString rootDirName = FileUtil.class.getResource(filePath).getPath();\n\t\tFile rtn = new File(rootDirName, \"../../\");\n\t\treturn rtn;\n\t}", "public static String getToolchainRootPath(MakeConfiguration conf) {\n String rootPath = getToolchainExecPath(conf);\n\n int i = rootPath.length() - 2; // Last entry is '/', so skip it.\n while(i >= 0 && '/' != rootPath.charAt(i)) {\n --i;\n }\n\n return rootPath.substring(0, i+1);\n }", "String getExternalPath(String path);", "public static Path getOutputPath(Configuration conf) {\n return new Path(getOutputDir(conf));\n }", "public void testGetRemoteFileName()\n {\n DeployableFactory factory = new DefaultDeployableFactory();\n\n Deployable deployable = factory.createDeployable(\"jonas4x\", \"/foo/bar.war\",\n DeployableType.WAR);\n\n assertEquals(\"foo.war\", deployer.getRemoteFileName(deployable, \"foo.pipo\", false));\n assertEquals(\"foo.war\", deployer.getRemoteFileName(deployable, \"foo\", false));\n assertEquals(\"bar.war\", deployer.getRemoteFileName(deployable, null, false));\n\n deployable = factory.createDeployable(\"jonas4x\", \"/foo/bar.war\", DeployableType.WAR);\n\n ((WAR) deployable).setContext(\"/testContext\");\n assertEquals(\"testContext.war\", deployer.getRemoteFileName(deployable, null, false));\n\n ((WAR) deployable).setContext(\"/\");\n assertEquals(\"rootContext.war\", deployer.getRemoteFileName(deployable, null, false));\n }" ]
[ "0.68211424", "0.5975506", "0.5703938", "0.5645193", "0.5485707", "0.5401324", "0.5363959", "0.5333915", "0.53174865", "0.5286648", "0.52645546", "0.52630293", "0.51925117", "0.519202", "0.51705444", "0.51271355", "0.5126092", "0.5124592", "0.51053137", "0.51032245", "0.50720215", "0.5064729", "0.49976563", "0.49589884", "0.49456987", "0.4942757", "0.49419686", "0.49391073", "0.4929929", "0.4925019", "0.49226046", "0.491634", "0.49052712", "0.4883162", "0.48826745", "0.48681432", "0.48596942", "0.48571095", "0.48560774", "0.48535287", "0.48305136", "0.48236787", "0.48086783", "0.48064485", "0.47901598", "0.47854906", "0.47737437", "0.4763574", "0.47267568", "0.47256002", "0.46741167", "0.46588662", "0.4644911", "0.46417806", "0.46344644", "0.4619446", "0.46143332", "0.46122286", "0.46112952", "0.46042955", "0.45957392", "0.45952687", "0.45876288", "0.45849228", "0.45826825", "0.45811918", "0.45802832", "0.45765516", "0.45751017", "0.45721528", "0.456843", "0.45657483", "0.4564488", "0.4563692", "0.45614433", "0.45473602", "0.4529474", "0.45253032", "0.45246235", "0.45217982", "0.45212534", "0.45183954", "0.4510619", "0.45065442", "0.44990984", "0.44883817", "0.44869637", "0.44855964", "0.44835296", "0.44813287", "0.4479274", "0.44764072", "0.44684163", "0.44657454", "0.4465655", "0.44603905", "0.4455536", "0.44451654", "0.44415575", "0.44368055" ]
0.70370054
0
Returns the fully qualified path to an war file in the artifact list.
public static File getWarFileName( final Set inArtifacts, String fileName ) { if ( inArtifacts == null || inArtifacts.isEmpty() ) { throw new IllegalArgumentException( "WAR not found in artifact list." ); } final Iterator iter = inArtifacts.iterator(); while ( iter.hasNext() ) { Artifact artifact = (Artifact) iter.next(); if ( "war".equals( artifact.getType() ) && artifact.getFile().getName().contains( fileName ) ) { return artifact.getFile(); } } throw new IllegalArgumentException( "WAR not found in artifact list." ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static File getWarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"war\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "java.lang.String getArtifactUrl();", "private File getThemeDeployDir() throws MojoExecutionException {\n File themeDeployDir = null;\n if (serverDeployDir == null) {\n String webappsDirProp = project.getProperties().getProperty(WEBAPPS_PROP);\n if (webappsDirProp == null) {\n throw new MojoExecutionException(\"Property '\"+WEBAPPS_PROP+\"' is not defined, parameter serverDeployDir neither\");\n }\n File webappsDir = new File(webappsDirProp);\n if (!webappsDir.isDirectory()) {\n throw new MojoExecutionException(\"Property '\"+WEBAPPS_PROP+\"' is not correct\");\n }\n themeDeployDir = new File(webappsDir.getAbsolutePath()\n +File.separator\n +project.getArtifactId());\n } else {\n themeDeployDir = new File(serverDeployDir\n +File.separator\n +project.getArtifactId());\n }\n if (!themeDeployDir.isDirectory()) {\n throw new MojoExecutionException(\"Theme is not deployed at '\"+themeDeployDir.getAbsolutePath()+\"'\");\n }\n return themeDeployDir;\n }", "public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }", "private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}", "public String getJarLocation();", "public void setWarDir(final File val) {\n warDir = val;\n }", "@Override\r\n public String getProjectPath() {\r\n \treturn String.format(\":%s\", getArtifactId());\r\n }", "private static File getAspectWorkspace() {\n try {\n URL url = Platform.getBundle(Activator.PLUGIN_ID).getEntry(\"resources\");\n URL resolved = FileLocator.resolve(url);\n return new File(resolved.getPath());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public String getBundleFileName()\n {\n if ( bundleFileName == null )\n {\n bundleFileName = artifact.getFile().getName();\n }\n return bundleFileName;\n }", "Path getArtifact(String identifier);", "public static WebArchive createWarQSDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardWebArchive(QS_GID, artifactId);\n }", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }", "public String getArtifact() {\n return artifact;\n }", "private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "String getAbsolutePathWithinSlingHome(String relativePath);", "public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "java.lang.String getArtifactId();", "String getArtifactId();", "private Artifact getArtifactFromReactor(Artifact artifact) {\n\t\t// check project dependencies first off\n\t\tfor (Artifact a : (Set<Artifact>) project.getArtifacts()) {\n\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\n\t\t// check reactor projects\n\t\tfor (MavenProject p : reactorProjects == null ? Collections.<MavenProject> emptyList() : reactorProjects) {\n\t\t\t// check the main artifact\n\t\t\tif (equals(artifact, p.getArtifact()) && hasFile(p.getArtifact())) {\n\t\t\t\treturn p.getArtifact();\n\t\t\t}\n\n\t\t\t// check any side artifacts\n\t\t\tfor (Artifact a : (List<Artifact>) p.getAttachedArtifacts()) {\n\t\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// not available\n\t\treturn null;\n\t}", "public String getRelativePath() {\n if (repository == null) {\n return name;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(name);\n return b.toString();\n }\n }", "public String getJarName() {\r\n\t\tURL clsUrl = getClass().getResource(getClass().getSimpleName() + \".class\");\r\n\t\tif (clsUrl != null) {\r\n\t\t\ttry {\r\n\t\t\t\tjava.net.URLConnection conn = clsUrl.openConnection();\r\n\t\t\t\tif (conn instanceof java.net.JarURLConnection) {\r\n\t\t\t\t\tjava.net.JarURLConnection connection = (java.net.JarURLConnection) conn;\r\n\t\t\t\t\tString path = connection.getJarFileURL().getPath();\r\n\t\t\t\t\t// System.out.println (\"Path = \"+path);\r\n\t\t\t\t\tint index = path.lastIndexOf('/');\r\n\t\t\t\t\tif (index >= 0)\r\n\t\t\t\t\t\tpath = path.substring(index + 1);\r\n\t\t\t\t\treturn path;\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static File whoAmI() throws IOException, URISyntaxException {\n // JNLP returns the URL where the jar was originally placed (like http://hudson.dev.java.net/...)\n // not the local cached file. So we need a rather round about approach to get to\n // the local file name.\n // There is no portable way to find where the locally cached copy\n // of hudson.war/jar is; JDK 6 is too smart. (See HUDSON-2326.)\n try {\n\t URL classFile = Main.class.getClassLoader().getResource(mainClassAsResourceString());\n JarFile jf = ((JarURLConnection) classFile.openConnection()).getJarFile();\n Field f = ZipFile.class.getDeclaredField(\"name\");\n f.setAccessible(true);\n return new File((String) f.get(jf));\n } catch (Exception x) {\n System.err.println(\"ZipFile.name trick did not work, using fallback: \" + x);\n }\n File myself = File.createTempFile(\"hudson\", \".jar\");\n myself.deleteOnExit();\n InputStream is = Main.class.getProtectionDomain().getCodeSource().getLocation().openStream();\n try {\n OutputStream os = new FileOutputStream(myself);\n try {\n copyStream(is, os);\n } finally {\n os.close();\n }\n } finally {\n is.close();\n }\n return myself;\n }", "public static String getJarPath() {\n String classPath = \"/\" + JavaUtils.class.getName();\n classPath = classPath.replace(\".\", \"/\") + \".class\";\n try {\n URL url = JavaUtils.class.getResource(classPath);\n String path = URLDecoder.decode(url.getPath(), \"UTF-8\");\n path = URLDecoder.decode(new URL(path).getPath(), \"UTF-8\");\n int bang = path.indexOf(\"!\");\n if (bang >= 0) {\n path = path.substring(0, bang);\n }\n return path;\n } catch (Exception e) {\n ReportingUtils.logError(e, \"Unable to get path of jar\");\n return \"\";\n }\n }", "public static WebArchive createWarDemoDeployment(String artifactId) {\n return ShrinkwrapUtil.getSwitchYardWebArchive(QS_DEMO_GID, artifactId);\n }", "public static File getEarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ear\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }", "public String getPomPath() {\n return pomPath == null ? getProductionDir() + \"/pom.xml\" : pomPath;\n }", "private static String getPackageNameForPackageDirFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n return filePath.substring(1).replace('/', '.');\n }", "java.lang.String getArtifactStorage();", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "public String getThisApplicationUrl() {\n\t\tString tempFileDest = getProperties().getProperty(\"temp.file.dest\").trim();\n\t\tString thisApplicationUrl = null;\n\t\tif(tempFileDest != null && tempFileDest.contains(\"mysunflower\")){\n\t\t\tthisApplicationUrl = getPortalApplicationUrl();\n\t\t}else{\n\t\t\tthisApplicationUrl = getApplicationUrl();\n\t\t}\n\t\treturn thisApplicationUrl;\n\t}", "public String getAbsPath();", "private File getLastArtifact() throws MojoExecutionException {\n\t\torg.eclipse.aether.version.Version v = getLastVersion();\n\t\tif (v == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArtifact artifactQuery = new DefaultArtifact(groupId.concat(\":\")\n\t\t\t\t.concat(name).concat(\":\").concat(v.toString()));\n\t\tgetLog().debug(\n\t\t\t\tString.format(\"looking for artifact %s\",\n\t\t\t\t\t\tartifactQuery.toString()));\n\t\treturn getArtifactFile(artifactQuery);\n\n\t}", "@Test\n public void getWarsWarIdTest() throws ApiException {\n Integer warId = null;\n String datasource = null;\n String userAgent = null;\n String xUserAgent = null;\n GetWarsWarIdOk response = api.getWarsWarId(warId, datasource, userAgent, xUserAgent);\n\n // TODO: test validations\n }", "private static String getJarFilePath() throws URISyntaxException, UnsupportedEncodingException {\n\n\t\tFile jarFile;\n\n\t\t// if (codeSource.getLocation() != null) {\n\t\t// jarFile = new File(codeSource.getLocation().toURI());\n\t\t// } else {\n\t\tString path = ConfigurationLocator.class.getResource(ConfigurationLocator.class.getSimpleName() + \".class\")\n\t\t\t\t.getPath();\n\t\tString jarFilePath = path.substring(path.indexOf(\":\") + 1, path.indexOf(\"!\"));\n\t\tjarFilePath = URLDecoder.decode(jarFilePath, \"UTF-8\");\n\t\tjarFile = new File(jarFilePath);\n\t\t// }\n\t\treturn jarFile.getParentFile().getAbsolutePath();\n\t}", "java.lang.String getManifestUrl();", "String getApplicationContextPath();", "private Handler getWebAppHandler(String warLocation, Server server) {\n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath(\"/\");\n File warFile = new File(warLocation);\n if (!warFile.exists()) {\n throw new RuntimeException(\"Unable to find WAR File: \" + warFile.getAbsolutePath());\n }\n webapp.setWar(warFile.getAbsolutePath());\n webapp.setExtractWAR(true);\n\n Configuration.ClassList classlist = Configuration.ClassList.setServerDefault(server);\n classlist.addBefore(\n \"org.eclipse.jetty.webapp.JettyWebXmlConfiguration\",\n \"org.eclipse.jetty.annotations.AnnotationConfiguration\");\n\n webapp.setAttribute(\n \"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\",\n \".*/[^/]*servlet-api-[^/]*\\\\.jar$|.*/javax.servlet.jsp.jstl-.*\\\\.jar$|.*/[^/]*taglibs.*\\\\.jar$\");\n\n return webapp;\n }", "@Nullable\n public static String getRelativePath(String filepath) {\n return StringUtils.replace(StringUtils.substringAfter(filepath, StringUtils.substringBefore(\n filepath, \"\\\\\" + DEF_LOC_ARTIFACT)), \"\\\\\", \"/\");\n }", "public String getArtifactS3Location() {\n return this.artifactS3Location;\n }", "public static File getEjbJarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ejb\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EJB jar not found in artifact list.\" );\n }", "com.google.protobuf.ByteString\n getArtifactUrlBytes();", "private static void addArtifactPath( MavenProject project, Artifact artifact, List<String> list )\n throws DependencyResolutionRequiredException\n {\n String refId = getProjectReferenceId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );\n MavenProject refProject = (MavenProject) project.getProjectReferences().get( refId );\n\n boolean projectDirFound = false;\n if ( refProject != null )\n {\n if ( artifact.getType().equals( \"test-jar\" ) )\n {\n File testOutputDir = new File( refProject.getBuild().getTestOutputDirectory() );\n if ( testOutputDir.exists() )\n {\n list.add( testOutputDir.getAbsolutePath() );\n projectDirFound = true;\n }\n }\n else\n {\n list.add( refProject.getBuild().getOutputDirectory() );\n projectDirFound = true;\n }\n }\n if ( !projectDirFound )\n {\n File file = artifact.getFile();\n if ( file == null )\n {\n throw new DependencyResolutionRequiredException( artifact );\n }\n list.add( file.getPath() );\n }\n }", "public String getArtifactId()\n {\n return artifactId;\n }", "static File getAppDir(String app) {\n return Minecraft.a(app);\n }", "String getFullWorkfileName();", "public String getApplicationContext()\n {\n return configfile.getApplicationPath(getASPManager().getCurrentHostIndex());\n }", "private String jarName(){\n // determine the name of this class\n String className=\"/\"+this.getClass().getName().replace('.','/')+\".class\";\n // find out where the class is on the filesystem\n String classFile=this.getClass().getResource(className).toString();\n\n if( (classFile==null) || !(classFile.startsWith(\"jar:\")) ) return null;\n \n // trim out parts and set this to be forwardslash\n classFile=classFile.substring(5,classFile.indexOf(className));\n classFile=FilenameUtil.setForwardSlash(classFile);\n\n // chop off a little bit more\n classFile=classFile.substring(4,classFile.length()-1);\n \n return FilenameUtil.URLSpacetoSpace(classFile);\n }", "public static String getLogFilesPath() {\r\n return new File(TRACELOG).getAbsolutePath();\r\n }", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "public String getRelativePath();", "private String getDesignPath() {\n Class<?> clazz = getClass();\n String designFilePath = null;\n if (clazz.getAnnotation(DeclarativeUI.class).absolutePath()) {\n designFilePath = \"\";\n } else {\n // This is rather nasty.. but it works well enough for now.\n String userDir = System.getProperty(\"user.dir\");\n designFilePath = userDir + \"/uitest/src/\"\n + clazz.getPackage().getName().replace('.', '/') + \"/\";\n }\n\n String designFileName = clazz.getAnnotation(DeclarativeUI.class)\n .value();\n\n return designFilePath + designFileName;\n }", "default String getArtifactId() {\n return getIdentifier().getArtifactId();\n }", "private WebApp findWebAppForDep(final App.Dependency dep, final Set<WebApp> webApps) {\n\t\tfor (final WebApp webApp : webApps) {\n\t\t\tif (webApp.getFullName().equalsIgnoreCase(dep.getName())) {\n\t\t\t\treturn webApp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getWebappPathPrefix() {\n return webSiteProps.getWebappPathPrefix();\n }", "private void excludeFromWarPackaging() {\n getLog().info(\"excludeFromWarPackaging\");\n String pluginGroupId = \"org.apache.maven.plugins\";\n String pluginArtifactId = \"maven-war-plugin\";\n if (project.getBuildPlugins() != null) {\n for (Object o : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) o;\n\n if (pluginGroupId.equals(plugin.getGroupId()) && pluginArtifactId.equals(plugin.getArtifactId())) {\n Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();\n if (dom == null) {\n dom = new Xpp3Dom(\"configuration\");\n plugin.setConfiguration(dom);\n }\n Xpp3Dom excludes = dom.getChild(\"packagingExcludes\");\n if (excludes == null) {\n excludes = new Xpp3Dom(\"packagingExcludes\");\n dom.addChild(excludes);\n excludes.setValue(\"\");\n } else if (excludes.getValue().trim().length() > 0) {\n excludes.setValue(excludes.getValue() + \",\");\n }\n\n Set<Artifact> dependencies = getArtifacts();\n getLog().debug(\"Size of getArtifacts: \" + dependencies.size());\n String additionalExcludes = \"\";\n for (Artifact dependency : dependencies) {\n getLog().debug(\"Dependency: \" + dependency.getGroupId() + \":\" + dependency.getArtifactId() + \"type: \" + dependency.getType());\n if (!dependency.isOptional() && Types.JANGAROO_TYPE.equals(dependency.getType())) {\n getLog().debug(\"Excluding jangaroo dependency form war plugin [\" + dependency.toString() + \"]\");\n // Add two excludes. The first one is effective when no name clash occurs\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n // the second when a name clash occurs (artifact will hav groupId prepended before copying it into the lib dir)\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getGroupId() + \"-\" + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n }\n }\n excludes.setValue(excludes.getValue() + additionalExcludes);\n }\n }\n }\n }", "Path getMainCatalogueFilePath();", "public static String getHelpContentFilePath() {\n\t\tFile jarPath = SX3Manager.getInstance().getInstallLocation();\n\t\tString sx3helpContentPath = jarPath.getParentFile().getAbsolutePath() + \"/SX3_CONFIGURATION_HELP_CONTENT.json\";\n\t\treturn sx3helpContentPath;\n\t}", "static Path getOutputPath(Configuration conf, String name) {\n String root = conf.get(WORKING_DIR, \"tmp/reasoning\");\n return new Path(root + \"/\" + name);\n }", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }", "File getTargetDirectory();", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "String getRepositoryPath(String name);", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public IWarInfo getWarInfo(int warID) {\n\t\treturn null;\n\t}", "private static URL getDeployableXmlUrl(Class<?> clazz)\n {\n // Initialize\n StringBuffer urlString = new StringBuffer();\n\n // Assemble filename in form \"fullyQualifiedClassName\"\n urlString.append(clazz.getName());\n\n // Make a String\n String flatten = urlString.toString();\n\n // Adjust for filename structure instead of package structure\n flatten = flatten.replace('.', '/');\n\n // Append Suffix\n flatten = flatten + DEFAULT_SUFFIX_DEPLOYABLE_XML;\n\n // Get URL\n URL url = Thread.currentThread().getContextClassLoader().getResource(flatten);\n assert url != null : \"URL was not found for \" + flatten;\n \n // Return\n return url;\n }", "private File getArtifactFile(Artifact artifactQuery)\n\t\t\tthrows MojoExecutionException {\n\n\t\tArtifactRequest request = new ArtifactRequest(artifactQuery,\n\t\t\t\tprojectRepos, null);\n\t\tList<ArtifactRequest> arts = new ArrayList<ArtifactRequest>();\n\t\tarts.add(request);\n\t\ttry {\n\t\t\tArtifactResult a = repoSystem.resolveArtifact(repoSession, request);\n\t\t\treturn a.getArtifact().getFile();\n\t\t} catch (ArtifactResolutionException e) {\n\t\t\tthrow new MojoExecutionException(\n\t\t\t\t\t\"could not resolve artifact to compare with\", e);\n\t\t}\n\n\t}", "String getDockerFilelocation();", "public String getArtifactId() {\n\t\treturn this.artifactId;\n\t}", "private String buildDeployFileName(final String originalFileName) {\n String tempDir = System.getProperty(\"java.io.tmpdir\");\n StringBuilder builder = new StringBuilder();\n builder.append(tempDir);\n builder.append(\"/\");\n builder.append(originalFileName);\n return builder.toString();\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public static String getWorkingDirectory() {\r\n try {\r\n // get working directory as File\r\n String path = DBLIS.class.getProtectionDomain().getCodeSource()\r\n .getLocation().toURI().getPath();\r\n File folder = new File(path);\r\n folder = folder.getParentFile().getParentFile(); // 2x .getParentFile() for debug, 1x for normal\r\n\r\n // directory as String\r\n return folder.getPath() + \"/\"; // /dist/ for debug, / for normal\r\n } catch (URISyntaxException ex) {\r\n return \"./\";\r\n }\r\n }", "public List<ApplicationArtifact> artifacts() {\n return this.artifacts;\n }", "public String getAbsoluteApplicationPath()\r\n {\r\n String res = null;\r\n\r\n if (_windows)\r\n {\r\n RegQuery r = new RegQuery();\r\n res = r.getAbsoluteApplicationPath(_execName);\r\n if (res != null)\r\n {\r\n return res;\r\n }\r\n String progFiles = System.getenv(\"ProgramFiles\");\r\n String dirs[] = { \"\\\\Mozilla\\\\ Firefox\\\\\", \"\\\\Mozilla\", \"\\\\Firefox\", \"\\\\SeaMonkey\",\r\n \"\\\\mozilla.org\\\\SeaMonkey\" };\r\n\r\n for (int i = 0; i < dirs.length; i++)\r\n {\r\n File f = new File(progFiles + dirs[i]);\r\n if (f.exists())\r\n {\r\n return progFiles + dirs[i];\r\n }\r\n }\r\n }\r\n\r\n else if (_linux)\r\n {\r\n try\r\n {\r\n File f;\r\n Properties env = new Properties();\r\n env.load(Runtime.getRuntime().exec(\"env\").getInputStream());\r\n String userPath = (String) env.get(\"PATH\");\r\n String[] pathDirs = userPath.split(\":\");\r\n\r\n for (int i = 0; i < pathDirs.length; i++)\r\n {\r\n f = new File(pathDirs[i] + File.separator + _execName);\r\n\r\n if (f.exists())\r\n {\r\n return f.getCanonicalPath().substring(0,\r\n f.getCanonicalPath().length() - _execName.length());\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n return res;\r\n }", "public String resolvePath();", "String artifactSourceId();", "public static File getJarPath() throws URISyntaxException {\n\t\tFile jarPath = new File(Parser.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());\n\t\treturn jarPath.getParentFile();\n\t}", "public String getResourcePath();", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "public String getXslFile() {\n return directory_path2;\n }", "public Path getHdfsPath() {\n\t\tif (containerId != null) {\n\t\t\treturn completeHdfsPath(new Path(hdfsApplicationDirectory, containerId));\n\t\t}\n\n\t\t// else, we should check if the file is an input file; if so, it can be found directly in the hdfs base directory\n\t\tPath basePath = completeHdfsPath(hdfsBaseDirectory);\n\t\ttry {\n\t\t\tif (hdfs.exists(basePath)) {\n\t\t\t\treturn basePath;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\n\t\t// otherwise, it is fair to assume that the file will be found in the application's folder\n\t\treturn completeHdfsPath(hdfsApplicationDirectory);\n\t}", "public static File getProjectRoot() {\n\t\tString filePath = \"/\";\n\t\tString rootDirName = FileUtil.class.getResource(filePath).getPath();\n\t\tFile rtn = new File(rootDirName, \"../../\");\n\t\treturn rtn;\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public static String getToolchainRootPath(MakeConfiguration conf) {\n String rootPath = getToolchainExecPath(conf);\n\n int i = rootPath.length() - 2; // Last entry is '/', so skip it.\n while(i >= 0 && '/' != rootPath.charAt(i)) {\n --i;\n }\n\n return rootPath.substring(0, i+1);\n }", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "String getRepositoryPath();", "public String artifactsLocationTemplate() {\n String pipeline = get(\"GO_PIPELINE_NAME\");\n String stageName = get(\"GO_STAGE_NAME\");\n String jobName = get(\"GO_JOB_NAME\");\n\n String pipelineCounter = get(\"GO_PIPELINE_COUNTER\");\n String stageCounter = get(\"GO_STAGE_COUNTER\");\n return artifactsLocationTemplate(pipeline, stageName, jobName, pipelineCounter, stageCounter);\n }", "public static Path getOutputPath(Configuration conf) {\n return new Path(getOutputDir(conf));\n }", "java.lang.String getSrcPath();", "private void getModules() throws BuildException {\n FilenameFilter fltr = new FilenameFilter() {\n @Override\n public boolean accept(final File dir, final String name) {\n return name.endsWith(\".war\");\n }\n };\n\n if (warDir == null) {\n throw new BuildException(\"No wardir supplied\");\n }\n\n String[] warnames = warDir.list(fltr);\n\n if (warnames == null) {\n throw new BuildException(\"No wars found at \" + warDir);\n }\n\n for (int wi = 0; wi < warnames.length; wi++) {\n wars.add(warnames[wi]);\n }\n\n for (FileSet fs: filesets) {\n DirectoryScanner ds = fs.getDirectoryScanner(getProject());\n\n String[] dsFiles = ds.getIncludedFiles();\n\n for (int dsi = 0; dsi < dsFiles.length; dsi++) {\n String fname = dsFiles[dsi];\n\n if (fname.endsWith(\".jar\")) {\n jars.add(fname);\n } else if (fname.endsWith(\".war\")) {\n wars.add(fname);\n }\n }\n }\n }", "public static String getWorkspaceName() {\n\t\treturn ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile().toString();\n\t}", "String getExternalPath(String path);" ]
[ "0.70409346", "0.5937388", "0.57307494", "0.56561893", "0.5486543", "0.5379494", "0.5333598", "0.53193015", "0.5309203", "0.5295814", "0.52581334", "0.52296954", "0.5215888", "0.5200933", "0.51591337", "0.51268995", "0.5103378", "0.50937575", "0.5092371", "0.508973", "0.50870335", "0.50869715", "0.5007257", "0.49560308", "0.49519908", "0.4951084", "0.49437124", "0.49417657", "0.49334335", "0.4925695", "0.49198472", "0.49147138", "0.49142653", "0.49028954", "0.48823917", "0.48754522", "0.4872917", "0.48722777", "0.48710954", "0.48455936", "0.48296896", "0.48164988", "0.4796141", "0.47824943", "0.47672537", "0.47614586", "0.4754358", "0.47533533", "0.4743421", "0.4717464", "0.47048858", "0.4703829", "0.46968675", "0.46563557", "0.46519786", "0.46432343", "0.4625662", "0.46236873", "0.46211106", "0.46139985", "0.46124005", "0.46090794", "0.46045262", "0.46038365", "0.4603024", "0.4589935", "0.45864686", "0.45863438", "0.4584445", "0.4583176", "0.4580288", "0.45749688", "0.4565323", "0.45601624", "0.45572487", "0.45551774", "0.45541093", "0.4550472", "0.4550245", "0.453691", "0.45337114", "0.4521516", "0.45201972", "0.45175534", "0.45150587", "0.45133", "0.45109332", "0.4509368", "0.4503174", "0.45008343", "0.44975337", "0.44935933", "0.4492551", "0.44915938", "0.44914892", "0.44825724", "0.4476191", "0.44709015", "0.44680008", "0.4444942" ]
0.6797405
1
Returns the ejb file type from the artifact list
public static File getEjbJarFileName( final Set inArtifacts ) { if ( inArtifacts == null || inArtifacts.isEmpty() ) { throw new IllegalArgumentException( "EJB jar not found in artifact list." ); } final Iterator iter = inArtifacts.iterator(); while ( iter.hasNext() ) { Artifact artifact = (Artifact) iter.next(); if ( "ejb".equals( artifact.getType() ) ) { return artifact.getFile(); } } throw new IllegalArgumentException( "EJB jar not found in artifact list." ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArtifactType getArtifactType() {\r\n \t\treturn(ArtifactType.ServiceImplementation);\r\n \t}", "public static final TypeDescriptor<?> artifactType() {\n return TypeRegistry.DEFAULT.getType(IArtifact.class);\n }", "private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }", "public interface EjbJarType<T> extends Child<T>\n{\n\n public EjbJarType<T> setDescription(String description);\n\n public EjbJarType<T> setDescriptionList(String... values);\n\n public EjbJarType<T> removeAllDescription();\n\n public List<String> getDescriptionList();\n\n public EjbJarType<T> setDisplayName(String displayName);\n\n public EjbJarType<T> setDisplayNameList(String... values);\n\n public EjbJarType<T> removeAllDisplayName();\n\n public List<String> getDisplayNameList();\n\n public EjbJarType<T> removeAllIcon();\n\n public IconType<EjbJarType<T>> icon();\n\n public List<IconType<EjbJarType<T>>> getIconList();\n\n public EjbJarType<T> setModuleName(String moduleName);\n\n public EjbJarType<T> removeModuleName();\n\n public String getModuleName();\n\n public EjbJarType<T> removeEnterpriseBeans();\n\n public EnterpriseBeansType<EjbJarType<T>> enterpriseBeans();\n\n public EjbJarType<T> removeInterceptors();\n\n public InterceptorsType<EjbJarType<T>> interceptors();\n\n public EjbJarType<T> removeRelationships();\n\n public RelationshipsType<EjbJarType<T>> relationships();\n\n public EjbJarType<T> removeAssemblyDescriptor();\n\n public AssemblyDescriptorType<EjbJarType<T>> assemblyDescriptor();\n\n public EjbJarType<T> setEjbClientJar(String ejbClientJar);\n\n public EjbJarType<T> removeEjbClientJar();\n\n public String getEjbClientJar();\n\n public EjbJarType<T> setVersion(String version);\n\n public EjbJarType<T> removeVersion();\n\n public String getVersion();\n\n public EjbJarType<T> setMetadataComplete(Boolean metadataComplete);\n\n public EjbJarType<T> removeMetadataComplete();\n\n public Boolean isMetadataComplete();\n\n}", "public final EObject entryRuleEArtifactTypes() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEArtifactTypes = null;\n\n\n try {\n // InternalRMParser.g:822:55: (iv_ruleEArtifactTypes= ruleEArtifactTypes EOF )\n // InternalRMParser.g:823:2: iv_ruleEArtifactTypes= ruleEArtifactTypes EOF\n {\n newCompositeNode(grammarAccess.getEArtifactTypesRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEArtifactTypes=ruleEArtifactTypes();\n\n state._fsp--;\n\n current =iv_ruleEArtifactTypes; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static File getEarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"ear\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"EAR not found in artifact list.\" );\n }", "static String getArtifactClassifier( Product product, TargetEnvironment environment )\n {\n final String artifactClassifier;\n if ( product.getAttachId() == null )\n {\n artifactClassifier = getOsWsArch( environment, '.' );\n }\n else\n {\n artifactClassifier = product.getAttachId() + \"-\" + getOsWsArch( environment, '.' );\n }\n return artifactClassifier;\n }", "public final EObject entryRuleEArtifactType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEArtifactType = null;\n\n\n try {\n // InternalRMParser.g:867:54: (iv_ruleEArtifactType= ruleEArtifactType EOF )\n // InternalRMParser.g:868:2: iv_ruleEArtifactType= ruleEArtifactType EOF\n {\n newCompositeNode(grammarAccess.getEArtifactTypeRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEArtifactType=ruleEArtifactType();\n\n state._fsp--;\n\n current =iv_ruleEArtifactType; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final EObject ruleEArtifactTypes() throws RecognitionException {\n EObject current = null;\n\n EObject lv_artifactTypes_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:835:2: ( ( () ( (lv_artifactTypes_1_0= ruleEArtifactType ) )+ ) )\n // InternalRMParser.g:836:2: ( () ( (lv_artifactTypes_1_0= ruleEArtifactType ) )+ )\n {\n // InternalRMParser.g:836:2: ( () ( (lv_artifactTypes_1_0= ruleEArtifactType ) )+ )\n // InternalRMParser.g:837:3: () ( (lv_artifactTypes_1_0= ruleEArtifactType ) )+\n {\n // InternalRMParser.g:837:3: ()\n // InternalRMParser.g:838:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getEArtifactTypesAccess().getEArtifactTypesAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:844:3: ( (lv_artifactTypes_1_0= ruleEArtifactType ) )+\n int cnt6=0;\n loop6:\n do {\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0==RULE_QUALIFIED_NAME) ) {\n alt6=1;\n }\n\n\n switch (alt6) {\n \tcase 1 :\n \t // InternalRMParser.g:845:4: (lv_artifactTypes_1_0= ruleEArtifactType )\n \t {\n \t // InternalRMParser.g:845:4: (lv_artifactTypes_1_0= ruleEArtifactType )\n \t // InternalRMParser.g:846:5: lv_artifactTypes_1_0= ruleEArtifactType\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getEArtifactTypesAccess().getArtifactTypesEArtifactTypeParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_16);\n \t lv_artifactTypes_1_0=ruleEArtifactType();\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.getEArtifactTypesRule());\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\"artifactTypes\",\n \t \t\t\t\t\t\tlv_artifactTypes_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.EArtifactType\");\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 if ( cnt6 >= 1 ) break loop6;\n EarlyExitException eee =\n new EarlyExitException(6, input);\n throw eee;\n }\n cnt6++;\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 }", "public String getFileType(){\n\t\treturn type;\n\t}", "public OutlookAttachmentType getType()\n {\n return getConstant(\"Type\", OutlookAttachmentType.class);\n }", "public final EObject ruleEArtifactType() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token this_BEGIN_2=null;\n Token this_END_4=null;\n EObject lv_artifact_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:880:2: ( ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END ) )\n // InternalRMParser.g:881:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END )\n {\n // InternalRMParser.g:881:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END )\n // InternalRMParser.g:882:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_artifact_3_0= ruleEArtifactTypeBody ) ) this_END_4= RULE_END\n {\n // InternalRMParser.g:882:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) )\n // InternalRMParser.g:883:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n {\n // InternalRMParser.g:883:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n // InternalRMParser.g:884:5: lv_name_0_0= RULE_QUALIFIED_NAME\n {\n lv_name_0_0=(Token)match(input,RULE_QUALIFIED_NAME,FOLLOW_11); \n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getEArtifactTypeAccess().getNameQUALIFIED_NAMETerminalRuleCall_0_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getEArtifactTypeRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.QUALIFIED_NAME\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,Colon,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getEArtifactTypeAccess().getColonKeyword_1());\n \t\t\n this_BEGIN_2=(Token)match(input,RULE_BEGIN,FOLLOW_17); \n\n \t\t\tnewLeafNode(this_BEGIN_2, grammarAccess.getEArtifactTypeAccess().getBEGINTerminalRuleCall_2());\n \t\t\n // InternalRMParser.g:908:3: ( (lv_artifact_3_0= ruleEArtifactTypeBody ) )\n // InternalRMParser.g:909:4: (lv_artifact_3_0= ruleEArtifactTypeBody )\n {\n // InternalRMParser.g:909:4: (lv_artifact_3_0= ruleEArtifactTypeBody )\n // InternalRMParser.g:910:5: lv_artifact_3_0= ruleEArtifactTypeBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getEArtifactTypeAccess().getArtifactEArtifactTypeBodyParserRuleCall_3_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_artifact_3_0=ruleEArtifactTypeBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEArtifactTypeRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"artifact\",\n \t\t\t\t\t\tlv_artifact_3_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.EArtifactTypeBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_4=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_4, grammarAccess.getEArtifactTypeAccess().getENDTerminalRuleCall_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static String getFileType(){\n\t\t//Get the selected file type\n\t\tString type = (String) fileType.getSelectedItem();\n\t\t//Re-enable the combobox, since download has already started\n\t\tfileType.setEnabled(true);\n\t\t//Reset the default file type\n\t\tfileType.setSelectedIndex(0);\n\t\treturn type;\n\t}", "public String getArtifact() {\n return artifact;\n }", "public java.lang.String getFiletype() {\n return filetype;\n }", "public interface FileType {\n\tString name();\n}", "java.lang.String getArtifactStorage();", "BundleType getType();", "public String getModuleTypeClass();", "public String getEjbInterface();", "public edu.umich.icpsr.ddi.FileTypeType getFileType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTypeType target = null;\n target = (edu.umich.icpsr.ddi.FileTypeType)get_store().find_element_user(FILETYPE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "String[] getFileTypes();", "@Override\n public List<String> getFileTypes() {\n return gemFileFileTypesDb.getKeys();\n }", "public String getType()\n {\n return VFS.FILE_TYPE;\n }", "MediaPackageElement.Type getElementType();", "private Artifact getArtifactFromReactor(Artifact artifact) {\n\t\t// check project dependencies first off\n\t\tfor (Artifact a : (Set<Artifact>) project.getArtifacts()) {\n\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\n\t\t// check reactor projects\n\t\tfor (MavenProject p : reactorProjects == null ? Collections.<MavenProject> emptyList() : reactorProjects) {\n\t\t\t// check the main artifact\n\t\t\tif (equals(artifact, p.getArtifact()) && hasFile(p.getArtifact())) {\n\t\t\t\treturn p.getArtifact();\n\t\t\t}\n\n\t\t\t// check any side artifacts\n\t\t\tfor (Artifact a : (List<Artifact>) p.getAttachedArtifacts()) {\n\t\t\t\tif (equals(artifact, a) && hasFile(a)) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// not available\n\t\treturn null;\n\t}", "public Type getType() {\n \t\tif(type == null) {\n \t\t\ttry {\n \t\t\t\tsetType(B3BackendActivator.instance.getBundle().loadClass(getQualifiedName()));\n \t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO: ?? Need to handle this, so the \"not found\" surfaces to the user...\n\t\t\t\t// Handled via model validation - type can not be null\n \t\t\t}\n \t\t}\n \t\treturn type;\n \t}", "public String getFiletype() {\n return filetype;\n }", "public static File getWarFileName( final Set inArtifacts )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n if ( \"war\".equals( artifact.getType() ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}", "String componentTypeName();", "public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();", "String primaryImplementationType();", "public String getFileType() {\n return fileType;\n }", "public static File getWarFileName( final Set inArtifacts, String fileName )\n {\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }\n\n final Iterator iter = inArtifacts.iterator();\n while ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n\n if ( \"war\".equals( artifact.getType() ) && artifact.getFile().getName().contains( fileName ) )\n {\n return artifact.getFile();\n }\n }\n throw new IllegalArgumentException( \"WAR not found in artifact list.\" );\n }", "public static FileType valueOf(File file){\r\n\t\tString fileName = file.getName().toUpperCase();\r\n\t\treturn FileType.valueOf(fileName.substring(fileName.lastIndexOf(\".\")+1));\r\n\t}", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "String getFileMimeType();", "String getContentType(String fileExtension);", "public final String getImageType() {\n String imageType = null;\n\n if (this.url != null) {\n imageType = this.url.substring(this.url.lastIndexOf(\".\") + 1);\n }\n\n return imageType;\n }", "public int getEntityType(){\n\t\tIterator<ArrayList<String>> i = headerLines.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tArrayList<String> headerLines = i.next();\n\t\t\tString headerName = headerLines.get(0);\n\t\t\tif (headerName.matches(\"Content-Type:\")){\n\t\t\t\tString headerData = headerLines.get(1);\n\t\t\t\tif(headerData.contains(\"text\")){\n\t\t\t\t\treturn TEXT;\n\t\t\t\t} else if (headerData.contains(\"pdf\")){\n\t\t\t\t\treturn PDF;\n\t\t\t\t} else if (headerData.contains(\"gif\")){\n\t\t\t\t\treturn GIF;\n\t\t\t\t} else if (headerData.contains(\"jpeg\")){\n\t\t\t\t\treturn JPEG;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "protected String getContentType()\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n String ext = FilenameUtils.getExtension(fullAttachmentFilename);\n if (ext == null)\n {\n return null;\n }\n if (ext.equalsIgnoreCase(\"pdf\"))\n {\n return \"application/pdf\";\n } else if (ext.equalsIgnoreCase(\"zip\"))\n {\n return \"application/zip\";\n } else if (ext.equalsIgnoreCase(\"jpg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"jpeg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"html\"))\n {\n return \"text/html\";\n\n } else if (ext.equalsIgnoreCase(\"png\"))\n {\n return \"image/png\";\n\n } else if (ext.equalsIgnoreCase(\"gif\"))\n {\n return \"image/gif\";\n\n }\n log.warn(\"Content type not found for file extension: \" + ext);\n return null;\n }", "private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}", "public FileType getFileType() {\n return fileType;\n }", "public TFileType getFileType() {\n\n\t\treturn type;\n\t}", "public static String getType() {\n type = getProperty(\"type\");\n if (type == null) type = \"png\";\n return type;\n }", "public final EObject entryRuleEArtifactTypeBody() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEArtifactTypeBody = null;\n\n\n try {\n // InternalRMParser.g:935:58: (iv_ruleEArtifactTypeBody= ruleEArtifactTypeBody EOF )\n // InternalRMParser.g:936:2: iv_ruleEArtifactTypeBody= ruleEArtifactTypeBody EOF\n {\n newCompositeNode(grammarAccess.getEArtifactTypeBodyRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEArtifactTypeBody=ruleEArtifactTypeBody();\n\n state._fsp--;\n\n current =iv_ruleEArtifactTypeBody; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final void mT__156() throws RecognitionException {\n try {\n int _type = T__156;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:156:8: ( 'artifactType' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:156:10: 'artifactType'\n {\n match(\"artifactType\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private static TYPE getFileType(final String path, final ServiceContext context) {\n return PROJECT_FILE;\n }", "EjbXmlPackage getEjbXmlPackage();", "public int getJarType() {\n \t\treturn jarType;\n \t}", "private File getLastArtifact() throws MojoExecutionException {\n\t\torg.eclipse.aether.version.Version v = getLastVersion();\n\t\tif (v == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArtifact artifactQuery = new DefaultArtifact(groupId.concat(\":\")\n\t\t\t\t.concat(name).concat(\":\").concat(v.toString()));\n\t\tgetLog().debug(\n\t\t\t\tString.format(\"looking for artifact %s\",\n\t\t\t\t\t\tartifactQuery.toString()));\n\t\treturn getArtifactFile(artifactQuery);\n\n\t}", "private static String typeName(File file) {\r\n String name = file.getName();\r\n int split = name.lastIndexOf('.');\r\n\r\n return (split == -1) ? name : name.substring(0, split);\r\n }", "public String getFileExtension();", "public String getMimeType ()\n {\n final String METHOD_NAME = \"getMimeType\";\n this.logDebug(METHOD_NAME + \"1/2: Started\");\n\n String mimeType = null;\n try\n {\n\tint contentType = this.document.getContentType();\n\tif ( contentType >= 0 ) mimeType = MediaType.nameFor[contentType];\n }\n catch (Exception exception)\n {\n\tthis.logWarn(METHOD_NAME + \"Failed to retrieve mime type\", exception);\n }\n\n this.logDebug(METHOD_NAME + \" 2/2: Done. mimeType = \" + mimeType);\n return mimeType;\n }", "private File getArtifactFile(Artifact artifactQuery)\n\t\t\tthrows MojoExecutionException {\n\n\t\tArtifactRequest request = new ArtifactRequest(artifactQuery,\n\t\t\t\tprojectRepos, null);\n\t\tList<ArtifactRequest> arts = new ArrayList<ArtifactRequest>();\n\t\tarts.add(request);\n\t\ttry {\n\t\t\tArtifactResult a = repoSystem.resolveArtifact(repoSession, request);\n\t\t\treturn a.getArtifact().getFile();\n\t\t} catch (ArtifactResolutionException e) {\n\t\t\tthrow new MojoExecutionException(\n\t\t\t\t\t\"could not resolve artifact to compare with\", e);\n\t\t}\n\n\t}", "public String getType() {\n\t\treturn ELM_NAME;\n\t}", "public String fileExtension() {\r\n return getContent().fileExtension();\r\n }", "public String getFileExtension() {\n return toString().toLowerCase();\n }", "public abstract String getFileExtension();", "String getFileExtension();", "EClass getType();", "EClass getType();", "public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }", "public Class<? extends Annotation> getDeploymentType()\n {\n return _deploymentType;\n }", "public File findJarFileForClass(String type, String name) throws ClassNotFoundException {\n // On cherche la classe demandee parmi celles repertoriees lors du lancement de Kalimucho\n // Si on ne la trouve pas on recree la liste (cas ou le fichier jar aurait ete ajoute apres le demarrage)\n // Si on la trouve on revoie le fichier jar la contenant sinon on leve une exception\n int index=0;\n boolean trouve = false;\n while ((index<types.length) && (!trouve)) { // recherche du type\n if (type.equals(types[index])) trouve = true;\n else index++;\n }\n if (!trouve) throw new ClassNotFoundException(); // type introuvable\n else { // le type est connu on cherche la classe\n int essais = 0;\n while (essais != 2) {\n String fich = classesDisponibles[index].get(name);\n if (fich != null) { // classe repertoriee dans la liste\n essais = 2; // on renvoie le fichier\n return new File(Parameters.COMPONENTS_REPOSITORY+\"/\"+type+\"/\"+fich);\n }\n else { // la classe n'est pas dans la liste\n essais++;\n if (essais == 1) { // si on ne l'a pas deja fait on recree la liste a partir du depot\n rescanRepository();\n }\n }\n }\n throw new ClassNotFoundException(); // Classe introuvable meme apres avoir recree la liste\n }\n }", "EisPackage getEisPackage();", "public String getType(String fileExtension) {\n // trim leading dot if given\n if (fileExtension.startsWith(\".\")) {\n fileExtension = fileExtension.substring(1);\n }\n return this.typeMap.get(fileExtension);\n }", "public Integer getFileType() {\n return fileType;\n }", "public ExportType getResultantExportType() {\r\n\t\treturn this.exportType;\r\n\t}", "String getClassName(Element e) {\n // e has to be a TypeElement\n TypeElement te = (TypeElement)e;\n String packageName = elementUtils.getPackageOf(te).getQualifiedName().toString();\n String className = te.getQualifiedName().toString();\n if (className.startsWith(packageName + \".\")) {\n String classAndInners = className.substring(packageName.length() + 1);\n className = packageName + \".\" + classAndInners.replace('.', '$');\n }\n return className;\n }", "com.google.protobuf.ByteString getArtifactStorageBytes();", "public List<Type> getDownloadableType() {\n\t\tList<Type> types = typeManager.getAllAvailable();\n\t\tList<Type> result = new ArrayList<Type>();\n\t\tfor(Type type : types){\n\t\t\tif(type.getBasePackages() != null && type.getBasePackages().size() != 0){\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public String getFileType()\n {\n if (m_fileOptions.m_type == null ||\n m_fileOptions.m_type.length() <= 0)\n {\n return getTypeFromExtension();\n }\n\n return m_fileOptions.m_type;\n }", "ResourceFilesType createResourceFilesType();", "Path getArtifact(String identifier);", "x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum getProductType();", "String getArtifactId();", "String getRepoType();", "java.lang.String getArtifactId();", "public AttachmentType getAttachmentType() {\n\t\treturn attachmentType;\n\t}", "com.google.protobuf.ByteString getMimeTypeBytes();", "String getMimeType();", "public String getExt() {\n\t\treturn IpmemsFile.getFileExtension(file);\n\t}", "public String getEjbHomeInterface();", "public String getTypeName(String type) {\n return m_importsTracker.getName(type);\n }", "private String getConflictId(org.apache.maven.artifact.Artifact artifact) {\n StringBuilder buffer = new StringBuilder(128);\n buffer.append(artifact.getGroupId());\n buffer.append(':').append(artifact.getArtifactId());\n if (artifact.getArtifactHandler() != null) {\n buffer.append(':').append(artifact.getArtifactHandler().getExtension());\n }\n else {\n buffer.append(':').append(artifact.getType());\n }\n if (artifact.hasClassifier()) {\n buffer.append(':').append(artifact.getClassifier());\n }\n return buffer.toString();\n }", "public EjbJarAnnotationMetadata getEjbJarAnnotationMetadata() {\n\t\treturn ejbJarAnnotationMetadata;\n\t}", "ImageType getType();", "private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }", "@Override\r\n\tpublic String getContentType() {\r\n\t\treturn attachmentType;\r\n\t}", "public static int fileType(File file) {\n for (String type : imageType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.CAMERA_IMAGE_CODE;\n }\n }\n\n for (String type : videoType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.CAMERA_VIDEO_CODE;\n }\n }\n\n for (String type : audioType) {\n if (file.getName().toLowerCase().endsWith(type)) {\n return Template.Code.AUDIO_CODE;\n }\n }\n return Template.Code.FILE_MANAGER_CODE;\n\n }", "@Override\n\tpublic String getContentType(String filename) {\n\t\treturn null;\n\t}", "Artifact getArtifact(String version) throws ArtifactNotFoundException;", "public abstract Class<BE> getBukkitEntityType();", "public String getArtworkFilename(MediaFileType type) {\n List<MediaFile> artworks = getMediaFiles(type);\n if (!artworks.isEmpty()) {\n return artworks.get(0).getFile().toString();\n }\n return \"\";\n }", "java.lang.String getAppType();", "private String getFileExtension(Uri uri) {\n ContentResolver contentResolver = getApplicationContext().getContentResolver();\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }" ]
[ "0.66673374", "0.64568", "0.5979788", "0.57681465", "0.56959116", "0.5657586", "0.56222063", "0.5614604", "0.5558344", "0.5378567", "0.5348913", "0.5334348", "0.53183913", "0.5289429", "0.52835", "0.52708536", "0.526072", "0.52377987", "0.5235465", "0.523007", "0.52252513", "0.5203567", "0.5195326", "0.5194913", "0.5168941", "0.5163993", "0.5157157", "0.51534754", "0.5145725", "0.512439", "0.5121389", "0.51109606", "0.5104683", "0.5101166", "0.50923276", "0.5077433", "0.50769603", "0.5067405", "0.5053576", "0.50307137", "0.5018485", "0.50108314", "0.5004239", "0.50036925", "0.50027114", "0.49980322", "0.49897784", "0.4985709", "0.4984065", "0.49820375", "0.49570763", "0.4950933", "0.49304467", "0.48961648", "0.48920038", "0.48816234", "0.48748374", "0.48721856", "0.48705494", "0.48689714", "0.48461756", "0.48382407", "0.48382407", "0.48340124", "0.48280475", "0.48192924", "0.48093227", "0.48091555", "0.4808012", "0.48033363", "0.47905838", "0.47849745", "0.47849298", "0.4783387", "0.47768298", "0.47756574", "0.47750536", "0.4772592", "0.47725853", "0.476712", "0.47662398", "0.4759966", "0.47496927", "0.47418615", "0.47369558", "0.47331384", "0.4727627", "0.4726226", "0.4724802", "0.4724606", "0.4724133", "0.4718252", "0.47134194", "0.4712295", "0.4711754", "0.47097883", "0.4707948", "0.46947268", "0.46918333", "0.46881592" ]
0.653793
1
This method will get the PLUGIN dependencies from the pom and construct a classpath string to be used to run a mojo where a classpath is required. The plugin dependencies are placed after the project dependencies in the classpath.
public static String getDependencies( final Set artifacts, final List pluginArtifacts ) { if ( ( artifacts == null || artifacts.isEmpty() ) && ( pluginArtifacts == null || pluginArtifacts.size() == 0 ) ) { return ""; } // Loop over all the artifacts and create a classpath string. final Iterator iter = artifacts.iterator(); final StringBuffer buffer = new StringBuffer( 1024 ); if ( iter.hasNext() ) { Artifact artifact = (Artifact) iter.next(); buffer.append( artifact.getFile() ); while ( iter.hasNext() ) { artifact = (Artifact) iter.next(); buffer.append( System.getProperty( "path.separator" ) ); buffer.append( artifact.getFile() ); } } //now get the plugin artifacts into the list final Iterator pluginIter = pluginArtifacts.iterator(); if ( pluginIter.hasNext() ) { Artifact artifact = (Artifact) pluginIter.next(); if ( buffer.length() > 0 ) { buffer.append( System.getProperty( "path.separator" ) ); } buffer.append( artifact.getFile() ); while ( pluginIter.hasNext() ) { artifact = (Artifact) pluginIter.next(); buffer.append( System.getProperty( "path.separator" ) ); buffer.append( artifact.getFile() ); } } return buffer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ClassLoader makeClassLoader() throws MojoExecutionException {\n final List<URL> urls = new ArrayList<URL>();\n try {\n for (String cp: project.getRuntimeClasspathElements()) {\n urls.add(new File(cp).toURI().toURL());\n }\n } catch (DependencyResolutionRequiredException e) {\n throw new MojoExecutionException(\"dependencies not resolved\", e);\n } catch (MalformedURLException e) {\n throw new MojoExecutionException(\"invalid classpath element\", e);\n }\n return new URLClassLoader(urls.toArray(new URL[urls.size()]),\n getClass().getClassLoader());\n }", "public String getSystemClassPath();", "private ClassLoader getCompileClassLoader() throws MojoExecutionException {\n\t\ttry {\n\t\t\tList<String> runtimeClasspathElements = project.getRuntimeClasspathElements();\n\t\t\tList<String> compileClasspathElements = project.getCompileClasspathElements();\n\t\t\tArrayList<URL> classpathURLs = new ArrayList<>();\n\t\t\tfor (String element : runtimeClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tfor (String element : compileClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tURL[] urlArray = classpathURLs.toArray(new URL[classpathURLs.size()]);\n\t\t\treturn new URLClassLoader(urlArray, Thread.currentThread().getContextClassLoader());\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new MojoExecutionException(\"Unable to load project runtime !\", e);\n\t\t}\n\t}", "String resolveClassPath(String classPath);", "public Path createClasspath() {\r\n return getCommandLine().createClasspath(getProject()).createPath();\r\n }", "static List<GlassFishLibrary.Maven> processClassPath(List<File> classpath) {\n List<GlassFishLibrary.Maven> mvnList = new LinkedList<>();\n for (File jar : classpath) {\n ZipFile zip = null;\n try {\n zip = new ZipFile(jar);\n Enumeration<? extends ZipEntry> entries = zip.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n Matcher matcher\n = MVN_PROPS_PATTERN.matcher(entry.getName());\n if (matcher.matches()) {\n GlassFishLibrary.Maven mvnInfo\n = getMvnInfoFromProperties(zip.getInputStream(\n entry));\n if (mvnInfo != null) {\n mvnList.add(mvnInfo);\n break;\n }\n }\n }\n } catch (ZipException ze) {\n Logger.log(Level.WARNING, \"Cannot open JAR file \"\n + jar.getAbsolutePath() + \":\", ze);\n } catch (IOException ioe) {\n Logger.log(Level.WARNING, \"Cannot process JAR file \"\n + jar.getAbsolutePath() + \":\", ioe);\n } catch (IllegalStateException ise) {\n Logger.log(Level.WARNING, \"Cannot process JAR file \"\n + jar.getAbsolutePath() + \":\", ise);\n } finally {\n if (zip != null) try {\n zip.close();\n } catch (IOException ioe) {\n Logger.log(Level.WARNING, \"Cannot close JAR file \"\n + jar.getAbsolutePath() + \":\", ioe);\n }\n }\n \n }\n return mvnList;\n }", "@Override\n public void execute() throws MojoExecutionException, MojoFailureException {\n getLog().info(\"Adding the dependency \" + groupId + \":\" + artifactId);\n\n // Load the model\n Model model;\n try {\n model = POMUtils.loadModel(pomFile);\n } catch (IOException | XmlPullParserException e) {\n throw new MojoExecutionException(\"Error while loading the Maven model.\", e);\n }\n\n // Creating a dependency object\n Dependency dependency = new Dependency();\n\n dependency.setArtifactId(artifactId);\n dependency.setGroupId(groupId);\n if (version != null) {\n dependency.setVersion(version);\n }\n if (systemPath != null) {\n dependency.setSystemPath(systemPath);\n }\n if (type != null) {\n dependency.setType(type);\n }\n if (scope != null) {\n dependency.setScope(scope);\n }\n if (optional) {\n dependency.setOptional(true);\n }\n\n model =\n addDependency(model, dependency, groupId, artifactId, version, modifyDependencyManagement);\n\n // Save the model\n try {\n POMUtils.saveModel(model, pomFile, pomBackup);\n } catch (IOException e) {\n throw new MojoExecutionException(\"I/O error while writing the Maven model.\", e);\n }\n }", "private ClassLoader createHostClassLoader() throws MojoExecutionException {\n \n Set<URL> hostClasspath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-api\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\");\n hostClasspath.addAll(artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-host-api\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\"));\n hostClasspath.addAll(artifactHelper.resolve(\"javax.servlet\", \"servlet-api\", \"2.4\", Artifact.SCOPE_RUNTIME, \"jar\"));\n \n return new URLClassLoader(hostClasspath.toArray(new URL[] {}), getClass().getClassLoader());\n \n }", "public abstract NestedSet<Artifact> bootclasspath();", "private void loadPlugins(){\r\n\t\tKomorebiCoreConfig config = new KomorebiCoreConfig();\r\n\t\t\r\n\t\tif(config.getRootNode().getChildrenCount(\"plugins\") < 1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tList<ConfigurationNode> pluginNodes = config.getRootNode().getChildren(\"plugins\").get(0).getChildren(\"plugin\");\r\n\t\tfor(int pos=0; pos<pluginNodes.size(); ++pos){\r\n\t\t\tString name = config.getString(\"plugins.plugin(\"+pos+\")[@name]\");\r\n\t\t\tString version = config.getString(\"plugins.plugin(\"+pos+\")[@version]\");\r\n\t\t\tif(version == null || name == null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tloadPluginsJar(name+\"-\"+version); // check all classes in jar\r\n\t\t}\r\n\t}", "Plugin getPlugin( );", "@Classpath\n public FileCollection getJdependClasspath() {\n return jdependClasspath;\n }", "private void createClassPath() {\n classPath = classFactory.createClassPath();\n }", "<T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;", "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 void loadPluginsStartup();", "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 }", "public abstract NestedSet<Artifact> getTransitiveJackClasspathLibraries();", "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}", "Plugin getPlugin();", "public List getRuntimeClasspath(IPath installPath, IPath configPath);", "public Path createClasspath() {\n if (this.classpath == null) {\n this.classpath = new Path(project);\n }\n return this.classpath.createPath();\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 }", "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}", "private Class<?> getPluginMainClass(Plugin plugin, URLClassLoader urlClassLoader)\n throws ClassNotFoundException {\n final String moduleName = plugin.getModuleName(manifestLoader);\n if (moduleName != null && moduleName.length() > 0) {\n return Class.forName(moduleName, true, urlClassLoader);\n }\n final String initializerName = plugin.getInitializerName(manifestLoader);\n if (initializerName != null && initializerName.length() > 0) {\n return Class.forName(initializerName, true, urlClassLoader);\n }\n throw new IllegalArgumentException(\"Cannot determine main class for \"\n + plugin.getName(manifestLoader) +\n \" please see http://code.google.com/p/js-test-driver/wiki/Plugins#mainclass.\");\n }", "public String[] getClasspaths(IJavaProgramPrepareResult result) {\n\t\tString[] classpath = new String[0];\n\t\t\n\t\treturn classpath;\n\t}", "public Path createClasspath()\n {\n if( m_compileClasspath == null )\n {\n m_compileClasspath = new Path();\n }\n Path path1 = m_compileClasspath;\n final Path path = new Path();\n path1.addPath( path );\n return path;\n }", "@Override\n protected void addCustomArguments(List<String> args) {\n extraPluginDependencyArtifactId = \"camel-cdi\";\n\n // if no mainClass configured then try to find it from camel-maven-plugin\n if (mainClass == null && project.getBuildPlugins() != null) {\n for (Object obj : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) obj;\n if (\"org.apache.camel\".equals(plugin.getGroupId()) && \"camel-maven-plugin\".equals(plugin.getArtifactId())) {\n Object config = plugin.getConfiguration();\n if (config instanceof Xpp3Dom) {\n Xpp3Dom dom = (Xpp3Dom) config;\n Xpp3Dom child = dom.getChild(\"mainClass\");\n if (child != null) {\n mainClass = child.getValue();\n }\n }\n }\n }\n }\n\n if (mainClass != null) {\n getLog().info(\"Using custom \" + mainClass + \" to initiate Camel\");\n } else {\n mainClass = \"org.apache.camel.cdi.Main\";\n // use CDI by default\n getLog().info(\"Using \" + mainClass + \" to initiate a CamelContext\");\n }\n }", "public PhrescoPlugin getPlugin(Dependency dependency) throws PhrescoException {\n \t\treturn constructClass(dependency);\n \t}", "private void locateDefaultPlugins() {\n \t\tHashMap runtimeImport = getRuntimeImport();\n \n \t\t// locate runtime plugin matching the import from boot\n \t\tURL runtimePluginPath = getPluginPath(runtimeImport);\n \t\tif (runtimePluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.runtime\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for runtime plugin\n \t\truntimeDescriptor = createPluginBootDescriptor(runtimePluginPath);\n \n \t\t// determine the xml plugin for the selected runtime\n \t\tHashMap xmlImport = getImport(runtimePluginPath, XML_PLUGIN_ID);\n \n \t\t// locate xml plugin matching the import from runtime plugin\n \t\tURL xmlPluginPath = getPluginPath(xmlImport);\n \t\tif (xmlPluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.xerces\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for xml plugin\n \t\txmlDescriptor = createPluginBootDescriptor(xmlPluginPath);\n \t}", "private void addClasspath(String path)\n {\n if (classpath == null)\n {\n classpath = path;\n }\n else\n {\n classpath += File.pathSeparator + path;\n }\n }", "public void execute( final Set pRemovable, final Set pDependencies, final Set pRelocateDependencies )\n throws MojoExecutionException \n {\n \t\n for ( Iterator i = pDependencies.iterator(); i.hasNext(); )\n {\n final Artifact dependency = (Artifact) i.next();\n \n final Map variables = new HashMap();\n \n variables.put( \"artifactId\", dependency.getArtifactId() );\n variables.put( \"groupId\", dependency.getGroupId() );\n variables.put( \"version\", dependency.getVersion() );\n \n final String newName = replaceVariables( variables, name ); \n \t \t\n final File inputJar = dependency.getFile();\n final File outputJar = new File( buildDirectory, newName );\n \n try\n {\n \tfinal Jar jar = new Jar( inputJar, false );\n \t\n \tJarUtils.processJars(\n \t\t\tnew Jar[] { jar },\n \t\t\tnew ResourceHandler() {\n \t\t\t\t\n\t\t\t\t\t\t\tpublic void onStartProcessing( JarOutputStream pOutput )\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onStartJar( Jar pJar, JarOutputStream pOutput )\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic InputStream onResource( Jar jar, String oldName, String newName, Version[] versions, InputStream inputStream )\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\tif ( jar != versions[0].getJar() )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// only process the first version of it\n\n\t\t\t\t\t\t\t\t\tgetLog().info( \"Ignoring resource \" + oldName);\n\n\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfinal String clazzName = oldName.replace( '/' , '.' ).substring( 0, oldName.length() - \".class\".length() );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( pRemovable.contains(new Clazz ( clazzName ) ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ( isInKeepUnusedClassesFromArtifacts( dependency ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\treturn inputStream;\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 ( isInKeepUnusedClasses( name ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\treturn inputStream;\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\treturn null;\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\treturn inputStream;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onStopJar(Jar pJar, JarOutputStream pOutput)\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic void onStopProcessing(JarOutputStream pOutput)\n\t\t\t\t\t\t\t\tthrows IOException\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t}\n \t\t\t\t\n \t\t\t},\n \t\t\tnew FileOutputStream( outputJar ),\n \t\t\tnew Console()\n \t\t\t{\n\t\t\t\t\t\t\tpublic void println( String pString )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgetLog().debug( pString );\n\t\t\t\t\t\t\t} \t\t\n \t\t\t}\n \t\t);\n }\n catch ( ZipException ze )\n {\n getLog().info( \"No references to jar \" + inputJar.getName() + \". You can safely omit that dependency.\" );\n \n if ( outputJar.exists() )\n {\n outputJar.delete();\n }\n continue;\n }\n catch ( Exception e )\n {\n throw new MojoExecutionException( \"Could not create mini jar \" + outputJar, e );\n }\n \n getLog().info( \"Original length of \" + inputJar.getName() + \" was \" + inputJar.length() + \" bytes. \" + \"Was able shrink it to \" + outputJar.getName() + \" at \" + outputJar.length() + \" bytes (\" + (int) ( 100 * outputJar.length() / inputJar.length() ) + \"%)\" );\n }\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 }", "protected Set getDependencies()\n throws MojoExecutionException\n {\n MavenProject project = getExecutedProject();\n\n Set dependenciesSet = new HashSet();\n\n if ( project.getArtifact() != null && project.getArtifact().getFile() != null )\n {\n dependenciesSet.add( project.getArtifact() );\n }\n\n Set projectArtifacts = project.getArtifacts();\n if ( projectArtifacts != null )\n {\n dependenciesSet.addAll( projectArtifacts );\n }\n\n return dependenciesSet;\n }", "public String searchExportedPlugins()\n\t{\n\t\tFile parent = null;\n\t\tif (System.getProperty(\"eclipse.home.location\") != null)\n\t\t\tparent = new File(URI.create(System.getProperty(\"eclipse.home.location\").replaceAll(\" \", \"%20\")));\n\t\telse parent = new File(System.getProperty(\"user.dir\"));\n\n\t\tList<String> pluginLocations = exportModel.getPluginLocations();\n\t\tfor (String libName : NG_LIBS)\n\t\t{\n\t\t\tint i = 0;\n\t\t\tboolean found = false;\n\t\t\twhile (!found && i < pluginLocations.size())\n\t\t\t{\n\t\t\t\tFile pluginLocation = new File(pluginLocations.get(i));\n\t\t\t\tif (!pluginLocation.isAbsolute())\n\t\t\t\t{\n\t\t\t\t\tpluginLocation = new File(parent, pluginLocations.get(i));\n\t\t\t\t}\n\t\t\t\tFileFilter filter = new WildcardFileFilter(libName);\n\t\t\t\tFile[] libs = pluginLocation.listFiles(filter);\n\t\t\t\tif (libs != null && libs.length > 0)\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (!found) return libName;\n\t\t}\n\t\treturn null;\n\t}", "@Nonnull\n public List<Class<? extends PluginInterface>> loadPlugins(@Nonnull String pluginDirName) {\n\n List<Class<? extends PluginInterface>> plugins=new ArrayList<>();\n\n //Директория для просмотра файлов\n File pluginDirectory=new File(pluginDirName);\n File[] files=pluginDirectory.listFiles((dir, name) -> name.endsWith(PLUGIN_EXT));\n\n //Загрузка плагинов\n if(files!=null && files.length>0) {\n getPluginsClasses(files).forEach(className->{\n try {\n //Получим свой загрузчик файлов и загрузим с помощью него плагины\n Class cls=getClassLoaderByFilesURL(files)\n .loadClass(className\n .replaceAll(\"/\",\".\")\n .replace(\".class\",\"\"));\n\n //Если класс расширяет PluginInterface, то добавим этот класс в массив\n Class[] interfaces=cls.getInterfaces();\n for(Class intface:interfaces) {\n if(intface.equals(PluginInterface.class)) {\n plugins.add(cls);\n }\n }\n }\n catch (Exception e){\n e.printStackTrace();\n }\n });\n }\n\n return plugins;\n }", "public synchronized PluginClassLoader getPluginClassloader( Plugin plugin )\n {\n return classloaders.get( plugin );\n }", "@Classpath\n @InputFiles\n public FileCollection getClasspath() {\n return _classpath;\n }", "public Builder addClasspath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureClasspathIsMutable();\n classpath_.add(value);\n onChanged();\n return this;\n }", "private static IPath getClassPath(IProject iproject) {\n\t\tIJavaProject project = JavaCore.create(iproject);\n\n\t\t// IClasspathEntry[] classPath = null;\n\t\t// IPath[] path = null;\n\t\tIPath out = null;\n\t\ttry {\n\t\t\tout = project.getOutputLocation();\n\t\t} catch (JavaModelException e) {\n\t\t\tLogger.err.println(e);\n\t\t}\n\n\t\treturn out;\n\t}", "public static void printClassPath() {\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n URL[] urls = ((URLClassLoader) cl).getURLs();\n System.out.println(\"classpath BEGIN\");\n for (URL url : urls) {\n System.out.println(url.getFile());\n }\n System.out.println(\"classpath END\");\n System.out.flush();\n }", "public interface ContributionLoader {\n\n /**\n * Performs the load operation. This includes resolution of dependent contributions if necessary, and constructing a\n * classloader with access to resources contained in and required by the contribution.\n *\n * @param contribution the contribution to load\n * @return the classloader with access to the contribution and dependent resources\n * @throws ContributionLoadException if an error occurs during load\n * @throws MatchingExportNotFoundException\n * if matching export could not be found\n */\n ClassLoader loadContribution(Contribution contribution)\n throws ContributionLoadException, MatchingExportNotFoundException;\n}", "public ClassPath getClassPath();", "public Path getPluginsDirectory()\n {\n return pluginDirectory;\n }", "public interface Plugin\n{\n\tpublic String getPluginName();\n}", "File getPluginDirectory(String pluginId);", "protected void setClasspath(final PyObject importer, final String... paths) {\n\t\t// get the sys module\n\t\tfinal PyObject sysModule = importer.__call__(Py.newString(\"sys\"));\n\n\t\t// get the sys.path list\n\t\tfinal PyList path = (PyList) sysModule.__getattr__(\"path\");\n\n\t\t// add the current directory to the path\n\t\tfinal PyString pythonPath = Py.newString(getClass().getResource(\".\").getPath());\n\t\tpath.add(pythonPath);\n\n\t\tfinal String[] classpath = System.getProperty(\"java.class.path\").split(File.pathSeparator);\n\t\tfinal List<PyString> classPath = Stream.of(classpath).map(s -> Py.newString(s)).collect(Collectors.toList());\n\n\t\tpath.addAll(classPath);\n\t}", "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 static List<String> getClasspathElements( MavenProject project, List<Artifact> artifacts )\n throws DependencyResolutionRequiredException\n {\n // based on MavenProject.getCompileClasspathElements\n\n List<String> list = new ArrayList<String>( artifacts.size() );\n\n for ( Artifact artifact : artifacts )\n {\n if ( artifact.getArtifactHandler().isAddedToClasspath() )\n {\n // TODO: let the scope handler deal with this\n if ( Artifact.SCOPE_COMPILE.equals( artifact.getScope() )\n || Artifact.SCOPE_RUNTIME.equals( artifact.getScope() ) )\n {\n addArtifactPath( project, artifact, list );\n }\n }\n }\n\n return list;\n }", "public void execute() throws MojoExecutionException, MojoFailureException {\n\n File target = new File(getDistfolder());\n\n // only create the target directoty when it doesn't exist\n // no deletion\n if (!target.exists()) {\n target.mkdir();\n } else {\n getLog().warn(\"Using existing target directory \" + target.getAbsolutePath());\n }\n\n getLog().info(\"Target is \" + target);\n\n String excludes2 = getExcludes();\n\n if (excludes2 == null) {\n excludes2 = \"**/.svn/,**/.cvs/\";\n\n getLog().info(\"Configuration for excludes not set. Defaulting to: \\\"\" + excludes2\n + \"\\\". Excludes are ant-fileset-style.\");\n } else {\n if (excludes2.contains(\"__acl\") || excludes2.contains(\"__properties\")) {\n getLog().warn(\"Your excludes \\\"\" + excludes2\n + \"\\\" contains __acl or __properties. You do not want these to be excluded in order to have permissoins and properties work.\");\n }\n }\n\n try {\n String targetLibPath = getTargetLibPath();\n\n if ((null != targetLibPath) && !\"\".equals(targetLibPath)) {\n File targetLibDir = new File(target, targetLibPath);\n\n if (!targetLibDir.exists()) {\n targetLibDir.mkdirs();\n }\n\n if (!targetLibDir.isDirectory()) {\n throw new MojoExecutionException(\"Could not create targetLibdir: \" + targetLibDir.toString());\n }\n\n File jar = new File(jarFile);\n FileUtils.copyFileToDirectory(jar, targetLibDir);\n }\n\n for (Resource resource : srcResources) {\n File source = new File(resource.getDirectory());\n File currentTarget = null;\n\n if (resource.getTargetPath() != null) {\n currentTarget = new File(target, resource.getTargetPath());\n } else {\n currentTarget = target;\n }\n\n String normalized = source.getAbsolutePath();\n int offsetLength = normalized.length();\n\n getLog().debug(\"Normalzed sourcefolder is \" + normalized + \" (Offset is: \" + offsetLength + \")\");\n\n List<String> results = FileUtils.getFileAndDirectoryNames(source, null, excludes2, true, true, true,\n true);\n\n for (String fileName : results) {\n File file = new File(fileName);\n\n String normalizedParent = new File(file.getParent()).getAbsolutePath();\n\n if (offsetLength > normalizedParent.length()) {\n getLog().info(\"Skipping file (its the sourcefolder or a parent of it): \"\n + file.getAbsolutePath());\n getLog().debug(\"Parent: \" + normalizedParent + \" with length \" + normalizedParent.length());\n\n continue;\n }\n\n String relative = file.getParent();\n relative = relative.substring(offsetLength); // cut the target-dir away\n\n getLog().debug(\"Copy \" + file + \" to \" + currentTarget.getPath() + File.separator + relative);\n\n if (file.isFile()) {\n File parent = new File(currentTarget.getPath() + File.separator + relative);\n\n if (!parent.exists()) {\n // create dir if it does not exist\n parent.mkdirs();\n }\n\n FileUtils.copyFileToDirectory(file, parent);\n } else if (file.isDirectory()) {\n // take care about directories (so that empty dirs get created)\n\n File tocreate = new File(currentTarget.getPath() + File.separator + relative + File.separator\n + file.getName());\n getLog().debug(\"Creating dir\" + tocreate.toString());\n tocreate.mkdirs();\n }\n }\n }\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could copy file(s) to directory\", ex);\n }\n }", "public void classLoader(){\n \t\n URL xmlpath = this.getClass().getClassLoader().getResource(\"\");\n System.out.println(xmlpath.getPath());\n }", "public String getPluginPath() {\n return pluginPath;\n }", "private void parseSystemClasspath() {\n\t // Look for all unique classloaders.\n\t // Keep them in an order that (hopefully) reflects the order in which class resolution occurs.\n\t ArrayList<ClassLoader> classLoaders = new ArrayList<>();\n\t HashSet<ClassLoader> classLoadersSet = new HashSet<>();\n\t classLoadersSet.add(ClassLoader.getSystemClassLoader());\n\t classLoaders.add(ClassLoader.getSystemClassLoader());\n\t if (classLoadersSet.add(Thread.currentThread().getContextClassLoader())) {\n\t classLoaders.add(Thread.currentThread().getContextClassLoader());\n\t }\n\t // Dirty method for looking for any other classloaders on the call stack\n\t try {\n\t // Generate stacktrace\n\t throw new Exception();\n\t } catch (Exception e) {\n\t StackTraceElement[] stacktrace = e.getStackTrace();\n\t for (StackTraceElement elt : stacktrace) {\n\t try {\n\t ClassLoader cl = Class.forName(elt.getClassName()).getClassLoader();\n\t if (classLoadersSet.add(cl)) {\n\t classLoaders.add(cl);\n\t }\n\t } catch (ClassNotFoundException e1) {\n\t }\n\t }\n\t }\n\n\t // Get file paths for URLs of each classloader.\n\t clearClasspath();\n\t for (ClassLoader cl : classLoaders) {\n\t if (cl != null) {\n\t for (URL url : getURLs(cl)) {\n\t \t\n\t if (\"file\".equals(url.getProtocol())) {\n\t addClasspathElement(url.getFile());\n\t }\n\t }\n\t }\n\t }\n\t}", "private List<String> copyDependencies(File javaDirectory) throws MojoExecutionException {\n ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();\n\n List<String> list = new ArrayList<String>();\n\n // First, copy the project's own artifact\n File artifactFile = project.getArtifact().getFile();\n list.add(layout.pathOf(project.getArtifact()));\n\n try {\n FileUtils.copyFile(artifactFile, new File(javaDirectory, layout.pathOf(project.getArtifact())));\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy artifact file \" + artifactFile + \" to \" + javaDirectory, ex);\n }\n\n if (excludeDependencies) {\n // skip adding dependencies from project.getArtifacts()\n return list;\n }\n\n for (Artifact artifact : project.getArtifacts()) {\n File file = artifact.getFile();\n File dest = new File(javaDirectory, layout.pathOf(artifact));\n\n getLog().debug(\"Adding \" + file);\n\n try {\n FileUtils.copyFile(file, dest);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + file + \" into \" + javaDirectory, ex);\n }\n\n list.add(layout.pathOf(artifact));\n }\n\n return list;\n }", "public void initFromClasspath() throws IOException {\n \t\tcontactNames = loadFromClassPath(\"contactNames\");\n \t\tgroupNames = loadFromClassPath(\"groupNames\");\n \t\tmessageWords = loadFromClassPath(\"messageWords\");\n \t}", "@Test\n public void returnsTheCorrectNumberOfPlugins() {\n ClassPathPluginFinder finder = new ClassPathPluginFinder(testPluginsClassPath);\n assertEquals(finder.findAvailablePlugins().size(), numberOfValidPlugins);\n }", "protected void appendClassPath(final ClassPool pool) {\r\n pool.appendClassPath(new LoaderClassPath(getClassLoader()));\r\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 }", "private static String computeClassPath(Map<String, String> propMap,\n File domainDir, File bootstrapJar) {\n final String METHOD = \"computeClassPath\";\n String result = null;\n List<File> prefixCP = Utils.classPathToFileList(\n propMap.get(\"classpath-prefix\"), domainDir);\n List<File> suffixCP = Utils.classPathToFileList(\n propMap.get(\"classpath-suffix\"), domainDir);\n boolean useEnvCP = \"false\".equals(\n propMap.get(\"env-classpath-ignored\"));\n List<File> envCP = Utils.classPathToFileList(\n useEnvCP ? System.getenv(\"CLASSPATH\") : null, domainDir);\n List<File> systemCP = Utils.classPathToFileList(\n propMap.get(\"system-classpath\"), domainDir);\n\n if (prefixCP.size() > 0 || suffixCP.size() > 0 || envCP.size() > 0\n || systemCP.size() > 0) {\n List<File> mainCP = Utils.classPathToFileList(\n bootstrapJar.getAbsolutePath(), null);\n\n if (mainCP.size() > 0) {\n List<File> completeCP = new ArrayList<>(32);\n completeCP.addAll(prefixCP);\n completeCP.addAll(mainCP);\n completeCP.addAll(systemCP);\n completeCP.addAll(envCP);\n completeCP.addAll(suffixCP);\n\n // Build classpath in proper order - prefix / main / system \n // / environment / suffix\n // Note that completeCP should always have at least 2 elements\n // at this point (1 from mainCP and 1 from some other CP\n // modifier)\n StringBuilder classPath = new StringBuilder(1024);\n Iterator<File> iter = completeCP.iterator();\n classPath.append(Utils.quote(iter.next().getPath()));\n while (iter.hasNext()) {\n classPath.append(File.pathSeparatorChar);\n classPath.append(Utils.quote(iter.next().getPath()));\n }\n result = classPath.toString();\n } else {\n LOGGER.log(Level.WARNING, METHOD, \"cpError\");\n }\n }\n return result;\n }", "public interface ClasspathComponent {\r\n\r\n /**\r\n * Find a class by name within thsi classpath component.\r\n * @param className the name of the class\r\n * @return the <tt>FindResult</tt> object. <tt>null</tt> if no class could be found.\r\n */\r\n public FindResult findClass(String className);\r\n\r\n /**\r\n * Merge all classes in this classpath component into the supplied tree.\r\n * @param model the tree model.\r\n * @param reset whether this is an incremental operation or part of a reset.\r\n * For a reset, no change events will be fired on the tree model.\r\n */\r\n public void mergeClassesIntoTree(DefaultTreeModel model, boolean reset);\r\n\r\n /**\r\n * Add a <tt>ClasspathChangeListener</tt>.\r\n * @param listener the listener\r\n */\r\n public void addClasspathChangeListener(ClasspathChangeListener listener);\r\n\r\n /**\r\n * Remove a <tt>ClasspathChangeListener</tt>.\r\n * @param listener the listener\r\n */\r\n public void removeClasspathChangeListener(ClasspathChangeListener listener);\r\n}", "ClassPath add(ClassPathElement element);", "static URL[] getClassPath() throws MalformedURLException {\n List<URL> classPaths = new ArrayList<>();\n\n classPaths.add(new File(\"target/test-classes\").toURI().toURL());\n\n // Add this test jar which has some frontend resources used in tests\n URL jar = getTestResource(\"jar-with-frontend-resources.jar\");\n classPaths.add(jar);\n\n // Add other paths already present in the system classpath\n ClassLoader classLoader = ClassLoader.getSystemClassLoader();\n URL[] urls = URLClassLoader.newInstance(new URL[] {}, classLoader)\n .getURLs();\n for (URL url : urls) {\n classPaths.add(url);\n }\n return classPaths.toArray(new URL[0]);\n }", "public List<ThreePP> mavenDepToThreePP(File mavenDepFile) throws IOException {\n List<String> lines = Files.readLines(mavenDepFile, Charset.defaultCharset());\n List<ThreePP> threePPs = new ArrayList<ThreePP>();\n for(String line : lines){\n if(line.contains(\"ericsson\")){\n continue;\n }\n String[] mavenCoord = line.split(\":\", 3);\n if(mavenCoord.length!=3){\n throw new IllegalArgumentException(\"Maven dependency: \"+line+\" does not fit normal maven coordinate format ({VENDOR):{ARTIFACT}:{VERSION})\");\n }\n ThreePP threePP = createThreePP(mavenCoord);\n threePPs.add(threePP);\n }\n return threePPs;\n }", "public void execute() throws MojoExecutionException, MojoFailureException {\n checkConfiguration();\n\n String mode;\n String[] bindings;\n String[] classpaths;\n\n if (\"pom\".equalsIgnoreCase(project.getPackaging()))\n {\n getLog().info(\"Not running JiBX binding compiler for pom packaging\");\n \treturn;\t\t// Don't bind jibx if pom packaging\n }\n \n if (isMultiModuleMode()) {\n if (isRestrictedMultiModuleMode()) {\n mode = \"restricted multi-module\";\n } else {\n mode = \"multi-module\";\n }\n bindings = getMultiModuleBindings();\n classpaths = getMultiModuleClasspaths();\n } else {\n mode = \"single-module\";\n bindings = getSingleModuleBindings();\n classpaths = getSingleModuleClasspaths();\n }\n\n if (interfaceClassNames.size() == 0) {\n getLog().info(\"Not running JiBX2WSDL (\" + mode + \" mode) - no class interface files\");\n } else {\n getLog().info(\"Running JiBX binding compiler (\" + mode + \" mode) on \" + interfaceClassNames.size()\n + \" interface file(s)\");\n \n try {\n java.util.List<String> args = new Vector<String>();\n\n for (int i = 0; i< classpaths.length; i++)\n {\n args.add(\"-p\");\n \targs.add(classpaths[i]);\n }\n \n args.add(\"-t\");\n args.add(outputDirectory);\n \n if (customizations.size() > 0) {\n args.add(\"-c\");\n for (String customization : customizations) {\n args.add(customization);\n }\n }\n\n for (Map.Entry<String,String> entry : options.entrySet()) {\n String option = \"--\" + entry.getKey() + \"=\" + entry.getValue();\n if ((entry.getKey().toString().length() == 1) && (Character.isLowerCase(entry.getKey().toString().charAt(0))))\n {\n \tgetLog().debug(\"Adding option : -\" + entry.getKey() + \" \" + entry.getValue());\n \targs.add(\"-\" + entry.getKey());\n \targs.add(entry.getValue());\n }\n else\n {\n \t getLog().debug(\"Adding option: \" + option);\n \t args.add(option);\n }\n }\n if (bindings.length > 0)\n {\n args.add(\"-u\");\n StringBuilder arg = new StringBuilder();\n \tfor (int i = 0 ; i < bindings.length; i++)\n \t{\n \t\tif (arg.length() > 0)\n \t\t\targ.append(';');\n \t\targ.append(bindings[i]);\n \t}\n \targs.add(arg.toString());\n }\n \n if (this.sourceDirectories.size() > 0)\n if (this.sourceDirectories.get(0) != null)\n if (this.sourceDirectories.get(0).toString().length() > 0)\n {\n args.add(\"-s\");\n StringBuilder arg = new StringBuilder();\n \tfor (int i = 0 ; i < sourceDirectories.size(); i++)\n \t{\n \t\tif (arg.length() > 0)\n \t\t\targ.append(';');\n \t\targ.append(sourceDirectories.get(i).toString());\n \t}\n \targs.add(arg.toString()); \t\n }\n if (verbose)\n args.add(\"-v\");\n\n for (String interfaceName : interfaceClassNames)\n {\n \targs.add(interfaceName);\n }\n\n Jibx2Wsdl.main((String[]) args.toArray(new String[args.size()]));\n\t \n } catch (JiBXException e) {\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t\n\t }\n }", "public Path createClasspath() {\n if (isReference()) {\n throw noChildrenAllowed();\n }\n if (this.classpath == null) {\n this.classpath = new Path(getProject());\n }\n setChecked(false);\n return this.classpath.createPath();\n }", "public\n PluginClassLoader\n (\n TreeMap<String,byte[]> contents, \n TreeMap<String,Long> resources, \n PluginID pid, \n PluginType ptype, \n ClassLoader parentLoader\n )\n {\n super(parentLoader == null ? getSystemClassLoader() : parentLoader);\n\n if(contents == null)\n throw new IllegalArgumentException\n\t(\"The class bytes table cannot be (null)!\");\n\n if(resources == null)\n throw new IllegalArgumentException\n\t(\"The resources table cannot be (null)!\");\n \n if(pid == null)\n throw new IllegalArgumentException\n\t(\"The PluginType cannot be (null)!\");\n\n if(ptype == null)\n throw new IllegalArgumentException\n\t(\"The PluginID cannt be (null)!\");\n\n pContents = new TreeMap<String,byte[]>(contents);\n pResources = new TreeMap<String,Long>(resources);\n\n String vendor = pid.getVendor();\n String name = pid.getName();\n VersionID vid = pid.getVersionID();\n\n Path rootPluginPath = new Path(PackageInfo.sInstPath, \"plugins\");\n\n Path pluginPath = \n new Path(rootPluginPath, vendor + \"/\" + ptype + \"/\" + name + \"/\" + vid);\n\n pResourceRootPath = new Path(pluginPath, \".resources\");\n\n LogMgr.getInstance().log\n (LogMgr.Kind.Plg, LogMgr.Level.Finest, \n \"Resource path (\" + pResourceRootPath + \") \" + \n \"for Plugin (\" + vendor + \"/\" + ptype + \"/\" + name + \"/\" + vid + \")\");\n }", "private ClassLoader createBootClassLoader(ClassLoader hostClassLoader) throws MojoExecutionException {\n \n Set<URL> bootClassPath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-test-runtime\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\");\n return new URLClassLoader(bootClassPath.toArray(new URL[] {}), hostClassLoader);\n \n }", "private void addDependencyManagement( Model pomModel )\n {\n List<Artifact> projectArtifacts = new ArrayList<Artifact>( mavenProject.getArtifacts() );\n Collections.sort( projectArtifacts );\n\n Properties versionProperties = new Properties();\n DependencyManagement depMgmt = new DependencyManagement();\n for ( Artifact artifact : projectArtifacts )\n {\n if (isExcludedDependency(artifact)) {\n continue;\n }\n\n String versionPropertyName = VERSION_PROPERTY_PREFIX + artifact.getGroupId();\n if (versionProperties.getProperty(versionPropertyName) != null\n && !versionProperties.getProperty(versionPropertyName).equals(artifact.getVersion())) {\n versionPropertyName = VERSION_PROPERTY_PREFIX + artifact.getGroupId() + \".\" + artifact.getArtifactId();\n }\n versionProperties.setProperty(versionPropertyName, artifact.getVersion());\n\n Dependency dep = new Dependency();\n dep.setGroupId( artifact.getGroupId() );\n dep.setArtifactId( artifact.getArtifactId() );\n dep.setVersion( artifact.getVersion() );\n if ( !StringUtils.isEmpty( artifact.getClassifier() ))\n {\n dep.setClassifier( artifact.getClassifier() );\n }\n if ( !StringUtils.isEmpty( artifact.getType() ))\n {\n dep.setType( artifact.getType() );\n }\n if (exclusions != null) {\n applyExclusions(artifact, dep);\n }\n depMgmt.addDependency( dep );\n }\n pomModel.setDependencyManagement( depMgmt );\n if (addVersionProperties) {\n pomModel.getProperties().putAll(versionProperties);\n }\n getLog().debug( \"Added \" + projectArtifacts.size() + \" dependencies.\" );\n }", "public URL[] getJavaFXClassPath()\n {\n // Ubuntu names its JARs differently, so the entire set of paths is passed in as a command-line argument:\n String javafxJarsProp = commandLineProps.getProperty(\"javafxjars\", null);\n if (javafxJarsProp != null)\n {\n return Arrays.stream(javafxJarsProp.split(\":\")).map(s -> {\n try\n {\n return new File(s).toURI().toURL();\n }\n catch (MalformedURLException e)\n {\n throw new RuntimeException(e);\n }\n }).toArray(URL[]::new);\n }\n\n File javafxLibPath = getJavaFXLibDir();\n\n URL[] urls = new URL[javafxJars.length];\n for (int i = 0; i < javafxJars.length; i++)\n {\n try\n {\n urls[i] = new File(javafxLibPath, javafxJars[i]).toURI().toURL();\n }\n catch (MalformedURLException e)\n {\n throw new RuntimeException(e);\n }\n }\n return urls;\n }", "protected void autoConfigure(String artifactId) {\n InputStream is = getClass().getResourceAsStream(\"/auto-configure/\" + artifactId + \".joor\");\n if (is != null) {\n try {\n // ensure java-joor is downloaded\n DependencyDownloader downloader = getCamelContext().hasService(DependencyDownloader.class);\n // these are extra dependencies used in special use-case so download as hidden\n downloader.downloadHiddenDependency(\"org.apache.camel\", \"camel-joor\", camelContext.getVersion());\n // execute script via java-joor\n String script = IOHelper.loadText(is);\n Language lan = camelContext.resolveLanguage(\"joor\");\n Expression exp = lan.createExpression(script);\n Object out = exp.evaluate(new DefaultExchange(camelContext), Object.class);\n if (ObjectHelper.isNotEmpty(out)) {\n LOG.info(\"{}\", out);\n }\n } catch (Exception e) {\n throw RuntimeCamelException.wrapRuntimeException(e);\n } finally {\n IOHelper.close(is);\n }\n }\n }", "private String relativizeLibraryClasspath(final String property, final File projectDir) {\n final String value = PropertyUtils.getGlobalProperties().getProperty(property);\n if (value == null)\n return null;\n final String[] paths = PropertyUtils.tokenizePath(value);\n final StringBuffer sb = new StringBuffer();\n for (int i=0; i<paths.length; i++) {\n final File f = antProjectHelper.resolveFile(paths[i]);\n if (CollocationQuery.areCollocated(f, projectDir)) {\n sb.append(PropertyUtils.relativizeFile(projectDir, f));\n } else {\n return null;\n }\n if (i+1<paths.length) {\n sb.append(File.pathSeparatorChar);\n }\n }\n if (sb.length() == 0) {\n return null;\n } \n return sb.toString();\n }", "protected Vector getTestSuiteClassPath(String jarPath) {\n Vector result = new Vector();\n if (useOurAgent) {\n result.add(new File(\"javatest-agent/j2meclasses\").getAbsolutePath());\n } else {\n result.add(tckPath + \"lib/agent.jar\");\n result.add(tckPath + \"lib/client.jar\");\n }\n result.add(getHttpClientPath());\n result.add(jarPath);\n return result;\n }", "private void addClasspathElement(String pathElement) {\n\t if (classpathElementsSet.add(pathElement)) {\n\t final File file = new File(pathElement);\n\t if (file.exists()) {\n\t classpathElements.add(file);\n\t }\n\t }\n\t}", "protected StoryClassLoader createStoryClassLoader() throws MalformedURLException {\n return new StoryClassLoader(classpathElements());\n }", "private void handleResources() throws MojoExecutionException {\n List<Resource> resources = project.getResources();\n if (resources.isEmpty()) {\n return;\n }\n Plugin resourcesPlugin = project.getPlugin(ORG_APACHE_MAVEN_PLUGINS + \":\" + MAVEN_RESOURCES_PLUGIN);\n if (resourcesPlugin == null) {\n return;\n }\n executeMojo(\n plugin(\n groupId(ORG_APACHE_MAVEN_PLUGINS),\n artifactId(MAVEN_RESOURCES_PLUGIN),\n version(resourcesPlugin.getVersion()),\n resourcesPlugin.getDependencies()),\n goal(\"resources\"),\n getPluginConfig(resourcesPlugin),\n executionEnvironment(\n project,\n session,\n pluginManager));\n }", "public static PathAnchor classpath() {\n return classpath(Config.class.getClassLoader());\n }", "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}", "public void load(Maussentials plugin);", "public ANTForPlugins()\n {\n super();\n }", "abstract public String getMspluginsDir();", "public Set<String> getPluginDependencyNames() { return pluginDependencyNames; }", "protected void autoConfigureDependencies(String artifactId) {\n InputStream is = getClass().getResourceAsStream(\"/auto-configure/\" + artifactId + \".properties\");\n if (is != null) {\n try {\n String script = IOHelper.loadText(is);\n for (String line : script.split(\"\\n\")) {\n line = line.trim();\n if (line.startsWith(\"dependency=\")) {\n MavenGav gav = MavenGav.parseGav(line.substring(11));\n DependencyDownloader downloader = getCamelContext().hasService(DependencyDownloader.class);\n // these are extra dependencies used in special use-case so download as hidden\n downloader.downloadHiddenDependency(gav.getGroupId(), gav.getArtifactId(), gav.getVersion());\n }\n }\n } catch (Exception e) {\n throw RuntimeCamelException.wrapRuntimeException(e);\n } finally {\n IOHelper.close(is);\n }\n }\n }", "@Override\n\tpublic ResourceLocator getResourceLocator() {\n\t\treturn QFDDPlugin.INSTANCE;\n\t}", "public DemoPluginFactory() {}", "public String constructFullClasspath() {\n\t\t\t\tString cp = super.constructFullClasspath();\n\t\t\t\tcp += File.pathSeparator + soot.options.Options.v().soot_classpath();\n\t\t\t\treturn cp;\n\t\t\t}", "public void execute() throws MojoExecutionException, MojoFailureException {\n \n if (skip) {\n return;\n }\n \n artifactHelper.setRepositories(localRepository, mavenProject.getRemoteArtifactRepositories());\n \n ClassLoader hostClassLoader = createHostClassLoader();\n ClassLoader bootClassLoader = createBootClassLoader(hostClassLoader);\n \n MavenContributionScanner scanner = new MavenContributionScannerImpl();\n ScanResult scanResult = scanner.scan(mavenProject); \n logContributions(scanResult);\n \n MavenRuntime runtime = createRuntime(bootClassLoader, hostClassLoader);\n\n getLog().info(\"Booting test runtime\");\n runtime.start(properties, scanResult.getExtensionContributions());\n getLog().info(\"Fabric3 test runtime booted\");\n\n getLog().info(\"Deloying user contributions\");\n runtime.deploy(scanResult.getUserContributions());\n getLog().info(\"User contributions deployed\");\n \n SurefireTestSuite surefireTestSuite = runtime.getTestSuite();\n getLog().info(\"Executing integration tests\");\n runTests(surefireTestSuite);\n getLog().info(\"Executed integration tests\");\n\n }", "static private URLClassLoader separateClassLoader(URL[] classpath) throws Exception {\n\t\treturn new URLClassLoader(classpath, ClassLoader.getSystemClassLoader().getParent());\r\n\t}", "private static URL[] expandWildcardClasspath() {\n List<URL> ret = new ArrayList<URL>();\n int numBaseXJars = 0;\n String classpath = System.getProperty(\"java.class.path\");\n String[] classpathEntries = classpath.split(System.getProperty(\"path.separator\"));\n for( String currCP : classpathEntries ) {\n File classpathFile = new File(currCP);\n URI uri = classpathFile.toURI();\n URL currURL = null;\n try {\n currURL = uri.toURL();\n } catch (MalformedURLException e) {\n System.out.println(\"Ignoring classpath entry: \" + currCP);\n }\n if( currCP.endsWith( \"*\" ) ) {\n // This URL needs to be expanded\n try {\n File currFile = new File( URLDecoder.decode( currURL.getFile(), \"UTF-8\" ) );\n // Search the parent path for any files that end in .jar\n File[] expandedJars = currFile.getParentFile().listFiles(\n new FilenameFilter() {\n public boolean accept( File aDir, String aName ) {\n return aName.endsWith( \".jar\" );\n }\n } );\n // Add the additional jars to the new search path\n if( expandedJars != null ) {\n for( File currJar : expandedJars ) {\n ret.add( currJar.toURI().toURL() );\n if( currJar.getName().matches(BASEX_LIB_MATCH) ) {\n ++numBaseXJars;\n }\n }\n } else {\n // could not expand due to some error, we can try to\n // proceed with out these jars\n System.out.println( \"WARNING: could not expand classpath at: \"+currFile.toString() );\n }\n } catch( Exception e ) {\n // could not expand due to some error, we can try to\n // proceed with out these jars\n e.printStackTrace();\n }\n }\n else {\n // Just use this unmodified\n ret.add( currURL );\n if( currURL.getFile().matches(BASEX_LIB_MATCH) ) {\n ++numBaseXJars;\n }\n }\n }\n // we've had trouble finding multiple jars of the BaseX of different versions\n // so if we find more than we will accept the one that matches the \"prefered\" version\n // which is hard coded to the version used when this workspace was created\n if( numBaseXJars > 1 ) {\n for( Iterator<URL> it = ret.iterator(); it.hasNext(); ) {\n URL currURL = it.next();\n if( currURL.getFile().matches(BASEX_LIB_MATCH) && !currURL.getFile().matches(PREFERED_BASEX_VER) ) {\n it.remove();\n --numBaseXJars;\n }\n }\n }\n if( numBaseXJars == 0 ) {\n System.out.println( \"WARNING: did not recongnize any BaseX jars in classpath. This may indicate missing jars or duplicate version mismatch.\");\n }\n return ret.toArray( new URL[ 0 ] );\n }", "@Override\n\tpublic Object execute(ExecutionEvent event) throws ExecutionException {\n\t\tIStructuredSelection selection = (IStructuredSelection) HandlerUtil\n\t\t\t\t.getActiveSite(event).getSelectionProvider().getSelection();\n\t\tObject firstElement = selection.getFirstElement();\n\t\ttry {\n\t\t\tif (firstElement instanceof IJavaProject) {\n\t\t\t\tIJavaProject selectedProject = (IJavaProject) firstElement;\n\t\t\t\t// get the current class path entries\n\t\t\t\tIClasspathEntry[] classPaths = selectedProject\n\t\t\t\t\t\t.getResolvedClasspath(false);\n\t\t\t\tBundle thisBundle = Activator.getDefault().getBundle();\n\t\t\t\tString location = thisBundle.getLocation();\n\t\t\t\tString bundlePath = location.substring(location.indexOf(\"file\") + 5);\n\t\t\t\t\n\t\t\t\t// add our classpaths to a IClassPathEntry array and set it to the project\n\t\t\t\tIClasspathEntry[] modifiedClassPaths = null;\n\t\t\t\tIPath libPath = new Path(bundlePath + IPath.SEPARATOR + \"lib\").makeAbsolute();\n\t\t\t\tIPath annotationPath = libPath.append(\"org.eclipse.jconqurr.annotations.jar\");\n\t\t\t\tIClasspathEntry aptCpEntry = JavaCore.newLibraryEntry(annotationPath, null, null);\n\t\t\t\tmodifiedClassPaths = addClassPathEntry(classPaths, aptCpEntry);\n\t\t\t\tIPath directivesPath = libPath.append(\"org.eclipse.jconqurr.directives.jar\");\n\t\t\t\tIClasspathEntry drctvsCpEntry = JavaCore.newLibraryEntry(directivesPath, null, null);\n\t\t\t\tmodifiedClassPaths = addClassPathEntry(modifiedClassPaths, drctvsCpEntry);\n\t\t\t\tselectedProject.setRawClasspath(modifiedClassPaths, null);\n\t\t\t\t\n\t\t\t\t// add JConq nature\n\t\t\t\tIProjectDescription projDescription = selectedProject.getProject().getDescription();\n\t\t\t\tString[] natures = projDescription.getNatureIds();\n\t\t\t\tString[] modifiedNatures = new String[natures.length+1];\n\t\t\t\tSystem.arraycopy(natures, 0, modifiedNatures, 0, natures.length);\n\t\t\t\tmodifiedNatures[natures.length] = JConqurrNature.JCONQ_NATURE;\n\t\t\t\tprojDescription.setNatureIds(modifiedNatures);\n\t\t\t\tselectedProject.getProject().setDescription(projDescription, null);\n\t\t\t}\n\t\t} catch (JavaModelException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} catch (CoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "static List getCommonClasspath(BaseManager mgr) throws IOException {\n\n InstanceEnvironment env = mgr.getInstanceEnvironment();\n String dir = env.getLibClassesPath();\n String jarDir = env.getLibPath();\n\n return ClassLoaderUtils.getUrlList(new File[] {new File(dir)}, \n new File[] {new File(jarDir)});\n }", "public void setClasspath(String classpath) {\n this.classpath = classpath;\n }", "public static void main(String[] args) throws Exception{\n\n if (args.length < 1 || args.length > 2){\n System.err.println(\"Usage: java com.armhold.Provenance lib_dir add_comments\");\n System.err.println(\"\\tlib_dir\\t\\t\\t directory containing your *.jar files\");\n System.err.println(\"\\tadd_comments\\t optional flag (true or false) to avoid printing comments in pom, default is true\");\n System.exit(1);\n }\n\n if(args.length == 2 && args[1].equalsIgnoreCase(\"false\")) ADD_COMMENTS = false;\n\n Provenance provenance = new Provenance();\n provenance.importJarFiles(args[0]);\n }", "public String getClasspath()\n\t{\n\t\treturn classpath;\n\t}", "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}", "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}", "private Path getClasspath() {\n return getRef().classpath;\n }", "private void loadPluginsJar(String jarname){\r\n\t\tURL[] urlList = new URL[1];\r\n\t\ttry{\r\n\t\t\tURL jarUrl = new URL(\"file:\"+jarname+\".jar\");\r\n\t\t\turlList[0] = jarUrl;\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+jarname+\"' could not be loaded (invalid path)\");\r\n\t\t}\r\n\t\t\r\n\t\tURLClassLoader classLoader = new URLClassLoader(urlList);\r\n\t\ttry{\r\n\t\t\tJarFile jfile = new JarFile(jarname+\".jar\");\r\n\t\t\t\r\n\t\t\t// walk through all files of the jar\r\n\t\t\tEnumeration<JarEntry> entries = jfile.entries();\r\n\t\t\twhile(entries.hasMoreElements()){\r\n\t\t\t\tJarEntry entry = entries.nextElement();\r\n\t\t\t\tif(entry.isDirectory() || !entry.getName().endsWith(\".class\")){\r\n\t\t\t\t\tcontinue; // we only care for classes\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString className = entry.getName().substring(0,entry.getName().length()-6).replace('/', '.');\r\n\t\t\t\t\r\n\t\t\t\tClass<IKomorebiPlugin> pluginClass = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tClass<?> cl = classLoader.loadClass(className);\r\n\t\t\t\t\tif(!IKomorebiPlugin.class.isAssignableFrom(cl)){\r\n\t\t\t\t\t\tcontinue; // only care about PlugIn classes\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tpluginClass = (Class<IKomorebiPlugin>) cl;\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Error while registering PlugIns of '\"+jarname+\"': \"+\r\n\t\t\t\t className+\" could not be loaded\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttryRegisterPlugin(jarname, pluginClass);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tjfile.close();\r\n\t\t}catch(IOException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+jarname+\"' could not be loaded (does not exist)\");\r\n\t\t}finally{\r\n\t\t\tif(classLoader != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tclassLoader.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Potential resource leak: class loader could not be closed (reason: \"+e.getMessage()+\")\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<File> getClasspathElements() {\n\t\tthis.parseSystemClasspath();\n\t return classpathElements;\n\t}", "public Class loadClass( Plugin plugin, String className ) throws ClassNotFoundException {\n final PluginClassLoader loader;\n synchronized ( this ) {\n loader = classloaders.get( plugin );\n }\n return loader.loadClass( className );\n }", "@Override\n public Set<String> getLibraryClassPath() {\n return Collections.emptySet();\n }" ]
[ "0.58442867", "0.5098755", "0.50987405", "0.5010966", "0.4917777", "0.48815724", "0.4772927", "0.46852857", "0.4595865", "0.4595521", "0.45950073", "0.4590709", "0.45863727", "0.4582695", "0.45702317", "0.4567472", "0.4566405", "0.4553128", "0.45509058", "0.45464677", "0.45461538", "0.45390853", "0.45085597", "0.44875523", "0.44752508", "0.44435996", "0.44227666", "0.44034672", "0.43953094", "0.43785807", "0.43749347", "0.4368158", "0.4364019", "0.4362297", "0.43538097", "0.43467635", "0.4339298", "0.43276957", "0.43260157", "0.43103558", "0.42994547", "0.42993706", "0.42980948", "0.42977303", "0.42974076", "0.4283138", "0.42816007", "0.42640972", "0.42623585", "0.42543957", "0.42477447", "0.42430225", "0.42411283", "0.4238619", "0.42332128", "0.4223642", "0.42231658", "0.421812", "0.42116416", "0.41963503", "0.41915533", "0.418254", "0.41816115", "0.4170357", "0.4169291", "0.41672873", "0.4155772", "0.41485816", "0.41394046", "0.413107", "0.41171142", "0.41142526", "0.410803", "0.41055027", "0.41021842", "0.41007453", "0.40950143", "0.4093353", "0.40920994", "0.4087732", "0.40846148", "0.4079125", "0.40642434", "0.4059597", "0.40559942", "0.4053815", "0.40474692", "0.40447485", "0.4029833", "0.40297636", "0.4023946", "0.40209255", "0.40195385", "0.40191433", "0.4017484", "0.40126756", "0.4012223", "0.4010847", "0.40087637", "0.40042496" ]
0.51599294
1
/ access modifiers changed from: protected
public int zzB() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\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}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
/ renamed from: zzFG
public zzse clone() throws CloneNotSupportedException { return (zzse) super.clone(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final zzgy zzgb() {\n }", "void mo28307a(zzgd zzgd);", "private void kk12() {\n\n\t}", "void mo57277b();", "void mo57278c();", "void mo21076g();", "static void feladat9() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "void mo72113b();", "static void feladat4() {\n\t}", "static void feladat6() {\n\t}", "public void mo21782G() {\n }", "static void feladat7() {\n\t}", "void mo41086b();", "private zza.zza()\n\t\t{\n\t\t}", "public void mo21781F() {\n }", "void mo21072c();", "private void m50367F() {\n }", "public abstract void mo70713b();", "void mo56163g();", "void mo21073d();", "void mo72114c();", "public void skystonePos4() {\n }", "private void m50366E() {\n }", "public void mo12628c() {\n }", "void mo41083a();", "private static void cajas() {\n\t\t\n\t}", "void mo119582b();", "public void mo21779D() {\n }", "void mo80457c();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo2624j();", "static void feladat8() {\n\t}", "public void skystonePos6() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "public void func_70305_f() {}", "void mo80455b();", "public void method_4270() {}", "void mo67924c();", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "C2841w mo7234g();", "public void mo1406f() {\n }", "void mo12637b();", "void mo21074e();", "public void mo21787L() {\n }", "public void stg() {\n\n\t}", "void mo21075f();", "void mo12638c();", "public abstract void mo6549b();", "void mo54405a();", "static void feladat3() {\n\t}", "void mo17012c();", "public abstract void mo56925d();", "void mo88524c();", "void mo21070b();", "public abstract String mo11611b();", "public abstract String mo118046b();", "public void mo21825b() {\n }", "public void mo21785J() {\n }", "public void mo21877s() {\n }", "public void mo3376r() {\n }", "void mo60893b();", "void mo57275a();", "public void mo97908d() {\n }", "public abstract void mo42331g();", "protected void mo6255a() {\n }", "public abstract String mo41079d();", "public void mo3749d() {\n }", "public void mo4359a() {\n }", "public void mo115190b() {\n }", "static void feladat5() {\n\t}", "void mo17021c();", "void mo17023d();", "void mo119581a();", "public void mo21879u() {\n }", "public abstract void mo27386d();", "void mo27575a();", "protected boolean func_70814_o() { return true; }", "public void mo21793R() {\n }", "void mo80452a();", "public abstract void mo4371a(zzwt zzwt);", "public void mo21780E() {\n }", "public abstract String mo9239aw();", "void mo54435d();", "public void mo21878t() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "void mo28306a();", "public abstract String mo13682d();", "private void level7() {\n }", "abstract String mo1748c();", "void mo17013d();", "public final void zzjk() {\n }", "public void func_70295_k_() {}", "public final void mo91715d() {\n }", "void mo88523b();", "public void m23075a() {\n }", "public void mo56167c() {\n }" ]
[ "0.66968644", "0.63986534", "0.6391062", "0.6363564", "0.6296372", "0.6255059", "0.6209222", "0.620531", "0.6201615", "0.6179147", "0.61422694", "0.61050045", "0.60893", "0.60754555", "0.60619056", "0.60423875", "0.6042299", "0.60398066", "0.603103", "0.60114145", "0.60077757", "0.5984711", "0.59838295", "0.5981188", "0.59810287", "0.59784734", "0.5969009", "0.59618706", "0.59610707", "0.5960155", "0.5958759", "0.5958293", "0.5937817", "0.59336156", "0.5930401", "0.5925073", "0.591202", "0.5909653", "0.590762", "0.59012884", "0.5863283", "0.5862475", "0.58608437", "0.58585405", "0.58528763", "0.58493704", "0.5843595", "0.58421016", "0.5842096", "0.5840441", "0.5836708", "0.58343035", "0.5834039", "0.5829217", "0.5826465", "0.5822379", "0.58186495", "0.58140737", "0.58124846", "0.5811698", "0.58038527", "0.5803423", "0.58025324", "0.5797027", "0.5796785", "0.57843435", "0.57752424", "0.5773534", "0.5769696", "0.5756432", "0.57503265", "0.57481456", "0.5748086", "0.5747748", "0.57475805", "0.5729855", "0.57298124", "0.5727228", "0.5727177", "0.5725467", "0.57251906", "0.5724483", "0.57197446", "0.57181436", "0.571733", "0.5715289", "0.57125396", "0.57108337", "0.5704823", "0.57042974", "0.56960887", "0.5691342", "0.5688244", "0.5687339", "0.5686677", "0.5686328", "0.56826496", "0.56794673", "0.5675953", "0.5675811", "0.56755584" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_events, container, false); ButterKnife.inject(this, view); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
Customer() sets the default variables for this class.
public Customer() { this.name = ""; this.parcelID = ""; this.seqNo = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Customer() // default constructor to initialize data\r\n\t{\r\n\t\tthis.address = null;\r\n\t\tthis.name = null;\r\n\t\tthis.phoneNumber = null;\r\n\t\t// intializes the data\r\n\t}", "public Customer () {\n\t\tsuper();\n\t}", "public Customer() {\n\t\tsuper();\n\t}", "public Customer() {\n name = \"N.A.\";\n surname = \"N.A.\";\n address = \"N.A.\";\n email = \"N.A.\";\n }", "Customer() \n\t{\n\t}", "TypicalCustomer() {\n super();\n }", "Customer(){}", "Customer() {\n }", "public Customer(){\n\t \n }", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public Customer() {\n\t}", "public Customer() {\n\t}", "private CustomerDetails initCustomerDetails() {\n CustomerDetails mCustomerDetails = new CustomerDetails();\n mCustomerDetails.setPhone(\"085310102020\");\n mCustomerDetails.setFirstName(\"user fullname\");\n mCustomerDetails.setEmail(\"[email protected]\");\n return mCustomerDetails;\n }", "public CustomerNew () {\n\t\tsuper();\n\t}", "public Customer() {\r\n }", "public DefaultCustAddress() {\n\t\tsetAddress1(\"\");\n\t\tsetAddress2(\"\");\n\t\tsetAddress3(\"\");\n\t\tsetCity(\"\");\n\t\tsetState(\"\");\n\t\tsetZip(\"\");\n\t\tsetCountryCode(PROVISION.SERVICE.COUNTRY.shortValue());\n\t\tsetFranchiseTaxCode(PROVISION.SERVICE.SERVICE_FRANCHISE_TAX.shortValue());\n\t\tsetCounty(\"\");\n\n\t\t// setAddress1(\"355 S Grand Ave\");\n\t\t// setAddress2(\"\");\n\t\t// setAddress3(\"\");\n\t\t// setCity(\"Los Angeles\");\n\t\t// setCountryCode(BILLING.customerCountryCode.shortValue());\n\t\t// setCounty(\"Los Angeles\");\n\t\t// setFranchiseTaxCode(BILLING.customerFranchiseTaxCode.shortValue());\n\t\t// setState(\"CA\");\n\t\t// setZip(\"90071\");\n\t}", "public Customer() { }", "public Customer(){}", "public Customer()\n{\n this.firstName = \"noFName\";\n this.lastName = \"noLName\";\n this.address = \"noAddress\";\n this.phoneNumber = 0;\n this.emailAddress = \"noEmail\";\n \n}", "public Customer() {\n }", "public Customer() {\n }", "public Customer(){\n\n }", "public Customer() {\n\n }", "public Customer()\n {\n\n }", "public PreferredCustomer() \n\t{\n\t\tsuper();\n\t\tcustomerPurchase = 0; \n\t}", "private CustomerReader()\r\n\t{\r\n\t}", "public Customers(){\r\n \r\n }", "public Customer (\n\t\t Integer in_customerId\n\t\t) {\n\t\tsuper (\n\t\t in_customerId\n\t\t);\n\t}", "public CustomerLogin() {\n super();\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public Customer (String customerName, String address,\n String telephoneNumber){\n this.customerName = customerName;\n this.address = address;\n this.telephoneNumber = telephoneNumber;\n }", "@PostConstruct\n\tpublic void initializer()\n\t{\n\t\tCustomerDTO customerDTO = new CustomerDTO();\n\t\tcustomerDTO.setFuellid(true);\n\t\tcustomerDTO.setCity(\"DL\"); \n\t}", "public CustomerReader() {\r\n }", "public CekCustomer() {\n initComponents();\n serviceCekCustomer = new CekCustomerServiceImp();\n setLocationRelativeTo(null);\n this.view();\n }", "public Customer(String name) {\n this.name = name;\n }", "public Customer(String name) {\n this.name=name;\n }", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "private Customer(CustomerBuilder customerBuilder) {\n id = customerBuilder.id;\n friends = customerBuilder.friends;\n purchases = customerBuilder.purchases;\n }", "public CustomerObj(String user_first_name, String user_last_name, String user_email) {\n \n this.user_first_name = user_first_name;\n this.user_last_name = user_last_name;\n this.user_email = user_email;\n \n }", "protected void setCustomer(Customer customer) {\n this.customer = customer;\n }", "public Customer() {\n\t\tcustref++;\n\t}", "public InputCustomers() {\n initComponents();\n setLocationRelativeTo(null);\n setAsObserver();\n txtSearch.setText(\"-Select a option to search-\");\n libUpdate.setEnabled(false);\n libRemove.setEnabled(false);\n newCustomermessage.setVisible(false);\n newSectionmessage.setVisible(false);\n newjobrolemessage.setVisible(false);\n loadCustomers();\n loadSections();\n loadJobRoles();\n }", "@DOpt(type = DOpt.Type.ObjectFormConstructor)\n\t@DOpt(type = DOpt.Type.RequiredConstructor)\n\tpublic Customer( @AttrRef(\"name\") String name,\n\t\t\t@AttrRef(\"gender\") Gender gender,\n\t\t\t@AttrRef(\"dob\") Date dob, \n\t\t\t@AttrRef(\"address\") Address address, \n\t\t\t@AttrRef(\"email\") String email,\n\t\t\t@AttrRef(\"phone\") String phone) {\n\t\tthis(null, name, gender,dob, address, email, phone, null);\n\t}", "public Customer(int custNum) \n\t{\n\t\t// stores the randomly assigned task where 1 is buying stamps, 2 is mailing a letter, and 3 is mailing a package\n\t\ttask = (int)(Math.random()*3 )+ 1; // randomly generates a number from 1 to 3\n\t\tcustomerNumber = custNum; // keeps track of which customer this is\n\t}", "public Customers(int customerId, String customerName, String customerAddress, String customerPostalCode,\n String customerPhone, int divisionId, String divisionName, int countryId, String countryName) {\n this.customerId = customerId;\n this.customerName = customerName;\n this.customerAddress = customerAddress;\n this.customerPostalCode = customerPostalCode;\n this.customerPhone = customerPhone;\n this.divisionId = divisionId;\n this.divisionName = divisionName;\n this.countryId = countryId;\n this.countryName = countryName;\n }", "public Customer(String name, String email, String password, double amount, LocalDate regDate) {\r\n\t\tthis.custId = idCounter++;\r\n\t\tthis.name = name;\r\n\t\tthis.email = email;\r\n\t\tthis.password = password;\r\n\t\tthis.amount = amount;\r\n\t\tthis.regDate = regDate;\r\n\t}", "public CustomerDatabase(){\n\t\tlist = new ArrayList<Customer>();\n\t}", "public CustomerBase(ArrayList<CustomerWithGoods> allCustomers) {\n\t\tsuper();\n\t\tthis.allCustomers = allCustomers;\n\t}", "public Customer(int id, String name, int age, String address) {\r\n super(id, name, age, address);\r\n }", "public Customer(String name)\n {\n this.name = name;\n this.happy = 5;\n }", "public Customer(String name, double initialAmount) { //constructor for our customer class\r\n this.name = name;\r\n addId++;\r\n this.custId=addId;\r\n this.transactions = new ArrayList<>();\r\n balance=initialAmount;\r\n transactions.add(initialAmount);\r\n }", "public Customer(String FirstName, String LastName, String Address, String Nationality, String eMail, int phoneNumber) {\n\t\tthis.FirstName = FirstName ;\n\t\tthis.LastName = LastName ;\n this.Address = Address;\n this.Nationality = Nationality;\n this.eMail = eMail;\n this.phoneNumber = phoneNumber;\n\t}", "public Customer(String name, double amount)\n {\n customer = name;\n sale = amount;\n }", "public Customer(String customerName, double billAmount, char discountType) {\n this.customerName = customerName;\n this.billAmount = billAmount;\n switch(discountType) {\n case 'd':\n case 'D':\n this.discountStrategy = new NormalDiscountStrategy();\n break;\n case 'L':\n case 'l':\n this.discountStrategy = new LiquidationStrategy();\n break;\n case 'S':\n case 's':\n this.discountStrategy = new SaleStrategy();\n }\n }", "public Account(String customerName, String customerEmail, String customerPhone) {\n this(\"99999\", 100.55, customerName, customerEmail, customerPhone);\n // created from IntelliJ's Generate - but we used them inside of the constructor above, using \"this\"\n// this.customerName = customerName;\n// this.customerEmail = customerEmail;\n// this.customerPhone = customerPhone;\n }", "public CustomerPolicyProperties() {\n }", "public MyCustomer(CustomerAgent cmr, int num){\n\t this.cmr = cmr;\n\t tableNum = num;\n\t state = CustomerState.NO_ACTION;\n\t}", "private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }", "public Customer(int customerID, String name, String address, String email){\n\t\t\n\t\tthis.customerID = customerID;\n\t\tthis.name = name;\n\t\tthis.address = address;\n\t\tthis.email = email;\n\t}", "public void setCustomer(Integer customer) {\n this.customer = customer;\n }", "TypicalCustomer(double arrivalTime, State state) {\n super(arrivalTime, state);\n }", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "public Customer(int custId, String name, String email, String password, double amount, LocalDate regDate) {\r\n\t\tsuper();\r\n\t\tthis.custId = custId;\r\n\t\tthis.name = name;\r\n\t\tthis.email = email;\r\n\t\tthis.password = password;\r\n\t\tthis.amount = amount;\r\n\t\tthis.regDate = regDate;\r\n\t}", "protected NewsCustomerSurveyExample(NewsCustomerSurveyExample example) {\r\n this.orderByClause = example.orderByClause;\r\n this.oredCriteria = example.oredCriteria;\r\n }", "public DefaultProperties() {\n\t\t// Festlegung der Werte für Admin-Zugang\n\t\tthis.setProperty(\"admin.username\", \"admin\");\n\t\tthis.setProperty(\"admin.password\", \"password\");\n\t\tthis.setProperty(\"management.port\", \"8443\");\n\n\t\t// Festlegung der Werte für CouchDB-Verbindung\n\t\tthis.setProperty(\"couchdb.adress\", \"http://localhost\");\n\t\tthis.setProperty(\"couchdb.port\", \"5984\");\n\t\tthis.setProperty(\"couchdb.databaseName\", \"profiles\");\n\n\t\t// Festlegung der Werte für Zeitvergleiche\n\t\tthis.setProperty(\"server.minTimeDifference\", \"5\");\n\t\tthis.setProperty(\"server.monthsBeforeDeletion\", \"18\");\n\t}", "public void initializeDefault() {\n\t\tthis.numAuthorsAtStart = 5;\n\t\tthis.numPublicationsAtStart = 20;\n\t\tthis.numCreationAuthors = 0;\n\t\tthis.numCreationYears = 10;\n\n\t\tyearInformation = new DefaultYearInformation();\n\t\tyearInformation.initializeDefault();\n\t\tpublicationParameters = new DefaultPublicationParameters();\n\t\tpublicationParameters.initializeDefault();\n\t\tpublicationParameters.setYearInformation(yearInformation);\n\t\tauthorParameters = new DefaultAuthorParameters();\n\t\tauthorParameters.initializeDefault();\n\t\ttopicParameters = new DefaultTopicParameters();\n\t\ttopicParameters.initializeDefault();\n\t}", "public void setCustomer(org.tempuri.Customers customer) {\r\n this.customer = customer;\r\n }", "public Customer(int i) {\r\n \t\t\t\t\t\t\tiD = i;\r\n \t\t\t\t\t\t }", "public PreferredCustomer(String firstName) {\n\t\tsuper(firstName); // Explicit Parent class Constructor Call\n\t\tSystem.out.println(\"Constructor PreferredCustomer\");\n\t}", "public Customer(String address, String name, String phoneNumber) {\r\n\t\tsuper();\r\n\t\tthis.address = address;\r\n\t\tthis.name = name;\r\n\t\tthis.phoneNumber = phoneNumber;\r\n\t}", "public Customer(String name, String address, String phoneNumber) {\r\n\t\tsuper(name, address, phoneNumber);\r\n\t\tsuper.setId(CUSTOMER_STRING + (IdServer.instance().getId()));\r\n\t}", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "public ConstructorsDemo() \n\t {\n\t x = 5; // Set the initial value for the class attribute x\n\t }", "protected Customers(int ID, String first, String last, Adress adress, String mail, String phone, int typeCusto) {\r\n // Bouml preserved body begin 00040A82\r\n\t this.adress = adress;\r\n\t this.firstName = first;\r\n\t this.lastName = last;\r\n\t this.phoneNumber = phone;\r\n this.email = mail;\r\n\t this.ID = ID;\r\n //Mdero\r\n this.typeCusto = typeCusto;\r\n // Bouml preserved body end 00040A82\r\n if (!customersMap.containsKey(ID)&&ID!=-1)\r\n customersMap.put(ID, this);\r\n }", "public Customer(String name, String surname, String address, String email, long tel) {\n this.name = name;\n this.surname = surname;\n this.address = address;\n this.email = email;\n this.tel = tel;\n }", "public Customer(String username, String firstname, String lastname, String password) {\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.password = password;\n }", "public Customer(String firstName, String lastName, LocalDateTime dob, String emailAddress, int customerID,\n String temporaryCustomerID, boolean loyaltyMember, boolean joinLoyaltyScheme,\n int loyaltyPointsNumber, String password, String username) {\n super(firstName, lastName, dob, emailAddress);\n this.customerID = customerID;\n this.temporaryCustomerID = temporaryCustomerID;\n this.loyaltyMember = loyaltyMember;\n this.joinLoyaltyScheme = joinLoyaltyScheme;\n this.loyaltyPointsNumber = loyaltyPointsNumber;\n this.password = password;\n this.username = username;\n }", "public Customer(int customer_ID, String customer_Name, String address, String postalCode, String phone, String createdDate, String createdBy, String lastUpdate, String lastUpdatedBy, int divisionID) {\n this.customer_ID = customer_ID;\n this.customer_Name = customer_Name;\n this.address = address;\n this.postalCode = postalCode;\n this.phone = phone;\n this.createdDate = createdDate;\n this.createdBy = createdBy;\n this.lastUpdate = lastUpdate;\n this.lastUpdatedBy = lastUpdatedBy;\n this.divisionID = divisionID;\n }", "public CreateCustomer() {\n initComponents();\n }", "public Customer(String name, String pass, String email, String state, String city, String number) {\n\t\tsuper(name, pass, email, state, city, number);\n\t\tcart = new Cart();\n\t}", "public CustomerTableModel() {\n\t\t\tsetColumnNames(COLUMN_TITLES);\n\t\t\tsetColumnClasses(COLUMN_CLASSES);\n\t\t}", "public CustomerManagement() {\n initComponents();\n setLocationRelativeTo(null);\n loadTable();\n }", "public DemonstrationApp()\n {\n // Create Customers of all 3 types\n s = new Senior(\"alice\", \"123 road\", 65, \"555-5555\", 1);\n a = new Adult(\"stacy\", \"123 lane\", 65, \"555-1111\", 2);\n u = new Student(\"bob\", \"123 street\", 65, \"555-3333\", 3);\n \n //Create an account for each customer \n ca = new CheckingAccount(s,1,0);\n sa = new SavingsAccount(a,2,100);\n sav = new SavingsAccount(u,3,1000);\n \n //Create a bank\n b = new Bank();\n \n //Create a date object\n date = new Date(2019, 02, 12);\n }", "private Default()\n {}", "public CustomerGUI() {\n\t initComponents();\n\t }", "public void initDefaultValues() {\n setOrderActive(1);\n setProductQuantity(1);\n setBillingPhone1Blocked(0);\n setBillingPhone2Blocked(0);\n setOrderAvailabilityStatus(1);\n setDeliveryStatus(1);\n setMailedReminderToVendorStatus(0);\n setOrderCancelRequestStatus(0);\n setOrderCancellationToVendorStatus(0);\n setDisputeRaisedStatus(0);\n setOrderAcceptNewsletter(1);\n setOrderAcceptPromotionalMaterial(1);\n setBillingAdvanceAmount(0);\n setBillingBalanceAmount(0);\n setBillingGrossAmount(0f);\n setBillingMarginAmount(0f);\n setBillingNettCost(0f);\n setBillingPaymentGatewayRate(0f);\n setBillingStateId(0);\n setBillingTaxrate(0f);\n setBillingTotalAmount(0f);\n setCarYear(0);\n setCustomint1(0);\n setCustomint2(0);\n setCustPaymentMode(0);\n setCustPaymentStatus(0);\n setInvoiceId(0);\n setVendorPaymentMode(0);\n setShipmentRate(0);\n setShipmentCountryId(0);\n setShipmentCityId(0);\n setOrderType(0);\n setOrderStatus(0);\n setOrderRefundType(0);\n setOrderPriority(0);\n setOrderBulkType(0);\n setOrderCorporateType(0);\n setShipmentCityId(0);\n setShipmentCountryId(0);\n setShipmentRate(0f);\n setShipmentStateId(0);\n setOrderCancellationType(0);\n }", "public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"[email protected]\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"[email protected]\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"[email protected]\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"[email protected]\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }", "public Customer(String customerName, String mobileNo, String email, Address address, String role) {\n\t\tsuper();\n\t\tthis.customerName = customerName;\n\t\tthis.mobileNo = mobileNo;\n\t\tthis.email = email;\n\t\tthis.address = address;\n\t\tthis.role = role;\n\t}", "public Customer(String name, String address, String phone) {\n\t\tthis.customerID = generateID(6);\n\t\tthis.name = name;\n\t\tthis.address = address;\n\t\tthis.phone = phone;\n\t}", "public void setDefaultData()\n\t\t{\n\t\t\t\n\t\t\t//Creating demo/default ADMIN:\n\t\t\t\n\t\t\tUser testAdmin = new User(\"ADMIN\", \"YAGYESH\", \"123\", 123, Long.parseLong(\"7976648278\"));\n\t\t\tdata.userMap.put(testAdmin.getUserId(), testAdmin);\n\t\t\t\n\t\t\t//Creating demo/default CUSTOMER:\n\t\t\tUser tempCustomer = new User(\"CUSTOMER\", \"JOHN\", \"124\", 124, Long.parseLong(\"9462346459\"));\n\t\t\tdata.userMap.put(tempCustomer.getUserId(), tempCustomer);\n\t\t\t\n\t\t\t//Creating Airports:\n\t\t\tAirport airport1 = new Airport(\"Mumbai Chattrapathi Shivaji International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"MUMBAI\", \"BOM\");\n\t\t\t\n\t\t\tAirport airport2 = new Airport(\"Bangalore Bengaluru International Airport \",\n\t\t\t\t\t\t\t\t\t\t\t\"Bangalore\", \"BLR\");\n\t\t\t\n\t\t\tAirport airport3 = new Airport(\"New Delhi Indira Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"New Delhi \", \"DEL\");\n\n\t\t\tAirport airport4 = new Airport(\"Hyderabad Rajiv Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"Hyderabad\", \"HYD\");\n\n\t\t\tdata.airportMap.put(airport1.getAirportCode(), airport1);\n\t\t\tdata.airportMap.put(airport2.getAirportCode(), airport2);\n\t\t\tdata.airportMap.put(airport3.getAirportCode(), airport3);\n\t\t\tdata.airportMap.put(airport4.getAirportCode(), airport4);\n\t\t\t\n\t\t\t//Creating DateTime Objects:\n\t\t\t\n\t\t\tDate dateTime1 = null;\n\t\t\tDate dateTime2 = null;\n\t\t\tDate dateTime3 = null;\n\t\t\tDate dateTime4 = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdateTime1 = dateFormat.parse(\"12-01-2020 05:12:00\");\n\t\t\t\tdateTime2 = dateFormat.parse(\"02-02-2020 23:45:00\");\n\t\t\t\tdateTime3 = dateFormat.parse(\"12-01-2020 07:12:00\");\n\t\t\t\tdateTime4 = dateFormat.parse(\"03-02-2020 01:45:00\");\n\t\t\t}\n\t\t\tcatch (ParseException e) \n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Creating Schedules:\n\t\t\tSchedule schedule1 = new Schedule(airport1, airport2, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule2 = new Schedule(airport2, airport3, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule3 = new Schedule(airport4, airport1, dateTime4, dateTime2, dateFormat);\n\t\t\tSchedule schedule4 = new Schedule(airport3, airport4, dateTime4, dateTime2, dateFormat);\n\t\t\t\n\t\t\t//Creating Flights:\n\t\t\tFlight flight1 = new Flight(\"AB3456\", \"INDIGO\", \"A330\", 293);\n\t\t\tFlight flight2 = new Flight(\"BO6789\", \"JET AIRWAYS\", \"777\", 440);\n\t\t\tdata.flightMap.put(flight1.getFlightNumber(), flight1);\n\t\t\tdata.flightMap.put(flight2.getFlightNumber(), flight2);\n\t\t\t\n\t\t\t//Creating Scheduled Flights:\n\t\t\tScheduledFlight scheduledFlight1 = new ScheduledFlight(flight1, 293, schedule1);\n\t\t\tScheduledFlight scheduledFlight2 = new ScheduledFlight(flight2, 440, schedule2);\n\t\t\tScheduledFlight scheduledFlight3 = new ScheduledFlight(flight1, 293, schedule3);\n\t\t\tScheduledFlight scheduledFlight4 = new ScheduledFlight(flight2, 440, schedule4);\n\t\t\t\n\t\t\t//Creating List of Scheduled Flights:\n\t\t\tdata.listScheduledFlights.add(scheduledFlight1);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight2);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight3);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight4);\n\n\t\t}", "public void setCustomerName(String customerName) \n {\n this.customerName = customerName;\n }", "public Customer(Person person) {\n this(person.getName(), person.getLastName(), person.getSex(), person.getBirthDay(), 0);\n }", "public PnNewCustomer() {\n initComponents();\n }", "@Autowired\n public Account(Customer customer) {\n this.customer = customer;\n accountNumber = AccountNumberGenerator.getAccountNumber();\n balance = ConstantUtils.OPENING_BALANCE;\n }", "public void setCustomer(final Customer customer) {\n\t\tthis.customer = customer;\n\t}", "public OneTimeCustomerOrder() {\n\n\t\tPropertiesConfiguration config = new PropertiesConfiguration();\n\n\t\ttry {\n\n\t\t\tconfig.load(\"application.properties\");\n\n\t\t\tservicePath = config.getString(\"s4cld.onetimecustomerrecord_servicepath\");\n\n\t\t\tresource = config.getString(\"s4cld.onetimecustomerrecord_resource\");\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t}", "protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}", "public Customer(String userName, String password, String status, double point){\r\n this.userName = userName;\r\n this.password = password; \r\n this.status = status;\r\n this.point = point;\r\n }", "public CustomerEvent()\r\n {\r\n this(0, 0, ENTER);\r\n }", "public CustomerSummary() {\n initComponents();\n }" ]
[ "0.7638786", "0.75593364", "0.75542426", "0.7545134", "0.7435512", "0.72643685", "0.7222049", "0.7213423", "0.70940447", "0.7070467", "0.70281506", "0.70281506", "0.69196934", "0.6900672", "0.6821216", "0.678923", "0.6762347", "0.67150223", "0.6698915", "0.6672763", "0.6672763", "0.6642667", "0.6550282", "0.6514589", "0.6471852", "0.6460874", "0.6451982", "0.6365999", "0.6347675", "0.6294385", "0.62810975", "0.6261058", "0.6242343", "0.62334216", "0.6221806", "0.6213776", "0.62132335", "0.6160717", "0.615696", "0.61400396", "0.61317056", "0.6126817", "0.6123808", "0.6084368", "0.60805374", "0.60705125", "0.6065358", "0.6053237", "0.60375667", "0.60281175", "0.60148764", "0.60105914", "0.59954244", "0.59929115", "0.598597", "0.5983627", "0.5971134", "0.5962398", "0.5949482", "0.5948081", "0.5944365", "0.5938635", "0.59308517", "0.5925655", "0.5922221", "0.5914915", "0.59075886", "0.59073824", "0.5900415", "0.5888677", "0.5873764", "0.5867294", "0.585353", "0.5851989", "0.58508587", "0.5850714", "0.5847432", "0.58339953", "0.58308333", "0.58202606", "0.58063626", "0.57952464", "0.5792967", "0.5788143", "0.5786302", "0.5776611", "0.57712424", "0.57557505", "0.57488126", "0.5746098", "0.5744635", "0.5743665", "0.5740035", "0.57348377", "0.57291067", "0.5728024", "0.5726546", "0.5726387", "0.57260615", "0.5723128" ]
0.747475
4
Parcel(String s) receives a string containing one line read from the parcel.txt file and sets the variables according to the provided data
public Customer(String s) { String [] sr = s.split(","); try { if(sr.length == 3) { try { this.seqNo = Integer.parseInt(sr[0].trim()); this.name = sr[1].trim(); this.parcelID = sr[2].trim(); } catch(NumberFormatException e) { System.out.println("Error in input file. Cannot convert to int" + e.getMessage()); } catch(ArrayIndexOutOfBoundsException e) { System.out.println("Error in input file. To few parts" + e.getMessage()); } } else { throw new CustomerStringFormatException(); } }catch(CustomerStringFormatException cfse) { System.out.println("String format error: Cannot convert string to Customer."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readFromParcel(Parcel in) \r\n\t{\n\t\tthis.id \t\t\t= in.readInt();\r\n\t\tthis.desc\t\t\t= in.readString();\r\n\t\tthis.titulo_imagem \t= in.readString();\r\n\t\tthis.titulo_som\t\t= in.readString();\r\n\t\tthis.ext\t\t\t= in.readString();\r\n\t\tthis.tipo\t\t\t= in.readString().charAt(0);\r\n\t\tthis.cmd\t\t\t= in.readInt();\r\n\t\tthis.atalho\t\t\t= (in.readInt() == 1) ? true : false;\r\n\t\tthis.pagina\t\t\t= in.readInt();\r\n\t\tthis.ordem\t\t\t= in.readInt();\r\n\t}", "private void readFromParcel(Parcel in){\n name = in.readString();\n phone = in.readString();\n email = in.readString();\n }", "public void my_readFromParcel(Parcel in) {\n x = in.readFloat();\n y = in.readFloat();\n }", "public C0902id createFromParcel(Parcel parcel) {\n String str = null;\n int n = C0173a.m313n(parcel);\n HashSet hashSet = new HashSet();\n int i = 0;\n C0900ib ibVar = null;\n String str2 = null;\n C0900ib ibVar2 = null;\n String str3 = null;\n while (parcel.dataPosition() < n) {\n int m = C0173a.m311m(parcel);\n switch (C0173a.m292M(m)) {\n case 1:\n i = C0173a.m305g(parcel, m);\n hashSet.add(Integer.valueOf(1));\n break;\n case 2:\n str3 = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(2));\n break;\n case 4:\n C0900ib ibVar3 = (C0900ib) C0173a.m294a(parcel, m, (Creator<T>) C0900ib.CREATOR);\n hashSet.add(Integer.valueOf(4));\n ibVar2 = ibVar3;\n break;\n case 5:\n str2 = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(5));\n break;\n case 6:\n C0900ib ibVar4 = (C0900ib) C0173a.m294a(parcel, m, (Creator<T>) C0900ib.CREATOR);\n hashSet.add(Integer.valueOf(6));\n ibVar = ibVar4;\n break;\n case 7:\n str = C0173a.m312m(parcel, m);\n hashSet.add(Integer.valueOf(7));\n break;\n default:\n C0173a.m298b(parcel, m);\n break;\n }\n }\n if (parcel.dataPosition() == n) {\n return new C0902id(hashSet, i, str3, ibVar2, str2, ibVar, str);\n }\n throw new C0174a(\"Overread allowed size end=\" + n, parcel);\n }", "amx(Parcel parcel) {\n int n = 1;\n this.a = parcel.readInt();\n this.b = parcel.readInt();\n if (parcel.readInt() != n) {\n n = 0;\n }\n this.c = n;\n }", "public void ler(String[] lineData) {\n this.setRoomId(Integer.parseInt(lineData[0]));\n this.setHostId(Integer.parseInt(lineData[1]));\n this.setRoomType(lineData[2]);\n this.setCountry(lineData[3]);\n this.setCity(lineData[4]);\n this.setNeighbourhood(lineData[5]);\n this.setReviews(Integer.parseInt(lineData[6]));\n this.setOverallSatisfaction(Double.parseDouble(lineData[7]));\n this.setAccommodates(Integer.parseInt(lineData[8]));\n this.setBedrooms(Double.parseDouble(lineData[9]));\n this.setPrice(Double.parseDouble(lineData[10]));\n this.setPropertyType(lineData[11]);\n }", "private void loadPlanets(Scanner sc){\n\t\twhile(sc.hasNextLine()){\n\t\t\tString line = sc.nextLine();\n\t\t\tString [] split = line.split(\",\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tdouble x = Double.parseDouble(split[1]);\n\t\t\t\tdouble y = Double.parseDouble(split[2]);\n\t\t\t\tint population = Integer.parseInt(split[3]);\n\t\t\t\tgalaxy.put(split[0], new Planet(split[0], x, y, population));\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.out.println(\"Data can't be loaded\");\n\t\t\t}\n\t\t}\n\t}", "private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }", "public static void main(String[] args) throws IOException, ParseException {\n\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"C:\\\\Dev\\\\Demo\\\\Demo\\\\src\\\\main\\\\resources\\\\data\\\\USNationalParks.txt\"));\n\t\ttry {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t String line = \"\";\n\t\t String[] lineArray;\n\t\t \n\t\t Park park = new Park();\n\t\t \n\t\t \n\t\t \n\t\t ArrayList<Park> retArray = new ArrayList<Park>();\n\t\t while ((line = br.readLine()) != null) {\n\t\t \tpark = new Park();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\"); //2 Acadia\n\t\t\t park.setParkName(lineArray[2].substring(0, lineArray[2].indexOf('<')));\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); //2 Maine\n\t\t\t lineArray = line.split(\">\");\n\t\t\t park.setProvince(lineArray[2].substring(0, lineArray[2].indexOf('<')));\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine(); //19: \"44.35, -68.21\"\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setLatitude(lineArray[19].substring(0, 5));\n\t\t\t park.setLongitude(lineArray[19].substring(7, lineArray[19].indexOf('<')));\n\t\t\t \n\t\t\t \n\t\t\t line = br.readLine(); //4 February 26th, 1919\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setDateEstablished(stringToDate(lineArray[4].substring(0, lineArray[4].indexOf('<'))));\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); //3 347,389 acres '('\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setParkArea(NumberFormat.getNumberInstance(java.util.Locale.US).parse(lineArray[3].substring(0, lineArray[3].indexOf('a')-1)).intValue());\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); // 1 3,303,393 <\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setParkVisitors(NumberFormat.getNumberInstance(java.util.Locale.US).parse(lineArray[1].substring(0, lineArray[1].indexOf('<'))).intValue());\n\t\t\t \n\t\t\t line = br.readLine(); //skip for now\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t \n\n\t\t \n\t\t\t retArray.add(park);\n\t\t }\n\t\t \n\t\t for(Park p: retArray){\n\t\t \tSystem.out.println(\"Insert into parks(name, country, province, latitude, longitude, dtEst, parkArea, annualVisitors)\" + \"VALUES('\"+ p.getParkName()+\"',\"+ \"'United States','\"+p.getProvince() +\"','\"+ p.getLatitude()+\"','\" + p.getLongitude() + \"','\" + dateToString(p.getDateEstablished()) + \"',\" + p.getParkArea() +\",\"+ \t\t\t\tp.getParkVisitors()+\");\");\n\t\t \t//System.out.println();\n\t\t }\n\t\t} finally {\n\t\t br.close();\n\t\t}\n\t}", "Parcelle createParcelle();", "public void readFromParcel(Parcel in) {\n mCityName = in.readString();\n mCityId = in.readInt();\n mCountry = in.readString();\n mState = in.readString();\n mLongitude = in.readDouble();\n mLatitude = in.readDouble();\n mLastUpdated = in.readLong();\n mPosition = in.readInt();\n }", "private ParcelableNameValuePair(Parcel in) {\n\t\tname = in.readString();\n\t\tvalue = in.readString();\n\t}", "public C1748jj createFromParcel(Parcel parcel) {\n int G = C0721a.m714G(parcel);\n int i = 0;\n int i2 = 0;\n int i3 = 0;\n String str = null;\n IBinder iBinder = null;\n Scope[] scopeArr = null;\n Bundle bundle = null;\n while (parcel.dataPosition() < G) {\n int F = C0721a.m713F(parcel);\n switch (C0721a.m720aH(F)) {\n case 1:\n i = C0721a.m728g(parcel, F);\n break;\n case 2:\n i2 = C0721a.m728g(parcel, F);\n break;\n case 3:\n i3 = C0721a.m728g(parcel, F);\n break;\n case 4:\n str = C0721a.m736o(parcel, F);\n break;\n case 5:\n iBinder = C0721a.m737p(parcel, F);\n break;\n case 6:\n scopeArr = (Scope[]) C0721a.m722b(parcel, F, Scope.CREATOR);\n break;\n case 7:\n bundle = C0721a.m738q(parcel, F);\n break;\n default:\n C0721a.m721b(parcel, F);\n break;\n }\n }\n if (parcel.dataPosition() == G) {\n return new C1748jj(i, i2, i3, str, iBinder, scopeArr, bundle);\n }\n throw new C0721a.C0722a(\"Overread allowed size end=\" + G, parcel);\n }", "public void readEntityCSV(String line) {\n List<String> items = Arrays.asList(line.split(\",\"));\n this.setId(Long.valueOf(items.get(0)));\n this.noOfRounds = Integer.parseInt(items.get(1));\n this.caliber = Float.parseFloat(items.get(2));\n this.manufacturer = items.get(3);\n this.price = Float.parseFloat(items.get(4));\n }", "public f createFromParcel(Parcel parcel) {\r\n int i = 0;\r\n String str = null;\r\n int b = a.b(parcel);\r\n HashSet hashSet = new HashSet();\r\n String str2 = null;\r\n boolean z = false;\r\n String str3 = null;\r\n String str4 = null;\r\n String str5 = null;\r\n String str6 = null;\r\n String str7 = null;\r\n int i2 = 0;\r\n while (parcel.dataPosition() < b) {\r\n int a = a.a(parcel);\r\n switch (a.a(a)) {\r\n case e.MapAttrs_cameraBearing /*1*/:\r\n i2 = a.f(parcel, a);\r\n hashSet.add(Integer.valueOf(1));\r\n break;\r\n case e.MapAttrs_cameraTargetLat /*2*/:\r\n str7 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(2));\r\n break;\r\n case e.MapAttrs_cameraTargetLng /*3*/:\r\n str6 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(3));\r\n break;\r\n case e.MapAttrs_cameraTilt /*4*/:\r\n str5 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(4));\r\n break;\r\n case e.MapAttrs_cameraZoom /*5*/:\r\n str4 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(5));\r\n break;\r\n case e.MapAttrs_uiCompass /*6*/:\r\n str3 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(6));\r\n break;\r\n case e.MapAttrs_uiRotateGestures /*7*/:\r\n z = a.c(parcel, a);\r\n hashSet.add(Integer.valueOf(7));\r\n break;\r\n case e.MapAttrs_uiScrollGestures /*8*/:\r\n str2 = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(8));\r\n break;\r\n case e.MapAttrs_uiTiltGestures /*9*/:\r\n str = a.l(parcel, a);\r\n hashSet.add(Integer.valueOf(9));\r\n break;\r\n case e.MapAttrs_uiZoomControls /*10*/:\r\n i = a.f(parcel, a);\r\n hashSet.add(Integer.valueOf(10));\r\n break;\r\n default:\r\n a.b(parcel, a);\r\n break;\r\n }\r\n }\r\n if (parcel.dataPosition() == b) {\r\n return new f(hashSet, i2, str7, str6, str5, str4, str3, z, str2, str, i);\r\n }\r\n throw new b(\"Overread allowed size end=\" + b, parcel);\r\n }", "private void loadFromOutputline(String p, SBEPanel panel) {\n StringTokenizer stok = new StringTokenizer(p,\";\\\"\");\n stok.nextToken();//mid\n String id=stok.nextToken();\n stok.nextToken();//bio seq.\n loadSNPInto(panel,stok.nextToken());//snp\n \n int pl = -1;\n try {\n pl =Integer.parseInt(stok.nextToken());//pl\n }catch(NumberFormatException e) {};\n stok.nextToken();//primerlength\n stok.nextToken();//gc\n stok.nextToken();//tm\n stok.nextToken();//excl. 5\n stok.nextToken();//excl. 3\n stok.nextToken();//sec1\n stok.nextToken();//sec2\n stok.nextToken();//sec3\n stok.nextToken();//sec4\n stok.nextToken();//3 or 5\n stok.nextToken();//t\n stok.nextToken();//g\n stok.nextToken();//pcrprod. length\n String seq=stok.nextToken();//\n panel.tfName.setText(id);\n panel.tfSequence.setText(seq);\n panel.setSelectedPL(pl);\n }", "public void readFromParcel(Parcel src) {\n\n\t}", "public void method_3292(Parcel var1) {\n this.field_4722 = var1.readInt();\n this.field_4723 = var1.readInt();\n }", "private void readActorData(String[] lineData)\n {\n int actorCodeIdx = 0;\n int actorFileNameIdx = 1;\n int actorIngameNameIdx = 2;\n int sprite_statusIdx = 3;\n int sensor_statusIdx = 4;\n int directionIdx = 5;\n\n Direction direction = Direction.of(lineData[directionIdx]);\n ActorData actorData = new ActorData(lineData[actorFileNameIdx], lineData[actorIngameNameIdx], lineData[sprite_statusIdx], lineData[sensor_statusIdx], direction);\n actorDataMap.put(lineData[actorCodeIdx], actorData);\n\n //Player start position is not based on tile schema\n if (actorData.actorFileName.equals(ACTOR_DIRECTORY_PATH + \"player\"))\n createPlayer(actorData);\n else\n loadedTileIdsSet.add(lineData[actorCodeIdx]);//Player is not defined by layers\n }", "public void parseInput(Scanner sc, String inputLine) {\n String[] input = inputLine.split(\",\");\n assert(input[0].equals(\"R\"));\n this.warehouseID = Integer.parseInt(input[1]);\n this.districtID = Integer.parseInt(input[2]);\n this.customerID = Integer.parseInt(input[3]);\n }", "private void process(String s) {\n try {\n String[] splt = s.split(\"_\");\n int type = Integer.parseInt(splt[0]);\n if(type == TYPE_PROXIMITY) GUI.setProximity(Float.parseFloat(splt[1]));\n else {\n String[] coords = splt[1].split(\" \");\n float x = Float.parseFloat(coords[0]);\n float y = Float.parseFloat(coords[1]);\n float z = Float.parseFloat(coords[2]);\n if(type == TYPE_ACCELEROMETER) GUI.setAccelerometer(x, y, z);\n else if(type == TYPE_ORIENTATION) GUI.setOrientation(x, y, z);\n }\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "private void handleImportLines(String inputLineString ){\n String [] splitInputLine = inputLineString.split(\",\");\n String command = splitInputLine[0];\n String name = \"\";\n String date = \"\";\n String department = \"\";\n\n double pay = 0;\n int role = 0;\n\n if(splitInputLine.length == ADDPARTFULLCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n\n }else if(splitInputLine.length == ADDMANAGECOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n role = Integer.parseInt(splitInputLine[5]);\n }else if(splitInputLine.length == OTHEREXPECTEDCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n }\n\n if(command.equals(\"P\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Parttime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"F\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Fulltime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"M\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Management(newEmployeeProfile, pay, role);\n company.add(newEmployee);\n }\n }", "public void callRead(String s) {\n\t\tint firstP = s.indexOf(\"(\");\n\t\tint lastP = s.indexOf(\")\");\n\n\t\tString variablesString = s.substring(firstP + 1, lastP);\n\t\tString[] variables = variablesString.split(\",\");\n\n\t\tManager.read(variables[0], variables[1]);\n\n\t}", "public Item createFromParcel(Parcel source) {\n Item item = new Item();\n item.name = source.readString(); \n item.description = source.readString(); \n item.type = source.readString(); \n item.value = source.readString(); \n return item; \n }", "public void Parse()\n {\n String prepend = \"urn:cerner:mid:core.personnel:c232:\";\n try{\n\n BufferedReader br = new BufferedReader(new FileReader(new File(path)));\n\n String line;\n\n while ((line = br.readLine()) != null)\n {\n line = line.trim();\n String[] lines = line.split(\",\");\n for (String entry : lines)\n {\n entry = entry.trim();\n entry = entry.replace(prepend, replace);\n System.out.println(entry+\",\");\n }\n\n }\n \n br.close();\n }catch(IOException IO)\n {\n System.out.println(IO.getStackTrace());\n } \n \n }", "public static void readInputPropertyFile(String fileName, ArrayList<Apartment> apartments, ArrayList<House> houses, ArrayList<Villa> villas) {\n File file = new File(fileName);\n BufferedReader reader = null;\n try {\n reader = new BufferedReader(new FileReader(file));\n String tempString = null;\n int line = 1;\n // read one line every time until no text\n while ((tempString = reader.readLine()) != null) {\n // show the line number\n// System.out.println(\"line \" + line + \": \" + tempString);\n String[] line_part = tempString.split(\" \");\n int property_type = Integer.parseInt(line_part[0]);\n line++;\n\n //Initial info for Apartment\n int storey_num = 0, beds = 0;\n\n //Initial info for house\n int storey = 0; double clearing = 0;\n\n //Initial info for villa\n double tax = 0, service = 0;\n\n //Shared Initial info for all\n int number = 0, ID = 0; double cost = 0;\n String name = \"\", address = \"\";\n\n\n //Apartment\n if (property_type == 1)\n {\n number = Integer.parseInt(line_part[1]);\n ID = Integer.parseInt(line_part[2]);\n name = line_part[3];\n address = line_part[4];\n cost = Double.parseDouble(line_part[5]);\n storey_num = Integer.parseInt(line_part[6]);\n beds = Integer.parseInt(line_part[7]);\n apartments.add(new Apartment(number, ID, name, address, cost, storey_num, beds));\n\n }\n\n //House\n else if(property_type == 2)\n {\n number = Integer.parseInt(line_part[1]);\n ID = Integer.parseInt(line_part[2]);\n name = line_part[3];\n address = line_part[4];\n cost = Integer.parseInt(line_part[5]);\n storey = Integer.parseInt(line_part[6]);\n clearing = Double.parseDouble(line_part[7]);\n houses.add(new House(number, ID, name, address, cost, storey, clearing));\n }\n\n else if(property_type == 3)\n {\n number = Integer.parseInt(line_part[1]);\n ID = Integer.parseInt(line_part[2]);\n name = line_part[3];\n address = line_part[4];\n cost = Double.parseDouble(line_part[5]);\n tax = Double.parseDouble(line_part[6]);\n service = Double.parseDouble(line_part[7]);\n villas.add(new Villa(number, ID, name, address, cost, tax, service));\n }\n }\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e1) {\n }\n }\n }\n }", "private Emergency(Parcel in){\n super(in);\n this.department = in.readString();\n }", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "public cf createFromParcel(Parcel parcel) {\n int b = b.b(parcel);\n int i = 0;\n String str = null;\n int i2 = 0;\n short s = (short) 0;\n double d = 0.0d;\n double d2 = 0.0d;\n float f = 0.0f;\n long j = 0;\n int i3 = 0;\n int i4 = -1;\n while (parcel.dataPosition() < b) {\n int a = b.a(parcel);\n switch (b.a(a)) {\n case 1:\n str = b.j(parcel, a);\n break;\n case 2:\n j = b.g(parcel, a);\n break;\n case 3:\n s = b.d(parcel, a);\n break;\n case 4:\n d = b.i(parcel, a);\n break;\n case 5:\n d2 = b.i(parcel, a);\n break;\n case 6:\n f = b.h(parcel, a);\n break;\n case 7:\n i2 = b.e(parcel, a);\n break;\n case 8:\n i3 = b.e(parcel, a);\n break;\n case 9:\n i4 = b.e(parcel, a);\n break;\n case 1000:\n i = b.e(parcel, a);\n break;\n default:\n b.b(parcel, a);\n break;\n }\n }\n if (parcel.dataPosition() == b) {\n return new cf(i, str, i2, s, d, d2, f, j, i3, i4);\n }\n throw new a(\"Overread allowed size end=\" + b, parcel);\n }", "@Override\n\t\tpublic CharacterSheet createFromParcel(Parcel source) {\n\t\t\tCharacterSheet sheet = new CharacterSheet();\n\t\t\tsheet.name = source.readString();\n\t\t\tsheet.color = source.readInt();\n\t\t\tsheet.description = source.readString();\n\t\t\tsheet.level = source.readInt();\n\t\t\tsheet.fileAbsolutePath = source.readString();\n\t\t\tsheet.fileTimeStamp = source.readLong();\n\t\t\tsheet.iconPath = source.readString();\n\t\t\treturn sheet;\n\t\t}", "public Building(String[] line){\n setId(Integer.parseInt(line[0]));\n setRank(Integer.parseInt(line[1]));\n setName(line[2]);\n setCity(line[3]);\n setCountry(line[4]);\n setHeight_m(Double.parseDouble(line[5]));\n setHeight_ft(Double.parseDouble(line[6]));\n setFloors(line[7]);\n setBuild(line[8]);\n setArchitect(line[9]);\n setArchitectual_style(line[10]);\n setCost(line[11]);\n setMaterial(line[12]);\n setLongitude(line[13]);\n setLatitude(line[14]);\n // setImage(line[15]);\n\n }", "public void setLine(String line) throws ParseException {\r\n\t\tthis.content = line;\r\n\t\tparseTask(line);\r\n\t}", "public void setString(String parName, String parVal) throws HibException;", "protected ParkingSpace(Parcel in) {\n address = in.readParcelable(Address.class.getClassLoader());\n owner = in.readParcelable(User.class.getClassLoader());\n parkingImageUrl = in.readString();\n specialInstruction = in.readString();\n parkingID = in.readString();\n }", "private void parsePlateau(String s) {\r\n String[] parsedString = s.split(\" \");\r\n plateau[0] = Integer.parseInt(parsedString[0]);\r\n plateau[1] = Integer.parseInt(parsedString[1]);\r\n }", "protected void parseLine(String dataLine) {\n String[] line = dataLine.split(\",\");\n if (validater(line)) {\n try {\n Route route =\n new Route(\n line[airline],\n Integer.parseInt(line[airlineID]),\n line[sourceAirport],\n Integer.parseInt(line[sourceAirportID]),\n line[destinationAirport],\n Integer.parseInt(line[destinationAirportID]),\n line[codeshare],\n Integer.parseInt(line[stops]),\n line[equipment].split(\" \"));\n addRoute(route);\n } catch (Exception e) {\n errorCounter(11);\n }\n }\n }", "private Note(Parcel in) {\n content = in.readString();\n color = (Color) in.readSerializable();\n }", "public j(@org.jetbrains.annotations.NotNull android.os.Parcel r14) {\n /*\n r13 = this;\n java.lang.String r0 = \"parcel\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r14, r0)\n int r2 = r14.readInt()\n int r3 = r14.readInt()\n int r4 = r14.readInt()\n int r5 = r14.readInt()\n int r6 = r14.readInt()\n float r7 = r14.readFloat()\n int r8 = r14.readInt()\n java.lang.String r9 = r14.readString()\n java.lang.String r0 = \"parcel.readString()\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r9, r0)\n java.lang.String r10 = r14.readString()\n java.lang.String r11 = r14.readString()\n java.lang.String r12 = r14.readString()\n r1 = r13\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.draft.a.j.<init>(android.os.Parcel):void\");\n }", "@Override\r\n\tpublic void loadAircraftData(Path p) throws DataLoadingException {\t\r\n\t\ttry {\r\n\t\t\t//open the file\r\n\t\t\tBufferedReader reader = Files.newBufferedReader(p);\r\n\t\t\t\r\n\t\t\t//read the file line by line\r\n\t\t\tString line = \"\";\r\n\t\t\t\r\n\t\t\t//skip the first line of the file - headers\r\n\t\t\treader.readLine();\r\n\t\t\t\r\n\t\t\twhile( (line = reader.readLine()) != null) {\r\n\t\t\t\t//each line has fields separated by commas, split into an array of fields\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Creating an Aircraft object\r\n\t\t\t\tAircraft loadingIn = new Aircraft();\r\n\t\t\t\t\r\n\t\t\t\t//put some of the fields into variables: check which fields are where atop the CSV file itself\r\n\t\t\t\tloadingIn.setTailCode(fields[0]);\r\n\t\t\t\tloadingIn.setTypeCode(fields[1]);\r\n\t\t\t\t//Checking the manufacturer and setting it\r\n\t\t\t\tManufacturer manufacturer = null;\r\n\t\t\t\tString mString = fields[2];\r\n\t\t\t\tif(mString.equals(\"Boeing\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOEING;\r\n\t\t\t\telse if(mString.equals(\"Airbus\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.AIRBUS;\r\n\t\t\t\telse if(mString.equals(\"Bombardier\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOMBARDIER;\r\n\t\t\t\telse if(mString.equals(\"Embraer\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.EMBRAER;\r\n\t\t\t\telse if(mString.equals(\"Fokker\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.FOKKER;\r\n\t\t\t\telse\r\n\t\t\t\t\tmanufacturer = Manufacturer.ATR;\r\n loadingIn.setManufacturer(manufacturer);\r\n\t\t\t\tloadingIn.setModel(fields[3]);\r\n\t\t\t\tloadingIn.setSeats(Integer.parseInt(fields[4]));\r\n\t\t\t\tloadingIn.setCabinCrewRequired(Integer.parseInt(fields[5]));\r\n\t\t\t\tloadingIn.setStartingPosition(fields[6]);\r\n\t\t\t\tairCrafts.add(loadingIn);\r\n\t\t\t\t\r\n\t\t\t\t//print a line explaining what we've found\r\n\t\t\t\t/*System.out.println(\"Tail Code: \" + loadingIn.getTailCode() + \" TypeCode: \" + loadingIn.getTailCode() +\r\n\t\t\t\t\t\t\" Manufacturer: \" + loadingIn.getManufacturer() + \" Model: \" + loadingIn.getModel() +\r\n\t\t\t\t\t\t\" Seats and CabinCrew : \" + loadingIn.getSeats() + \" \" + loadingIn.getCabinCrewRequired()\r\n\t\t\t\t\t\t+ \" Starting Pos. \" + loadingIn.getStartingPosition());*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcatch (IOException ioe) {\r\n\t\t\t//There was a problem reading the file\r\n\t\t\tthrow new DataLoadingException(ioe);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error loading aircraft data\");\r\n\t\t\tDataLoadingException dle = new DataLoadingException();\r\n\t\t\tthrow dle;\r\n\t\t}\r\n\r\n\t}", "public Contact(Parcel in){\n\n readFromParcel(in);\n\n }", "@Test\n public void testParcel() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // WHEN write the object to parcel and create another object with that parcel\n Parcel parcel = Parcel.obtain();\n cellIdentityNr.writeToParcel(parcel, 0 /* type */);\n parcel.setDataPosition(0);\n CellIdentityNr anotherCellIdentityNr = CellIdentityNr.CREATOR.createFromParcel(parcel);\n\n // THEN the new object is equal to the old one\n assertThat(anotherCellIdentityNr).isEqualTo(cellIdentityNr);\n assertThat(anotherCellIdentityNr.getType()).isEqualTo(CellInfo.TYPE_NR);\n assertThat(anotherCellIdentityNr.getNrarfcn()).isEqualTo(NRARFCN);\n assertThat(anotherCellIdentityNr.getPci()).isEqualTo(PCI);\n assertThat(anotherCellIdentityNr.getTac()).isEqualTo(TAC);\n assertTrue(Arrays.equals(anotherCellIdentityNr.getBands(), BANDS));\n assertThat(anotherCellIdentityNr.getOperatorAlphaLong()).isEqualTo(ALPHAL);\n assertThat(anotherCellIdentityNr.getOperatorAlphaShort()).isEqualTo(ALPHAS);\n assertThat(anotherCellIdentityNr.getMccString()).isEqualTo(MCC_STR);\n assertThat(anotherCellIdentityNr.getMncString()).isEqualTo(MNC_STR);\n assertThat(anotherCellIdentityNr.getNci()).isEqualTo(NCI);\n }", "protected NewLocation(Parcel in) {\n locationID = in.readInt();\n longitude = in.readDouble();\n altitude = in.readDouble();\n latitude = in.readDouble();\n speed = in.readFloat();\n time = in.readLong();\n }", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "static void m104987a(C21021l lVar, Parcel parcel) {\n lVar.f74879a = parcel.readString();\n lVar.f74880b = parcel.readString();\n lVar.f74881c = parcel.readString();\n lVar.f74882d = parcel.readString();\n }", "private Person(final Parcel in) {\n super();\n readFromParcel(in);\n }", "private void processAssignment(String line) {\n\t\t//TODO: fill\n\t}", "public void readIn(ArrayList<String> lines, int idx){\n\t\tfor (int i=idx+1;i<lines.size();i++){\n\t\t\tString[] parts = lines.get(i).split(\" \");\n\t\t\tif (parts[0].charAt(0) != '-'){\n\t\t\t\ti = lines.size();\n\t\t\t}\n\t\t\tswitch (parts[0]){\n\t\t\t\tcase \"-TileID:\":\n\t\t\t\t\tthis.setTile(Game.getInstance().getTileContained(Integer.parseInt(parts[1])));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-Chance:\":\n\t\t\t\t\tthis.chance = Integer.parseInt(parts[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: break;\n\t\t\t}\n\t\t}\n\t}", "static public Employee getEmployeeFromString(String lineRead){\n\t\tString[] newEmployee = lineRead.split(\",\");\n\t\tString name = newEmployee[0];\n\t\tFloat number = Float.parseFloat(newEmployee[1]);\n\t\tDepartment department = Department.valueOf(newEmployee[2]);\n\t\tEmployee finalEmployee = new Employee(name, number, department);\n\t\treturn finalEmployee;\n\t}", "private void m131991a(String str) {\n this.f107705a.mo102020a().setPoiActivity(PoiContext.unserializeFromJson(str));\n }", "public PengineSwitch(Parcel in) {\n super(in);\n String str = null;\n if (in.readByte() == 0) {\n this.id = null;\n in.readInt();\n } else {\n this.id = Integer.valueOf(in.readInt());\n }\n this.dataType = in.readByte() == 0 ? null : Integer.valueOf(in.readInt());\n this.timestamp = in.readByte() == 0 ? null : Long.valueOf(in.readLong());\n this.upProperty = in.readByte() == 0 ? null : in.readString();\n this.column0 = in.readByte() == 0 ? null : in.readString();\n this.column1 = in.readByte() == 0 ? null : in.readString();\n this.column2 = in.readByte() == 0 ? null : in.readString();\n this.column3 = in.readByte() == 0 ? null : in.readString();\n this.column4 = in.readByte() == 0 ? null : in.readString();\n this.column5 = in.readByte() == 0 ? null : in.readString();\n this.column6 = in.readByte() == 0 ? null : in.readString();\n this.column7 = in.readByte() != 0 ? in.readString() : str;\n }", "public static void initialize_parameters(String line) {\n\t\tString word[] = line.split(\" \");\n\t\tif (word[0].equals(\"access_token\")) {\n\t\t\taccess_token = new String(word[1]);\n\t\t} else if (word[0].equals(\"host\")) {\n\t\t\thost = new String(word[1]);\n\t\t} else if (word[0].equals(\"port\")) {\n\t\t\tport = new String(word[1]);\n\t\t} else if (word[0].equals(\"cache\")) {\n\t\t\tcache = new String(word[1]);\n\t\t}\n\t}", "public void readFromParcel(Parcel in) {\n\t\tList<Shout> tempList = new ArrayList<Shout>();\r\n\t\tin.readList(tempList, Shout.class.getClassLoader());\r\n\t\tprocessedlast = in.readInt();\r\n\t}", "public AssocImagemSom(Parcel in) \r\n\t{\r\n\t\treadFromParcel(in);\r\n\t}", "private void assignParcelTo(final Truck t) {\n //If possible, build same color list of parcels\n synchronized(unassignedParcels) {\n if (unassignedParcels.isEmpty()) return;\n\n HashSet<Parcel> sameColorParcels = new HashSet<Parcel>();\n for (Parcel p : unassignedParcels) {\n if (p.getColor().equals(t.getColor())) {\n sameColorParcels.add(p);\n }\n }\n\n //If that wasn't possible, choose from all unassigned parcels\n if (sameColorParcels.isEmpty()) sameColorParcels.addAll(unassignedParcels);\n\n //Choose the closest parcel to t to assign it to\n Parcel parcel = Collections.min(sameColorParcels, new Comparator<Parcel>() {\n @Override\n public int compare(Parcel o1, Parcel o2) {\n LinkedList<Node> p1 = dijkstra(t.getLocation(), o1.getLocation());\n int l1 = pathLength(p1);\n LinkedList<Node> p2 = dijkstra(t.getLocation(), o2.getLocation());\n int l2 = pathLength(p2);\n return l1 - l2;\n }\n });\n\n parcelsAssigned.put(t, parcel);\n unassignedParcels.remove(parcel);\n }\n }", "private Announcement(Parcel in) {\n _ID = in.readString();\n user_ID = in.readString();\n type = in.readString();\n name = in.readString();\n date = in.readString();\n description = in.readString();\n read = in.readString();\n }", "@Override\n public void writeToParcel(Parcel parcel, int flags) {\n parcel.writeInt(this.pid);\n parcel.writeInt(this.age);\n parcel.writeInt(this.color);\n parcel.writeInt(this.bpm);\n parcel.writeInt(this.rpm);\n parcel.writeInt(this.o2);\n parcel.writeInt(this.temperature);\n\n parcel.writeByte((byte) (this.nbcContam ? 1 : 0));\n\n parcel.writeString(this.fName);\n parcel.writeString(this.lName);\n parcel.writeString(this.ssn);\n parcel.writeString(this.sex);\n parcel.writeString(this.type);\n parcel.writeString(this.ipaddr);\n parcel.writeString(this.src);\n parcel.writeByte((byte) (this.isSelected ? 1 : 0));\n }", "protected Prediction(Parcel in) {\n this.tagId = in.readString();\n this._tag = in.readString();\n this.probability = in.readDouble();\n }", "public Weather(Parcel in) {\n summary = in.readString();\n picURL = in.readString();\n }", "public Incident(String str) throws MalformedIncidentException {\n\n // Null/Empty check\n if (str == null || str.length() == 0) {\n throw new MalformedIncidentException(\"The incident was \" + ((str == null) ? \"a null\" : \"an empty\") + \" string.\");\n }\n\n // Is the input the right size?\n String[] components = str.split(\",\");\n if(components.length != 17) {\n throw new MalformedIncidentException(str + \"\\n(There were not 17 CSV columns)\");\n }\n\n // Bind properties to object\n try {\n\n this.coordinates = new Coordinates(Double.parseDouble(components[15]), Double.parseDouble(components[1]));\n this.date = new DateTime(PDDConfig.getInstance().PhillyCrimeDataDateFormat.parse(components[5]));\n this.code = Integer.parseInt(components[11]);\n this.description = components[12];\n\n } catch (NumberFormatException nfe) {\n throw new MalformedIncidentException(str + \"\\n(One of the numbers/coordinates could not be parsed).\" + nfe.getLocalizedMessage());\n } catch (ParseException pe) {\n throw new MalformedIncidentException(str + \"\\n(The date was not supplied in the correct format. The date string was \" + components[5] + \".\");\n }\n }", "private DungeonRecord(Parcel in){\n _id = in.readLong();\n mDate = in.readString();\n mType = in.readString();\n mOutcome = in.readInt();\n mDistance = in.readInt();\n mTime = in.readInt();\n mReward = in.readString();\n mCoords = in.readString();\n mSkips = in.readString();\n\n }", "public void getFromParcel(Parcel in)\n {\n this.clear();\n\n //Récupération du nombre d'objet\n int size = in.readInt();\n\n //On repeuple la liste avec de nouveau objet\n for(int i = 0; i < size; i++)\n {\n MeteoData meteoData = new MeteoData();\n meteoData.setDateDebut(in.readString());\n meteoData.setDateFin(in.readString());\n meteoData.setTemperature(in.readString());\n meteoData.setSymbole(in.readString());\n meteoData.setWindSpeed(in.readString());\n meteoData.setWindDirection(in.readString());\n meteoData.setWindDescription(in.readString());\n meteoData.setClouds(in.readString());\n meteoData.setHumidity(in.readString());\n this.add(meteoData);\n }\n\n\n }", "public void init(String busDestination, String input) {\n try {\n //Note: input is in the form 8122:-122.842117,-122.842117\n // Where the long/lat value is Lat, and second is Long\n String[] initialSplit = input.split(\":\");\n vehicleNumber = Integer.parseInt(initialSplit[0]);\n destination = busDestination;\n\n String longAndLat = initialSplit[1];\n latitude = Double.parseDouble(longAndLat.split(\",\")[0]);\n longitude = Double.parseDouble(longAndLat.split(\",\")[1]);\n } catch (IllegalStateException | NumberFormatException e) {\n // This happens if the init strings is in an invalid format. Set all members to their\n // default values.\n destination = \"null\";\n vehicleNumber = -1;\n longitude = 0.0;\n latitude = 0.0;\n }\n }", "public void readFromParcel(Parcel source) {\n name = source.readString();\n namespace = source.readString();\n via = source.readString();\n int attributeCount = source.readInt();\n if (attributeCount > 0) {\n attributes = new ArrayList<Attribute>(attributeCount + 1);\n for (int i = 0; i < attributeCount; i++) {\n Attribute attribute = new Attribute(\n source.readString(),\n source.readString(),\n source.readString());\n attributes.add(attribute);\n }\n } else {\n attributes = new ArrayList<Attribute>(0);\n }\n xml = source.readString();\n }", "public Packman(String str) {\r\n\t\tString[] fields = str.split(\",\");\r\n\t\tType = fields[0].charAt(0);\r\n\t\tID = Integer.parseInt(fields[1]);\r\n\t\tLocation = new LatLonAlt(fields[2] + \",\" + fields[3] + \",\" + fields[4]);\r\n\t\tSpeed = Double.parseDouble(fields[5]);\r\n\t\tRadius = Double.parseDouble(fields[6]);\r\n\t\tInitTime = new Date().getTime();\r\n\t}", "private static Process createProcessFromInput(String inputLine){\n int resA, resB, resC, neededA, neededB, neededC;\n\n inputLine = inputLine.replaceAll(\"\\\\[|\\\\]\", \"\"); //remove brackets\n String[] resourceInfo = inputLine.split(\" \");\n\n resA = Integer.parseInt(resourceInfo[0]);\n resB = Integer.parseInt(resourceInfo[1]);\n resC = Integer.parseInt(resourceInfo[2]);\n neededA = Integer.parseInt(resourceInfo[3]);\n neededB = Integer.parseInt(resourceInfo[4]);\n neededC = Integer.parseInt(resourceInfo[5]);\n\n int[] processInfo = {resA, resB,resC, neededA,neededB,neededC};\n return new Process(processInfo);\n }", "public User(Parcel in){\n String[] data = new String[4];\n\n in.readStringArray(data);\n // the order needs to be the same as in writeToParcel() method\n // Converts from string\n this.name = data[0];\n this.description = data[1];\n this.id = Integer.parseInt(data[2]);\n this.followed = Boolean.parseBoolean(data[3]);\n }", "@Before\n public void initValidString() {\n appStateParcel = new AppStateParcel();\n sessionParcel = new SessionParcel();\n evaluationParcel = new EvaluationParcel();\n appStateParcel.setAppMode(AppStateParcel.NORMAL_MODE);\n appStateParcel.setUserType(AppStateParcel.TEACHER);\n appStateParcel.setUserId(\"1\");\n appStateParcel.setToken(TOKEN);\n }", "public synchronized void lineProcess(String lineIn){\r\n\t\tString [] lineParts=lineIn.split(\"\\\\s+\");\r\n\t\tint [] pref = new int [7];\r\n\t\tint [] ac = new int [7];\r\n\t\tint seatsAlloted=0, chosenCourse=0;\r\n\t\t\r\n\t\tobjPool= ObjectPool.getUniqueInstance();\r\n\r\n\t\tString n= new String(lineParts[0]);\r\n\t\ttry{\r\n\t\t\tfor(int i=0;i<7;i++){\r\n\t\t\t\tpref[i]=Integer.parseInt(lineParts[i+1]);\r\n\t\t\t\tac[i]=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<7 && seatsAlloted<5;i++){\t\t//to assign course\r\n\t\t\t\tchosenCourse=0;\r\n\t\t\t\tfor(int j=0;j<7;j++){\r\n\t\t\t\t\tif(ac[j]==0 && !objPool.checkSeatsNotAvailable(j)){\r\n\t\t\t\t\t\tchosenCourse=Math.max(chosenCourse, objPool.getSeatsAvailableCount(j));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor(int j=0;j<7 && seatsAlloted<5;j++){\r\n\t\t\t\t\tif(ac[j]==0 && chosenCourse==objPool.getSeatsAvailableCount(j)){\r\n\t\t\t\t\t\tac[j]=pref[j];\r\n\t\t\t\t\t\tobjPool.borrowSeat(j);\r\n\t\t\t\t\t\tseatsAlloted++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);\r\n\t\t}finally{}\r\n\t\t\r\n\t\t//set data\r\n\t\tStudent_data s= new Student_data(n,pref,ac);\r\n\t\t((Results) result).setKeyValue(n,s);\r\n }", "private void setInputParams(InputCommand input) throws InvalidCommand {\n if (input.getParams().length < 2) throw new InvalidCommand(\"Please enter car registration no. followed by color\");\n try {\n carRegNo = input.getParams()[0].toUpperCase();\n carColor = input.getParams()[1].toUpperCase();\n } catch (NumberFormatException e) {\n throw new InvalidCommand(\"Something went wrong.\\nMake sure the command is of the format: 'park KA-01-HH-9999 White'\");\n }\n }", "private Domain(Parcel in){\n this.IdDomain = in.readLong();\n this.IdCategoryRoot = in.readLong();\n this.Name = in.readString();\n this.Description = in.readString();\n this.ImageURL = in.readString();\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "private void process(String rowString) {\r\n\r\n //split to array\r\n data = rowString.split(\",\");\r\n len=data.length;\r\n\r\n //get xlsx sheet file name\r\n buildFileName();\r\n\r\n System.out.println(unitName.toString());\r\n\r\n excel();\r\n\r\n }", "public a createFromParcel(Parcel parcel) {\n int i = 0;\n int b = b.b(parcel);\n int i2 = 0;\n int i3 = 0;\n while (parcel.dataPosition() < b) {\n int a = b.a(parcel);\n switch (b.a(a)) {\n case 1:\n i2 = b.e(parcel, a);\n break;\n case 2:\n i = b.e(parcel, a);\n break;\n case 1000:\n i3 = b.e(parcel, a);\n break;\n default:\n b.b(parcel, a);\n break;\n }\n }\n if (parcel.dataPosition() == b) {\n return new a(i3, i2, i);\n }\n throw new a(\"Overread allowed size end=\" + b, parcel);\n }", "public void importFile(String filename) throws IOException, BadEntryException, ImportFileException{\n try{\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String line;\n line = reader.readLine();\n\n while(line != null){\n String[] fields = line.split(\"\\\\|\");\n int id = Integer.parseInt(fields[1]);\n if(_persons.get(id) != null){\n throw new BadEntryException(fields[0]);\n }\n\n if(fields[0].equals(\"FUNCIONÁRIO\")){\n registerAdministrative(fields);\n line = reader.readLine();\n }else if(fields[0].equals(\"DOCENTE\")){\n Professor _professor = new Professor(id, fields[2], fields[3]);\n _professors.put(id, _professor);\n _persons.put(id, (Person) _professor);\n\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n \n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n\n if(_professor.getDisciplineCourses().get(course) == null){\n _professor.getDisciplineCourses().put(course, new HashMap<String, Discipline>());\n }\n\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline,_course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_professor, id);\n _disciplineCourse.get(course).put(discipline, _discipline);\n\n if(_professor.getDisciplines() != null){\n _professor.getDisciplines().put(discipline, _discipline);\n _professor.getDisciplineCourses().get(course).put(discipline, _discipline); \n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n\n }\n }\n }\n }else if(fields[0].equals(\"DELEGADO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course,_course);\n }\n if(_course.getRepresentatives().size() == 8){\n System.out.println(id);\n throw new BadEntryException(course);\n }else{\n _course.getRepresentatives().put(id,_student);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline,_discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n }else if(fields[0].equals(\"ALUNO\")){\n Student _student = new Student(id, fields[2], fields[3]);\n _students.put(id, _student);\n _persons.put(id, (Person) _student);\n\n line = reader.readLine();\n fields = line.split(\"\\\\|\");\n while((line != null) && (fields[0].charAt(0) == '#')){\n String course = fields[0].substring(2);\n String discipline = fields[1];\n Course _course = _courses.get(course);\n if(_course == null){\n _course = new Course(course);\n _disciplineCourse.put(course, new HashMap<String, Discipline>());\n _courses.put(course, _course);\n }\n _student.setCourse(_course);\n Discipline _discipline = _disciplines.get(discipline);\n if(_discipline == null){\n _discipline = new Discipline(discipline, _course);\n _disciplines.put(discipline, _discipline);\n _course.getDisciplines().put(discipline, _discipline);\n }\n _discipline.registerObserver(_student, id);\n if(_student.getDisciplines().size() == 6){\n throw new BadEntryException(discipline);\n }else{\n _student.getDisciplines().put(discipline,_discipline);\n if(_discipline.getStudents().size() == 100){\n throw new BadEntryException(discipline);\n }else{\n _discipline.getStudents().put(id,_student);\n }\n }\n line = reader.readLine();\n if(line != null){\n fields = line.split(\"\\\\|\");\n }\n }\n\n }else{\n throw new BadEntryException(fields[0]);\n }\n }\n for(Course course: _courses.values()){\n HashMap<Integer,Student> representatives = course.getRepresentatives();\n HashMap<String, Discipline> disciplines = course.getDisciplines();\n for(Discipline discipline: disciplines.values()){\n for(Student representative: representatives.values()){\n discipline.registerObserver(representative, representative.getId());\n }\n }\n \n } \n reader.close();\n }catch(BadEntryException e){\n throw new ImportFileException(e);\n }catch(IOException e){\n throw new ImportFileException(e);\n }\n }", "@Override\n public SpesaObject createFromParcel(Parcel in) {\n return new SpesaObject(in);\n }", "private Agent loadFromFile(String _login)\n {\n Agent agent = new Agent();\n File file = new File(_login + \".csv\");\n FileReader fr;\n BufferedReader br;\n String line;\n try {\n fr = new FileReader(file);\n br = new BufferedReader(fr);\n\n line = br.readLine();\n\n int numCients;\n { // to restrain the scope of csvData\n String[] csvData = line.split(\",\");\n agent.setID(Integer.parseInt(csvData[0]));\n agent.setName(csvData[1]);\n agent.setSalary(Double.parseDouble(csvData[2]));\n agent.setSalesBalance(Double.parseDouble(csvData[3]));\n\n numCients = Integer.parseInt(csvData[4]);\n }\n\n for(int i = 0; i<numCients; i++) {\n line = br.readLine();\n\n Client client = new Client();\n int numProp;\n\n {\n String[] csvData = line.split(\",\");\n client.setID(Integer.parseInt(csvData[0]));\n client.setName(csvData[1]);\n client.setIncome(Double.parseDouble(csvData[2]));\n\n numProp = Integer.parseInt(csvData[3]);\n }\n\n for(int j=0; j<numProp; j++)\n {\n line = br.readLine();\n\n String[] csvData = line.split(\",\");\n\n if(csvData[0].equals(\"house\")) {\n House property = new House();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasGarden(Boolean.parseBoolean(csvData[6]));\n property.setHasPool(Boolean.parseBoolean(csvData[7]));\n\n client.addProperty(property);\n }\n else if(csvData[0].equals(\"apt\"))\n {\n Apartment property = new Apartment();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasTerrace(Boolean.parseBoolean(csvData[6]));\n property.setHasElevator(Boolean.parseBoolean(csvData[7]));\n property.setFloor(Integer.parseInt(csvData[8]));\n property.setNumber(Integer.parseInt(csvData[9]));\n\n client.addProperty(property);\n }\n }\n\n agent.addClient(client);\n }\n fr.close();\n br.close();\n return agent;\n }\n catch (NumberFormatException nfEx) {\n JOptionPane.showMessageDialog(null, \"There was a problem when retrieving \" +\n \"the agent's data.\\n Please try again\");\n return null;\n }\n catch (IOException ioEx) {\n JOptionPane.showMessageDialog(null, \"This user doesn't exist....\");\n return null;\n }\n }", "public Task(String line) throws ParseException {\r\n\t\tthis.content = line;\r\n\t\tparseTask(line);\r\n\t}", "public PlantID(String line){\r\n\t\tScanner sc = new Scanner(line);\r\n\t\tthis.id = sc.next();\r\n\t\tthis.name = (sc.next()+\" \" +sc.next());\r\n\t\tsc.close();\r\n\t}", "public static void readCVS(String filename){\n try {\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String line;\n while((line=reader.readLine())!=null){\n String item[] = line.split(\",\");\n String name = item[0];\n String value = item[1];\n switch (name){\n case \"useMaxTick\":{\n if(value.toLowerCase().equals(\"true\")){\n Params.useMaxTick = true;\n }else{\n Params.useMaxTick = false;\n }\n break;\n }\n case \"maxTick\":{\n Params.maxTick = Integer.parseInt(value);\n break;\n }\n case \"startPctWhites\":{\n Params.startPctWhites = Float.parseFloat(value);\n break;\n }\n case \"startPctBlacks\":{\n Params.startPctBlacks = Float.parseFloat(value);\n break;\n }\n case \"startPctGreys\":{\n Params.startPctGreys = Float.parseFloat(value);\n break;\n }\n case \"albedoOfWhites\":{\n Params.albedoOfWhites = Float.parseFloat(value);\n break;\n }\n case \"albedoOfBlacks\":{\n Params.albedoOfBlacks = Float.parseFloat(value);\n break;\n }\n case \"albedoOfGreys\":{\n Params.albedoOfGreys = Float.parseFloat(value);\n break;\n }\n case \"solarLuminosity\":{\n Params.solarLuminosity = Float.parseFloat(value);\n break;\n }\n case \"albedoOfSurface\":{\n Params.albedoOfSurface = Float.parseFloat(value);\n break;\n }\n case \"diffusePct\":{\n Params.diffusePct = Float.parseFloat(value);\n break;\n }\n case \"maxAge\":{\n Params.maxAge = Integer.parseInt(value);\n break;\n }\n case \"scenario\":{\n switch (Integer.parseInt(value)){\n case 0: {\n Params.scenario = Scenario.RAMP;\n break;\n }\n case 1: {\n Params.scenario = Scenario.LOW;\n break;\n }\n case 2: {\n Params.scenario = Scenario.OUR;\n break;\n }\n case 3: {\n Params.scenario = Scenario.HIGH;\n break;\n }\n case 4: {\n Params.scenario = Scenario.MAINTAIN;\n break;\n }\n default:\n break;\n }\n }\n default:\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public GridSection(StringInputStream input) throws EOFException,\n IOException {\n\n config = new MapConfiguration();\n\n // TODO Recognize either corner point or structured Eclipse grid format\n config.putString(\"type\", \"EclipseMesh\");\n\n parse(input);\n\n }", "private void parseField(String line){\n List<Integer> commaPos = ParserUtils.getCommaPos(line);\n int size = commaPos.size();\n // parse field\n String zip = line.substring(commaPos.get(size-ZIP_CODE_POS-1)+1, commaPos.get(size-ZIP_CODE_POS));\n // if zip is not valid return\n zip = zip.trim();\n if(zip==null || zip.length()<5){\n return;\n }\n // only keep the first 5 digits\n zip = zip.substring(0,5);\n String marketVal = line.substring(commaPos.get(MARKET_VALUE_POS-1)+1, commaPos.get(MARKET_VALUE_POS));\n String liveableArea = line.substring(commaPos.get(size-TOTAL_LIVEABLE_AREA_POS-1)+1, commaPos.get(size-TOTAL_LIVEABLE_AREA_POS));\n // cast those value to Long Double\n Long lZip = ParserUtils.tryCastStrToLong(zip);\n Double DMarketVal = ParserUtils.tryCastStrToDouble(marketVal);\n Double DLiveableArea = ParserUtils.tryCastStrToDouble(liveableArea);\n // update those field into the map\n updatePropertyInfo(lZip,DMarketVal, DLiveableArea);\n }", "private void parseAndPopulate(String in) {\r\n\t\tIParser parser = new AbbyyOCRDataParser(in);\r\n\t\tocrData = parser.parse();\r\n\t\tStore.addData(ocrData);\r\n\t\t\r\n\t\tEditText np = (EditText)findViewById(R.id.patient_et);\r\n\t\tEditText nm = (EditText)findViewById(R.id.medicine_et);\r\n\t\tEditText cd = (EditText)findViewById(R.id.consumption_et);\r\n\t\t\r\n\t\tPatient2Medicine p2m = ocrData.getPatient2Medicine();\r\n\t\tnp.setText(ocrData.getPatient().getName());\r\n\t\tnm.setText(ocrData.getMedicine().getMedicine());\r\n\t\tcd.setText(p2m.getFrequencyOfIntake()\r\n\t\t\t\t+ \" \" + p2m.getQuantityPerIntake() + \" by \" + p2m.getMode());\r\n\t\t\r\n\t}", "public void readFromParcel( Parcel source )\n {\n emoticonId = source.readString();\n emoticonName = source.readString();\n emoticonStatic = source.readString();\n emoticonDynamic = source.readString();\n packageId = source.readString();\n emoticonStaticByte = source.createByteArray();\n emoticonDynamicByte = source.createByteArray();\n userPhone = source.readString();\n boolean[] val = new boolean[ 1 ];\n source.readBooleanArray( val );\n isOnlyBrowse = val[ 0 ];\n }", "private void processLine(String line1) {\n StringTokenizer tVal = new StringTokenizer(line1);\n int yearOf = Integer.parseInt((tVal.nextToken()));\n List chosenYear = yearOf == 2014 ? employeeSalary_2014:\n employeeSalary_2015;\n String employeeTypeE = tVal.nextToken();\n String employeeName = tVal.nextToken();\n Integer employeeMonthlySalary =\n Integer.parseInt(tVal.nextToken());\n Employee newEmployee = null;\n if (employeeTypeE.equals(\"Salesman\")) {\n Integer salesmanCommission=\n Integer.parseInt(tVal.nextToken());\n\n newEmployee = new Salesman(employeeName, employeeMonthlySalary, salesmanCommission);\n\n }\n else if (employeeTypeE.equals(\"Executive\")) {\n Integer stockPrice= Integer.parseInt(tVal.nextToken());\n newEmployee = new Executive(employeeName, employeeMonthlySalary, stockPrice);\n }\n else {\n newEmployee = new Employee(employeeName, employeeMonthlySalary);\n }\n chosenYear.add(newEmployee);\n }", "public void readLine(String line){\n\t\tfields = line.split(\"\\\\s*,\\\\s*\");\n\t\tDate key = parseDate(fields[0]);\n\t\tif(key != null){\n\t\t\tDouble val = parseAverage(fields[6]);\t\t\n\t\t\tdja.put(key, val);\n\t\t}\n\t}", "public PolygonOptions createFromParcel(Parcel parcel) {\n ArrayList arrayList = null;\n float f = 0.0f;\n int i = 0;\n int zzaY = zzb.zzaY(parcel);\n ArrayList arrayList2 = new ArrayList();\n boolean z = false;\n boolean z2 = false;\n boolean z3 = false;\n int i2 = 0;\n int i3 = 0;\n float f2 = 0.0f;\n List list = null;\n while (parcel.dataPosition() < zzaY) {\n int zzaX = zzb.zzaX(parcel);\n switch (zzb.zzdc(zzaX)) {\n case 2:\n list = zzb.zzc(parcel, zzaX, LatLng.CREATOR);\n break;\n case 3:\n zzb.zza(parcel, zzaX, (List) arrayList2, getClass().getClassLoader());\n break;\n case 4:\n f2 = zzb.zzl(parcel, zzaX);\n break;\n case 5:\n i3 = zzb.zzg(parcel, zzaX);\n break;\n case 6:\n i2 = zzb.zzg(parcel, zzaX);\n break;\n case 7:\n f = zzb.zzl(parcel, zzaX);\n break;\n case 8:\n z3 = zzb.zzc(parcel, zzaX);\n break;\n case 9:\n z2 = zzb.zzc(parcel, zzaX);\n break;\n case 10:\n z = zzb.zzc(parcel, zzaX);\n break;\n case 11:\n i = zzb.zzg(parcel, zzaX);\n break;\n case 12:\n arrayList = zzb.zzc(parcel, zzaX, PatternItem.CREATOR);\n break;\n default:\n zzb.zzb(parcel, zzaX);\n break;\n }\n }\n if (parcel.dataPosition() == zzaY) {\n return new PolygonOptions(list, arrayList2, f2, i3, i2, f, z3, z2, z, i, arrayList);\n }\n throw new zza(\"Overread allowed size end=\" + zzaY, parcel);\n }", "public void setStr(String s) throws Exception {\n if(s.length() < 1 || s.length() > 300000){\n throw new Exception(\"Input lines in text file must be contains between 1 and 300000 characters.\");\n }\n\n for (int i = 0; i < s.length(); i++) {\n if(!Character.isLetter(s.charAt(i)) || !Character.isLowerCase(s.charAt(i))) {\n throw new Exception(\"Input lines in text file must be consists only lowercase letters. (a-z)\");\n }\n }\n\n this.str = s;\n }", "protected modelCartelera(Parcel in) {\n nombre = in.readString();\n descripcion = in.readString();\n id = in.readInt();\n //imagenCartelera = in.readInt();\n }", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void set(String s) {\n y=(int)Integer.parseInt(s.substring(0,4));\n m=(int)Integer.parseInt(s.substring(5,7))-1;\n d=(int)Integer.parseInt(s.substring(7,9));\n }", "public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private RunnerThread getData(String line) {\n \tString name = null;\n \ttry \n \t{\n \t\tString[] lineParse = line.split(\"\\t\");\n \t\tname = lineParse[0];\n \t\tString speedString = lineParse[1];\n \t\tString restString = lineParse[2];\n \t\tint speed = Integer.parseInt(speedString);\n \t\tint rest = Integer.parseInt(restString);\n \t\treturn (new RunnerThread(name,speed,rest));\n \t}\n \tcatch (NumberFormatException num) {\n \t\tSystem.out.println(\"The data entered for the speed/rest is not correct for the runner : \" + name);\t\n \t\tSystem.exit(1);\n \t}\n \tcatch (Exception ex) {\n\t\t\tSystem.out.println(\"An error occured while reading the data from the file\");\n\t\t\tSystem.exit(1);\n \t}\n\t\treturn null; \t\n }", "public Loup(String ligne){\n String delimiteur = \" \";\n StringTokenizer tokenizer = new StringTokenizer(ligne, delimiteur);\n String inutile = tokenizer.nextToken();\n this.ptVie = Integer.parseInt(tokenizer.nextToken());\n this.pourcentageAtt = Integer.parseInt(tokenizer.nextToken());\n this.pourcentagePar = Integer.parseInt(tokenizer.nextToken());\n this.degAtt = Integer.parseInt(tokenizer.nextToken());\n this.ptPar = Integer.parseInt(tokenizer.nextToken());\n this.pos = new Point2D(Integer.parseInt(tokenizer.nextToken()),Integer.parseInt(tokenizer.nextToken()));\n }", "public void initialize(String s) {\n\t\tArrayList<String[]> array = new ArrayList<String[]>();\n\t\tScanner scanner = null;\n\t\tFile file = new File(s);\n\t\ttry { scanner = new Scanner(file); }\n\t\tcatch (FileNotFoundException e) {\n//\t\t\tprompt that file is corrupted and prompt to choose a different file or\n//\t\t\tprompt that file is corrupted and prompt to call service staff\n\t\t\tSystem.out.println(\"got it:\\n\" + e.getMessage());\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tint total = 0;\n\t\tint a;\n\t\tString[] tmparray = new String[6];\n\t\twhile(scanner.hasNext()) {\n\t\t\ttmparray[count] = scanner.nextLine();\n\t\t\tif (tmparray[count].length() > 256) { \n\t\t\t\tSystem.out.println(\"error, file corrupted, string too long\"); \n\t\t\t\ttmparray[count] = \"error\";\n\t\t\t} \n\t\t\tif (count > 1) {\n\t\t\t\ttry {\n\t\t\t\t\ta = Integer.parseInt(tmparray[count]);\n\t\t\t\t}\n\t\t\t\tcatch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"gotit, chief \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotal ++;\n\t\t\tcount ++;\n\t\t\tif (count == 6) {\n\t\t\t\tcount = 0;\n\t\t\t\tarray.add(tmparray);\n\t\t\t\ttmparray = new String[6];\n\t\t\t}\n\t\t}\n\t\tif (total % 6 != 0) {\n\t\t\tSystem.out.println(\"error, file corrupted, line(s) added or removed\");\t\n\t\t}\n\n\t\tfor (String[] sa : array) addProduct(sa);\n\t}", "public JmlModelImport (final Boolean p1, final String p2, final Long line, final Long column) throws CGException {\n\n try {\n\n ivModel = null;\n ivImport = UTIL.ConvertToString(new String());\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n {\n\n setModel(p1);\n setImport(p2);\n setPosition(line, column);\n }\n }", "void setCode(LineLoader in) {\n code=in;\n }", "public Trip(Parcel p) \n\t{\n\t\tp.readTypedList(friends, Person.CREATOR);\n\t\ttripId = p.readLong();\n\t\tserverRefId = p.readLong();\n\t\ttripName = p.readString();\n\t\tdestinationName = p.readString();\n\t\tcreator = p.readString();\n\t\tdate = new Date(p.readLong());\n\t}", "public Transaction(String transactionLine){\r\n\t\t\t//String delims = \"[\\\\s+]\";\r\n\t\t\tString[] tokens = transactionLine.split(\" +\");\r\n\t\t\tif (tokens[0].equals(\"\")){\r\n\t\t\t\tid = 00;\r\n\t\t\t}else{\r\n\t\t\t\tid = Integer.parseInt(tokens[0]);\r\n\t\t\t}\r\n\t\t\tif (id == 0){\r\n\t\t\t\tdate = 0;\r\n\t\t\t\tticket = 0;\r\n\t\t\t\tname = \"\";\r\n\t\t\t}else{\r\n\t\t\t\tdate = Integer.parseInt(tokens[2]);\r\n\t\t\t\tticket = Integer.parseInt(tokens[3]);\r\n\t\t\t\tname = tokens[1];\r\n\t\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t }", "@Override\n protected void loadConfig(String fileName){\n fileName = PSO_PATH + fileName;\n File file = new File(fileName);\n try {\n Scanner sc = new Scanner(file); \n String line = sc.nextLine();\n List<List<String>> list = Arrays.asList(line.split(\",\"))\n .stream()\n .map(s -> Arrays.asList(s.split(\":\"))\n .stream()\n .map(n -> n.replaceAll(\"[^a-zA-Z0-9_.]\", \"\"))\n .collect(Collectors.toList())\n )\n .collect(Collectors.toList());\n\n this.initialTemperature = Double.parseDouble(list.get(0).get(1));\n this.coolingRate = Double.parseDouble(list.get(2).get(1));\n sc.close();\n } \n catch(IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n }" ]
[ "0.6095012", "0.5951369", "0.58270025", "0.57864475", "0.55954635", "0.5583847", "0.55741864", "0.55474895", "0.55315703", "0.5519998", "0.55051726", "0.5490291", "0.5450582", "0.5445324", "0.5417524", "0.52716315", "0.5268688", "0.5263584", "0.5244778", "0.52296126", "0.52204776", "0.52188385", "0.5212375", "0.51863897", "0.5182771", "0.5178378", "0.51762056", "0.5164907", "0.5146527", "0.5107261", "0.5075642", "0.5075464", "0.5073819", "0.5072629", "0.5070182", "0.50589246", "0.50549865", "0.50524807", "0.50374204", "0.5033316", "0.50295657", "0.50192815", "0.5010976", "0.50101936", "0.5004832", "0.49900305", "0.49861354", "0.49853662", "0.49837163", "0.4962341", "0.49498022", "0.49217957", "0.49151266", "0.4913416", "0.48887742", "0.48846996", "0.48831525", "0.48814413", "0.4880845", "0.48549086", "0.48514482", "0.4843704", "0.48390323", "0.48354307", "0.48263478", "0.48219854", "0.48181373", "0.48133257", "0.48100877", "0.4804248", "0.4803628", "0.47852978", "0.4784069", "0.4781261", "0.477007", "0.476562", "0.4764664", "0.4764437", "0.47598147", "0.4757944", "0.47530872", "0.47433832", "0.47430468", "0.47359523", "0.473492", "0.47333357", "0.47132623", "0.4710741", "0.47107053", "0.47064105", "0.47044978", "0.46951452", "0.46874413", "0.4684542", "0.4675757", "0.46750998", "0.46740592", "0.46657482", "0.46636996", "0.46556136" ]
0.5427949
14
Obtiene el id de un Device
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UUID getDeviceId();", "Integer getDeviceId();", "java.lang.String getDeviceId();", "public String getDeviceid() {\n return deviceid;\n }", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "@Override\n public int getDeviceId() {\n return 0;\n }", "@Override\n public String getDeviceId() {\n return this.strDevId;\n }", "DeviceId deviceId();", "DeviceId deviceId();", "public String getDeviceId() {\n return this.DeviceId;\n }", "private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }", "public Integer getDeviceId() {\n return deviceId;\n }", "public Integer getDeviceId() {\n return deviceId;\n }", "private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }", "org.hl7.fhir.String getDeviceIdentifier();", "public String getDeviceId() {\n\t\tString id;\n\t\tid = options.getProperty(\"id\");\n\t\tif(id == null) {\n\t\t\tid = options.getProperty(\"Device-ID\");\n\t\t}\n\t\treturn trimedValue(id);\n\t}", "public final String getDeviceId(){\n return peripheralDeviceId;\n }", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }", "public Device findDeviceById(int id);", "public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}", "@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "public static String deviceId() {\n\t\t// return device id\n\t\treturn getTelephonyManager().getDeviceId();\n\t}", "public String deviceId() {\n return this.deviceId;\n }", "public String getMyDeviceId() {\n return myDeviceId;\n }", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }", "public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }", "public com.flexnet.opsembedded.webservices.ExternalIdQueryType getDeviceUniqueId() {\n return deviceUniqueId;\n }", "public Device findById(Long id) throws Exception;", "@NonNull\n private String getDeviceId() {\n String ANDROID_ID = Settings.Secure.getString(cordova.getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);\n return md5(ANDROID_ID).toUpperCase();\n }", "public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}", "public SmartHomeDevice getCustomDevice(String id);", "public static String getDeviceId(Context context) {\n return getDevice(context).getId();\n }", "public String uuid(){\n\t\t String device_unique_id = Secure.getString(activity.getContentResolver(),\n\t\t Secure.ANDROID_ID);\n\t\t return device_unique_id;\n\t\t}", "public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }", "public String getDevice() {\r\n return device;\r\n }", "Device selectByPrimaryKey(Integer id);", "public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }", "public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);", "public SyncDevice(String id) {\n this.id = id;\n this.displayName = id;\n }", "final int getDeviceNum() {\n return device.getDeviceNum();\n }", "public final String getVendorId(){\n return peripheralVendorId;\n }", "public static String getDeviceID(Context context) {\n return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }", "public int getId() throws android.os.RemoteException;", "public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n deviceId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public UUID getDeviceUuid() {\n return uuid;\n }", "public static FlexID testDeviceID() {\n byte[] identity = {\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0\n };\n\n return new FlexID(identity, FlexIDType.DEVICE, new AttrValuePairs(), null);\n }", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\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 deviceId_ = s;\n }\n return s;\n }\n }", "public SmartDevice readDevice(String id) {\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_NAME, null, COLUMN_ID + \"=?\", new String[]{id}, null, null, null);\n if (cursor.getCount() <= 0) // If there is nothing found\n return null;\n cursor.moveToFirst(); // In case there are more users with same ID\n SmartDevice device = createDevice(cursor);\n\n close();\n return device;\n }", "String getBusi_id();", "@Override\n\tpublic Device loadwDeviceById(int id) {\n\t\treturn (Device) dataAccessUtil.findById(Device.class,id);\n\t}", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();" ]
[ "0.8100777", "0.8088545", "0.7970645", "0.7890361", "0.78471774", "0.770232", "0.7513738", "0.7504905", "0.7492405", "0.74685836", "0.74685836", "0.7463273", "0.745105", "0.7303936", "0.7303936", "0.7284161", "0.7283877", "0.72239006", "0.7221324", "0.7209847", "0.72087246", "0.7201611", "0.72013956", "0.709229", "0.7088967", "0.70686287", "0.70532906", "0.7003677", "0.6991232", "0.6983551", "0.6977056", "0.69512737", "0.69435734", "0.6797216", "0.6788183", "0.67519283", "0.6748916", "0.673802", "0.67378235", "0.6722363", "0.6672865", "0.6668495", "0.66680825", "0.6667392", "0.6655715", "0.66552675", "0.663491", "0.66269773", "0.66149575", "0.66046965", "0.6581453", "0.6580315", "0.65570086", "0.65467155", "0.6534946", "0.65329665", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6527938", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234", "0.6502234" ]
0.0
-1
Modifica el id de un Device
public void setId(Long id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getDeviceId();", "UUID getDeviceId();", "@Override\n public int getDeviceId() {\n return 0;\n }", "public String getDeviceid() {\n return deviceid;\n }", "java.lang.String getDeviceId();", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "public boolean updateDevice(int origionalDevice_id, Device newDevice) \n\t{\n\t\treturn false;\n\t}", "public void setRingerDevice(String devid);", "public int removeCustomDevice(String id);", "public Device findDeviceById(int id);", "int updateByPrimaryKey(Device record);", "int updateByPrimaryKey(Device record);", "public SyncDevice(String id) {\n this.id = id;\n this.displayName = id;\n }", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "public final void setDeviceId(String productId){\n peripheralDeviceId = productId;\n }", "public Device findById(Long id) throws Exception;", "@Override\n public String getDeviceId() {\n return this.strDevId;\n }", "@Override\n\tpublic Device loadwDeviceById(int id) {\n\t\treturn (Device) dataAccessUtil.findById(Device.class,id);\n\t}", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "@Override\n\tpublic int updateDevice(DeviceBean db) {\n\t\treturn dao.updateDevice(db);\n\t}", "int updateByPrimaryKeySelective(Device record);", "int updateByPrimaryKeySelective(Device record);", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}", "public void setID(String newID)\r\n {\r\n id=newID;\r\n }", "public void setId(byte value) {\r\n this.id = value;\r\n }", "public void setDeviceId(String DeviceId) {\n this.DeviceId = DeviceId;\n }", "public int getId() throws android.os.RemoteException;", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(short value) {\n this.id = value;\n }", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "public void setId(byte id){this.id = id;}", "@Nullable\n @SuppressLint(\"HardwareIds\")\n private String createId(Context context) {\n String id = Settings.Secure.getString(\n context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String device = Build.DEVICE;\n id += device;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n return HexCoder.toHex(md.digest(id.getBytes(\"UTF-8\")));\n } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {\n Log.e(TAG, \"createId: \"+e.toString());\n }\n return null;\n }", "void setId(int val);", "public final String getDeviceId(){\n return peripheralDeviceId;\n }", "public String getDeviceId() {\n return this.DeviceId;\n }", "public void setId(int newId) {\n roomId = newId;\n }", "public void setId(String newValue);", "@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }", "public void notificar()\n\t{\n\n\t\tSocket socket;\n\t\tDataOutputStream out;\n\n\t\ttry\n\t\t{\n\t\t\tsocket = new Socket(host, port);\n\n\t\t\tout = new DataOutputStream(socket.getOutputStream());\n\n\t\t\tout.writeUTF(id);\n\n\t\t\tsocket.close();\n\n\t\t} catch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public Integer getDeviceId() {\n return deviceId;\n }", "public Integer getDeviceId() {\n return deviceId;\n }", "public void setID(long id);", "public void setId(java.lang.Long newId);", "int updateByPrimaryKey(TpDevicePlay record);", "public void setId_rango(java.lang.Integer newId_rango);", "org.hl7.fhir.String getDeviceIdentifier();", "public void setId(String key, Object value) {\n // remove ID, if empty/0/null\n // if we only skipped it, the existing entry will stay although someone changed it to empty.\n String v = String.valueOf(value);\n if (\"\".equals(v) || \"0\".equals(v) || \"null\".equals(v)) {\n ids.remove(key);\n }\n else {\n ids.put(key, value);\n }\n firePropertyChange(key, null, value);\n\n // fire special events for our well known IDs\n if (Constants.TMDB.equals(key) || Constants.IMDB.equals(key) || Constants.TVDB.equals(key) || Constants.TRAKT.equals(key)) {\n firePropertyChange(key + \"Id\", null, value);\n }\n }", "public void setId_tecnico(java.lang.Long newId_tecnico);", "@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }", "private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }", "public SmartHomeDevice getCustomDevice(String id);", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "final int getDeviceNum() {\n return device.getDeviceNum();\n }", "public void setId(int newId) {\n this.id = newId;\n }", "@Override public int getId() throws android.os.RemoteException\n {\n return 0;\n }", "public void setId(int value) {\r\n this.id = value;\r\n }", "int updateByPrimaryKeySelective(TpDevicePlay record);", "DeviceId deviceId();", "DeviceId deviceId();", "private void setId() {\n id = count++;\n }", "int getId() throws UnsupportedOperationException;", "protected void setId(short id) {\n this.id = id;\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setDevice(String device) {\r\n this.device = device;\r\n }", "public void setID() throws IOException;", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "void setIdNumber(String idNumber);", "public void setId(int value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "void setId(Long id);", "void setId(int id) throws UnsupportedOperationException;", "Device selectByPrimaryKey(Integer id);", "public void setId(int newId) {\n\tid = newId;\n}", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId( Long id );", "public void setIdProducto(int value) {\n this.idProducto = value;\n }", "void addSubDevice(PhysicalDevice subDevice, String id);", "private void syncConnectedDeviceId(String newDeviceId, boolean isReference) {\n // Add the newly connected device id\n Map<Object, Object> devicesMap = new HashMap<>((Map<?, ?>) getEcologyDataSync().getData\n (\"devices\"));\n devicesMap.put(newDeviceId, isReference);\n getEcologyDataSync().setData(\"devices\", devicesMap);\n }", "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "public void setIdDeMonje(long newIdDeMonje) {\r\n this.idDeMonje = newIdDeMonje;\r\n }", "public void setId(int value) {\n this.id = value;\n }" ]
[ "0.6788574", "0.6611354", "0.65949595", "0.6535772", "0.6509842", "0.64874506", "0.633505", "0.6273562", "0.62723374", "0.62634367", "0.62603664", "0.6228148", "0.6228148", "0.6214409", "0.6160219", "0.6085349", "0.60401905", "0.60356766", "0.60289365", "0.60265225", "0.6020245", "0.6006962", "0.6006962", "0.5971079", "0.59623116", "0.59623116", "0.5960604", "0.5951799", "0.5950657", "0.5928044", "0.5924327", "0.5907606", "0.5899224", "0.5899219", "0.5877398", "0.58738256", "0.58645904", "0.58621764", "0.58549315", "0.5850135", "0.5844327", "0.58431244", "0.582892", "0.58237046", "0.5820594", "0.5820594", "0.5820594", "0.5820594", "0.5796876", "0.5796876", "0.5790755", "0.57878286", "0.5787412", "0.5776564", "0.57708657", "0.5758604", "0.5755574", "0.5755093", "0.5752321", "0.57521755", "0.57520556", "0.57520556", "0.57520556", "0.57520556", "0.57520556", "0.57520556", "0.57520556", "0.57514083", "0.57373804", "0.5737176", "0.5736677", "0.5726894", "0.5721137", "0.5721137", "0.5720599", "0.571745", "0.5714348", "0.5714226", "0.5714226", "0.57136625", "0.5712009", "0.5710823", "0.5710823", "0.57087314", "0.5683611", "0.5683528", "0.5683528", "0.5683528", "0.56821156", "0.56809795", "0.56809574", "0.5674703", "0.56726956", "0.56726956", "0.5671619", "0.5669289", "0.56599236", "0.5657431", "0.56564146", "0.56560856", "0.5655881" ]
0.0
-1
Obtiene el nombre de un Device
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n\t\treturn \"Device\";\r\n\t}", "String getDeviceName();", "public String getDeviceName() {\r\n return name_;\r\n }", "public String getName() {\n\t return this.device.getName() + \".\" + this.getType() + \".\"\n\t + this.getId();\n\t}", "public String deviceName() {\n\t\t String manufacturer = Build.MANUFACTURER;\n\t\t String model = Build.MODEL;\n\t\t if (model.startsWith(manufacturer)) {\n\t\t return capitalize(model);\n\t\t } else {\n\t\t return capitalize(manufacturer) + \" \" + model;\n\t\t }\n\t\t}", "public String getDeviceName(){\n\t return deviceName;\n }", "public String getDeviceName(){\n\t\treturn deviceName;\n\t}", "private String getDeviceName() {\n String permission = \"android.permission.BLUETOOTH\";\n int res = context.checkCallingOrSelfPermission(permission);\n if (res == PackageManager.PERMISSION_GRANTED) {\n try {\n BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();\n if (myDevice != null) {\n return myDevice.getName();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return \"Unknown\";\n }", "public String getDeviceName() {\n return deviceName;\n }", "public static String getDeviceName(){\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\r\n if (bluetoothAdapter == null){\r\n return \"\";\r\n }else{\r\n String deviceName = bluetoothAdapter.getName();\r\n return deviceName;\r\n }\r\n }", "public String getDeviceName() {\n return deviceName;\n }", "String getDeviceName() {\n return deviceName;\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n }\n return capitalize(manufacturer) + \" \" + model;\n }", "public String getDeviceName() {\n\t\treturn deviceName;\n\t}", "public static String getDeviceName() {\n\t\t\tString manufacturer = Build.MANUFACTURER;\n\t\t\tString model = Build.MODEL;\n\t\t\tif (model.startsWith(manufacturer)) {\n\t\t\t\treturn capitalize(model);\n\t\t\t}\n\t\t\treturn capitalize(manufacturer) + \" \" + model;\n\t\t}", "public String getDeviceName() {\n return mUsbDevice.getDeviceName();\n }", "java.lang.String getDeviceId();", "private String getUserConfiguredDeviceName() {\n\t\tString nameFromSystemDevice = Settings.Secure.getString(getContentResolver(), \"device_name\");\n\t\tif (!isEmpty(nameFromSystemDevice)) return nameFromSystemDevice;\n\t\treturn null;\n\t}", "public String getDeviceName() {\n return this.deviceName;\n }", "@Override\n\tpublic String getDeviceName() {\n\t\treturn null;\n\t}", "public String getDevice() {\r\n return device;\r\n }", "@Override\n public String getDeviceName() {\n return null;\n }", "org.hl7.fhir.String getDeviceIdentifier();", "public String getDeviceNameForMacro() {\r\n String name = getDeviceName();\r\n\r\n if(name.startsWith(\"PIC32\")) {\r\n return name.substring(3); // \"32MX795F512L\"\r\n } else if(name.startsWith(\"ATSAM\")) {\r\n return name.substring(2); // \"SAME70Q21\"\r\n } else {\r\n return name;\r\n }\r\n }", "public String getDeviceSeriesName() {\r\n if(isMips32()) {\r\n String devname = getDeviceName();\r\n\r\n if(devname.startsWith(\"M\")) {\r\n return devname.substring(0, 3);\r\n } else if(devname.startsWith(\"USB\")) {\r\n return devname.substring(0, 5);\r\n } else {\r\n return devname.substring(0, 7);\r\n }\r\n } else {\r\n return getAtdfFamily();\r\n }\r\n }", "public String getFriendlyName() {\n return this.bluetoothStack.getLocalDeviceName();\n }", "public final String getInternalName(){\n return peripheralFriendlyName;\n }", "public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }", "public final String getFriendlyName(){\n return peripheralFriendlyName;\n }", "public String readDeviceSN(){\r\n return mFactoryBurnUtil.readDeviceSN();\r\n }", "final int getDeviceNum() {\n return device.getDeviceNum();\n }", "public String getMyDeviceName() {\n return bluetoothName;\n }", "protected final String getManufacturerName() {\n return device.getManufacturerName();\n }", "public String getRingerDevice();", "public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "protected final String getModelName() {\n return device.getModelName();\n }", "public String getDeviceid() {\n return deviceid;\n }", "public void setDeviceName(String dn) {\r\n \tthis.deviceName = dn;\r\n }", "public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}", "void setDeviceName(String newDeviceName) {\n deviceName = newDeviceName;\n }", "private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }", "Integer getDeviceId();", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "@Override\n public String getDeviceId() {\n return this.strDevId;\n }", "public java.lang.String getResultDeviceName() {\n return resultDeviceName;\n }", "public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "public static String m21396c() {\n return Build.MANUFACTURER;\n }", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "public static String getDeviceModel() {\n String deviceName = SystemProperties.get(\"prize.system.boot.rsc\");\n // prize modify for bug66476 by houjian end\n deviceName = !TextUtils.isEmpty(deviceName) ? deviceName : Build.MODEL + DeviceInfoUtils.getMsvSuffix();\n //prize modified by xiekui, fix bug 74122, 20190408-start\n return UtilsExt.useDeviceInfoSettingsExt() == null ? deviceName : UtilsExt.useDeviceInfoSettingsExt().customeModelInfo(deviceName);\n //prize modified by xiekui, fix bug 74122, 20190408-end\n }", "UUID getDeviceId();", "String getSelectedDevice() {\n return selectedDevice;\n }", "private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }", "private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}", "public void setDeviceName(String argDeviceName) {\n\t deviceName = argDeviceName;\n }", "public String getDeviceId() {\n return this.DeviceId;\n }", "public void setDeviceName(String deviceName) {\n this.deviceName = deviceName;\n }", "public static String getGnssHardwareModelName(Context context) {\n String modelName = \"\";\n LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n if (locationManager.getGnssHardwareModelName() != null) {\n modelName = String.valueOf(locationManager.getGnssHardwareModelName());\n }\n }\n return modelName;\n }", "String getPlatformName();", "public static String osName() {\r\n Object _osname=null;\r\n \r\n try {\r\n _osname=System.getProperty(\"os.name\");\r\n }\r\n catch (Exception ex) {\r\n _osname=null;\r\n ex.printStackTrace();\r\n }\r\n \r\n String _name=\"\";\r\n if (_osname!=null) _name=_osname.toString();\r\n \r\n return _name;\r\n }", "private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }", "public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }", "DeviceId deviceId();", "DeviceId deviceId();", "private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }", "@Override\n public String getDeviceOwnerName() {\n if (!mHasFeature) {\n return null;\n }\n Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity())\n || hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));\n\n synchronized (getLockObject()) {\n if (!mOwners.hasDeviceOwner()) {\n return null;\n }\n // TODO This totally ignores the name passed to setDeviceOwner (change for b/20679292)\n // Should setDeviceOwner/ProfileOwner still take a name?\n String deviceOwnerPackage = mOwners.getDeviceOwnerPackageName();\n return getApplicationLabel(deviceOwnerPackage, UserHandle.USER_SYSTEM);\n }\n }", "private String getUniqueNodeName() {\n return String.format(\"N%d\", uniqueNode++);\n }", "public final String getDeviceId(){\n return peripheralDeviceId;\n }", "public abstract String getPeripheralStaticName();", "public String deviceId() {\n return this.deviceId;\n }", "@Override\r\n\tpublic String getCpDeviceTypeName() {\r\n\t\treturn \"TAPE\";\r\n\t}", "public String getDeviceDescription() {\r\n return deviceDesc;\r\n }", "public String getHostName() {\n\t\treturn \"RaspberryHostName\";\n\t}", "Reference getDevice();", "@Override\n public String toString(){\n return partnerDeviceNum;\n }", "@Override\n public int getDeviceId() {\n return 0;\n }", "@Override\n\t\t\tpublic String toString(Device device) {\n\t\t\t\treturn device.getModel()+\"(\"+device.getComPort()+\")\";\n\t\t\t}", "@Override\n\t\t\tpublic String toString(Device device) {\n\t\t\t\treturn device.getModel()+\"(\"+device.getComPort()+\")\";\n\t\t\t}", "private void getDynamicProfie() {\n getDeviceName();\n }", "@Override\r\n public final String toString() {\r\n return \"\\nDevice ID: [\" + getId() + \"]\\n\"\r\n + \"Device Name: [\" + getName() + \"]\\n\"\r\n + \"Device Size: [\" + getSize() + \"]\\n\"\r\n + \"Device Position: [\" + getPosition() + \"]\\n\"\r\n + \"Device Resolution: [\" + getResolution() + \"\\n\"\r\n + \"Device Refresh Rate: [\" + getRefreshRate() + \"\\n\"\r\n + \"Device Bits Per Pixel: [\" + getBpp() + \"\\n\"\r\n + \"Supported Display Modes: [\" + getSupportedDisplaySettings().size() + \"]\\n\";\r\n }", "public String getCaptureDevice();", "public static String getManufacturer() {\n String mfg = \"unknown\"; //$NON-NLS-1$\n if (apiLevel() > 3) {\n try {\n final Class<?> buildClass = Build.class;\n mfg = (String) buildClass.getField(\"MANUFACTURER\").get(null); //$NON-NLS-1$\n } catch (final Exception ignore) {\n Log.d(TAG, \"Caught exception\", ignore); //$NON-NLS-1$\n }\n }\n return mfg;\n }", "public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n deviceId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getDeviceNameGetPoint() {\n\t\treturn deviceNameGetPoint;\n\t}", "public void setDeviceName(String deviceName) {\n\t\tthis.deviceName = deviceName;\n\t}", "public final String getDeviceType(){\n return TYPE;\n }", "public String deviceType(){\n String deviceType;\n size = driver.manage().window().getSize();\n if((size.getHeight()>800)&&(size.getWidth()>500)){\n return deviceType = \"iPad\";\n } else {\n return deviceType = \"iPhone\";\n }\n }", "public String getLastUsedDevice() {\n return lastUsedDevice;\n }", "public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\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 deviceId_ = s;\n }\n return s;\n }\n }", "public String getTextDeviceIdentifier() {\r\n\t\tString DeviceIdentifier = safeGetText(addVehiclesHeader.replace(\"Add Vehicle\", \"Please Enter Device IMEI Number\"), SHORTWAIT);\r\n\t\treturn DeviceIdentifier;\r\n\t}", "public String getDevice_type() {\r\n\t\treturn device_type;\r\n\t}", "@NonNull\n private String getDeviceId() {\n String ANDROID_ID = Settings.Secure.getString(cordova.getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);\n return md5(ANDROID_ID).toUpperCase();\n }", "public String getManufacturer() {\n\t\treturn \"Raspberry\";\n\t}", "public static String deviceId() {\n\t\t// return device id\n\t\treturn getTelephonyManager().getDeviceId();\n\t}", "@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "public ScText newMobileDeviceNameText()\n {\n return newMobileDeviceNameText(\"Mobile Device Name\");\n }" ]
[ "0.7957136", "0.7672281", "0.76672626", "0.7515297", "0.7492519", "0.7491404", "0.7444161", "0.7382549", "0.72941124", "0.7292736", "0.7281426", "0.72370535", "0.72297704", "0.72297704", "0.7221127", "0.721013", "0.716952", "0.7058681", "0.6967126", "0.6898375", "0.6852332", "0.6846622", "0.67837226", "0.675811", "0.6757233", "0.6722946", "0.66404206", "0.6629547", "0.66257405", "0.6568567", "0.6540323", "0.6494515", "0.64814943", "0.64537156", "0.64514285", "0.6448705", "0.6385989", "0.636597", "0.6361092", "0.631308", "0.6312334", "0.62803483", "0.6266103", "0.6260189", "0.6251543", "0.6246707", "0.6198606", "0.6185421", "0.6147878", "0.6143709", "0.6130688", "0.61208755", "0.61203474", "0.6120298", "0.61090434", "0.61009353", "0.6099253", "0.6098311", "0.6095652", "0.6094288", "0.6094039", "0.6091479", "0.6090668", "0.60905427", "0.6083536", "0.60743886", "0.6072872", "0.60666436", "0.60666436", "0.60632145", "0.6057801", "0.6039218", "0.6023443", "0.6004474", "0.6003526", "0.6001846", "0.6001037", "0.59917057", "0.5976411", "0.59582156", "0.5956253", "0.5952755", "0.5952755", "0.59505945", "0.59466153", "0.59461695", "0.5944356", "0.5938729", "0.5934504", "0.59255433", "0.59235656", "0.59231526", "0.59217596", "0.5917037", "0.59064925", "0.5897051", "0.5885771", "0.5881309", "0.5873282", "0.58732027", "0.58710927" ]
0.0
-1
Modifica el nombre de un Device
public void setName(String name) { this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDeviceName(String newDeviceName) {\n deviceName = newDeviceName;\n }", "abstract protected void setDeviceName(String deviceName);", "public String getName() {\n\t\treturn \"Device\";\r\n\t}", "String getDeviceName();", "public String getDeviceName() {\r\n return name_;\r\n }", "public String getDeviceName(){\n\t return deviceName;\n }", "public void setDeviceName(String argDeviceName) {\n\t deviceName = argDeviceName;\n }", "public String getDeviceName(){\n\t\treturn deviceName;\n\t}", "public void setDeviceName(String dn) {\r\n \tthis.deviceName = dn;\r\n }", "public void setDeviceName(String deviceName) {\n this.deviceName = deviceName;\n }", "public String deviceName() {\n\t\t String manufacturer = Build.MANUFACTURER;\n\t\t String model = Build.MODEL;\n\t\t if (model.startsWith(manufacturer)) {\n\t\t return capitalize(model);\n\t\t } else {\n\t\t return capitalize(manufacturer) + \" \" + model;\n\t\t }\n\t\t}", "public String getName() {\n\t return this.device.getName() + \".\" + this.getType() + \".\"\n\t + this.getId();\n\t}", "String getDeviceName() {\n return deviceName;\n }", "public void setDeviceName(String deviceName) {\n\t\tthis.deviceName = deviceName;\n\t}", "public String getDeviceName() {\n return deviceName;\n }", "public String getDeviceName() {\n return deviceName;\n }", "public String getDeviceName() {\n\t\treturn deviceName;\n\t}", "private String normalizeDeviceName(String devname) {\r\n devname = devname.toUpperCase();\r\n\r\n if(devname.startsWith(\"SAM\")) {\r\n devname = \"AT\" + devname;\r\n } else if(devname.startsWith(\"32\")) {\r\n devname = \"PIC\" + devname;\r\n } else if(devname.startsWith(\"P32\")) {\r\n devname = \"PIC\" + devname.substring(1);\r\n }\r\n\r\n return devname;\r\n }", "@Override\n public void onDeviceNameChange(BluetoothDevice device, String name) {\n Log.d(TAG, \"[onDeviceNameChange] device : \" + device.getAddress()\n + \", name : \" + name);\n// sendHandlerMessage(UPDATE_UI_FLAG, 0);\n updateScanDialog(UPDATE_UI_FLAG, device);\n }", "public DeviceDescription setName(String name) {\n this.name = name;\n return this;\n }", "private String getDeviceName() {\n String permission = \"android.permission.BLUETOOTH\";\n int res = context.checkCallingOrSelfPermission(permission);\n if (res == PackageManager.PERMISSION_GRANTED) {\n try {\n BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();\n if (myDevice != null) {\n return myDevice.getName();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return \"Unknown\";\n }", "public void setDeviceName(String deviceName) {\n this.deviceName = deviceName == null ? null : deviceName.trim();\n }", "private BluetoothDevice mBTDeviceByName(String sNewDeviceName) {\n if (oDevice == null) {\n Set<BluetoothDevice> pairedDevices = oBTadapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (mTextLike(sNewDeviceName,device.getName())){\n return device;\n }\n }\n }\n } else {\n if (mTextLike(sNewDeviceName,oDevice.getName())) {\n return oDevice;\n }\n }\n return null;\n }", "@Override\n public String getDeviceName() {\n return null;\n }", "@Override\n\tpublic String getDeviceName() {\n\t\treturn null;\n\t}", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n } else {\n return capitalize(manufacturer) + \" \" + model;\n }\n }", "public String getDeviceName() {\n return this.deviceName;\n }", "public static String getDeviceName() {\n String manufacturer = Build.MANUFACTURER;\n String model = Build.MODEL;\n if (model.startsWith(manufacturer)) {\n return capitalize(model);\n }\n return capitalize(manufacturer) + \" \" + model;\n }", "java.lang.String getDeviceId();", "public final String getInternalName(){\n return peripheralFriendlyName;\n }", "public String getDeviceName() {\n return mUsbDevice.getDeviceName();\n }", "public final String getFriendlyName(){\n return peripheralFriendlyName;\n }", "public static String getDeviceName() {\n\t\t\tString manufacturer = Build.MANUFACTURER;\n\t\t\tString model = Build.MODEL;\n\t\t\tif (model.startsWith(manufacturer)) {\n\t\t\t\treturn capitalize(model);\n\t\t\t}\n\t\t\treturn capitalize(manufacturer) + \" \" + model;\n\t\t}", "protected final String getManufacturerName() {\n return device.getManufacturerName();\n }", "public void setDevice(String device) {\r\n this.device = device;\r\n }", "public boolean clearDeviceTypeAndNameBuffer();", "public static String getDeviceName(){\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\r\n if (bluetoothAdapter == null){\r\n return \"\";\r\n }else{\r\n String deviceName = bluetoothAdapter.getName();\r\n return deviceName;\r\n }\r\n }", "public String getDeviceSeriesName() {\r\n if(isMips32()) {\r\n String devname = getDeviceName();\r\n\r\n if(devname.startsWith(\"M\")) {\r\n return devname.substring(0, 3);\r\n } else if(devname.startsWith(\"USB\")) {\r\n return devname.substring(0, 5);\r\n } else {\r\n return devname.substring(0, 7);\r\n }\r\n } else {\r\n return getAtdfFamily();\r\n }\r\n }", "public void setDevice(final String device)\n {\n this.device = device;\n }", "public final void setFriendlyName(String friendlyName){\n peripheralFriendlyName = friendlyName;\n }", "public String getDeviceNameForMacro() {\r\n String name = getDeviceName();\r\n\r\n if(name.startsWith(\"PIC32\")) {\r\n return name.substring(3); // \"32MX795F512L\"\r\n } else if(name.startsWith(\"ATSAM\")) {\r\n return name.substring(2); // \"SAME70Q21\"\r\n } else {\r\n return name;\r\n }\r\n }", "public String getDevice() {\r\n return device;\r\n }", "private void getDynamicProfie() {\n getDeviceName();\n }", "public void setRingerDevice(String devid);", "private String getUserConfiguredDeviceName() {\n\t\tString nameFromSystemDevice = Settings.Secure.getString(getContentResolver(), \"device_name\");\n\t\tif (!isEmpty(nameFromSystemDevice)) return nameFromSystemDevice;\n\t\treturn null;\n\t}", "public final void setInternalName(String internalName){\n peripheralInternalName = internalName;\n }", "public String getMyDeviceName() {\n return bluetoothName;\n }", "protected final String getModelName() {\n return device.getModelName();\n }", "private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }", "org.hl7.fhir.String getDeviceIdentifier();", "public void actualizarNombrePoder(){\n\t\tString name = ( game.getCurrentSorpresa() == null )?\"No hay sorpresa\":game.getCurrentSorpresa().getClass().getName();\n\t\tn2.setText(name.replace(\"aplicacion.\",\"\"));\n\t}", "public abstract String getPeripheralStaticName();", "public void updateName() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n userFound.setNombre(objcliente.getNombre());\n clientefacadelocal.edit(userFound);\n objcliente = new Cliente();\n mensaje = \"sia\";\n } else {\n mensaje = \"noa\";\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n mensaje = \"noa\";\n System.out.println(\"El error al actualizar el nombre es \" + e);\n }\n }", "public void newInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been initialized\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to set the name of a device\");\n\t\tdeviceNameTable.addName(testDeviceId, null, \"La lampe HUE 1\");\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tString name = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to delete the device name: \");\n\t\tdeviceNameTable.deleteName(testDeviceId, null);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device\");\n\t\tname = deviceNameTable.getName(testDeviceId, null);\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t\tlogger.debug(\"@@@@@@@@@@@@@@@@@@@ Try to get the name of a device for a non existing user\");\n\t\tname = deviceNameTable.getName(testDeviceId, \"plop\");\n\t\tlogger.debug(\" @@@@@@@@@@@@ Device name get: \"+name);\n\t\t\n\t}", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "private void createDevice(String host, int port, String name) {\n ThingUID uid = new ThingUID(THING_TYPE_DEVICE, name);\n\n if (uid != null) {\n Map<String, Object> properties = new HashMap<>(1);\n properties.put(\"hostname\", host);\n properties.put(\"port\", port);\n properties.put(\"name\", name);\n DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)\n .withLabel(\"Kinect Device\").build();\n thingDiscovered(result);\n }\n }", "private void wifiName() {\n\t\tSystem.out.println(\"The wifi name is Redmi\");\n\t}", "public ScText newMobileDeviceNameText()\n {\n return newMobileDeviceNameText(\"Mobile Device Name\");\n }", "public String updateDevice(ProductModel ndm) {\n\t\tdeviceData.editDevice(ndm);\r\n\t\treturn null;\r\n\t}", "private boolean checkDeviceName(String name) {\n switch (name) {\n case \"LAPTOP\" :\n case \"PRINTER\" :\n case \"ROUTER\" :\n return true;\n default:\n return false;\n }\n }", "public synchronized void setName(final InternationalString newValue) {\n checkWritePermission();\n name = newValue;\n }", "final int getDeviceNum() {\n return device.getDeviceNum();\n }", "public void setName(String newname){\n name = newname; \n }", "@Override\r\n public void onDeviceDescription(GenericDevice dev, PDeviceHolder devh,\r\n String desc) {\n\r\n }", "public abstract UPnPDeviceNode GetDeviceNode(String name);", "@Override\n\t\t\tpublic String toString(Device device) {\n\t\t\t\treturn device.getModel()+\"(\"+device.getComPort()+\")\";\n\t\t\t}", "@Override\n\t\t\tpublic String toString(Device device) {\n\t\t\t\treturn device.getModel()+\"(\"+device.getComPort()+\")\";\n\t\t\t}", "@Override\r\n\t\tpublic int compare(Device o1, Device o2) {\n\t\t\treturn o1.getdName().compareTo(o2.getdName());\r\n\t\t}", "public String getRingerDevice();", "public Device(String name, String typeName, Room room) {\n this.name = name.replace(\" \", \"_\");\n this.typeName = name.replace(\" \", \"_\");\n this.room = room;\n }", "public String getName()\r\n/* 23: */ {\r\n/* 24:20 */ return \"Wire demo receiver\";\r\n/* 25: */ }", "public void setName(String new_name){\n this.name=new_name;\n }", "TargetDevice(String devname) throws com.microchip.crownking.Anomaly,\r\n org.xml.sax.SAXException,\r\n java.io.IOException,\r\n javax.xml.parsers.ParserConfigurationException,\r\n IllegalArgumentException {\r\n\r\n pic_ = (xPIC) xPICFactory.getInstance().get(devname);\r\n name_ = normalizeDeviceName(devname);\r\n\r\n if(Family.PIC32 == pic_.getFamily() || Family.ARM32BIT == pic_.getFamily()) {\r\n instructionSets_ = new ArrayList<>(pic_.getInstructionSet().getSubsetIDs());\r\n\r\n String setId = pic_.getInstructionSet().getID();\r\n if(setId != null && !setId.isEmpty()) {\r\n instructionSets_.add(setId);\r\n }\r\n } else {\r\n String what = \"Device \" + devname + \" is not a recognized MIPS32 or Arm device.\";\r\n throw new IllegalArgumentException(what);\r\n }\r\n }", "public String getDeviceid() {\n return deviceid;\n }", "public void setName() {\r\n\t\tapplianceName = \"ElectricShower\";\r\n\t}", "public String readDeviceSN(){\r\n return mFactoryBurnUtil.readDeviceSN();\r\n }", "public void setName(String newname)\n {\n name = newname;\n \n }", "public void setName(String name) {\n characterName = name;\n }", "public void setName(String n);", "DeviceDetail(String setMacAddress, String setDeviceName) {\n if (!isValidMac(setMacAddress) || isDuplicated(setMacAddress)) {\n throw new IllegalArgumentException(\"Not a valid mac\");\n }\n macAddress = setMacAddress.toUpperCase(Locale.getDefault());\n deviceName = setDeviceName;\n }", "public Device(String d_name, String s_name, String d_mac, String s_id, String s_alive) {\n this.d_name = d_name;\n this.s_name = s_name;\n this.d_mac = d_mac;\n this.s_id = s_id;\n this.s_alive = s_alive;\n // this.d_alive = d_alive; // 0 : die , 1 : alive\n }", "public void setName(String n){ name=n; }", "private void setName() {\n\t\t//MAKE SURE NOT TO GET ACCIDENTAL RECURSION HERE\n\t\t//DO NOT JUST MAKE A NEW TRIAD AND COMPARE TO CURRENT TRIAD\n\t\t//UNLESS ??? MAYBEDON\"T PUT SET NAME IN THE CONSTRUCTOR?\n\t\t//SIMILAR PROBLEM TO SETINVERSION\n\t\t\n\t\t//major, minor, diminished, augmented\n\t\t//this.name = name;\n\t}", "public void setName (String n){\n\t\tname = n;\n\t}", "public Builder setDeviceId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n deviceId_ = value;\n onChanged();\n return this;\n }", "public void addDevice()\r\n\t\t{\n\t\t\t\r\n\t\t\tSystem.out.println(\" Enter Device Name \");\r\n\t\t\tString devName = sc.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter cost of the device \");\r\n\t\t\tint devCost = Integer.parseInt(sc.nextLine());\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Give the average rating for the device \");\r\n\t\t\tint devRating = Integer.parseInt(sc.nextLine());\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" Enter Device Brand Name \");\r\n\t\t\tString devBrand = sc.nextLine();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tDevice newDevice = new Device(devName, devCost,devRating,devBrand);\r\n\t\t\tString modelNumber = record.addDevice(newDevice);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" Device Inserted :- \"+modelNumber);\r\n\t\t}", "void addDevice(String device) {\n availableDevices.add(device);\n resetSelectedDevice();\n }", "private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "public void changeProductName(int id,String name)\n {\n Product product = findProduct(id);\n \n if(product != null)\n {\n System.out.println(\"Name change from \" + product.getName() + \" to \"\n + name);\n product.name = name;\n }\n }", "private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "public void setName(String newValue);", "public void setName(String newValue);", "public void setName(String value) {\n this.name = value;\n }", "protected final String getSynthName() {\n return device.getSynthName();\n }", "@Override\r\n\tpublic String getCpDeviceTypeName() {\r\n\t\treturn \"TAPE\";\r\n\t}", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "public void helper1(Automobile car, String newData) {\n\t\tcar.setName(newData); \n\t}", "@Override\n public String getDeviceId() {\n return this.strDevId;\n }" ]
[ "0.7424523", "0.70176566", "0.6886219", "0.6814997", "0.676015", "0.67133826", "0.66457814", "0.65846276", "0.6568216", "0.6498399", "0.64754456", "0.6385622", "0.63840663", "0.6358606", "0.6356684", "0.6333523", "0.6292695", "0.62875694", "0.628555", "0.6246384", "0.6223105", "0.60628617", "0.6051485", "0.6041377", "0.6037639", "0.603428", "0.603428", "0.60271317", "0.59954065", "0.59740734", "0.596923", "0.594278", "0.5941731", "0.59415543", "0.5917899", "0.59130895", "0.59019053", "0.58649826", "0.5848482", "0.58222085", "0.5810858", "0.58061624", "0.57889926", "0.57669693", "0.57548004", "0.57541585", "0.56956345", "0.5685913", "0.564822", "0.5645209", "0.5620504", "0.56042236", "0.5584918", "0.5584807", "0.5573331", "0.5508438", "0.55060524", "0.5499628", "0.54885626", "0.5471462", "0.5459382", "0.54550016", "0.545034", "0.5446758", "0.5439965", "0.54347634", "0.5430413", "0.5430413", "0.54071134", "0.5397121", "0.53930014", "0.5387701", "0.5383645", "0.53787506", "0.53584194", "0.53487474", "0.5341318", "0.53411233", "0.53246933", "0.53240323", "0.5313679", "0.5309474", "0.5309465", "0.5309224", "0.53085", "0.5307181", "0.53056157", "0.5298908", "0.529786", "0.5288803", "0.52886975", "0.52852046", "0.52825016", "0.527876", "0.527876", "0.52771086", "0.5275913", "0.52643746", "0.5255695", "0.52549523", "0.52494913" ]
0.0
-1
Obtiene el numero de un Device
public int getNumber() { return number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final int getDeviceNum() {\n return device.getDeviceNum();\n }", "Integer getDeviceId();", "public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }", "final int getDriverNum() {\n return device.getDriverNum(this);\n }", "public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "public Integer getDeviceId() {\n return deviceId;\n }", "public Integer getDeviceId() {\n return deviceId;\n }", "@Override\n public int getDeviceId() {\n return 0;\n }", "public int getNumOfRequiredDevices() {\n return mRequiredDeviceNumber;\n }", "private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "java.lang.String getDeviceId();", "public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }", "public Integer getDevices() {\r\n return devices;\r\n }", "DeviceId deviceId();", "DeviceId deviceId();", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "public String getDevice() {\r\n return device;\r\n }", "private int getDeviceIndex(final IDevice device) {\n TestDevice td;\n \n for (int index = 0; index < mDevices.size(); index++) {\n td = mDevices.get(index);\n if (td.getSerialNumber().equals(device.getSerialNumber())) {\n return index;\n }\n }\n return -1;\n }", "public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}", "private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }", "public static String deviceId() {\n\t\t// return device id\n\t\treturn getTelephonyManager().getDeviceId();\n\t}", "default public int getControlToDevicePort()\t\t\t\t{ return 2226; }", "default public int getCodeToDevicePort()\t\t\t\t{ return 2225; }", "public String getDeviceid() {\n return deviceid;\n }", "private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }", "public String readDeviceSN(){\r\n return mFactoryBurnUtil.readDeviceSN();\r\n }", "public BigDecimal getDeviceIdentifier() {\n return deviceIdentifier;\n }", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "public final String getDeviceId(){\n return peripheralDeviceId;\n }", "private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }", "UUID getDeviceId();", "public String getDeviceId() {\n return this.DeviceId;\n }", "public int getRunningDevicesCount();", "public String deviceId() {\n return this.deviceId;\n }", "public String getRingerDevice();", "org.hl7.fhir.String getDeviceIdentifier();", "public int getNum();", "public String getDevSerialNumber() {\n return devSerialNumber;\n }", "public String getDeviceCode() {\n return deviceCode;\n }", "public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }", "public String getCpuSerialNo()\n\t{\n\t\treturn cpuSerialNo;\n\t}", "public short getBcdDevice() {\r\n\t\treturn bcdDevice;\r\n\t}", "public String getName() {\n\t\treturn \"Device\";\r\n\t}", "public int getNum() {\r\n return num;\r\n }", "public short getDeviceType() {\r\n return deviceType;\r\n }", "private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}", "public String imei() {\n\t\t TelephonyManager telephonyManager = (TelephonyManager) activity\n\t\t .getSystemService(Context.TELEPHONY_SERVICE);\n\t\t return telephonyManager.getDeviceId();\n\t\t}", "public int getDeviceVersion() {\n\t\treturn deviceVersion;\n\t}", "@Override\n public String getDeviceId() {\n return this.strDevId;\n }", "int getDiskNum();", "public String getNum() {\r\n return num;\r\n }", "public int getNum() {\n\t\treturn num;\n\t}", "public int getNum() { return Num;}", "public int getNumber() {\n\t\treturn 666;\n\t}", "public int getNum()\n {\n return num;\n }", "public int getNum()\n {\n return num;\n }", "public int getNum() {\n\treturn this.n;\n }", "public int getNumber(String comm){\n try{\n return comando.get(comm);\n } catch(Exception e){\n return -1;\n }\n }", "public String getNum() {\n return num;\n }", "public String getNum() {\n return num;\n }", "private int getNumero() {\n\t\treturn numero;\n\t}", "Integer getDeviceId(INDArray array);", "public int getNumber() {\n\t\t\n\t\treturn number;\n\t}", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "public String getDevice_type() {\r\n\t\treturn device_type;\r\n\t}", "public int getNum() {\n return this.num;\n }", "public String getDeviceId() {\n\t\tString id;\n\t\tid = options.getProperty(\"id\");\n\t\tif(id == null) {\n\t\t\tid = options.getProperty(\"Device-ID\");\n\t\t}\n\t\treturn trimedValue(id);\n\t}", "public final String getDevicePort(){\n return peripheralPort;\n }", "public int getSerialNum()\r\n\t{\r\n\t\treturn(serialNum);\r\n\t}", "@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }", "public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }", "public java.lang.String getNum_ant() throws java.rmi.RemoteException;", "public String getTextDeviceIdentifier() {\r\n\t\tString DeviceIdentifier = safeGetText(addVehiclesHeader.replace(\"Add Vehicle\", \"Please Enter Device IMEI Number\"), SHORTWAIT);\r\n\t\treturn DeviceIdentifier;\r\n\t}", "public void getDeviceByModelNumber()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Model number \");\r\n\t\t\tString searchModelNumber = sc.nextLine();\r\n\t\t\t\r\n\t\t\tDevice d = record.getDeviceByModelNumber(searchModelNumber);\r\n\t\t\tprintDeviceDetails(d);\r\n\t\t}", "default public int getStatusFromDevicePort()\t\t\t{ return 2223; }", "Reference getDevice();", "public int getNumber() {\r\n\t\treturn number;\r\n\t}", "String getDeviceName();", "public int getNumero() {\n\t\treturn numero;\n\t}", "public int getNumero() {\n\t\treturn numero;\n\t}", "public int getNumero() {\n\t\treturn numero;\n\t}", "public com.flexnet.opsembedded.webservices.ExternalIdQueryType getDeviceUniqueId() {\n return deviceUniqueId;\n }", "@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "@Override\n public String toString(){\n return partnerDeviceNum;\n }", "public static String m21396c() {\n return Build.MANUFACTURER;\n }", "public int getPhoneNuber() {\r\n return phoneNuber;\r\n }", "public UUID getDeviceUuid() {\n return uuid;\n }", "public String getDeviceName(){\n\t return deviceName;\n }", "public int getRoomNumber() {\n\t\treturn number; // Replace with your code\n\t}", "public int getNum() throws RemoteException {\n\t\treturn 0;\r\n\t}", "@Override\n public int targetDevice() {\n return 0;\n }" ]
[ "0.7967008", "0.74090457", "0.710579", "0.71055007", "0.69341093", "0.6929208", "0.6719314", "0.6719314", "0.66695744", "0.6595975", "0.65809137", "0.656469", "0.6544739", "0.6544169", "0.6511406", "0.64857686", "0.64857686", "0.6451909", "0.64404786", "0.6431945", "0.64246863", "0.6401841", "0.63893193", "0.6357121", "0.63551867", "0.6347373", "0.6346823", "0.631369", "0.6313046", "0.63058746", "0.6295785", "0.62789613", "0.6238592", "0.621701", "0.62160206", "0.62151664", "0.61987907", "0.6184346", "0.61778325", "0.61715025", "0.61473966", "0.612865", "0.60973346", "0.60897046", "0.6082176", "0.60590243", "0.6058177", "0.6056688", "0.6047867", "0.60453844", "0.6043556", "0.6022455", "0.60198057", "0.60114914", "0.6010564", "0.59950167", "0.5992937", "0.59840757", "0.5973341", "0.59642243", "0.59642243", "0.595704", "0.5950198", "0.5942331", "0.5942331", "0.5938607", "0.59276056", "0.592698", "0.5916002", "0.5916002", "0.5915388", "0.5907334", "0.5905024", "0.5897538", "0.5896059", "0.58953047", "0.5875616", "0.5866826", "0.5860938", "0.585195", "0.5848392", "0.58414525", "0.5831921", "0.5815153", "0.58124185", "0.58124185", "0.58124185", "0.5806157", "0.5803054", "0.5787906", "0.57874525", "0.578343", "0.576763", "0.5766487", "0.5766166", "0.5763211", "0.57587266" ]
0.58199304
85
Modifica el numero de un Device
public void setNumber(int number) { this.number = number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final int getDeviceNum() {\n return device.getDeviceNum();\n }", "Integer getDeviceId();", "public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }", "@Override\n public void cUSerialNumber(long value) {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "final int getDriverNum() {\n return device.getDriverNum(this);\n }", "public void setPhoneNuber(int value) {\r\n this.phoneNuber = value;\r\n }", "@Override\n public int getDeviceId() {\n return 0;\n }", "public void setRingerDevice(String devid);", "public String updateDevice(ProductModel ndm) {\n\t\tdeviceData.editDevice(ndm);\r\n\t\treturn null;\r\n\t}", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "public void setDeviceId(Integer deviceId) {\n this.deviceId = deviceId;\n }", "public int nextSerialNumber(){\n serialNumber++;\n return serialNumber;\n }", "void setRandomNo() {\n\t\tno = 10000000 + (int) (Math.random() * 90000000);\n\t}", "private int getDeviceIndex(final IDevice device) {\n TestDevice td;\n \n for (int index = 0; index < mDevices.size(); index++) {\n td = mDevices.get(index);\n if (td.getSerialNumber().equals(device.getSerialNumber())) {\n return index;\n }\n }\n return -1;\n }", "default public int getStatusFromDevicePort()\t\t\t{ return 2223; }", "public void setTelefono(long value) {\r\n this.telefono = value;\r\n }", "@Override\n\tpublic int updateDevice(DeviceBean db) {\n\t\treturn dao.updateDevice(db);\n\t}", "public boolean updateDevice(int origionalDevice_id, Device newDevice) \n\t{\n\t\treturn false;\n\t}", "default public int getControlToDevicePort()\t\t\t\t{ return 2226; }", "public void setIdProducto(int value) {\n this.idProducto = value;\n }", "private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }", "default public int getCodeToDevicePort()\t\t\t\t{ return 2225; }", "public void setNumero(int index, int value){\r\n\t\tnumeros.set(index, value);\r\n\t}", "private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }", "private Long modificarTelefono(Telefono telefono) {\n\t\ttry {\n\t\t\tgTelefono.modify(telefono);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn telefono.getIdTelefono();\n\t}", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}", "public void setNumber(int number)\n {\n Number = number;\n }", "void setPhone(int phone);", "public void registriereNummer (int nr) {\n this.nr = nr;\n }", "public void setDevice(String device) {\r\n this.device = device;\r\n }", "public void setNumero(int numero) { this.numero = numero; }", "public void setComNumber(long value) {\r\n this.comNumber = value;\r\n }", "@Override\r\n\tpublic void onUpdateIO(int device, int type, int code, int value,\r\n\t\t\tint timestamp) {\n\t\t\r\n\t}", "void modifyDevice(Device device, String token) throws InvalidDeviceException, AuthenticationException;", "private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }", "int updateByPrimaryKey(Device record);", "int updateByPrimaryKey(Device record);", "void setIdNumber(String idNumber);", "public void setTelefono(Integer telefono) {\r\n this.telefono = telefono;\r\n }", "private static void update(int portNummber, InetAddress address, Product product){\n\n for(SensorData sensorData : actualSensorDatas){\n if((sensorData.getPortNummber() == portNummber)\n || (sensorData.getAddress() == address)\n || (sensorData.getProduct().getNameOfProduct() == product.getNameOfProduct()) ){\n sensorData.setProduct(product) ;\n }\n }\n }", "public void setDevMinor(int devNo) {\n if (devNo < 0) {\n throw new IllegalArgumentException(\"Minor device number is out of \" + \"range: \" + devNo);\n }\n this.devMinor = devNo;\n }", "public void setMobile(int number) {\n\t\t\tthis.Mobile = number;\r\n\t\t}", "public int getNumber() {\n\t\treturn 666;\n\t}", "public void setDevMajor(int devNo) {\n if (devNo < 0) {\n throw new IllegalArgumentException(\"Major device number is out of \"\n + \"range: \" + devNo);\n }\n this.devMajor = devNo;\n }", "void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}", "public void setSerialNumber(String value)\n {\n _serialNumber = value;\n }", "int updateByPrimaryKeySelective(Device record);", "int updateByPrimaryKeySelective(Device record);", "public void setUnitID(int num) {\n m_UnitID = num;\n // setChanged(true);\n }", "void set_num(ThreadContext tc, RakudoObject classHandle, double Value);", "public final void setDeviceId(String productId){\n peripheralDeviceId = productId;\n }", "public void setMemshipNumber(int value) {\n this.memshipNumber = value;\n }", "public void setNumber(int number)\n {\n this.number = number;\n }", "public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }", "public void setDevice(final String device)\n {\n this.device = device;\n }", "public int removeCustomDevice(String id);", "private static void modifyItemNumberInCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.print(\" Please enter the number of the item you would like to change to: \");\r\n\t\tint numberOfTheItems = getUserIntInput();\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t\tif (numberOfTheItems == 0) {\r\n\t\t\t\t\tit.remove();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcart.changeProductCount(item.getKey(), numberOfTheItems);\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item number modified successfully\");\r\n\t\tSystem.out.println();\r\n\t}", "public abstract void setCntRod(int cntRod);", "public void setNumero(int numero) {\n this.dado1 = numero;\n }", "public void setNumber(int number) {\r\n\t\tthis.num = number;\r\n\t}", "public void setWareHouseNumber(int arg)\n\t{\n\t\tsetValue(WAREHOUSENUMBER, new Integer(arg));\n\t}", "java.lang.String getDeviceId();", "public Integer getDeviceId() {\n return deviceId;\n }", "public Integer getDeviceId() {\n return deviceId;\n }", "public void setNumber(int number) {\n this.number = number;\n }", "void setDeviceName(String newDeviceName) {\n deviceName = newDeviceName;\n }", "private void setRegNum(int regNum) {\n this.regNum = regNum;\n }", "public void setNUMARGEO(int value) {\n this.numargeo = value;\n }", "public final void setDevicePort(String port){\n peripheralPort = port;\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString ncode = bindnumber.getText().toString();\n\t\t\t\t\toprationDev(\"1\", ncode, Cons.BIND_DEVICE,true);\n\t\t\t\t}", "public void setNumber(String newValue);", "private void setConnectionNO(SewerageConnectionRequest request) {\n\t\tList<String> connectionNumbers = getIdList(request.getRequestInfo(),\n\t\t\t\trequest.getSewerageConnection().getTenantId(), config.getSewerageIdGenName(),\n\t\t\t\tconfig.getSewerageIdGenFormat(), 1);\n\n\t\tif (CollectionUtils.isEmpty(connectionNumbers) || connectionNumbers.size() != 1) {\n\t\t\tMap<String, String> errorMap = new HashMap<>();\n\t\t\terrorMap.put(\"IDGEN_ERROR\",\n\t\t\t\t\t\"The Id of Sewerage Connection returned by idgen is not equal to number of Sewerage Connection\");\n\t\t\tthrow new CustomException(errorMap);\n\t\t}\n\n\t\trequest.getSewerageConnection().setConnectionNo(connectionNumbers.listIterator().next());\n\t}", "public void setCardNo(int cardNumber);", "public int getSerialNum()\r\n\t{\r\n\t\treturn(serialNum);\r\n\t}", "public void regdev(Dev dev,Dir stat,int n){\n\tstats[n]=stat;\n\tdevs[n]=dev;\n\tndevs++;\n }", "@Override\n public void setSerialNumber(String value) {\n this.serialNumber = value;\n }", "public void setMobile_phone(Long mobile_phone);", "public void setUid(int value) {\n this.uid = value;\n }", "public void setUid(int value) {\n this.uid = value;\n }", "public void setUid(int value) {\n this.uid = value;\n }", "public void setUid(int value) {\n this.uid = value;\n }", "public void setUid(int value) {\n this.uid = value;\n }", "public void setUid(int value) {\n this.uid = value;\n }", "public void setUid(int value) {\n this.uid = value;\n }", "public Integer getDevices() {\r\n return devices;\r\n }", "public void setUID(int value) {\n this.uid = value;\n }", "public int getNum() { return Num;}", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "public void setID(Number numID);", "void banDevice(Integer deviceId);", "public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }", "public void setNumber(int number) {\r\n\t\tthis.number = number;\r\n\t}", "public void setHome_phone(Long home_phone);", "public int getDeviceVersion() {\n\t\treturn deviceVersion;\n\t}", "public void setNUMSECFO(int value) {\n this.numsecfo = value;\n }", "public void setTuckNum(int NewValue){\n truck = NewValue;\n }", "@Override\n public int targetDevice() {\n return 0;\n }", "public int getNumOfRequiredDevices() {\n return mRequiredDeviceNumber;\n }", "int updateByPrimaryKeySelective(TpDevicePlay record);", "public void setNum(int num) {\r\n this.num = num;\r\n }" ]
[ "0.66931456", "0.6012363", "0.5904875", "0.58186764", "0.580075", "0.5791388", "0.5662541", "0.5659297", "0.5648265", "0.55869806", "0.55869806", "0.55611604", "0.5559572", "0.553993", "0.5529924", "0.55112433", "0.5496407", "0.5486053", "0.5476872", "0.5465152", "0.5464224", "0.54609084", "0.54528075", "0.5440596", "0.54330885", "0.54257125", "0.542357", "0.5416775", "0.541346", "0.5412957", "0.540488", "0.53802466", "0.53707963", "0.5366652", "0.5363236", "0.5359788", "0.5354574", "0.5354574", "0.53436553", "0.53269076", "0.52984434", "0.5288429", "0.52787805", "0.5278454", "0.5250975", "0.5245262", "0.52390546", "0.52358717", "0.52358717", "0.5235405", "0.5232097", "0.52276343", "0.52129734", "0.5197465", "0.5195421", "0.5193617", "0.5187821", "0.5186983", "0.5185203", "0.5185124", "0.51705295", "0.51681805", "0.5159495", "0.51554495", "0.51554495", "0.5154994", "0.51522684", "0.51508963", "0.513804", "0.51364124", "0.5126585", "0.5123678", "0.51192683", "0.511231", "0.5111189", "0.5110483", "0.51069015", "0.5103508", "0.50946814", "0.50946814", "0.50946814", "0.50946814", "0.50946814", "0.50946814", "0.50946814", "0.50941217", "0.5091858", "0.5089808", "0.50866944", "0.50853527", "0.50848556", "0.5084308", "0.50835764", "0.5083552", "0.5083397", "0.5082741", "0.5075671", "0.50583726", "0.50583386", "0.50579333", "0.504471" ]
0.0
-1
Obtiene el estado de un Device
public boolean getState() { return state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DeviceState createDeviceState();", "public Status getDeviceStatus() {\n return mDeviceStatus;\n }", "public String getDevice() {\r\n return device;\r\n }", "String getSelectedDevice() {\n return selectedDevice;\n }", "boolean hasDevice();", "IDeviceState getDeviceState(UUID id) throws SiteWhereException;", "public Device getDevice() {\n\t\treturn this.device;\n\t}", "public SmartDevice getDispozitiv(){\n\t\treturn this.dispozitiv;\n\t}", "public DeviceManagementScriptDeviceState get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "private int getSimState() {\n TelephonyManager tm = (TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE);\n return tm.getSimState();\n }", "final int getDeviceNum() {\n return device.getDeviceNum();\n }", "DeviceClass getDeviceClass();", "public String getOSState() {\n return this.oSState;\n }", "private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }", "public TestDevice getDevice() {\n return mDevice;\n }", "Reference getDevice();", "@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)\n public void onCaptureDeviceStateChange(DeviceStateEvent event) {\n DeviceClient device = event.getDevice();\n DeviceState state = event.getState();\n Log.d(TAG, \"device : type : \" + device.getDeviceType() + \" guid : \" + device.getDeviceGuid());\n Log.d(TAG, \"device : name : \" + device.getDeviceName() + \" state: \" + state.intValue());\n\n mDeviceClient = device;\n String type = (DeviceType.isNfcScanner(device.getDeviceType()))? \"NFC\" : \"BARCODE\";\n TextView tv = findViewById(R.id.main_device_status);\n handleColor(tv, state.intValue());\n switch (state.intValue()) {\n case DeviceState.GONE:\n mDeviceClientList.remove(device);\n mAdapter.remove(device.getDeviceName() + \" \" + type);\n mAdapter.notifyDataSetChanged();\n if(!mAdapter.isEmpty()) {\n handleColor(tv, DeviceState.READY);\n }\n break;\n case DeviceState.READY:\n mDeviceClientList.add(device);\n mAdapter.add(device.getDeviceName() + \" \" + type);\n mAdapter.notifyDataSetChanged();\n\n Property property = Property.create(Property.UNIQUE_DEVICE_IDENTIFIER, device.getDeviceGuid());\n mDeviceManager.getProperty(property, propertyCallback);\n\n break;\n default:\n break;\n }\n\n }", "public int getRunningDevicesCount();", "public String getDeviceName(){\n\t return deviceName;\n }", "public String getName() {\n\t\treturn \"Device\";\r\n\t}", "public short getBcdDevice() {\r\n\t\treturn bcdDevice;\r\n\t}", "public Device() {\n isFaceUp = null;\n isFaceDown = null;\n isCloseProximity = null;\n isDark = null;\n }", "public void deviceLoaded(Device device);", "private void getBluetoothState() {\r\n\r\n\t\t if (bluetoothAdapter == null) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth NOT supported\");\r\n\t\t } else if (!(bluetoothAdapter.isEnabled())) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is NOT Enabled!\");\r\n\t\t\t Intent enableBtIntent = new Intent(\r\n\t\t\t\t\t BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n\t\t\t getBluetoothState();\r\n\t\t }\r\n\r\n\t\t if (bluetoothAdapter.isEnabled()) {\r\n\r\n\t\t\t if (bluetoothAdapter.isDiscovering()) {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is currently in device discovery process.\");\r\n\t\t\t } else {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is Enabled.\");\r\n\t\t\t }\r\n\t\t }\r\n\t }", "private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "public List<Device> getRunningDevices();", "public void initDevice() {\r\n\t\t\r\n\t}", "public String getDataState() {\n int state = mTelephonyManager.getDataState();\n String display = \"unknown\";\n\n switch (state) {\n case TelephonyManager.DATA_CONNECTED:\n display = \"Connected\";\n break;\n case TelephonyManager.DATA_SUSPENDED:\n display = \"Suspended\";\n break;\n case TelephonyManager.DATA_CONNECTING:\n display = \"Connecting\";\n break;\n case TelephonyManager.DATA_DISCONNECTED:\n display = \"Disconnected\";\n break;\n }\n\n return display;\n }", "public short getDeviceType() {\r\n return deviceType;\r\n }", "@Override\n public int estado(){\n \n try {\n Process proceso;\n proceso = Runtime.getRuntime().exec(\"/etc/init.d/\"+nombreServicio+\" status\");\n InputStream is = proceso.getInputStream(); \n BufferedReader buffer = new BufferedReader (new InputStreamReader (is));\n \n //Se descartan las dos primeras lineas y se lee la tercera\n buffer.readLine();\n buffer.readLine();\n String resultado = buffer.readLine();\n \n if(resultado.contains(\"Active: active\")){\n return 1;\n }\n } \n catch (IOException ex) {\n Logger.getLogger(Servicio.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return 0;\n }", "public int getSimCardState() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getSimState();\n }", "public String getDeviceName() {\n return this.deviceName;\n }", "Device createDevice();", "public final String getDeviceType(){\n return TYPE;\n }", "public String getLastUsedDevice() {\n return lastUsedDevice;\n }", "public Integer getDevices() {\r\n return devices;\r\n }", "@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }", "@Override\n public void updateDevice() throws RemoteHomeConnectionException, RemoteHomeManagerException {\n String[] statusResponse = m.sendCommandWithAnswer(getDeviceId(), \"sc\").split(\"\\\\|\");\n if (!statusResponse[0].equals(\"1\")) {\n throw new RemoteHomeManagerException(\"This response belongs to different device type: \"+statusResponse[0], RemoteHomeManagerException.WRONG_DEVICE_TYPE);\n }\n if (statusResponse[1].equals(\"c\")) {\n if (statusResponse[2].equals(\"1\")) {\n setCurrentState(true);\n } else {\n setCurrentState(false);\n }\n if (statusResponse[3].equals(\"1\")) {\n setOnWhenAppliedPower(false);\n } else {\n setOnWhenAppliedPower(true);\n }\n if (statusResponse[4].equals(\"1\")) {\n setOnWhenMovementDetected(true);\n } else {\n setOnWhenMovementDetected(false);\n }\n setConfiguredPeriod(Integer.parseInt(statusResponse[5]));\n setCurrentCounter(Integer.parseInt(statusResponse[6]));\n setTimestamp(System.currentTimeMillis());\n }\n statusResponse = m.sendCommandWithAnswer(getDeviceId(), \"sa\").split(\"\\\\|\");\n if (!statusResponse[0].equals(\"1\")) {\n throw new RemoteHomeManagerException(\"This response belongs to different device type: \"+statusResponse[0], RemoteHomeManagerException.WRONG_DEVICE_TYPE);\n }\n if (statusResponse[1].equals(\"a\")) {\n setAlarmStatus(Integer.parseInt(statusResponse[2])); \n if (statusResponse[3].equals(\"1\")) {\n setAlarmSensorCurrentState(true);\n } else {\n setAlarmSensorCurrentState(false);\n } \n setAlarmEnterTimeout(Integer.parseInt(statusResponse[4]));\n setAlarmLeaveTimeout(Integer.parseInt(statusResponse[5]));\n setTimestamp(System.currentTimeMillis());\n\n }\n }", "public int getSensorState() {\n return -1;\n }", "@GET\n @Path(\"/status\")\n @Produces(MediaType.TEXT_PLAIN)\n public String status() {\n Device device = getDevice();\n try {\n StreamingSession session = transportService.getSession(device.getId());\n return \"Status device:[\" + device.getId() + \"]\" + \" session [\" + session.toString() + \"]\";\n } catch (UnknownSessionException e) {\n return e.getMessage();\n }\n }", "public DeviceConfig getConfig() {\n return config;\n }", "public boolean isSetDeviceType() {\n return this.DeviceType != null;\n }", "@Override\r\n public void onDeviceStatusChange(GenericDevice dev, PDeviceHolder devh,\r\n PHolderSetter status) {\n\r\n }", "public DeviceClass getDeviceClass() {\n return this.bluetoothStack.getLocalDeviceClass();\n }", "public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}", "@Override\n public int targetDevice() {\n return 0;\n }", "public String getDeviceDescription() {\r\n return deviceDesc;\r\n }", "public String getDevice_type() {\r\n\t\treturn device_type;\r\n\t}", "public String setState() {\r\n\t\ttry {\r\n\t\t\tVendorMasterModel model = new VendorMasterModel();\r\n\t\t\tmodel.initiate(context, session);\r\n\t\t\tmodel.setState(vendorMaster);\r\n\t\t\tmodel.terminate();\r\n\t\t\tgetNavigationPanel(2);\r\n\t\t\tvendorMaster.setEnableAll(\"Y\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn \"Data\";\r\n\t}", "public Device getDevice() {\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\treturn device;\n\n\t}", "public DeviceInformation getDeviceInformation() {\n if (deviceInformation == null) {\n deviceInformation = deviceManager.generateDeviceInformation();\n }\n return deviceInformation;\n }", "private boolean isDeviceOnline() {\r\n ConnectivityManager connMgr = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\r\n return (networkInfo != null && networkInfo.isConnected());\r\n }", "@CalledByNative\n public static void getManagedStateForNative() {\n Callback<OwnedState> callback = (result) -> {\n if (result == null) {\n // Unable to determine the owned state, assume it's not owned.\n EnterpriseInfoJni.get().updateNativeOwnedState(false, false);\n }\n\n EnterpriseInfoJni.get().updateNativeOwnedState(\n result.mDeviceOwned, result.mProfileOwned);\n };\n\n EnterpriseInfo.getInstance().getDeviceEnterpriseInfo(callback);\n }", "String provisioningState();", "String getDeviceName();", "public boolean isSetDeviceName() {\n return this.deviceName != null;\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr = (ConnectivityManager) this.getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "DeviceSensor createDeviceSensor();", "void onDeviceProfileChanged(DeviceProfile dp);", "boolean hasDeviceId();", "boolean hasDeviceId();", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putSerializable(\"device\", mDevice);\n }", "public String getDeviceName() {\n return deviceName;\n }", "public device() {\n\t\tsuper();\n\t}", "public String getDeviceName(){\n\t\treturn deviceName;\n\t}", "public String getDeviceName() {\n return deviceName;\n }", "public String getDeviceid() {\n return deviceid;\n }", "public void setIsPhysicalDevice(boolean value) {\n this.isPhysicalDevice = value;\n }", "public int getState() {\n\treturn APPStates.CONTROLLER_CONNECTED_BS;\n}", "@Override\r\n public boolean connectedWifi() {\r\n return NMDeviceState.NM_DEVICE_STATE_ACTIVATED.equals(nwmDevice.getState().intValue());\r\n }", "public ImcSystemState state() {\n\t\treturn state;\n\t}", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public String getDeviceType() {\n return deviceType;\n }", "String getDeviceName() {\n return deviceName;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readDeviceInfo() {\n\t\tboolean flag = oTest.readDeviceInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "void onRestoreDevices() {\n synchronized (mConnectedDevices) {\n for (int i = 0; i < mConnectedDevices.size(); i++) {\n DeviceInfo di = mConnectedDevices.valueAt(i);\n AudioSystem.setDeviceConnectionState(\n di.mDeviceType,\n AudioSystem.DEVICE_STATE_AVAILABLE,\n di.mDeviceAddress,\n di.mDeviceName,\n di.mDeviceCodecFormat);\n }\n }\n }", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public Device(String d_name, String s_name, String d_mac, String s_id, String s_alive) {\n this.d_name = d_name;\n this.s_name = s_name;\n this.d_mac = d_mac;\n this.s_id = s_id;\n this.s_alive = s_alive;\n // this.d_alive = d_alive; // 0 : die , 1 : alive\n }", "@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }", "public void newDeviceStatus(String deviceId, Boolean statusOK);", "public String getDeviceName() {\r\n return name_;\r\n }", "@Override\n public boolean isStorageConnected() {\n return true;\n }", "private void activeSensor(Sensor sensor) {\n selectedSensor = sensor;\n// selectedSensor.debug(true);\n// if (start) {\n// view = (DrawingView) findViewById(R.id.surface);\n// bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);\n// canvas = new Canvas(bitmap);\n// view.setDrawer(new DrawingView.Drawer() {\n// @Override\n// public void draw(Canvas canvas) {\n// canvas.drawBitmap(bitmap, 0, 0, null);\n// }\n// });\n// }\n }", "public void setDevice(String device) {\r\n this.device = device;\r\n }", "private void sendDeviceStatus() {\n if (hasRecover && zWaveSubDevice != null) {\n ZWaveDeviceEvent zde = new ZWaveDeviceEvent();\n try {\n PropertyUtils.copyProperties(zde, zWaveSubDevice.getZwavedevice());\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n zde.setReport(zrb.getReport());\n zde.setEventtime(new Date());\n\n JMSUtil.sendmessage(IRemoteConstantDefine.WARNING_TYPE_DEVICE_STATUS, zde);\n }\n }", "public void syncDevice() {\n JCuda.cudaDeviceSynchronize();\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "@SuppressWarnings(\"unused\")\n\tpublic String updateDeviceStatus(String xml) throws Exception {\n\t\tDeviceManager deviceManager = new DeviceManager();\n\t\tAlertType alertType = IMonitorUtil.getAlertTypes().get(\n\t\t\t\tConstants.DEVICE_STATE_CHANGED);\n\t\t// Get the Device Id.\n\t\t// Save the alerts.\n\t\t// Save the status.\n\n // Save the alert\n\t\tQueue<KeyValuePair> queue = IMonitorUtil.extractCommandsQueueFromXml(xml);\n\t\t\n\t\tString generatedDeviceId = IMonitorUtil.commandId(queue,Constants.DEVICE_ID);\n\t\tString imvg = IMonitorUtil.commandId(queue,Constants.IMVG_ID);\n\t\t\n\t\tString referenceTimeStamp = IMonitorUtil.commandId(queue, \"IMVG_TIME_STAMP\");\n\t\tSimpleDateFormat time = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = (Date) time.parse(referenceTimeStamp);\n\t\t} catch (ParseException e) \n\t\t{\n\t\t\tdate = new Date();\n\t\t\tLogUtil.error(\"Error while parsing Reference Time Stamp: \"+ referenceTimeStamp);\n\t\t}\n\t\tXStream stream = new XStream();\n\t\tDevice device=deviceManager.getDeviceByGeneratedDeviceId(generatedDeviceId);\n\t\tString deviceStatus= null;\n\t\tString acmode= null;\n\t\tString acSwing= null;\n\t\tString Fanspeed= null;\n\t\tString actemparature= null;\n\t\tString acsetpoint= null;\n\t\tString alexaDeviceState = null;\n\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.SWITCH_DIMMER_STATE);\n\t\tif(device.getDeviceType().getName().equalsIgnoreCase(\"Z_WAVE_DOOR_LOCK\"))\n\t\t{\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.DOOR_LOCK_STATE);\n\t\t}\n\t\telse if(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_MOTOR_CONTROLLER))\n\t\t{\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.PERCENTAGE);\n\t\t}\n\t\t/* if(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_DIMMER) || (device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_SWITCH)))*/\n\t\t if(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_SWITCH))\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.SWITCH_DIMMER_STATE);\n AlertTypeManager alertTypeManager = new AlertTypeManager();\n\t\t\t\n\t\t\tif(deviceStatus == \"1\" || deviceStatus.equals(\"1\") ){\n\t\t\t\tString deviceOn = \"DEVICE_ON\";\n\t\t\t\talexaDeviceState = \"ON\";\n\t\t\t\tAlertType alert = alertTypeManager.getAlertTypeByDetails(deviceOn);\n\t\t\t\tQueue<KeyValuePair> resultQueue = updateAlertAndExecuteRule(xml,\n\t\t\t\t\t\talert);\n\t\t\t\t\n\t\t\t}else if(deviceStatus == \"0\" || deviceStatus.equals(\"0\")){\n\t\t\t\t\n\t\t\t\tString deviceOff = \"DEVICE_OFF\";\n\t\t\t\talexaDeviceState = \"OFF\";\n\t\t\t\tAlertType alert = alertTypeManager.getAlertTypeByDetails(deviceOff);\n\t\t\t\tQueue<KeyValuePair> resultQueue = updateAlertAndExecuteRule(xml,\n\t\t\t\t\t\talert);\n\t\t\t}\n\t\t\t\n\t\t\t/*Naveen added on 9th Feb 2018\n\t\t\t * This part of code is used to update device to alexa end point\n\t\t\t * Send only for alexa user\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tcheckTokenAndUpdateDeviceToAlexaEndpoint(imvg,device,alexaDeviceState,null);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\t\n \t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif(device.getDeviceType().getName().equalsIgnoreCase(\"Z_WAVE_AC_EXTENDER\"))\n\t\t{\n\t\t\t\n\t\t\tif(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"0\"))\n\t\t\t{\n\t\t\tacmode = IMonitorUtil.commandId(queue,Constants.AC_MODE_CHANGED);\n\t\t\tif(acmode.equals(\"0\"))\n\t\t\t{\n\t\t\t\tdeviceStatus =\"0\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tdeviceStatus =\"22\";\n\t\t\t}\n\t\t\tdeviceManager.updateCommadParamAndFanModesOfDeviceByGeneratedId(generatedDeviceId, imvg, deviceStatus, acmode);\n\t\t\t}\n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"1\"))\n\t\t\t{\n\t\t\tacsetpoint = IMonitorUtil.commandId(queue,Constants.AC_THERMOSTATSETPOINTTYPE);\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.AC_TEMPERATURE_STATE);\n\t\t\tdeviceManager.changeDeviceLastAlertAndStatusAlsoSaveAlert(generatedDeviceId, alertType, deviceStatus, date);\n\t\t\t\n\t\t\t//Updating for Alexa\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tcheckTokenAndUpdateDeviceToAlexaEndpoint(imvg, device, deviceStatus, acmode);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\t\n\t\t\t} \n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"2\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/**Kantharaj is changed due to When FanSpeed is controlled from Local iMVG will send\n\t\t\t\t * 1-Low\n\t\t\t\t * 5-Medium\n\t\t\t\t * 3-High\n\t\t\t\t * \n\t\t\t\t * In CMS Fan Speed is saved as below \n\t\t\t\t * 1-Low\n\t\t\t\t * 2-Medium\n\t\t\t\t * 3-High\n\t\t\t\t * \n\t\t\t\t * \n\t\t\t\t * **/\n\t\t\t\t\n\t\t\t\t\tFanspeed=IMonitorUtil.commandId(queue,Constants.AC_FAN_MODE_CHANGED);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif(Fanspeed.equals(\"1\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tFanspeed=\"1\";\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(Fanspeed.equals(\"5\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tFanspeed=\"2\";\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(Fanspeed.equals(\"3\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tFanspeed=\"3\";\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tdeviceManager.updateFanModesOfDeviceByGeneratedId(generatedDeviceId, imvg, Fanspeed,1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} \n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"3\"))\n\t\t\t{\n\t\t\t\tacSwing=IMonitorUtil.commandId(queue,Constants.AC_SWING_CONTROL);\n\t\t\t\tdeviceManager.updateFanModesOfDeviceByGeneratedId(generatedDeviceId, imvg, acSwing,0);\n\t\t\t} \n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"4\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tacmode = IMonitorUtil.commandId(queue,Constants.AC_MODE_CHANGED);\n\t\t\t\t//LogUtil.info(\"acmode----\"+acmode);\n\t\t\t\tif(!(acmode.equals(\"6\")))\n\t\t\t\t{\n\t\t\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.AC_TEMPERATURE_STATE);\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdeviceStatus=\"22\";\n\t\t\t\t}\n\t\t\t\tFanspeed=IMonitorUtil.commandId(queue,Constants.AC_FAN_MODE_CHANGED);\n\t\t\t//\tLogUtil.info(\"Fanspeed---\"+Fanspeed);\n\t\t\t\t\n\t\t\t\tString FanModevalue=\"1\";\n\t\t\t\tif(Fanspeed.equals(\"1\"))\n\t\t\t\t{\n\t\t\t\t\tFanspeed=\"1\";\t\n\t\t\t\t}\n\t\t\t\telse if(Fanspeed.equals(\"5\"))\n\t\t\t\t{\n\t\t\t\t\tFanspeed=\"2\";\t\n\t\t\t\t}\n\t\t\t\telse if(Fanspeed.equals(\"3\"))\n\t\t\t\t{\n\t\t\t\t\tFanspeed=\"3\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tacSwing=IMonitorUtil.commandId(queue,Constants.AC_SWING_CONTROL);\n\t\t\t\tdeviceManager.updateAllforacOfDeviceByGeneratedId(generatedDeviceId, imvg, deviceStatus, acmode,Fanspeed,acSwing);\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t} \n\t\t}\n\t\tif(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_DIMMER))\n\t\t{\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.SWITCH_DIMMER_STATE);\n\t\t\t\n\t\t\t/*Naveen added on 9th Feb 2018\n\t\t\t * This part of code is used to update device to alexa end point\n\t\t\t * Send only for alexa user\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tcheckTokenAndUpdateDeviceToAlexaEndpoint(imvg,device,deviceStatus,null);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\t\n\t\t\tdeviceManager.changeDeviceLastAlertAndStatusAlsoSaveAlertAndCheckArm(generatedDeviceId, alertType, deviceStatus, date);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\tdeviceManager.changeDeviceLastAlertAndStatusAlsoSaveAlertAndCheckArm(generatedDeviceId, alertType, deviceStatus, date);\n\t\t}\n\t\t\n//\t\tSWITCH_DIMMER_STATE\n//\t\tPreparing the return queue.\n\t\tQueue<KeyValuePair> resultQueue = new LinkedList<KeyValuePair>();\n\t\tresultQueue.add(new KeyValuePair(Constants.CMD_ID,\n\t\t\t\tConstants.DEVICE_ALERT_ACK));\n\t\tresultQueue.add(new KeyValuePair(Constants.TRANSACTION_ID, IMonitorUtil\n\t\t\t\t.commandId(queue, Constants.TRANSACTION_ID)));\n\t\tresultQueue.add(new KeyValuePair(Constants.IMVG_ID, IMonitorUtil\n\t\t\t\t.commandId(queue, Constants.IMVG_ID)));\n\t\tresultQueue\n\t\t\t\t.add(new KeyValuePair(Constants.DEVICE_ID, generatedDeviceId));\n\t\t\n\t\n\t\treturn stream.toXML(resultQueue);\n\t}", "public List getDevices() {\n return devices;\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr != null ? connMgr.getActiveNetworkInfo() : null;\n return (networkInfo != null && networkInfo.isConnected());\n }", "@Override\n public int getDeviceId() {\n return 0;\n }", "public int cameraOn() {\r\n System.out.println(\"hw- ligarCamera\");\r\n return serialPort.enviaDados(\"!111O*\");//camera ON \r\n }", "public HostStatus() {\n addressesChecker = (AddressesChecker)ServicesRegisterManager.platformWaitForService(Parameters.NETWORK_ADDRESSES);\n hostID = addressesChecker.getHostIdentifier();\n hostAddresses = addressesChecker.getAllAddresses();\n contextManager = (ContextManager)ServicesRegisterManager.platformWaitForService(Parameters.CONTEXT_MANAGER);\n cpuLoad = contextManager.getCpuLoad();\n memoryLoad = contextManager.getMemoryLoad();\n batteryLevel = contextManager.getBatteryLevel();\n numberOfThreads = contextManager.getNumberOfThreads();\n networkPFInputTraffic = contextManager.getPFInputTrafic();\n networkPFOutputTraffic = contextManager.getPFOutputTrafic();\n networkApplicationInputTraffic = contextManager.getApplicationInputTrafic();\n networkApplicationOutputTraffic = contextManager.getApplicationOutputTrafic();\n ContainersManager gestionnaireDeConteneurs = (ContainersManager)ServicesRegisterManager.platformWaitForService(Parameters.CONTAINERS_MANAGER);\n numberOfBCs = gestionnaireDeConteneurs.getComposants().getComponentsNumber();\n numberOfConnectors = gestionnaireDeConteneurs.getConnecteurs().getConnectorsNumber();\n numberOfConnectorsNetworkInputs = gestionnaireDeConteneurs.getConnecteurs().getNetworkInputConnectorsNumber();\n numberOfConnectorsNetworkOutputs = gestionnaireDeConteneurs.getConnecteurs().getNetworkOutputConnectorsNumber();\n }", "public boolean getEstadoConexion() { return this.dat.getEstadoConexion(); }", "public boolean getEstadoConexion() { return this.dat.getEstadoConexion(); }", "public boolean getEstado() {\r\n return estado;\r\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\tAutoGrease = CAN1Comm.Get_AutoGreaseOperationStatus_3449_PGN65527();\n\t\tQuickcoupler = CAN1Comm.Get_QuickCouplerOperationStatus_3448_PGN65527();\n\t\tRideControl = CAN1Comm.Get_RideControlOperationStatus_3447_PGN65527();\n\t\tBeaconLamp = CAN1Comm.Get_BeaconLampOperationStatus_3444_PGN65527();\n\t\tMirrorHeat = CAN1Comm.Get_MirrorHeatOperationStatus_3450_PGN65527();\n\t\tFineModulation = CAN1Comm.Get_ComponentCode_1699_PGN65330_EHCU();\n\t}", "public static synchronized Device getAFreeDevice() {\n Device freeDevice = null;\n for (Map.Entry<Device, String> entry : deviceStatusMap.entrySet()) {\n Device key = entry.getKey();\n String value = entry.getValue();\n if (value.equalsIgnoreCase(\"free\")) {\n freeDevice = key;\n break;\n }\n }\n Assert.assertNotNull(freeDevice, \"No free device found\");\n return freeDevice;\n }" ]
[ "0.6633463", "0.66167235", "0.61320925", "0.60121924", "0.6003421", "0.58689445", "0.58646184", "0.58546764", "0.58397114", "0.5823327", "0.58074796", "0.57899857", "0.57880515", "0.57589746", "0.57429993", "0.5716394", "0.56983685", "0.5674217", "0.5659142", "0.5648892", "0.5648341", "0.5638716", "0.56191266", "0.56090945", "0.5608525", "0.559758", "0.5570586", "0.55703807", "0.5568205", "0.5566202", "0.5554411", "0.55454886", "0.5544059", "0.55379033", "0.55255127", "0.5505024", "0.5497473", "0.5486663", "0.548254", "0.54607934", "0.54386055", "0.5431496", "0.5427424", "0.54261976", "0.5425522", "0.541972", "0.5412088", "0.54117817", "0.5411134", "0.5396672", "0.53939646", "0.5385228", "0.5376464", "0.5371023", "0.53679407", "0.5366334", "0.53634375", "0.53608656", "0.5351279", "0.5349874", "0.53437275", "0.53437275", "0.5340565", "0.5338338", "0.5334748", "0.53308266", "0.53264594", "0.5326352", "0.5310138", "0.530656", "0.53063077", "0.53046787", "0.53014016", "0.5294997", "0.52852887", "0.528232", "0.528", "0.5279807", "0.527869", "0.52713525", "0.5259261", "0.5255495", "0.5251772", "0.5249163", "0.52423984", "0.52396196", "0.52357286", "0.5222646", "0.5221084", "0.5221084", "0.52168024", "0.52149796", "0.5210377", "0.520529", "0.5203768", "0.5189089", "0.51851916", "0.51851916", "0.5181736", "0.5176816", "0.51764023" ]
0.0
-1
Modifica el estado de un Device
public void setState(boolean state) { this.state = state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }", "@Override\n public void updateDevice() throws RemoteHomeConnectionException, RemoteHomeManagerException {\n String[] statusResponse = m.sendCommandWithAnswer(getDeviceId(), \"sc\").split(\"\\\\|\");\n if (!statusResponse[0].equals(\"1\")) {\n throw new RemoteHomeManagerException(\"This response belongs to different device type: \"+statusResponse[0], RemoteHomeManagerException.WRONG_DEVICE_TYPE);\n }\n if (statusResponse[1].equals(\"c\")) {\n if (statusResponse[2].equals(\"1\")) {\n setCurrentState(true);\n } else {\n setCurrentState(false);\n }\n if (statusResponse[3].equals(\"1\")) {\n setOnWhenAppliedPower(false);\n } else {\n setOnWhenAppliedPower(true);\n }\n if (statusResponse[4].equals(\"1\")) {\n setOnWhenMovementDetected(true);\n } else {\n setOnWhenMovementDetected(false);\n }\n setConfiguredPeriod(Integer.parseInt(statusResponse[5]));\n setCurrentCounter(Integer.parseInt(statusResponse[6]));\n setTimestamp(System.currentTimeMillis());\n }\n statusResponse = m.sendCommandWithAnswer(getDeviceId(), \"sa\").split(\"\\\\|\");\n if (!statusResponse[0].equals(\"1\")) {\n throw new RemoteHomeManagerException(\"This response belongs to different device type: \"+statusResponse[0], RemoteHomeManagerException.WRONG_DEVICE_TYPE);\n }\n if (statusResponse[1].equals(\"a\")) {\n setAlarmStatus(Integer.parseInt(statusResponse[2])); \n if (statusResponse[3].equals(\"1\")) {\n setAlarmSensorCurrentState(true);\n } else {\n setAlarmSensorCurrentState(false);\n } \n setAlarmEnterTimeout(Integer.parseInt(statusResponse[4]));\n setAlarmLeaveTimeout(Integer.parseInt(statusResponse[5]));\n setTimestamp(System.currentTimeMillis());\n\n }\n }", "@Override\r\n public void onDeviceStatusChange(GenericDevice dev, PDeviceHolder devh,\r\n PHolderSetter status) {\n\r\n }", "public void newDeviceStatus(String deviceId, Boolean statusOK);", "public void setIsPhysicalDevice(boolean value) {\n this.isPhysicalDevice = value;\n }", "DeviceState createDeviceState();", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "public Status getDeviceStatus() {\n return mDeviceStatus;\n }", "public void execute(Context context) {\n try{\n model.setDeviceStatus(context.getDevicePath(), context.getValue(), \"off\", false);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Could not shut off oven: \" + context.getDevicePath());\n }\n }", "private void updateStatusSDCard(){\n\t\tString status = StorageUtils.getSDcardState();\n\t\tString readOnly = \"\";\n\t\tif (status.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {\n\t\t\tstatus = Environment.MEDIA_MOUNTED;\n\t\t\treadOnly = getResources().getString(R.string.read_only);\n\t\t}\n\n\t\t// Calculate the space of SDcard\n\t\tif (status.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tString path = StorageUtils.getSDcardDir();\n\t\t\t\tStatFs stat = new StatFs(path);\n\t\t\t\tlong blockSize = stat.getBlockSize();\n\t\t\t\tlong totalBlocks = stat.getBlockCount();\n\t\t\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t\t\tmSdTotalSpace=formatSize(totalBlocks * blockSize);\n\t\t\t\tmSdAvailableSpace=formatSize(availableBlocks * blockSize) + readOnly;\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tstatus = Environment.MEDIA_REMOVED;\n\t\t\t}\n\t\t}else{\n\t\t\tmSdTotalSpace=getResources().getString(R.string.sd_unavailable);\n\t\t\tmSdAvailableSpace=getResources().getString(R.string.sd_unavailable);\n\t\t}\n\t}", "public String updateDevice(ProductModel ndm) {\n\t\tdeviceData.editDevice(ndm);\r\n\t\treturn null;\r\n\t}", "private void updateConnectedFlags() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeInfo = connMgr.getActiveNetworkInfo();\n if (activeInfo != null && activeInfo.isConnected()) {\n wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI;\n mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE;\n } else {\n wifiConnected = false;\n mobileConnected = false;\n }\n wifiConnected = true;\n mobileConnected = true;\n System.out.println(\"Change 3\");\n }", "void onDeviceProfileChanged(DeviceProfile dp);", "public void statusRegisterUpdated()\n {\n Word newStatus = memory.read( Memory.OS_DDSR );\n\n // Check if this change entails the clearing of the Ready bit\n if( ( currentStatus.getValue() & DISK_READY_BIT ) != 0 )\n {\n if( (newStatus.getValue() & DISK_READY_BIT ) == 0 )\n {\n // We should initiate a new operation\n Word commandRegister = memory.read( Memory.OS_DDCR );\n Word blockRegister = memory.read( Memory.OS_DDBR );\n Word memoryRegister = memory.read( Memory.OS_DDMR );\n\n switch( commandRegister.getValue() )\n {\n case READ_COMMAND:\n handleReadDisk( blockRegister.getValue(), memoryRegister.getValue() );\n break;\n\n case WRITE_COMMAND:\n handleWriteDisk( blockRegister.getValue(), memoryRegister.getValue() );\n break;\n }\n\n // Now we just need to set the ready bit\n currentStatus = new Word( newStatus.getValue() | DISK_READY_BIT );\n memory.write( Memory.OS_DDSR, currentStatus.getValue() );\n\n }\n }\n }", "@Override\n public void onDeviceStateChange(VirtualDevice virtualDevice, int returncode) {\n\n }", "public boolean updateDevice(int origionalDevice_id, Device newDevice) \n\t{\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update() {\n\t\tActuator updated = RuntimeStorage.getMyHttp().get_state_actuator(this);\n\n\t\tif (updated != null) {\n\t\t\tthis.setNumber(updated.getNumber());\n\t\t\tthis.setName(updated.getName());\n\t\t\tthis.setType(updated.getType());\n\t\t\tthis.setValue(updated.getValue(), false);\n\t\t\tthis.setUnit(updated.getUnit());\n\t\t\tthis.setUtime(updated.getUtime());\n\t\t} else\n\t\t\treturn false;\n\t\treturn true;\n\t}", "private void updateStatusNandflash(){\n\t\tString status = StorageUtils.getFlashState();\n\t\tString readOnly = \"\";\n\t\tif (status.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {\n\t\t\tstatus = Environment.MEDIA_MOUNTED;\n\t\t\treadOnly = getResources().getString(R.string.read_only);\n\t\t}\n\n\t\t// Calculate the space of SDcard\n\t\tif (status.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tString path = StorageUtils.getFlashDir();\n\t\t\t\tStatFs stat = new StatFs(path);\n\t\t\t\tlong blockSize = stat.getBlockSize();\n\t\t\t\tlong totalBlocks = stat.getBlockCount();\n\t\t\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t\t\tmNANDTotalSpace=formatSize(totalBlocks * blockSize);\n\t\t\t\tmNANDAvailableSpace=formatSize(availableBlocks * blockSize) + readOnly;\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tstatus = Environment.MEDIA_REMOVED;\n\t\t\t\tmNANDTotalSpace=getResources().getString(R.string.nand_unavailable);\n\t\t\t\tmNANDAvailableSpace=getResources().getString(R.string.nand_unavailable);\n\t\t\t}\n\t\t}else{\n\t\t\tmNANDTotalSpace=getResources().getString(R.string.nand_unavailable);\n\t\t\tmNANDAvailableSpace=getResources().getString(R.string.nand_unavailable);\n\t\t}\n\t}", "public void updateDevice() throws RemoteHomeConnectionException, RemoteHomeManagerException {\n String statusResponse[] = null;\n try {\n statusResponse = m.sendCommandWithAnswer(parseDeviceIdForMultipleDevice(getDeviceId()), \"l\"+getSubDeviceNumber()+\"s\").split(\"\\\\|\");\n setPowerLost(false);\n if (!statusResponse[0].equals(\"1s\")) {\n throw new RemoteHomeManagerException(\"This response belongs to different device type.\", RemoteHomeManagerException.WRONG_DEVICE_TYPE);\n }\n } catch (RemoteHomeConnectionException e) {\n if (isPowerLost()) {\n return;\n } else {\n throw e;\n }\n }\n if (!statusResponse[1].equals(getSubDeviceNumber())) {\n throw new RemoteHomeManagerException(\"This response belongs to different sub device type.\", RemoteHomeManagerException.WRONG_DEVICE_TYPE);\n }\n parseReceivedData(statusResponse);\n }", "public synchronized void changeServiceStatus() {\n\t\tthis.serviced = true;\n\t}", "public void setActiveDevice(IDevice device) {\r\n\t\tif (device != null) {\r\n\t\t\tif (this.activeDevice == null || !this.activeDevice.getName().equals(device.getName())) this.activeDevice = device;\r\n\t\t\t// do always update, the port might be changed\r\n\t\t\tthis.settings.setActiveDevice(device.getName() + GDE.STRING_SEMICOLON + device.getManufacturer() + GDE.STRING_SEMICOLON + device.getPort());\r\n\t\t\tthis.updateTitleBar(this.getObjectKey(), device.getName(), device.getPort());\r\n\t\t\tif (this.deviceSelectionDialog.getNumberOfActiveDevices() > 1)\r\n\t\t\t\tthis.enableDeviceSwitchButtons(true);\r\n\t\t\telse\r\n\t\t\t\tthis.enableDeviceSwitchButtons(false);\r\n\t\t}\r\n\t\telse { // no device\r\n\t\t\tthis.settings.setActiveDevice(Settings.EMPTY_SIGNATURE);\r\n\t\t\tthis.updateTitleBar(this.getObjectKey(), Messages.getString(MessageIds.GDE_MSGI0023), GDE.STRING_EMPTY);\r\n\t\t\tthis.activeDevice = null;\r\n\t\t\tthis.channels.cleanup();\r\n\t\t\tthis.enableDeviceSwitchButtons(false);\r\n\t\t\t// remove Histo tabs at this place because setupDevice is not called if all devices are removed\r\n\t\t\tthis.setHistoGraphicsTabItemVisible(false);\r\n\t\t\tthis.setHistoTableTabItemVisible(false);\r\n\t\t}\r\n\r\n\t\t//cleanup device specific utility graphics tab item\r\n\t\tif (this.utilGraphicsTabItem != null) {\r\n\t\t\tthis.utilGraphicsTabItem.dispose();\r\n\t\t\tthis.utilGraphicsTabItem = null;\r\n\t\t}\r\n\t\t//cleanup device specific custom tab item\r\n\t\tfor (CTabItem tab : this.customTabItems) {\r\n\t\t\ttab.dispose();\r\n\t\t}\r\n\t\tthis.customTabItems.clear();\r\n\r\n\t}", "public void statusChanged() {\n\t\tif(!net.getArray().isEmpty()) {\n\t\t\tigraj.setEnabled(true);\n\t\t}else\n\t\t\tigraj.setEnabled(false);\n\t\t\n\t\tupdateKvota();\n\t\tupdateDobitak();\n\t}", "@Override\n\tpublic void onDeviceChangeInfoSuccess(FunDevice funDevice) {\n\n\t}", "private void reportExerciseServiceChange(Device dev) {\r\n\t\tif (messengerToExerciseService != null) {\r\n\t\t\tBundle data = new Bundle();\r\n\t\t\tdata.putBoolean(\"running\", dev.running);\r\n\t\t\tdata.putBoolean(\"connected\", dev.connected);\r\n\t\t\tdata.putString(\"status\", dev.status);\r\n\r\n\t\t\tsendDataMessage(messengerToExerciseService, data, DRIVER2EXERCISE_SERVICE_STATUS_UPDATE, thisDriver.my_state_index, dev.my_dev_index);\r\n\t\t}\r\n\t}", "private void sendDeviceStatus() {\n if (hasRecover && zWaveSubDevice != null) {\n ZWaveDeviceEvent zde = new ZWaveDeviceEvent();\n try {\n PropertyUtils.copyProperties(zde, zWaveSubDevice.getZwavedevice());\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n zde.setReport(zrb.getReport());\n zde.setEventtime(new Date());\n\n JMSUtil.sendmessage(IRemoteConstantDefine.WARNING_TYPE_DEVICE_STATUS, zde);\n }\n }", "@Override\n public void resetDeviceConfigurationForOpMode() {\n\n }", "@Override\n public boolean setActiveDevice(BluetoothDevice bluetoothDevice) throws RemoteException {\n Parcel parcel = Parcel.obtain();\n Parcel parcel2 = Parcel.obtain();\n try {\n parcel.writeInterfaceToken(Stub.DESCRIPTOR);\n boolean bl = true;\n if (bluetoothDevice != null) {\n parcel.writeInt(1);\n bluetoothDevice.writeToParcel(parcel, 0);\n } else {\n parcel.writeInt(0);\n }\n if (!this.mRemote.transact(23, parcel, parcel2, 0) && Stub.getDefaultImpl() != null) {\n bl = Stub.getDefaultImpl().setActiveDevice(bluetoothDevice);\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n parcel2.readException();\n int n = parcel2.readInt();\n if (n == 0) {\n bl = false;\n }\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n catch (Throwable throwable) {\n parcel2.recycle();\n parcel.recycle();\n throw throwable;\n }\n }", "public void changeState() {\r\n if(state == KioskState.CLOSED) {\r\n state = KioskState.OPEN;\r\n } else {\r\n state = KioskState.CLOSED;\r\n }\r\n }", "IDeviceState updateDeviceState(UUID id, IDeviceStateCreateRequest request) throws SiteWhereException;", "@Override\n public int estado(){\n \n try {\n Process proceso;\n proceso = Runtime.getRuntime().exec(\"/etc/init.d/\"+nombreServicio+\" status\");\n InputStream is = proceso.getInputStream(); \n BufferedReader buffer = new BufferedReader (new InputStreamReader (is));\n \n //Se descartan las dos primeras lineas y se lee la tercera\n buffer.readLine();\n buffer.readLine();\n String resultado = buffer.readLine();\n \n if(resultado.contains(\"Active: active\")){\n return 1;\n }\n } \n catch (IOException ex) {\n Logger.getLogger(Servicio.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return 0;\n }", "public void syncDevice() {\n JCuda.cudaDeviceSynchronize();\n }", "public void setOnline() {\n if (this.shutdownButton.isSelected() == false) {\n this.online = true;\n this.statusLed.setStatus(\"ok\");\n this.updateOscilloscopeData();\n }\n }", "public void switchOnForConfiguredPeriod() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"of\");\n setCurrentState(true);\n }", "@Override\n\tpublic int updateDevice(DeviceBean db) {\n\t\treturn dao.updateDevice(db);\n\t}", "protected abstract boolean setServos();", "private void mStateSet(cKonst.eSerial nNewState) {\n if (nState_Serial!=nNewState) {\n switch (nNewState) {\n case kBT_Disconnected:\n mMsgDebug(sRemoteDeviceName + \" Disconnected 1\");\n break;\n }\n bDoRedraw = true; //Something has changed redraw controls\n }\n nState_Serial=nNewState;\n }", "boolean hasDevice();", "public boolean change() throws IOException {\n\t\ttry {\n\t\t\trt.exec(\"runas /profile /user:Administrator \\\"cmd.exe /c Powrprof.dll,SetSuspendState\\\"\");\t\n\t\t\tProcess pross = rt.exec(\"ipconfig\");\t\n\t\t\tBufferedReader cmdlines = new BufferedReader(new InputStreamReader(pross.getInputStream()));\n\t\t\tString cnName = findMyConnection(cmdlines);\n\t\t\tif(!run(cnName)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tcatch(IOException e){\n\t\t\tthrow new IOException(\"Cannot find directory\");\n\t\t}\n\t}", "public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }", "@Test\n final void testUpdateDevice() {\n when(deviceDao.findDevice(user, DeviceFixture.SERIAL_NUMBER))\n .thenReturn(Optional.of(deviceDTO));\n deviceModel.setStatus(\"Stopped\");\n when(deviceMapper.toDto(deviceModel)).thenReturn(deviceDTO);\n when(deviceDao.save(user, deviceDTO)).thenReturn(deviceDTO);\n when(deviceMapper.toModel(deviceDTO)).thenReturn(deviceModel);\n ResponseEntity<DeviceModel> response = deviceController.updateDevice(deviceModel);\n\n assertEquals(200, response.getStatusCodeValue());\n assertNotNull(response.getBody());\n assertEquals(\"Stopped\", response.getBody().getStatus());\n }", "private void setComponentStatus() {}", "public void switchSmart(){\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseBrightnessCmd(seekBarBrightness.getProgress()), 3, seekBarBrightness.getProgress(), item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n //String CMD_HSV = \"{\\\"id\\\":1,\\\"method\\\":\\\"set_hsv\\\",\\\"params\\\":[0, 0, \\\"smooth\\\", 30]}\\r\\n\";\r\n //write(CMD_HSV, 0, 0);\r\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseRGBCmd(msAccessColor(Color.WHITE)), 0, 0, item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n }", "public abstract void setSensorState(boolean state);", "public void updateDeviceInfoPreference(){\n\t\tif(!DeviceInfoPreference.getSentinelValue(getContext()))\n\t\t\tS3DeviceInfoCreator.updateDeviceInfoPreference(getContext());\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic String updateDeviceStatus(String xml) throws Exception {\n\t\tDeviceManager deviceManager = new DeviceManager();\n\t\tAlertType alertType = IMonitorUtil.getAlertTypes().get(\n\t\t\t\tConstants.DEVICE_STATE_CHANGED);\n\t\t// Get the Device Id.\n\t\t// Save the alerts.\n\t\t// Save the status.\n\n // Save the alert\n\t\tQueue<KeyValuePair> queue = IMonitorUtil.extractCommandsQueueFromXml(xml);\n\t\t\n\t\tString generatedDeviceId = IMonitorUtil.commandId(queue,Constants.DEVICE_ID);\n\t\tString imvg = IMonitorUtil.commandId(queue,Constants.IMVG_ID);\n\t\t\n\t\tString referenceTimeStamp = IMonitorUtil.commandId(queue, \"IMVG_TIME_STAMP\");\n\t\tSimpleDateFormat time = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = (Date) time.parse(referenceTimeStamp);\n\t\t} catch (ParseException e) \n\t\t{\n\t\t\tdate = new Date();\n\t\t\tLogUtil.error(\"Error while parsing Reference Time Stamp: \"+ referenceTimeStamp);\n\t\t}\n\t\tXStream stream = new XStream();\n\t\tDevice device=deviceManager.getDeviceByGeneratedDeviceId(generatedDeviceId);\n\t\tString deviceStatus= null;\n\t\tString acmode= null;\n\t\tString acSwing= null;\n\t\tString Fanspeed= null;\n\t\tString actemparature= null;\n\t\tString acsetpoint= null;\n\t\tString alexaDeviceState = null;\n\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.SWITCH_DIMMER_STATE);\n\t\tif(device.getDeviceType().getName().equalsIgnoreCase(\"Z_WAVE_DOOR_LOCK\"))\n\t\t{\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.DOOR_LOCK_STATE);\n\t\t}\n\t\telse if(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_MOTOR_CONTROLLER))\n\t\t{\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.PERCENTAGE);\n\t\t}\n\t\t/* if(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_DIMMER) || (device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_SWITCH)))*/\n\t\t if(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_SWITCH))\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.SWITCH_DIMMER_STATE);\n AlertTypeManager alertTypeManager = new AlertTypeManager();\n\t\t\t\n\t\t\tif(deviceStatus == \"1\" || deviceStatus.equals(\"1\") ){\n\t\t\t\tString deviceOn = \"DEVICE_ON\";\n\t\t\t\talexaDeviceState = \"ON\";\n\t\t\t\tAlertType alert = alertTypeManager.getAlertTypeByDetails(deviceOn);\n\t\t\t\tQueue<KeyValuePair> resultQueue = updateAlertAndExecuteRule(xml,\n\t\t\t\t\t\talert);\n\t\t\t\t\n\t\t\t}else if(deviceStatus == \"0\" || deviceStatus.equals(\"0\")){\n\t\t\t\t\n\t\t\t\tString deviceOff = \"DEVICE_OFF\";\n\t\t\t\talexaDeviceState = \"OFF\";\n\t\t\t\tAlertType alert = alertTypeManager.getAlertTypeByDetails(deviceOff);\n\t\t\t\tQueue<KeyValuePair> resultQueue = updateAlertAndExecuteRule(xml,\n\t\t\t\t\t\talert);\n\t\t\t}\n\t\t\t\n\t\t\t/*Naveen added on 9th Feb 2018\n\t\t\t * This part of code is used to update device to alexa end point\n\t\t\t * Send only for alexa user\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tcheckTokenAndUpdateDeviceToAlexaEndpoint(imvg,device,alexaDeviceState,null);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\t\n \t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif(device.getDeviceType().getName().equalsIgnoreCase(\"Z_WAVE_AC_EXTENDER\"))\n\t\t{\n\t\t\t\n\t\t\tif(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"0\"))\n\t\t\t{\n\t\t\tacmode = IMonitorUtil.commandId(queue,Constants.AC_MODE_CHANGED);\n\t\t\tif(acmode.equals(\"0\"))\n\t\t\t{\n\t\t\t\tdeviceStatus =\"0\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tdeviceStatus =\"22\";\n\t\t\t}\n\t\t\tdeviceManager.updateCommadParamAndFanModesOfDeviceByGeneratedId(generatedDeviceId, imvg, deviceStatus, acmode);\n\t\t\t}\n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"1\"))\n\t\t\t{\n\t\t\tacsetpoint = IMonitorUtil.commandId(queue,Constants.AC_THERMOSTATSETPOINTTYPE);\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.AC_TEMPERATURE_STATE);\n\t\t\tdeviceManager.changeDeviceLastAlertAndStatusAlsoSaveAlert(generatedDeviceId, alertType, deviceStatus, date);\n\t\t\t\n\t\t\t//Updating for Alexa\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tcheckTokenAndUpdateDeviceToAlexaEndpoint(imvg, device, deviceStatus, acmode);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\t\n\t\t\t} \n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"2\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/**Kantharaj is changed due to When FanSpeed is controlled from Local iMVG will send\n\t\t\t\t * 1-Low\n\t\t\t\t * 5-Medium\n\t\t\t\t * 3-High\n\t\t\t\t * \n\t\t\t\t * In CMS Fan Speed is saved as below \n\t\t\t\t * 1-Low\n\t\t\t\t * 2-Medium\n\t\t\t\t * 3-High\n\t\t\t\t * \n\t\t\t\t * \n\t\t\t\t * **/\n\t\t\t\t\n\t\t\t\t\tFanspeed=IMonitorUtil.commandId(queue,Constants.AC_FAN_MODE_CHANGED);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif(Fanspeed.equals(\"1\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tFanspeed=\"1\";\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(Fanspeed.equals(\"5\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tFanspeed=\"2\";\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(Fanspeed.equals(\"3\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tFanspeed=\"3\";\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tdeviceManager.updateFanModesOfDeviceByGeneratedId(generatedDeviceId, imvg, Fanspeed,1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} \n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"3\"))\n\t\t\t{\n\t\t\t\tacSwing=IMonitorUtil.commandId(queue,Constants.AC_SWING_CONTROL);\n\t\t\t\tdeviceManager.updateFanModesOfDeviceByGeneratedId(generatedDeviceId, imvg, acSwing,0);\n\t\t\t} \n\t\t\telse if(IMonitorUtil.commandId(queue,Constants.AC_MODE_TEMP).equals(\"4\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tacmode = IMonitorUtil.commandId(queue,Constants.AC_MODE_CHANGED);\n\t\t\t\t//LogUtil.info(\"acmode----\"+acmode);\n\t\t\t\tif(!(acmode.equals(\"6\")))\n\t\t\t\t{\n\t\t\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.AC_TEMPERATURE_STATE);\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdeviceStatus=\"22\";\n\t\t\t\t}\n\t\t\t\tFanspeed=IMonitorUtil.commandId(queue,Constants.AC_FAN_MODE_CHANGED);\n\t\t\t//\tLogUtil.info(\"Fanspeed---\"+Fanspeed);\n\t\t\t\t\n\t\t\t\tString FanModevalue=\"1\";\n\t\t\t\tif(Fanspeed.equals(\"1\"))\n\t\t\t\t{\n\t\t\t\t\tFanspeed=\"1\";\t\n\t\t\t\t}\n\t\t\t\telse if(Fanspeed.equals(\"5\"))\n\t\t\t\t{\n\t\t\t\t\tFanspeed=\"2\";\t\n\t\t\t\t}\n\t\t\t\telse if(Fanspeed.equals(\"3\"))\n\t\t\t\t{\n\t\t\t\t\tFanspeed=\"3\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tacSwing=IMonitorUtil.commandId(queue,Constants.AC_SWING_CONTROL);\n\t\t\t\tdeviceManager.updateAllforacOfDeviceByGeneratedId(generatedDeviceId, imvg, deviceStatus, acmode,Fanspeed,acSwing);\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t} \n\t\t}\n\t\tif(device.getDeviceType().getName().equalsIgnoreCase(Constants.Z_WAVE_DIMMER))\n\t\t{\n\t\t\tdeviceStatus = IMonitorUtil.commandId(queue,Constants.SWITCH_DIMMER_STATE);\n\t\t\t\n\t\t\t/*Naveen added on 9th Feb 2018\n\t\t\t * This part of code is used to update device to alexa end point\n\t\t\t * Send only for alexa user\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tcheckTokenAndUpdateDeviceToAlexaEndpoint(imvg,device,deviceStatus,null);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\t\n\t\t\tdeviceManager.changeDeviceLastAlertAndStatusAlsoSaveAlertAndCheckArm(generatedDeviceId, alertType, deviceStatus, date);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\tdeviceManager.changeDeviceLastAlertAndStatusAlsoSaveAlertAndCheckArm(generatedDeviceId, alertType, deviceStatus, date);\n\t\t}\n\t\t\n//\t\tSWITCH_DIMMER_STATE\n//\t\tPreparing the return queue.\n\t\tQueue<KeyValuePair> resultQueue = new LinkedList<KeyValuePair>();\n\t\tresultQueue.add(new KeyValuePair(Constants.CMD_ID,\n\t\t\t\tConstants.DEVICE_ALERT_ACK));\n\t\tresultQueue.add(new KeyValuePair(Constants.TRANSACTION_ID, IMonitorUtil\n\t\t\t\t.commandId(queue, Constants.TRANSACTION_ID)));\n\t\tresultQueue.add(new KeyValuePair(Constants.IMVG_ID, IMonitorUtil\n\t\t\t\t.commandId(queue, Constants.IMVG_ID)));\n\t\tresultQueue\n\t\t\t\t.add(new KeyValuePair(Constants.DEVICE_ID, generatedDeviceId));\n\t\t\n\t\n\t\treturn stream.toXML(resultQueue);\n\t}", "private void updateUnitStatus() {\r\n\t\tint b1 = Sense_NotReady;\r\n\t\tif (this.tapeIo != null) {\r\n\t\t\tb1 = Sense_Ready;\r\n\t\t\tb1 |= (this.currentBlock == this.headLimit) ? Sense_AtLoadPoint : 0;\r\n\t\t\tb1 |= (this.isReadonly) ? Sense_FileProtected : 0;\r\n\t\t}\r\n\t\tthis.senseBytes[1] = (byte)((b1 >> 16) & 0xFF);\r\n\t\t\r\n\t\tint b4 = (this.currentBlock == this.tailLimit) ? Sense_EndOfTape : 0;\r\n\t\tthis.senseBytes[4] = (byte)( ((b4 >> 8) & 0xF0) | (this.senseBytes[4] & 0x0F) );\r\n\t}", "private void processGestureEventHelper( boolean changeOnValue){\r\n\t\t\t\r\n\t\t\t// If device has no On-value, disable On/Off button\r\n\t\t\tbtnOnOff.setEnabled( device.getOn() != null && device.getOn().getActor() != null);\r\n\t\t\tif(device.getOn() == null){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// turn On/Off\r\n\t\t\tif(changeOnValue){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(device.getOnValue()){\r\n\t\t\t\t\t\tdevice.turnOff();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tdevice.turnOn();\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(ActorServiceCallException e){\r\n\t\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}catch(IllegalStateException e){\r\n\t\t\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tsetGUIAttributes();\r\n\t\t\t}\r\n\r\n\t\t\t// change gui component's appearance and views\t\t\t\r\n\t\t\t\r\n\t\t\titem.getStateVisualizer().notifyVisualizer();\r\n\t\t\tSystem.out.println( device.getName() + \" is now On: \" + device.getOnValue());\r\n\t\t}", "@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }", "@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)\n public void onCaptureDeviceStateChange(DeviceStateEvent event) {\n DeviceClient device = event.getDevice();\n DeviceState state = event.getState();\n Log.d(TAG, \"device : type : \" + device.getDeviceType() + \" guid : \" + device.getDeviceGuid());\n Log.d(TAG, \"device : name : \" + device.getDeviceName() + \" state: \" + state.intValue());\n\n mDeviceClient = device;\n String type = (DeviceType.isNfcScanner(device.getDeviceType()))? \"NFC\" : \"BARCODE\";\n TextView tv = findViewById(R.id.main_device_status);\n handleColor(tv, state.intValue());\n switch (state.intValue()) {\n case DeviceState.GONE:\n mDeviceClientList.remove(device);\n mAdapter.remove(device.getDeviceName() + \" \" + type);\n mAdapter.notifyDataSetChanged();\n if(!mAdapter.isEmpty()) {\n handleColor(tv, DeviceState.READY);\n }\n break;\n case DeviceState.READY:\n mDeviceClientList.add(device);\n mAdapter.add(device.getDeviceName() + \" \" + type);\n mAdapter.notifyDataSetChanged();\n\n Property property = Property.create(Property.UNIQUE_DEVICE_IDENTIFIER, device.getDeviceGuid());\n mDeviceManager.getProperty(property, propertyCallback);\n\n break;\n default:\n break;\n }\n\n }", "abstract protected void setDeviceName(String deviceName);", "public boolean blockDevice(device dev){\n boolean result = false;\n String estado = \"bloqueado\";\n try {\n String args [] = new String[1];\n args[0] = dev.getAddress();\n Cursor cursor = this.getDevice(devicesContract.deviceEntry.tableName,null,devicesContract.deviceEntry.address+\"=?\",args,null,null,null);\n if (cursor.getCount() > 0){\n cursor.moveToFirst();\n String bloqueado = cursor.getString(cursor.getColumnIndex(devicesContract.deviceEntry.bloqueado));\n if(bloqueado == null){\n estado = \"bloqueado\";\n result = true;\n }\n else if(bloqueado.equals(\"bloqueado\")) {\n estado = \"desbloqueado\";\n }\n else{\n estado = \"bloqueado\";\n result = true;\n }\n }else{\n Log.e(\"deviceDBHelper\", \"Error bloqueando Dispositivo no emparejado:\"+dev.getAddress() );\n }\n ContentValues cv = new ContentValues();\n cv.put(devicesContract.deviceEntry.bloqueado, estado);\n SQLiteDatabase db = getWritableDatabase();\n db.update(devicesContract.deviceEntry.tableName, cv, devicesContract.deviceEntry.address + \"='\" + dev.getAddress()+\"'\", null);\n db.close();\n }catch (Exception e){\n Log.e(\"deviceDBHelper\", \"Error bloqueando Dispositivo: \" + e.toString());\n }\n return result;\n }", "@Override\n public void updateWithoutObservations(SensingDevice sensingDevice) {\n\n }", "public void setDevice(String device) {\r\n this.device = device;\r\n }", "public boolean updateDevice(device device){\n boolean result = false;\n try {\n ContentValues cv = new ContentValues();\n cv.put(devicesContract.deviceEntry.name, device.getName());\n cv.put(devicesContract.deviceEntry.UUIDs, device.getUUIDs());\n cv.put(devicesContract.deviceEntry.contentDesc, device.getContentDesc());\n cv.put(devicesContract.deviceEntry.name, device.getName());\n cv.put(devicesContract.deviceEntry.time, device.getTime());\n cv.put(devicesContract.deviceEntry.hashCode, device.getHashCode());\n\n SQLiteDatabase db = getWritableDatabase();\n db.update(devicesContract.deviceEntry.tableName, cv, devicesContract.deviceEntry.address + \"= '\" + device.getAddress()+\"'\", null);\n db.close();\n result = true;\n }catch (Exception e){\n Log.e(\"deviceDBHelper\", \"Error actualizando Dispositivo: \" + e.toString());\n }\n return result;\n }", "public void setStatus(int status){\n Log.d(TAG, \"-- SET STATUS --\");\n switch(status){\n //connecting to remote device\n case BluetoothClientService.STATE_CONNECTING:{\n Toast.makeText(this, \"Connecting to remote bluetooth device...\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.connecting_button);\n break;\n }\n //not connected\n case BluetoothClientService.STATE_NONE:{\n Toast.makeText(this, \"Unable to connect to remote device\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.disconnect_button);\n statusButton.setTextOff(getString(R.string.disconnected));\n statusButton.setChecked(false);\n break;\n }\n //established connection to remote device\n case BluetoothClientService.STATE_CONNECTED:{\n Toast.makeText(this, \"Connection established with remote bluetooth device...\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.connect_button);\n statusButton.setTextOff(getString(R.string.connected));\n statusButton.setChecked(true);\n //start motion monitor\n motionMonitor = new MotionMonitor(this, mHandler);\n motionMonitor.start();\n break;\n }\n }\n }", "public ZWavePolling set(Device device, boolean state) {\n super.device = device;\n this.state = state;\n return this;\n }", "default public int getStatusFromDevicePort()\t\t\t{ return 2223; }", "boolean updateEnabling();", "public void cambiarEstado(){\n\r\n revelado=true;\r\n }", "private void setScreenProperty(boolean on) throws DeviceNotAvailableException {\n CLog.d(\"set svc power stay on \" + on);\n mTestDevice.executeShellCommand(\"svc power stayon \" + on);\n }", "private void updateDeviceStatus(int deviceId, String score) {\n\t\tDeviceStatus ds = new DeviceStatus();\n\t\tds = deviceStatusMapper.selectByDeviceId(deviceId);\n\t\tif(ds != null){ \n\t\t\tif(StringUtil.isEmpty(ds.getShotUrl())){\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\tString dateStr = sdf.format(date);\n\t\t\t\tString fileName = dateStr+\"_\"+ds.getPointId();\n\t\t\t\tString filePath = \"source/caputrue/a/\"+dateStr+\"/\"+fileName+\".bmp\";\n\t\t\t\tds.setShotUrl(filePath);\n\t\t\t}\n\t\t\tif(score.equals(ConstantsResult.CHECK_RESULT_OK)||score.equals(ConstantsResult.CHECK_RESULT_SUCCESS)){\n\t\t\t\tds.setNetworkStatus(ConstantsResult.CHECK_RESULT_STATUS_OK); \n\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setNoiseStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setColorStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameFrozenStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameShadeStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameStripStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameFuzzyStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameDisplacedStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameColorcaseStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setLightExceptionStatus(ConstantsResult.CHECK_RESULT_STATUS_OK); \n\t\t\t\tds.setBlackScreenStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t}else if(score.equals(ConstantsResult.CHECK_RESULT_NULL)){\n\t\t\t\tds.setNetworkStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION); \n\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setNoiseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setColorStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameFrozenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameFuzzyStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameDisplacedStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameColorcaseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setLightExceptionStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameShadeStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameStripStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setBlackScreenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t}else{\n\t\t\t\tString[] scores = score.split(\"\\\\,\");\n\t\t\t\tfor(String s :scores){\n\t\t\t\t\tds.setNetworkStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\t\tif (s.equals(ConstantsResult.CHECK_RESULT_STATUS_NOISE)) {\n\t\t\t\t\t\tds.setNoiseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_SIGN)) {\n\t\t\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_COLOR)) {\n\t\t\t\t\t\tds.setColorStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_FROZEN)) {\n\t\t\t\t\t\tds.setFrameFrozenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_SHADE)) {\n\t\t\t\t\t\tds.setFrameShadeStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_FUZZY)) {\n\t\t\t\t\t\tds.setFrameFuzzyStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_DISPLACED)) {\n\t\t\t\t\t\tds.setFrameDisplacedStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_COLORCASE)) {\n\t\t\t\t\t\tds.setFrameColorcaseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_LIGHTEXCEPTION)) {\n\t\t\t\t\t\tds.setLightExceptionStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_BLACKSCREEN)) {\n\t\t\t\t\t\tds.setBlackScreenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t}else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_STRIP)) {\n\t\t\t\t\t\tds.setFrameStripStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\tds.setRecordTime(new Date());\n\t\t\tds.setCreateTime(new Date());\n\t\t\tdeviceStatusMapper.updateByPrimaryKeySelective(ds);\n\t\t}else{\n\t\t\tds = new DeviceStatus();\n\t\t\tDevice d = deviceMapper.selectByPrimaryKey(deviceId);\n\t\t\tif(d!= null){\n\t\t\t\tds.setPointId(d.getPointId());\n\t\t\t}\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\tDate date = new Date();\n\t\t\tString dateStr = sdf.format(date);\n\t\t\tString fileName = dateStr+\"_\"+ds.getPointId();\n\t\t\tString filePath = \"source/caputrue/a/\"+dateStr+\"/\"+fileName+\".bmp\";\n\t\t\tds.setShotUrl(filePath);\n\t\t\tds.setId(0);\n\t\t\tds.setDeviceId(deviceId); \n\t\t\tds.setRecordTime(new Date());\n\t\t\tds.setCreateTime(new Date());\n\t\t\tif(score.equals(ConstantsResult.CHECK_RESULT_OK)||score.equals(ConstantsResult.CHECK_RESULT_SUCCESS)){\n\t\t\t\tds.setNetworkStatus(ConstantsResult.CHECK_RESULT_STATUS_OK); \n\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setNoiseStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setColorStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameFrozenStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameShadeStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameStripStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameFuzzyStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameDisplacedStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setFrameColorcaseStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\tds.setLightExceptionStatus(ConstantsResult.CHECK_RESULT_STATUS_OK); \n\t\t\t\tds.setBlackScreenStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t}else if(score.equals(ConstantsResult.CHECK_RESULT_NULL)){\n\t\t\t\tds.setNetworkStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION); \n\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setNoiseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameShadeStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameStripStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setColorStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameFrozenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameFuzzyStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameDisplacedStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setFrameColorcaseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setLightExceptionStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n//\t\t\t\tds.setBlackScreenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t}else{\n\t\t\t\tString[] scores = score.split(\"\\\\,\");\n\t\t\t\tfor(String s :scores){\n\t\t\t\t\tds.setNetworkStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\t\tds.setStreamStatus(ConstantsResult.CHECK_RESULT_STATUS_OK);\n\t\t\t\t\tif (s.equals(ConstantsResult.CHECK_RESULT_STATUS_NOISE)) {\n\t\t\t\t\t\tds.setNoiseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_SIGN)) {\n\t\t\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_COLOR)) {\n\t\t\t\t\t\tds.setColorStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_FROZEN)) {\n\t\t\t\t\t\tds.setFrameFrozenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_SHADE)) {\n\t\t\t\t\t\tds.setFrameShadeStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_FUZZY)) {\n\t\t\t\t\t\tds.setFrameFuzzyStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_DISPLACED)) {\n\t\t\t\t\t\tds.setFrameDisplacedStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_COLORCASE)) {\n\t\t\t\t\t\tds.setFrameColorcaseStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t} else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_LIGHTEXCEPTION)) {\n\t\t\t\t\t\tds.setLightExceptionStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t}else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_BLACKSCREEN)) {\n\t\t\t\t\t\tds.setBlackScreenStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t\tds.setSignStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t}else if (s.equals(ConstantsResult.CHECK_RESULT_STATUS_STRIP)) {\n\t\t\t\t\t\tds.setFrameStripStatus(ConstantsResult.CHECK_RESULT_STATUS_EXCEPTION);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\tdeviceStatusMapper.insert(ds); \n\t\t}\n\t}", "private synchronized boolean setAdbInterface(UsbDevice device, UsbInterface intf) throws IOException, InterruptedException {\n Log.d(\"Nightmare\", \"setAdbInterface\");\n if (adbTerminalConnection != null) {\n adbTerminalConnection.close();\n adbTerminalConnection = null;\n mDevice = null;\n }\n\n UsbManager mManager = (UsbManager) getSystemService(Context.USB_SERVICE);\n if (device != null && intf != null) {\n UsbDeviceConnection connection = mManager.openDevice(device);\n if (connection != null) {\n if (connection.claimInterface(intf, false)) {\n\n handler.sendEmptyMessage(Message.CONNECTING);\n\n adbTerminalConnection = AdbConnection.create(new UsbChannel(connection, intf), adbCrypto);\n\n adbTerminalConnection.connect();\n\n //TODO: DO NOT DELETE IT, I CAN'T EXPLAIN WHY\n// adbTerminalConnection.open(\"shell:exec date\");\n mDevice = device;\n handler.sendEmptyMessage(Message.DEVICE_FOUND);\n return true;\n } else {\n connection.close();\n }\n }\n }\n\n handler.sendEmptyMessage(Message.DEVICE_NOT_FOUND);\n\n mDevice = null;\n return false;\n }", "public void setSwitchOn() throws UnavailableDeviceException, ClosedDeviceException, IOException{\n\t\tswitch1.setValue(false);\n\t\tthis.switchState = true; \n\t}", "void setDeviceName(String newDeviceName) {\n deviceName = newDeviceName;\n }", "private static void setNormalState() {\n InitialClass.arduino.serialWrite('0');\n InitialClass.arduino.serialWrite('6');\n InitialClass.arduino.serialWrite('2');\n InitialClass.arduino.serialWrite('8');\n InitialClass.arduino.serialWrite('C');\n InitialClass.arduino.serialWrite('A');\n InitialClass.arduino.serialWrite('4');\n /// hide animated images of scada\n pumpForSolutionOn.setVisible(false);\n pumpForTitrationOn.setVisible(false);\n mixerOn.setVisible(false);\n valveTitrationOpened.setVisible(false);\n valveSolutionOpened.setVisible(false);\n valveWaterOpened.setVisible(false);\n valveOutOpened.setVisible(false);\n\n log.append(\"Клапана закрыты\\nдвигатели выключены\\n\");\n\n }", "@Override\r\n\tpublic void onUpdateIO(int device, int type, int code, int value,\r\n\t\t\tint timestamp) {\n\t\t\r\n\t}", "@Override\r\n public void onUserSet(GenericDevice dev, PDeviceHolder devh, PUserHolder us) {\n\r\n }", "public void actualizacionEstadoDireccion(boolean b, String s) {\n for (DatosEspecUi datosEspecUi : datosEspecUiList) {\n // Log.d(TAG, \"actualizacionEstadoDireccion : \" + datosEspecUi.getId() + \" Second Id : \" + s);\n if (datosEspecUi.getId().equals(s)) {\n Log.d(TAG, \"actualizacionEstadoDireccionTRUE : \" + datosEspecUi.getId() + \" Second Id : \" + s +\n \" / DESCRIPCION : \"+datosEspecUi.getDescripcion());\n datosEspecUi.setEstado(b);\n continue;\n }\n continue;\n }\n notifyDataSetChanged();\n }", "public void updateDeviceToView()\n {\n boolean isTLMEnable, isUIDEnable, isUrlEnable;\n KBCfgCommon commonCfg = (KBCfgCommon) mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeCommon);\n if (commonCfg != null) {\n\n //print basic capibility\n Log.v(LOG_TAG, \"support iBeacon:\" + commonCfg.isSupportIBeacon());\n Log.v(LOG_TAG, \"support eddy url:\" + commonCfg.isSupportEddyURL());\n Log.v(LOG_TAG, \"support eddy tlm:\" + commonCfg.isSupportEddyTLM());\n Log.v(LOG_TAG, \"support eddy uid:\" + commonCfg.isSupportEddyUID());\n Log.v(LOG_TAG, \"support ksensor:\" + commonCfg.isSupportKBSensor());\n Log.v(LOG_TAG, \"beacon has button:\" + commonCfg.isSupportButton());\n Log.v(LOG_TAG, \"beacon can beep:\" + commonCfg.isSupportBeep());\n Log.v(LOG_TAG, \"support accleration sensor:\" + commonCfg.isSupportAccSensor());\n Log.v(LOG_TAG, \"support humidify sensor:\" + commonCfg.isSupportHumiditySensor());\n Log.v(LOG_TAG, \"support max tx power:\" + commonCfg.getMaxTxPower());\n Log.v(LOG_TAG, \"support min tx power:\" + commonCfg.getMinTxPower());\n\n //get support trigger\n Log.v(LOG_TAG, \"support trigger\" + commonCfg.getTrigCapability());\n\n //device model\n mBeaconModel.setText(commonCfg.getModel());\n\n //device version\n mBeaconVersion.setText(commonCfg.getVersion());\n\n //current advertisment type\n mEditBeaconName.setText(commonCfg.getAdvTypeString());\n\n //advertisment period\n mEditBeaconAdvPeriod.setText(String.valueOf(commonCfg.getAdvPeriod()));\n\n //beacon tx power\n mEditBeaconTxPower.setText(String.valueOf(commonCfg.getTxPower()));\n\n //beacon name\n mEditBeaconName.setText(String.valueOf(commonCfg.getName()));\n\n //check if Eddy TLM advertisement enable\n isTLMEnable = ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeEddyTLM) > 0);\n mCheckboxTLM.setChecked(isTLMEnable);\n\n //check if Eddy UID advertisement enable\n isUIDEnable= ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeEddyUID) > 0);\n mCheckboxUID.setChecked(isUIDEnable);\n mUidLayout.setVisibility(isUIDEnable? View.VISIBLE: View.GONE);\n\n //check if Eddy URL advertisement enable\n isUrlEnable= ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeEddyURL) > 0);\n mCheckBoxURL.setChecked(isUrlEnable);\n mUrlLayout.setVisibility(isUrlEnable? View.VISIBLE: View.GONE);\n\n //check if iBeacon advertisment enable\n Log.v(LOG_TAG, \"iBeacon advertisment enable:\" + ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeIBeacon) > 0));\n\n //check if KSensor advertisment enable\n Log.v(LOG_TAG, \"iBeacon advertisment enable:\" + ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeSensor) > 0));\n\n //check TLM adv interval\n Log.v(LOG_TAG, \"TLM adv interval:\" + commonCfg.getTLMAdvInterval());\n }\n\n //get eddystone URL paramaters\n KBCfgEddyURL beaconUrlCfg = (KBCfgEddyURL) mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyURL);\n if (beaconUrlCfg != null) {\n mEditEddyURL.setText(beaconUrlCfg.getUrl());\n }\n\n //get eddystone UID information\n KBCfgEddyUID beaconUIDCfg = (KBCfgEddyUID) mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyUID);\n if (beaconUIDCfg != null) {\n mEditEddyNID.setText(beaconUIDCfg.getNid());\n mEditEddySID.setText(beaconUIDCfg.getSid());\n }\n\n clearChangeTag();\n }", "public void setStable() {\n this.unstable = false;\n this.unstableTimeline.stop();\n this.statusLed.setFastBlink(false);\n if (this.shutdownButton.isSelected() == true) {\n this.statusLed.setStatus(\"off\");\n } else if (this.offlineButton.isSelected() == true) {\n this.statusLed.setStatus(\"warning\");\n } else {\n this.statusLed.setStatus(\"ok\");\n } \n }", "void onRestoreDevices() {\n synchronized (mConnectedDevices) {\n for (int i = 0; i < mConnectedDevices.size(); i++) {\n DeviceInfo di = mConnectedDevices.valueAt(i);\n AudioSystem.setDeviceConnectionState(\n di.mDeviceType,\n AudioSystem.DEVICE_STATE_AVAILABLE,\n di.mDeviceAddress,\n di.mDeviceName,\n di.mDeviceCodecFormat);\n }\n }\n }", "private int getSimState() {\n TelephonyManager tm = (TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE);\n return tm.getSimState();\n }", "private void updateDeviceStatusRecord(int deviceId) {\n\t\tDeviceStatus ds = deviceStatusMapper.selectByDeviceId(deviceId); \n\t\tif(ds!= null){\n\t\t\tds.setId(0); \n\t\t\tif(StringUtil.isEmpty(ds.getShotUrl())){\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\tString dateStr = sdf.format(date);\n\t\t\t\tString fileName = dateStr+\"_\"+ds.getPointId();\n\t\t\t\tString filePath = \"source/caputrue/a/\"+dateStr+\"/\"+fileName+\".bmp\";\n\t\t\t\tds.setShotUrl(filePath);\n\t\t\t}\n\t\t\tdeviceStatusRecordMapper.insertRecord(ds);\n\t\t}\n\t}", "@Test\n public void updateTest5() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setWifi(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isWifi() ,\"Should return true if update Servizio\");\n }", "private void simulatorChanged()\r\n\t{\r\n\t\tString simulator = acSimulator.getComponentText();\r\n\t\tboolean bValid = ( simulator.length() > 0 );\r\n\t\ttabbedPane.setEnabled(bValid);\r\n\t\tfscNetfile.setEnabled(bValid);\r\n\t\tfscOppFile.setEnabled( bValid && fscOppFile.hasFilter() );\r\n\t}", "void updateViewToDevice()\n {\n if (!mBeacon.isConnected())\n {\n return;\n }\n\n KBCfgCommon oldCommonCfg = (KBCfgCommon)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeCommon);\n KBCfgCommon newCommomCfg = new KBCfgCommon();\n KBCfgEddyURL newUrlCfg = new KBCfgEddyURL();\n KBCfgEddyUID newUidCfg = new KBCfgEddyUID();\n try {\n //check if user update advertisement type\n int nAdvType = 0;\n if (mCheckBoxURL.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyURL;\n }\n if (mCheckboxUID.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyUID;\n }\n if (mCheckboxTLM.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyTLM;\n }\n //check if the parameters changed\n if (oldCommonCfg.getAdvType() != nAdvType)\n {\n newCommomCfg.setAdvType(nAdvType);\n }\n\n //adv period, check if user change adv period\n Integer changeTag = (Integer)mEditBeaconAdvPeriod.getTag();\n if (changeTag > 0)\n {\n String strAdvPeriod = mEditBeaconAdvPeriod.getText().toString();\n if (Utils.isPositiveInteger(strAdvPeriod)) {\n Float newAdvPeriod = Float.valueOf(strAdvPeriod);\n newCommomCfg.setAdvPeriod(newAdvPeriod);\n }\n }\n\n //tx power ,\n changeTag = (Integer)mEditBeaconTxPower.getTag();\n if (changeTag > 0)\n {\n String strTxPower = mEditBeaconTxPower.getText().toString();\n Integer newTxPower = Integer.valueOf(strTxPower);\n if (newTxPower > oldCommonCfg.getMaxTxPower() || newTxPower < oldCommonCfg.getMinTxPower()) {\n toastShow(\"tx power not valid\");\n return;\n }\n newCommomCfg.setTxPower(newTxPower);\n }\n\n //device name\n String strDeviceName = mEditBeaconName.getText().toString();\n if (!strDeviceName.equals(oldCommonCfg.getName()) && strDeviceName.length() < KBCfgCommon.MAX_NAME_LENGTH) {\n newCommomCfg.setName(strDeviceName);\n }\n\n //uid config\n if (mCheckboxUID.isChecked())\n {\n KBCfgEddyUID oldUidCfg = (KBCfgEddyUID)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyUID);\n String strNewNID = mEditEddyNID.getText().toString();\n String strNewSID = mEditEddySID.getText().toString();\n if (!strNewNID.equals(oldUidCfg.getNid()) && KBUtility.isHexString(strNewNID)){\n newUidCfg.setNid(strNewNID);\n }\n\n if (!strNewSID.equals(oldUidCfg.getSid()) && KBUtility.isHexString(strNewSID)){\n newUidCfg.setSid(strNewSID);\n }\n }\n\n //url config\n if (mCheckBoxURL.isChecked())\n {\n KBCfgEddyURL oldUrlCfg = (KBCfgEddyURL)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyURL);\n String strUrl = mEditEddyURL.getText().toString();\n if (!strUrl.equals(oldUrlCfg.getUrl())){\n newUrlCfg.setUrl(strUrl);\n }\n }\n\n //TLM advertisement interval configuration (optional)\n if (mCheckboxTLM.isChecked()){\n //The default TLM advertisement interval is 10. The KBeacon will send 1 TLM advertisement packet every 10 advertisement packets.\n //newCommomCfg.setTLMAdvInterval(8);\n }\n }catch (KBException excpt)\n {\n toastShow(\"config data is invalid:\" + excpt.errorCode);\n excpt.printStackTrace();\n }\n\n ArrayList<KBCfgBase> cfgList = new ArrayList<>(3);\n cfgList.add(newCommomCfg);\n cfgList.add(newUidCfg);\n cfgList.add(newUrlCfg);\n mDownloadButton.setEnabled(false);\n mBeacon.modifyConfig(cfgList, new KBeacon.ActionCallback() {\n @Override\n public void onActionComplete(boolean bConfigSuccess, KBException error) {\n mDownloadButton.setEnabled(true);\n if (bConfigSuccess)\n {\n clearChangeTag();\n toastShow(\"config data to beacon success\");\n }\n else\n {\n if (error.errorCode == KBException.KBEvtCfgNoParameters)\n {\n toastShow(\"No data need to be config\");\n }\n else\n {\n toastShow(\"config failed for error:\" + error.errorCode);\n }\n }\n }\n });\n }", "private void setEstado(Estado estado) {\n\t\tif ((!this.estado.equals(Estado.PARADO)) && (estado.equals(Estado.PARADO))) {\n\n\t\t\t// registro la secuencia de ejecucion\n\t\t\toyenteFinalizacion.firePropertyChange(\"SECUENCIA_FINALIZACION\", null,\n\t\t\t\t\tplanificador.obtenerSecuenciaLogica());\n\t\t}\n\t\t// registro el cambio de estado\n\t\t// TODO arreglar para pasar el estado anterior\n\t\t// oyenteCambiosEstado.firePropertyChange(\"ESTADO\", this.estado,\n\t\t// estado);\n\t\toyenteCambiosEstado.firePropertyChange(\"ESTADO\", null, estado);\n\n\t\t// guardo el cambio de estado\n\t\tthis.estado = estado;\n\n\t}", "private void enableSensor() {\n if (DEBUG) Log.d(TAG, \">>> Sensor \" + getEmulatorFriendlyName() + \" is enabled.\");\n mEnabledByEmulator = true;\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_STATE_CHANGED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }", "@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n String debugStr[]=settings.getLatestSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH);\n if(debugStr!=null) {\n boolean streamOn = Boolean.valueOf(debugStr[3]);\n if(!streamOn){\n //Check that we are connected to the device before try to send command\n if(MainActivity.deviceConnected) {\n overview.orientationSwitch.setChecked(true);\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"true\");\n sendStreamEnabledImuRequest();\n } else {\n overview.orientationSwitch.setChecked(false);\n }\n } else {\n overview.orientationSwitch.setChecked(false);\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"false\");\n sendStreamDisabledImuRequest();\n }\n\n } else {\n //The settings could not be found in the database, insert the setting\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"false\");\n }\n\n\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putSerializable(\"device\", mDevice);\n }", "protected final void setGUIAttributes(){\r\n\t\t\r\n\t\tbtnOnOff.setEnabled( device.getOn() != null && device.getOn().getActor() != null);\r\n\t\tif(device.getOn() == null){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// if the device is On\r\n\t\tif( device.getOnValue()){\r\n\t\t\tbtnOnOff.setText( \"Turn device Off\");\r\n\t\t// if the device is Off\r\n\t\t}else{\r\n\t\t\tbtnOnOff.setText( \"Turn device On\");\r\n\t\t}\r\n\t\tsetGUIAttributesHelper();\r\n\t}", "public void setSafeSetPageDevice(boolean value) {\n this.safeSetPageDevice = value;\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> setDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.Device request);", "public void changeStatus()\n {\n if(this.isActivate == false)\n {\n this.isActivate = true;\n switchSound.play();\n //this.dungeon.updateSwitches(true); \n }\n else{\n this.isActivate = false;\n switchSound.play(1.75, 0, 1.5, 0, 1);\n //this.dungeon.updateSwitches(false); \n }\n notifyObservers();\n\n }", "public boolean deviceSave(Device device) {\n\t\tdevice.setRegisterTime(new Date());\n\t\tdeviceDao.save(device);\n\t\treturn true;\n\t}", "public interface ControlDeviceMvpView extends MvpView {\n\n void updateStatusDevice(boolean bDev1,boolean bDev2,boolean bDev3);\n\n void updateStatusConnecttion(boolean value);\n}", "public void initDevice() {\r\n\t\t\r\n\t}", "public void setSensorOn() {\n\n }", "public void ondeviceConnected() {\n if(isAdded() && !isDetached()) {\n if (RELOAD_CARD_NUMBERS[0] == 1) {\n new DailyVerseFetcher(getActivity()).execute(true);\n }\n if (RELOAD_CARD_NUMBERS[1] == 1) {\n new HomeSermonFetcher(getActivity()).execute(true);\n }\n }\n }", "@Override\r\n public boolean connectedWifi() {\r\n return NMDeviceState.NM_DEVICE_STATE_ACTIVATED.equals(nwmDevice.getState().intValue());\r\n }", "public void deviceLoaded(Device device);", "IDeviceState getDeviceState(UUID id) throws SiteWhereException;", "public void updateVisible(){\n if (serviceManager.isCustomerQueMode() == true && serviceManager.isManagerMode() == false) {\n this.setVisible(true);\n } else {\n this.setVisible(false);\n }\n// System.out.println(serviceManager.isCustomerQueMode());\n }", "@Override\r\n\tpublic void carDriveModeChange() {\n\t\t\r\n\t}", "public void setStorageDeviceProtected() { throw new RuntimeException(\"Stub!\"); }", "public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {\r\n throw new UnsupportedOperationException(\"Changing display is not supported.\");\r\n }", "public void alterarEstado(String n, boolean b) throws IOException {\r\n\t\tfor (VCI_cl_Utilizador u : listaUtilizadores) {\r\n\t\t\tif (u instanceof VCI_cl_Vendedor) {\r\n\t\t\t\tif (((VCI_cl_Vendedor) u).getNome().equals(n)) {\r\n\t\t\t\t\t((VCI_cl_Vendedor) u).setEstado(b);\r\n\t\t\t\t\tgravarUtilizadores();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void setIsManaged(boolean isManaged);", "public void changeDisk(){\n if(isFull==true) {\n if (this.type == TYPE.WHITE) {\n this.type = TYPE.BLACK;\n } else {\n type = TYPE.WHITE;\n }\n }\n return;\n }", "public void updateModBusStatus(String xml) throws Exception {\n\t\n\t\n\tDeviceManager deviceManager = new DeviceManager();\n\tQueue<KeyValuePair> queue = IMonitorUtil.extractCommandsQueueFromXml(xml);\n\tString errorCode = IMonitorUtil.commandId(queue,Constants.ERROR_CODE_VALUE);\n\tString generatedDeviceId = IMonitorUtil.commandId(queue,Constants.DEVICE_ID);\n\tString filterSignStatus= IMonitorUtil.commandId(queue,Constants.FILTER_SIGN_STATUS);\n\tString SensedTemp=IMonitorUtil.commandId(queue,Constants.ROOMTEMP);\n\t\n\tint filterValue=Integer.parseInt(filterSignStatus);\n\tDeviceConfigurationManager deviceConfigurationManager = new DeviceConfigurationManager();\n\tDevice device = deviceManager.getDeviceByGeneratedDeviceId(generatedDeviceId);\n\tIndoorUnitConfiguration config = (IndoorUnitConfiguration) deviceConfigurationManager.getDeviceConfigurationById(device.getDeviceConfiguration().getId());\n\tconfig.setFilterSignStatus(filterValue);\n\tconfig.setSensedTemperature(SensedTemp);\n\tModbusConstants errorCodes = new ModbusConstants();\n\tString errorMesssage=errorCodes.errormap.get(errorCode);\n\t//String errorMesssage=ModbusConstants.errormap.get(errorCode);\n\t\n\t//errorCodes.errormap<Object,String>;\n\tconfig.setErrorMessage(errorMesssage);\n\tboolean res=deviceConfigurationManager.updateIduConfiguration(config);\n\t\n\t\n\t\n\t\n}", "void refresh() {\n List<IDevice> list = Lists.newArrayList();\n// if (fan == null) {\n// ToastUtils.showShort(R.string.dev_invalid_error);\n// } else {\n// list.add(fan);\n// if (stove != null) {\n// list.add(stove);\n// }\n// }\n list = Plat.deviceService.queryDevices();\n adapter.loadData(list);\n }" ]
[ "0.67705834", "0.6496033", "0.62853134", "0.60316867", "0.59608585", "0.59526855", "0.5811566", "0.57586527", "0.57496935", "0.5729748", "0.572717", "0.5720896", "0.57064694", "0.5699245", "0.56643695", "0.5629171", "0.56136775", "0.5583969", "0.5570624", "0.55330896", "0.55299", "0.5529156", "0.55231476", "0.55119795", "0.5502519", "0.5497094", "0.5494328", "0.54788435", "0.5473109", "0.5471185", "0.5470793", "0.54656196", "0.54649985", "0.54608375", "0.54595524", "0.54504454", "0.5443845", "0.5440413", "0.5435034", "0.5420369", "0.5415893", "0.5394919", "0.5390285", "0.53816026", "0.5379159", "0.5369172", "0.53662455", "0.5352684", "0.53513193", "0.531919", "0.5318184", "0.5306383", "0.530623", "0.5305994", "0.530345", "0.53008866", "0.52851605", "0.5279579", "0.5278725", "0.5275169", "0.52718675", "0.52663887", "0.5250342", "0.5248318", "0.5244435", "0.5243295", "0.5242857", "0.5227958", "0.5217585", "0.52162665", "0.5216251", "0.5209794", "0.5209572", "0.5206802", "0.5192386", "0.518079", "0.51805675", "0.5177284", "0.51763237", "0.5174016", "0.51721644", "0.5169307", "0.51686555", "0.51665026", "0.51592183", "0.51588035", "0.51583624", "0.51536477", "0.514573", "0.5145471", "0.51451236", "0.51444995", "0.51403", "0.5135192", "0.51312435", "0.51311135", "0.5130978", "0.51244944", "0.51216114", "0.5120716", "0.5120402" ]
0.0
-1
This method will print the passed paramteres
public static void println(Exception e) { System.out.println(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print()\r\n\t{\r\n\t\tSystem.out.println(\"Method name: \" + name);\r\n\t\tSystem.out.println(\"Return type: \" + returnType);\r\n\t\tSystem.out.println(\"Modifiers: \" + modifiers);\r\n\r\n\t\tif(exceptions != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Exceptions: \" + exceptions[0]);\r\n\t\t\tfor(int i = 1; i < exceptions.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\", \" + exceptions[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exceptions: none\");\r\n\t\t}\r\n\r\n\t\tif(parameters != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Parameters: \" + parameters[0]);\r\n\t\t\tfor(int i = 1; i < parameters.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\", \" + parameters[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Parameters: none\");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}", "private void printParams(Object... params) {\n if (params != null) {\n String paramsStr = \"\";\n for (Object o : params) {\n if (o == null) {\n paramsStr += \"null;\";\n } else {\n paramsStr += (o.toString() + \";\");\n }\n }\n logger.debug(\"PARAMETERS=[\" + paramsStr + \"]\");\n }\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "@FormatMethod\n void print(String format, Object... args);", "public void printFields(){\n\t\tif(this.returnValueType==null){\n\t\t\tthis.returnValueType=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.className=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.methodName=\"\";\n\t\t}\n\t\tSystem.out.print(\"\t\"+this.address+\"\t\"+this.returnValueType+\" \"+this.className+\".\"+this.methodName+\" \");\n\t\tSystem.out.print(\"(\");\n\t\tif(this.hasParameter()){\n\t\t\t\n\t\t\tfor(int j=0;j<this.parameterType.length;j++){\n\t\t\t\tSystem.out.print(this.parameterType[j]);\n\t\t\t\tif(j!=(this.parameterType.length-1)){\n\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\tSystem.out.println(\")\");\n\n\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\tpublic void print() {\n\n\t\t}", "public void printDetails (StringBuilder param)\r\n {\r\n System.out.println(\"The stringBuilder is \"+ param +\" the length is \"+ param.length()+\" and the capacity is \"+ param.capacity());\r\n }", "void printInfo();", "public void print();", "public void print();", "public void print();", "public void print();", "private static void print(final String format, final Object...params) {\n // we prefix all our messages with \">>> \" so as to distinguish them from the driver, node and client messages\n final String msg = String.format(\">>> \" + format, params);\n log.info(msg);\n System.out.println(msg);\n }", "@Override\n\tpublic void print() {\n\t\t\n\t}", "@Override\n\tpublic void print() {\n\n\t}", "@Override\r\n\tpublic void print() {\n\t}", "void print();", "void print();", "void print();", "void print();", "void print();", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "public void print(){\r\n System.out.println(toString());\r\n }", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "public static void printInfo(){\n }", "public void print() {\n System.out.print(\"[ \" + value + \":\" + numSides + \" ]\");\n }", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "public String toString(){\r\n\t\t\r\n\t\tString x =\"\";\r\n\t\t\r\n\t\tfor(int i=0; i < param.size() ; i++ ){\r\n\t\t\t\r\n\t\t\tx += param.get(i) + \"\\n\" ; \r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn x;\r\n\t}", "abstract public void printInfo();", "void print(){\n\t\tSystem.out.println(\"[\"+x+\",\"+y+\"]\");\n\t}", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public void printYourself(){\n\t}", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "public void printRecipt(){\n\n }", "public void method(String name) {\n System.out.printf(\"Called method with parameters %s \\n\", name);\n }", "public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public String print();", "public void printOptions() {\n\t\t\n\t}", "public void print(String value){\r\n System.out.println(value);\r\n }", "@Override\n\tpublic void printNode() {\n\t\tSystem.out.println(\"------Args_list------\");\n\t\te.printNode();\n\t\tif(a!=null)\n\t\t\ta.printNode();\n\t\t\n\t}", "public void print() {\n print$$dsl$guidsl$guigs();\n System.out.print( \" eqn =\" + eqn );\n }", "public static void main(String[] args){\n //how to print\n\n }", "public void printToViewConsole(String arg);", "public void printInfo()\n {\n System.out.println(\"position Value:\" + pos_.get(0).getPosition());\n System.out.println(\"velocitiy Value:\" + vel_.get(0).getVelocity());\n System.out.println(\"lastUpdateTime Value:\" + lastPosUpdateTime_);\n System.out.println(\"KalmanGain_ Value:\" + KalmanGain_);\n }", "public void print(Object someObj) {\r\n this.print(someObj.toString());\r\n }", "@VisibleForTesting\n void print();", "void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public abstract String paramsToString();", "public void print() {\n System.out.println(toString());\n }", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "public void print () {\n }", "private void listParameters(JavaSamplerContext context)\n {\n if (getLogger().isDebugEnabled())\n {\n Iterator argsIt = context.getParameterNamesIterator();\n while (argsIt.hasNext())\n {\n String name = (String) argsIt.next();\n getLogger().debug(name + \"=\" + context.getParameter(name));\n }\n }\n }", "public void print(Object obj) {\n print(obj.toString());\n }", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "void print() {\r\n\t\tOperations.print(lexemes, tokens);\r\n\t}", "void dispay(int a, int b) // a, b method parameters or method variables\n\t{\n\t\tSystem.out.print(a);\n\t\tSystem.out.println(b);\n\t\t}", "public String toString() {\n return getClass().getName() + \"[\" + paramString() + \"]\";\n }", "@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "public void print() {\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\">> print()\");\n\t\t}\n\t\tSystem.out.println(p + \"/\" + q);\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\"<< print()\");\n\t\t}\n\t}", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "public void print() {\r\n System.out.println(c() + \"(\" + x + \", \" + y + \")\");\r\n }", "public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}", "@Override\n public void print() {\n }", "public void print() {\n\t\tSystem.out.println(toString());\n\t}", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void printf(Level level, Marker marker, String format, Object... params) {\n\n\t}", "public void printResults() {\n\t System.out.println(\"BP\\tBR\\tBF\\tWP\\tWR\\tWF\");\n\t System.out.print(NF.format(boundaryPrecision) + \"\\t\" + NF.format(boundaryRecall) + \"\\t\" + NF.format(boundaryF1()) + \"\\t\");\n\t System.out.print(NF.format(chunkPrecision) + \"\\t\" + NF.format(chunkRecall) + \"\\t\" + NF.format(chunkF1()));\n\t System.out.println();\n }", "public void print(){\n System.out.println(\"(\"+a.getAbsis()+\"_a,\"+a.getOrdinat()+\"_a)\");\n System.out.println(\"(\"+b.getAbsis()+\"_b,\"+b.getOrdinat()+\"_b)\");\n System.out.println(\"(\"+c.getAbsis()+\"_b,\"+c.getOrdinat()+\"_c)\");\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}", "@Override\r\n\tpublic void Print() {\r\n\t\tSystem.out.print(this.tav+\" \");\r\n\t\t\r\n\t}", "private static void print(String valNames, Object... objects) {\n\t\tvalNames = valNames.trim();\n\t\tString[] arr = valNames.split(\":\");\n\t\tString format = valNames + \" \";\n\t\tString prefix = \"\";\n\t\tfor(String str : arr ) {\n\t\t\tformat += prefix + \"%2s\";\n\t\t\tprefix = \":\";\n\t\t}\t\t\n\t\tSystem.out.println(\"\"+String.format(format, objects)); \n\t}", "static void print (){\n \t\tSystem.out.println();\r\n \t}", "public static void pf (String format, Object[] args) {\n System.out.println (spf (format, args));\n }", "public void print() {\n super.print();\r\n System.out.println(\"Hourly Wage: \" + hourlyWage);\r\n System.out.println(\"Hours Per Week: \" + hoursPerWeek);\r\n System.out.println(\"Weeks Per Year: \" + weeksPerYear);\r\n }", "@Override\n public String print() {\n return this.text + \"\\n\" + \"1. \" + this.option1.text + \"\\n\" + \"2. \" + this.option2.text;\n }", "public void printOut(){\n\t\tSystem.out.println(\"iD: \" + this.getiD());\n\t\tSystem.out.println(\"Titel: \" + this.getTitel());\n\t\tSystem.out.println(\"Produktionsland: \" + this.getProduktionsLand());\n\t\tSystem.out.println(\"Filmlaenge: \" + this.getFilmLaenge());\n\t\tSystem.out.println(\"Originalsprache: \" + this.getOriginalSprache());\n\t\tSystem.out.println(\"Erscheinungsjahr: \" + this.getErscheinungsJahr());\n\t\tSystem.out.println(\"Altersfreigabe: \" + this.getAltersFreigabe());\n\t\tif(this.kameraHauptperson != null) {\n\t\t\tSystem.out.println( \"Kameraperson: \" + this.getKameraHauptperson().toString() );\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println( \"Keine Kameraperson vorhanden \");\n\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tif ( this.listFilmGenre != null) {\n\t\t\tfor( FilmGenre filmGenre: this.listFilmGenre ){\n\t\t\t\tSystem.out.println(\"Filmgenre: \" + filmGenre);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person darsteller: this.listDarsteller ){\n\t\t\tSystem.out.println(\"Darsteller: \" + darsteller);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person synchronSpr: this.listSynchronsprecher ){\n\t\t\tSystem.out.println(\"synchro: \" + synchronSpr);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person regi: this.listRegisseure ){\n\t\t\tSystem.out.println(\"regi: \" + regi);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Musikstueck mstk: this.listMusickstuecke ){\n\t\t\tSystem.out.println(\"Musikstueck: \" + mstk);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tSystem.out.println(\"Datentraeger: \" + this.getDatentraeger());\n\t\tSystem.out.println(\"----------------------------\");\n\t}", "public void print () {\r\n System.out.println(\"Place \"+name+\": lat \"+lat+\" lon \"+lon+\r\n \" elevation \"+ele);\r\n }", "@Override\n\tpublic void printf(Level level, String format, Object... params) {\n\n\t}", "private void print(String... toPrint) {for (String print : toPrint) System.out.println(print);}", "public void println();", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "public void print()\n {\n \tSystem.out.println(\"MOTO\");\n super.print();\n System.out.println(\"Tipo da partida: \" + tipoPartida);\n System.out.println(\"Cilindradas: \" + cilindradas);\n System.out.println();\n }", "private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}", "public void print(Object msg)\n {\n print(msg, 1);\n }", "static void show(String info, Object[] a) {\n System.out.print(info + \": \");\n show(a);\n }", "@Override\n public void println(String title){\n Print.oun(\"|============\" + title + \"============|\");\n println();\n Print.oun(\"|===========End of the list===========|\");\n }", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "public static void printNames(String name){\n System.out.printf(\"Hello, %s\", name);\n}", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }" ]
[ "0.74310416", "0.739572", "0.708591", "0.69704294", "0.69704294", "0.69593316", "0.69366795", "0.69102097", "0.6894244", "0.68798137", "0.6815383", "0.6812913", "0.6812913", "0.6812913", "0.6812913", "0.6803375", "0.67437905", "0.6736651", "0.67228615", "0.67022693", "0.67022693", "0.67022693", "0.67022693", "0.67022693", "0.67018855", "0.66983294", "0.66946274", "0.6688605", "0.6668546", "0.66437846", "0.66348284", "0.66127884", "0.6593511", "0.65920687", "0.65851396", "0.6578743", "0.6573427", "0.6566708", "0.6561349", "0.6547381", "0.6529244", "0.6522573", "0.65139323", "0.6503783", "0.6501567", "0.6481527", "0.6481096", "0.64726406", "0.64511865", "0.6446011", "0.64398265", "0.6435369", "0.64288217", "0.6426109", "0.6424941", "0.6422858", "0.64137185", "0.6411573", "0.6404971", "0.63983345", "0.6391222", "0.63893414", "0.6386229", "0.6384296", "0.63838047", "0.6383418", "0.63829046", "0.6355169", "0.63533163", "0.63518596", "0.6351588", "0.6343087", "0.6335465", "0.632474", "0.6313407", "0.6310945", "0.63068867", "0.63026947", "0.62933004", "0.6288247", "0.62879175", "0.6287411", "0.62836486", "0.62829155", "0.6273756", "0.6273687", "0.6273625", "0.62645113", "0.62619907", "0.62541497", "0.6251883", "0.6251353", "0.6246077", "0.6240283", "0.62382513", "0.6237003", "0.623186", "0.62318337", "0.62307405", "0.62305975", "0.62267077" ]
0.0
-1
Setting the autowired Hibernate Template passed from Application Context
public void setTemplate(HibernateTemplate template) { this.template = template; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSessionFactory(SessionFactory sessionFactory) {\n template = new HibernateTemplate(sessionFactory);\n}", "public void setHibernateTemplate(HibernateTemplate hibernateTemplate) {\n this.hibernateTemplate = hibernateTemplate;\n }", "HibernateTransactionTemplate() {\n _transactionTemplate = getTransactionTemplate();\n _hibernateTemplate = getHibernateTemplate();\n }", "public void setHibernateTemplate(HibernateTemplate hibernateTemplate){\r\n\t\tthis.hibernateTemplate = hibernateTemplate;\r\n\t}", "public void setHibernateTemplate(HibernateTemplate hibernateTemplate){\r\n\t\tthis.hibernateTemplate = hibernateTemplate;\r\n\t}", "public void setHibernateTemplate(HibernateTemplate hibernateTemplate){\r\n\t\tthis.hibernateTemplate = hibernateTemplate;\r\n\t}", "public void setHibernateTemplate(HibernateTemplate hibernateTemplate){\r\n\t\tthis.hibernateTemplate = hibernateTemplate;\r\n\t}", "public HibernateTemplate getHibernateTemplate() {\n return hibernateTemplate;\n }", "public HibernateTemplate getHibernateTemplate(){\r\n\t\treturn this.hibernateTemplate;\r\n\t}", "public HibernateTemplate getHibernateTemplate(){\r\n\t\treturn this.hibernateTemplate;\r\n\t}", "public HibernateTemplate getHibernateTemplate(){\r\n\t\treturn this.hibernateTemplate;\r\n\t}", "public HibernateTemplate getHibernateTemplate(){\r\n\t\treturn this.hibernateTemplate;\r\n\t}", "public HibernateTemplate getHibernateTemplate() {\n return _hibernateTemplate;\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\r\n template = new HibernateTemplate(sessionFactory);\r\n }", "public HibernateTemplate getHibernateTemplate()\n \t{\n \t\treturn this.hibernateTemplate;\n \t}", "public void setTemplateEngine(TemplateEngine engine) {\n queryCreator = engine;\n registerTemplate();\n resetCache();\n }", "@Autowired\n public LecturerMailCreationService(TemplateEngine templateEngine) {\n this.templateEngine = templateEngine;\n }", "@Autowired\n public ConsoleDaoJdbcTemplateImpl(JdbcTemplate jdbcTemplate) {\n this.jdbcTemplate = jdbcTemplate;\n }", "public HibernateGenerator(String templateDir)\n {\n super(templateDir);\n\n hibernateOnlineTemplates = new STGroupFile(templateGroupToFileName(HIBERNATE_ONLINE_TEMPLATES_GROUP));\n hibernateOnlineTemplates.registerRenderer(String.class, new CamelCaseRenderer());\n\n hibernateUserTypeConfigTemplates =\n new STGroupFile(templateGroupToFileName(HIBERNATE_USERTYPE_CONFIG_TEMPLATES_GROUP));\n hibernateUserTypeConfigTemplates.registerRenderer(String.class, new CamelCaseRenderer());\n\n hibernateWarehouseTemplates = new STGroupFile(templateGroupToFileName(HIBERNATE_WAREHOUSE_TEMPLATES_GROUP));\n hibernateWarehouseTemplates.registerRenderer(String.class, new CamelCaseRenderer());\n\n hibernateUserTypeTemplates = new STGroupFile(templateGroupToFileName(HIBERNATE_USERTYPE_TEMPLATES_GROUP));\n hibernateUserTypeTemplates.registerRenderer(String.class, new CamelCaseRenderer());\n }", "public void init(){\n\t\tcfg = new Configuration();\r\n\t\tcfg.setServletContextForTemplateLoading(getServletContext(), \"WEB-INF/templates\");\r\n }", "@Bean\n public SpringTemplateEngine templateEngine() {\n SpringTemplateEngine templateEngine = new SpringTemplateEngine();\n templateEngine.setTemplateResolver(templateResolver());\n templateEngine.setEnableSpringELCompiler(true);\n return templateEngine;\n }", "@Bean\n public SpringTemplateEngine templateEngine() {\n SpringTemplateEngine templateEngine = new SpringTemplateEngine();\n templateEngine.setTemplateResolver(templateResolver());\n templateEngine.setEnableSpringELCompiler(true);\n return templateEngine;\n }", "@Autowired\n\tpublic HibernateAccountManager(SessionFactory sessionFactory) {\n\t\tthis.sessionFactory = sessionFactory;\n\t\tthis.hibernateTemplate = new HibernateTemplate(sessionFactory);\n\t}", "@Autowired\n public TransactionDao(JdbcTemplate jdbcTemplate) {\n this.jdbcTemplate = jdbcTemplate;\n }", "public DressDaoJdbc(NamedParameterJdbcTemplate jdbcTemplate) {\n this.jdbcTemplate = jdbcTemplate;\n }", "public HibernateTransactionTemplate getHibernateTransactionTemplate() {\n return new HibernateTransactionTemplate();\n }", "@Primary\n @Bean\n public SqlSessionTemplate sqlSessionTemplatePrimary() throws Exception {\n return new SqlSessionTemplate(sqlSessionPrimary(), ExecutorType.REUSE);\n }", "protected void registerTemplate() {\n if (initialized) {\n queryTemplateName = \"shibboleth.resolver.dc.\" + getId();\n queryCreator.registerTemplate(queryTemplateName, queryTemplate);\n }\n }", "@Autowired\r\n\tpublic void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {\n\t\tsuper.setSqlSessionFactory(sqlSessionFactory);\r\n\t}", "@Override\n\t\tpublic SessionFactoryImpl call() throws Exception {\n\t\t\tClassPathXmlApplicationContext applicationContext=new ClassPathXmlApplicationContext(\"spring-mybatis.xml\");\n\t\t\t\n\t\t\tSessionFactoryImpl sessionFactoryImpl=(SessionFactoryImpl) applicationContext.getBean(\"sessionFactory\");\n\n\t\t\treturn sessionFactoryImpl;\n\t\t}", "@Bean\n public JdbcTemplate jdbcTemplate() {\n return new JdbcTemplate(dataSource());\n }", "public interface TblAuditTemplateDao {\n\n TblAuditTemplate selectByTemplateId(String templateId);\n}", "@Bean(name = \"hebLdapTemplate\")\n\tpublic LdapTemplate ldapTemplate() throws Exception {\n\t\tLdapTemplate ldapTemplate = new LdapTemplate();\n\t\tldapTemplate.setContextSource(contextSource());\n\t\tldapTemplate.afterPropertiesSet();\n\n\t\treturn ldapTemplate;\n\t}", "@Profile(\"production\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl();\r\n \r\n //Inject datasource for JDBC.\r\n// instanceDAOImpl.setDataSource(dataSource); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }", "public BlogDaoHibernateFactoryImpl() {\n\t\tsuper();\n\t}", "public void setTemplate(JdbcTemplate template) {\n\t\tthis.template = template;\n\t}", "private void initializeTemplate(StatefulKnowledgeSession session) throws Exception {\n CamelContext context = configure(session);\n this.template = context.createProducerTemplate();\n context.start();\n }", "@Before\r\n\tpublic void setUp(){\n\t\tSystem.out.println(this.context);\r\n\t\tSystem.out.println(this);\r\n\t\t//this.userdao = context.getBean(\"userDao\",UserDao.class);\r\n\t\t\r\n\r\n\t\tthis.user1 = new User(\"kimhk1\",\"김형국1\",\"kimhoung1\"); \r\n\t\tthis.user2 = new User(\"kimhk2\",\"김형국2\",\"kimhoung2\");\t\t\r\n\t\tthis.user3 = new User(\"kimhk3\",\"김형국3\",\"kimhoung3\");\t\t\r\n\t\t\r\n\t\tDataSource dataSource = new SConnectionMaker(\"jdbc:oracle:thin:@localhost:1521:ORCL\",\"scott\",\"tiger\");\r\n\t\tuserdao.setDataSource(dataSource);\r\n\t}", "@Autowired\n public void initReference(SessionFactory sessionFactory) {\n setSessionFactory(sessionFactory);\n }", "<V> IBeanContextHolder<V> createHolder(Class<V> autowiredBeanClass);", "@Autowired\n public QuartzDAOService(JdbcTemplate jdbcTemplate) {\n super();\n super.setJdbcTemplate(jdbcTemplate);\n }", "public UniqueResourcesAndLocations() {\n this.context = new ClassPathXmlApplicationContext(\"spring-dao.xml\");\n this.jtemp = (JdbcTemplate)context.getBean(\"jt\");\n\t}", "@BeforeClass\n public static void testBefore() {\n BasicDataSource dataSource = new BasicDataSource();\n dataSource.setDriverClassName(\"oracle.jdbc.OracleDriver\");\n dataSource.setUrl(\"jdbc:oracle:thin:@localhost:1521:xe\");\n dataSource.setUsername(\"scott\");\n dataSource.setPassword(\"tiger\");\n dataSource.setMaxActive(50);\n\n// <bean id = \"jdbcTemplate\n jdbcTemplate = new JdbcTemplate();\n jdbcTemplate.setDataSource(dataSource);\n\n// <bean id = \"dao2\"\n dao = new GuestDao();\n dao.setJdbcTemplate(jdbcTemplate);\n }", "private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}", "@Autowired\n public void setDataSource(DataSource dataSource) {\n this.jdbcTemplate = new JdbcTemplate(dataSource);\n this.namedJdbcTemplate = new NamedParameterJdbcTemplate(dataSource);\n }", "public void setAutowired(EntityTobeAutowired autowired) {\n\t\tthis.autowired = autowired;\n\t}", "public interface HibernateService {\n\n <T> T initializeAndUnproxy(T entity);\n}", "@Override\n public void afterPropertiesSet() {\n\n super.afterPropertiesSet();\n\n Assert.notNull(getDataSources(), \"Data sources not set\");\n\n /**\n * SettingServiceProvider setup.\n */\n setSettingService((SettingServiceProvider) getServiceFactory().makeService(SettingServiceProvider.class));\n Assert.notNull(getSettingService(), \"Settings Service Provider could be located.\");\n\n /**\n * IdGenerator setup.\n */\n setIdGenerator((IdGenerator) getServiceFactory().makeService(IdGenerator.class));\n Assert.notNull(getIdGenerator(), \"ID Generator could be located.\");\n\n /**\n * TransactionDAO setup.\n */\n setTransactionDao((JdbcTransactionDao) getServiceFactory().makeService(JdbcTransactionDao.class));\n Assert.notNull(getTransactionDao(), \"TransactionDAO could not be located.\");\n\n /**\n * PartnerDAO setup.\n */\n setPartnerDao((JdbcPartnerDao) getServiceFactory().makeService(JdbcPartnerDao.class));\n Assert.notNull(getTransactionDao(), \"PartnerDao could not be located.\");\n\n /**\n * CompressionService setup.\n */\n setCompressionService((CompressionService) getServiceFactory().makeService(CompressionService.class));\n Assert.notNull(getTransactionDao(), \"CompressionService could not be located.\");\n\n /**\n * Data Access Objects setup\n */\n HibernatePersistenceProvider provider = new HibernatePersistenceProvider();\n EntityManagerFactory emf = provider.createEntityManagerFactory(\n getDataSources().get(ARG_DS_SOURCE),\n new PluginPersistenceConfig()\n .classLoader(OrganizationDataType.class.getClassLoader())\n .debugSql(Boolean.FALSE)\n .rootEntityPackage(\"com.windsor.node.plugin.wqx.domain\")\n .setBatchFetchSize(1000));\n\n setEntityManager(emf.createEntityManager());\n\n /**\n * SubmissionHistoryDao setup\n */\n setSubmissionHistoryDao(new SubmissionHistoryDaoJpaImpl(getEntityManager()));\n\n /**\n * WqxDao setup\n */\n setWqxDao(new WqxDaoJpaImpl(getEntityManager()));\n Assert.notNull(getWqxDao(), \"WqxDao could not be located.\");\n }", "@Override\n public void crappieInit(ServletContext context) {\n\n Configuration freemarkerConfig = new Configuration();\n freemarkerConfig.setServletContextForTemplateLoading(context, \"\");\n setTemplateEngine(new FreeMarkerEngine(freemarkerConfig));\n }", "protected\r\n JpaDaoFactory()\r\n {\r\n ISessionStrategy mySessionStrategy = new JpaSessionStrategy();\r\n ITransactionStrategy myTransactionStrategy = \r\n new JpaTransactionStrategy(mySessionStrategy);\r\n\r\n setSessionStrategy(mySessionStrategy);\r\n setTransactionStrategy(myTransactionStrategy);\r\n }", "@BeforeClass\n\tpublic static void init() {\n\t\tcontext = new AnnotationConfigApplicationContext();\n\t\tcontext.scan(\"com.shuler.shoppingbackend\");\n\t\tcontext.refresh();\n\t\tcategoryDAO = (CategoryDAO) context.getBean(\"categoryDAO\");\n\t}", "@Bean\n\tpublic SpringResourceTemplateResolver templateResolver() {\n\n\t\tSystem.out.println(\"execution is reaching templateResolver()\");\n\t\tSpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver();\n\t\tresolver.setApplicationContext(applicationContext);\n\t\tresolver.setPrefix(\"/WEB-INF/views/templetes/\");\n\t\tresolver.setSuffix(\".html\");\n\t\tresolver.setTemplateMode(TemplateMode.HTML);\n\t\tresolver.setCacheable(false);\n\t\treturn resolver;\n\t}", "@Autowired\r\n public void setJdbcTemplate(DataSource dataSource) {\r\n this.jdbcTemplate = new JdbcTemplate(dataSource);\r\n }", "@Override\n\tpublic void setTemplateEngine(TemplateEngine templateEngine) {\n\n\t}", "@Autowired\n public void setDataSource( DataSource dataSource ) {\n this.simpleJdbcTemplate = new SimpleJdbcTemplate( dataSource );\n }", "@Override\n protected final void initializeSpecific() {\n initializeSpringSpecific();\n\n // Once the subclasses have had their opportunity, compute configurations belonging to SpringTemplateEngine\n super.initializeSpecific();\n\n final MessageSource messageSource =\n this.templateEngineMessageSource == null ? this.messageSource : this.templateEngineMessageSource;\n\n final IMessageResolver messageResolver;\n if (messageSource != null) {\n final SpringMessageResolver springMessageResolver = new SpringMessageResolver();\n springMessageResolver.setMessageSource(messageSource);\n messageResolver = springMessageResolver;\n } else {\n messageResolver = new StandardMessageResolver();\n }\n\n super.setMessageResolver(messageResolver);\n\n }", "@Inject\n CustomerRepositoryImpl(@CurrentSession EntityManager entityManager, ApplicationConfiguration applicationConfiguration) {\n this.entityManager = entityManager;\n this.applicationConfiguration = applicationConfiguration;\n }", "@Autowired\r\n\tpublic GsysFunctionServiceImpl(HibernateDao HibernateDao) {\r\n\t\tsuper(HibernateDao, GsysFunction.class);\r\n\t}", "@BeforeClass\n\tpublic static void prepare() {\n\t\t final ApplicationContext ctx = new\n\t\t ClassPathXmlApplicationContext(\"file:src/main/webapp/WEB-INF/employee-servlet.xml\");\n\t\temployeeDAO = ctx.getBean(\"employeeDAO\", EmployeeDAO.class);\n\t}", "@Bean(name = \"arbafDao\")\n\tpublic JdbcTemplate arbafDao() {\n\t\treturn new JdbcTemplate(this.getArbafDataSource());\n\t}", "@Before\n public void setUp() {\n this.context = new AnnotationConfigApplicationContext(\"com.fxyh.spring.config\");\n// this.context = new ClassPathXmlApplicationContext(\"classpath*:applicationContext-bean.xml\");\n this.user = this.context.getBean(User.class);\n this.user2 = this.context.getBean(User.class);\n this.department = this.context.getBean(Department.class);\n this.userService = (UserService) this.context.getBean(\"userService\");\n }", "@Autowired\r\n public void setSessionFactory(SessionFactory sessionFactory) {\r\n this.sessionFactory = sessionFactory;\r\n }", "@Autowired\n public void setUserDao(UserDao userDao) {\n this.userDao = userDao;\n }", "@Bean(name=\"ticketService\")\n public TicketService getTicketService() {\n int rowNum = Integer.valueOf(env.getProperty(\"rowNum\"));\n int columnNum = Integer.valueOf(env.getProperty(\"columnNum\"));\n TicketService ticketService = new TicketServiceImpl(rowNum, columnNum);\n return ticketService;\n }", "@Autowired()\n\tpublic PostDao(SessionFactory sessfact) {\n\t\tthis.sessfact = sessfact;\n\t}", "protected ETLLogDAOImpl(Configuration config) {\r\n config.addClass(ETLLog.class);\r\n factory = config.buildSessionFactory();\r\n }", "@Resource\n\t@Override\n\tpublic void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {\n\t\tsuper.setSqlSessionFactory(sqlSessionFactory);\n\t}", "public TemplateFactoryImpl()\n {\n super();\n }", "@Bean\n @Scope(\"prototype\")\n public JdbcTemplate jdbcTemplate(DruidDataSource datasourceRouter){\n return new JdbcTemplate(datasourceRouter);\n }", "@Profile(\"development\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getDevLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl(); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }", "public void afterPropertiesSet() {\n checkNotNull(sqlSessionTemplate, \"A SqlSessionFactory or a SqlSessionTemplate is required.\");\n checkArgument(ExecutorType.BATCH == sqlSessionTemplate.getExecutorType(),\n \"SqlSessionTemplate's executor type must be BATCH\");\n }", "public TracingWrappedJdbcTemplate() {\n\t}", "public HibernateDao(Class<T> modelClass) {\n\t\tthis.modelClass = modelClass;\n\t}", "public void setTemplate(Template template)\n/* */ {\n/* 62 */ this.template = template;\n/* */ }", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "@Bean\n @Scope(\"prototype\")\n public NamedParameterJdbcTemplate namedParameterJdbcTemplate(DruidDataSource datasourceRouter){\n return new NamedParameterJdbcTemplate(datasourceRouter);\n }", "public void generateHibernateConfigOpening()\n {\n String outputFileName = nameToFileNameInRootGenerationDir(mappingFileName, mappingDirName);\n\n // Instantiate the template to generate from.\n ST stringTemplate = hibernateOnlineTemplates.getInstanceOf(FILE_OPEN_TEMPLATE);\n stringTemplate.add(\"catalogue\", model);\n\n fileOutputHandlerOverwrite.render(stringTemplate, outputFileName);\n }", "@Before\r\n public void before() {\n AnnotationConfiguration configuration = new AnnotationConfiguration();\r\n configuration.addAnnotatedClass(Customer.class).addAnnotatedClass(OrderLine.class).addAnnotatedClass(Product.class).addAnnotatedClass(SalesOrder.class);\r\n configuration.setProperty(\"hibernate.dialect\", \"org.hibernate.dialect.MySQL5Dialect\");\r\n configuration.setProperty(\"hibernate.connection.driver_class\", \"com.mysql.jdbc.Driver\");\r\n configuration.setProperty(\"hibernate.connection.url\", \"jdbc:mysql://localhost:3306/order_management_db\");\r\n configuration.setProperty(\"hibernate.connection.username\", \"root\");\r\n sessionFactory = configuration.buildSessionFactory();\r\n session = sessionFactory.openSession();\r\n }", "@Override\n protected void configure() {\n bind(ApplicationContext.class).toInstance(ctxt);\n }", "public abstract void setTemplId(Integer templId);", "void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;", "public LitTemplateInitializer(LitTemplate template, VaadinService service) {\n this.template = template;\n\n boolean productionMode = service.getDeploymentConfiguration()\n .isProductionMode();\n\n Class<? extends LitTemplate> templateClass = template.getClass();\n\n ParserData data = null;\n if (productionMode) {\n data = CACHE.get(templateClass);\n }\n if (data == null) {\n data = new LitTemplateDataAnalyzer(templateClass).parseTemplate();\n }\n parserData = data;\n }", "@BeforeEach\n void setUp() {\n Configuration configuration = new Configuration();\n configuration.addAnnotatedClass(SitterController.class);\n configuration.setProperty(\"hibernate.dialect\", \"org.hibernate.dialect.H2Dialect\");\n configuration.setProperty(\"hibernate.connection.driver_class\", \"org.h2.Driver\");\n String urlConfigValue = \"jdbc:h2:mem:test;\";\n String urlConfigMode = \"MODE=Mysql;\";\n String urlConfigInit = \"INIT=CREATE SCHEMA IF NOT EXISTS ROVERREVIEWS\";\n String urlConfigs = urlConfigValue + urlConfigMode + urlConfigInit;\n configuration.setProperty(\"hibernate.connection.url\", urlConfigs);\n configuration.setProperty(\"hibernate.hbm2ddl.auto\", \"create\");\n configuration.addAnnotatedClass(Sitter.class);\n sessionFactory = configuration.buildSessionFactory();\n session = sessionFactory.openSession();\n }", "private HibernateController(){}", "@Autowired\n\t public FlightSeatRepositoryImpl(EntityManagerFactory factory) {\n\t\t if(factory.unwrap(SessionFactory.class) == null){\n\t\t\t throw new NullPointerException(\"factory is not a hibernate factory\");\n\t\t }\n\t\t this.sessionFactory = factory.unwrap(SessionFactory.class);\n\t }", "@Autowired\n\t@Override\n\tpublic void setBaseMapper() {\n\t\tthis.baseMapper=trxMapper;\n\t}", "@Before\r\n public void initDb() throws Exception {\n mDatabase = Room.inMemoryDatabaseBuilder(ApplicationProvider.getApplicationContext(),\r\n MyDatabase.class)\r\n // allowing main thread queries, just for testing\r\n .allowMainThreadQueries()\r\n .build();\r\n\r\n mTemplateDao = mDatabase.templateDao();\r\n }", "@Autowired\r\n\tpublic GsysOperatelogServiceImpl(HibernateDao HibernateDao) {\r\n\t\tsuper(HibernateDao, GsysOperatelog.class);\r\n\t}", "private void initDomainRedisTemplate(RedisTemplate<String, Object> redisTemplate, RedisConnectionFactory factory) {\n // If Serializer is not configured, String is used by default for storage, and if it is stored in User type, the error User can't cast to is prompted.\n // String!\n redisTemplate.setKeySerializer(new StringRedisSerializer());\n redisTemplate.setHashKeySerializer(new StringRedisSerializer());\n redisTemplate.setHashValueSerializer(new GenericJackson2JsonRedisSerializer());\n redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());\n // Open a transaction\n redisTemplate.setEnableTransactionSupport(true);\n redisTemplate.setConnectionFactory(factory);\n }", "@Bean\n public RedisTemplate<String, Object> redisTemplate() {\n RedisTemplate<String,Object> redisTemplate = new RedisTemplate<String, Object>();\n redisTemplate.setConnectionFactory(lettuceConnectionFactory());\n redisTemplate.afterPropertiesSet();\n return redisTemplate;\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tfactory = Persistence.createEntityManagerFactory(\"Test\");\n\t\tServletContext sc = arg0.getServletContext();\n\t\tsc.setAttribute(EntityManagerFactory.class.getName(), factory);\n\t}", "protected void initDaosFromSpringBeans() {\n this.waitUntilApplicationContextIsReady();\n final String[] beanNamesToLoad = this.m_applicationContext\n .getBeanNamesForType(GenericDao.class);\n for (final String name : beanNamesToLoad) {\n if (!PatternMatchUtils.simpleMatch(this.m_daoNamePattern, name)) {\n // Doesn't match - so skip it.\n continue;\n }\n final GenericDao<?> dao = (GenericDao<?>) this.m_applicationContext.getBean(name);\n // avoid adding a DAO again\n if (!this.m_daos.values().contains(dao)) {\n this.initDao(dao);\n this.m_daos.put(dao.getPersistentClass(), dao);\n }\n }\n }", "@BeforeClass\n public static void initTestClass() throws Exception {\n Map props = MapUtil.mapIt(\"hibernate.connection.url\", \"jdbc:mysql://localhost:3306/event_test\");\n SnowTestSupportNG.initWebApplication(\"src/main/webapp\", props);\n\n inView = appInjector.getInstance(HibernateSessionInViewHandler.class);\n categoryDao = appInjector.getInstance(CategoryDao.class);\n }", "@SuppressWarnings(\"rawtypes\")\r\n\t@Override\r\n\tpublic void configure(Element metadata, Dictionary configuration) throws ConfigurationException {\r\n\t\t// Get factory name\r\n\t\tElement[] elements = metadata.getElements(\"Transactional\", \"org.krakenapps.jpa.handler\");\r\n\t\tif (elements != null && elements.length > 0) {\r\n\t\t\tElement transactionalElement = elements[0];\r\n\t\t\tfactoryName = transactionalElement.getAttribute(\"name\");\r\n\t\t}\r\n\r\n\t\t// try external handler annotation\r\n\t\tif (factoryName == null) {\r\n\t\t\tElement[] el = metadata.getElements(\"JpaConfig\", \"org.krakenapps.jpa.handler\");\r\n\t\t\tif (el == null || el.length == 0)\r\n\t\t\t\tthrow new IllegalStateException(\"@JpaConfig configuration not found.\");\r\n\r\n\t\t\tElement entityManagerFactoryElement = el[0];\r\n\t\t\tfactoryName = entityManagerFactoryElement.getAttribute(\"factory\");\r\n\t\t}\r\n\r\n\t\tObject o = getInstanceManager().getPojoObject();\r\n\t\tpojoClassName = o.getClass().getName();\r\n\r\n\t\tlogger.trace(\"JPA: using [\" + factoryName + \"] entity manager factory for [{}].\", pojoClassName);\r\n\r\n\t\tfor (Method m : o.getClass().getDeclaredMethods()) {\r\n\t\t\tTransactional t = m.getAnnotation(Transactional.class);\r\n\t\t\tif (t != null) {\r\n\t\t\t\tlogger.trace(\"JPA: transactional method detected: \" + m.getName());\r\n\r\n\t\t\t\tString[] parameterTypes = getMethodParameterTypes(m);\r\n\r\n\t\t\t\tMethodMetadata mm = getPojoMetadata().getMethod(m.getName(), parameterTypes);\r\n\t\t\t\tif (mm != null) {\r\n\t\t\t\t\tlogger.trace(\"JPA: annotated method injected: \" + getMethodSignature(m));\r\n\r\n\t\t\t\t\tmethodFactoryMap.put(m, t.value());\r\n\t\t\t\t\tgetInstanceManager().register(mm, this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\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} 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}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}", "public SqlSessionFactory get();", "public interface Dao {\n\tpublic void setMySessionFactory(SessionFactory sf);\n}", "public void init() \n { Prepare the FreeMarker configuration;\n // - Load templates from the WEB-INF/templates directory of the Web app.\n //\n cfg = new Configuration();\n cfg.setServletContextForTemplateLoading(\n getServletContext(), \n \"WEB-INF/templates\"\n );\n }", "@Autowired\n\tpublic EmployeeDAOHibernateImpl(EntityManager entityManager) {\n\t\tthis.entityManager = entityManager;\n\t}", "@Before\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void setUp() {\n\t\tfactoryBean = new Neo4jRepositoryFactoryBean(ContactRepository.class);\n\t\tfactoryBean.setSession(session);\n\t\tfactoryBean.setMappingContext(context);\n\t}" ]
[ "0.738842", "0.70753247", "0.6959136", "0.69110256", "0.69110256", "0.69110256", "0.69110256", "0.6415484", "0.6412956", "0.6412956", "0.6412956", "0.6412956", "0.6401928", "0.635612", "0.6067651", "0.5633348", "0.56082296", "0.5603509", "0.55645806", "0.5509807", "0.54778266", "0.54778266", "0.5453133", "0.5421621", "0.5399839", "0.5387657", "0.53788775", "0.5365008", "0.533276", "0.5325162", "0.52749085", "0.52703166", "0.52332276", "0.5221716", "0.5214308", "0.52086395", "0.5200222", "0.5194601", "0.5190737", "0.5186619", "0.518525", "0.51716155", "0.5142925", "0.51373476", "0.5119522", "0.5116168", "0.5099262", "0.5089609", "0.5077694", "0.5070645", "0.50696313", "0.50660574", "0.5034588", "0.5005139", "0.499253", "0.49830094", "0.4977099", "0.4970433", "0.49477133", "0.49411657", "0.49297687", "0.49271765", "0.49241662", "0.49114648", "0.4908581", "0.4872757", "0.48438537", "0.48339188", "0.48129353", "0.48107263", "0.48100275", "0.48039344", "0.47860065", "0.47850728", "0.47525463", "0.4752242", "0.47473988", "0.47465318", "0.47380364", "0.47376588", "0.47293827", "0.47151726", "0.47087532", "0.4700938", "0.469155", "0.46876767", "0.4687471", "0.46854997", "0.46851635", "0.46849403", "0.4680998", "0.46801984", "0.4679106", "0.4676971", "0.46742922", "0.46734703", "0.4673065", "0.46723038", "0.46570596", "0.46511197" ]
0.644775
7
To get a Emp Contact detail based on Emp id
@Override public EmpContactDetail getEmpContactDetailByID(int id) { return template.get(EmpContactDetail.class, new Integer(id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(API_ROUTE + \"/contactos-empleado/{emp_id}\")\n Call<List<Persona>> getContactsByEmployeeId(@Path(\"emp_id\") long emp_id);", "@Override\n\tpublic EmpContactDetail getEmpContactDetailByID(int id) {\n\t\treturn this.empContactDetailDAO.getEmpContactDetailByID(id);\n\t}", "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn template.loadAll(EmpContactDetail.class);\n\t}", "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn this.empContactDetailDAO.listEmpContactDetails();\n\t}", "public Employeedetails getEmployeeDetailByName(String employeeId);", "@Override\n\tpublic Empdetails getemp(int empid) {\n\t\treturn empDAO.getemp(empid);\n\t}", "public Contact getContactById(int contactId);", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Override\n\tpublic Empdetails findById(int empid) {\n\t\t\t\treturn empDAO.findById(empid);\n\t}", "EmployeeDetail getById(long identifier) throws DBException;", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.GET)\r\n\tpublic Employee getEmployeedetails(@PathVariable int empId) throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.getEmployee(empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(204, e.getMessage());\r\n\t\t}\r\n\t}", "IContact getContactById(String contactId);", "@Override\n\tpublic Emp findbyId(int eid) {\n\t\treturn eb.findbyId(eid);\n\t}", "public void getByIdemployee(int id){\n\t\tEmployeeDTO employee = getJerseyClient().resource(getBaseUrl() + \"/employee/\"+id).get(EmployeeDTO.class);\n\t\tSystem.out.println(\"Nombre: \"+employee.getName());\n\t\tSystem.out.println(\"Apellido: \"+employee.getSurname());\n\t\tSystem.out.println(\"Direccion: \"+employee.getAddress());\n\t\tSystem.out.println(\"RUC: \"+employee.getRUC());\n\t\tSystem.out.println(\"Telefono: \"+employee.getCellphone());\n\t}", "public String enameGet(String emp_id) throws Exception;", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "@Override\n\tpublic Contact getContactById(Integer cid) {\n\n\t\tContact c = null;\n\n\t\tOptional<ContactDetailsEntity> optional = contactRepositeries.findById(cid);\n\t\tif (optional.isPresent()) {\n\t\t\tContactDetailsEntity entity = optional.get();\n\t\t\tc = new Contact();\n\t\t\tBeanUtils.copyProperties(entity, c);\n\t\t}\n\t\treturn c;\n\t}", "Optional<Contact> getContact(long id);", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchemployee\")\n\tpublic ModelAndView getEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"ShowEmployeeDetails.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "@Override\n\tpublic List<Booking> getDetails(String empid) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"from Booking where employeeId=\"+empid);\n\t\treturn query.list();\n\t}", "public void getEmailIdDetails(ArrayList<Address> forEmailDetails,int personId)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sqlQuery=\"\";\n\t\tArrayList<EmailId> addressList = new ArrayList<EmailId>();\n\t\tEmailId addressObj;\n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t\t sqlQuery = \"select * from email_id_info where person_id=?\";\n\t\t\t \n\t\t stmt = conn.prepareStatement(sqlQuery);\n\t\t stmt.setInt(1, personId);\n\n\t\t rs = stmt.executeQuery();\n\t\t \n\t\t while (rs.next()) {\n\t\t \t addressObj = new EmailId(rs.getString(1),rs.getString(3));\n\t\t \t addressList.add(addressObj);\n\t\t \t \n\t\t }\n\t\t try\n\t\t {\n\t\t \t for (int i = 0; i < forEmailDetails.size(); i++) {\n\t\t\t \t forEmailDetails.get(i).setEmailAddressId(addressList.get(i).getEmailIdKey());\n\t\t\t \t forEmailDetails.get(i).setEmailAddress(addressList.get(i).getEmailId());\n\t\t\t\t} \n\t\t }\n\t\t catch(Exception e)\n\t\t {\n\t\t \t System.out.println(\"Size Miss match in Table Email Address\");\n\t\t }\n\t\t \n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Searching Person Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(rs!=null)\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t}", "public void fetchEmployeeDetailsByEmployeeId(EmpCredit empCredit, HttpServletRequest request, String employeeId, boolean editFlag){\r\n\t\ttry {\r\n\t\t\tString empDetailQuery = \"SELECT HRMS_CENTER.CENTER_NAME, HRMS_RANK.RANK_NAME, NVL(SALGRADE_TYPE,' '),\"\r\n\t\t\t\t\t+ \" SALGRADE_CODE, HRMS_EMP_OFFC.EMP_ID, HRMS_SALARY_MISC.GROSS_AMT,\"\r\n\t\t\t\t\t+ \" DECODE(HRMS_SALARY_MISC.SAL_EPF_FLAG,'Y','true','N','false'), NVL(SAL_ACCNO_REGULAR,' '),\" \r\n\t\t\t\t\t+ \" NVL(SAL_PANNO,' '), NVL(DEPT_NAME,' '), DEPT_ID , NVL(TO_CHAR(EMP_REGULAR_DATE,'DD-MM-YYYY'),' '),\"\r\n\t\t\t\t\t+ \" NVL(CADRE_NAME,' '), HRMS_EMP_OFFC.EMP_CADRE \" \r\n\t\t\t\t\t+ \" FROM HRMS_EMP_OFFC \" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_RANK ON (HRMS_RANK.RANK_ID=HRMS_EMP_OFFC.EMP_RANK)\" \r\n\t\t\t\t\t+ \" INNER JOIN HRMS_CENTER ON (HRMS_EMP_OFFC.EMP_CENTER = HRMS_CENTER.CENTER_ID)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_TITLE ON (HRMS_EMP_OFFC.EMP_TITLE_CODE = HRMS_TITLE.TITLE_CODE)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_DEPT ON (HRMS_DEPT.DEPT_ID = HRMS_EMP_OFFC.EMP_DEPT )\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_CADRE ON (HRMS_CADRE.CADRE_ID = HRMS_EMP_OFFC.EMP_CADRE)\"\r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALGRADE_HDR ON(HRMS_EMP_OFFC.EMP_SAL_GRADE=HRMS_SALGRADE_HDR.SALGRADE_CODE)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_SALARY_MISC ON(HRMS_SALARY_MISC.EMP_ID = HRMS_EMP_OFFC.EMP_ID)\" \r\n\t\t\t\t\t+ \" LEFT JOIN HRMS_FORMULABUILDER_HDR ON(HRMS_FORMULABUILDER_HDR.FORMULA_ID = HRMS_SALARY_MISC.FORMULA_ID)\" \r\n\t\t\t\t\t+ \" WHERE HRMS_EMP_OFFC.EMP_ID=\"+employeeId;\r\n\t\t\r\n\t\t\tObject empDetailObj[][] = getSqlModel().getSingleResult(empDetailQuery);\r\n\t\t\t\r\n\t\t\tif(empDetailObj!=null && empDetailObj.length>0){\r\n\t\t\t\t\r\n\t\t\t\tempCredit.setEmpCenter(String.valueOf(empDetailObj[0][0]));\r\n\t\t\t\tempCredit.setEmpRank(String.valueOf(empDetailObj[0][1]));\r\n\t\t\t\tempCredit.setGradeName(String.valueOf(empDetailObj[0][2]));\r\n\t\t\t\tempCredit.setGradeId(String.valueOf(empDetailObj[0][3]));\r\n\t\t\t\tempCredit.setEmpId(String.valueOf(empDetailObj[0][4]));\r\n\t\t\t\tempCredit.setGrsAmt(String.valueOf(empDetailObj[0][5]));\r\n\t\t\t\tempCredit.setPfFlag(String.valueOf(empDetailObj[0][6]));\r\n\t\t\t\tempCredit.setEmpAccountNo(String.valueOf(empDetailObj[0][7]));\r\n\t\t\t\tempCredit.setEmpPanNo(String.valueOf(empDetailObj[0][8]));\r\n\t\t\t\tempCredit.setEmpDeptName(String.valueOf(empDetailObj[0][9]));\r\n\t\t\t\tempCredit.setEmpDeptId(String.valueOf(empDetailObj[0][11]));\r\n\t\t\t\tempCredit.setJoiningDate(String.valueOf(empDetailObj[0][11]));\r\n\t\t\t\tempCredit.setEmpGradeName(String.valueOf(empDetailObj[0][12]));\r\n\t\t\t\tempCredit.setEmpGradeId(String.valueOf(empDetailObj[0][13]));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tshowEmp(empCredit, request, employeeId, editFlag);\r\n\t}", "@Override\r\n\tpublic Employee getEmployee(int id) {\n\t\treturn employees.stream().filter(emp -> emp.getEmpId()==(id)).findFirst().get();\r\n\t}", "ApplicantDetailsResponse getApplicantDetailsById(Integer employeeId) throws ServiceException;", "public void displayAllContacts() {\n\n for (int i = 0; i < contacts.size(); i ++) {\n\n Contact contact = contacts.get(i);\n\n System.out.println(\" Name: \" + contact.getName());\n System.out.println(\" Title: \" + contact.getTitle());\n System.out.println(\" ID #: \" + contact.getID());\n System.out.println(\" Hoursrate: \" + contact.getHoursrate());\n System.out.println(\" Workhours \" + contact.getWorkhours());\n System.out.println(\"-------------\");\n\n\n\n Employee one = new Employee(\"A\", \"A\", \"A\", \"A\"); // I give it some contact information first.\n Employee two = new Employee(\"Bob\", \"Bob\", \"A\", \"A\");\n\n\n\n\n\n\n}\n\n\n//***************************************************************", "@RequestMapping(\"/{cId}/contact\")\n\tpublic String showContactDetail(@PathVariable(\"cId\") Integer cId,Model model,Principal principal) {\n\t\tSystem.out.println(\"CID \"+cId);\n\t\t\n\t\tOptional<Contact> contactOptional = this.contactRepository.findById(cId);\t\t\n\t\tContact contact = contactOptional.get();\n\t\t\n\t\t//\n\t\tString userName = principal.getName();\n\t\tUser user = this.userRepository.getUserByUserName(userName);\n\t\t\n\t\tif(user.getId()==contact.getUser().getId()) {\n\t\t\tmodel.addAttribute(\"contact\",contact);\t\n\t\t\tmodel.addAttribute(\"title\",contact.getName());\n\t\t}\n\t\treturn \"normal/contact_detail\";\n\t}", "public String empNameGet(String id, SessionFactory connection){\r\n\t\r\n\t\t\tString empName = null;\r\n\t\t\tCommonOperInterface cbt = new CommonConFactory().createInterface();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t//qry.append(\");\r\n\t\t\t\tList dataListEcho=\tcbt.executeAllSelectQuery(\"SELECT emp.empName, emp.mobOne, dept.deptName FROM employee_basic AS emp INNER JOIN department AS dept ON emp.deptname= dept.id where emp.id =\"+id+\"\".toString(), connection);\r\n\t\t\t\t//dataList = cbt.executeAllSelectQuery(query.toString(), connectionSpace);\r\n\t\t\r\n\t\t\t\tif (dataListEcho != null && dataListEcho.size() > 0)\r\n\t\t\t\t{\r\n\t\t\r\n\t\t\t\t\tfor (Iterator iterator = dataListEcho.iterator(); iterator.hasNext();)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t Object[] object = (Object[]) iterator.next();\r\n\t\t\t\t\t\t //machineSerialList.put(object[0].toString(), object[1].toString());\r\n\t\t\t\t\t\t empName = object[0].toString()+\"#\"+object[1].toString()+\"#\"+object[2].toString();\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\tcatch (SQLGrammarException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn empName;\r\n\t\r\n\t}", "@Override\n\tpublic EmployeeBean getEmployeeDetails(Integer id) throws Exception {\n\t\treturn employeeDao.getEmployeeDetails(id);\n\t}", "private Optional<Contact> findContact(AthenzTenant tenant) {\n if (!tenant.propertyId().isPresent()) {\n return Optional.empty();\n }\n List<List<String>> persons = organization.contactsFor(tenant.propertyId().get())\n .stream()\n .map(personList -> personList.stream()\n .map(User::displayName)\n .collect(Collectors.toList()))\n .collect(Collectors.toList());\n return Optional.of(new Contact(organization.contactsUri(tenant.propertyId().get()),\n organization.propertyUri(tenant.propertyId().get()),\n organization.issueCreationUri(tenant.propertyId().get()),\n persons));\n }", "public static Entity getSpecificEmployee(Employee emp){\n\t\tif(emp == null){\n\t\t\treturn null;\n\t\t} \n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tLong id = emp.getId();\n\t\tKey key = KeyFactory.createKey(\"Employee\", id);\n\t\ttry {\n\t\t\tEntity ent = datastore.get(key);\n\t\t\treturn ent;\n\t\t} catch (EntityNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public int getEmpId() {\n return id;\n }", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "@GetMapping(\"/employebyid/{empId}\")\n\t public ResponseEntity<Employee> getEmployeeById(@PathVariable int empId)\n\t {\n\t\tEmployee fetchedEmployee = employeeService.getEmployee(empId);\n\t\tif(fetchedEmployee.getEmpId()==0)\n\t\t{\n\t\t\tthrow new InvalidEmployeeException(\"No employee found with id= : \" + empId);\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn new ResponseEntity<Employee>(fetchedEmployee,HttpStatus.OK);\n\t\t}\n }", "public Employee findEmployee(Long id);", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "public Employee getByID(int empId) {\n\t\tEmployee e = employees.get(empId);\n\t\tSystem.out.println(e);\n\t\treturn e;\n\t}", "public List<String> getContactosEmpresa(String idEmpresa) {\n List<String> contactos = new ArrayList<>();\n String contacto;\n\n try{\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Contacto FROM Contactos \" +\n \"WHERE Empresa_ID = \" + idEmpresa);\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n contacto = rs.getString(\"Contacto\");\n contactos.add(contacto);\n }\n }\n catch (Exception e){\n e.getMessage();\n }\n finally {\n con.close(connection);\n }\n return contactos;\n }", "public static String getContactNameById(Integer _id, Context context){\n\t\t\n\t\t\t//Map<String, String> result = new HashMap<String, String>();\n\n\t \tString cid = _id.toString(); \n\t\t \t//String contactNumber = \"\";\n\t\t \tString contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t //String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n\t\n\t //if(Integer.parseInt(cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0)\n\t //{\n\t\t\n\t\t\n\t \t//Log.e(\"PARSER\", \"2\");\n\t \t\n\t \tcontactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\t \t//contactName = cursor.getString(ContactsQuery.DISPLAY_NAME);\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ _id.toString() }, null);\n while (pCur.moveToNext()){\n \t\n \t\n // contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n \n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactName);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactName;\n\t}", "protected CompaniesContactsEntity findById(int id) {\n log.info(\"CompaniesContact => method : findById()\");\n\n FacesMessage msg;\n\n if (id == 0) {\n log.error(\"CompaniesContact ID is null\");\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"note.notExist\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n throw new EntityNotFoundException(\n \"L ID de la note est incorrect\",\n ErrorCodes.COMPANY_NOT_FOUND\n );\n }\n\n EntityManager em = EMF.getEM();\n Optional<CompaniesContactsEntity> optionalCompaniesContactsEntity;\n try {\n optionalCompaniesContactsEntity = companiesContactsDao.findById(em, id);\n } finally {\n em.clear();\n em.close();\n }\n return optionalCompaniesContactsEntity.orElseThrow(() ->\n new EntityNotFoundException(\n \"Aucune Note avec l ID \" + id + \" n a ete trouvee dans la BDD\",\n ErrorCodes.CONTACT_NOT_FOUND\n ));\n }", "private Contact getEmployeePayrollData(String name) {\n\t\treturn this.employeePayrollList.stream().filter(contactItem -> contactItem.name.equals(name)).findFirst()\n\t\t\t\t.orElse(null);\n\t}", "ProEmployee selectByPrimaryKey(String id);", "public Employee getEmployeeDetailById(int id) {\n\t\treturn dao.getEmployeeDetailById(id);\n\t}", "public static Contact getContact(String user, long id) {\n Contact contact = Contact.find().byId(id);\n if (contact == null) {\n throw new RuntimeException(\"Contact ID not found: \" + id);\n }\n UserInfo userInfo = contact.getUserInfo();\n if (!user.equals(userInfo.getEmail())) {\n throw new RuntimeException(\"User is not same one store with the contect.\");\n }\n return contact;\n }", "protected List<CompaniesContactsEntity> findByIdContacts(int id) {\n log.info(\"CompaniesContactsBean => method : findByIdContacts()\");\n FacesMessage facesMessage;\n\n if (id == 0) {\n log.error(\"Contact ID is null\");\n facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"contact.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\n return null;\n }\n\n EntityManager em = EMF.getEM();\n try {\n return companiesContactsDao.findByIdContacts(em, id);\n } catch (Exception ex) {\n log.info(\"Nothing\");\n throw new EntityNotFoundException(\n \"Aucun contact avec l ID \" + id + \" n'a été trouvé dans la DB\",\n ErrorCodes.CONTACT_NOT_FOUND\n );\n } finally {\n em.clear();\n em.close();\n }\n }", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchadminemployee\")\n\tpublic ModelAndView gettEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"adminemployeedelete.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "public String getEmployeeMangerDetails(Employeedetails employeedetails);", "@RequestMapping(value = \"/contact/list/{id}\", method = RequestMethod.GET)\n public Contact contactGetById(@PathVariable Long id) {\n Contact contact = contactService.list(id);\n return contact;\n }", "@RequestMapping(value = \"/pgmsElpcBankInfo/{empInfoId}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public HrEmpBankAccountInfo getPgmsElpcBankInfoByemployeeInfoId(@PathVariable long empInfoId) {\n log.debug(\"REST request to get pgmsElpcBankInfo : empInfoId: {}\", empInfoId );\n HrEmpBankAccountInfo elpcBankInfo = hrEmpBankAccountInfoRepository.findByEmployeeInfo(empInfoId);\n return elpcBankInfo;\n }", "public Employee getEmployeeByID(int id) {\n\t\t\r\n\t\ttry {\r\n\t\t\tEmployee f = temp.queryForObject(\"Select * from fm_employees where EID =?\",new EmployeeMapper(),id);\r\n\t\t\treturn f;\r\n\t\t} catch (EmptyResultDataAccessException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "List<CompanyEmployeeDTO> findAllByCompanyId(Long id);", "public static Contact getContact(long id) {\n Contact contact = contacts.get(id);\n if (contact == null) {\n throw new RuntimeException(\"Can't find contact with given id.\");\n }\n return contact;\n }", "@GetMapping(value=\"/employes/{Id}\")\n\tpublic Employee getEmployeeDetailsByEmployeeId(@PathVariable Long Id){\n\t\t\n\t\tEmployee employee = employeeService.fetchEmployeeDetailsByEmployeeId(Id);\n\t\t\n\t\treturn employee;\n\t\t}", "@Override\n\tpublic Employee getEmployeeById(int emp_id) {\n\t\tlog.debug(\"EmplyeeService.getEmployeeById(int emp_id) return Employee object with id\" + emp_id);\n\t\treturn repositary.findById(emp_id);\n\t}", "public static String getPhoneById(String cid, Context context){\n\t\t\n\n\t\t \tString contactNumber = \"\";\n\t\t \t//String contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t\n\t \t//contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ cid }, null);\n while (pCur.moveToNext()){\n \t\n \t\n contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contactNumber = contactNumber.replaceAll(\" \", \"\");\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactNumber);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactNumber;\n\t}", "private static HashMap<String, Object> fetchEmergencyContactData(HashMap<String, Object> parameterMap) {\n\t\tPsEmergencyContact psEmergencyContact = PsEmergencyContact.findPrimaryByEmployeeId((String)parameterMap.get(\"employeeId\"));\n\t\tif(psEmergencyContact != null) {\n \t\tif(psEmergencyContact.getContactName() != null) {\n \t\t\tpsEmergencyContact.setContactName(psEmergencyContact.getContactName().trim().toUpperCase().replaceAll(\"'\", \"''\"));\n \t\t}\n \t\tpsEmergencyContact.setPhone(psEmergencyContact.getPhone() != null ? psEmergencyContact.getPhone().trim().replaceAll(\"[^a-zA-Z0-9] \", \"\") : psEmergencyContact.getPhone());\n \t\tpsEmergencyContact.setRelationship(formatRelationship(psEmergencyContact.getRelationship()));\n \t\tparameterMap.put(\"emergencyContactName\", psEmergencyContact.getContactName());\n \t\tparameterMap.put(\"emergencyContactPhone\", psEmergencyContact.getPhone());\n \t\tparameterMap.put(\"emergencyContactRelation\", psEmergencyContact.getRelationship());\n\t\t}\n\t\treturn parameterMap;\n\t}", "@RequestMapping(value = \"/HrRetirmntNminesInfos/{empId}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<HrNomineeInfo> getHrNomineeInfoByemployeeInfoId(@PathVariable long empId) {\n log.debug(\"REST request to get HrRetirmntNminesInfos : empId: {}\", empId );\n List<HrNomineeInfo> hrNomineInfos = hrNomineeInfoRepository.findAllByEmployeeInfo(empId);\n return hrNomineInfos;\n }", "public Employee getEmployeeById(String id) {\r\n for(int i = 0; i < companyDirectory.size(); i++) {\r\n\t for(int j = 0; j < companyDirectory.get(i).getLocations().size(); j++) {\r\n\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++) {\t\t\r\n\t\t if(companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId().equals(id)) \r\n\t\t \treturn companyDirectory.get(i).getLocations().get(j).getEmployees().get(k);\r\n\t\t }\r\n\t\t}\r\n\t }\r\n return null;\r\n\t}", "@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}", "List<Employee> allEmpInfo();", "@GET\n\t@Path(\"{empID}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getById(@PathParam(\"empID\") int id) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tGenericEntity<List<EmployeeVO>> generic = new GenericEntity<List<EmployeeVO>>(employeeFacade.findById(id)) {};\n\t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", CorsFilter.DEFAULT_ALLOWED_ORIGINS).entity(generic).build();\n\t}", "Contact getContact(int id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_CONTACTS, new String[]{KEY_ID,\n KEY_NAME, KEY_AUDIOS, KEY_CAPTURED_IMAGE, KEY_CONTENTS, KEY_DELETE_VAR, KEY_GALLERY_IMAGE, KEY_RRECYCLE_DELETE, KEY_PHOTO}, KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n Contact contact = new Contact(cursor.getInt(0),\n cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getInt(5), cursor.getString(6), cursor.getInt(7), cursor.getString(8));\n // return contact\n return contact;\n }", "public void showEmp(EmpCredit empCredit, HttpServletRequest request, String empId, boolean editFlag){\r\n\t\t\r\n\t\tString empctcQuery = \"SELECT NVL(HRMS_SALARY_MISC.CTC,0), HRMS_SALARY_MISC.FORMULA_ID, NVL(HRMS_FORMULABUILDER_HDR.FORMULA_NAME,' '), NVL(SALGRADE_TYPE,' '), HRMS_SALGRADE_HDR.SALGRADE_CODE, NVL(GROSS_AMT,0) \"\r\n\t\t\t+ \" FROM HRMS_EMP_OFFC \" \r\n\t\t\t+ \" LEFT JOIN HRMS_SALGRADE_HDR ON(HRMS_EMP_OFFC.EMP_SAL_GRADE=HRMS_SALGRADE_HDR.SALGRADE_CODE)\" \r\n\t\t\t+ \" LEFT JOIN HRMS_SALARY_MISC ON(HRMS_SALARY_MISC.EMP_ID = HRMS_EMP_OFFC.EMP_ID) \" \r\n\t\t\t+ \" LEFT JOIN HRMS_FORMULABUILDER_HDR ON(HRMS_FORMULABUILDER_HDR.FORMULA_ID = HRMS_SALARY_MISC.FORMULA_ID)\" \r\n\t\t\t+ \" WHERE HRMS_EMP_OFFC.EMP_ID=\"\r\n\t\t\t+empId;\r\n\t\t\r\n\t\tObject empCtcObject[][]=getSqlModel().getSingleResult(empctcQuery);\r\n\t\t\r\n\t\tif(empCtcObject!=null && empCtcObject.length >0){\r\n\t\t\tempCredit.setCtcAmt(String.valueOf(empCtcObject[0][0]));\r\n\t\t\tempCredit.setFrmId(Utility.checkNull(String.valueOf(empCtcObject[0][1])));\r\n\t\t\tempCredit.setFrmName(Utility.checkNull(String.valueOf(empCtcObject[0][2])));\r\n\t\t\tempCredit.setGradeName(Utility.checkNull(String.valueOf(empCtcObject[0][3])));\r\n\t\t\tempCredit.setGradeId(Utility.checkNull(String.valueOf(empCtcObject[0][4])));\r\n\t\t\tempCredit.setGrsAmt(String.valueOf(empCtcObject[0][5]));\r\n\t\t}\r\n\t\t\r\n\t\tString query=\"\";\r\n\t\t\r\n\t\tif(editFlag){\r\n\t\t\tquery = \"SELECT CREDIT_NAME,DECODE(CREDIT_PERIODICITY,'H','Half Yearly','A','Annually','Q','Quarterly','M','Monthly'),NVL(CREDIT_AMT,0) , \"\r\n\t\t\t\t+ \" DECODE(CREDIT_PERIODICITY,'H','3','A','4','Q','2','M','1') AS ORD,HRMS_CREDIT_HEAD.CREDIT_CODE FROM HRMS_EMP_CREDIT \" \r\n\t\t\t\t+ \" LEFT JOIN HRMS_CREDIT_HEAD ON (HRMS_CREDIT_HEAD.CREDIT_CODE = HRMS_EMP_CREDIT.CREDIT_CODE)\" \r\n\t\t\t\t+ \" WHERE EMP_ID=\"+empId \r\n\t\t\t\t+ \" UNION ALL \"\r\n\t\t\t\t+ \" SELECT CREDIT_NAME,DECODE(CREDIT_PERIODICITY,'H','Half Yearly','A','Annually','Q','Quarterly','M','Monthly'),0 , \"\r\n\t\t\t\t+ \" DECODE(CREDIT_PERIODICITY,'H','3','A','4','Q','2','M','1') AS ORD,HRMS_CREDIT_HEAD.CREDIT_CODE FROM HRMS_CREDIT_HEAD \" \r\n\t\t\t\t+ \" WHERE CREDIT_HEAD_TYPE='S' and CREDIT_CODE not in (select HRMS_EMP_CREDIT.CREDIT_CODE from HRMS_EMP_CREDIT where EMP_ID=\"+empId+\")\" \r\n\t\t\t\t+ \" ORDER BY 4,5\";\r\n\t\t\t\r\n\t\t\t/*query = \"SELECT CREDIT_NAME,DECODE(CREDIT_PERIODICITY,'H','Half Yearly','A','Annually','Q','Quarterly','M','Monthly'),NVL(CREDIT_AMT,0)\"\r\n\t\t\t\t\t+\" ,DECODE(CREDIT_PERIODICITY,'H','3','A','4','Q','2','M','1') AS ORD,HRMS_EMP_CREDIT.CREDIT_CODE FROM HRMS_EMP_CREDIT \"\r\n\t\t\t\t\t+\" RIGHT JOIN HRMS_CREDIT_HEAD ON (HRMS_CREDIT_HEAD.CREDIT_CODE = HRMS_EMP_CREDIT.CREDIT_CODE)\"\r\n\t\t\t\t\t+\" WHERE EMP_ID=\"+empId \r\n\t\t\t\t\t+\" ORDER BY ORD,HRMS_EMP_CREDIT.CREDIT_CODE\";*/\r\n\t\t}else{\r\n\t\t\tlogger.info(\"################ EDIT FLAG ################\"+editFlag);\r\n\t\t\t\r\n\t\t\tquery = \"SELECT CREDIT_NAME,DECODE(CREDIT_PERIODICITY,'H','Half Yearly','A','Annually','Q','Quarterly','M','Monthly'),NVL(CREDIT_AMT,0)\"\r\n\t\t\t\t+\" ,DECODE(CREDIT_PERIODICITY,'H','3','A','4','Q','2','M','1') AS ORD,HRMS_EMP_CREDIT.CREDIT_CODE FROM HRMS_EMP_CREDIT \"\r\n\t\t\t\t+\" RIGHT JOIN HRMS_CREDIT_HEAD ON (HRMS_CREDIT_HEAD.CREDIT_CODE = HRMS_EMP_CREDIT.CREDIT_CODE)\"\r\n\t\t\t\t+\" WHERE EMP_ID=\"+empId +\" and HRMS_EMP_CREDIT.CREDIT_AMT>0\"\r\n\t\t\t\t+\" ORDER BY ORD,HRMS_EMP_CREDIT.CREDIT_CODE\";\r\n\t\t}\r\n\t\t\tshowIncrementHistory(empCredit, request, query);\r\n\t\t\r\n\t\t//-----------------------------------------------\r\n\t\tctcMethod(empCredit);\r\n\t\tfetchIncrementPeriod(empCredit);\r\n\t\t\t\t\r\n\t}", "public long getEmployeeId();", "@Override\r\n\tpublic Employee findEmployeeById(int empId) {\n\t\tEmployee employee = null;\r\n\t\tString findData = \"select * from employee where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(findData);\r\n\t\t\tps.setInt(1, empId);\r\n\r\n\t\t\tResultSet set = ps.executeQuery();\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\temployee = new Employee(id, sal, name, tech);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employee;\r\n\r\n\t}", "@RequestMapping(\"/getContact\")\n\tprivate ResponseEntity<String> getContact(@RequestParam int id) throws JsonProcessingException {\n\t\t\n\t\tContacts contact = c_service.getContactById(id);\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (contact == null) {\n\t return new ResponseEntity<String>(\"No User with that Id found\", \n\t responseHeaders, HttpStatus.UNAUTHORIZED);\n\t } else {\n\t responseHeaders.add(\"Content-Type\", \"application/json\");\n\t String json = convertToJson(contact);\n\t return new ResponseEntity<String>(json, responseHeaders, HttpStatus.OK); \n\t }\t\t\n\t}", "private void getemp( String name,int id ) {\r\n\t\tSystem.out.println(\" name and id\"+name+\" \"+id);\r\n\t}", "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}", "@Override\n\tpublic Employee getEmployeeById(int empId) {\n\t\treturn null;\n\t}", "public RosterContact getEntry(String userId, XMPPConnection connection) {\n\t\t\n\t\tArrayList<RosterContact> contacList = getEntries(connection);\n\t\tRosterContact entry = null;\n\t\t\n\t\t\n\t\tfor(RosterContact contact : contacList ){\n\t\t\t\n\t\t\tif(contact.getJid().equals(userId)){\n\t\t\t\t\n\t\t\t\tentry = contact;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn entry;\n\t}", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "@Override\n public Emp selectByPrimaryKey(Integer empId) {\n \n Emp emp = mapper.selectByPrimaryKey(empId);\n return emp;\n }", "@Test\n\tpublic void searhEmpIdtoAddress() {\n\t\tEmployee employee = employeeService.searhEmpIdtoAddress();\n\t\tAssert.assertEquals(id.intValue(), employee.getId().intValue());\n\t\n\t}", "public Employee getEmployeebyId(int id) {\r\n\t\tEmployee e = SQLUtilityEmployees.getEmpByID(id);\r\n\t\treturn e;\r\n\t\t\r\n\t}", "public Employee viewInformation(int id) {\n\t\tEmployee employee = new Employee(); \n\t\ttry{ \n\n\t\t\tString sql = \"select * from employees where id = \"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\n\t\t\tresultSet.next();\n\t\t\temployee.setId(resultSet.getInt(\"employee_id\"));\n\t\t\temployee.setUsername(resultSet.getString(\"username\"));\n\t\t\temployee.setPassword(resultSet.getString(\"password\"));\n\t\t\temployee.setFirstName(resultSet.getString(\"first_name\"));\n\t\t\temployee.setLastName(resultSet.getString(\"last_name\"));\n\t\t\temployee.setEmail(resultSet.getString(\"email\"));\n\t\t\t\n\t\t\treturn employee;\n\t\t\t \n\t\t}catch(Exception e){System.out.println(e);} \n\t\treturn null; \t\t\n\t}", "public int getContactId() {\n return contactId;\n }", "@Secured({ })\n\t@RequestMapping(value = \"/contacts/findBycompany/{key}\", method = RequestMethod.GET, headers = \"Accept=application/json\")\n\tpublic List<Contact> findBycompany(@PathVariable(\"key\") Long idcompany) {\n\t\tList<Contact> list = contactService.findBycompany(idcompany);\n\t\treturn list;\n\t}", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "private Contacts getContact(String name) {\n Contacts foundContact = contactList.stream()\n .filter(contact ->\n contact.getFirstName().equals(name) ||\n contact.getLastName().equals(name))\n .findFirst().orElse(null);\n return foundContact;\n }", "@RequestMapping(value = \"/bankInfoByEmpId/{empId}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public HrEmpBankAccountInfo getEmpBankInfoByEmpId(@PathVariable long empId) {\n log.debug(\"REST request to get BankInfoByEmpId : empId: {}\", empId);\n HrEmpBankAccountInfo bankInfo = hrEmpBankAccountInfoRepository.findByEmployeeInfo(empId);\n return bankInfo;\n }", "public ArrayList<Address> getAddress(int personId)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sqlQuery=\"\";\n\t\tArrayList<Address> addressList = new ArrayList<Address>();\n\t\tAddress addressObj;\n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t\t sqlQuery = \"select * from contact_info where person_id=?\";\n\t\t\t \n\t\t stmt = conn.prepareStatement(sqlQuery);\n\t\t stmt.setInt(1, personId);\n\n\t\t rs = stmt.executeQuery();\n\t\t \n\t\t while (rs.next()) {\n\t\t \t addressObj = new Address(rs.getString(1),rs.getString(2),rs.getString(4),\n\t\t \t\t\t rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),\n\t\t \t\t\t rs.getString(9),rs.getString(3),\"\",\"\",\"\",\"\");\n\n\t\t \t addressList.add(addressObj);\n\t\t \t \n\t\t }\n\t\t \n\t\t try\n\t\t { \n\t\t \t getPhoneNumberDetails(addressList, personId);\n\t\t \t getEmailIdDetails(addressList, personId);\n\t\t }\n\t\t catch(Exception e )\n\t\t {\n\t\t \t System.out.println(\"Row Miss match in Fields \");\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Searching Person Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(rs!=null)\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\treturn addressList;\n\t}", "@Override\n\tpublic List<Contact> getAllContact() {\n\n\t\tList<Contact> contactList = new ArrayList<>();\n\n\t\tList<ContactDetailsEntity> entityList = contactRepositeries.findAll();\n\n\t\tList<ContactDetailsEntity> filterEntity = entityList.stream()\n\t\t\t\t.filter(entity -> \"y\".equals(entity.getActiveSwitch())).collect(Collectors.toList());\n\n\t\tif (!filterEntity.isEmpty()) {\n\t\t\tfilterEntity.forEach(entity -> {\n\t\t\t\tContact c = new Contact();\n\t\t\t\tBeanUtils.copyProperties(entity, c);\n\t\t\t\tcontactList.add(c);\n\t\t\t});\n\t\t}\n\t\treturn contactList;\n\t}", "public ContactDetail getContactDetails(ResultSet resultSet) throws Exception\r\n\t{\r\n\t\tContactDetail contactInfo = new ContactDetail();\r\n\t\tAddress addressInfo = new Address();\r\n\t\t\r\n\t\t\r\n\t\t//set each of the values in contact info to the value of the row in the selected column\r\n\t\tcontactInfo.setPhonenumber(resultSet.getString(\"phonenumber\"));\t\r\n\t\tcontactInfo.setFirstname(resultSet.getString(\"firstname\"));\r\n\t\tcontactInfo.setSurname(resultSet.getString(\"lastname\"));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\taddressInfo.setStreet(resultSet.getString(\"street\"));\r\n\t\taddressInfo.setCity(resultSet.getString(\"city\"));\r\n\t\taddressInfo.setPostcode(resultSet.getString(\"postcode\"));\r\n\t\tcontactInfo.setAddress(addressInfo);\r\n\t\t\r\n\t\treturn contactInfo;\t\t\r\n\t}", "public Employee getStudentOnId(int id);", "public List<EmployeeDetails> getEmployeeDetails();", "Employee selectByPrimaryKey(String id);", "public Employee getEmp(Integer id) {\n\t\tEmployee selectByPrimaryKey = employeeMapper.selectByPrimaryKey(id);\n\t\treturn selectByPrimaryKey;\n\t}", "public Cursor getContact(long rowId) throws SQLException\n {\n Cursor mCursor = db.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,\n KEY_NAME,KEY_EMAIL},KEY_ROWID + \"=\" + rowId,null,null,null,null,null);\n if(mCursor != null)\n {\n mCursor.moveToFirst();\n }\n return mCursor;\n }", "public Empresa getEmpresa(String id) {\n Empresa e = null;\n String empresaID;\n try {\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Empresa.* FROM Empresa \" +\n \"INNER JOIN Revista ON Revista.Empresa_ID = Empresa.ID \" +\n \"WHERE Revista.ID = \" + id);\n //stm.setString(1, id);\n ResultSet rs = stm.executeQuery();\n if (rs.next()) {\n String i = rs.getString(\"ID\");\n String n = rs.getString(\"Nome\");\n String r = rs.getString(\"Rua\");\n String c = rs.getString(\"Cidade\");\n String q = rs.getString(\"QuantidadeRevistas\");\n e = new Empresa(i, n, c, r, q);\n }\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n finally{\n con.close(connection);\n }\n return e;\n }", "@Override\r\n\tpublic Employee selectEmployee(int empid) {\n\t\treturn null;\r\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response getEmployee( @NotNull(message = \"Employee ID cannnot be null\")\n @QueryParam(\"empId\") String empId) {\n return null;\n }", "public String getEmpID() {\r\n return empID;\r\n }", "public String getContactId() {\n return this.contactId;\n }", "public long getContactId() {\n return contactId;\n }", "public String getContactDialogueRecordEmployeeReference() {\n return contactDialogueRecordEmployeeReference;\n }", "public Long getContactId() {\n return contactId;\n }", "private void displayContactDetails() {\n System.out.println(\"displaying contact details :\");\n for (int i = 0; i < contactList.size(); i++) {\n System.out.println(\"contact no\" + (i + 1));\n Contact con = contactList.get(i);\n System.out.println(\"first name is :\" + con.getFirstName());\n\n System.out.println(\" last name is :\" + con.getLastName());\n\n System.out.println(\" address is :\" + con.getAddress());\n\n System.out.println(\" city name is :\" + con.getCity());\n\n System.out.println(\" state name is :\" + con.getState());\n\n System.out.println(\" zip code is :\" + con.getZip());\n\n System.out.println(\" phone number is :\" + con.getPhone());\n\n System.out.println(\" email address is :\" + con.getEmail());\n }\n }", "@Override\r\n\t@Transactional\r\n\tpublic EmployeeMaster getEmployeebyId(int id) {\r\n\t\tString hql = \"FROM EmployeeMaster WHERE obsolete ='N' and emp_id =\"+ id + \"\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\tList<EmployeeMaster> emplist = (List<EmployeeMaster>) query.list();\r\n\t\tif(emplist != null && !emplist.isEmpty()) {\r\n\t\t\treturn emplist.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Employee getEmployeeByID(int empid) throws RemoteException {\n\t\treturn DAManager.getEmployeeByID(empid);\n\t}", "public Contact getContact() {\n Long __key = this.ContactId;\n if (contact__resolvedKey == null || !contact__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ContactDao targetDao = daoSession.getContactDao();\n Contact contactNew = targetDao.load(__key);\n synchronized (this) {\n contact = contactNew;\n \tcontact__resolvedKey = __key;\n }\n }\n return contact;\n }", "public int getEmployeeId();" ]
[ "0.7370633", "0.73617464", "0.7112212", "0.700385", "0.6769692", "0.63923943", "0.6324308", "0.63223326", "0.6312906", "0.6148795", "0.6144448", "0.6106883", "0.61027145", "0.6076603", "0.60548913", "0.6037474", "0.6033345", "0.6000681", "0.59848887", "0.597238", "0.59487206", "0.5935618", "0.59320176", "0.59296304", "0.5922712", "0.59104323", "0.59081167", "0.59043956", "0.5900174", "0.5892458", "0.5884978", "0.5872356", "0.58708006", "0.5846377", "0.583432", "0.58104897", "0.57996565", "0.5783898", "0.5780449", "0.5764888", "0.575608", "0.5752435", "0.5732494", "0.57280385", "0.5726772", "0.5723904", "0.5723009", "0.5701097", "0.56976044", "0.5683535", "0.56822246", "0.5675463", "0.5667487", "0.5662583", "0.5657134", "0.56486964", "0.5646249", "0.5633538", "0.56163305", "0.5609101", "0.56087786", "0.5607492", "0.5597323", "0.559635", "0.5593085", "0.5585623", "0.558182", "0.5576807", "0.5573955", "0.5568933", "0.5560179", "0.5556271", "0.55540395", "0.5550501", "0.5544177", "0.55395806", "0.5538681", "0.5538512", "0.55329144", "0.55298895", "0.5519712", "0.55166906", "0.5515244", "0.5505011", "0.55030006", "0.55017495", "0.5494361", "0.54904723", "0.54807156", "0.5472695", "0.54660225", "0.5465489", "0.5464868", "0.5459754", "0.54542655", "0.54500514", "0.544256", "0.54418373", "0.54401827", "0.5440088" ]
0.74979645
0
To list all the Contact Emp details
@Override public List<EmpContactDetail> listEmpContactDetails() { return template.loadAll(EmpContactDetail.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<EmpContactDetail> listEmpContactDetails() {\n\t\treturn this.empContactDetailDAO.listEmpContactDetails();\n\t}", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "List<Employee> allEmpInfo();", "private void displayContactDetails() {\n System.out.println(\"displaying contact details :\");\n for (int i = 0; i < contactList.size(); i++) {\n System.out.println(\"contact no\" + (i + 1));\n Contact con = contactList.get(i);\n System.out.println(\"first name is :\" + con.getFirstName());\n\n System.out.println(\" last name is :\" + con.getLastName());\n\n System.out.println(\" address is :\" + con.getAddress());\n\n System.out.println(\" city name is :\" + con.getCity());\n\n System.out.println(\" state name is :\" + con.getState());\n\n System.out.println(\" zip code is :\" + con.getZip());\n\n System.out.println(\" phone number is :\" + con.getPhone());\n\n System.out.println(\" email address is :\" + con.getEmail());\n }\n }", "public void displayAllContacts() {\n\n for (int i = 0; i < contacts.size(); i ++) {\n\n Contact contact = contacts.get(i);\n\n System.out.println(\" Name: \" + contact.getName());\n System.out.println(\" Title: \" + contact.getTitle());\n System.out.println(\" ID #: \" + contact.getID());\n System.out.println(\" Hoursrate: \" + contact.getHoursrate());\n System.out.println(\" Workhours \" + contact.getWorkhours());\n System.out.println(\"-------------\");\n\n\n\n Employee one = new Employee(\"A\", \"A\", \"A\", \"A\"); // I give it some contact information first.\n Employee two = new Employee(\"Bob\", \"Bob\", \"A\", \"A\");\n\n\n\n\n\n\n}\n\n\n//***************************************************************", "@GET(API_ROUTE + \"/contactos-empleado/{emp_id}\")\n Call<List<Persona>> getContactsByEmployeeId(@Path(\"emp_id\") long emp_id);", "@Override\n\tpublic List<Empdetails> getemplist() {\n\t\treturn empDAO.getemplist();\n\t}", "public List<Employee> getAllEmployeeDetail() {\n\t\treturn dao.getAllEmployeeDetail();\n\t}", "@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}", "@Override\r\n\tpublic List<Emp> getAll() {\n\t\treturn null;\r\n\t}", "public void viewAllContacts(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name of whose contact list you want to see\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tif (ContactList.isEmpty()) {\n\t\t\tlog.info(\"List is empty\");\n\t\t} else {\n\t\t\tlog.info(\"Contacts in address book \" + addressBookName + \"are :\");\n\t\t\tContactList.stream().forEach((System.out::println));\n\t\t\tlog.info(\"\\n\");\n\t\t}\n\t}", "public void printContact(){\n for (int i = 0 ; i<contact.size() ; i++){\r\n System.out.print(contact.get(i).getFirstName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getLastName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getPhoneNumber());\r\n System.out.println(\"\\t\\t\"+contact.get(i).getAddress());\r\n }\r\n }", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "public List<Contact> getAllContacts();", "@Override\r\n\t\r\n\tpublic List<Employee> getAllDetails()\r\n\t{\r\n\t\t\r\n\t\tList<Employee> empList =hibernateTemplate.loadAll(Employee.class);\r\n\t\t\r\n\t\treturn empList;\r\n\t}", "@Override\n\tpublic List<Emp> findAll() {\n\t\treturn eb.findAll();\n\t}", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "public void allContacts(){\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tSystem.out.println(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public List<EmployeeDetails> getEmployeeDetails();", "@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}", "public Cursor getAllContact()\n {\n return db.query(DATABASE_TABLE,new String[]{KEY_ROWID,KEY_NAME,\n KEY_EMAIL},null,null,null,null,null);\n }", "public List<EmployeeTO> getAllEmployees() {\n\t\t\r\n\t\treturn EmployeeService.getInstance().getAllEmployees();\r\n\t}", "@Override\n\tpublic com.ssaga.human.service.List<EmployeeDto> empList() {\n\t\treturn null;\n\t}", "public void empDetails() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "@Override\n\tpublic List<Contact> getAllContact() {\n\n\t\tList<Contact> contactList = new ArrayList<>();\n\n\t\tList<ContactDetailsEntity> entityList = contactRepositeries.findAll();\n\n\t\tList<ContactDetailsEntity> filterEntity = entityList.stream()\n\t\t\t\t.filter(entity -> \"y\".equals(entity.getActiveSwitch())).collect(Collectors.toList());\n\n\t\tif (!filterEntity.isEmpty()) {\n\t\t\tfilterEntity.forEach(entity -> {\n\t\t\t\tContact c = new Contact();\n\t\t\t\tBeanUtils.copyProperties(entity, c);\n\t\t\t\tcontactList.add(c);\n\t\t\t});\n\t\t}\n\t\treturn contactList;\n\t}", "@Override\n\tpublic List<Employee> viewAllEmployees() {\n\t\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\t\t CriteriaQuery<Employee> cq = cb.createQuery(Employee.class);\n\t\t Root<Employee> rootEntry = cq.from(Employee.class);\n\t\t CriteriaQuery<Employee> all = cq.select(rootEntry);\n\t \n\t\t TypedQuery<Employee> allQuery = em.createQuery(all);\n\t\t return allQuery.getResultList();\n\t}", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Contact> findAll() throws Exception {\n\t\treturn queryEntity(\"select * from contact\", null);\n\t}", "private void getContactList() {\r\n\r\n\t\tgroupData.clear();\r\n\t\tchildData.clear();\r\n\t\tDataHelper dataHelper = new DataHelper(ContactsActivity.this);\r\n\t\tdataHelper.openDatabase();\r\n\t\tgroupData = dataHelper.queryZoneAndCorpInfo(childData);\r\n\t\tdataHelper.closeDatabase();\r\n\t\thandler.sendEmptyMessage(1);\r\n\r\n\t\tif (groupData == null || groupData.size() == 0) {\r\n\t\t\tDataTask task = new DataTask(ContactsActivity.this);\r\n\t\t\ttask.execute(Constants.KServerurl + \"GetAllOrgList\", \"\");\r\n\t\t}\r\n\t}", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "@Override\n\tpublic List<Employee> getEmpList() throws EmpException {\n\t\treturn dao.getEmpList();\n\t}", "@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}", "@Override\n\tpublic EmpContactDetail getEmpContactDetailByID(int id) {\n\t\treturn template.get(EmpContactDetail.class, new Integer(id));\n\t}", "public void listAll(){\n /*\n for(int i=0;i<employeesList.size();i++){\n System.out.println(i);\n Employee employee=(Employee)employeesList.get(i);\n System.out.print(employeesList.get(i));\n */ \n \n \n //for used to traverse employList in order to print all employee's data\n for (int i = 0; i < employeesList.size(); i++) {\n System.out.println(\"Name: \" + employeesList.get(i).getName()); \n System.out.println(\"Salary_complement: \"+employeesList.get(i).getSalary_complement()); \n \n }\n \n \n }", "public List<Empleado> getAll();", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Contact> listContact() {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* je suis dans Liste des contacts *********************************\");\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\n\t\t\tQuery query = session.createQuery(\"from Contact\");\n\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tSystem.out.println(\"liste des contacts: \" + String.valueOf(query.list()));\n\n\t\t\tList<Contact> lc = (List<Contact>) query.list();\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lc;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public List getApplicantnames(String contactId) {\n\t\t\tString applicantName = null;\n\t\t\tArrayList list = new ArrayList();\n\t\t\tString applicantEmail=null;\n\t\t\ttry {\n\t\t\t\tSession openERPSession =couchBaseOperation.getOdooConnection();\n\t\t\t\tlogger.debug(\"applicant id is\" + contactId);\n\t\t\t\tObjectAdapter opprtunity = openERPSession\n\t\t\t\t\t\t.getObjectAdapter(\"applicant.record\");\n\n\t\t\t\tFilterCollection filter = new FilterCollection();\n\t\t\t\tif (contactId != null) {\n\t\t\t\t\tfilter.add(\"id\", \"=\", contactId);\n\t\t\t\t}\n\t\t\t\tRowCollection row = opprtunity.searchAndReadObject(filter,\n\t\t\t\t\t\tnew String[] { \"id\", \"applicant_name\",\n\t\t\t\t\t\t\t\t\"applicant_last_name\", \"email_personal\" });\n\t\t\t\tfor (Iterator iterator = row.iterator(); iterator.hasNext();) {\n\t\t\t\t\tRow row2 = (Row) iterator.next();\n\t\t\t\t\tlogger.debug(\"applicant size\"+row2.get(\"applicant_name\") +\" \"+row2.get(\"applicant_last_name\").toString()+\" \"+row2.get(\"email_personal\"));\n\t\t\t\t\tapplicantName = row2.get(\"applicant_name\") + \"_\"\n\t\t\t\t\t\t\t+ row2.get(\"applicant_last_name\");\n\t\t\t\t\tapplicantEmail=row2.get(\"email_personal\").toString() ;\n\t\t\t\t\tlist.add(applicantName);\n\t\t\t\t\tlist.add(applicantEmail);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\"Error occured in Applicantnames \"+e.getMessage());\t\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "@GetMapping(\"/employees\")\r\n\tpublic List<Employee> list() {\r\n\t return empService.listAll();\r\n\t}", "public List<contact> contact_get_all() {\n \treturn contact_get(null, KEY_CONTACT_LASTACT + \" DESC\");\n }", "public String getAllContacts() {\n\t\treturn \"SELECT * FROM CONTACTS\";\n\t}", "Collection<EmployeeDTO> getAll();", "java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();", "@RequestMapping(value = \"/listEmployees\", method = RequestMethod.GET)\r\n\tpublic Employee employees() {\r\n System.out.println(\"---BEGIN\");\r\n List<Employee> allEmployees = employeeData.findAll();\r\n \r\n System.out.println(\"size of emp == \"+allEmployees.size());\r\n System.out.println(\"---END\");\r\n Employee oneEmployee = allEmployees.get(0);\r\n\t\treturn oneEmployee;\r\n }", "@Override\n\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}", "public List<User> getAllEmployees(String companyShortName);", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "@Override\n\tpublic EmpContactDetail getEmpContactDetailByID(int id) {\n\t\treturn this.empContactDetailDAO.getEmpContactDetailByID(id);\n\t}", "@Override\n\tpublic ArrayList<Employee> getEmpList() throws HrExceptions {\n\t\tSystem.out.println(\"In getEmpList() of Dao\");\n\t\treturn null;\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n if (employeelistBuilder_ == null) {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n } else {\n return employeelistBuilder_.getMessage();\n }\n }", "@RequestMapping(\"/employee\")\r\n\tpublic List<Employee> getAllCustomers() throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.getAllCustomers();\r\n\t\t}\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(400, e.getMessage());\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic List<EmployeeBean> getEmployeeList() throws Exception {\n\t\treturn employeeDao.getEmployeeList();\n\t}", "public List<Employee> getAllEmployees() {\n\t\tList<Employee> list = new ArrayList<Employee>();\n\t\tlist = template.loadAll(Employee.class);\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\tList<Employee> employee = new ArrayList<>();\n\t\tlogger.info(\"Getting all employee\");\n\t\ttry {\n\t\t\temployee = employeeDao.getAllEmployee();\n\t\t\tlogger.info(\"Getting all employee = {}\",employee.toString());\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn employee;\n\t}", "@Override\n\tpublic List<Employee> getAll() {\n\t\tList<Employee> list =null;\n\t\tEmployeeDAO employeeDAO = DAOFactory.getEmployeeDAO();\n\t\ttry {\n\t\t\tlist=employeeDAO.getAll();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "public List<String> getContactosEmpresa(String idEmpresa) {\n List<String> contactos = new ArrayList<>();\n String contacto;\n\n try{\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Contacto FROM Contactos \" +\n \"WHERE Empresa_ID = \" + idEmpresa);\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n contacto = rs.getString(\"Contacto\");\n contactos.add(contacto);\n }\n }\n catch (Exception e){\n e.getMessage();\n }\n finally {\n con.close(connection);\n }\n return contactos;\n }", "@Override\n\tpublic List<EmployeeBean> getAllEmployees() {\n\t\tLOGGER.info(\"starts getAllEmployees method\");\n\t\tLOGGER.info(\"Ends getAllEmployees method\");\n\t\t\n\t\treturn adminEmployeeDao.getAllEmployees();\n\t}", "public List<Employee> getListOfAllEmployees() {\n\t\tlista = employeeDao.findAll();\r\n\r\n\t\treturn lista;\r\n\t}", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "@GetMapping(\"/GetAllEmployees\")\r\n public List<Employee> viewAllEmployees() {\r\n return admin.viewAllEmployees();\r\n }", "@RequestMapping(path = \"/employee\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<Employee> displayEmployee() {\r\n\t\treturn er.findAll();\r\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}", "@Override\r\n\tpublic List consultaEmpresas() {\n\t\treturn null;\r\n\t}", "@GetMapping(\"/findAllEmployees\")\n\tpublic List<Employee> getAll() {\n\t\treturn testService.getAll();\n\t}", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void displayAll() \n\t{\n\t\tSystem.out.printf(\"%n--[ My Contact List ]--%n\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"Name\", \"Phone\", \"Email\",\n\t\t\t\t\"Company\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"----\", \"-----\", \"-----\",\n\t\t\t\t\"-------\");\n\t\tfor (BusinessContact b : this.contacts) \n\t\t{\n\t\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", b.getLastName()\n\t\t\t\t\t+ \", \" + b.getFirstName(), b.getPhoneNumber(),\n\t\t\t\t\tb.getEmailAddress(), b.getCompany());\n\t\t}\n\t}", "@GetMapping(value=\"/searchEmpData/{fname}\")\n\tpublic List<Employee> getEmployeeByName(@PathVariable (value = \"fname\") String fname)\n\t{\n\t\treturn integrationClient.getEmployees(fname);\n\t}", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "public List<Contact> getAllContacts() {\n List<Contact> contactList = new ArrayList<Contact>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_CONTACTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n Contact contact = new Contact();\n contact.set_id((cursor.getInt(0)));\n contact.set_name(cursor.getString(1));\n contact.set_audios(cursor.getString(2));\n contact.set_captured_image(cursor.getString(3));\n contact.set_contents(cursor.getString(4));\n contact.set_delelte_var(cursor.getInt(5));\n contact.set_gallery_image(cursor.getString(6));\n contact.set_recycle_delete(cursor.getInt(7));\n contact.set_photo(cursor.getString(8));\n // Adding contact to list\n contactList.add(contact);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return contactList;\n }", "public List<String> getAll() {\n\treturn employeeService.getAll();\n }", "@Override\r\n\tpublic List<Employee> selectEmployeeByAll(Connection con) {\n\t\treturn null;\r\n\t}", "public static void display(List<Employee> empList) {\r\n\t\t\r\n\t\tfor(Employee e : empList) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getEmployeeId()+\"\\t\"+e.getEmployeeName()+\"\\t\"+e.getEmployeeAddress());\r\n\t\t}\r\n\t}", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "@GetMapping(\"/list\")\n\tpublic String listContacts(Model theModel) {\n\t\tList<Contact> theContacts = contactService.findAll();\n\t\t\n\t\t// add to the model\n\t\ttheModel.addAttribute(\"contacts\", theContacts);\n\t\t\n\t\treturn \"contacts/list-contacts\";\n\t}", "public static void main(String[] args) {\n ContactData contactDatas = new ContactData(\"Mohon\", \"456775439\");\r\n //System.out.println(contactDatas);\r\n\r\n ContactData contactDatas1 = new ContactData(\"shihab\", \"456775439\", \"[email protected]\");\r\n\r\n ContactList list = new ContactList();\r\n list.createContact(contactDatas);\r\n list.createContact(contactDatas1);\r\n System.out.println(list);\r\n\r\n ContactData search = list.searchContact(\"mohon\");\r\n if (search != null){\r\n System.out.println(search);\r\n } else {\r\n System.out.println(\"Contact not found\");\r\n }\r\n\r\n System.out.println(list.getTotalContact());\r\n }", "public void mostrarContactos() {\n\t\tfor (int i = 0; i < this.listaContactos.size(); i++) {\n\t\t\tSystem.out.println(this.listaContactos.get(i).mostrarDatos());\n\t\t}\n\t}", "public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }", "private List getContactNames() {\n List<Contact> contacts = new ArrayList<>();\n // Get the ContentResolver\n ContentResolver cr = getContentResolver();\n // Get the Cursor of all the contacts\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n while (cursor.moveToNext()) {\n\n\n //Sjekker om kontakt har et tlf nummer\n String hasNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n String contactName = \"\";\n if (hasNumber.equals(\"1\")) {\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n Contact contact = new Contact(contactName);\n contacts.add(contact);\n\n\n }\n }\n cursor.close();\n return contacts;\n }", "public Employee[] getAll() {\n\t\tEmployee[] empArray = new Employee[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++) \n\t\t\tempArray[i] = list.get(i);\n\t\t\t\n\t\treturn empArray;\n\t}", "@RequestMapping(value = \"\", method = RequestMethod.GET)\n\tpublic String getContacts(Model model) {\n\t\tmodel.addAttribute(contactService.getContacts());\n\t\treturn contactListViewName;\n\t}", "@GetMapping(\"/contacts\")\r\n\tCollectionModel<EntityModel<Contact>> all() {\r\n\t\t//Use map to call toModel on each Contact resource\r\n\t List<EntityModel<Contact>> contacts = repo.findAll().stream()\r\n\t .map(assembler::toModel)\r\n\t .collect(Collectors.toList());\r\n\t return CollectionModel.of(contacts, linkTo(methodOn(ContactController.class).all()).withSelfRel());\r\n\t}", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "public String getContacts() {\n return contacts;\n }", "@Transactional\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn accountDao.getAllEmployee();\n\t}", "private static void showContacts(List<Contact> contactList) {\r\n\t\tcontactList.forEach(System.out::println);\r\n\t}", "@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public final List<EmployeeDTO> findAllEmployees() {\n LOGGER.info(\"getting all employees\");\n return employeeFacade.findAllEmployees();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\tfinal Session session = sessionFactory.getCurrentSession();\t\t\r\n\t\tfinal Query query = session.createQuery(\"from Employee e order by id desc\");\r\n\t\t//Query q = session.createQuery(\"select NAME from Customer\");\r\n\t\t//final List<Employee> employeeList = query.list(); \r\n\t\treturn (List<Employee>) query.list();\r\n\t}", "@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\t\n\t\tlog.debug(\"EmplyeeService.getAllEmployee() return list of employees\");\n\t\treturn repositary.findAll();\n\t}", "public Collection<Contact> getContacts();" ]
[ "0.8102768", "0.69246006", "0.68933564", "0.68927646", "0.6842107", "0.6717435", "0.6661641", "0.665319", "0.66207963", "0.6467865", "0.64301604", "0.63664454", "0.6365516", "0.6357492", "0.6295616", "0.6290544", "0.6269474", "0.6256315", "0.62430084", "0.6224727", "0.62237775", "0.6215579", "0.62108594", "0.61864376", "0.61855125", "0.61825234", "0.6169933", "0.61685514", "0.61601794", "0.6157913", "0.61278546", "0.6113626", "0.61096364", "0.6107322", "0.60948884", "0.609414", "0.60773015", "0.6070692", "0.60542893", "0.60538685", "0.60515237", "0.60511184", "0.60463303", "0.6034676", "0.60339844", "0.6025568", "0.6024177", "0.6021139", "0.599662", "0.5994885", "0.599393", "0.59914815", "0.5981064", "0.59783375", "0.59773266", "0.5967515", "0.59660006", "0.5948928", "0.59449315", "0.5935382", "0.59338766", "0.59304017", "0.5928372", "0.5916633", "0.59098566", "0.58916926", "0.58897954", "0.58864623", "0.5884997", "0.5880396", "0.5858838", "0.58550847", "0.585212", "0.583986", "0.583635", "0.5834095", "0.583361", "0.5829331", "0.58231527", "0.5822704", "0.5818775", "0.581403", "0.58081293", "0.5799141", "0.5787351", "0.57855964", "0.57802963", "0.5778636", "0.5774869", "0.576809", "0.57576513", "0.5754917", "0.5751971", "0.5745469", "0.57451946", "0.5742207", "0.5740458", "0.574021", "0.57366574", "0.5734846" ]
0.8392318
0
To add a new Emp Contact
@Override public void addEmpContactDetail(EmpContactDetail empContactDetail) { template.save(empContactDetail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ Add Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.printf(\"%nFirst Name: \");\n\t\tString firstName = s.next();\n\t\tSystem.out.printf(\"%nLast Name: \");\n\t\tString lastName = s.next();\n\t\tSystem.out.printf(\"%nPhone Number: \");\n\t\tString phoneNumber = s.next();\n\t\tSystem.out.printf(\"%nEmail Address: \");\n\t\tString emailAddress = s.next();\n\t\tSystem.out.printf(\"%nCompany: \");\n\t\tString company = s.next();\n\t\tBusinessContact b = new BusinessContact(firstName, lastName,\n\t\t\t\tphoneNumber, emailAddress, company);\n\t\tcontacts.add(b);\n\t}", "@Override\n public Contact addContact(String firstName, String secondName, String fathersName,\n String mobilePhoneNumber, String homePhoneNumber,\n String homeAddress, String email, long userId) {\n\n Contact contact = new Contact(firstName, secondName, fathersName, mobilePhoneNumber,\n homePhoneNumber, homeAddress, email, userRepository.findOne(userId));\n\n contactRepository.save(contact);\n return null;\n }", "@Override\n\tpublic void addEmpContactDetail(EmpContactDetail empContactDetail) {\n\t\tthis.empContactDetailDAO.addEmpContactDetail(empContactDetail);\n\n\t}", "void addContact(String name,String number);", "public static void addContacts(ContactFormData formData) {\n long idValue = formData.id;\n if (formData.id == 0) {\n idValue = ++currentIdValue;\n }\n Contact contact = new Contact(idValue, formData.firstName, formData.lastName, formData.telephone);\n contacts.put(idValue, contact);\n }", "public void addContact() {\n Contacts contacts = new Contacts();\n System.out.println(\"Enter first name\");\n contacts.setFirstName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter last name\");\n contacts.setLastName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter address\");\n contacts.setAddress(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter city\");\n contacts.setCity(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter state\");\n contacts.setState(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter email\");\n contacts.setEmail(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter zip\");\n contacts.setZip(scannerForAddressBook.scannerProvider().nextInt());\n System.out.println(\"Enter phone number\");\n contacts.setPhoneNumber(scannerForAddressBook.scannerProvider().nextLine());\n contactList.add(contacts);\n }", "com.spirit.crm.entity.ClienteContactoIf addClienteContacto(com.spirit.crm.entity.ClienteContactoIf model) throws GenericBusinessException;", "void addContact(String name, String number);", "public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;", "public void addContact() {\n System.out.println(\"enter a number to how many contacts you have to add\");\n Scanner scanner = new Scanner(System.in);\n int number = scanner.nextInt();\n\n for (int i = 1; i <= number; i++) {\n Contact person = new Contact();\n System.out.println(\"you can countinue\");\n System.out.println(\"enter your first name\");\n String firstName = scanner.next();\n if (firstName.equals(person.getFirstName())) {\n try {\n throw new InvalidNameException(\"duplicate name\");\n } catch (InvalidNameException e) {\n e.printStackTrace();\n }\n } else {\n person.setFirstName(firstName);\n }\n System.out.println(\"enter your last name\");\n String lastName = scanner.next();\n person.setLastName(lastName);\n System.out.println(\"enter your address :\");\n String address = scanner.next();\n person.setAddress(address);\n System.out.println(\"enter your state name\");\n String state = scanner.next();\n person.setState(state);\n System.out.println(\"enter your city :\");\n String city = scanner.next();\n person.setCity(city);\n System.out.println(\"enter your email\");\n String email = scanner.next();\n person.setEmail(email);\n System.out.println(\"enter your zip :\");\n int zip = scanner.nextInt();\n person.setZip(zip);\n System.out.println(\"enter your contact no\");\n int mobile = scanner.nextInt();\n person.setPhoneNo(mobile);\n list.add(person);\n }\n System.out.println(list);\n }", "private void addContact(Contact contact) {\n contactList.add(contact);\n System.out.println(\"contact added whose name is : \" + contact.getFirstName() + \" \" + contact.getLastName());\n\n }", "public void addContact(Addendance_DB_Model contact) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_COMP_ID, contact.get_CompId()); // Addendance_DB_Model Name\n\t\tvalues.put(KEY_DATETIME, contact.get_DateTime());\n\t\tvalues.put(KEY_EMP_ID,contact.get_EmpId());\n\t\tvalues.put(KEY_IBEACON_ID,contact.get_IbeaconId());// Addendance_DB_Model Phone\n\t\tvalues.put(KEY_Status,contact.getStatus());\n\t\tvalues.put(KEY_Latitude,contact.getLatit());\n\t\tvalues.put(KEY_Longitude,contact.getLogni());\n\t\t// Inserting Row\n\t\tdb.insert(TABLE_CONTACTS, null, values);\n\t\tdb.close(); // Closing database connection\n\t}", "public static void addContact()\n {\n System.out.println(\"Enter your firstName : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++)\n {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName))\n {\n System.out.println(\"Name already exists. Try another name\");\n addPersons();\n break;\n }\n }\n\n System.out.println(\"Enter your lastName : \");\n String lastName = sc.nextLine();\n System.out.println(\"Enter your address : \");\n String address = sc.nextLine();\n System.out.println(\"Enter your city : \");\n String city = sc.nextLine();\n System.out.println(\"Enter your state : \");\n String state = sc.nextLine();\n System.out.println(\"Enter your zipCode : \");\n String zip = sc.nextLine();\n System.out.println(\"Enter your phoneNo : \");\n long phoneNo = sc.nextLong();\n System.out.println(\"Enter your emailId : \");\n String email = sc.nextLine();\n Contact contact = new Contact(firstName, lastName, address, city, state, zip, phoneNo, email);\n list.add(contact);\n }", "public void addContact() {\n\t\tif (contactCounter == contactList.length) {\n\t\t\tSystem.err.println(\"Maximum contacts reached. \"\n\t\t\t\t\t\t\t\t+ \"No more contact can be added\");\n\t\treturn;\n\t\t}\n\t\t\n\t\treadContactInfo();\t\n\t}", "private void addContact(final String Email, final String password)\n throws NoSuchAlgorithmException, UnsupportedEncodingException {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Added contact \" + Email);\n dao.create(new Contact(Email, password));\n Log.i(\"results\", sb.toString());\n }", "public void addContact(String firstName, String lastName,\n\t\t\tString phoneNumber, String emailAddress, String company) \n\t{\n\t\tBusinessContact b = new BusinessContact(firstName, lastName,\n\t\t\t\tphoneNumber, emailAddress, company);\n\t\tcontacts.add(b);\n\t}", "public void testAddContact() throws NotExistsException {\n\t\tContact contact = new Contact();\n\t\tcontact.setName(\"Jack Sparrow\");\n\t\tcontact.setMobilePhone(\"0438200300\");\n\t\tcontact.setHomePhone(\"03 12345678\");\n\t\tcontact.setWorkPhone(\"03 98765432\");\n\n\t\t// create\n\t\tString newContactId = contactService.addContact(addrBook1, contact).getId();\n\n\t\t// read\n\t\tcontact = contactService.getContactById(newContactId);\n\n\t\t// assert\n\t\tassertEquals(1, contactService.getContacts(addrBook1).size());\n\t\tassertEquals(\"Jack Sparrow\", contact.getName());\n\t\tassertEquals(\"0438200300\", contact.getMobilePhone());\n\t\tassertEquals(\"03 12345678\", contact.getHomePhone());\n\t\tassertEquals(\"03 98765432\", contact.getWorkPhone());\n\t}", "public void addContacts() {\r\n\t\t\r\n\t\t\r\n\t}", "public void addContact(ContactBE contact) {\n ContentValues values = getContentValues(contact);\n mDatabase.insert(ContactTable.NAME, null, values);\n }", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "public void AddContact(View view){\n Utils.Route_Start(ListContact.this,Contato.class);\n // Notificar, para atualizar a lista.\n\n }", "public static void addContact ( LinkedList contactsList ) { \n\t\tSystem.out.print ( \"\\n\" + \"Enter the contact's first and last name: \" ); // prompt\n\t\tString [ ] firstAndLastName = CheckInput.getString( ).split( \" \" ); // split the name into first and last\n\t\tString firstName = firstAndLastName [ 0 ]; // assign\n\t\tString lastName = firstAndLastName [ 1 ];\n\t\tSystem.out.print ( \"Enter the contact's phone number: \" );\n\t\tString phoneNumber = CheckInput.getString ( );\n\t\tSystem.out.print ( \"Enter the contact's address: \" );\n\t\tString address = CheckInput.getString ( );\n\t\tSystem.out.print ( \"Enter the contact's city: \" );\n\t\tString city = CheckInput.getString ( );\n\t\tSystem.out.print ( \"Enter the contact's zip code: \" );\n\t\tString zip = CheckInput.getString( );\n\t\tcontactsList.add ( new Contact ( firstName, lastName, phoneNumber, address, city, zip ) );\n\t\t// adds to the LinkedList a new contact with the user given information\n\t\tSystem.out.print ( \"\\n\" );\n\t}", "public org.hl7.fhir.Contact addNewContact()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Contact target = null;\n target = (org.hl7.fhir.Contact)get_store().add_element_user(CONTACT$6);\n return target;\n }\n }", "public static void addContact(String user, ContactFormData formData) {\n boolean isNewContact = (formData.id == -1);\n if (isNewContact) {\n Contact contact = new Contact(formData.firstName, formData.lastName, formData.telephone, formData.telephoneType);\n UserInfo userInfo = UserInfo.find().where().eq(\"email\", user).findUnique();\n if (userInfo == null) {\n throw new RuntimeException(\"Could not find user: \" + user);\n }\n userInfo.addContact(contact);\n contact.setUserInfo(userInfo);\n contact.save();\n userInfo.save();\n }\n else {\n Contact contact = Contact.find().byId(formData.id);\n contact.setFirstName(formData.firstName);\n contact.setLastName(formData.lastName);\n contact.setTelephone(formData.telephone);\n contact.setTelephoneType(formData.telephoneType);\n contact.save();\n }\n }", "public AddAddress(Contact contact) {\n\n\t\tsession = getSession();\n\n\t\t// Show user's name and role:\n\t\tadd(new Label(\"userInfo\", getUserInfo(getSession())));\n\n\t\tCompoundPropertyModel<Contact> contactModel = new CompoundPropertyModel<Contact>(contact);\n\t\tsetDefaultModel(contactModel);\n\n\t\t// Create and add feedback panel to page\n\t\tadd(new JQueryFeedbackPanel(\"feedback\"));\n\n\t\t// Add a create Contact form to the page\n\t\tadd(new CreateAddressForm(\"createAddressForm\", contactModel));\n\n\t\t// single-select no minimum example\n\t\tadd(new Label(\"city0\", new PropertyModel<>(this, \"city0\")));\n\n\t\tSelect2Choice<City> city0 = new Select2Choice<>(\"city0\", new PropertyModel<City>(this, \"city0\"),\n\t\t\t\tnew CitiesProvider());\n\t\tcity0.getSettings().setPlaceholder(\"Please select city\").setAllowClear(true);\n\t\tadd(new Form<Void>(\"single0\").add(city0));\n\n\t}", "public void addContact(Contact contact){\n\n Contact qContact = contactRepository.findByNameAndLastName(contact.getName(), contact.getLastName());\n\n if(qContact != null ){\n qContact.getPhones().addAll(contact.getPhones());\n contact = qContact;\n }\n contactRepository.save(contact);\n }", "@Override\r\n\tpublic void addContact(Contact contact) {\n\t\tsuper.save(contact);\r\n\t}", "@RequestMapping(\"/addContact.htm\")\r\n\tpublic ModelAndView addContact(@ModelAttribute(\"contact\") Contact contact)\r\n\t\t\tthrows Exception {\n\r\n\t\tModelAndView modelAndView = new ModelAndView();\r\n\t\tmodelAndView.setViewName(\"manageContact\");\r\n\t\tmodelAndView.addObject(\"id\", contact.getFirstName());\r\n\t\tmodelAndView.addObject(\"mail\", contact.getAddress());\r\n\t\treturn modelAndView;\r\n\t}", "public void addContactDetails() {\n firstNameField.setText(contact.getFirstName());\n middleNameField.setText(contact.getMiddleName());\n lastNameField.setText(contact.getLastName());\n\n homePhoneField.setText(contact.getHomePhone());\n workPhoneField.setText(contact.getWorkPhone());\n\n homeAddressField.setText(contact.getHomeAddress());\n workAddressField.setText(contact.getWorkAddress());\n\n personalEmailField.setText(contact.getPersonalEmail());\n workEmailField.setText(contact.getWorkEmail());\n\n }", "public void insertEmp(Emp emp) {\n\t\t\n\t}", "@Transactional\n\tpublic void addContact(String contactEmail) throws ValidationException {\n\t\tUser contact = userDao.findUserByEmail(contactEmail);\n\t\tUser currentUser = getCurrentUser();\n\t\tif (currentUser.equals(contact)) {\n\t\t\tthrow new ValidationException(\"That`s your email adress. You can not add your email as your contact\");\n\t\t}\n\t\tif (contact == null) {\n\t\t\tthrow new ValidationException(\"This email doesn`t exist\");\n\t\t}\n\t\tif (currentUser.getContacts().contains(contact)) {\n\t\t\tthrow new ValidationException(\"This email is already added to your contacts\");\n\t\t}\n\t\tcurrentUser.getContacts().add(contact);\n\t}", "void addContact(String name, int number)\r\n\t{\r\n\t\t\r\n\t\tContact a = new Contact(number,name);\r\n\t\tthis.add(a);\r\n\t}", "public void insert(Contact c);", "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "@RequestMapping(\"/addContact.htm\")\r\n\tpublic ModelAndView addContact(@ModelAttribute(\"contact\") Contact contact)\r\n\t\t\tthrows Exception {\n\r\n\t\tModelAndView modelAndView = new ModelAndView();\r\n\t\tmodelAndView.setViewName(\"manageContact\");\r\n\t\tmodelAndView.addObject(\"mycontact\", contact);\r\n\t\treturn modelAndView;\r\n\t}", "public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\n\t}", "public void addAddress(String name,String phone,String email,String company,String lover,String child1,String child2){\n\t\t//Refresh the address book\n\t\tthis.loadAddresses();\n\t\t\n\t\tAddress address=null;\n\t\tfor(Iterator<Address> iter=addresses.iterator();iter.hasNext();){\n\t\t\tAddress temp=iter.next();\n\t\t\tif(temp.getName().trim().equals(name.trim())){\n\t\t\t\t//Found the existed address!\n\t\t\t\taddress=temp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (address == null) {\n\t\t\t//Create new address\n\t\t\taddress = new Address(new Date(), name, phone, email, company, lover, child1, child2);\n\t\t\taddresses.add(address);\n\n\t\t\t// Save to database\n\t\t\ttry {\n\t\t\t\torg.hibernate.Session session = sessionFactory.getCurrentSession();\n\t\t\t\tsession.beginTransaction();\n\t\t\t\tsession.save(address);\n\t\t\t\tsession.getTransaction().commit();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Can't save the message to database.\" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\t//Update the address\n\t\t\taddress.setPhone(phone);\n\t\t\taddress.setEmail(email);\n\t\t\taddress.setCompany(company);\n\t\t\taddress.setLover(lover);\n\t\t\taddress.setChild1(child1);\n\t\t\taddress.setChild2(child2);\n\t\t\tthis.updateAddress(address);\n\t\t}\n\t}", "public void addContact(String tel, String corr){\n\t\n\t\tif(!emergencia_esta_Ocupado[0]){\n\t\t\taddView(0,tel,corr);\n\t\t}else if(!emergencia_esta_Ocupado[1]){\n\t\t\taddView(1,tel,corr);\n\t\t}\n\t}", "public void addContactPeupler(IContact contact) {\n\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"*******************je suis dans addContact peupler *******************************************\");\n\t\t\tsessionFactory.getCurrentSession().save(contact);\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void add(ActionEvent e) {\r\n Customer newCustomer = new Customer();\r\n newCustomer.setContactfirstname(tempcontactfirstname);\r\n newCustomer.setContactlastname(tempcontactlastname);\r\n save(newCustomer);\r\n addRecord = !addRecord;\r\n }", "@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}", "public void addContact(String on_cloudkibo, String lname, String phone, String uname, String uid, String shareddetails,\r\n \t\tString status) {\r\n\r\n\r\n ContentValues values = new ContentValues();\r\n //values.put(Contacts.CONTACT_FIRSTNAME, fname); // FirstName\r\n //values.put(Contacts.CONTACT_LASTNAME, lname); // LastName\r\n values.put(Contacts.CONTACT_PHONE, phone); // Phone\r\n values.put(\"display_name\", uname); // UserName\r\n values.put(Contacts.CONTACT_UID, uid); // Uid\r\n values.put(Contacts.CONTACT_STATUS, status); // Status\r\n values.put(Contacts.SHARED_DETAILS, shareddetails); // Created At\r\n values.put(\"on_cloudkibo\", on_cloudkibo);\r\n\r\n // Inserting Row\r\n try {\r\n// if(getContactName(phone) != null){\r\n// SQLiteDatabase db = this.getWritableDatabase();\r\n// db.update(Contacts.TABLE_CONTACTS,values,\"phone='\"+phone+\"'\",null);\r\n// db.close();\r\n// }else{\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n db.replace(Contacts.TABLE_CONTACTS, null, values);\r\n db.close();\r\n// }\r\n } catch (android.database.sqlite.SQLiteConstraintException e){\r\n Log.e(\"SQLITE_CONTACTS\", uname + \" - \" + phone);\r\n ACRA.getErrorReporter().handleSilentException(e);\r\n }\r\n // Closing database connection\r\n }", "@GetMapping(\"/add-contact\")\n\tpublic String openAddContactForm(Model model) {\n\t\tmodel.addAttribute(\"title\",\"Add Contact\");\n\t\tmodel.addAttribute(\"contact\",new Contact());\n\t\treturn \"normal/add_contact_form\";\n\t}", "public void addContact(Contact contact) {\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_ID, contact.get_id());\n\t\tvalues.put(KEY_USER_FIRST_NAME, contact.getFirst_name());\n\t\tvalues.put(KEY_USER_LAST_NAME, contact.getLast_name());\n\t\tvalues.put(KEY_USER_NAME, contact.getUser_name());\n\t\tvalues.put(KEY_USER_PWD, contact.getPwd());\n\t\tvalues.put(KEY_USER_CONFIRMPWD, contact.getConfirm_pwd());\n\t\tvalues.put(KEY_PH_NO, contact.getPhone_number());\n\t\tvalues.put(KEY_GENDER, contact.getGenderValue());\n\t\tvalues.put(KEY_ADDR_ONE, contact.getAddr_1());\n\t\tvalues.put(KEY_ADDR_TWO, contact.getAddr_2());\n\t\tvalues.put(KEY_CITY, contact.getCity());\n\t\tvalues.put(KEY_STATE, contact.getState());\n\t\tvalues.put(KEY_ZIP, contact.getZipcode());\n\t\tvalues.put(KEY_DOB, contact.getDob());\n\n\t\t// Inserting Row\n\t\tmSqLiteDatabase.insert(USERDETAILS_TABLE, null, values);\n\t\t// mSqLiteDatabase.close(); // Closing database connection\n\t}", "public void addContact() throws IOException {\n\t\t\n\t\tContact contact = Contact.getContact();\n\t\twhile (checkPhone(contact.getPhone()) != -1) {\n\t\t\tSystem.out.println(\"Phone already exits. Please input again!\");\n\t\t\tcontact.setPhone(getString(\"phone\"));\n\t\t}\n\t\tlist.add(contact);\n\t\tSystem.out.println(\"---Added\");\n\t}", "public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;", "public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}", "public void addEntry(String name, String postalAddress, String Phone, String email, String note) {\r\n AddressEntry contact = new AddressEntry.Builder(name).postalAddress(postalAddress)\r\n .phoneNumber(Phone).email(email).note(note).build();\r\n insertAlphabeticalOrder(contact);\r\n }", "public void addContacts(Contact contact) {\n SQLiteDatabase db = dbOpenHelper.getReadableDatabase();\n ContentValues values = new ContentValues();\n\n values.put(KEY_FNAME, contact.getFName());\n values.put(KEY_POTO, contact.getImage());\n\n\n db.insert(TABLE_CONTACTS, null, values);\n db.close();\n }", "public void add (String id, String email, int type, String name);", "public void create_contact(String contactName, SupplierCard supplier) {\n supplier_dao.create_contact(contactName, supplier);\n }", "@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}", "public void contact_add(contact contact){\n \t\n \tif (contact.type_get() == contact.TYPE_PERSON) {\n \t\tcontact check_contact = contact_get_person_by_address(contact.address_get());\n \t\tif (check_contact != null) {\n \t\t\tLog.d(\"contact_add\", \"contact exists with address \" + contact.address_get());\n \t\t\treturn;\n \t\t}\n \t} else {\n \t\tcontact check_contact = contact_get_group_by_address_and_group(contact.address_get(), contact.group_get());\n \t\tif (check_contact != null) {\n \t\t\tLog.d(\"contact_add\", \"contact exists with address \" + contact.address_get());\n \t\t\treturn;\n \t\t}\n \t}\n \t\n \t// 1. get reference to writable DB\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_CONTACT_ADDRESS, contact.address_get());\n \tvalues.put(KEY_CONTACT_NAME, contact.name_get());\n \tvalues.put(KEY_CONTACT_TYPE, contact.type_get());\n \tvalues.put(KEY_CONTACT_KEYSTAT, contact.keystat_get());\n \tif (contact.type_get() == contact.TYPE_GROUP)\n \t\tvalues.put(KEY_CONTACT_MEMBERS, contact.members_get_string());\n \tvalues.put(KEY_CONTACT_LASTACT, contact.time_lastact_get());\n \tvalues.put(KEY_CONTACT_UNREAD, contact.unread_get());\n \tvalues.put(KEY_CONTACT_GROUP, contact.group_get());\n\n \t// 3. insert\n \tdb.insert(TABLE_CONTACT, // table\n \t\t\tnull, //nullColumnHack\n \t\t\tvalues); // key/value -> keys = column names/ values = column values\n\n \t// 4. close\n \tdb.close();\n }", "void addContact(Contact contact) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, contact.get_name()); // Contact Name\n values.put(KEY_AUDIOS, contact.get_audios());\n values.put(KEY_CONTENTS, contact.get_contents());\n values.put(KEY_CAPTURED_IMAGE, contact.get_captured_image());\n values.put(KEY_DELETE_VAR, contact.get_delelte_var());\n values.put(KEY_GALLERY_IMAGE, contact.get_gallery_image());\n values.put(KEY_PHOTO, contact.get_photo());\n values.put(KEY_RRECYCLE_DELETE, contact.get_recycle_delete());\n\n // Inserting Row\n db.insert(TABLE_CONTACTS, null, values);\n //2nd argument is String containing nullColumnHack\n db.close(); // Closing database connection\n }", "public void addContact(Contact contact) {\n SQLiteDatabase db = null;\n try {\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n //values.put(KEY_ID, contact.getID()); // Contact ID id identity\n values.put(KEY_DEVICE_ID, contact.getDeviceID()); // Contact DeviceID\n values.put(KEY_DISPLAY_WIDTH, contact.getDisplayWidth()); // Contact DisplayWidth\n values.put(KEY_DISPLAY_HEIGHT, contact.getDisplayHeight()); // Contact DisplayHeight\n values.put(KEY_SURNAME, contact.getSurname()); // Contact Surname\n values.put(KEY_IP, contact.getIP()); // Contact IP\n values.put(KEY_HOST_NAME, contact.getHostName()); // Contact hostName\n values.put(KEY_AVATAR, contact.getAvatar()); // Contact Avatar\n values.put(KEY_OSTYPE, contact.getOSType()); // Contact OSType\n values.put(KEY_VER_NO, contact.getVersionNumber()); // Contact versionNumber\n values.put(KEY_PH_NO, contact.getPhoneNumber()); // Contact PhoneNumber\n values.put(KEY_SERVICE_NAME, contact.getServiceName()); // Contact ServiceName\n values.put(KEY_IS_ONLINE, contact.getOnline()?1:0); // Contact PhoneNumber\n\n // Inserting Row\n db.insert(TABLE_CONTACT, null, values);\n }catch (Exception e){\n Log.e(TAG,\"addContact:\"+e.getMessage());\n throw e;\n }finally {\n if(db!= null && db.isOpen())\n db.close(); // Closing database connection\n }\n\n }", "public Contact(String name)\n {\n if(name == null || name.equals(\"\")) {\n throw new IllegalArgumentException(\"Name cannot be null.\");\n }\n \n this.name = name;\n this.agenda = new ArrayList<Appointment>();\n }", "public ContactInfo(String name, Integer age, PhoneNo phoneNo, CurrAddress currAddress, String email) {\n this.name = name;\n this.age = age;\n this.phoneNo = phoneNo;\n this.currAddress = currAddress;\n this.email = email;\n }", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "public void addEmailAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO email_id_info (`person_id`, `email_id`, `created_date`) values (?, ?, curdate())\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setString(2,address.getEmailAddress());\n\t\t \n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t ResultSet rs = stmt.getGeneratedKeys();\n\t\t if (rs.next()) {\n\t\t int newId = rs.getInt(1);\n\t\t address.setEmailAddressId(String.valueOf(newId));\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Emaail Address Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic String addContact(Contact contact) {\n\t\treturn null;\n\t}", "public static void addContact() {\n boolean isBadEmail = true;\n boolean keepLooping = true;\n myScanner.nextLine();\n System.out.println(\"Input contact first name: \\t\");\n String firstName = myScanner.nextLine();\n firstName = firstName.substring(0,1).toUpperCase() + firstName.substring(1).toLowerCase();\n System.out.println(\"Input contact last name: \\t\");\n String lastName = myScanner.nextLine();\n lastName = lastName.substring(0,1).toUpperCase() + lastName.substring(1).toLowerCase();\n String email = \"\";\n do {\n System.out.println(\"Input contact email: \\t\");\n email = myScanner.nextLine();\n if(email.contains(\"@\") && email.contains(\".\")) {\n isBadEmail = false;\n } else {\n System.out.println(\"Please input a proper email address.\");\n }\n } while (isBadEmail);\n String phone = \"\";\n do {\n System.out.println(\"Input contact ten digit phone number without any special characters: \\t\");\n try {\n long phoneNumber = Long.valueOf(myScanner.next());\n if(Long.toString(phoneNumber).length() == 10) {\n keepLooping = false;\n phone = Long.toString(phoneNumber);\n }\n } catch(Exception e) {\n System.out.println(\"Invalid input.\");\n }\n } while(keepLooping);\n Contact newContact = new Contact(firstName, lastName, phone, email);\n contactList.add(newContact.toContactString());\n System.out.println(\"You added: \" + newContact.toContactString());\n writeFile();\n }", "void addEmployee(Employee emp){\n\t\tEntityManager em = emf.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\tem.persist(emp);\n\t\ttx.commit();\n\t\tem.close();\n\t}", "public void add() {\n\t\ttry (RandomAccessFile raf = new RandomAccessFile(\"Address.dat\", \"rw\")) // Create RandomAccessFile object\n\t\t{\n\t\t\traf.seek(raf.length()); // find index in raf file\n\t\t\t // # 0 -> start from 0\n\t\t\t // # 1 -> start from 93 (32 + 32 + 20 + 2 + 5 + '\\n')\n\t\t\t // # 2 -> start from 186 (32 + 32 + 20 + 2 + 5 + '\\n') * 2\n\t\t\t // # 3 -> start from 279 (32 + 32 + 20 + 2 + 5 + '\\n') * 3\n\t\t \twrite(raf); // store the contact information at the above position\n\t\t}\n\t\tcatch (FileNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IndexOutOfBoundsException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif (!nameEditText.getText().toString().equalsIgnoreCase(\"\")\n\t\t\t\t\t&& !phoneNumberEditText.getText().toString()\n\t\t\t\t\t\t\t.equalsIgnoreCase(\"\")) {\n\t\t\t\t\n\t\t\t\tSCContact scContact = new SCContact();\n\t\t\t\tscContact.setName(nameEditText.getText().toString());\n\t\t\t\tscContact.setNumber(phoneNumberEditText.getText().toString());\n\t\t\t\tscContact.setId(contactID);\n\t\t\t\tif (insertOrUpdate) {\n\t\t\t\t\t\n\t\t\t\t\tcontactRepository = new ContactRepository(AddEmergencyContactsActivity.this);\n\t\t\t\t\tcontactRepository.insertContact(scContact);\n\t\t\t\t} else {\n\t\t\t\t\tcontactRepository = new ContactRepository(AddEmergencyContactsActivity.this);\n\t\t\t\t\tcontactRepository.updateContact(scContact);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "private PageAction getAddToContactsAction() {\n return new PageAction() {\n @Override\n public void run() {\n final Transfer transfer = data.getTransfer();\n if(transfer != null && transfer.getBasicMember() != null) { \n contactService.saveContact(transfer.getBasicMember().getId(), new BaseAsyncCallback<Contact>() {\n @Override\n public void onSuccess(Contact result) {\n Parameters params = new Parameters();\n params.add(ParameterKey.ID, result.getMember().getId());\n params.add(ParameterKey.SAVE, true);\n Navigation.get().go(PageAnchor.CONTACT_DETAILS, params);\n } \n }); \n } \n }\n @Override\n public String getLabel() { \n return messages.addToContacts();\n } \n };\n }", "public addEmployee() {\n initComponents();\n \n conn = db.java_db();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width / 2 - getWidth() / 2, size.height / 2 - getHeight() / 2);\n }", "public void addContacts(List<Contact> contactList){\n for(Contact contact:contactList){\n addContact(contact);\n }\n }", "public static void addContact(Contact contact)\n\t{\t\t\n\t\ttry(PrintWriter file = new PrintWriter(new BufferedWriter(new FileWriter(\"contacts.txt\", true)))) {\n\t\t file.println(contact.getName().toUpperCase() + \"##\" + contact.getPhone().toUpperCase());\n\t\t}catch (Exception ex) {}\n\t}", "private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void addContact(String name, String number) {\n\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"./src/data/contactInfo.text\", true));\n\t\t\twriter.write(name);\n\t\t\twriter.write(\" | \");\n\t\t\twriter.write(number);\n\t\t\twriter.write(\" |\");\n\t\t\twriter.newLine();\n\t\t\twriter.close();\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void executeAsyncTaskAddContact() {\n final Uri uri = buildWebServiceUriAddContact();\n final JSONObject json = new JSONObject();\n try {\n json.put(\"email\", mSavedState.getString(getString(R.string.keyMyEmail)));\n json.put(\"myContactID\", mContact.getID());\n json.put(\"colorA\", randomColor());\n json.put(\"colorB\", randomColor());\n //Defaults to adding a contact of doDelete is not specified.\n } catch (Exception e) {\n //woopsy\n }\n new SendPostAsyncTask.Builder(uri.toString(), json)\n .onPreExecute(this::handleAccountUpdateOnPre)\n .onPostExecute(this::handleAddAccountOnPost)\n .onCancelled(this::handleErrorsInTask)\n .build().execute();\n }", "private void addEmployeeInfo(Section catPart) throws SQLException, IOException{\r\n PdfPTable employee = new PdfPTable(1);\r\n \r\n Paragraph empId = new Paragraph(\"Medarbejdernummer: \"+model.getTimeSheet(0).getEmployeeId());\r\n PdfPCell empIdCell = new PdfPCell(empId);\r\n empIdCell.setBorderColor(BaseColor.WHITE);\r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n Paragraph empName = new Paragraph(\"Navn: \" + name);\r\n PdfPCell empNameCell = new PdfPCell(empName);\r\n empNameCell.setBorderColor(BaseColor.WHITE);\r\n \r\n employee.setHeaderRows(0);\r\n employee.addCell(empIdCell);\r\n employee.addCell(empNameCell);\r\n employee.setWidthPercentage(80.0f);\r\n \r\n catPart.add(employee);\r\n }", "public boolean createPersonalDetails(Integer staffID, String surname, String name, Date dob, String address, String town, String county,\n String postCode, String telNo, String mobileNo, String emergencyContact, String emergencyContactNo){\n\n\n hrDB.addPDRecord(staffID, surname, name, dob, address, town, county,\n postCode, telNo, mobileNo, emergencyContact, emergencyContactNo);\n return true;\n\n\n }", "private void saveContact() throws SQLException {\n \n if (checkFieldsForSaving()) {\n\n clsContactsDetails mContactDetails = new clsContactsDetails();\n\n //Differentiate between the two saving modes new and modify.\n clsContacts.enmSavingMode mSavingMode = null;\n if (this.pStatus == enmStatus.New) {\n mSavingMode = clsContacts.enmSavingMode.New;\n } else if (this.pStatus == enmStatus.Modify) {\n mSavingMode = clsContacts.enmSavingMode.Modify;\n\n int mID = ((clsContactsTableModel) tblContacts.getModel()).getID(tblContacts.getSelectedRow());\n int mIDModifications = ((clsContactsTableModel) tblContacts.getModel()).getIDModifications(tblContacts.getSelectedRow());\n mContactDetails.setID(mID);\n mContactDetails.setIDModification(mIDModifications);\n }\n\n //Create the contact details.\n mContactDetails.setFirstName(txtFirstName.getText());\n mContactDetails.setMiddleName(txtMiddleName.getText());\n mContactDetails.setLastName(txtLastName.getText());\n mContactDetails.setBirthday(dtpBirthday.getDate());\n mContactDetails.setGender(getGender());\n mContactDetails.setStreet(txtStreet.getText());\n mContactDetails.setPostcode(txtPostcode.getText());\n mContactDetails.setCity(txtCity.getText());\n mContactDetails.setCountry(txtCountry.getText());\n mContactDetails.setAvailability(txtAvailability.getText());\n mContactDetails.setComment(txtComment.getText());\n \n int mIDContacts = this.pModel.saveContact(mSavingMode, mContactDetails);\n if (mIDContacts > 0) {\n this.pStatus = enmStatus.View;\n setComponents();\n \n //Select the created or modified row.\n if (mSavingMode == clsContacts.enmSavingMode.New) {\n this.pSelectedRow = getRowOfID(mIDContacts);\n }\n selectContact();\n }\n }\n }", "@Test\n\tpublic void testingAddNewEmployee() {\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"emailAddress\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tWebElement newEmployee = driver.findElement(By.linkText(\"FirstName LastName\"));\n\t\tassertNotNull(newEmployee);\n\t\t\n\t}", "Contact(final String n, final String e, final String p) {\n this.name = n;\n this.email = e;\n this.phoneNumber = p;\n }", "public PDContactSend(Long org_id, String name, String email, String phone) {\n this.org_id = org_id;\n this.name = name;\n ContactDetail emailDetail = new ContactDetail(email, true);\n ContactDetail phoneDetail = new ContactDetail(phone, true);\n this.email = new ArrayList<>();\n this.email.add(emailDetail);\n this.phone = new ArrayList<>();\n this.phone.add(phoneDetail);\n this.active_flag = true;\n }", "public void add(Employee emp)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_ADD_EMPLOYEE_REQUEST, emp, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_ADD_EMPLOYEE_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription addNewControlPersons();", "public void addContact(Contact contact) {\n\t\tif (!isContactExist(findContact(contact.getName()))) {\n\t\t\tcontacts.add(contact);\n\t\t\tSystem.out.println(\"Contact added\");\n\t\t}\n\t\telse System.out.println(\"Contact already exists\");\n\t}", "public static ApplicantContactInfo createEntity(EntityManager em) {\n ApplicantContactInfo applicantContactInfo = new ApplicantContactInfo()\n .applicantsHomeAddress(DEFAULT_APPLICANTS_HOME_ADDRESS)\n .telephoneNumber(DEFAULT_TELEPHONE_NUMBER)\n .email(DEFAULT_EMAIL)\n .employer(DEFAULT_EMPLOYER)\n .employersAddress(DEFAULT_EMPLOYERS_ADDRESS);\n return applicantContactInfo;\n }", "public Address add() {\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER INFORMATION FOR A NEW ENTRY +\");\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String firstName = console.promptForString(\" FIRST NAME: \");\n String lastName = console.promptForString(\" LAST NAME: \");\n String street = console.promptForString(\" STREET: \");\n String city = console.promptForString(\" CITY: \");\n String state = console.promptForString(\" STATE: \");\n String zip = console.promptForString(\" ZIPCODE: \");\n\n Address add = new Address(utils.nameFormatter(firstName), utils.nameFormatter(lastName), street, city, state, zip);\n\n return add;\n }", "public static Collection add() {\n\t\tString firstName, lastName, address, city, state, phoneNo, email; // Attributes to be added\n\t\tlong zipCode;\n\n\t\t// asking user input\n\t\tSystem.out.println(\"Please enter details to be added.\");\n\t\tSystem.out.print(\"First Name: \");\n\t\tfirstName = sc.next();\n\t\tSystem.out.print(\"Last Name: \");\n\t\tlastName = sc.next();\n\n\t\t// Checking for duplicates\n\t\tif (record.stream().anyMatch(obj -> obj.firstName.equals(firstName))\n\t\t\t\t&& record.stream().anyMatch(obj -> obj.lastName.equals(lastName))) {\n\t\t\tSystem.out.println(\"This contact already existes. Resetting\");\n\t\t\tadd();\n\t\t\treturn null;\n\t\t}\n\n\t\tSystem.out.print(\"Address: \");\n\t\taddress = sc.next();\n\t\tSystem.out.print(\"City: \");\n\t\tcity = sc.next();\n\t\tSystem.out.print(\"State: \");\n\t\tstate = sc.next();\n\t\tSystem.out.print(\"ZipCode: \");\n\t\tzipCode = sc.nextLong();\n\t\tSystem.out.print(\"Phone No.: \");\n\t\tphoneNo = sc.next();\n\t\tSystem.out.print(\"Email: \");\n\t\temail = sc.next();\n\n\t\t// saving as new entry\n\t\tCollection entry = new Collection(firstName, lastName, address, city, state, zipCode, phoneNo, email);\n\t\tperson_cityMap.put(city, entry);\n\t\tperson_cityMap.put(state, entry);\n\t\treturn entry; // returning entry to main\n\t}", "public void initContactCreation() {\n click(By.linkText(\"add new\"));\n //wd.findElement(By.linkText(\"add new\")).click();\n }", "@Secured({ })\n\t\t@RequestMapping(value = \"/contacts\", method = RequestMethod.POST, headers = \"Accept=application/json\")\n\tpublic Contact insert(@RequestBody Contact obj) {\n\t\tContact result = contactService.insert(obj);\n\n\t \n\t\t\n\t\treturn result;\n\t}", "@GetMapping(value = { \"/\", \"/addContact\" })\r\n\tpublic String loadForm(Model model) {\r\n\t\tmodel.addAttribute(\"contact\", new Contact());\r\n\t\treturn \"contactInfo\";\r\n\t}", "private void addRecord() {\n\t\tContactData cd = new ContactData(contactDataId, aName, aLastname,\n\t\t\t\taDate, aAdress, aGender, aImage);\n\t\tIntent intent = getIntent();\n\t\tintent.putExtra(\"ContactData\", cd);\n\t\tsetResult(RESULT_OK, intent);\n\t\tfinish();\n\t\tonDestroy();\n\t}", "@ApiMethod(name = \"createContact\", path = \"contact\", httpMethod = HttpMethod.POST)\n\tpublic Contact createContact(final ContactForm form) {\n\t\tfinal Key<Contact> key = Contact.allocateKey();\n\t\tContact contact = new Contact(key.getId(), form);\n\n\t\tofy().save().entity(contact).now();\n\n\t\treturn contact;\n\t}", "@Override\r\n\tpublic Employee addEmployeeData(Employee emp) {\n\t\treturn employeeDAO.addEmployee(emp);\r\n\t}", "public void addContact(Contact contactToAdd)\n {\n for (Contact contact: mContacts)\n {\n if (contact.getEmail().equals(contactToAdd.getEmail()))\n {\n //exit if contact exists in the list\n return;\n }\n }\n mContacts.add(contactToAdd);\n }", "public static void registerEmployee(RequestHandler handler) {\n\n\t\tEmployee e = new Employee();\n\t\te.setId(-1);\n\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\nPlease enter employee email: \");\n\t\thandler.sendMessage(sb);\n\t\tString eEmail = handler.getMessage();\n\n\t\tif (eEmail != null) {\n\t\t\thandler.sendMessage(\"RECEIVED: \" + eEmail);\n\t\t\tif (Utils.isValidEmailAddress(eEmail)) {\n\t\t\t\tif (!EmployeeData.emailExists(eEmail)) {\n\t\t\t\t\t// we have a valid, unique email address\n\t\t\t\t\te.setEmail(eEmail);\n\t\t\t\t\thandler.sendMessage(\"Please enter employee name: \");\n\t\t\t\t\teEmail = null;\n\n\t\t\t\t\tString eName = handler.getMessage();\n\t\t\t\t\tif (eName != null && eName.length() > 0) {\n\n\t\t\t\t\t\te.setName(eName);\n\t\t\t\t\t\thandler.sendMessage(\"Please enter department name: \");\n\t\t\t\t\t\teName = null;\n\n\t\t\t\t\t\tString eDept = handler.getMessage();\n\t\t\t\t\t\tif (eDept != null && eDept.length() > 0) {\n\t\t\t\t\t\t\te.setDepartment(eDept);\n\n\t\t\t\t\t\t\tif (EmployeeData.addEmployee(e)) {\n\t\t\t\t\t\t\t\thandler.sendMessage(\"Employee \" + e.getEmail() + \" successfully added with ID \" + e.getId());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\thandler.sendMessage(\"Failed to add employee \" + e.getEmail() + \", reason unknown\");\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 {\n\t\t\t\t\thandler.sendMessage(\"User with email \" + eEmail + \" already exists on system - ABORTING\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler.sendMessage(\"Invalid email address format for: \" + eEmail + \" - ABORTING\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "int insert(Emp record);", "private void save() {\n Toast.makeText(ContactActivity.this, getString(R.string.save_contact_toast), Toast.LENGTH_SHORT).show();\n\n String nameString = name.getText().toString();\n String titleString = title.getText().toString();\n String emailString = email.getText().toString();\n String phoneString = phone.getText().toString();\n String twitterString = twitter.getText().toString();\n \n if (c != null) {\n datasource.editContact(c, nameString, titleString, emailString, phoneString, twitterString);\n }\n else {\n \tc = datasource.createContact(nameString, titleString, emailString, phoneString, twitterString);\n }\n }", "@RequestMapping(\"/addContact\")\n\tprivate ResponseEntity<String> addContact(Contacts contact) throws JsonProcessingException {\n\t\t\n\t\tHttpHeaders responseHeaders = new HttpHeaders();\n\t\t\n//\t\t// check if id taken\n//\t\tif(c_service.getContactById(contact.getId()) != null) {\n//\t\t\treturn new ResponseEntity<String>(responseHeaders, HttpStatus.NOT_FOUND); \n//\t\t}\n\t\t\n\t\t\n\t\tContacts validation_contact = c_service.addContact(contact);\n\t\t\n\t\t\n\t if (validation_contact == null) {\n\t return new ResponseEntity<String>(\"Adding failed\", responseHeaders, HttpStatus.NOT_FOUND);\n\t } else {\n\t responseHeaders.add(\"Content-Type\", \"application/json\");\n\t String json = convertToJson(validation_contact);\n\t return new ResponseEntity<String>(json, responseHeaders, HttpStatus.OK); \n\t }\t\n\t}", "public Contacts(int contactID, String contactName, String email) {\r\n this.contactID = contactID;\r\n this.contactName = contactName;\r\n this.email = email;\r\n }", "private static boolean addContact (String name){\n\t\t//If the contact is found, we donīt add it\n\t\tif (findContact(name)!=-1) return false;\n\t\t//Looking where to store the contact \n\t\tboolean added = false;\n\t\tfor (int ii=0; ii<contacts.length && !added; ii++){\n\t\t\t//We look for the first element that is null (empty position)\n\t\t\tif (contacts[ii]==null) {\n\t\t\t\tcontacts[ii]= new Contact(name);\n\t\t\t\tadded = true;\n\t\t\t}\n\t\t}\n\t\t//If added is still false it is because there are no empty positions\n\t\treturn added;\n\t}", "public void populateContactsTable() {\n Contact contact1 = createContactFromFile(\"DummyContact1.json\");\n Contact contact2 = createContactFromFile(\"DummyContact2.json\");\n contacts = new ArrayList<>();\n contacts.add(contact1);\n contacts.add(contact2);\n\n contactService.postContact(contact1);\n contactService.postContact(contact2);\n }", "@Override\n public void onClick(View v) {\n String name = nameEditText.getText().toString();\n String phoneNumber = phoneEditText.getText().toString();\n\n //create a Contact Object to add\n Contact contact1 = new Contact(name, phoneNumber);\n\n //add contact1 object to database\n int temp = 0;\n for (Contact contact : contacts) {\n if (contact.getName().equals(name) && contact.getPhoneNumber().equals(phoneNumber)){\n Toast.makeText(MainActivity.this, \"This contact does exists\", Toast.LENGTH_SHORT).show();\n temp = 1;\n break;\n }\n if (contact.getName().equals(name)) {\n replaceContact(contact1);\n temp = 1;\n break;\n }\n }\n if (temp == 0) {\n addContact(contact1);\n }\n }", "public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().add_element_user(EMPLOYEE$0);\r\n return target;\r\n }\r\n }" ]
[ "0.70472145", "0.68108654", "0.67827266", "0.6748408", "0.6707507", "0.66647243", "0.6641227", "0.6633093", "0.6572135", "0.6490846", "0.64818984", "0.6477987", "0.6459046", "0.6457389", "0.64090866", "0.63634896", "0.6344659", "0.63423353", "0.6341715", "0.6339069", "0.63390684", "0.63098824", "0.6293217", "0.62856776", "0.6268157", "0.62350494", "0.6234937", "0.62275827", "0.61997664", "0.6156437", "0.61476225", "0.6138584", "0.61276895", "0.61224973", "0.6082532", "0.6062052", "0.6054094", "0.6044673", "0.60246515", "0.60218805", "0.6009455", "0.6007679", "0.5999194", "0.5983846", "0.5952709", "0.5945274", "0.59408677", "0.5912012", "0.5906755", "0.58876795", "0.58701456", "0.5860206", "0.5854385", "0.5853025", "0.58499426", "0.58419913", "0.5818997", "0.5811847", "0.5801206", "0.5790301", "0.5784919", "0.5780395", "0.5772735", "0.5765312", "0.57648546", "0.5752142", "0.5741404", "0.57403004", "0.5726332", "0.57200646", "0.5713126", "0.5711762", "0.5711347", "0.57105654", "0.5710182", "0.5710168", "0.57070816", "0.57023156", "0.5697964", "0.5697685", "0.5695057", "0.5691868", "0.56855637", "0.56851333", "0.5684582", "0.5684204", "0.5677027", "0.5675965", "0.5651063", "0.56471354", "0.5646829", "0.5644182", "0.563802", "0.5634851", "0.5627991", "0.56260645", "0.5624695", "0.56233376", "0.5620687", "0.5618903" ]
0.71396726
0
To delete a Empcontact detail based on Emp id
@Override public void removeEmpContactDetail(int id) { EmpContactDetail ecd = (EmpContactDetail) template.get(EmpContactDetail.class, new Integer(id)); if (null != ecd) { template.delete(ecd); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteEmp(int empno) {\n\t\t\n\t}", "@Override\n\tpublic void removeEmpContactDetail(int id) {\n\t\tthis.empContactDetailDAO.removeEmpContactDetail(id);\n\n\t}", "public String deleteEmployee(EmployeeDetails employeeDetails);", "@Override\n\tpublic void deleteEPAData(int empId) {\n\t}", "@Override\n\tpublic String deleteEmp(int eid) {\n\t\treturn eb.deleteEmp(eid);\n\t}", "@Override\n\tpublic void deleteEmployeeById(int empId) {\n\t\t\n\t}", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.DELETE)\r\n\tpublic void deleteCustomerDetails(@PathVariable int empId) throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\teService.deleteEmployeeDetails(empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(204, e.getMessage());\r\n\t\t}\r\n\t}", "public void deleteEmp(Integer id) {\n\t\temployeeMapper.deleteByPrimaryKey(id);\n\t}", "@Override\r\n\tpublic void deleteEmployeeByEmployeeId(long emplloyeeId) {\n\t\t\r\n\t}", "@Override\n public String deleteByPrimaryKey(Integer empId) {\n int result = mapper.deleteByPrimaryKey(empId);\n StringBuffer sb = new StringBuffer(\"\");\n if(result<=0) {\n sb.append(\"删除失败\");\n }else {\n sb.append(\"删除成功\");\n }\n return sb.toString();\n }", "@Override\r\n\tpublic void deleteEmployee(int id) {\n\t\ttry {\r\n\t DirectlyDatabase.update(PropertyManager.getProperty(\"db_employee_delete\"), id +\"\"); \r\n\t\t} catch (SQLException ex) {\r\n System.out.println(ex.toString());\r\n }\t\r\n\t}", "@Override\n\tpublic void deleteEmp(int id) {\n\t\tConnection con=null;\n\t\tPreparedStatement stmt=null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\n\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/ems?user=root&password=root\");\n\t\tString query=\"delete from employee where id=?\";\n\t\tstmt=con.prepareStatement(query);\n\t\tstmt.setInt(1, id);\n\t\tstmt.execute();\n\t\t\n\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void deleteEmployee(Long employeeId) throws ApiDemoBusinessException;", "@Override\n\tpublic EmployeeBean deleteEmployeeDetails(Integer id) throws Exception {\n\t\treturn employeeDao.deleteEmployeeDetails(id);\n\t}", "@Override\n\tpublic void deleteEmployeeById(int id) {\n\t\t\n\t}", "void deleteContact(String id, int position);", "public ResponseEntity<Void> deleteEmp(@ApiParam(value = \"employee id to delete\",required=true) @PathVariable(\"empId\") Long empId) {\n \tEmployee newEmp= empService.getEmployeeById(empId);\n\t\t\n\t\tif(newEmp==null) {\n\t\t\tthrow new ResourceNotFoundException(\"Skill with id \"+empId+\" is not found\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n//\t\t\tLOGGER.trace(\" Trying to trace skills to delete details\");\n\t\t\tempService.deleteEmp(empId);\n\t\t\treturn new ResponseEntity<>(HttpStatus.ACCEPTED);\n\t\t}\n }", "@Override\n public void deleteEmployee(int employeeId) {\n\n }", "public void delete(Employeee em) {\n\t\temployeerepo.delete(em);\n\t}", "@Override\r\n\tpublic int deleteEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "@DeleteMapping(\"/DeleteEmployee/{empId}\")\r\n public String deleteEmployee(@PathVariable String empId) {\r\n return admin.deleteEmployeeService(empId);\r\n }", "@DeleteMapping(value=\"/employes/{Id}\")\n\tpublic void deleteEmployeeDetailsByEmployeeId(@PathVariable Long Id) {\n\t\t\n\t\temployeeService.deleteEmployeeDetails(Id);\t\n\t}", "@Override\n\tpublic void deleteById(int id) throws Exception {\n\t\tupdate(\"delete from contact where id = ?\", new Object[] { id });\n\t}", "public ResponseEntity<Void> deleteEmployeeDetails(@ApiParam(value = \"employee id to delete\",required=true) @PathVariable(\"empId\") Long empId) {\n \tEmployee newEmp= empService.getEmployeeById(empId);\n\t\t\n\t\tif(newEmp==null) {\n\t\t\tthrow new ResourceNotFoundException(\"Skill with id \"+empId+\" is not found\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n//\t\t\tLOGGER.trace(\" Trying to trace skills to delete details\");\n\t\t\tempService.deleteEmployeeDetails(empId);\n\t\t\treturn new ResponseEntity<>(HttpStatus.ACCEPTED);\n\t\t}\n }", "private void deleteEmployee() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "@Override\n\tpublic Employee delete(Employee emp) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void deleteEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.deleteEmployee(Employee emp) delete Employee object whos id is\" + emp.getId());\n\n\t\trepositary.delete(emp);\n\n\t}", "public void deleteEmployee(int id) {\r\n\t\temployee1.remove(id);\r\n\t}", "@DeleteMapping(\"/{ecode}\")\n\tpublic ResponseEntity<Employee> deleteEmployee( @PathVariable (value =\"ecode\") long id) {\n\t\tEmployee existingEmployee = this.employeeRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Employee not found with id: \"+ id));\n\t\t\n\t\tthis.employeeRepository.delete(existingEmployee);\n\t\treturn ResponseEntity.ok().build();\n\t}", "@DeleteMapping(\"/employee/{id}\")\r\n\tpublic void delete(@PathVariable Integer id) {\r\n\t\tempService.delete(id);\r\n\t}", "public void deletePerson() {\n\t\tSystem.out.println(\"*****Delete the record*****\");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\"Enter phone number for deletion : \");\n\t\tlong PhoneDelete = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneDelete) {\n\t\t\t\tdetails[i] = null;\n\t\t\t\tSystem.out.println(\"Record deleted successfully\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@GetMapping(\"/deleteEmployee/{emp_no}\")\n\tpublic String deleteEmployee(@PathVariable(value = \"emp_no\") Integer emp_no) {\n\t\tthis.service.deleteEmployeeById(emp_no);\n\t\treturn \"redirect:/employees\";\n\t}", "public void delete(Employee employee) {\r\n\r\n String sql = \"delete from db.emp where id= ?\";\r\n try {\r\n Connection connection = ConnectDB();\r\n PreparedStatement preparedStatement = connection.prepareStatement(sql);\r\n preparedStatement.setInt(1,employee.getId());\r\n\r\n int rows=preparedStatement.executeUpdate();\r\n String message=rows==1 ? \"A fost sters cu succes\": \"Nu este nimic de sters\";\r\n\r\n System.out.println(message);\r\n\r\n } catch (SQLException Ex) {\r\n System.out.println(Ex.getMessage());\r\n System.out.println(\"Eroare la stergere\"+ Ex.getMessage());\r\n\r\n }\r\n }", "public int deleteRecord(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"delete from employeedbaddress where eNo=?\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "@POST(\"/DeleteEmpire\")\n\tCollection<Empire> deleteEmpire(@Body Empire empire,@Body int id) throws GameNotFoundException;", "public static void deleteContactObj(long id) {\n System.out.println(id);\n contactList.clear();\n Contact deleteMe = null;\n for(Contact contact : contactObjList) {\n if(contact.getId() == id) {\n deleteMe = contact;\n }\n }\n System.out.println(\"You deleted: \" + deleteMe.toContactString());\n contactObjList.remove(deleteMe);\n for(Contact contactObj : contactObjList) {\n contactList.add(contactObj.toContactString());\n }\n }", "public int delComp(Long cid, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String eMail,\r\n\t\tLong shareamt, Long getnoShare)throws SQLException {\n\tLong id=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+cid+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tid=rs.getLong(1);\r\n\t}\r\n\tint i=DbConnect.getStatement().executeUpdate(\"Delete from login where login_id=\"+id+\"\");\r\n\treturn i;\r\n}", "private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public boolean deleteEmployeeDetail(int id) {\n\t\treturn dao.deleteEmployeeDetail(id);\n\t}", "@Override\r\n\tpublic int deleteEmployee(int empId) {\n\t\tint added = 0;\r\n\t\tString insertData = \"delete from employee where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setInt(1, empId);\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\r\n\t}", "@DELETE\n\t@Path(\"{empID}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response remove(@PathParam(\"empID\") int id) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tboolean result = employeeFacade.removeById(id);\n\t\tif (result) {\n\t\t\treturn Response.status(200).build();\n\t\t}\n\t\treturn Response.status(409).build();\n\t}", "@DeleteMapping(\"/deleteEmployee/{id}\")\n\tpublic void deleteEmployee(@PathVariable Long id){\n repo.deleteById(id);\n\t}", "@Override\n\tpublic void deleteEmployee() {\n\n\t}", "public void deleteContact(Address address){\n Address address2 = SearchContact(address.getFirstName(),address.getLastName());\r\n if (address2 != null) {\r\n contact.remove(address2);\r\n }\r\n else {\r\n System.out.println(\"Does not exist\");\r\n }\r\n }", "public String deleteContactPerson() {\n this.contactPersonService.deleteBy(this.id);\n return SUCCESS;\n }", "public void delete(EmployeeEntity entity){\n EmployeeDB.getInstance().delete(entity);\n }", "@RequestMapping( method = RequestMethod.DELETE)\r\n\tpublic void deleteEmp(@RequestParam(\"employeeBankId\") String employeeBankId, HttpServletRequest req) {\r\n\t\tlogger.info(\"deleteEmp is calling :\" + \"employeeBankId\" + employeeBankId);\r\n\t\tLong empBankId = Long.parseLong(employeeBankId);\r\n\t\tbankDetailsService.delete(empBankId);\r\n\t}", "@RequestMapping(value = \"/empregado/deletar/{empregadoId}\\r\\n\",method = RequestMethod.DELETE)\n\tpublic ResponseEntity<EmpregadoDto> deletar(Integer id, EmpregadoDto empDto){\n\t\tOptional<EmpregadoDto> dto = repoEmp.findById(id);\n\t\tif(dto.isPresent()) {\n\t\t\trepoEmp.delete(empDto);\n\t\t\treturn new ResponseEntity<>(HttpStatus.OK);\n\t\t}else {\n\t\t\treturn new ResponseEntity<>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t}", "public int deleteEmp(int id) throws Exception {\n\t\tSession session = null;\n\t\tEmp emp = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tdeleteUser(id);\n\t\t\temp = findEmpById(id);\n\t\t\tsession.delete(emp);\n\t\t\tsession.flush();\n\t\t\treturn 1;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn -1;\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}", "public void deleteContact(int id) {\n\t\tObject record = hibernateTemplate.load(L7ServiceConfig.class, id);\n\t\thibernateTemplate.delete(record);\n\t}", "public void deleteDetalleNominaEmpleado(DetalleNominaEmpleado entity)\n throws Exception;", "public void delContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ Delete Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tthis.contacts.remove(index - 1);\n\t\tshowContactIndex();\n\t}", "public void DeleteCust(String id);", "@RequestMapping(\"/deleteContact\")\n\tprivate ResponseEntity<String> deleteContact(@RequestParam int id) {\n\t\t\n\t\tc_service.deleteContact(id);\n\t\t\t\t\n\t HttpHeaders responseHeaders = new HttpHeaders();\n\t \n\t if (c_service.getContactById(id) == null) {\n\t return new ResponseEntity<String>(responseHeaders, HttpStatus.NO_CONTENT); \n\t }\n\t else return new ResponseEntity<String>(responseHeaders, HttpStatus.NOT_FOUND); \n\t}", "@Override\n\tpublic void deleteEmployee(Employee e) {\n\t\t\n\t}", "@Override\n\tpublic void deleteEmployee(Employee employee) {\n\t\tEmployee deleteEmployee = em.find(Employee.class, employee.getId());\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tem.remove(deleteEmployee);\n\t\t\tem.getTransaction().commit();\n\t\t\tSystem.out.println(\"Employee Data Removed successfully\");\n\t\t\tlogger.log(Level.INFO, \"Employee Data Removed successfully\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Not found\");\n\t\t}\n\n\t}", "@Override\r\n\tpublic boolean deleteEmp(int id) {\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\r\n\t\tEntityTransaction entityTransaction = entityManager.getTransaction();\r\n\r\n\t\ttry {\r\n\t\t\tentityTransaction.begin();\r\n\t\t\tEmployeeBean employeeBean = entityManager.find(EmployeeBean.class, id);\r\n\t\t\tif (employeeBean != null) {\r\n\t\t\t\tentityManager.remove(employeeBean);\r\n\t\t\t\tentityTransaction.commit();\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "int deleteByPrimaryKey(@Param(\"empNo\") Integer empNo, @Param(\"fromDate\") Date fromDate);", "@Override\n\tpublic void delete(CelPhone celphone) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(Integer id) {\n\t\tempdao.deleteById(id);\r\n\t}", "@Override\r\n\tpublic void delete(Employee arg0) {\n\t\t\r\n\t}", "public int DelCompany(Long cid, String compname, Long shareamt, Long getnoShare) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from company where comp_id=\"+cid+\"\");\r\n\treturn i;\r\n}", "public boolean deleteEmployee(int id) {\n\t\tboolean flag = false;\n\t\tMapSqlParameterSource myMap = new MapSqlParameterSource();\n\t\tmyMap.addValue(\"id\", id);\n\t\t\n\t\tint effected = jdbcTemplate.update(\"delete from employee where empId=:id\", myMap);\n\t\tif(effected !=0) {\n\t\t\tflag=true;\n\t\t\tSystem.out.println(\"Employee with id \"+id+\" deleted successfully\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Some proble while deleting data from Employee table\");\n\t\t}\n\t\treturn flag;\n\t}", "void DeleteCompteUser(int id);", "protected void delete(int id) {\n\n log.info(\"CompaniesContactsBean => method : delete()\");\n\n FacesMessage msg;\n\n if (id == 0) {\n log.error(\"CompaniesContacts ID is null\");\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"contact.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return;\n }\n\n CompaniesContactsEntity companiesContactsEntity;\n\n try {\n companiesContactsEntity = findById(id);\n } catch (EntityNotFoundException exception) {\n log.warn(\"Code ERREUR \" + exception.getErrorCodes().getCode() + \" - \" + exception.getMessage());\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"note.notExist\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return;\n }\n\n EntityManager em = EMF.getEM();\n em.getTransaction();\n\n EntityTransaction tx = null;\n try {\n tx = em.getTransaction();\n tx.begin();\n companiesContactsDao.delete(em, companiesContactsEntity);\n tx.commit();\n log.info(\"Delete ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.error(\"Delete Error\");\n } finally {\n em.clear();\n em.close();\n }\n }", "@Override\n\tpublic void deleteEmployee(Employee employee) {\n\t\t\n\t}", "@Override\r\n\tpublic void deleteEmployee(int id) {\n\t\temployees.removeIf(emp -> emp.getEmpId()==(id));\r\n\t}", "@Override\r\n\tpublic Map deleteEmployee(long employeeId) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic boolean deleteEmployeeByEmail(String email) {\n\t\tint isDeleted = template.update(\"delete from employee where email = ?\", email);\n\t\tif (isDeleted > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void deleteEmployee(Long id) {\n employeeRepository.deleteById(id);\n }", "public void deleteEmailInfo(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"DELETE FROM email_id_info \"\n\t\t \t\t+ \" WHERE person_id=?\");\n\t\t \n\t\t stmt.setInt(1, Integer.parseInt(address.getPersonId()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Updating Email Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "private void deleteContact() throws SQLException {\n clsContactsTableModel mModel = (clsContactsTableModel) tblContacts.getModel();\n //Get the entire contact details.\n clsContactsDetails mContactsDetails = mModel.getContactDetails(this.pSelectedRow);\n \n switch (JOptionPane.showInternalConfirmDialog(this, \"Do you really want to delete the contact '\" + mContactsDetails.getFirstName() + \" \" + mContactsDetails.getLastName() + \"'?\", \"Delete contact?\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE)) {\n case JOptionPane.YES_OPTION:\n int mID = ((clsContactsTableModel) tblContacts.getModel()).getID(tblContacts.getSelectedRow());\n if (this.pModel.deleteContact(mID)) {\n this.pSelectedRow = -1;\n fillContactsTable();\n selectContact();\n }\n break;\n }\n }", "@Override\r\n\tpublic void deleteEmployee(Employee t) {\n\t\t\r\n\t}", "public ResultSet deleteCo(Long cid) throws SQLException {\n\t\trs=DbConnect.getStatement().executeQuery(\"select * from company c,share_details s where c.comp_id=s.comp_id and c.comp_id=\"+cid+\" \");\r\n\t\treturn rs;\r\n\t}", "@DeleteMapping(\"/{id}\")\n public ResponseEntity deleteEmployee(@PathVariable(\"id\") Long id){\n Employee employee = employeeService.deleteEmployee(id);\n String responseMessage = String.format(\"Employee: %s ID: %s has been deleted from records.\", employee.getName(), employee.getEmployeeId());\n return new ResponseEntity<>(responseMessage, HttpStatus.OK);\n }", "public ResultSet Delete(Long cid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company_share where comp_id=\"+cid+\" \");\r\n\treturn rs;\r\n}", "@Override\n\tpublic String deleteEmployee(int id) {\n\t\treturn employeeDao.deleteEmployee(id);\n\t}", "public void deleteContact() {\n Intent intent = getIntent(); //start the intent\n try {\n MainActivity.appDb.contactDelete(intent.getStringExtra(\"MyID\")); //try to delete contact from the database\n String delnum = intent.getStringExtra(\"delete_number\");\n Contacts.list.remove(Integer.parseInt(delnum));\n Contacts.listindex.remove(Integer.parseInt(delnum)); //delete it from the list of database id's and the listView\n Contacts.adapter.notifyDataSetChanged(); //update the list view\n }catch(NumberFormatException e){ //if we cant find the entry in the list\n MainActivity.appDb.contactDelete(intent.getStringExtra(\"MyID\")); //just delete the contact from the database\n }\n Intent Newintent = new Intent(viewContacts.this, Contacts.class); // start an intent to go back to contacts\n onActivityResult(1, RESULT_OK, Newintent); //start activity\n finish();\n }", "@Override\n\t/**\n\t * Elimino un empleado.\n\t */\n\tpublic boolean delete(Object Id) {\n\t\treturn false;\n\t}", "@Override\n\tpublic int deleteEmployeeByID(int empid) throws RemoteException {\n\t\treturn DAManager.deleteEmployeeByID(empid);\n\t}", "void deleteByOrgId(String csaOrgId);", "public String deleteDepartmentRow(Departmentdetails departmentDetailsFeed);", "@DeleteMapping(\"/employee/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteEmployee(@PathVariable Long id){\n\t\tEmployee employee = emprepo.findById(id).orElseThrow(()-> new ResourceNotFoundException(\"Employee not exist with id: \"+id ));\n\t\t\n\t\temprepo.delete(employee);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\t\treturn ResponseEntity.ok(response);\n\t\t\t\n\n\t}", "@Override\r\n\tpublic int deleteByExample(EmpExample example) {\n\t\treturn 0;\r\n\t}", "private void deleteEmployee(HttpServletRequest request, HttpServletResponse response)\r\n\t\tthrows Exception {\n\t\tString theEmployeeId = request.getParameter(\"employeeId\");\r\n\t\t\r\n\t\t// delete employee from database\r\n\temployeeDAO.deleteEmployee(theEmployeeId);\r\n\t\t\r\n\t\t// send them back to \"list employees\" page\r\n\t\tlistEmployees(request, response);\r\n\t}", "@Override\n\tpublic boolean deleteEmployeeById(int employeeId) {\n\t\tint isDeleted = template.update(\"delete from employee where empid = ?\", employeeId);\n\t\tif (isDeleted > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void deleteEntity(AnnexDetail entity) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic Integer removeEmp(Integer id) {\n\t\treturn null;\n\t}", "@Override\n public void deleteById(long id) {\n\n Query theQuery = entityManager.createQuery(\"DELETE FROM Employee WHERE id=:employeeId\");\n \n theQuery.setParameter(\"employeeId\", id);\n \n theQuery.executeUpdate();\n }", "public abstract Employee deleteEmployee(int id) throws DatabaseExeption;", "@Override\n\tpublic ResponseEntity<Employee> deleteById(Long id) {\n\t\treturn null;\n\t}", "public void deleteContact(@NotNull Long id) {\n Contact contact = contactRepo.findById(id)\n .orElseThrow(() -> new ContactNotFoundException(id));\n contactRepo.delete(contact);\n }", "@DeleteMapping(\"/employees/{employeeId}\")\n\tpublic String deleteEmployee (@PathVariable int employeeId) {\n\t\tEmployee theEmployee = employeeService.fndById(employeeId);\n\t\t\n\t\t// if employee null\n\t\tif (theEmployee == null) {\n\t\t\tthrow new RuntimeException(\"Employee xx his idEmpl not found \"+ employeeId);\n\t\t\t \n\t\t}\n\t\temployeeService.deleteById(employeeId);\n\t\treturn \"the employe was deleted \"+ employeeId;\n\t\t\n\t}", "public void deleteById(Integer employeeid) {\n\t\temployeerepository.deleteById(employeeid);\n\t}", "public void DeleteEmployee(int idEmployee)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) \n\t\t\t\t{\n\t\t\t\t\tdepartments.get(i).delEmployee(emp);break;\n\t\t\t\t}\n\t\t\t}\n\t}", "public void delEmployee(String person){\n System.out.println(\"Attempt to delete \" + person);\n try {\n String delete =\"DELETE FROM JEREMY.EMPLOYEE WHERE NAME='\" + person+\"'\"; \n stmt.executeUpdate(delete);\n \n \n } catch (Exception e) {\n System.out.println(person +\" may not exist\" + e);\n }\n \n }", "@Delete({\n \"delete from mail_host\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "public void deleteDepartmentByDeptNo(int dept_no);", "public void delete(Address entity);", "public static void deleteContact(String user, long id) {\n Contact contact = Contact.find().byId(id);\n UserInfo userInfo = UserInfo.find().where().eq(\"email\", user).findUnique();\n userInfo.getContacts().remove(contact);\n userInfo.save();\n contact.setUserInfo(null);\n contact.delete();\n }" ]
[ "0.7259046", "0.7050925", "0.7026114", "0.69346917", "0.6804077", "0.6801211", "0.68001074", "0.67456293", "0.6544132", "0.652546", "0.6521855", "0.64972895", "0.64874667", "0.6418046", "0.6389381", "0.6388948", "0.6388869", "0.63872045", "0.6375122", "0.63501596", "0.63399744", "0.63359475", "0.63353485", "0.63032967", "0.6295832", "0.6292595", "0.62871355", "0.62657577", "0.6253535", "0.62496924", "0.6247198", "0.6239533", "0.6237366", "0.6223872", "0.6223691", "0.6199804", "0.6195352", "0.61894137", "0.6187956", "0.61874014", "0.6186903", "0.61758596", "0.61619216", "0.61580056", "0.61491", "0.6139426", "0.6133076", "0.612864", "0.6128032", "0.611106", "0.610849", "0.60963213", "0.60951173", "0.60922426", "0.6086554", "0.60850066", "0.6082883", "0.6080763", "0.6069268", "0.6067702", "0.606515", "0.60633427", "0.60602", "0.60537606", "0.6048391", "0.6045083", "0.60432225", "0.60374177", "0.6020688", "0.6017144", "0.5984511", "0.59822774", "0.5980046", "0.59752643", "0.5970951", "0.59530133", "0.59522", "0.59479487", "0.59310436", "0.5930134", "0.5929956", "0.5917504", "0.5911727", "0.58981824", "0.5897372", "0.5893566", "0.58880067", "0.5886036", "0.5877762", "0.5875085", "0.58748955", "0.58716375", "0.58606035", "0.58595574", "0.5848746", "0.5846764", "0.5842771", "0.5841134", "0.5838199", "0.5827168" ]
0.7068982
1
To update a Emp Contact detail for an existing Emp Contact
@Override public void updateEmpContactDetail(EmpContactDetail empContactDetail) { template.update(empContactDetail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void updateEmpContactDetail(EmpContactDetail empContactDetail) {\n\t\tthis.empContactDetailDAO.updateEmpContactDetail(empContactDetail);\n\t}", "public String changeContactDetails(final EmployeeAddressDTO employeeAddressDTO) throws ApplicationCustomException;", "void update(EmployeeDetail detail) throws DBException;", "@Override\n\tpublic void updateEmployeEmailById(int empid, String email) {\n\t\t\n\t}", "public void updateEmp(Emp emp) {\n\t\t\n\t}", "public void updateDetails(String contactNo, String email, String address) {\n this.contactNo = contactNo;\n this.email = email;\n this.address = address;\n }", "int updateContact(String email, String firstName, String lastName, String phone, String username);", "public void updateEmployeeDetails(EmployeeDetails employeeDetails);", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "@Override\n\tpublic void update(Contact contact) throws Exception {\n\t\tObject[] params = contact.toEditArray();\n\t\tparams = ArrayUtils.add(params, contact.getId());\n\t\tupdate(\"update contact set customer=?, gender=?, age=?, position=?, phone=?, relation=? where id = ?\",\n\t\t\t\tparams);\n\t}", "@Override\n\tpublic void addEmpContactDetail(EmpContactDetail empContactDetail) {\n\t\ttemplate.save(empContactDetail);\n\n\t}", "@PostMapping(\"/update-contact/{cid}\")\n\tpublic String updateContact(@PathVariable(\"cid\") Integer cid,Model m) {\n\t\t\n\t\tm.addAttribute(\"title\",\"Update contact\");\n\t\t\n\t\tContact contact = this.contactRepository.findById(cid).get();\n\t\t\n\t\tm.addAttribute(\"contact\",contact);\n\t\t\n\t\treturn \"normal/update_form\";\n\t}", "public static int handleUpdateContact(Request req, Response res) {\n \n try {\n \n ObjectMapper objectMapper = new ObjectMapper();\n \n logger.info(\"raw body in handleUpdate = \\n\" + req.body());\n \n String data = Jsoup.parse(req.body()).text()\n .replaceAll(Path.Web.OK_PATTERN, \"\");\n \n logger.info(\"Jsoup parsed and escaped data = \\n\" + data);\n \n \n Contact c = objectMapper.readValue(data, Contact.class);\n \n String userIdNew = req.session(false).attribute(Path.Web.ATTR_USER_ID);\n String id = req.params(\"id\");\n \n if(userIdNew != null && !userIdNew.isEmpty() && id != null && !id.isEmpty()) {\n ObjectId objectId = new ObjectId(id); \n c.setUserId(userIdNew);\n c.setId(objectId.toString());\n c.setUpdatedAt(new Date());\n ds = dbHelper.getDataStore();\n\t ds.save(c);\n res.status(200);\n logger.info(\"updated contact object after mapping and setting id = \\n\" + c.toString());\n \n } else {\n //you managed not to login and get here\n logger.info(\"No user id found for the update operation\");\n res.status(500);\n }\n \n } catch(Exception e) {\n logger.info(\"error parsing data from handleUpdateContact \\n\");\n e.printStackTrace();\n res.status(500);\n }\n \n return res.status();\n\t}", "public Employee updateEmployeeDetails(Employee employee) {\n\t\t long requestObjectEmployeeId = employee.getEmployeeId();\n\t\t Employee existedEmployee = employeeDao.findEmployeeByEmployeeId(requestObjectEmployeeId);\n\t\t if(employee != null) {\n\t\t\t return employeeDao.save(employee);\n\t\t }\n\t\t\treturn null;\t\n\t}", "public String UpdateContacts() throws Exception {\n String params = null;\n String result=null;\n String contactlist=new PhoneContacts().getAllContactNumber(this);\n if(contactlist !=null) {\n params = \"&phone=\" + URLEncoder.encode(this.userphone, \"UTF-8\") +\n \"&password=\" + URLEncoder.encode(this.password, \"UTF-8\") +\n \"&action=\" +URLEncoder.encode(\"contactUpdate\", \"UTF-8\") +\n \"&json=\" +URLEncoder.encode(contactlist, \"UTF-8\") +\n \"&\";\n result= socketOperator.sendHttpRequest(params);\n if(result !=LoginActivity.NO_NEW_UPDATE) {\n new StoreContacts(this).JosnDecoding(result);\n result=\"updated\";\n }\n }\n else result=\"No Contacts for update\";\n return result;\n }", "@Override\r\n\tpublic boolean editContact(ContentResolver contentResolver, ContactInfo cInfo) {\r\n\t\tif(cInfo != null) {\r\n\t\t\tlong id = Integer.parseInt(cInfo.get_ID());\r\n\t\t\t\r\n\t\t\t//Update with new name\r\n\t\t\tUri uri = ContentUris.withAppendedId(People.CONTENT_URI, id);\r\n\t\t\tContentValues values = new ContentValues();\r\n\t\t\tvalues.put(PeopleColumns.NAME, cInfo.getDisplayName());\r\n\t\t\tint effectedRows = contentResolver.update(uri, values, null, null);\r\n\t\t\t\r\n\t\t\t//Used to test the above mentioned bug. \r\n\t\t\t//Currently program shows the phone_ID and the _ID as being the same\r\n\t\t\t//This is WRONG\r\n\t\t\tLog.d(TAG, TAG + \" nameSt \" + cInfo.getDisplayName());\r\n\t\t\tLog.d(TAG, TAG + \" nameID \" + cInfo.get_ID());\r\n\t\t\tLog.d(TAG, TAG + \" phoneSt \" + cInfo.getPhoneNumber());\r\n\t\t\tLog.d(TAG, TAG + \" phoneID \" + cInfo.getPhone_ID());\r\n\t\t\t\r\n\t\t\t//Update with new number\r\n\t\t\tUri numberUri = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY);\r\n\t\t\tvalues.clear();\r\n\t\t\tvalues.put(Contacts.Phones.TYPE, getPhoneType(cInfo.getPhoneType()));\r\n\t\t\tvalues.put(People.Phones.NUMBER, cInfo.getPhoneNumber());\r\n\t\t\teffectedRows += contentResolver.update(Uri.withAppendedPath(numberUri, cInfo.getPhone_ID()), values, null, null);\r\n\t\t\t\r\n\t\t\tif(effectedRows <= 0)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static ApplicantContactInfo createUpdatedEntity(EntityManager em) {\n ApplicantContactInfo applicantContactInfo = new ApplicantContactInfo()\n .applicantsHomeAddress(UPDATED_APPLICANTS_HOME_ADDRESS)\n .telephoneNumber(UPDATED_TELEPHONE_NUMBER)\n .email(UPDATED_EMAIL)\n .employer(UPDATED_EMPLOYER)\n .employersAddress(UPDATED_EMPLOYERS_ADDRESS);\n return applicantContactInfo;\n }", "@Override\n\tpublic void addEmpContactDetail(EmpContactDetail empContactDetail) {\n\t\tthis.empContactDetailDAO.addEmpContactDetail(empContactDetail);\n\n\t}", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "@Override\n\tpublic void update(EmpType entity) {\n\t\t\n\t}", "int updateByPrimaryKey(ProEmployee record);", "public void update(Employee e) {\n\t\t\r\n\t}", "@Override\n\tpublic void updateInformation(String firstname, String lastname, String email, int id) {\t\t\n\t\ttry {\n\t\t\tString sql = \"update employees set first_name = '\"+firstname+\"', last_name='\"+lastname+\"',email = '\"+email+\"' where employee_id=\"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\t\t\n\t\t\tstatement.executeUpdate(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String updateContactStatement() {\n\t\treturn \"UPDATE CONTACTS SET (name, surname, title, address, city, \"\n\t\t\t\t+ \"province, postal_Code, region, country , company_Name, \"\n\t\t\t\t+ \"workstation, work_Phone, work_Extension, mobile_Phone, \"\n\t\t\t\t+ \"fax_Number, email, contact_type_id, notes) = (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) \" + \"WHERE id=?\";\n\n\t}", "int updateByPrimaryKey(Email record);", "void updateContact(String id, int status);", "public boolean updateEmployeeDetail(Employee employee) {\n\t\treturn dao.updateEmployeeDetail(employee);\n\t}", "@Override\n\tpublic Employee updateEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.updateEmployee(Employee emp) update Employee object whos id is\" + emp.getId());\n\t\treturn repositary.save(emp);\n\t}", "public void updateContact() {\r\n\t\tSystem.out.println(\"enter the name of the contact whose details are to be updated\");\r\n\t\tString name = scanner.nextLine();\r\n\t\tContact existing = service.getContact(name); //get the existing contact details from service<-dao\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"1. keep the same address\\n2. update the address\");\r\n\t\tint choice = Integer.parseInt(scanner.nextLine());\r\n\t\tString address;\r\n\t\tif(choice==1) {\r\n\t\t\taddress=existing.getAddress();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new address\");\r\n\t\t\taddress = scanner.nextLine();\r\n\t\t}\r\n\t\t\r\n\t\t//mobile number updation\r\n\t\tSystem.out.println(\"1. keep the same mobile number(s)\\n2. add new mobile number\\n3.remove existing added number\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString mobileNumber[];\r\n\t\t\r\n\t\t//if the user wants to keep same mobile number(s)\r\n\t\tif(choice==1) {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t}\r\n\t\t\r\n\t\t//if the user wants to add a new mobile number to already existing \r\n\t\telse if(choice==2) {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t\tList<String> numberList = new ArrayList<>(Arrays.asList(mobileNumber));\r\n\t\t\tSystem.out.println(\"enter new mobile number\");\r\n\t\t\tString newNumber = scanner.nextLine();\r\n\t\t\tif(numberList.contains(newNumber)) {\r\n\t\t\t\tSystem.out.println(\"the number is already a part of this contact\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumberList.add(newNumber);\r\n\t\t\t}\r\n\t\t\tmobileNumber=numberList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t//if the user wants to remove some number from existing numbers\r\n\t\telse {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t\tList<String> numberList = new ArrayList<>(Arrays.asList(mobileNumber));\r\n\t\t\tSystem.out.println(\"enter mobile number to remove\");\r\n\t\t\tString removingNumber = scanner.nextLine();\r\n\t\t\tif(!numberList.contains(removingNumber)) {\r\n\t\t\t\tSystem.out.println(\"no such mobile number exist\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumberList.remove(removingNumber);\r\n\t\t\t}\r\n\t\t\tmobileNumber=numberList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the profile picture\r\n\t\tSystem.out.println(\"1. keep the same image\\n2. update the image\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString imageReference;\r\n\t\tif(choice==1) {\r\n\t\t\timageReference=existing.getImageReference();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new image path\");\r\n\t\t\timageReference = scanner.nextLine();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the date of birth\r\n\t\tSystem.out.println(\"1. keep the same date of birth\\n2. update the date of birth\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tLocalDate dateOfBirth;\r\n\t\tif(choice==1) {\r\n\t\t\tdateOfBirth=existing.getDateOfBirth();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new date of birth\");\r\n\t\t\tdateOfBirth = LocalDate.parse(scanner.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the email - same logic as that of updating mobile number\r\n\t\tSystem.out.println(\"1. keep the same email Id(s)\\n2. add new email Id\\n3.remove existing email Id\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString email[];\r\n\t\tif(choice==1) {\r\n\t\t\temail=existing.getEmail();\r\n\t\t}\r\n\t\telse if(choice==2) {\r\n\t\t\temail=existing.getEmail();\r\n\t\t\tList<String> emailList = new ArrayList<>(Arrays.asList(email));\r\n\t\t\tSystem.out.println(\"enter new email Id\");\r\n\t\t\tString newEmail = scanner.nextLine();\r\n\t\t\tif(emailList.contains(newEmail)) {\r\n\t\t\t\tSystem.out.println(\"the email is already a part of this contact\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\temailList.add(newEmail);\r\n\t\t\t}\r\n\t\t\temail=emailList.toArray(new String[0]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\temail=existing.getEmail();\r\n\t\t\tList<String> emailList = new ArrayList<>(Arrays.asList(email));\r\n\t\t\tSystem.out.println(\"enter email to remove\");\r\n\t\t\tString removingEmail = scanner.nextLine();\r\n\t\t\tif(!emailList.contains(removingEmail)) {\r\n\t\t\t\tSystem.out.println(\"no such email exist\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\temailList.remove(removingEmail);\r\n\t\t\t}\r\n\t\t\temail=emailList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//updating the group id \r\n\t\tSystem.out.println(\"1. keep the same group Id\\n2. update the group Id\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tint groupId;\r\n\t\tif(choice==1) {\r\n\t\t\tgroupId = existing.getGroupId();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new group Id\");\r\n\t\t\tshowGroups(service); \t\t\t\t\t//this is static method which shows the available groups\r\n\t\t\tgroupId = Integer.parseInt(scanner.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t//setting up the contact object \r\n\t\tContact updated = new Contact(name, address, mobileNumber, imageReference, dateOfBirth, email, groupId);\r\n\t\t\r\n\t\t//calling the service update method which calls the DAO to update the contact\r\n\t\tint rowsEffected = service.updateExistingContact(existing, updated);\r\n\t\tSystem.out.println(rowsEffected+\" row(s) updated\");\r\n\t\t\r\n\t}", "private void saveContact() throws SQLException {\n \n if (checkFieldsForSaving()) {\n\n clsContactsDetails mContactDetails = new clsContactsDetails();\n\n //Differentiate between the two saving modes new and modify.\n clsContacts.enmSavingMode mSavingMode = null;\n if (this.pStatus == enmStatus.New) {\n mSavingMode = clsContacts.enmSavingMode.New;\n } else if (this.pStatus == enmStatus.Modify) {\n mSavingMode = clsContacts.enmSavingMode.Modify;\n\n int mID = ((clsContactsTableModel) tblContacts.getModel()).getID(tblContacts.getSelectedRow());\n int mIDModifications = ((clsContactsTableModel) tblContacts.getModel()).getIDModifications(tblContacts.getSelectedRow());\n mContactDetails.setID(mID);\n mContactDetails.setIDModification(mIDModifications);\n }\n\n //Create the contact details.\n mContactDetails.setFirstName(txtFirstName.getText());\n mContactDetails.setMiddleName(txtMiddleName.getText());\n mContactDetails.setLastName(txtLastName.getText());\n mContactDetails.setBirthday(dtpBirthday.getDate());\n mContactDetails.setGender(getGender());\n mContactDetails.setStreet(txtStreet.getText());\n mContactDetails.setPostcode(txtPostcode.getText());\n mContactDetails.setCity(txtCity.getText());\n mContactDetails.setCountry(txtCountry.getText());\n mContactDetails.setAvailability(txtAvailability.getText());\n mContactDetails.setComment(txtComment.getText());\n \n int mIDContacts = this.pModel.saveContact(mSavingMode, mContactDetails);\n if (mIDContacts > 0) {\n this.pStatus = enmStatus.View;\n setComponents();\n \n //Select the created or modified row.\n if (mSavingMode == clsContacts.enmSavingMode.New) {\n this.pSelectedRow = getRowOfID(mIDContacts);\n }\n selectContact();\n }\n }\n }", "public void updateEmployee(Long employeeId, CreateOrEditEmployeeRequestDto employee) throws ApiDemoBusinessException;", "int updateByPrimaryKey(Addresses record);", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "int updateByPrimaryKey(CrmDept record);", "@PutMapping(\"/update\")\n\t public Employee updateEmployee(@RequestBody Employee emp)\n\t {\n\t\treturn employeeService.editEmployee(emp);\n\t }", "public EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;", "@Test\r\n\tvoid testContactServiceUpdatAddress() {\r\n\t\t// update contact address\r\n\t\tcontactService.updateContactAddress(id, id);\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(id));\r\n\t}", "public void updateAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"UPDATE contact_info SET person_id=?,address_line_1=?,address_line_2=?,\"\n\t\t \t\t+ \"city=?,state=?,country=?,zipcode=? \"\n\t\t \t\t+ \" WHERE contact_info_id=?\");\n\n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t //stmt.setDate(2, new java.sql.Date(DateUtility.getDateFromEle(address.getContactDate()).getTime()));\n\t\t stmt.setString(2, address.getAddress1());\n\t\t stmt.setString(3, address.getAddress2());\n\t\t stmt.setString(4, address.getCity());\n\t\t stmt.setString(5, address.getState());\n\t\t stmt.setString(6, address.getCountry());\n\t\t stmt.setString(7, address.getZip());\n\t\t \n\t\t stmt.setInt(8, Integer.parseInt(address.getId()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t \n\t\t updateEmailAddress(address);\n\t\t updatePhoneNumber(address);\n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Updating Address Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public Address update(Address entity);", "public void updateEmailAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"UPDATE email_id_info SET person_id=?,email_id=? \"\n\t\t \t\t+ \" WHERE email_id_info_key=?\");\n\n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setString(2, address.getEmailAddress());\n\t\t \n\t\t stmt.setInt(3, Integer.parseInt(address.getEmailAddressId()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Updating Address Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void contact_update(contact contact){\n \tSQLiteDatabase db = this.getWritableDatabase();\n\n \t// 2. create ContentValues to add key \"column\"/value\n \tContentValues values = new ContentValues();\n \tvalues.put(KEY_CONTACT_ADDRESS, contact.address_get());\n \tvalues.put(KEY_CONTACT_NAME, contact.name_get());\n \tvalues.put(KEY_CONTACT_TYPE, contact.type_get());\n \tvalues.put(KEY_CONTACT_KEYSTAT, contact.keystat_get());\n \tif (contact.type_get() == contact.TYPE_GROUP)\n \t\tvalues.put(KEY_CONTACT_MEMBERS, contact.members_get_string());\n \tvalues.put(KEY_CONTACT_LASTACT, contact.time_lastact_get());\n \tvalues.put(KEY_CONTACT_UNREAD, contact.unread_get());\n \tvalues.put(KEY_CONTACT_GROUP, contact.group_get());\n\n \tLog.d(\"contact_update\", \"update contact with id \" + contact.id_get());\n \t// 3. update\n \tdb.update(TABLE_CONTACT, // table\n \t\t\tvalues, // key/value -> keys = column names/ values = column values\n \t\t\t\"id = \" + contact.id_get(), null);\n \t\n \t// 4. close\n \tdb.close();\n }", "int updateByPrimaryKey(Employee record);", "@Override\n\tpublic EmployeeBean updateEmployeeDetails(EmployeeBean employeeBean) throws Exception {\n\t\treturn employeeDao.updateEmployeeDetails(employeeBean);\n\t}", "public Student updateStudent(String name, String address, String email, String pass, String contact) {\n\t\tSystem.out.println(email);\n\t\tStudent s = new Student(name,address,email,pass,contact);\n\t\tboolean flag = s.updateStudent(s);\n\t\treturn s;\n\t}", "public int updateEmployeeRecord(Employee employee) {\n\t\ttry {\n\t\t\t\n\t\t\tString query = \"update employeedbaddress set eName=?, eDesignation=?, eGender=?, eSalary=?, eUsername=?, ePassword=?, street=?, city=?, state=?, pincode=?, contact=?, email=? where eNo=?\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setString(1, employee.getEname());\n\t\t\tps.setString(2, employee.getEdesignation());\n\t\t\tps.setString(3, employee.getEgender());\n\t\t\tps.setDouble(4, employee.getEsalary());\n\t\t\tps.setString(5, employee.getEusername());\n\t\t\tps.setString(6, employee.getEpassword());\n\t\t\tps.setString(7, employee.getStreet());\n\t\t\tps.setString(8, employee.getCity());\n\t\t\tps.setString(9, employee.getState());\n\t\t\tps.setInt(10, employee.getPincode());\n\t\t\tps.setString(11, employee.getContact());\n\t\t\tps.setString(12, employee.getEmail());\n\t\t\tps.setInt(13, employee.getEno());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public void modify(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name whose contact you want to edit\");\n\t\tString addressBookName = obj.next();\n\t\tlog.info(\"Enter the name whose contact you want to edit\");\n\t\tString name = obj.next();\n\t\tPersonInfo p = addressBook.getContactByName(addressBookName, name);\n\t\tif (p == null) {\n\t\t\tlog.info(\"No such contact exists\");\n\t\t} else {\n\t\t\twhile (true) {\n\t\t\t\tlog.info(\n\t\t\t\t\t\t\"1. First name\\n 2.Last name\\n 3.Address\\n 4. City\\n 5. State\\n 6. Zip\\n 7. Phone number\\n 8.Email\\n 0. Exit\");\n\t\t\t\tlog.info(\"Enter the info to be modified\");\n\t\t\t\tint info_name = obj.nextInt();\n\t\t\t\tswitch (info_name) {\n\t\t\t\tcase 1:\n\t\t\t\t\tlog.info(\"Enter new First Name\");\n\t\t\t\t\tp.setFirst_name(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tlog.info(\"Enter new Last Name\");\n\t\t\t\t\tp.setLast_name(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlog.info(\"Enter new Address\");\n\t\t\t\t\tp.setAddress(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tlog.info(\"Enter new City\");\n\t\t\t\t\tp.setCity(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlog.info(\"Enter new State\");\n\t\t\t\t\tp.setState(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlog.info(\"Enter new Zip Code\");\n\t\t\t\t\tp.setZip(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tlog.info(\"Enter new Phone Number\");\n\t\t\t\t\tp.setPhno(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tlog.info(\"Enter new Email\");\n\t\t\t\t\tp.setEmail(obj.next());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (info_name == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean updateSuppEmail (java.lang.String emp_cde, \n java.lang.String emp_nme, \n java.lang.String dpt_cde, \n java.lang.String emp_type, \n java.lang.String emp_email, \n java.lang.String supp_no) throws com.mcip.orb.CoException {\n return this._delegate.updateSuppEmail(emp_cde, emp_nme, dpt_cde, emp_type, \n emp_email, supp_no);\n }", "int updateByPrimaryKey(mailIdentify record);", "@PUT\n\t@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})\n\t@Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})\n\t@Path(\"/contact/{name}\")\n\tpublic Response update(@PathParam(\"name\") String name,Contact contact){\n\t\tcontact.setName(name);\n\t\tAddressBookResponse addressBookResponse = new AddressBookResponse();\n\t\tif(processor.update(contact)){\n\t\t\taddressBookResponse.setCode(Status.OK);\n\t\t\taddressBookResponse.setMessage(\"Success\");\n\t\t\taddressBookResponse.setMessage(\"Entery got successfully created\");\n\t\t}else{\n\t\t\taddressBookResponse.setCode(Status.NOT_FOUND);\n\t\t\taddressBookResponse.setMessage(\"contact for \" + contact.getName() \n\t\t\t\t\t+ \" \"+ contact.getlName() + \" does not exist\");\n\t\t}\n\t\t\n\t\treturn Response.ok().entity(addressBookResponse).build();\n\t\t\n\t}", "int updateByPrimaryKey(ClinicalData record);", "@Override\r\n\tpublic int updateEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "int updateByPrimaryKey(CompanyExtend record);", "@Override\n\tpublic Integer updateEmp(Integer id, String name) {\n\t\treturn null;\n\t}", "public Boolean updateData(int position, String oldemail, String category, String name, String dob, String email, String phone){\n return databaseManager.updateInfo(position,oldemail,category,name,dob,email,phone);\n }", "@Override\n\tpublic Employee update(Employee emp) {\n\t\treturn null;\n\t}", "int updateByPrimaryKey(SmsEmployeeTeam record);", "@PutMapping(\"/employee/{id}\")\n\tpublic ResponseEntity<Employee> updateEmployee(@PathVariable Long id, @RequestBody Employee employeeDetail){\n\t\t\n\t\tEmployee employee = emprepo.findById(id).orElseThrow(()-> new ResourceNotFoundException(\"Employee not exist with id: \"+id )); \n\t\t\n\t\temployee.setFirstname(employeeDetail.getFirstname());\n\t\temployee.setLastname(employeeDetail.getLastname());\n\t\temployee.setEmail(employeeDetail.getEmail());\n\t\t\n\t\tEmployee updateEmployee= emprepo.save(employee);\n\t\t\n\t\treturn ResponseEntity.ok(updateEmployee);\n\t}", "int updateByPrimaryKey(SysOrganization record);", "@Override\r\n\tpublic void updateEmployee(long employeeId, Employee updateEmployee) {\n\t\t\r\n\t}", "public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;", "@Override\n\tpublic void updateEmployee(Employee e) {\n\t\t\n\t}", "@Override\n public void changeContact(String id,String pass,String newno) throws IOException\n {\n \tNode<Admin> pos = adm_list.getFirst();\n \twhile(pos!=null)\n \t{\n \t\tif(pos.getData().employee_id.equals(id) && pos.getData().password.equals(pass))\n \t\t{\n \t\t\tpos.getData().contact = newno;\n \t\t}\n \t\tpos = pos.getNext();\n \t}\n \twrite_adm_file();\n }", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.PUT)\r\n\tpublic Employee updateEmployee(@RequestBody Employee employee, @PathVariable int empId)\r\n\t\t\tthrows EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.updateEmployee(employee, empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(400, e.getMessage());\r\n\t\t}\r\n\r\n\t}", "public void updateContact(View v){\n\n receivedPersonInfo.name = nameField.getText().toString();\n receivedPersonInfo.address = addressField.getText().toString();\n receivedPersonInfo.business = primbusiness.getItemAtPosition(primbusiness.getSelectedItemPosition()).toString();\n receivedPersonInfo.province = province.getItemAtPosition(province.getSelectedItemPosition()).toString();\n receivedPersonInfo.toMap(); // update hash\n appState.firebaseReference.child(receivedPersonInfo.uid).setValue(receivedPersonInfo);\n }", "@Override\n\tpublic int updateEmployee(Employee emp) throws RemoteException {\n\t\treturn DAManager.updateEmployee(emp);\n\t}", "public void updatePerson() {\n\t\tSystem.out.println(\"****Update Record****\");\n\t\tSystem.out.println(\"Enter contact no.\");\n\t\tlong contactSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == contactSearch) {\n\t\t\t\tSystem.out.println(details[i].getFirstName());\n\t\t\t\tSystem.out.println(\"Please select field you need to edit\");\n\t\t\t\tSystem.out.println(\"1. Address\");\n\t\t\t\tSystem.out.println(\"2. City\");\n\t\t\t\tSystem.out.println(\"3. State\");\n\t\t\t\tSystem.out.println(\"4. Zipcode\");\n\t\t\t\tSystem.out.println(\"5. Phone Number\");\n\t\t\t\tint choiceUpdate = sc.nextInt();\n\t\t\t\tswitch (choiceUpdate) {\n\t\t\t\tcase 1:\n\t\t\t\t\tSystem.out.println(\"Enter your Address\");\n\t\t\t\t\tString addressUpdate = sc.next();\n\t\t\t\t\tdetails[i].setAddress(addressUpdate);\n\t\t\t\t\tSystem.out.println(\"Address Updated\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"Enter your City \");\n\t\t\t\t\tString cityUpdate = sc.next();\n\t\t\t\t\tdetails[i].setCity(cityUpdate);\n\t\t\t\t\tSystem.out.println(\"City Updated\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tSystem.out.println(\"Enter your State\");\n\t\t\t\t\tString stateUpdate = sc.next();\n\t\t\t\t\tdetails[i].setState(stateUpdate);\n\t\t\t\t\tSystem.out.println(\"State Updated\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Enter Your Zipcode\");\n\t\t\t\t\tint zipcodeUpdate = sc.nextInt();\n\t\t\t\t\tdetails[i].setZip(zipcodeUpdate);\n\t\t\t\t\tSystem.out.println(\"Zipcode Updated\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tSystem.out.println(\"Enter Phone Number\");\n\t\t\t\t\tlong phoneUpdate = sc.nextLong();\n\t\t\t\t\tdetails[i].setPhoneNo(phoneUpdate);\n\t\t\t\t\tSystem.out.println(\"Phone Number Updated\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Update Invalid choive! Enter again..\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "@RequestMapping(value=\"/employeeupdt\", method=RequestMethod.POST)\npublic String UpdateSave(EmployeeRegmodel erm)\n{\n\tEmployeeRegmodel erm1 = ergserv.findOne(erm.getEmployee_id());\n\t\n\term1.setEmployee_address(erm.getEmployee_address());\n\term1.setEmail(erm.getEmail());\n\term1.setEmployee_dob(erm.getEmployee_dob());\n\term1.setEmployee_phoneno(erm.getEmployee_phoneno());\n\term1.setEmployee_password(erm.getEmployee_password());\n\term1.setEmployee_fullname(erm.getEmployee_fullname());\n\term1.setEmployee_fname(erm.getEmployee_fname());\n\t\n\tergserv.updateEmployeeRegmodel(erm1);\n\treturn \"update.jsp\";\n}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "@Test\r\n\tpublic void test_updateEmployeeDetail() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t.queryParam(\"id\", \"2\")//\r\n\t\t\t\t.body(new EmployeeDto(2L, \"sunil\", \"changed\", \"[email protected]\"))//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.put(\"/api/v1/employee\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"id\", equalTo(2))//\r\n\t\t\t\t.body(\"firstName\", equalTo(\"sunil\"))//\r\n\t\t\t\t.body(\"lastName\", equalTo(\"changed\"))//\r\n\t\t\t\t.body(\"emailId\", equalTo(\"[email protected]\"));\r\n\r\n\t}", "public int updateContact(Contact contact) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n\n values.put(KEY_NAME, contact.get_name()); // Contact Name\n values.put(KEY_AUDIOS, contact.get_audios());\n values.put(KEY_CONTENTS, contact.get_contents());\n values.put(KEY_CAPTURED_IMAGE, contact.get_captured_image());\n values.put(KEY_DELETE_VAR, contact.get_delelte_var());\n values.put(KEY_GALLERY_IMAGE, contact.get_gallery_image());\n values.put(KEY_PHOTO, contact.get_photo());\n values.put(KEY_RRECYCLE_DELETE, contact.get_recycle_delete());\n\n // updating row\n return db.update(TABLE_CONTACTS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(contact.get_id())});\n }", "public void addContact(Contact contact){\n\n Contact qContact = contactRepository.findByNameAndLastName(contact.getName(), contact.getLastName());\n\n if(qContact != null ){\n qContact.getPhones().addAll(contact.getPhones());\n contact = qContact;\n }\n contactRepository.save(contact);\n }", "@Override\n\tpublic int updateEmployeeMailById(int employeeId, String email) {\n\t\tif (getEmployeeById(employeeId) == null) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn template.update(\"update employee set email = ? where empid = ?\", email, employeeId);\n\n\t\t}\n\t}", "public void setContactEmail(String contactEmail) {\n this.contactEmail = contactEmail;\n }", "@Override\n\tpublic void updateEmployee(Employee employee) {\n\t\tEmployee updateEmployee = em.find(Employee.class, employee.getId());\n\t\t\n\t\tem.getTransaction().begin();\n\t\tem.merge(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Updated successfully\");\n\t\tlogger.log(Level.INFO, \"Data Updated successfully\");\n\n\t}", "@Override\n\t//业务层修改员工方法\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}", "public void setContact(String email){ contact = email; }", "public void updatePerson(){\r\n\r\n // Generally update is performed after search \r\n // need to find out which record is going to update \r\n\r\n if (recordNumber >= 0 && recordNumber < personsList.size())\r\n {\r\n PersonInfo person = (PersonInfo)personsList.get(recordNumber);\r\n\r\n int id = person.getId();\r\n\r\n\t /*get values from text fields*/ \r\n\t name = tfName.getText();\r\n\t address = tfAddress.getText();\r\n\t phone = Integer.parseInt(tfPhone.getText());\r\n email = tfEmail.getText();\r\n\r\n\t /*update data of the given person name*/\r\n\t person = new PersonInfo(id, name, address, phone, email);\r\n pDAO.updatePerson(person);\r\n\r\n\t JOptionPane.showMessageDialog(null, \"Person info record updated successfully.\"); \r\n }\r\n else\r\n { \r\n JOptionPane.showMessageDialog(null, \"No record to Update\"); \r\n }\r\n }", "@Override\r\n\tpublic void updateContact(Contact contact) {\n\t\tsuper.update(contact);\r\n\t}", "@Override\n public String updateByPrimaryKey(Emp record) {\n int result = mapper.updateByPrimaryKey(record);\n StringBuffer sb = new StringBuffer(\"\");\n if(result<=0) {\n sb.append(\"修改失败\");\n }else {\n sb.append(\"修改成功\");\n }\n return sb.toString();\n }", "int updateByPrimaryKey(AbiFormsForm record);", "public int updateEmp(Emp emp) throws Exception {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tsession.update(emp);\n\t\t\tsession.flush();\n\t\t\treturn 1;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn -1;\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}", "public Employeedetails updateEmployee(Employeedetails employeeDetail,\n\t\t\tConnection connection) {\n\n\t\ttry {\n\t\t\tString employeeId = employeeDetail.getEmployeeId();\n\t\t\tString employeeName = employeeDetail.getEmployeeName();\n\t\t\t;\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tString squery = \"update employeeregister set employeename = '\"\n\t\t\t\t\t+ employeeName + \"' where employeeid ='\" + employeeId\n\t\t\t\t\t+ \"';\";\n\t\t\tint a = statement.executeUpdate(squery);\n\n\t\t\tif (a == 0) {\n\n\t\t\t\treturn employeeDetail;\n\t\t\t} else {\n\t\t\t\treturn employeeDetail;\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn employeeDetail;\n\n\t}", "public void updateContact(ContactBE contact) {\n String uuidString = contact.getId().toString();\n ContentValues values = getContentValues(contact);\n\n mDatabase.update(ContactTable.NAME, values,\n ContactTable.Cols.UUID + \" = ?\",\n new String [] {uuidString});\n }", "@Test\r\n\tvoid testContactServiceUpdatPhone() {\r\n\t\t// update contact phone\r\n\t\tcontactService.updateContactPhone(id, \"9876543210\");\r\n\t\tassertTrue(contactService.getContactPhone(id).equals(\"9876543210\"));\r\n\t}", "public EditEvent(Contact contact) {\n this.contact = contact;\n }", "public void updateContact(String firstName, String lastName, String title, String nickname,\r\n int displayFormat, int mailFormat, Object[] emails) {\r\n int selection = getContactSelection().getMinSelectionIndex();\r\n Statement stmt = null;\r\n try {\r\n if (!insertMode) {\r\n rowSet.absolute(selection+1);\r\n }\r\n Connection con = rowSet.getConnection();\r\n stmt = con.createStatement();\r\n String sql;\r\n if (insertMode) {\r\n sql = \"insert into \" + CONTACTS_TABLE + \"(\" + CONTACTS_KEY + \", \" + CONTACTS_FIRST_NAME + \", \"\r\n + CONTACTS_LAST_NAME + \", \" + CONTACTS_TITLE + \", \" + CONTACTS_NICKNAME + \", \"\r\n + CONTACTS_DISPLAY_FORMAT + \", \" + CONTACTS_MAIL_FORMAT + \", \" + CONTACTS_EMAIL_ADDRESSES \r\n + \") values ((case when (select max(\" + CONTACTS_KEY + \") from \" + CONTACTS_TABLE + \")\"\r\n + \"IS NULL then 1 else (select max(\" + CONTACTS_KEY + \") from \" + CONTACTS_TABLE + \")+1 end), \"\r\n + encodeSQL(firstName) + \", \" + encodeSQL(lastName) + \", \" + encodeSQL(title) + \", \"\r\n + encodeSQL(nickname) + \", \" + displayFormat + \", \" + mailFormat + \", \"\r\n + encodeSQL(encodeEmails(emails)) + \")\";\r\n } else {\r\n sql = \"update \" + CONTACTS_TABLE + \" set \";\r\n sql += CONTACTS_FIRST_NAME + '=' + encodeSQL(firstName) + \", \";\r\n sql += CONTACTS_LAST_NAME + '=' + encodeSQL(lastName) + \", \";\r\n sql += CONTACTS_TITLE + '=' + encodeSQL(title) + \", \";\r\n sql += CONTACTS_NICKNAME + '=' + encodeSQL(nickname) + \", \";\r\n sql += CONTACTS_DISPLAY_FORMAT + '=' + displayFormat + \", \";\r\n sql += CONTACTS_MAIL_FORMAT + '=' + mailFormat + \", \";\r\n sql += CONTACTS_EMAIL_ADDRESSES + '=' + encodeSQL(encodeEmails(emails));\r\n sql += \" where \" + CONTACTS_KEY + '=' + rowSet.getObject(CONTACTS_KEY);\r\n }\r\n System.out.println(sql);\r\n stmt.executeUpdate(sql);\r\n rowSet.execute();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n } finally {\r\n setInsertMode(false);\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "public int updateEmployee(Employee emp) throws SQLException {\n\t\t\treturn employeeDAO.updateEmployee(emp);\n\t\t}", "@Override\r\n\tpublic boolean updateEmployee(EmployeeEO employeeEORef) {\n\t\tif(employeeDAORepoRef.findById(employeeEORef.getEmployeeId()).equals(null))\r\n\t\treturn false;\r\n\t\telse {\r\n\t\t\temployeeDAORepoRef.save(employeeEORef);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void updatePhone(DetailModel detailModel){\n\n }", "int updateByPrimaryKey(PcQualificationInfo record);", "public Employee update(Session session, Employee emp) {\n Employee bbddEmp;\n Transaction t = session.beginTransaction();\n Query query = session.createQuery(\"from Employee where\"\n + \" name = :name and nifnie = :nifnie and companyEntryDate=:\"\n + \"companyEntryDate \");\n query.setParameter(\"name\", emp.getName());\n query.setParameter(\"nifnie\", emp.getNifnie());\n query.setDate(\"companyEntryDate\", emp.getCompanyEntryDate());\n bbddEmp = (Employee) query.list().get(0);\n\n updateColumns(emp, bbddEmp);\n session.update(bbddEmp);\n t.commit();\n return bbddEmp;\n }", "public void editContact() {\n int match = -1;\n Scanner sc = new Scanner(System.in);\n System.out.println(\"enter first name of person whose contact details you wants to edit\");\n String name = sc.nextLine();\n Contact contactToBeEdited = contactList.get(0);\n System.out.println(contactList.get(0));\n\n for (int j = 0; j < contactList.size(); j++) {\n Contact conMatch = contactList.get(j);\n System.out.println(conMatch.getFirstName());\n if (name.equals(conMatch.getFirstName())) {\n match = j;\n contactToBeEdited = contactList.get(match);\n\n } else {\n System.out.println(\"no contact with this first name \");\n }\n\n }\n\n if (match != -1) {\n\n System.out.print(\" what you want to edit : \"\n + \"\\n1. Zip Code\" + \"\\n2. First Name\" + \"\\n3 Last Name\" + \"\\n4. Address\"+ \"\\n5. City\" + \"\\n6. State\"\n\n + \"\\n7. Phone Number\" + \"\\n8. Email\");\n\n int option = sc.nextInt();\n sc.nextLine(); // catches the new line character\n\n switch (option) {\n case 1:\n System.out.println(\"enter new zip code\");\n String newZipCode = sc.nextLine();\n contactToBeEdited.setZip(newZipCode);\n break;\n\n case 2:\n System.out.println(\"enter new first name\");\n String newFirstName = sc.nextLine();\n contactToBeEdited.setFirstName(newFirstName);\n break;\n\n case 3:\n System.out.println(\"enter new last name\");\n String newLastName = sc.nextLine();\n contactToBeEdited.setFirstName(newLastName);\n break;\n\n case 4 :\n System.out.println(\"enter new street address\");\n String address = sc.nextLine();\n contactToBeEdited.setAddress(address);\n break;\n\n\n\n case 5:\n System.out.println(\"enter new city name\");\n String newcityName = sc.nextLine();\n contactToBeEdited.setCity(newcityName);\n break;\n\n case 6:\n System.out.println(\"enter new state name\");\n String newStateName = sc.nextLine();\n contactToBeEdited.setState(newStateName);\n break;\n\n\n case 7:\n System.out.println(\"enter new phone number\");\n String newPhoneNumber = sc.nextLine();\n contactToBeEdited.setPhone(newPhoneNumber);\n break;\n\n case 8:\n System.out.println(\"enter new email address\");\n String newEmailAddress = sc.nextLine();\n contactToBeEdited.setEmail(newEmailAddress);\n break;\n\n default:\n System.out.println(\"choice does not exist\");\n\n }\n\n\n }\n\n }", "@Override\r\n\tpublic void updateCompany(Company company) throws Exception {\r\n\r\n\t\tconnectionPool = ConnectionPool.getInstance();\r\n\t\tConnection connection = connectionPool.getConnection();\r\n\r\n\t\tString sql = String.format(\"update Company set COMP_NAME= '%s',PASSWORD = '%s', EMAIL= '%s' where ID = %d\",\r\n\t\t\t\tcompany.getCompanyName(), company.getCompanyPassword(), company.getCompanyEmail(),\r\n\t\t\t\tcompany.getCompanyId());\r\n\r\n\t\ttry (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {\r\n\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\r\n\t\t\tSystem.out.println(\"update Company succeeded. id which updated: \" + company.getCompanyId());\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new Exception(\"update Compnay failed. companyId: \"+ company.getCompanyId());\r\n\t\t} finally {\r\n\t\t\tconnection.close();\r\n\t\t\tconnectionPool.returnConnection(connection);\r\n\t\t}\r\n\r\n\t}", "@PutMapping(\"/contacts/{id}\")\r\n\tEntityModel<Contact> replaceContact(@RequestBody Contact newContact, @PathVariable Long id) {\r\n\t\t\r\n\t\treturn repo.findById(id).map(contact -> {\r\n\t\t\tcontact.setName((newContact.getName()));\r\n\t\t\tcontact.setRelation(newContact.getRelation());\r\n\t\t\treturn assembler.toModel(repo.save(contact));\r\n\t\t}).orElseGet(() -> {\r\n\t\t\tnewContact.setId(id);\r\n\t\t\treturn assembler.toModel(repo.save(newContact));\r\n\t\t});\r\n\t}", "protected void updateEmployee(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {\n\t\tString name,email,password,country;\n\t\tint eId;\n\t\tname = request.getParameter(\"name\");\n\t\temail = request.getParameter(\"email\");\n\t\tpassword = request.getParameter(\"password\");\n\t\tcountry = request.getParameter(\"country\");\n\t\teId = Integer.parseInt(request.getParameter(\"eId\"));\n\t\tEmployeeModel emp = new EmployeeModel(name,password,email,country,eId);\n\t\temployeeServiceObj.updateEmployee(emp);\n\t\t\n\t\t\n\t\tRequestDispatcher view=request.getRequestDispatcher(\"viewEmployees.do\");\n\t\tview.forward(request, response);\n\t\t\t\n\t}", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "public String updateByPrimaryKeySelective(Emp record) {\n BEGIN();\n UPDATE(\"emp\");\n \n if (record.getName() != null) {\n SET(\"name = #{name,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n SET(\"sex = #{sex,jdbcType=CHAR}\");\n }\n \n if (record.getJob() != null) {\n SET(\"job = #{job,jdbcType=VARCHAR}\");\n }\n \n if (record.getSalary() != null) {\n SET(\"salary = #{salary,jdbcType=DECIMAL}\");\n }\n \n if (record.getHiredate() != null) {\n SET(\"hiredate = #{hiredate,jdbcType=DATE}\");\n }\n \n if (record.getDeptno() != null) {\n SET(\"deptno = #{deptno,jdbcType=INTEGER}\");\n }\n \n WHERE(\"id = #{id,jdbcType=INTEGER}\");\n \n return SQL();\n }", "@Override\r\n\tpublic int updateByExample(Emp record, EmpExample example) {\n\t\treturn 0;\r\n\t}", "int updateByPrimaryKey(Organization record);" ]
[ "0.7277547", "0.6810508", "0.6714091", "0.6627368", "0.66066766", "0.6592914", "0.65926945", "0.6556336", "0.6545849", "0.6514226", "0.6455828", "0.6275599", "0.6195478", "0.6194638", "0.6160628", "0.61246276", "0.6124377", "0.6116494", "0.60841376", "0.6076241", "0.60762227", "0.60699254", "0.6050116", "0.60467064", "0.60350555", "0.60292506", "0.6018939", "0.6006113", "0.60010636", "0.59971076", "0.5996141", "0.5968264", "0.5963555", "0.59502584", "0.59459215", "0.59448457", "0.5938656", "0.59341633", "0.59336436", "0.5929968", "0.5926417", "0.59155434", "0.59098274", "0.5895413", "0.58899784", "0.5885824", "0.58538437", "0.58444965", "0.5842312", "0.5823685", "0.5822078", "0.5819129", "0.5816732", "0.58014196", "0.57973003", "0.5796482", "0.5793428", "0.57930905", "0.5766602", "0.57615197", "0.57470167", "0.57443136", "0.5731535", "0.5729118", "0.57257193", "0.572202", "0.571502", "0.5708669", "0.57060623", "0.57060575", "0.5700742", "0.56966835", "0.5696008", "0.56949514", "0.5693479", "0.5690407", "0.568319", "0.568302", "0.5679174", "0.56773865", "0.5673622", "0.56700337", "0.5669042", "0.5668907", "0.56654406", "0.56547624", "0.56452626", "0.56447375", "0.5643236", "0.5640192", "0.5638012", "0.563059", "0.56252867", "0.56252116", "0.56252044", "0.56235856", "0.5621578", "0.5621546", "0.56189626", "0.5611883" ]
0.74442655
0
This is the main method. It contains code for error handling and interpret the user's arguments.
public static void main(String[] args) { //Instantiate a new instance of the Queries class called query Queries query = new Queries(); //Instantiate empty strings called search, queryTerm, and cache String search = ""; String queryTerm = ""; String cache = ""; //For each item in the arguments array for (int i = 0; i < args.length; i++) { //If the item is --search, run the following if (args[i].equals("--search")) { //If --search is the last argument, set the search string to null if (i == args.length - 1) { search = null; } //Otherwise set the search string to the next argument else { search = args[i + 1]; } } //If the item is --query run the following if (args[i].equals("--query")) { //If --query is the last argument, set the queryTerm string to null if (i == args.length - 1) { queryTerm = null; } else { //Add the next item to the query string queryTerm = args[i + 1]; //Instantiate an integer called j as i+1 int j = i + 1; //While j is less than the number of arguments -1, and the argument //after j isn't --search or --cache and queryTerm isn't --search or --cache, add the j+1 argument to the queryTerm string while (j < args.length - 1 && !args[j + 1].equals("--search") && !args[j + 1].equals("--cache") && !queryTerm.equals("--search") && !queryTerm.equals("--cache")) { queryTerm += " " + args[j + 1]; j++; } } } //If the item is --cache, run the following if (args[i].equals("--cache")) { //If --cache is the last argument, set the cache string to null if (i == args.length - 1) { cache = null; } //Otherwise, set the cache string to the next argument else { cache = args[i + 1]; } } } //Create a new file object from the cache File folder = new File(cache); //Instantiate a boolean variable called noErrors to true Boolean noErrors = true; //If the queryTerm string is null, --cache, or --search (indicating a missing argument), print //the appropriate error message and set noErrors to false if (queryTerm == null || queryTerm.equals("--cache") || queryTerm.equals("--search")) { System.out.println("Missing value for --query\n" + "Malformed command line arguments."); noErrors = false; } //If the search string is null, --cache, or --query (indicating a missing argument), print //the appropriate error message and set noErrors to false else if (search == null || search.equals("--cache") || search.equals("--query")) { System.out.println("Missing value for --search\n" + "Malformed command line arguments."); noErrors = false; } //If the search string isn't any of the valid search options, print the appropriate error messages and set noErrors to false else if (!search.equals("author") && !search.equals("publication") && !search.equals("venue")) { System.out.println("Invalid value for --search: " + search); System.out.println("Malformed command line arguments."); noErrors = false; } //If the folder created from the cache string isn't a directory, print the appropriate error messages and set noErrors to false else if (!folder.isDirectory()) { System.out.println("Cache directory doesn't exist: " + cache); noErrors = false; } //If noErrors is true, call the appropriate query with the queryTerm string and folder as parameters if (noErrors) { if (search.equals("author")) { query.authorSearch(queryTerm, folder); } else if (search.equals("venue")) { query.venueSearch(queryTerm, folder); } else if (search.equals("publication")) { query.publicationSearch(queryTerm, folder); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n EquationManipulator manipulator = new EquationManipulator();\n \n if (args.length == 3) {\n // arguments were passed in from the command line\n System.out.println(\"It looks like you passed in some arguments. Let me fetch those for you.\");\n checkPassedInArguments(args, manipulator);\n } else if (args.length != 0) {\n // User passed in an incorrect number of arguments\n printErrorMessage();\n handleUserInput(manipulator);\n } else { \n // User did not pass in any arguments\n handleUserInput(manipulator);\n }\n\n }", "public static void main(String[] args) {\n\t\tif (!processArguments(args)) {\n\t\t\tSystem.out.println(\"Invalid Arguments! Please try again..\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tinvalidInput();\n\n\t}", "public static void main(String... args) {\n int status;\n try {\n process(args);\n status = 0;\n } catch (IllegalArgumentException | NoSuchElementException ex) {\n printUsage(ex);\n status = 1;\n } catch (NoSuchMethodException ex) {\n log.error(\"Method not found \", ex);\n status = 2;\n } catch (Throwable ex) {\n ex.printStackTrace();\n status = 3;\n }\n System.exit(status);\n }", "public static void main(String[] args) {\n /*if (args.length < 1)\n error(\"No output method given\");\n else if (args.length > 1)\n error(\"Expected 1 argument, received \" + args.length);\n else if (args[0].toLowerCase().equals(\"cli\"))*/\n new CLI().main();\n /*else if (args[0].toLowerCase().equals(\"gui\"))\n new GUI().main();*/\n /*else\n error(args[0] + \" is not a valid argument\");*/\n }", "Main(String[] args) {\n if (args.length < 1 || args.length > 3) {\n throw error(\"Only 1, 2, or 3 command-line arguments allowed\");\n }\n\n _config = getInput(args[0]);\n\n if (args.length > 1) {\n _input = getInput(args[1]);\n } else {\n _input = new Scanner(System.in);\n }\n\n if (args.length > 2) {\n _output = getOutput(args[2]);\n } else {\n _output = System.out;\n }\n }", "public static void main (String[]args) throws IOException {\n }", "public static void main(String[] args) throws Exception {\n\n // Instantiates utility objects\n FileOperations fileOperations = new FileOperations();\n PrettyPrints prettyPrints = new PrettyPrints();\n ValidateInput validIn = new ValidateInput();\n\n // Instantiate IngredientsData and RecipesData and load contents if files exist\n IngredientsData ingredientsData = new IngredientsData();\n ingredientsData.StringToIngredients(fileOperations.LoadToString(INGREDIENTS_DATA_PATH));\n RecipesData recipesData = new RecipesData(ingredientsData);\n recipesData.StringToRecipes(fileOperations.LoadToString(RECIPES_DATA_PATH));\n\n // Display Welcome message\n prettyPrints.SurroundPrintln(\"\");\n prettyPrints.SurroundPrintln(\" Welcome to the Recipe Book! \");\n prettyPrints.SurroundPrintln(\"\");\n\n // Enter the main menu\n UserInterface MainUI = new MainUI(validIn, prettyPrints, ingredientsData, recipesData);\n MainUI.Enter();\n\n // Display goodbye message\n prettyPrints.Println(\"\\nHave a nice day!\\n\");\n\n // Save contents of IngredientsData and RecipesData to text files\n fileOperations.SaveTextToFile(INGREDIENTS_DATA_PATH, ingredientsData.IngredientsToString());\n fileOperations.SaveTextToFile(RECIPES_DATA_PATH, recipesData.RecipesToString());\n }", "public static void main(String[] args) throws Exception {\n if (args.length != 1) {\n usage();\n } else {\n\n }\n }", "private void inputValidation(String[] args) {\r\n\t\t// Must have two argument inputs - grammar and sample input\r\n\t\tif (args.length != 2) {\r\n\t\t\tSystem.out.println(\"Invalid parameters. Try:\\njava Main <path/to/grammar> <path/to/input>\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n \ttry{\n\t \tLexer l = new Lexer(System.in);\n\t \tParser p = new Parser(l.getTokens());\n\t \t// System.out.println(p.printParseTree());\n\t\t\tp.evaluate();\n\t\t} catch (IOException e){\n\t\t\tSystem.out.println(\"End of input...\");\n \t} catch (Exception e){\t\n\t\t\tSystem.out.println(\"Error!\");\n\t\t\tif ( args.length > 0 && args[0].matches(\"-d\") ){\n \t\t\tSystem.out.println(e.getMessage());\n\t \t\te.printStackTrace();\n\t\t\t}\n \t\tSystem.exit(3);\n \t}\n }", "public static void main(String[] args) throws MalformedURLException, FileNotFoundException {\n Utils.handleInput(args);\n }", "public static void main( String args[] ) {\n\n parseInput(args);\n }", "public static void main(String[] args) throws IOException {\n\n\n\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) throws IOException {\n \t\n }", "public static void main(String[] args) {\r\n if (args.length == 0) {\r\n System.out.println(\"Please enter command line arguments\");\r\n System.exit(2);\r\n } else {\r\n int arg_counter = 1;\r\n for (String arg: args) {\r\n System.out.println(\"Argument \" + arg_counter + \": \" + arg);\r\n arg_counter +=1;\r\n }\r\n System.exit(0);\r\n }\r\n }", "public void main(String[] args) throws IOException{\n }", "public static void main(String[] args) throws IOException, ParseException {\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t}", "public static void main(String args[]) throws IOException {\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\n }", "public static void main(String[] args) throws IOException {\n\n }", "public static void main(String[] args) throws IOException {\n\r\n\t}", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Enter your action:\");\n\n\t\tSystem.out.println(\"1->Data Generation\" + \"\\n2->Commit Change Analysis and Import Full Log\"\n\t\t\t\t+ \"\\n3->Differential Log Analysis and Import\" + \"\\n4->Perform Fault Localization on Full Log\"\n\t\t\t\t+ \"\\n5->Perform Fault Localization on Differenttial Log\"\n\t\t\t\t+ \"\\n6->Perform Fault Localization on Differenttial Log + File Change\" + \"\\n7->For Logging\"\n\t\t\t\t+ \"\\n8->Log Fail Part Line Similarity Generator\"\n\t\t\t\t+ \"\\n9->Perform Fault Localization on Fail Part Log with Similarity Limit\"\n\t\t\t\t+ \"\\n10->Build Dependency Analysis\" + \"\\n11->Log Analysis\" + \"\\n12->ASTParser Checking\"\n\t\t\t\t+ \"\\n13->Analyze Result\" + \"\\n14->Generate Similarity on Build Dependency Graph\"\n\t\t\t\t+ \"\\n21->Param Tunning for DiffFilter\" + \"\\n22->Set Tunning Dataset Tag\"\n\t\t\t\t+ \"\\n23->Set Failing Type\"\n\t\t\t\t\n\t\t\t\t+ \"\\n31->Performance Analysis for Reverting File\" \n\t\t\t\t+ \"\\n32->Full Log Based\" \n\t\t\t\t+ \"\\n33->Full Log AST Based\"\n\t\t\t\t+ \"\\n34->Diff filter+Dependency+BoostScore\" \n\t\t\t\t+ \"\\n35->Diff filter+Dependency\"\n\t\t\t\t+ \"\\n36->Diff filter+BoostScore\" \n\t\t\t\t+ \"\\n37->Full Log+Dependency+BoostScore\"\n\t\t\t\t+ \"\\n38->Baseline(Saha et al){Fail Part Log+Java File Rank+Then Gradle Build Script}\"\n\t\t\t\t+ \"\\n39->All Evaluation Experiment\"\n\t\t\t\t+ \"\\n41->Strace Experiment\");\n\n\t\t// create an object that reads integers:\n\t\tScanner cin = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Enter an integer: \");\n\t\tint inputid = cin.nextInt();\n\n\t\tif (inputid == 1) {\n\t\t\tdataFiltering();\n\t\t} else if (inputid == 2) {\n\t\t\tcommitChangeAnalysis();\n\t\t} else if (inputid == 3) {\n\t\t\tgenDifferentialBuildLog();\n\t\t} else if (inputid == 4) {\n\t\t\tgenerateSimilarity();\n\t\t\t// generateSimilarityDifferentialLog();\n\t\t\t// genSimDifferentialLogOnChange();\n\t\t} else if (inputid == 5) {\n\t\t\tgenerateSimilarityDifferentialLog();\n\t\t} else if (inputid == 6) {\n\t\t\tgenSimDifferentialLogOnChange();\n\t\t} else if (inputid == 7) {\n\t\t\tgenSimDifferentialLogOnChangeForLogging();\n\t\t} else if (inputid == 8) {\n\t\t\tgenerateStoreFailPartSimValue();\n\t\t} else if (inputid == 9) {\n\t\t\tgenSimFailLogPartWithSimLimit();\n\t\t} else if (inputid == 10) {\n\t\t\tgenerateBuildDependencyTree();\n\t\t} else if (inputid == 11) {\n\t\t\tgenerateLogForAnalysis();\n\t\t} else if (inputid == 12) {\n\t\t\tastParserChecker();\n\t\t} else if (inputid == 13) {\n\t\t\tperformResultAnalysis();\n\t\t} else if (inputid == 14) {\n\t\t\tgenerateSimilarityWithDependency();\n\n\t\t}\n\t\t// this is for 6,8,9,13 menu runnning together for analysis\n\t\telse if (inputid == 21) {\n\t\t\tparameterTunningDiffFilter();\n\t\t} else if (inputid == 22) {\n\t\t\tTunningDTSetter dtsetter = new TunningDTSetter();\n\t\t\ttry {\n\t\t\t\tdtsetter.setTunningDataTags(100);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t;\n\n\t\t}\n\t\telse if(inputid==23)\n\t\t{\n\t\t\tGenerateTestFailType typesetobj=new GenerateTestFailType();\n\t\t\ttypesetobj.generateFailType();\n\t\t}\n\n\t\telse if (inputid == 31) {\n\t\t\tEvaluationMgr.FixWithBuildFailChangeEval();\n\t\t} else if (inputid == 32) {\n\t\t\tEvaluationMgr.FullLogFaultLocalizationEval();\n\t\t} else if (inputid == 33) {\n\t\t\tEvaluationMgr.FullLogASTFaultLocalizationEval();\n\t\t} else if (inputid == 34) {\n\t\t\tEvaluationMgr.DiffFilterDependencyWithBoostScoreSimEval();\n\t\t} else if (inputid == 35) {\n\t\t\tEvaluationMgr.DiffFilterDependencySimEval();\n\t\t} else if (inputid == 36) {\n\t\t\tEvaluationMgr.DiffFilterBoostScoreSimEval();\n\t\t} else if (inputid == 37) {\n\t\t\tEvaluationMgr.FullLogDependencyBoostScoreSimEval();\n\t\t} else if (inputid == 38) {\n\t\t\tEvaluationMgr.BaseLineForISSTA();\n\t\t} \n\t\telse if((inputid == 39))\n\t\t{\n\t\t\tEvaluationMgr.FixWithBuildFailChangeEval();\n\t\t\tEvaluationMgr.FullLogFaultLocalizationEval();\n\t\t\tEvaluationMgr.FullLogASTFaultLocalizationEval();\n\t\t\tEvaluationMgr.DiffFilterDependencyWithBoostScoreSimEval();\n\t\t\tEvaluationMgr.DiffFilterDependencySimEval();\n\t\t\tEvaluationMgr.DiffFilterBoostScoreSimEval();\n\t\t\tEvaluationMgr.FullLogDependencyBoostScoreSimEval();\n\t\t\tEvaluationMgr.BaseLineForISSTA();\n\t\t\t\n\t\t}\t\t\n\t\telse if (inputid == 68913) {\n\t\t\tgenSimDifferentialLogOnChange();\n\t\t\tgenSimDifferentialLogOnChangeForLogging();\n\t\t\tgenSimFailLogPartWithSimLimit();\n\t\t\tperformResultAnalysis();\n\t\t}\n\t\telse if(inputid == 41)\n\t\t{\n\t\t\tRankingMgr straceraking=new RankingMgr();\n\t\t\tstraceraking.generateStraceRanking();\n\t\t}\n\n\t\telse {\n\t\t\tCommitChangeExtractor obj = new CommitChangeExtractor();\n\t\t\tobj.testCommit();\n\n\t\t\tSystem.out.println(\"Wrong Function Id Entered\");\n\n\t\t\tConfig.thresholdForSimFilter = 0.1;\n\n\t\t\tSystem.out.println(Config.thresholdForSimFilter);\n\t\t}\n\n\t\tcleanupResource();\n\t}", "public static void main(String[] args) throws IOException {\n\r\n \r\n \r\n }", "public static void main(String[] args) throws IOException {\n }", "public static void main(String[] args) throws IOException\n\t{\n\t\tString name;\n\t\tBufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t//get user name\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"\\t\\tPlease enter your name: \");\n\t\tname = dataIn.readLine();\n\n\t\t//display output\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\t\" + name + \", You have successfully compiled and run the Sample2 application.\");\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) throws IOException {\n\r\n }", "public static void main(String[] args) {\r\n\t\t//Prints my name\r\n\t\tSystem.out.println(\"James Dansie\");\r\n\t\t//Prints my fact\r\n\t\tSystem.out.println(\"The island of Borneo is shared by three countries.\");\r\n\t\t//Handles agrs. Checks for length, then content.\r\n\t\tif(args.length == 0)\r\n\t\t\tSystem.out.println(\"No command-line arguments given.\");\r\n\t\telse if(args.length == 1 && \"OOP\".equals(args[0]))\r\n\t\t\tSystem.out.println(\"The command-line arguemnts say \\\"OOP\\\".\");\r\n\t\telse if(args.length == 2 && \"CS\".equals(args[0]) && \"143\".equals(args[1]))\r\n\t\t\tSystem.out.println(\"The command-line arguements say \\\"CS 143\\\".\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"The command-line arguments are not recognized.\");\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello World\");\n\t\tSystem.out.println(\"Please choose a number between 1 and 5\");\n\t\tAskQuestion qa = new AskQuestion();\n\t\tint number = qa.scanInt();\n\t\tif(number < 1){\n\t\t\tSystem.out.println(\"Your chosen number is too small...\");\n\t\t}\n\t\telse if(number > 5){\n\t\t\tSystem.out.println(\"Your chosen number is too big...\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Wow, you are very good at following instructions!\");\n\t\t}\n\t}", "public static void main(String [] args) throws DynamicSudokuException{\n //checking whether exactly one argument is pass\n if(args.length ==0 || args.length>1 ) throw new DynamicSudokuException(\"Need exactly one file to process the input\");\n\n SudokuValidator validator = new SudokuValidator();\n try {\n //calling validation method to verify the solution\n validator.isValid(args[0]);\n System.out.println(\"Awesome! You did it, correct sudoku solution\");\n } catch (DynamicSudokuException e) {\n\n if(e.getMessage().equalsIgnoreCase(\"File Not Found\")){\n System.out.println(\"Please pass the absolute file path\");\n }else if(e.getMessage().equalsIgnoreCase(\"unknown exception occurred\")){\n System.out.println(\"Please check file format, Input should be digits and in the form of a CSV (comma-separated value) text \" +\n \"file with columns separated by commas and rows separated by newline characters\");\n }else if(e.getMessage().equalsIgnoreCase(\"Incorrect sudoku\")){\n System.out.println(\"Please solve again, incorrect sudoku!\");\n }else{\n throw new DynamicSudokuException(e);\n }\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}", "public static void main(String[] args) {\n int restingHeartRate = readFromUser(\"What is your resting heart rate?\");\n int age = readFromUser(\"What is your age?\");\n\n TargetCalculator userTarget = new TargetCalculator(restingHeartRate,age);\n }", "public static void main(String []args) {\n\t\ttry {\n\t\t\tprocessMainMenu(); \n\t\t}\n\t\t// Any exception thrown by the simulation is caught here.\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(ErrorType.INTERNAL_ERROR);\n\t\t\t// Uncomment this to print the stack trace for debugging purpose.\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t// Any clean up code goes here.\n\t\tfinally {\n\t\t\tSystem.out.println(\"Quitting the simulation.\");\n\t\t}\n\t}", "public static void main(String... args) throws IOException {\n\n if (args.length == 0) {\n exitWithError(\"Please enter a command.\");\n }\n\n //TODO: error message for not initialized + opearnds\n if (!GITLET_FOLDER.exists() && !args[0].equals(\"init\")) {\n exitWithError(\"Not in an initialized gitlet directory.\");\n }\n switch (args[0]) {\n case \"init\":\n\n if ((GITLET_FOLDER.exists())) {\n exitWithError(\"A Gitlet version-control system already exists in the current directory.\");\n }\n init();\n break;\n\n case \"add\":\n //TODO: how to check \"format\" of operands?\n if (args.length != 2) {\n exitWithError(\"Incorrect operands.\");\n }\n\n add(args[1]);\n break;\n\n case \"rm\":\n if (args.length != 2) {\n exitWithError(\"Incorrect operands.\");\n }\n remove(args[1]);\n break;\n\n case \"commit\":\n if (args.length != 2 || args[1].equals(\"\")) {\n exitWithError(\"Please enter a commit message.\");\n }\n\n commit(args[1]);\n break;\n case \"log\":\n if (args.length != 1) {\n exitWithError(\"Incorrect operands.\");\n }\n log();\n break;\n\n //fixed error 30.5?\n case \"checkout\":\n if (args.length == 3){\n if (args[1].equals(\"--\")) {\n checkoutFile(args[2]);\n }\n else {\n exitWithError(\"Incorrect operands.\");\n }\n }\n else if (args.length == 2){\n checkoutBranch(args[1]);\n }\n else if (args.length == 4) {\n if (args[2].equals(\"--\")) {\n checkoutCommit(args[1], args[3]);\n }\n else{\n exitWithError(\"Incorrect operands.\");\n }\n }\n else{\n exitWithError(\"Incorrect operands.\");\n }\n break;\n\n case \"branch\":\n if (args.length != 2) {\n exitWithError(\"Incorrect operands.\");\n }\n branch(args[1]);\n break;\n\n case \"rm-branch\":\n if (args.length != 2) {\n exitWithError(\"Incorrect operands.\");\n }\n removeBranch(args[1]);\n break;\n\n case \"global-log\":\n if (args.length != 1) {\n exitWithError(\"Incorrect operands.\");\n }\n globalLog();\n break;\n\n case \"find\":\n if (args.length != 2) {\n exitWithError(\"Incorrect operands.\");\n }\n find(args[1]);\n break;\n\n case \"reset\":\n if (args.length != 2) {\n exitWithError(\"Incorrect operands.\");\n }\n reset(args[1]);\n break;\n\n case \"status\":\n if (args.length != 1) {\n exitWithError(\"Incorrect operands.\");\n }\n status();\n break;\n\n case \"merge\":\n if (args.length != 2) {\n exitWithError(\"Incorrect operands.\");\n }\n merge(args[1]);\n break;\n\n default:\n exitWithError(\"No command with that name exists.\");\n }\n return;\n }", "public static void main(String args[]) throws Exception {\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[] args) {\n switch (args[0]) {\r\n case \"-createUser\" -> createUser(args);\r\n case \"-showAllUsers\" -> showAllUsers();\r\n case \"-addTask\" -> addTask(args);\r\n case \"-showTasks\" -> showTasks();\r\n default -> {\r\n try {\r\n throw new IncorrectCommandFormatException();\r\n } catch (IncorrectCommandFormatException exception) {\r\n exception.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\t\n\n\t}", "public static void main(String []args) {\n\t\t/*\n\t\t * The user will be shown two options:\n\t\t * Exit from the system by pressing 0.\n\t\t * OR\n\t\t * Enabling user to enter credential information(Email Id and Password) by pressing 1.\n\t\t * If user enters any other key Invalid choice will be displayed and again user will be given two choices.\n\t\t * */\n\t\tboolean run = true;\n\t\twhile(run) {\n\t\t\tviewOptions();\n\t\t\ttry {\n\t\t\t\tint option = sc.nextInt();\n\t\t\t\tswitch(option) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t//If user enters 0 terminate the while loop by making run = false.\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t//Try to login into the system\n\t\t\t\t\t\tattemptToLogin();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tlog.error(\"Invalid Choice!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//If user tries to enter non numeric characters exception will be thrown and will caught below.\n\t\t\tcatch(InputMismatchException e){\n\t\t\t\tlog.error(\"Invalid Choice!\");\n\t\t\t}\t\t\n\t\t}\n\t}", "protected static int mainImpl(final String[] args) {\n final GUIFeedback feedback = new GUIFeedback(\"Packaging error logs for submission\");\n try {\n if (args.length != 1) {\n throw new IllegalArgumentException(\"Invalid number of arguments - expected path to property file\");\n }\n new BundleErrorReportInfo(feedback, args[0]).run();\n return 0;\n } catch (final Throwable t) {\n LOGGER.error(\"Caught exception\", t);\n feedback.shout(t.getMessage() != null ? t.getMessage() : \"Couldn't package error logs\");\n return 1;\n }\n }", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main(String[] args) throws IOException {\n }", "public static void main(String[] args)\n {\n Main controller = new Main();\n System.out.println(\"----------User Instructions --------------\");\n instructions();\n System.out.println(\"-------------------------------------------\");\n int choice = 0;\n In in = new In();\n while(choice != -1)\n {\n choice = in.readInt();\n switch (choice)\n {\n case -1:\n System.out.println(\"Bye\");\n System.exit(0);\n break;\n case 0:\n controller.home_index();\n break;\n case 1:\n controller.home_byUser();\n break;\n case 2:\n controller.home_byConversation();\n break;\n case 3:\n leaderBoard_index();\n break;\n case 4:\n leaderBoard_talkative();\n break;\n case 5:\n leaderBoard_leastTalkative();\n break;\n default:\n StdOut.println(\"You have entered an invalid number.\");\n \tStdOut.println(\"Valid integer range is between 1 and 5.\");\n \tStdOut.println(\"You may enter another number now.\");\n \tStdOut.println(\"Enter -1 to exit program.\");\n }\n }\n }", "public static void main(String[] args) throws IOException {\n\t}", "public static void main(String[] args) throws Exception {\n\t\tLogConfig.execute();\n\t\tlogger.info(START);\n\t\tint endValue = 0;\n\t\ttry {\n\t\t\t//args check\n\t\t\targsValidation(args); \n\t\t\t//start logic\n\t\t\tendValue = SudokuFacade.build().executeSudokuValidation(new FileSystemContext(args[0]));\n\t\t} catch (Exception e) {\n\t\t\tendValue = 1;\n\t\t\tlogger.log(SEVERE, EXCEPTION, e);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tlogger.info(END);\n\t\t\tlogger.info(endValue == 0 ? SUCCESS : FAIL );\n\t\t}\n\t}", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n \n\n }", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main( String args[] )\n {{\n final int EXPECTED_NUM_ARGS= 4;\n\n /* ..............................................................\n\t set up command line arguments\n */\n\n if ( args.length != EXPECTED_NUM_ARGS ) {\n System.err.print( \"expected \"+ EXPECTED_NUM_ARGS+ \n\t\t\t \" arguments, but found \"+ args.length+ \".\\n\" );\n\t System.exit( -1 );\n }\n\n arg_verbosity= Integer.parseInt( args[0] );\n arg_ir_filename= args[1];\n arg_outDirname= args[2];\n arg_numCalls= Integer.parseInt( args[3] );\n\n /* ..............................................................\n\t set up globals\n */\n IRTxtLib.programName= PROGRAM_NAME;\n IRTxtLib.arg_verbosity= arg_verbosity;\n\n /* ..............................................................\n */\n checkArgsAndSetUp();\n startWork();\n }}", "public static void main(String[] args) {\n\t\tcheckNumber(-1);\n\n\t\t}", "public static void main(String[] args)\r\t{", "public static void main(final String[] args)\n {\n final ResultCode resultCode = main(args, System.out, System.err);\n if (resultCode != ResultCode.SUCCESS)\n {\n System.exit(resultCode.intValue());\n }\n }", "public static void main(String argv[])\n {\n\t\tX3DObject exampleObject = new HelloWorldProgramOutput().getX3dModel();\n\t\t\n\t\texampleObject.handleArguments(argv);\n\t\tSystem.out.print(\"HelloWorldProgramOutput self-validation test results: \");\n\t\tString validationResults = exampleObject.validationReport();\n\t\tSystem.out.println(validationResults);\n\t}", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main (String args[]){\n\t\t\n\t\t// Load necessary data\n\t\t// All data files to be found in the 'data' folder\n\t\tgetInputFileData();\n\t\t\n\t\t//Greeting\n\t\tSystem.out.println(\"\\n\\tWelcome to the Path Finding System!\\n\");\n\t\tSystem.out.println(\"To exit the system please enter 'exit' anywhere.\\n\");\n\t\t\n\t\tscanner = new Scanner(System.in);\n\t\t\t\n\t\t\ttry {\n\t\t\t\t// initial call for menu\n\t\t\t\tmenu(scanner);\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\tscanner.close();\n\t\t\t}\n\t\t\t\n\t}", "public static void main(String[] arg) throws Exception{\n\t\t\n\t}", "public static void main(String[] args) throws Exception {\n }", "public static void main(String[] args) throws Exception {\n }", "public static void main(String[] args) throws Exception {\n }", "public static void main(String[] args) throws Exception {\n }", "public static void main(String[] args) throws Exception {\n }", "public static void main(String[] args) throws Exception {\n }", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String args[]){\n \t\n \t\n }", "public static void main(String[] args) throws Exception {\n\r\n\t}", "public static void main(String[] args) {\n\n getProperties();\n\n Options optionsMain = new Options();\n optionsMain.addOption(\"h\", \"help\", false, \"display this message\");\n optionsMain.addOption(\"db\", \"database\", true, \"path to the database\");\n //optionsMain.addOption(\"p\", \"peaqb\", true, \"path to the PEAQb program\");\n //optionsMain.addOption(\"r\", \"reference\", true, \"path to the reference sound file\");\n //optionsMain.addOption(\"t\", \"test\", true, \"path to the test sound file\");\n //optionsMain.addOption(\"m\", \"metric\", true, \"name of the metric to be used\");\n CommandLineParser commandLineParser = new DefaultParser();\n CommandLine commandLine = null;\n try {\n commandLine = commandLineParser.parse(optionsMain, args);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (args.length == 0 || commandLine.hasOption(\"help\")) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp(\"Robco\", optionsMain);\n return;\n }\n if (commandLine.hasOption(\"database\")) {\n dbPath = commandLine.getOptionValue(\"database\");\n } else {\n System.err.println(\"No database file specified\");\n System.exit(1);\n }\n System.out.println(\"Using database \" + dbPath);\n /*if (commandLine.hasOption(\"reference\")) {\n reference = commandLine.getOptionValue(\"reference\");\n } else {\n System.err.println(\"No reference file specified\");\n System.exit(1);\n }\n System.out.println(\"Using reference \" + reference);\n if (commandLine.hasOption(\"test\")) {\n test = commandLine.getOptionValue(\"test\");\n } else {\n System.err.println(\"No test file specified\");\n System.exit(1);\n }\n System.out.println(\"Using test \" + test);*/\n /*if (commandLine.hasOption(\"metric\")) {\n String metricParam = commandLine.getOptionValue(\"metric\");\n if (metricParam.equalsIgnoreCase(\"PEAQ\")) {\n metric = PEAQ;\n if (commandLine.hasOption(\"peaqb\")) {\n peaqbPath = commandLine.getOptionValue(\"peaqb\");\n } else {\n System.err.println(\"No PEAQb programPEAQ specified\");\n System.exit(1);\n }\n System.out.println(\"Using programPEAQ \" + peaqbPath);\n } else if (metricParam.equalsIgnoreCase(\"SSIM\")) {\n metric = SSIM;\n } else {\n System.err.println(\"Couldn't recognize metric \" + metricParam);\n System.exit(1);\n }\n System.out.println(\"Using metric \" + metricParam);\n } else {\n System.err.println(\"No metric specified\");\n System.exit(1);\n }*/\n /*double result;\n switch (metric) {\n case PEAQ:\n SQLiteConnector connectorPEAQ = new SQLiteConnector(dbPath, \"peaq\", \"ODG\", \"REF\", \"TEST\", \"ID\");\n result = executePEAQAnalysis(peaqbPath, reference, test).getMean();\n System.out.println(\"MeanODG=\" + result);\n connectorPEAQ.write(result, reference, test, getUsableId(connectorPEAQ) + 1);\n System.exit(0);\n case SSIM:\n SQLiteConnector connectorSSIM = new SQLiteConnector(dbPath, \"ssim\", \"VALUE\", \"REF\", \"TEST\", \"ID\");\n result = executeSSIMAnalysis(reference, test);\n System.out.println(\"SSIMIndex=\" + result);\n connectorSSIM.write(result, reference, test, getUsableId(connectorSSIM) + 1);\n System.exit(0);\n default:\n return;\n }*/\n processResults(resultPath);\n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\talgoritmoConPosibilidadDeExcepcion();\n\t\t\tSystem.out.println(\"Estoy dentro del bloque que da error, justo despues de dar error\");\n\t\t} catch (ParseException | UnsupportedOperationException e) {\n\t\t\t// Proporciona el feedback al usuario de la aplicacion\n\t\t\tSystem.out.println(\"Ha ocurrido un error\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public static void main(String[] args) throws IOException{\n\t\trunProgram();\n\t}", "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 }", "public static void main(String[] args) {\n\t\tThread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {\r\n\t\t public void uncaughtException(Thread t, Throwable e) {\r\n\t\t logger.log(Level.SEVERE, t + \" RemoteFileParse threw an exception: \", e);\r\n\t\t };\r\n\t\t });\r\n\t\t\r\n\t\tif (args != null && args.length >= 3) {\r\n\t\t\t//Set the Buyer object Model with the incoming args provided in the command line args IE. IPRemoteParse.exe \r\n\t\t\tModels.Buyer buyerInfo = new Models.Buyer(Integer.parseInt(args[0]), args[1], args[2], args[3]);\r\n\t\t\t\r\n\t\t\t//check for a file. Haven't decided how to engage the scheduling as of yet.\r\n\t\t\tparseFiles(buyerInfo);\r\n\t\t}\r\n\t\telse { //just for testing stubbing out the buyer object. args would normally be sent in on a command line call or .bat file which will be created on install with all user options (or xml config file)\r\n\t\t\tModels.Buyer buyerInfo = new Models.Buyer(1926420, \"intelligentpay-api.inworks.com\", \"C:\\\\Users\\\\grichter.EVIL_EMPIRE\\\\Desktop\\\\ParseTesting\", \"Payments_\");\r\n\t\t\tparseFiles(buyerInfo);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\t\tString input_line = \"\";\n\n\n\t\ttry{\n\t\t\tbuyer = new Buyer(Integer.parseInt(args[0]));\n\t\t\tseller = new Seller(Integer.parseInt(args[0]));\n\n //Process command line input until EOF\n\t\t\tScanner s = new Scanner(System.in);\n\t\t\twhile (s.hasNext()){\n input_line = s.nextLine();\n\n //Parse Input\n\t\t\t\tparseNewOrder(input_line);\n }\n\n\t\t} catch (IndexOutOfBoundsException|IOException|NumberFormatException e){\n\t\t\tSystem.out.println(improper_input_warning_1+input_line+improper_input_warning_2);\n\t\t}\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public static void main(String[] args){\n\n // Definite command line\n CommandLineParser parser = new PosixParser();\n Options options = new Options();\n\n //Help page\n String helpOpt = \"help\";\n options.addOption(\"h\", helpOpt, false, \"print help message\");\n\n String experimentFileStr = \"experimentFile\";\n options.addOption(experimentFileStr, true, \"Input File with all the ArrayExpress experiments.\");\n\n String protocolFileStr = \"protocolFile\";\n options.addOption(protocolFileStr, true, \"Input File with all the ArrayExpress protocols.\");\n\n String omicsDIFileStr = \"omicsDIFile\";\n options.addOption(omicsDIFileStr, true, \"Output File for omicsDI\");\n\n // Parse command line\n CommandLine line = null;\n try {\n line = parser.parse(options, args);\n if (line.hasOption(helpOpt) || !line.hasOption(protocolFileStr) ||\n !line.hasOption(experimentFileStr)\n || !line.hasOption(omicsDIFileStr)) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp(\"validatorCLI\", options);\n }else{\n File omicsDIFile = new File (line.getOptionValue(omicsDIFileStr));\n Experiments experiments = new ExperimentReader(new File (line.getOptionValue(experimentFileStr))).getExperiments();\n Protocols protocols = new ProtocolReader(new File (line.getOptionValue(protocolFileStr))).getProtocols();\n generate(experiments, protocols, omicsDIFile);\n }\n\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (Exception ex){\n ex.getStackTrace();\n }\n\n\n }", "public static void main(String... args) {\n try {\n new Main(args).process();\n return;\n } catch (EnigmaException excp) {\n System.err.printf(\"Error: %s%n\", excp.getMessage());\n }\n System.exit(1);\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args) {\n UtilClient client = new UtilClient(args);\n client.run();\n\n // exit the program with the number of errors as the exit status\n System.exit(client.getErrorCount());\n }", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main(String[] args) {\n if(args==null||args.length == 0 || args[0] == null)\n {\n notRecognized();\n return;\n }\n else\n {\n if(args[0].equals(\"update\"))\n {\n update();\n return;\n }\n else if(args[0].equals(\"help\")) \n {\n help();\n return;\n }\n else if(args[0].equals(\"access\")&&args.length>=2)\n {\n access(args[1]);\n return;\n }\n else\n {\n notRecognized();\n }\n }\n }", "public static void main(String[] argv) throws Exception {\n\t}", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] 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}", "public static void main(String[] args) {\t\t\t\t\t\t\t\t\t\t\t\t\t///NOTE: Main() at top of class.\n\t\t\n\t\ttry {\n\t\t\tnew DomParserExample().runExample();\t\t\t\t\t\t\t\t\t\t\t\t///NOTE: This is all on one line now.\n\t\t} \n\t\tcatch (ParseEmployeeXmlException exception) {\t\t\t\t\t\t\t\t\t\t\t///NOTE: Bubbled up custom exception and handled at last responsible moment.\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n \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\tSystem.out.println(\n\t\t\t\t\"Welcome to the Recursive Zoo\\r\\n\" + \n\t\t\t\t\"Author: Steven Douglass\");\t\t\n\t\tgetInput();\n\n\t}", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args){\r\n\t\t\r\n\tSystem.out.println(\"main method(-)\");\r\n\t\r\n\t}", "public static void main(String args[]) {}", "public static void main(String args[]) {}", "public static void main(String args[]) {}" ]
[ "0.78305084", "0.77296567", "0.7608425", "0.7521655", "0.7429026", "0.72902095", "0.7267057", "0.7255815", "0.7253629", "0.72095436", "0.720371", "0.7196865", "0.71681154", "0.71532404", "0.7069583", "0.70600057", "0.7045207", "0.70375776", "0.703699", "0.70351976", "0.70072705", "0.7005805", "0.7005805", "0.6997293", "0.6997271", "0.69890416", "0.69768834", "0.69655865", "0.696156", "0.6955727", "0.6941846", "0.6934948", "0.691596", "0.68830603", "0.6883047", "0.6882259", "0.6877672", "0.6872943", "0.6870493", "0.68682754", "0.6864392", "0.68615884", "0.68505466", "0.68474805", "0.684516", "0.6844698", "0.6841119", "0.68378824", "0.683051", "0.68251866", "0.6824771", "0.68211335", "0.67947316", "0.67943954", "0.67898965", "0.6788992", "0.6788992", "0.67851293", "0.67844087", "0.6780834", "0.6780834", "0.6780834", "0.6780834", "0.6780834", "0.6780834", "0.6772743", "0.677265", "0.67709416", "0.6763032", "0.675863", "0.675863", "0.6755671", "0.6750084", "0.67472667", "0.67472667", "0.67472667", "0.67472667", "0.67472667", "0.67472667", "0.67466134", "0.6744157", "0.67411965", "0.6740027", "0.6733798", "0.67324305", "0.67317855", "0.67288816", "0.6726698", "0.67235374", "0.67235374", "0.6719597", "0.6717218", "0.67146367", "0.6707344", "0.6706401", "0.670185", "0.66986746", "0.6697456", "0.6695997", "0.6695997", "0.6695997" ]
0.0
-1
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { /* TODO output your page here. You may use following sample code. */ out.println("<!DOCTYPE html>"); out.println("<html>"); out.println("<head>"); out.println("<title>Servlet UtilityServlet</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet UtilityServlet at " + request.getContextPath() + "</h1>"); out.println("</body>"); out.println("</html>"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\nSystem.err.println(\"=====================>>>>>123\");\n\t\tString key=req.getParameter(\"method\");\n\t\tswitch (key) {\n\t\tcase \"1\":\n\t\t\tgetProvinces(req,resp);\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\tgetCities(req,resp);\t\t\t\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\tgetAreas(req,resp);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }" ]
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.639271", "0.63919044", "0.63919044", "0.63903785", "0.63903785", "0.63903785", "0.63903785", "0.63887113", "0.63887113", "0.6380285", "0.63783026", "0.63781637", "0.637677", "0.63761306", "0.6370491", "0.63626", "0.63626", "0.63614637", "0.6355308", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896" ]
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter pw= response.getWriter(); // pw.println("<h1>" + mess+"</h1>"); String text = "some text"; text = request.getParameter("alldata"); // response.setContentType("text/plain"); // Set content type of the response so that jQuery knows what it can expect. // response.setCharacterEncoding("UTF-8"); // You want world domination, huh? // response.getWriter().write(text); pw.println(text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }", "public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}", "public Result get(Get get) throws IOException;", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }", "@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "@Override\npublic void get(String url) {\n\t\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}", "@NonNull\n public String getAction() {\n return \"GET\";\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }", "@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }", "@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }", "public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}", "public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}", "public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}", "private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}", "private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}" ]
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234", "0.6754993", "0.6754993", "0.67394847", "0.6719924", "0.6716244", "0.67054695", "0.67054695", "0.67012346", "0.6684415", "0.6676695", "0.6675696", "0.6675696", "0.66747975", "0.66747975", "0.6669016", "0.66621476", "0.66621476", "0.66476154", "0.66365504", "0.6615004", "0.66130257", "0.6604073", "0.6570195", "0.6551141", "0.65378064", "0.6536579", "0.65357745", "0.64957607", "0.64672184", "0.6453189", "0.6450501", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.64067316", "0.6395873", "0.6379907", "0.63737476", "0.636021", "0.6356937", "0.63410467", "0.6309468", "0.630619", "0.630263", "0.63014317", "0.6283933", "0.62738425", "0.62680805", "0.62585783", "0.62553537", "0.6249043", "0.62457556", "0.6239428", "0.6239428", "0.62376446", "0.62359244", "0.6215947", "0.62125194", "0.6207376", "0.62067443", "0.6204527", "0.6200444", "0.6199078", "0.61876005", "0.6182614", "0.61762017", "0.61755335", "0.61716276", "0.6170575", "0.6170397", "0.616901" ]
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter pw= response.getWriter(); String text = request.getParameter("alldata"); response.setContentType("application/json"); // Set content type of the response so that jQuery knows what it can expect. response.setCharacterEncoding("UTF-8"); // You want world domination, huh? String [] JSONdataALL = text.split("#"); int dataLakeGaneshaNo[] = ParsingJsonAll.readJsonNoGaneshaNoLake(JSONdataALL[0], pw); Ganesha[] gan = ParsingJsonAll.readJsonGaneshaLanLon(JSONdataALL[3],pw); Lake[] lak = ParsingJsonAll.readJsonLankLanLon(JSONdataALL[4],pw); int noofganesha = dataLakeGaneshaNo[0]; int nooflakes = dataLakeGaneshaNo[1]; //With or without algorithm? //a. With using optimisation algorithm //b. Without using optimisation algorithm char ch = 'b'; //What Logic for Balancing you want to apply? //0. No Balancing //1. Min Distance Difference //2. Min Distance form minlakeclustercount int logic = 0; pw.write("Count of: Ganeshas: "+noofganesha+"\tLakes: "+nooflakes+"\n"); GaneshaLakeId[] gla = new GaneshaLakeId[noofganesha]; GaneshaLakeDist[] gla1=ParsingJsonAll.readJsonGaneshaLakeDist(JSONdataALL[1],pw); pw.println("Lake Ganesha Dist"); for(GaneshaLakeDist gl:gla1){ response.getWriter().write(gl.lake+"\t"+gl.ganesha+'\t'+gl.distance+"\n"); } for (int i = 0; i < noofganesha; i++){ int min = Integer.MAX_VALUE; int j = i; int lakeId = 0; while(j<gla1.length){ if(min > gla1[j].distance){ min = gla1[j].distance; lakeId = gla1[j].lake; } j = j + noofganesha; } GaneshaLakeId glag = new GaneshaLakeId(); glag.lakeId = lakeId; glag.ganesha = i; gla[i] = glag; } pw.println("Ganesha Before Lake ID"); for(GaneshaLakeId gl1:gla){ response.getWriter().write(gl1.ganesha+"\t"+gl1.lakeId+"\n"); } //Balancing Logic Call switch(logic){ case 1: //Balancing Logic1 balancing1(gla,gla1,nooflakes,noofganesha,pw); break; case 2: //Balancing Logic2 balancing2(gla,gla1,nooflakes,noofganesha,pw); break; } GaneshaGaneshaDist[] gla2=ParsingJsonAll.readJsonGaneshaGaneshaDist(JSONdataALL[2],pw); pw.println("Ganesha Ganesha Dist"); for(GaneshaGaneshaDist gl12:gla2) response.getWriter().write(gl12.ganesha1+"\t"+gl12.ganesha2+"\t"+gl12.distance+"\n"); pw.println("\nThe Route is given as: \n"); double[][] resultLatLon=null; switch(ch){ case 'a': resultLatLon = makeMSTDouble(gla,gla1,gla2,noofganesha,nooflakes,gan, lak,pw); break; case 'b': resultLatLon = makeWithoutAny(gla,gla1,gla2,noofganesha,nooflakes,gan, lak,pw); break; } for(int i=0;i<(int)resultLatLon[0][0];i++){ pw.println(resultLatLon[i][0]+", "+resultLatLon[i][1]+", "+resultLatLon[i][2]+", "+resultLatLon[i][3]+", "+resultLatLon[i][4]); } request.setAttribute("resultLanLon", resultLatLon); request.getRequestDispatcher("displayroute.jsp").forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public String post();", "@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "public void postData() {\n\n\t}", "@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public abstract boolean handlePost(FORM form, BindException errors) throws Exception;", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException 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\ttaskCount++;\n//\t\tcountDown--;\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}", "@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }", "@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197", "0.6515622", "0.6513045", "0.6512626", "0.6492367", "0.64817846", "0.6477479", "0.64725804", "0.6472099", "0.6469389", "0.6456206", "0.6452577", "0.6452577", "0.6452577", "0.6450273", "0.6450273", "0.6438126", "0.6437522", "0.64339423", "0.64253825", "0.6422238", "0.6420897", "0.6420897", "0.6420897", "0.6407662", "0.64041835", "0.64041835", "0.639631", "0.6395677", "0.6354875", "0.63334197", "0.6324263", "0.62959254", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6280875", "0.6272104", "0.6272104", "0.62711537", "0.62616795", "0.62544584", "0.6251865", "0.62274224", "0.6214439", "0.62137586", "0.621211", "0.620854", "0.62023044", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61638993", "0.61603814", "0.6148914", "0.61465937", "0.61465937", "0.614548", "0.6141879", "0.6136717", "0.61313903", "0.61300284", "0.6124381", "0.6118381", "0.6118128", "0.61063534", "0.60992104", "0.6098801", "0.6096766" ]
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }", "@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }" ]
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", "0.85282224", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8516995", "0.8512296", "0.8511239", "0.8510324", "0.84964365" ]
0.0
-1
char at = 'k'; int mintill = 0; int minisat = 0; int minis=0;
private double[][] makeMSTDouble(GaneshaLakeId[] gla, GaneshaLakeDist[] gla1, GaneshaGaneshaDist[] gla2, int noofganesha, int nooflakes, Ganesha[] ganesha, Lake[] lake, PrintWriter pw) { double[][] resultPlot = new double[noofganesha+nooflakes+1][5]; int re = 1; boolean visited[] = new boolean[noofganesha]; // int lid = 1; // // int minvaldist=Integer.MAX_VALUE; // int misvalganeshaat = -1; // for(int i=0;i<noofganesha;i++){ //// pw.println(gla[i].lakeId +"--"+ lid ); // if(gla[i].lakeId == lid && minvaldist>gla1[lid*noofganesha+i].distance){ // minvaldist = gla1[lid*noofganesha+i].distance; // misvalganeshaat = i; // } // } // for(int lid =0;lid<nooflakes;lid++){ // int countCO1Lake = countClusterOfOneLake(gla,lid); // for(int i=0;i<noofganesha;i++){ // at = 'k'; // mintill = Integer.MAX_VALUE; // minisat = 0; // int start = lid*noofganesha; // for(int j=start;j<start+noofganesha;j++){ // if(mintill > gla1[j].distance && !visited[gla[j].ganesha] && gla[gla[j].ganesha].lakeId == lid){ // minisat=lid; // mintill=gla1[j].distance; // at='k'; // minis=j; // } // } // } for(int i=0;i<nooflakes;i++) { int minvaldist=Integer.MAX_VALUE; int misvalganeshaat = -1; int noofginclust = 0; for(int ij=0;ij<noofganesha;ij++){ // pw.println(gla[i].lakeId +"--"+ lid ); if(gla[ij].lakeId == i && minvaldist>gla1[i*noofganesha+ij].distance){ minvaldist = gla1[i*noofganesha+ij].distance; misvalganeshaat = ij; noofginclust++; } } newClass nc[]=new newClass[noofganesha+1]; int p=0; nc[0]=new newClass(); nc[0].isLake=true; nc[0].lakeId=i; Ganesha g[]=new Ganesha[noofganesha]; int k1=0; for(int j=0;j<noofganesha;j++) { if(gla[j].lakeId == i) { g[k1]=new Ganesha(); g[k1].ganeshaId=j; // pw.println(j+" j+++"); k1++; } } pw.println(k1+" k1+++"); for(int k=0;k<k1;k++) { int min=Integer.MAX_VALUE; int minIs=0; // pw.println(gla2.length); for(int l=0;l<gla2.length;l++) { if( g[k]!=null && gla2[l].ganesha1==g[k].ganeshaId && gla[gla2[l].ganesha2].lakeId == i) { // pw.println( gla[g[k].ganeshaId].lakeId+" lakeid"); if(min>gla2[l].distance && visited[gla2[l].ganesha2]==false && gla2[l].distance !=0) { // pw.println(gla2[l].ganesha2+"--"+i); minIs=l; min=gla2[l].distance; visited[gla2[l].ganesha2]=true; } } } newClass nc1=new newClass(); nc1.lakeId=i; nc1.ganeshaId=gla2[minIs].ganesha2; nc1.src=g[k].ganeshaId; nc1.isLake=false; p++; nc[p]=nc1; } if(misvalganeshaat != -1){ resultPlot[re][0] = lake[i].lan; resultPlot[re][1] = lake[i].lng; resultPlot[re][2] = ganesha[misvalganeshaat].lan; resultPlot[re][3] = ganesha[misvalganeshaat].lng; resultPlot[re][4] = lake[i].lakeId; re++; pw.println("Lake: "+i+" (lan, log): ("+lake[i].lan+", "+lake[i].lng+" to ganesha: "+misvalganeshaat+" (lan, log): ("+ganesha[misvalganeshaat].lan+", "+ganesha[misvalganeshaat].lng+")"); for(int k=1;k<p;k++) { resultPlot[re][0] = ganesha[nc[k].src].lan; resultPlot[re][1] = ganesha[nc[k].src].lng; resultPlot[re][2] = ganesha[nc[k].ganeshaId].lan; resultPlot[re][3] = ganesha[nc[k].ganeshaId].lng; //change 1 resultPlot[re][4] = lake[i].lakeId; re++; // pw.println("ganesha\t"+nc[k].ganeshaId+"\t from\t ganesha: "+nc[k].src); pw.println("ganesha: "+nc[k].src+"(lan, lng): ("+ganesha[nc[k].src].lan+", "+ganesha[nc[k].src].lng+") to ganesha: "+nc[k].ganeshaId+"(lan, lng): ("+ganesha[nc[k].ganeshaId].lan+", "+ganesha[nc[k].ganeshaId].lng+")"); } } else{ resultPlot[re][0] = lake[i].lan; resultPlot[re][1] = lake[i].lng; resultPlot[re][2] = lake[i].lan; resultPlot[re][3] = lake[i].lng; resultPlot[re][4] = lake[i].lakeId; re++; pw.println("Lake "+i+" (lan, log): ("+lake[i].lan+", "+lake[i].lng+") is Too Far."); } pw.println(); } resultPlot[0][0] = re; // for(int j=0;j<noofganesha;j++){ // int k1 = j*noofganesha; // for(int k=j*noofganesha;k<(j+1)*noofganesha;k++){ // if((mintill>gla2[k].distance)&& !visited[j] && gla[j].lakeId==lid){ // minisat = j; // mintill = gla2[j].distance; // minis = k1-j; // at = 'g'; // } // } // } // for(int i=0;i<noofganesha;i++){ // int j = i; // pw.println(gla[i].lakeId+" - "+lid); // if(gla[i].lakeId == lid) // while(j<gla2.length){ // pw.println(mintill+" - "+gla2[j].distance+" - "+visited[gla2[j].ganesha1]+" + "+gla[gla2[j].ganesha1].lakeId); // if((mintill>gla2[j].distance)&& gla2[j].distance != 0 && // visited[gla2[j].ganesha1] && lid==gla[gla2[j].ganesha1].lakeId && lid==gla[gla2[j].ganesha2].lakeId){ // minisat = gla2[j].ganesha2;; // mintill = gla2[j].distance; // minis = gla2[j].ganesha1; // at = 'g'; // } // j = j + noofganesha; // } // pw.println("+"+minis); // visited[minis]=true; // pw.println(minisat +"-"+at+"\t---------------->"+minis); // // } // pw.println("#"); // return resultPlot; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getAtk();", "public static void main(String[] args) {\n\t\t Scanner scan = new Scanner (System.in);\n\t\t \n\t\t System.out.println(\"tam isminizi giriniz\");\n\t String tamisim = scan.nextLine();\n\t \n \n System.out.println(\"Yasinizi giriniz\");\n int yas = scan.nextInt();\n System.out.println(yas);\n \n System.out.println(\"Isminizın ilk harfini girin\");\n char ilkHarf = scan.next().charAt(0);\n System.out.println(ilkHarf);\n\t\t\n\t\t\n\t}", "public String kalkulatu() {\n\t\tString emaitza = \"\";\n\t\tDouble d = 0.0;\n\t\ttry {\n\t\t\td = Double.parseDouble(et_sarrera.getText().toString());\n\t\t} catch (NumberFormatException e) {\n\t\t\tet_sarrera.setText(\"0\");\n\t\t}\n\t\tif (st_in.compareTo(\"m\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 100.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1609.344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.0254);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"km\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1000.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 100000.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1000000.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1.609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.0000254);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"cm\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 100000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 100.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 10.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 160934.4);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 2.54);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"mm\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 10.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 25.4);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"ml\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1.609344);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1609.344);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 160934.4);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.000015782828);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"inch\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.0000254);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.0254);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 2.54);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 25.4);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.000015782828);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t}\n\t\t}\n\t\treturn emaitza;\n\t}", "public int numerico(String n){\n if(n.equals(\"Limpieza\")){\r\n tipon=1;\r\n }\r\n if(n.equals(\"Electrico\")){\r\n tipon=2;\r\n } \r\n if(n.equals(\"Mecanico\")){\r\n tipon=3;\r\n } \r\n if(n.equals(\"Plomeria\")){\r\n tipon=4;\r\n } \r\n if(n.equals(\"Refrigeracion\")){\r\n tipon=5;\r\n }\r\n if(n.equals(\"Carpinteria\")){\r\n tipon=6;\r\n }\r\n if(n.equals(\"Area Verde\")){\r\n tipon=7;\r\n } \r\n if(n.equals(\"Preventivo\")){\r\n tipon=8;\r\n } \r\n if(n.equals(\"Pintura\")){\r\n tipon=9;\r\n } \r\n if(n.equals(\"TI\")){\r\n tipon=10;\r\n }\r\n return tipon; \r\n }", "public static void main(String[] args) {\n int yaricap=4;\n double alan= 4*4*Constans.pi;\n\n\n // kullanicidan alacaginiz saat , dakika ve gun bilgisinin saniyeyey ceviriniz\n\n int gun =23;\n int saat=7;\n int dakika=25;\n\n int saniyeCinsinden =\n gun * Constants.hourInDay *Constants.minuteInHour* Constants.secondInMinute+\n saat* Constants.minuteInHour* Constants.secondInMinute+\n dakika * Constants.secondInMinute;\n System.out.println(\"saniyeCinsinden = \" + saniyeCinsinden);\n\n\n }", "public int getAtk(){\n return atk;\n }", "static int letterIslands(String s, int k) {\n /*\n * Write your code here.\n */\n\n }", "public static int AnaEkranGoruntusu(){\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"****************************************\");\n\t\tSystem.out.println(\"* NE YAPMAK İSTERSİNİZ?\t\t\t*\");\n\t\tSystem.out.println(\"* 0)Alisveris Sepetini Goster\t\t*\");\n\t\tSystem.out.println(\"* 1)Sepetine Yeni Urun Ekle\t\t*\");\n\t\tSystem.out.println(\"* 2)Toplam Harcamami Goster\t\t*\");\n\t\tSystem.out.println(\"* 3)Cikis\t\t\t\t*\");\n\t\tSystem.out.println(\"****************************************\");\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Lutfen Secimini Giriniz: \");\n\t\tint anamenu_secim = scan.nextInt();\n\t\treturn anamenu_secim;\n\t}", "public static void main(String[] args) {\n\n\n\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"4 basamakli bir sayi giriniz\");\n\n\n int sayi = sc.nextInt();\n int kalan = sayi - ((sayi / 10) );\n\n \n int onlar = sayi%10;\n System.out.println( sayi- sayi/10 *10 );\n\n\n\n\n\n }", "public void setMerkki(char merkki){\r\n this.merkki = merkki; \r\n }", "int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }", "public Komentar(String isi, int tgl){\n this.isi = isi;\n this.tgl = tgl;\n }", "private void getK(){\r\n if(txtK.getText() != \"\"){\r\n interpretador.setK(Integer.parseInt(txtK.getText()));\r\n in.setK(Integer.parseInt(txtK.getText()));\r\n }\r\n }", "private int firstB(String fa)\n{\n Calendar cal=new GregorianCalendar();\n int y1=(cal.get(Calendar.YEAR)%2000)/10;\n int y2=(cal.get(Calendar.YEAR)%2000)%10;\n int flag1=0,flag2=0,flag3=0;\n String temp1=\"\"+fa.charAt(0);\n String temp2=\"\"+fa.charAt(1);\n String temp3=\"\"+fa.charAt(2);\n if(temp1.equalsIgnoreCase(String.valueOf(y1)))\n {\n flag1=1;\n }\n if(temp2.equalsIgnoreCase(\"F\") || temp2.equalsIgnoreCase(\"U\")|| temp2.equalsIgnoreCase(\"K\"))\n {\n flag2=1;\n }\n if(temp3.equalsIgnoreCase(\"\"+y2))\n {\n flag3=1;\n }\n if(flag1+flag2+flag3==3){\n return 1;\n }\n else{\n return 0;\n }\n \n}", "public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}", "public void setKota1(String tempatKerja) {\n\t\t\n\t}", "private static int digitarAntiguedad() {\n\t\tint antiguedad;\n\t\tSystem.out.println(\"Digite la antiguedad en aņos: \");\n\t\tantiguedad = teclado.nextInt();\n\t\treturn antiguedad;\n\t}", "int askForTempMin();", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "private int geefNaamIn() {\r\n Scanner scan = new Scanner(System.in);\r\n int keuze=0;\r\n try {\r\n System.out.printf(\"%n%s\",r.getString(\"keuzeInTeLadenSpel\"));\r\n keuze = scan.nextInt();\r\n \r\n } catch (InputMismatchException i) {\r\n System.err.print(r.getString(\"foutGeheelGetal\"));\r\n scan.nextLine();\r\n }\r\n return keuze;\r\n }", "public static void twoNumbers() {\n\n\t\tint x;\n\t\tint z;\n\t\tScanner input = new Scanner(System.in);\n\n\t\tSystem.out.println(\"skriv in två olika tal\");\n\n\t\tx = input.nextInt();\n\t\tz = input.nextInt();\n\n\t\tSystem.out.println(minstaTal(x, z));\n\n\t}", "bdm mo1784a(akh akh);", "public void nhapMonHoc() {\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Ten mon hoc: \");\n\t\t\ttenMonHoc= scanner.nextLine();\n\t\t\tSystem.out.println(\"So tin chi\");\n\t\t\ttinChi= Integer.parseInt(scanner.nextLine());\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Nhap sai du lieu!\");\n\t\t}\n\t}", "public static void main(String[] args) {\n int T;\n\n //Program\n System.out.println(\"\\nProgram untuk mengetahui bentuk air \");\n System.out.println(\"Silahkan masukan suhu air : \");\n\n //membuat Scanner untuk input\n Scanner baca = new Scanner(System.in);\n T = baca.nextInt();\n\n //Blok b=percabangan\n if(T < 0 ){\n System.out.println(\"Wujud Air beku \" + T);\n }else if(0 <= T && T<=100){\n System.out.println(\"Wujud air cair \" + T );\n }else{\n System.out.println(\"Wujud Air uap/gas \" + T);\n }\n }", "public void minutoStamina(int minutoStamina){\n tiempoReal = (minutoStamina * 6)+10;\n }", "public int getAtk() {\n return atk;\n }", "public void actionPerformed(ActionEvent evt){ ////klik ALT+ENTER -> import actionPerformed ->TOP\n String nol_bulan=\"\";\n String nol_hari=\"\";\n String nol_jam=\"\";\n String nol_menit=\"\";\n String nol_detik=\"\";\n Calendar dt=Calendar.getInstance(); ////untuk mengambil informasi waktu\n \n int nilai_jam=dt.get(Calendar.HOUR_OF_DAY); ////3.Calendar.HOUR_OF_DAY digunakan untuk settingan jam\n int nilai_menit=dt.get(Calendar.MINUTE); ////4.Calendar.MINUTE digunakan untuk settingan menit\n int nilai_detik=dt.get(Calendar.SECOND); ////5.Calendar.SECOND digunakan untuk settingan detik\n \n \n if(nilai_jam<=9){\n nol_jam=\"0\";\n }\n if(nilai_menit<=9){\n nol_menit=\"0\";\n }\n if(nilai_detik<=9){\n nol_detik=\"0\";\n }\n \n String jam=nol_jam+Integer.toString(nilai_jam);\n String menit=nol_menit+Integer.toString(nilai_menit);\n String detik=nol_detik+Integer.toString(nilai_detik);\n jammm.setText(jam+\":\"+menit+\":\"+detik); ////6.Label dengan variabel \"jammm\" akan berubah sesuai settingan jam menit dan detik\n\n }", "public int getAntwort()\n {\n int s = 999999;\n try {\n s = Integer.parseInt(antwort.getText()); \n } catch (Exception e) {\n\n }\n\n \n return s;\n }", "private int K(int t)\n {\n if(t<=19)\n return 0x5a827999;\n else if(t<=39)\n return 0x6ed9eba1;\n else if(t<=59)\n return 0x8f1bbcdc;\n else \n return 0xca62c1d6;\n }", "private int getNucIndex(char c) {\n\t\tswitch(c) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'C':\n\t\t\treturn 1;\n\t\tcase 'G':\n\t\t\treturn 2;\n\t\tcase 'T':\n\t\t\treturn 3;\n\t\tcase '-':\n\t\t\treturn 4;\n\t\tdefault:\n\t\t\treturn 4;\n\t\t}\n\t}", "public static int parseT1(String in){\n Scanner s = new Scanner(in);\n return s.nextInt();\n }", "void NhapGT(int thang, int nam) {\n }", "private int parseInt(char charAt) {\n\t\treturn 0;\n\t}", "private int patikrinimas(String z) {\n int result = 0;\n for (int i = 0; i < z.length(); i++) {\n if (z.charAt(i) == 'a') {\n result++;\n }\n }\n System.out.println(\"Ivestas tekstas turi simboliu a. Ju suma: \" + result);\n return result;\n }", "public void Ganhou() {\n\t\tString[] g = new String[10]; \n\t\tg[0] = m[0][0] + m[0][1] + m[0][2];\n\t\tg[1] = m[1][0] + m[1][1] + m[1][2];\n\t\tg[2] = m[2][0] + m[2][1] + m[2][2];\n\t\t\n\t\tg[3] = m[0][0] + m[1][0] + m[2][0];\n\t\tg[4] = m[0][1] + m[1][1] + m[2][1];\n\t\tg[5] = m[0][2] + m[1][2] + m[2][2];\n\t\t\n\t\tg[6] = m[0][0] + m[1][1] + m[2][2];\n\t\tg[7] = m[2][0] + m[1][1] + m[0][2];\n\t\tg[8] = \"0\";\n\t\tg[9] = \"0\";\n\t\t\n\t\tfor(int i= 0; i<10; i++) {\n\t\t\tif(g[i].equals(\"XXX\")){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"X GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\temp = 0; \n\t\t\t\tbreak;\n\t\t\t} else if (g[i].equals(\"OOO\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\"O GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (emp == 9) {\n\t\t\tJOptionPane.showMessageDialog(null,\"EMPATOU\");\t\n\t\t\tacabou = true;\n\t\t}\n\t}", "public static void main(String[] args) {\n int kor,eng,math;\r\n char score='A';\r\n // 사용자가 입력 \r\n /*Scanner scan=new Scanner(System.in);\r\n System.out.print(\"국어 점수 입력:\");\r\n kor=scan.nextInt();\r\n System.out.print(\"영어 점수 입력:\");\r\n eng=scan.nextInt();\r\n System.out.print(\"수학 점수 입력:\");\r\n math=scan.nextInt();*/\r\n kor=input(\"국어\");\r\n eng=input(\"영어\");\r\n math=input(\"수학\");\r\n \r\n // 학점 \r\n int avg=(kor+eng+math)/30;\r\n score=hakjum(avg);// 메소드는 호출 => 메소드 처음부터 실행 => 결과값을 넘겨주고 다음문장으로 이동\r\n /*switch(avg)\r\n {\r\n case 10:\r\n case 9:\r\n \tscore='A';\r\n \tbreak;\r\n case 8:\r\n \tscore='B';\r\n \tbreak;\r\n case 7:\r\n \tscore='C';\r\n \tbreak;\r\n case 6:\r\n \tscore='D';\r\n \tbreak;\r\n default:\r\n \tscore='F';\r\n }*/\r\n \r\n System.out.println(\"국어:\"+kor);\r\n System.out.println(\"영어:\"+eng);\r\n System.out.println(\"수학:\"+math);\r\n System.out.println(\"총점:\"+(kor+eng+math));\r\n System.out.printf(\"평균:%.2f\\n\",(kor+eng+math)/3.0);\r\n System.out.println(\"학점:\"+score);\r\n\t}", "public static void main(String[] args) {\n\n String str=\"22/2020\";\n String monath=str.substring(0,2);\n\n int monatI=Integer.valueOf(monath);\n if (monatI>=0 && monatI<=12){\n System.out.println(\"doğru\");\n }\n else\n System.out.println(\"yanlış\");\n }", "public void tinhtoan() {\n\t\t/*so1= Double.parseDouble(txtInput.getText().toString());\n\t\tcurResult=\"\";*/\n\t\ttry {\n\t\t\t\n\t\t\tDouble inNum = Double.parseDouble(simple.ThayDoi_Phay(curResult));\n\t\t\tcurResult = \"0\";\n\t\t\tif (pheptoan == ' ') {\n\t\t\t\tresult = inNum; //nhan gia tri vao result\n\t\t\t} else if (pheptoan == '+') {\n\t\t\t\tresult += inNum;\n\t\t\t\t//tinhtoan();\n\t\t\t\t//pheptoan = '+';\n\t\t\t\t//curResult=\"\";\n\t\t\t} else if (pheptoan == '-') {\n\t\t\t\t\n\t\t\t\tresult -= inNum;\n\n\t\t\t} else if (pheptoan == '*') {\n\t\t\t\tresult *= inNum;\n\n\t\t\t} else if (pheptoan == '/') {\n\t\t\t\tif(result==0){\n\n\t\t\t\t}else{\n\t\t\t\t\tresult /= inNum;\n\t\t\t\t}\n\t\t\t} else if (pheptoan == '=') {\n\t\t\t//\tToast.makeText(this.getContext(), \"Press C to continue...\", Toast.LENGTH_SHORT).show();\n\t\t\t\t// Keep the result for the next operation\\\n\t\t\t}\n\t\t\ttxtInput.setText(simple.LamTronSoFloat(result));\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"TAG\",\"Loi o Calculator.class->tinhtoan\" + e.getMessage());\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\tint prix=1, paiement=0,montant=0,Reste, Nb10E, Nb5E;\r\n\tchar rep='t';\r\n\tdo {\r\n\t\tSystem.out.println(\"saisir un prix\");\r\n\t\tScanner saisie = new Scanner(System.in);\r\n\t\tprix= saisie.nextInt();\r\n\t\t\r\n\t\tmontant=montant+prix; \r\n\t\t\r\n\t\tSystem.out.println(\"Voulez vous entrer un autre prix ? c pour continuer et t pour terminer\");\r\n\t\tScanner clavier=new Scanner (System.in);\r\n\t\trep= clavier.nextLine().charAt(0);\r\n\t\t\r\n\t}\r\n\t\t\r\n\t\r\n\t while (rep!='t');\r\n\t{\r\n\t\t System.out.println(\"saisir un prix\");\r\n\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\tprix= sc.nextInt();\r\n\t\t\t\r\n\t }\r\n\t\r\n\tSystem.out.println(\"le montant total est\"+montant); \r\n\r\n\tSystem.out.println(\"Saisir le paiement\");\r\n\tScanner sp = new Scanner(System.in);\r\n\tpaiement= sp.nextInt();\r\n\t\r\n\tReste = paiement-montant;\r\n\r\n\tNb10E = 0;\r\n\t\r\n\twhile (Reste >= 10 ) {\r\n\t Nb10E = Nb10E + 1;\r\n\t Reste = Reste-10;\r\n\t}\r\n\t Nb5E = 0;\r\n\t if (Reste >= 5) {\r\n\t\t Nb5E= 1;\r\n\t\t Reste = Reste-5;\r\n\t }\r\n\t\r\n\r\n\tSystem.out.println(\"Rendu de la monnaie\"); \r\n\tSystem.out.println(\"10 E\"+ Nb10E);\r\n\tSystem.out.println(\"Billets de 5 E\"+Nb5E); \r\n\tSystem.out.println(\"Pièces de 1 E\"+Reste);\r\n\r\n\t\r\n\tsp.close();\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "int getMindestvertragslaufzeit();", "public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }", "public static void main(String [] args){//inicio del main\r\n\r\n Scanner sc= new Scanner(System.in); \r\n\r\nSystem.out.println(\"ingrese los segundos \");//mesaje\r\nint num=sc.nextInt();//total de segundos\r\nint hor=num/3600;//total de horas en los segundos\r\nint min=(num-(3600*hor))/60;//total de min en las horas restantes\r\nint seg=num-((hor*3600)+(min*60));//total de segundo sen los miniutos restantes\r\nSystem.out.println(\"Horas: \" + hor + \" Minutos: \" + min + \" Segundos: \" + seg);//salida del tiempo\r\n\r\n}", "public void codeJ(int number) {\n\tString d;\n\t\n\t//Scanner scan = new Scanner(System.in);\n\tdo {\n\tdo{\n\t\t\n\t\tif (App.SCANNER.hasNextInt()) {\n\t\t\n\t\t}else {\n\t\t\tSystem.out.println(\" Entrez Uniquement un code a \" + number + \"chiffres\");\n\t\t\tApp.SCANNER.next();\n\t\t}\n\t\t\n\t\n\t}while(!App.SCANNER.hasNextInt()) ;\n\tthis.codeHumain=App.SCANNER.nextInt();\n\td = Integer.toString(codeHumain);\n\t\n\tif(d.length() != number) {\n\t\tSystem.out.println(\" Entrez Uniquement un code a \" + number + \"chiffres svp\" );\n\t}else if(d.length() == number) {\n\t}\n\t\n\t\n\t\n\t}while(d.length() != number) ;\n\t\n\t//scan.close();\n\t}", "public void set(String s) {\n y=(int)Integer.parseInt(s.substring(0,4));\n m=(int)Integer.parseInt(s.substring(5,7))-1;\n d=(int)Integer.parseInt(s.substring(7,9));\n }", "public char toChar() {\r\n//\t\t//Ant\r\n//\t\tif(hasAnt()){\r\n//\t\t\tif(this.ant.getColour() == 0){\r\n//\t\t\t\treturn '=';\r\n//\t\t\t}\r\n//\t\t\tif(this.ant.getColour() == 1){\r\n//\t\t\t\treturn '|';\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\t\t//Rock\r\n\t\tif(this.rocky){\r\n\t\t\treturn '#';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Food\r\n\t\tif(this.food > 0){\r\n\t\t\t//Prints the food value,\r\n\t\t\t//if it is > 9, prints 9 instead\r\n\t\t\tif(this.anthill == 0){ //0 to 9\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn 48 + 9;\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (this.food + 48);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Otherwise, food must be in an anthill\r\n\t\t\t//so give unique char value that acknowledges this\r\n\t\t\t//Greek isn't recognised by Notepad or the console (prints '?' instead)\r\n\t\t\t//Minimum food value is 1, so -1 from ascii codes\r\n\t\t\tif(this.anthill == 1){ //Upper case, 65 for Latin, 913 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (64 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (64 + this.food);\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){ //Lower case, 97 for Latin, 945 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (96 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (96 + this.food);\r\n\t\t\t}\r\n\t\t\t//Else error, cannot be less than 0 or more than 2 anthills\r\n\t\t\tLogger.log(new WarningEvent(\"Cell anthill value not 0, 1 or 2\"));\r\n\t\t\treturn 0;\t//Null char value\r\n\t\t}\r\n\t\t\r\n\t\t//Anthill\r\n\t\tif(this.anthill > 0){\r\n\t\t\tif(this.anthill == 1){\r\n\t\t\t\treturn '+';\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){\r\n\t\t\t\treturn '-';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\t//Markers\r\n//\t\tfor(int i = 0; i < this.markers.length; i++){\r\n//\t\t\tfor(boolean marker : this.markers[i]){\r\n//\t\t\t\tif(marker){\r\n//\t\t\t\t\tif(i == 0){\r\n//\t\t\t\t\t\treturn '[';\r\n//\t\t\t\t\t}else if(i == 1){\r\n//\t\t\t\t\t\treturn ']';\r\n//\t\t\t\t\t}else{\r\n//\t\t\t\t\t\treturn '?';\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t}\t\t\r\n//\t\t}\r\n\t\t\r\n\t\treturn '.';\r\n\t}", "public static String skrivTegn(char t, int ant) {\n\t\tString sekvens = \"\";\n\t\tfor (int i=1; i<=ant; i++) {\n\t\t\tsekvens += t;\n\t\t}\n\t\treturn sekvens;\n\t}", "public void setKanm(String kanm) {\r\n this.kanm = kanm;\r\n }", "public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }", "@Override\n\tpublic void nhap() {\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\" nhap ten:\");\n\t\tString ten = reader.nextLine();\n\t\tSystem.out.println(\" nhap tuoi:\");\n\t\ttuoi = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap can nang:\");\n\t\tcanNang = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\"nhap chieu chieuCao\");\n\t\tchieuCao = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap chieu chieuDai:\");\n\t\tchieuDai = Double.parseDouble(reader.nextLine());\n\t}", "public int getAtk()\r\n {\r\n return attack;\r\n }", "private static int num_konsonan(String word) {\n int i;\n int jumlah_konsonan = 0;\n\n for (i = 0; i < word.length(); i++) {\n if (word.charAt(i) != 'a' &&\n word.charAt(i) != 'i' &&\n word.charAt(i) != 'u' &&\n word.charAt(i) != 'e' &&\n word.charAt(i) != 'o') {\n jumlah_konsonan++;\n }\n }\n return jumlah_konsonan;\n }", "public int getMinimumCharacters() {\n checkWidget();\n return minChars;\n }", "public void setGeslacht(char geslacht)\n {\n if (geslacht == 'm' || geslacht == 'v'){\n\n if (geslacht == 'm'){\n this.geslacht = \"man\";\n }\n\n if (geslacht == 'v'){\n this.geslacht = \"vrouw\"; \n }\n }\n else {\n System.out.println (\"geslacht moet m of v zijn\"); \n }\n }", "public char checkmate()\n\t{\n\t\tif(p1.king.liv_status==0)\n\t\t{\n\t\t\tcheckm=1;\n\t\t\treturn 'b';\n\t\t}\n\t\telse if(p2.king.liv_status==0)\n\t\t{\n\t\t\tcheckm=1;\n\t\t\treturn 'w';\n\t\t}\n\t\telse\n\t\t\treturn '0';\n\t}", "public final int getSarakeMuuttujatAihe() {\r\n return sarakeMuuttujatAihe;\r\n }", "public void setMA_CHUYENNGANH( String MA_CHUYENNGANH )\n {\n this.MA_CHUYENNGANH = MA_CHUYENNGANH;\n }", "char startChar();", "public KI(String spielerwahl){\n\t\teigenerStein = spielerwahl;\n\t\t\n\t\tswitch (spielerwahl) {\n\t\tcase \"o\":\n\t\t\tgegnerStein = \"x\";\n\t\t\tbreak;\n\t\tcase\"x\":\n\t\t\tgegnerStein = \"o\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Ungueltige Spielerwahl.\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\thatAngefangen = gegnerStein;\n\t\t\n\t\tfor(int i=0; i<7; i++) { //initialisiert spielfeld\n\t\t\tfor(int j=0; j<6; j++){\t\t\t\t\n\t\t\t\tspielfeld[i][j] = \"_\";\n\t\t\t}\n\t\t\tmoeglicheZuege[i] = -1; //initialisiert die moeglichen zuege\n\t\t}\n\t\t\n\t}", "public Monom(String s){\r\n\t\ts = s.toLowerCase();\r\n\t\tString temp = \"\";\r\n\t\tint index=0;\r\n\t\tdouble a=0;\r\n\t\tint b=0;\r\n\r\n\t\tif((index = s.indexOf('x'))!=-1)\r\n\t\t{\r\n\t\t\tif(index+2<s.length() && index!=0)\r\n\t\t\t{\r\n\t\t\t\tif(s.charAt(index+1)=='^')\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s.charAt(0) == '-' && index==1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ta = -1;\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\ta = Double.parseDouble(s.substring(0,index));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tb = Integer.parseInt(s.substring(index+2,s.length()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(index+1==s.length())\r\n\t\t\t{\r\n\t\t\t\tb=1;\r\n\t\t\t\tif(s.length()==1)\r\n\t\t\t\t{\r\n\t\t\t\t\ta=1;\r\n\t\t\t\t}\r\n\t\t\t\telse if(s.charAt(0)=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(index==1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ta=-1;\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\ta = Double.parseDouble(s.substring(0,index));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttemp = s.substring(0, index);\r\n\t\t\t\t\t\ta = Double.parseDouble(temp);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(index==0)\r\n\t\t\t{\r\n\t\t\t\ta=1;\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tb=Integer.parseInt(s.substring(index+2,s.length()));\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\ta = Double.parseDouble(s);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.set_coefficient(a);\r\n\t\tthis.set_power(b);\r\n\r\n\t}", "public String ordainketaKudeatu(String ordainketa) {\r\n\t\tString dirua;\r\n\t\tdouble dirua1;\r\n\t\tdouble ordainketa1;\r\n\t\tdirua = deuda();\r\n\t\tordainketa = ordaindu();\r\n\t\tdirua1 = Double.parseDouble(dirua);\r\n\t\tordainketa1 = Double.parseDouble(ordainketa);\r\n\t\tkenketa = kenketa_dirua(dirua1, ordainketa1);\r\n\r\n\t\tSystem.out.println(kenketa);\r\n\t\tif (kenketa == 0.0) {\r\n\t\t\tbtnAurrera.setEnabled(true);\r\n\t\t\ttextField.setText(\"0.00\");\r\n\r\n\t\t}\r\n\t\tif (kenketa < 0) {\r\n\t\t\ttextField_2.setText(\"Itzulerak: \" + Math.abs(kenketa));\r\n\t\t\tbtnAurrera.setEnabled(true);\r\n\t\t}\r\n\t\tif (kenketa > 0) {\r\n\t\t\tkenketa = Math.abs(kenketa);\r\n\t\t\ttextField.setText(String.valueOf(kenketa));\r\n\t\t}\r\n\t\treturn ordainketa;\r\n\t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\t\tSystem.out.print(\"Masukkan nilai k : \");\n int k = scan.nextInt();\n System.out.print(\"Masukkan nilai l : \"); //jml\n int l = scan.nextInt();\n System.out.print(\"Masukkan nilai m : \"); //nxn\n int m = scan.nextInt();\n \n Soal07 data = new Soal07();\n data.buatSegitiga(k,l,m);\n data.cetak();\n\n\t}", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public int transferUang(int uang,int kb, int na){\n \n if(uang >= 250000 && kb==150){\n point+=10;\n saldo-=uang;\n }\n \n else\n saldo-=uang;\n \n return uang;\n }", "public String getKanm() {\r\n return kanm;\r\n }", "static int checkMateWithHathi(char[][] board, int P1r, int P1c) {\n\t\tint ch = P1c, checkmate = 0;\n\t\tfor (int r = P1r + 1; r < 8; r++) {\n\t\t\tif (board[r][ch] == 'k') {\n\t\t\t\tcheckmate++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn checkmate;\n\t}", "public int obtenerMinuto() { return minuto; }", "public void sethourNeed(Integer h){hourNeed=h;}", "void compareMantisseminDec(String mantisse){\n\n \t\tString min = \"14012985\";\n \t\tint longueur = minimum(mantisse.length(), min.length());\n\n \t\tfor (int i = 0; i< longueur; i++) {\n \t\t\tint mininum = min.charAt(i);\n \t\t\tint mantissei = mantisse.charAt(i);\n \t\t\tif (mantissei < mininum) {\n \t\t throw new InvalidFloatSmall(this, getInputStream());\n \t\t\t}\n \t\t}\n \t\t// mantisse plus longue donc >= min donc pas d'erreur de debordement\n\n \t}", "public static void main(String args[]) {\n Scanner s=new Scanner(System.in);\n char c=s.next().charAt(0);\n int k=s.nextInt();\n if(c=='c')\n {\n //char m='z';\n System.out.print(\"z \");\n return;\n }\n else if (c>='a' && c<='z')\n {\n int o=c+'a';\n o=(o-k)%26;\n c=(char)(o+'a');\n }\n else if(c>='A' && c<='Z')\n {\n int o=c+'A';\n o=(o-k)%26;\n c=(char)(o+'A');\n }\n System.out.print(c);\n }", "public static void main (String[]args){\n \r\n char AMayuscula = 'A', AMinuscula = 'a';\r\n // cast explicito de tipo - (AMayuscula + 1) el resultado es int\r\n char BMayuscula = (char) (AMayuscula + 1);\r\n \r\n System.out.println('\\n');\r\n System.out.println(BMayuscula);\r\n\t}", "private void setTime()\n\t{\n\t\t//local variable \n\t\tString rad = JOptionPane.showInputDialog(\"Enter the time spent bicycling: \"); \n\t\t\n\t\t//convert to int\n\t\ttry {\n\t\t\tbikeTime = Integer.parseInt(rad);\n\t\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t}", "public static String seuraavaArvaus(HashMap<String, Integer> muisti, String viimeisimmat, String kaikki) {\n if (kaikki.length() < 3) {\n return \"k\";\n }\n\n String viimKivi = viimeisimmat + \"k\";\n String viimPaperi = viimeisimmat + \"p\";\n String viimSakset = viimeisimmat + \"s\";\n \n int viimKiviLkm = 0;\n int viimPaperiLkm = 0;\n int viimSaksetLkm = 0;\n String arvaus = \"k\";\n int viimValueMax = 0;\n /*\n Sopivan valinnan etsiminen tehdään tarkastelemalla käyttäjän kahta viimeistä\n syötettä ja vertailemalla niitä koko historiaan. Mikäli historian mukaan\n kahta viimeistä syötettä seuraa useimmin kivi, tekoälyn tulee pelata paperi.\n Mikäli kahta viimeistä syötettä seuraa useimmin paperi, tekoälyn tulee \n pelata sakset. Mikäli taas kahta viimeistä syötettä seuraa useimmin sakset, \n tekoälyn tulee pelata kivi. Muissa tapauksissa pelataan kivi.\n */\n if (muisti.containsKey(viimKivi)) {\n viimKiviLkm = muisti.get(viimKivi);\n }\n if (muisti.containsKey(viimPaperi)) {\n viimPaperiLkm = muisti.get(viimPaperi);\n }\n if (muisti.containsKey(viimSakset)) {\n viimSaksetLkm = muisti.get(viimSakset);\n }\n\n if (viimKiviLkm > viimPaperiLkm && viimKiviLkm > viimSaksetLkm) {\n return \"p\";\n }\n if (viimPaperiLkm > viimKiviLkm && viimPaperiLkm > viimSaksetLkm) {\n return \"s\";\n }\n if (viimSaksetLkm > viimKiviLkm && viimSaksetLkm > viimPaperiLkm) {\n return \"k\";\n }\n\n return arvaus;\n }", "@Override\n\tpublic void nhap() {\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\" so cmnd:\");\n\t\tthis.cmnd = reader.nextLine();\n\t\tSystem.out.println(\" nhap ho ten khach hang:\");\n\t\tthis.hoTenKhachHang = reader.nextLine();\n\t\tSystem.out.println(\" so tien gui:\");\n\t\tthis.soTienGui = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap ngay lap:\");\n\t\tthis.ngayLap = reader.nextLine();\n\t\tSystem.out.println(\" lai suat:\");\n\t\tthis.laiSuat = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" so thang gui:\");\n\t\tthis.soThangGui = Integer.parseInt(reader.nextLine());\n\t\tSystem.out.println(\" nhap ky han:\");\n\t\tthis.kyHan = Integer.parseInt(reader.nextLine());\n\t}", "public String cekPengulangan(String kata) throws IOException{\n String hasil=\"\";\n if(cekUlangSemu(kata)){\n return kata+\" kata ulang semu \";\n }\n if(kata.contains(\"-\")){\n String[] pecah = kata.split(\"-\");\n String depan = pecah[0];\n String belakang = pecah[1];\n ArrayList<String> depanList = new ArrayList<String>();\n ArrayList<String> belakangList = new ArrayList<String>();\n if(!depan.equals(\"\")){\n depanList.addAll(morpParser.cekBerimbuhan(depan, 0));\n }\n if(!belakang.equals(\"\")){\n belakangList.addAll(morpParser.cekBerimbuhan(belakang, 0));\n }\n for(int i = 0; i < depanList.size(); i++){\n for(int j = 0; j < belakangList.size(); j++){\n if(depanList.get(i).equals(belakangList.get(j))){\n return depan+\" kata ulang penuh \";\n }\n }\n }\n if(depan.equals(belakang)){\n return depan+\" kata ulang penuh \";\n }\n char[] isiCharDepan = depan.toCharArray();\n char[] isiCharBelakang = belakang.toCharArray();\n boolean[] sama = new boolean[isiCharDepan.length];\n int jumlahSama=0;\n int jumlahBeda=0;\n for(int i =0;i<sama.length;i++){\n if(isiCharDepan[i]==isiCharBelakang[i]){\n sama[i]=true;\n jumlahSama++;\n }\n else{\n sama[i]=false;\n jumlahBeda++;\n }\n }\n \n if(jumlahBeda<jumlahSama && isiCharDepan.length==isiCharBelakang.length){\n return depan+\" kata ulang berubah bunyi \";\n }\n \n \n }\n else{\n if(kata.charAt(0)==kata.charAt(2)&&kata.charAt(1)=='e'){\n if((kata.charAt(0)=='j'||kata.charAt(0)=='t')&&!kata.endsWith(\"an\")){\n return kata.substring(2)+\" kata ulang sebagian \";\n }\n else if(kata.endsWith(\"an\")){\n return kata.substring(2,kata.length()-2)+\" kata ulang sebagian \";\n }\n \n }\n }\n return hasil;\n }", "public static void main(String[] args) {\n\t\t\n\t\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"Hangi islemi yapmak istersiniz 1) hesabi goruntuleme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 2)Para cekme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 3) Para yatirma\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 4)Cikis\");\n\t\t\t\t\n\t\t\t\tint islem = scan.nextInt();\n\t\t\t\tdouble toplamTutar = 5000;\n\t\t\t\tswitch(islem) {\n\t\t\t\tcase 1:\n\t\t\t\t\tSystem.out.println(\"Hesabinizda \" +toplamTutar + \"tl bulunmaktadir\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"Cekmek istediginiz miktari giriniz \");\n\t\t\t\t\tint miktar = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para cekiminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar-miktar));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tSystem.out.println(\"Yatirmak istediginiz miktari giriniz\");\n\t\t\t\t\tint yatirilanPara = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para yatirma isleminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar + yatirilanPara));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Bizleri tercih ettiginiz icin tesekkur ederiz Iyi gunler dileriz\");\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Yanlis giris yaptiniz lutfen tekrar deneyin\");\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tscan.close();\n\t\t\n\t\t\t\t\n\t}", "public int getCardVal(){\n\t\tint aces = 0;\n\t\tif(cardString.charAt(0) == 'J' || cardString.charAt(0) == 'Q' || cardString.charAt(0) == 'K' || cardString.charAt(0) == 'T'){\n\t\t\tcardValue = 10;\n\t\t}\n\t\telse if(cardString.charAt(0) == 'A'){\n\t\t\tcardValue = 11;\n\t\t}\n\t\telse{\n\t\t\tcardValue = Character.getNumericValue(cardString.charAt(0));\n\t\t}\n\t\treturn cardValue;\n\t}", "public static void main(String[] args) {\r\n\t\tScanner input = new Scanner(System.in);\r\n\r\n\t\tSystem.out.println(\"Enter a letter: \");\r\n\t\tString s = input.nextLine();\r\n\t\tchar ch = s.charAt(0);\r\n\t\tch = Character.toUpperCase(ch);\r\n\r\n\t\tif (s.length() != 1) {\r\n\t\t\tSystem.out.println(\"Invalid input\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\tint number = 0;\r\n\t\tif (Character.isLetter(ch)) {\r\n\t\t\tif ('W' <= ch)\r\n\t\t\t\tnumber = 9;\r\n\t\t\telse if ('T' <= ch)\r\n\t\t\t\tnumber = 8;\r\n\t\t\telse if ('P' <= ch)\r\n\t\t\t\tnumber = 7;\r\n\t\t\telse if ('M' <= ch)\r\n\t\t\t\tnumber = 6;\r\n\t\t\telse if ('J' <= ch)\r\n\t\t\t\tnumber = 5;\r\n\t\t\telse if ('G' <= ch)\r\n\t\t\t\tnumber = 4;\r\n\t\t\telse if ('D' <= ch)\r\n\t\t\t\tnumber = 3;\r\n\t\t\telse if ('A' <= ch)\r\n\t\t\t\tnumber = 2;\r\n\t\t\tSystem.out.println(\"The corresponding number is \" + number);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(ch + \" invalid input!\");\r\n\t\t}\r\n\t}", "public void setAcideAmine(String codon) {\n switch (codon) {\n \n case \"GCU\" :\n case \"GCC\" :\n case \"GCA\" :\n case \"GCG\" : \n this.acideAmine = \"Alanine\";\n break;\n case \"CGU\" :\n case \"CGC\" :\n case \"CGA\" :\n case \"CGG\" :\n case \"AGA\" :\n case \"AGG\" :\n this.acideAmine = \"Arginine\";\n break;\n case \"AAU\" :\n case \"AAC\" :\n this.acideAmine = \"Asparagine\";\n break;\n case \"GAU\" :\n case \"GAC\" :\n this.acideAmine = \"Aspartate\";\n break;\n case \"UGU\" :\n case \"UGC\" :\n this.acideAmine = \"Cysteine\";\n break;\n case \"GAA\" :\n case \"GAG\" :\n this.acideAmine = \"Glutamate\";\n break;\n case \"CAA\" :\n case \"CAG\" :\n this.acideAmine = \"Glutamine\";\n break;\n case \"GGU\" :\n case \"GGC\" :\n case \"GGA\" :\n case \"GGG\" :\n this.acideAmine = \"Glycine\";\n break;\n case \"CAU\" :\n case \"CAC\" :\n this.acideAmine = \"Histidine\";\n break;\n case \"AUU\" :\n case \"AUC\" :\n case \"AUA\" :\n this.acideAmine = \"Isoleucine\";\n break;\n case \"UUA\" :\n case \"UUG\" :\n case \"CUU\" :\n case \"CUC\" :\n case \"CUA\" :\n case \"CUG\" :\n this.acideAmine = \"Leucine\";\n break;\n case \"AAA\" :\n case \"AAG\" :\n this.acideAmine = \"Lysine\";\n break;\n case \"AUG\" :\n this.acideAmine = \"Methionine\";\n break;\n case \"UUU\" :\n case \"UUC\" :\n this.acideAmine = \"Phenylalanine\";\n break;\n case \"CCU\" :\n case \"CCC\" :\n case \"CCA\" :\n case \"CCG\" :\n this.acideAmine = \"Proline\";\n break;\n case \"UAG\" :\n this.acideAmine = \"Pyrrolysine\";\n break;\n case \"UGA\" :\n this.acideAmine = \"Selenocysteine\";\n break;\n case \"UCU\" :\n case \"UCC\" :\n case \"UCA\" :\n case \"UCG\" :\n case \"AGU\" :\n case \"AGC\" :\n this.acideAmine = \"Serine\";\n break;\n case \"ACU\" :\n case \"ACC\" :\n case \"ACA\" :\n case \"ACG\" :\n this.acideAmine = \"Threonine\";\n break;\n case \"UGG\" :\n this.acideAmine = \"Tryptophane\";\n break;\n case \"UAU\" :\n case \"UAC\" :\n this.acideAmine = \"Tyrosine\";\n break;\n case \"GUU\" :\n case \"GUC\" :\n case \"GUA\" :\n case \"GUG\" :\n this.acideAmine = \"Valine\";\n break;\n case \"UAA\" :\n this.acideAmine = \"Marqueur\";\n break;\n }\n }", "public static void main(String[] args) {\n int beratbadan;\n String nama;\n Scanner scan = new Scanner(System.in);\n\n // mengambil input\n System.out.print(\"Nama: \");\n nama = scan.nextLine();\n System.out.print(\"Berat Badan: \");\n beratbadan = scan.nextInt();\n\n // cek apakah dia ideal atau tidak\n if( beratbadan <= 50 ) {\n System.out.println(\"Selamat \" + nama + \", berat badan anda ideal!\");\n } else {\n System.out.println(\"Maaf \" + nama + \", berat badan anda overdose\");\n }\n\n }", "public void TicTac()\n {\n if(minutos<=59)\n {\n minutos=minutos+1;\n \n }\n else\n {\n minutos=00;\n horas+=1;\n \n }\n if(horas>23)\n {\n horas=00;\n \n }\n else\n {\n minutos+=1;\n }\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.nextLine();\n\t\tint hour = in.nextInt();\n\t\tString []num = s.split(\" \");\n\t\tint [] array = new int[num.length];\n\t\tfor(int i=0;i<num.length;i++)\n\t\t{\n\t\t\tarray[i]=Integer.parseInt(num[i]);\n\t\t}\n\t\t\n\t\tSystem.out.print(getMinSpeed(array,hour));\n\t}", "public static int cariNilai(String kata, int x, int y) {\r\n int hasil = 0;\r\n\r\n for (int i = 0; i < kata.length(); i++) {\r\n int nilaiSubstr = ((int) kata.charAt(i) - 96) % y;\r\n int nilaiPerKata = pangkatxmody(i, x, y, nilaiSubstr);\r\n hasil += nilaiPerKata;\r\n\r\n }\r\n\r\n hasil = hasil % y;\r\n return hasil;\r\n }", "public static void main(String[] args) {\n\t\tint n,s=0;\n\t\tScanner sc= new Scanner(System.in);\n\t\tSystem.out.println(\"enter seat no:\");\n\t\tn=sc.nextInt();\n\t\ts=n%12;\n\t\tswitch(s)\n\t\t{\n\t\tcase 0:\n\t\t\tSystem.out.println(\"seat:\"+(n-11)+\" WS\");\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tSystem.out.println(\"seat:\"+(n+11)+\" WS\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"seat:\"+(n+9)+\" MS\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"seat:\"+(n+7)+\" AS\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"seat:\"+(n+5)+\" AS\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"seat:\"+(n+3)+\" MS\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"seat:\"+(n+1)+\" WS\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"seat:\"+(n-1)+\" WS\");\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tSystem.out.println(\"seat:\"+(n-3)+\" MS\");\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tSystem.out.println(\"seat:\"+(n-5)+\" AS\");\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tSystem.out.println(\"seat:\"+(n-7)+\" AS\");\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tSystem.out.println(\"seat:\"+(n-9)+\" MS\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\n\t}", "void tampilKarakterA();", "float getMonatl_kosten();", "private static boolean isKata(String s) {\n\t\tchar c = s.charAt(0);\n\t\tif (c < '0' || c > '9') return true;\n\t\t\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn false;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn true;\n\t\t}\n\t}", "public int mo36g() {\n return 8;\n }", "public void anazitisiSintagisVaseiAstheni() {\n\t\tint amkaCode = 0;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tamkaCode = sir.readPositiveInt(\"EISAGETAI TO AMKA TOU ASTHENH: \"); // Zitaw apo ton xrhsth na mou dwsei ton amka tou asthenh pou thelei\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t\tif(amkaCode == prescription[i].getPatientAmka()) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou proorizetai gia ton sygkekrimeno asthenh\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t\tprescription[i].print(); // Emfanizw thn/tis sintagh/sintages oi opoies proorizontai gia ton sigkekrimeno asthenh\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\ttmp_2++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON ASTHENH ME AMKA: \" + amkaCode);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void setCharacter(int c) {\n setStat(c, character);\n }", "public int getTON() {\r\n return ton;\r\n }", "public void setTrangthaiChiTiet(int trangthaiChiTiet);", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tF = sc.nextInt(); // 최고높이\n\t\tint S = sc.nextInt(); // 현재\n\t\tint G = sc.nextInt(); // 목적지\n\t\tU = sc.nextInt(); // 올라가는 \n\t\tD = sc.nextInt(); // 내려가는\n\t\t\n\t\tupdown(G, S);\n\t\t// 찾지 못했을 경우.\n\t\tif(min==1000001){\n\t\t\tSystem.out.println(\"use the stairs\");\n\t\t}\n\t\telse{\n\t\tSystem.out.println(min);\n\t\t}\n\t}", "static String stringCutter1(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n\n // pemotongan string untuk pemotongan kelompok pertama\n String sentence1 = s.substring(0, value);\n\n // perulangan untuk menggeser nilai setiap karakter\n String wordNow = \"\";\n for (int i = 0; i < sentence1.length(); i++) {\n char alphabet = sentence1.toUpperCase().charAt(i);\n // pengubahan setiap karakter menjadi int\n // untuk menggeser 3 setiap nilai nya\n int asciiDecimal = (int) alphabet;\n // pengecekan kondisi apabila karakter melewati kode ascii nya\n if (asciiDecimal > 124) {\n int alphabetTransfer = 0 + (127 - asciiDecimal);\n wordNow += (char) alphabetTransfer;\n\n } else {\n int alphabetTrasfer = asciiDecimal + 3;\n wordNow += (char) alphabetTrasfer;\n }\n }\n return wordNow;\n }", "public void setKelas(String sekolah){\n\t\ttempat = sekolah;\n\t}", "public static void main(String[] args) {\n int age = 18; // Assign value of 18 to the age variable\n double pi = 3.14;\n\n boolean beautiful = true;\n boolean hot = false;\n\n char firstAlphabetLetter = 65;\n char letterC = 'C';\n\n System.out.println(age);\n System.out.println(pi);\n\n System.out.println(20);\n\n System.out.println(beautiful);\n System.out.println(hot);\n\n System.out.println(firstAlphabetLetter);\n\n byte b = 100;\n short s = 100;\n long l = 100;\n\n float f = 10.0f;\n\n System.out.println(b);\n System.out.println(s);\n System.out.println(l);\n System.out.println(f);\n\n System.out.println(15.0f);\n\n char letterZ = 'Z';\n\n System.out.println((int) letterZ);\n\n String txt = \"How are you doing today?\";\n\n System.out.println(txt);\n }", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "public double calculatedConsuption(){\nint tressToSow=0;\n\nif (getKiloWatts() >=1 && getKiloWatts() <= 1000){\n\ttressToSow = 8;\n}\nelse if (getKiloWatts() >=1001 && getKiloWatts ()<=3000){\n\ttressToSow = 35;\n}\nelse if (getKiloWatts() > 3000){\n\ttressToSow=500;\n}\nreturn tressToSow;\n}", "public int getAtkAmount(){\r\n return (int) (Math.random() * (maxAtk - minAtk) + minAtk);\r\n\r\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t\n\t\tSystem.out.println(Character.getNumericValue('s'));\n\t\t//10 a\n\t\t//35 z\n\t\t//28 s\n\t\twhile(true) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif(s.equals(\"halt\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchar prev = ' ';\n\t\t\t\tfor(int i = 0; i<s.length(); i++) {\n\t\t\t\t\tchar c = s.charAt(i);\n\t\t\t\t\tint numericValue = Character.getNumericValue(c);\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\n\t}", "private void jam() {\n ActionListener taskPerformer=new ActionListener(){ ////klik ALT+ENTER -> import ActionListener ->TOP\n \n public void actionPerformed(ActionEvent evt){ ////klik ALT+ENTER -> import actionPerformed ->TOP\n String nol_bulan=\"\";\n String nol_hari=\"\";\n String nol_jam=\"\";\n String nol_menit=\"\";\n String nol_detik=\"\";\n Calendar dt=Calendar.getInstance(); ////untuk mengambil informasi waktu\n \n int nilai_jam=dt.get(Calendar.HOUR_OF_DAY); ////3.Calendar.HOUR_OF_DAY digunakan untuk settingan jam\n int nilai_menit=dt.get(Calendar.MINUTE); ////4.Calendar.MINUTE digunakan untuk settingan menit\n int nilai_detik=dt.get(Calendar.SECOND); ////5.Calendar.SECOND digunakan untuk settingan detik\n \n \n if(nilai_jam<=9){\n nol_jam=\"0\";\n }\n if(nilai_menit<=9){\n nol_menit=\"0\";\n }\n if(nilai_detik<=9){\n nol_detik=\"0\";\n }\n \n String jam=nol_jam+Integer.toString(nilai_jam);\n String menit=nol_menit+Integer.toString(nilai_menit);\n String detik=nol_detik+Integer.toString(nilai_detik);\n jammm.setText(jam+\":\"+menit+\":\"+detik); ////6.Label dengan variabel \"jammm\" akan berubah sesuai settingan jam menit dan detik\n\n }\n };\n new javax.swing.Timer(1000,taskPerformer).start(); ////untuk start\n }" ]
[ "0.5892706", "0.58736295", "0.5824618", "0.5741574", "0.56490254", "0.5633993", "0.55908215", "0.5566586", "0.55550385", "0.554951", "0.55243605", "0.54704106", "0.54674864", "0.54632425", "0.54590064", "0.54493386", "0.54436344", "0.5440999", "0.5426918", "0.54002225", "0.53943074", "0.53799003", "0.53788793", "0.536196", "0.53477556", "0.53451324", "0.53340435", "0.53220373", "0.5312017", "0.53039235", "0.52791655", "0.5276956", "0.5271076", "0.52690524", "0.52651566", "0.52498305", "0.52410245", "0.52036023", "0.5193359", "0.5188491", "0.51779103", "0.5169911", "0.5169428", "0.5164297", "0.5164158", "0.51585275", "0.5152306", "0.5149282", "0.51488274", "0.5147484", "0.5145425", "0.51400465", "0.5134984", "0.5134145", "0.5128167", "0.51202637", "0.5115197", "0.5113638", "0.5102617", "0.5102408", "0.509225", "0.50902385", "0.5086593", "0.5083773", "0.5079911", "0.5077863", "0.50775146", "0.5073264", "0.5071672", "0.506712", "0.50593954", "0.50592464", "0.50457436", "0.5041139", "0.50361943", "0.5031064", "0.502982", "0.50097644", "0.5007171", "0.5005496", "0.500288", "0.50001526", "0.49976617", "0.499013", "0.49879363", "0.4987908", "0.49811986", "0.4977284", "0.49738848", "0.49734423", "0.49726003", "0.49712422", "0.49705276", "0.49663484", "0.4962805", "0.49621147", "0.4961332", "0.49597788", "0.4959046", "0.49549606", "0.49547625" ]
0.0
-1
char at = 'k'; int mintill = 0; int minisat = 0; int minis=0;
private double[][] makeWithoutAny(GaneshaLakeId[] gla, GaneshaLakeDist[] gla1, GaneshaGaneshaDist[] gla2, int noofganesha, int nooflakes, Ganesha[] ganesha, Lake[] lake, PrintWriter pw) { double[][] resultPlot = new double[noofganesha+nooflakes+1][5]; int re = 1; boolean visited[] = new boolean[noofganesha]; for(int i=0;i<nooflakes;i++) { int minvaldist=Integer.MAX_VALUE; int misvalganeshaat = -1; int noofginclust = 0; for(int ij=0;ij<noofganesha;ij++){ // pw.println(gla[i].lakeId +"--"+ lid ); if(gla[ij].lakeId == i && minvaldist>gla1[i*noofganesha+ij].distance){ minvaldist = gla1[i*noofganesha+ij].distance; misvalganeshaat = ij; noofginclust++; } } newClass nc[]=new newClass[noofganesha+1]; int p=0; nc[0]=new newClass(); nc[0].isLake=true; nc[0].lakeId=i; Ganesha g[]=new Ganesha[noofganesha]; int k1=0; for(int j=0;j<noofganesha;j++) { if(gla[j].lakeId == i) { g[k1]=new Ganesha(); g[k1].ganeshaId=j; resultPlot[re][0] = lake[i].lan; resultPlot[re][1] = lake[i].lng; resultPlot[re][2] = ganesha[j].lan; resultPlot[re][3] = ganesha[j].lng; resultPlot[re][4] = lake[i].lakeId; re++; pw.println("Lake: "+i+" (lan, log): ("+lake[i].lan+", "+lake[i].lng+" to ganesha: "+j+" (lan, log): ("+ganesha[j].lan+", "+ganesha[j].lng+")"); k1++; } } if(k1 == 0) { resultPlot[re][0] = lake[i].lan; resultPlot[re][1] = lake[i].lng; resultPlot[re][2] = lake[i].lan; resultPlot[re][3] = lake[i].lng; resultPlot[re][4] = lake[i].lakeId; re++; pw.println("Lake "+i+" (lan, log): ("+lake[i].lan+", "+lake[i].lng+") is Too Far."); } pw.println(); } resultPlot[0][0] = re; // for(int j=0;j<noofganesha;j++){ // int k1 = j*noofganesha; // for(int k=j*noofganesha;k<(j+1)*noofganesha;k++){ // if((mintill>gla2[k].distance)&& !visited[j] && gla[j].lakeId==lid){ // minisat = j; // mintill = gla2[j].distance; // minis = k1-j; // at = 'g'; // } // } // } // for(int i=0;i<noofganesha;i++){ // int j = i; // pw.println(gla[i].lakeId+" - "+lid); // if(gla[i].lakeId == lid) // while(j<gla2.length){ // pw.println(mintill+" - "+gla2[j].distance+" - "+visited[gla2[j].ganesha1]+" + "+gla[gla2[j].ganesha1].lakeId); // if((mintill>gla2[j].distance)&& gla2[j].distance != 0 && // visited[gla2[j].ganesha1] && lid==gla[gla2[j].ganesha1].lakeId && lid==gla[gla2[j].ganesha2].lakeId){ // minisat = gla2[j].ganesha2;; // mintill = gla2[j].distance; // minis = gla2[j].ganesha1; // at = 'g'; // } // j = j + noofganesha; // } // pw.println("+"+minis); // visited[minis]=true; // pw.println(minisat +"-"+at+"\t---------------->"+minis); // // } // pw.println("#"); // return resultPlot; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getAtk();", "public static void main(String[] args) {\n\t\t Scanner scan = new Scanner (System.in);\n\t\t \n\t\t System.out.println(\"tam isminizi giriniz\");\n\t String tamisim = scan.nextLine();\n\t \n \n System.out.println(\"Yasinizi giriniz\");\n int yas = scan.nextInt();\n System.out.println(yas);\n \n System.out.println(\"Isminizın ilk harfini girin\");\n char ilkHarf = scan.next().charAt(0);\n System.out.println(ilkHarf);\n\t\t\n\t\t\n\t}", "public String kalkulatu() {\n\t\tString emaitza = \"\";\n\t\tDouble d = 0.0;\n\t\ttry {\n\t\t\td = Double.parseDouble(et_sarrera.getText().toString());\n\t\t} catch (NumberFormatException e) {\n\t\t\tet_sarrera.setText(\"0\");\n\t\t}\n\t\tif (st_in.compareTo(\"m\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 100.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1609.344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.0254);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"km\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1000.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 100000.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1000000.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1.609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.0000254);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"cm\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 100000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 100.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 10.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 160934.4);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 2.54);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"mm\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 10.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 25.4);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"ml\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1.609344);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1609.344);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 160934.4);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.000015782828);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"inch\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.0000254);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.0254);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 2.54);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 25.4);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.000015782828);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t}\n\t\t}\n\t\treturn emaitza;\n\t}", "public int numerico(String n){\n if(n.equals(\"Limpieza\")){\r\n tipon=1;\r\n }\r\n if(n.equals(\"Electrico\")){\r\n tipon=2;\r\n } \r\n if(n.equals(\"Mecanico\")){\r\n tipon=3;\r\n } \r\n if(n.equals(\"Plomeria\")){\r\n tipon=4;\r\n } \r\n if(n.equals(\"Refrigeracion\")){\r\n tipon=5;\r\n }\r\n if(n.equals(\"Carpinteria\")){\r\n tipon=6;\r\n }\r\n if(n.equals(\"Area Verde\")){\r\n tipon=7;\r\n } \r\n if(n.equals(\"Preventivo\")){\r\n tipon=8;\r\n } \r\n if(n.equals(\"Pintura\")){\r\n tipon=9;\r\n } \r\n if(n.equals(\"TI\")){\r\n tipon=10;\r\n }\r\n return tipon; \r\n }", "public static void main(String[] args) {\n int yaricap=4;\n double alan= 4*4*Constans.pi;\n\n\n // kullanicidan alacaginiz saat , dakika ve gun bilgisinin saniyeyey ceviriniz\n\n int gun =23;\n int saat=7;\n int dakika=25;\n\n int saniyeCinsinden =\n gun * Constants.hourInDay *Constants.minuteInHour* Constants.secondInMinute+\n saat* Constants.minuteInHour* Constants.secondInMinute+\n dakika * Constants.secondInMinute;\n System.out.println(\"saniyeCinsinden = \" + saniyeCinsinden);\n\n\n }", "public int getAtk(){\n return atk;\n }", "static int letterIslands(String s, int k) {\n /*\n * Write your code here.\n */\n\n }", "public static int AnaEkranGoruntusu(){\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"****************************************\");\n\t\tSystem.out.println(\"* NE YAPMAK İSTERSİNİZ?\t\t\t*\");\n\t\tSystem.out.println(\"* 0)Alisveris Sepetini Goster\t\t*\");\n\t\tSystem.out.println(\"* 1)Sepetine Yeni Urun Ekle\t\t*\");\n\t\tSystem.out.println(\"* 2)Toplam Harcamami Goster\t\t*\");\n\t\tSystem.out.println(\"* 3)Cikis\t\t\t\t*\");\n\t\tSystem.out.println(\"****************************************\");\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Lutfen Secimini Giriniz: \");\n\t\tint anamenu_secim = scan.nextInt();\n\t\treturn anamenu_secim;\n\t}", "public static void main(String[] args) {\n\n\n\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"4 basamakli bir sayi giriniz\");\n\n\n int sayi = sc.nextInt();\n int kalan = sayi - ((sayi / 10) );\n\n \n int onlar = sayi%10;\n System.out.println( sayi- sayi/10 *10 );\n\n\n\n\n\n }", "public void setMerkki(char merkki){\r\n this.merkki = merkki; \r\n }", "int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }", "public Komentar(String isi, int tgl){\n this.isi = isi;\n this.tgl = tgl;\n }", "private void getK(){\r\n if(txtK.getText() != \"\"){\r\n interpretador.setK(Integer.parseInt(txtK.getText()));\r\n in.setK(Integer.parseInt(txtK.getText()));\r\n }\r\n }", "private int firstB(String fa)\n{\n Calendar cal=new GregorianCalendar();\n int y1=(cal.get(Calendar.YEAR)%2000)/10;\n int y2=(cal.get(Calendar.YEAR)%2000)%10;\n int flag1=0,flag2=0,flag3=0;\n String temp1=\"\"+fa.charAt(0);\n String temp2=\"\"+fa.charAt(1);\n String temp3=\"\"+fa.charAt(2);\n if(temp1.equalsIgnoreCase(String.valueOf(y1)))\n {\n flag1=1;\n }\n if(temp2.equalsIgnoreCase(\"F\") || temp2.equalsIgnoreCase(\"U\")|| temp2.equalsIgnoreCase(\"K\"))\n {\n flag2=1;\n }\n if(temp3.equalsIgnoreCase(\"\"+y2))\n {\n flag3=1;\n }\n if(flag1+flag2+flag3==3){\n return 1;\n }\n else{\n return 0;\n }\n \n}", "public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}", "public void setKota1(String tempatKerja) {\n\t\t\n\t}", "private static int digitarAntiguedad() {\n\t\tint antiguedad;\n\t\tSystem.out.println(\"Digite la antiguedad en aņos: \");\n\t\tantiguedad = teclado.nextInt();\n\t\treturn antiguedad;\n\t}", "int askForTempMin();", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "private int geefNaamIn() {\r\n Scanner scan = new Scanner(System.in);\r\n int keuze=0;\r\n try {\r\n System.out.printf(\"%n%s\",r.getString(\"keuzeInTeLadenSpel\"));\r\n keuze = scan.nextInt();\r\n \r\n } catch (InputMismatchException i) {\r\n System.err.print(r.getString(\"foutGeheelGetal\"));\r\n scan.nextLine();\r\n }\r\n return keuze;\r\n }", "public static void twoNumbers() {\n\n\t\tint x;\n\t\tint z;\n\t\tScanner input = new Scanner(System.in);\n\n\t\tSystem.out.println(\"skriv in två olika tal\");\n\n\t\tx = input.nextInt();\n\t\tz = input.nextInt();\n\n\t\tSystem.out.println(minstaTal(x, z));\n\n\t}", "bdm mo1784a(akh akh);", "public void nhapMonHoc() {\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Ten mon hoc: \");\n\t\t\ttenMonHoc= scanner.nextLine();\n\t\t\tSystem.out.println(\"So tin chi\");\n\t\t\ttinChi= Integer.parseInt(scanner.nextLine());\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Nhap sai du lieu!\");\n\t\t}\n\t}", "public static void main(String[] args) {\n int T;\n\n //Program\n System.out.println(\"\\nProgram untuk mengetahui bentuk air \");\n System.out.println(\"Silahkan masukan suhu air : \");\n\n //membuat Scanner untuk input\n Scanner baca = new Scanner(System.in);\n T = baca.nextInt();\n\n //Blok b=percabangan\n if(T < 0 ){\n System.out.println(\"Wujud Air beku \" + T);\n }else if(0 <= T && T<=100){\n System.out.println(\"Wujud air cair \" + T );\n }else{\n System.out.println(\"Wujud Air uap/gas \" + T);\n }\n }", "public void minutoStamina(int minutoStamina){\n tiempoReal = (minutoStamina * 6)+10;\n }", "public int getAtk() {\n return atk;\n }", "public void actionPerformed(ActionEvent evt){ ////klik ALT+ENTER -> import actionPerformed ->TOP\n String nol_bulan=\"\";\n String nol_hari=\"\";\n String nol_jam=\"\";\n String nol_menit=\"\";\n String nol_detik=\"\";\n Calendar dt=Calendar.getInstance(); ////untuk mengambil informasi waktu\n \n int nilai_jam=dt.get(Calendar.HOUR_OF_DAY); ////3.Calendar.HOUR_OF_DAY digunakan untuk settingan jam\n int nilai_menit=dt.get(Calendar.MINUTE); ////4.Calendar.MINUTE digunakan untuk settingan menit\n int nilai_detik=dt.get(Calendar.SECOND); ////5.Calendar.SECOND digunakan untuk settingan detik\n \n \n if(nilai_jam<=9){\n nol_jam=\"0\";\n }\n if(nilai_menit<=9){\n nol_menit=\"0\";\n }\n if(nilai_detik<=9){\n nol_detik=\"0\";\n }\n \n String jam=nol_jam+Integer.toString(nilai_jam);\n String menit=nol_menit+Integer.toString(nilai_menit);\n String detik=nol_detik+Integer.toString(nilai_detik);\n jammm.setText(jam+\":\"+menit+\":\"+detik); ////6.Label dengan variabel \"jammm\" akan berubah sesuai settingan jam menit dan detik\n\n }", "public int getAntwort()\n {\n int s = 999999;\n try {\n s = Integer.parseInt(antwort.getText()); \n } catch (Exception e) {\n\n }\n\n \n return s;\n }", "private int K(int t)\n {\n if(t<=19)\n return 0x5a827999;\n else if(t<=39)\n return 0x6ed9eba1;\n else if(t<=59)\n return 0x8f1bbcdc;\n else \n return 0xca62c1d6;\n }", "private int getNucIndex(char c) {\n\t\tswitch(c) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'C':\n\t\t\treturn 1;\n\t\tcase 'G':\n\t\t\treturn 2;\n\t\tcase 'T':\n\t\t\treturn 3;\n\t\tcase '-':\n\t\t\treturn 4;\n\t\tdefault:\n\t\t\treturn 4;\n\t\t}\n\t}", "public static int parseT1(String in){\n Scanner s = new Scanner(in);\n return s.nextInt();\n }", "void NhapGT(int thang, int nam) {\n }", "private int patikrinimas(String z) {\n int result = 0;\n for (int i = 0; i < z.length(); i++) {\n if (z.charAt(i) == 'a') {\n result++;\n }\n }\n System.out.println(\"Ivestas tekstas turi simboliu a. Ju suma: \" + result);\n return result;\n }", "private int parseInt(char charAt) {\n\t\treturn 0;\n\t}", "public void Ganhou() {\n\t\tString[] g = new String[10]; \n\t\tg[0] = m[0][0] + m[0][1] + m[0][2];\n\t\tg[1] = m[1][0] + m[1][1] + m[1][2];\n\t\tg[2] = m[2][0] + m[2][1] + m[2][2];\n\t\t\n\t\tg[3] = m[0][0] + m[1][0] + m[2][0];\n\t\tg[4] = m[0][1] + m[1][1] + m[2][1];\n\t\tg[5] = m[0][2] + m[1][2] + m[2][2];\n\t\t\n\t\tg[6] = m[0][0] + m[1][1] + m[2][2];\n\t\tg[7] = m[2][0] + m[1][1] + m[0][2];\n\t\tg[8] = \"0\";\n\t\tg[9] = \"0\";\n\t\t\n\t\tfor(int i= 0; i<10; i++) {\n\t\t\tif(g[i].equals(\"XXX\")){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"X GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\temp = 0; \n\t\t\t\tbreak;\n\t\t\t} else if (g[i].equals(\"OOO\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\"O GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (emp == 9) {\n\t\t\tJOptionPane.showMessageDialog(null,\"EMPATOU\");\t\n\t\t\tacabou = true;\n\t\t}\n\t}", "public static void main(String[] args) {\n int kor,eng,math;\r\n char score='A';\r\n // 사용자가 입력 \r\n /*Scanner scan=new Scanner(System.in);\r\n System.out.print(\"국어 점수 입력:\");\r\n kor=scan.nextInt();\r\n System.out.print(\"영어 점수 입력:\");\r\n eng=scan.nextInt();\r\n System.out.print(\"수학 점수 입력:\");\r\n math=scan.nextInt();*/\r\n kor=input(\"국어\");\r\n eng=input(\"영어\");\r\n math=input(\"수학\");\r\n \r\n // 학점 \r\n int avg=(kor+eng+math)/30;\r\n score=hakjum(avg);// 메소드는 호출 => 메소드 처음부터 실행 => 결과값을 넘겨주고 다음문장으로 이동\r\n /*switch(avg)\r\n {\r\n case 10:\r\n case 9:\r\n \tscore='A';\r\n \tbreak;\r\n case 8:\r\n \tscore='B';\r\n \tbreak;\r\n case 7:\r\n \tscore='C';\r\n \tbreak;\r\n case 6:\r\n \tscore='D';\r\n \tbreak;\r\n default:\r\n \tscore='F';\r\n }*/\r\n \r\n System.out.println(\"국어:\"+kor);\r\n System.out.println(\"영어:\"+eng);\r\n System.out.println(\"수학:\"+math);\r\n System.out.println(\"총점:\"+(kor+eng+math));\r\n System.out.printf(\"평균:%.2f\\n\",(kor+eng+math)/3.0);\r\n System.out.println(\"학점:\"+score);\r\n\t}", "public static void main(String[] args) {\n\n String str=\"22/2020\";\n String monath=str.substring(0,2);\n\n int monatI=Integer.valueOf(monath);\n if (monatI>=0 && monatI<=12){\n System.out.println(\"doğru\");\n }\n else\n System.out.println(\"yanlış\");\n }", "public void tinhtoan() {\n\t\t/*so1= Double.parseDouble(txtInput.getText().toString());\n\t\tcurResult=\"\";*/\n\t\ttry {\n\t\t\t\n\t\t\tDouble inNum = Double.parseDouble(simple.ThayDoi_Phay(curResult));\n\t\t\tcurResult = \"0\";\n\t\t\tif (pheptoan == ' ') {\n\t\t\t\tresult = inNum; //nhan gia tri vao result\n\t\t\t} else if (pheptoan == '+') {\n\t\t\t\tresult += inNum;\n\t\t\t\t//tinhtoan();\n\t\t\t\t//pheptoan = '+';\n\t\t\t\t//curResult=\"\";\n\t\t\t} else if (pheptoan == '-') {\n\t\t\t\t\n\t\t\t\tresult -= inNum;\n\n\t\t\t} else if (pheptoan == '*') {\n\t\t\t\tresult *= inNum;\n\n\t\t\t} else if (pheptoan == '/') {\n\t\t\t\tif(result==0){\n\n\t\t\t\t}else{\n\t\t\t\t\tresult /= inNum;\n\t\t\t\t}\n\t\t\t} else if (pheptoan == '=') {\n\t\t\t//\tToast.makeText(this.getContext(), \"Press C to continue...\", Toast.LENGTH_SHORT).show();\n\t\t\t\t// Keep the result for the next operation\\\n\t\t\t}\n\t\t\ttxtInput.setText(simple.LamTronSoFloat(result));\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"TAG\",\"Loi o Calculator.class->tinhtoan\" + e.getMessage());\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\tint prix=1, paiement=0,montant=0,Reste, Nb10E, Nb5E;\r\n\tchar rep='t';\r\n\tdo {\r\n\t\tSystem.out.println(\"saisir un prix\");\r\n\t\tScanner saisie = new Scanner(System.in);\r\n\t\tprix= saisie.nextInt();\r\n\t\t\r\n\t\tmontant=montant+prix; \r\n\t\t\r\n\t\tSystem.out.println(\"Voulez vous entrer un autre prix ? c pour continuer et t pour terminer\");\r\n\t\tScanner clavier=new Scanner (System.in);\r\n\t\trep= clavier.nextLine().charAt(0);\r\n\t\t\r\n\t}\r\n\t\t\r\n\t\r\n\t while (rep!='t');\r\n\t{\r\n\t\t System.out.println(\"saisir un prix\");\r\n\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\tprix= sc.nextInt();\r\n\t\t\t\r\n\t }\r\n\t\r\n\tSystem.out.println(\"le montant total est\"+montant); \r\n\r\n\tSystem.out.println(\"Saisir le paiement\");\r\n\tScanner sp = new Scanner(System.in);\r\n\tpaiement= sp.nextInt();\r\n\t\r\n\tReste = paiement-montant;\r\n\r\n\tNb10E = 0;\r\n\t\r\n\twhile (Reste >= 10 ) {\r\n\t Nb10E = Nb10E + 1;\r\n\t Reste = Reste-10;\r\n\t}\r\n\t Nb5E = 0;\r\n\t if (Reste >= 5) {\r\n\t\t Nb5E= 1;\r\n\t\t Reste = Reste-5;\r\n\t }\r\n\t\r\n\r\n\tSystem.out.println(\"Rendu de la monnaie\"); \r\n\tSystem.out.println(\"10 E\"+ Nb10E);\r\n\tSystem.out.println(\"Billets de 5 E\"+Nb5E); \r\n\tSystem.out.println(\"Pièces de 1 E\"+Reste);\r\n\r\n\t\r\n\tsp.close();\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "int getMindestvertragslaufzeit();", "public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }", "public static void main(String [] args){//inicio del main\r\n\r\n Scanner sc= new Scanner(System.in); \r\n\r\nSystem.out.println(\"ingrese los segundos \");//mesaje\r\nint num=sc.nextInt();//total de segundos\r\nint hor=num/3600;//total de horas en los segundos\r\nint min=(num-(3600*hor))/60;//total de min en las horas restantes\r\nint seg=num-((hor*3600)+(min*60));//total de segundo sen los miniutos restantes\r\nSystem.out.println(\"Horas: \" + hor + \" Minutos: \" + min + \" Segundos: \" + seg);//salida del tiempo\r\n\r\n}", "public void codeJ(int number) {\n\tString d;\n\t\n\t//Scanner scan = new Scanner(System.in);\n\tdo {\n\tdo{\n\t\t\n\t\tif (App.SCANNER.hasNextInt()) {\n\t\t\n\t\t}else {\n\t\t\tSystem.out.println(\" Entrez Uniquement un code a \" + number + \"chiffres\");\n\t\t\tApp.SCANNER.next();\n\t\t}\n\t\t\n\t\n\t}while(!App.SCANNER.hasNextInt()) ;\n\tthis.codeHumain=App.SCANNER.nextInt();\n\td = Integer.toString(codeHumain);\n\t\n\tif(d.length() != number) {\n\t\tSystem.out.println(\" Entrez Uniquement un code a \" + number + \"chiffres svp\" );\n\t}else if(d.length() == number) {\n\t}\n\t\n\t\n\t\n\t}while(d.length() != number) ;\n\t\n\t//scan.close();\n\t}", "public void set(String s) {\n y=(int)Integer.parseInt(s.substring(0,4));\n m=(int)Integer.parseInt(s.substring(5,7))-1;\n d=(int)Integer.parseInt(s.substring(7,9));\n }", "public char toChar() {\r\n//\t\t//Ant\r\n//\t\tif(hasAnt()){\r\n//\t\t\tif(this.ant.getColour() == 0){\r\n//\t\t\t\treturn '=';\r\n//\t\t\t}\r\n//\t\t\tif(this.ant.getColour() == 1){\r\n//\t\t\t\treturn '|';\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\t\t//Rock\r\n\t\tif(this.rocky){\r\n\t\t\treturn '#';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Food\r\n\t\tif(this.food > 0){\r\n\t\t\t//Prints the food value,\r\n\t\t\t//if it is > 9, prints 9 instead\r\n\t\t\tif(this.anthill == 0){ //0 to 9\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn 48 + 9;\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (this.food + 48);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Otherwise, food must be in an anthill\r\n\t\t\t//so give unique char value that acknowledges this\r\n\t\t\t//Greek isn't recognised by Notepad or the console (prints '?' instead)\r\n\t\t\t//Minimum food value is 1, so -1 from ascii codes\r\n\t\t\tif(this.anthill == 1){ //Upper case, 65 for Latin, 913 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (64 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (64 + this.food);\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){ //Lower case, 97 for Latin, 945 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (96 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (96 + this.food);\r\n\t\t\t}\r\n\t\t\t//Else error, cannot be less than 0 or more than 2 anthills\r\n\t\t\tLogger.log(new WarningEvent(\"Cell anthill value not 0, 1 or 2\"));\r\n\t\t\treturn 0;\t//Null char value\r\n\t\t}\r\n\t\t\r\n\t\t//Anthill\r\n\t\tif(this.anthill > 0){\r\n\t\t\tif(this.anthill == 1){\r\n\t\t\t\treturn '+';\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){\r\n\t\t\t\treturn '-';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\t//Markers\r\n//\t\tfor(int i = 0; i < this.markers.length; i++){\r\n//\t\t\tfor(boolean marker : this.markers[i]){\r\n//\t\t\t\tif(marker){\r\n//\t\t\t\t\tif(i == 0){\r\n//\t\t\t\t\t\treturn '[';\r\n//\t\t\t\t\t}else if(i == 1){\r\n//\t\t\t\t\t\treturn ']';\r\n//\t\t\t\t\t}else{\r\n//\t\t\t\t\t\treturn '?';\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t}\t\t\r\n//\t\t}\r\n\t\t\r\n\t\treturn '.';\r\n\t}", "public static String skrivTegn(char t, int ant) {\n\t\tString sekvens = \"\";\n\t\tfor (int i=1; i<=ant; i++) {\n\t\t\tsekvens += t;\n\t\t}\n\t\treturn sekvens;\n\t}", "public void setKanm(String kanm) {\r\n this.kanm = kanm;\r\n }", "public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }", "@Override\n\tpublic void nhap() {\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\" nhap ten:\");\n\t\tString ten = reader.nextLine();\n\t\tSystem.out.println(\" nhap tuoi:\");\n\t\ttuoi = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap can nang:\");\n\t\tcanNang = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\"nhap chieu chieuCao\");\n\t\tchieuCao = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap chieu chieuDai:\");\n\t\tchieuDai = Double.parseDouble(reader.nextLine());\n\t}", "public int getAtk()\r\n {\r\n return attack;\r\n }", "private static int num_konsonan(String word) {\n int i;\n int jumlah_konsonan = 0;\n\n for (i = 0; i < word.length(); i++) {\n if (word.charAt(i) != 'a' &&\n word.charAt(i) != 'i' &&\n word.charAt(i) != 'u' &&\n word.charAt(i) != 'e' &&\n word.charAt(i) != 'o') {\n jumlah_konsonan++;\n }\n }\n return jumlah_konsonan;\n }", "public int getMinimumCharacters() {\n checkWidget();\n return minChars;\n }", "public void setGeslacht(char geslacht)\n {\n if (geslacht == 'm' || geslacht == 'v'){\n\n if (geslacht == 'm'){\n this.geslacht = \"man\";\n }\n\n if (geslacht == 'v'){\n this.geslacht = \"vrouw\"; \n }\n }\n else {\n System.out.println (\"geslacht moet m of v zijn\"); \n }\n }", "public char checkmate()\n\t{\n\t\tif(p1.king.liv_status==0)\n\t\t{\n\t\t\tcheckm=1;\n\t\t\treturn 'b';\n\t\t}\n\t\telse if(p2.king.liv_status==0)\n\t\t{\n\t\t\tcheckm=1;\n\t\t\treturn 'w';\n\t\t}\n\t\telse\n\t\t\treturn '0';\n\t}", "public final int getSarakeMuuttujatAihe() {\r\n return sarakeMuuttujatAihe;\r\n }", "public void setMA_CHUYENNGANH( String MA_CHUYENNGANH )\n {\n this.MA_CHUYENNGANH = MA_CHUYENNGANH;\n }", "char startChar();", "public KI(String spielerwahl){\n\t\teigenerStein = spielerwahl;\n\t\t\n\t\tswitch (spielerwahl) {\n\t\tcase \"o\":\n\t\t\tgegnerStein = \"x\";\n\t\t\tbreak;\n\t\tcase\"x\":\n\t\t\tgegnerStein = \"o\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Ungueltige Spielerwahl.\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\thatAngefangen = gegnerStein;\n\t\t\n\t\tfor(int i=0; i<7; i++) { //initialisiert spielfeld\n\t\t\tfor(int j=0; j<6; j++){\t\t\t\t\n\t\t\t\tspielfeld[i][j] = \"_\";\n\t\t\t}\n\t\t\tmoeglicheZuege[i] = -1; //initialisiert die moeglichen zuege\n\t\t}\n\t\t\n\t}", "public Monom(String s){\r\n\t\ts = s.toLowerCase();\r\n\t\tString temp = \"\";\r\n\t\tint index=0;\r\n\t\tdouble a=0;\r\n\t\tint b=0;\r\n\r\n\t\tif((index = s.indexOf('x'))!=-1)\r\n\t\t{\r\n\t\t\tif(index+2<s.length() && index!=0)\r\n\t\t\t{\r\n\t\t\t\tif(s.charAt(index+1)=='^')\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s.charAt(0) == '-' && index==1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ta = -1;\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\ta = Double.parseDouble(s.substring(0,index));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tb = Integer.parseInt(s.substring(index+2,s.length()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(index+1==s.length())\r\n\t\t\t{\r\n\t\t\t\tb=1;\r\n\t\t\t\tif(s.length()==1)\r\n\t\t\t\t{\r\n\t\t\t\t\ta=1;\r\n\t\t\t\t}\r\n\t\t\t\telse if(s.charAt(0)=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(index==1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ta=-1;\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\ta = Double.parseDouble(s.substring(0,index));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttemp = s.substring(0, index);\r\n\t\t\t\t\t\ta = Double.parseDouble(temp);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(index==0)\r\n\t\t\t{\r\n\t\t\t\ta=1;\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tb=Integer.parseInt(s.substring(index+2,s.length()));\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\ta = Double.parseDouble(s);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tthrow new RuntimeException(\"Syntax is not allow for Init!!\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.set_coefficient(a);\r\n\t\tthis.set_power(b);\r\n\r\n\t}", "public String ordainketaKudeatu(String ordainketa) {\r\n\t\tString dirua;\r\n\t\tdouble dirua1;\r\n\t\tdouble ordainketa1;\r\n\t\tdirua = deuda();\r\n\t\tordainketa = ordaindu();\r\n\t\tdirua1 = Double.parseDouble(dirua);\r\n\t\tordainketa1 = Double.parseDouble(ordainketa);\r\n\t\tkenketa = kenketa_dirua(dirua1, ordainketa1);\r\n\r\n\t\tSystem.out.println(kenketa);\r\n\t\tif (kenketa == 0.0) {\r\n\t\t\tbtnAurrera.setEnabled(true);\r\n\t\t\ttextField.setText(\"0.00\");\r\n\r\n\t\t}\r\n\t\tif (kenketa < 0) {\r\n\t\t\ttextField_2.setText(\"Itzulerak: \" + Math.abs(kenketa));\r\n\t\t\tbtnAurrera.setEnabled(true);\r\n\t\t}\r\n\t\tif (kenketa > 0) {\r\n\t\t\tkenketa = Math.abs(kenketa);\r\n\t\t\ttextField.setText(String.valueOf(kenketa));\r\n\t\t}\r\n\t\treturn ordainketa;\r\n\t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\t\tSystem.out.print(\"Masukkan nilai k : \");\n int k = scan.nextInt();\n System.out.print(\"Masukkan nilai l : \"); //jml\n int l = scan.nextInt();\n System.out.print(\"Masukkan nilai m : \"); //nxn\n int m = scan.nextInt();\n \n Soal07 data = new Soal07();\n data.buatSegitiga(k,l,m);\n data.cetak();\n\n\t}", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public int transferUang(int uang,int kb, int na){\n \n if(uang >= 250000 && kb==150){\n point+=10;\n saldo-=uang;\n }\n \n else\n saldo-=uang;\n \n return uang;\n }", "public String getKanm() {\r\n return kanm;\r\n }", "static int checkMateWithHathi(char[][] board, int P1r, int P1c) {\n\t\tint ch = P1c, checkmate = 0;\n\t\tfor (int r = P1r + 1; r < 8; r++) {\n\t\t\tif (board[r][ch] == 'k') {\n\t\t\t\tcheckmate++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn checkmate;\n\t}", "public void sethourNeed(Integer h){hourNeed=h;}", "public int obtenerMinuto() { return minuto; }", "void compareMantisseminDec(String mantisse){\n\n \t\tString min = \"14012985\";\n \t\tint longueur = minimum(mantisse.length(), min.length());\n\n \t\tfor (int i = 0; i< longueur; i++) {\n \t\t\tint mininum = min.charAt(i);\n \t\t\tint mantissei = mantisse.charAt(i);\n \t\t\tif (mantissei < mininum) {\n \t\t throw new InvalidFloatSmall(this, getInputStream());\n \t\t\t}\n \t\t}\n \t\t// mantisse plus longue donc >= min donc pas d'erreur de debordement\n\n \t}", "public static void main(String args[]) {\n Scanner s=new Scanner(System.in);\n char c=s.next().charAt(0);\n int k=s.nextInt();\n if(c=='c')\n {\n //char m='z';\n System.out.print(\"z \");\n return;\n }\n else if (c>='a' && c<='z')\n {\n int o=c+'a';\n o=(o-k)%26;\n c=(char)(o+'a');\n }\n else if(c>='A' && c<='Z')\n {\n int o=c+'A';\n o=(o-k)%26;\n c=(char)(o+'A');\n }\n System.out.print(c);\n }", "public static void main (String[]args){\n \r\n char AMayuscula = 'A', AMinuscula = 'a';\r\n // cast explicito de tipo - (AMayuscula + 1) el resultado es int\r\n char BMayuscula = (char) (AMayuscula + 1);\r\n \r\n System.out.println('\\n');\r\n System.out.println(BMayuscula);\r\n\t}", "public static String seuraavaArvaus(HashMap<String, Integer> muisti, String viimeisimmat, String kaikki) {\n if (kaikki.length() < 3) {\n return \"k\";\n }\n\n String viimKivi = viimeisimmat + \"k\";\n String viimPaperi = viimeisimmat + \"p\";\n String viimSakset = viimeisimmat + \"s\";\n \n int viimKiviLkm = 0;\n int viimPaperiLkm = 0;\n int viimSaksetLkm = 0;\n String arvaus = \"k\";\n int viimValueMax = 0;\n /*\n Sopivan valinnan etsiminen tehdään tarkastelemalla käyttäjän kahta viimeistä\n syötettä ja vertailemalla niitä koko historiaan. Mikäli historian mukaan\n kahta viimeistä syötettä seuraa useimmin kivi, tekoälyn tulee pelata paperi.\n Mikäli kahta viimeistä syötettä seuraa useimmin paperi, tekoälyn tulee \n pelata sakset. Mikäli taas kahta viimeistä syötettä seuraa useimmin sakset, \n tekoälyn tulee pelata kivi. Muissa tapauksissa pelataan kivi.\n */\n if (muisti.containsKey(viimKivi)) {\n viimKiviLkm = muisti.get(viimKivi);\n }\n if (muisti.containsKey(viimPaperi)) {\n viimPaperiLkm = muisti.get(viimPaperi);\n }\n if (muisti.containsKey(viimSakset)) {\n viimSaksetLkm = muisti.get(viimSakset);\n }\n\n if (viimKiviLkm > viimPaperiLkm && viimKiviLkm > viimSaksetLkm) {\n return \"p\";\n }\n if (viimPaperiLkm > viimKiviLkm && viimPaperiLkm > viimSaksetLkm) {\n return \"s\";\n }\n if (viimSaksetLkm > viimKiviLkm && viimSaksetLkm > viimPaperiLkm) {\n return \"k\";\n }\n\n return arvaus;\n }", "private void setTime()\n\t{\n\t\t//local variable \n\t\tString rad = JOptionPane.showInputDialog(\"Enter the time spent bicycling: \"); \n\t\t\n\t\t//convert to int\n\t\ttry {\n\t\t\tbikeTime = Integer.parseInt(rad);\n\t\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t}", "@Override\n\tpublic void nhap() {\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\" so cmnd:\");\n\t\tthis.cmnd = reader.nextLine();\n\t\tSystem.out.println(\" nhap ho ten khach hang:\");\n\t\tthis.hoTenKhachHang = reader.nextLine();\n\t\tSystem.out.println(\" so tien gui:\");\n\t\tthis.soTienGui = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" nhap ngay lap:\");\n\t\tthis.ngayLap = reader.nextLine();\n\t\tSystem.out.println(\" lai suat:\");\n\t\tthis.laiSuat = Double.parseDouble(reader.nextLine());\n\t\tSystem.out.println(\" so thang gui:\");\n\t\tthis.soThangGui = Integer.parseInt(reader.nextLine());\n\t\tSystem.out.println(\" nhap ky han:\");\n\t\tthis.kyHan = Integer.parseInt(reader.nextLine());\n\t}", "public String cekPengulangan(String kata) throws IOException{\n String hasil=\"\";\n if(cekUlangSemu(kata)){\n return kata+\" kata ulang semu \";\n }\n if(kata.contains(\"-\")){\n String[] pecah = kata.split(\"-\");\n String depan = pecah[0];\n String belakang = pecah[1];\n ArrayList<String> depanList = new ArrayList<String>();\n ArrayList<String> belakangList = new ArrayList<String>();\n if(!depan.equals(\"\")){\n depanList.addAll(morpParser.cekBerimbuhan(depan, 0));\n }\n if(!belakang.equals(\"\")){\n belakangList.addAll(morpParser.cekBerimbuhan(belakang, 0));\n }\n for(int i = 0; i < depanList.size(); i++){\n for(int j = 0; j < belakangList.size(); j++){\n if(depanList.get(i).equals(belakangList.get(j))){\n return depan+\" kata ulang penuh \";\n }\n }\n }\n if(depan.equals(belakang)){\n return depan+\" kata ulang penuh \";\n }\n char[] isiCharDepan = depan.toCharArray();\n char[] isiCharBelakang = belakang.toCharArray();\n boolean[] sama = new boolean[isiCharDepan.length];\n int jumlahSama=0;\n int jumlahBeda=0;\n for(int i =0;i<sama.length;i++){\n if(isiCharDepan[i]==isiCharBelakang[i]){\n sama[i]=true;\n jumlahSama++;\n }\n else{\n sama[i]=false;\n jumlahBeda++;\n }\n }\n \n if(jumlahBeda<jumlahSama && isiCharDepan.length==isiCharBelakang.length){\n return depan+\" kata ulang berubah bunyi \";\n }\n \n \n }\n else{\n if(kata.charAt(0)==kata.charAt(2)&&kata.charAt(1)=='e'){\n if((kata.charAt(0)=='j'||kata.charAt(0)=='t')&&!kata.endsWith(\"an\")){\n return kata.substring(2)+\" kata ulang sebagian \";\n }\n else if(kata.endsWith(\"an\")){\n return kata.substring(2,kata.length()-2)+\" kata ulang sebagian \";\n }\n \n }\n }\n return hasil;\n }", "public static void main(String[] args) {\n\t\t\n\t\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"Hangi islemi yapmak istersiniz 1) hesabi goruntuleme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 2)Para cekme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 3) Para yatirma\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 4)Cikis\");\n\t\t\t\t\n\t\t\t\tint islem = scan.nextInt();\n\t\t\t\tdouble toplamTutar = 5000;\n\t\t\t\tswitch(islem) {\n\t\t\t\tcase 1:\n\t\t\t\t\tSystem.out.println(\"Hesabinizda \" +toplamTutar + \"tl bulunmaktadir\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"Cekmek istediginiz miktari giriniz \");\n\t\t\t\t\tint miktar = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para cekiminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar-miktar));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tSystem.out.println(\"Yatirmak istediginiz miktari giriniz\");\n\t\t\t\t\tint yatirilanPara = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para yatirma isleminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar + yatirilanPara));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Bizleri tercih ettiginiz icin tesekkur ederiz Iyi gunler dileriz\");\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Yanlis giris yaptiniz lutfen tekrar deneyin\");\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tscan.close();\n\t\t\n\t\t\t\t\n\t}", "public int getCardVal(){\n\t\tint aces = 0;\n\t\tif(cardString.charAt(0) == 'J' || cardString.charAt(0) == 'Q' || cardString.charAt(0) == 'K' || cardString.charAt(0) == 'T'){\n\t\t\tcardValue = 10;\n\t\t}\n\t\telse if(cardString.charAt(0) == 'A'){\n\t\t\tcardValue = 11;\n\t\t}\n\t\telse{\n\t\t\tcardValue = Character.getNumericValue(cardString.charAt(0));\n\t\t}\n\t\treturn cardValue;\n\t}", "public static void main(String[] args) {\r\n\t\tScanner input = new Scanner(System.in);\r\n\r\n\t\tSystem.out.println(\"Enter a letter: \");\r\n\t\tString s = input.nextLine();\r\n\t\tchar ch = s.charAt(0);\r\n\t\tch = Character.toUpperCase(ch);\r\n\r\n\t\tif (s.length() != 1) {\r\n\t\t\tSystem.out.println(\"Invalid input\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\tint number = 0;\r\n\t\tif (Character.isLetter(ch)) {\r\n\t\t\tif ('W' <= ch)\r\n\t\t\t\tnumber = 9;\r\n\t\t\telse if ('T' <= ch)\r\n\t\t\t\tnumber = 8;\r\n\t\t\telse if ('P' <= ch)\r\n\t\t\t\tnumber = 7;\r\n\t\t\telse if ('M' <= ch)\r\n\t\t\t\tnumber = 6;\r\n\t\t\telse if ('J' <= ch)\r\n\t\t\t\tnumber = 5;\r\n\t\t\telse if ('G' <= ch)\r\n\t\t\t\tnumber = 4;\r\n\t\t\telse if ('D' <= ch)\r\n\t\t\t\tnumber = 3;\r\n\t\t\telse if ('A' <= ch)\r\n\t\t\t\tnumber = 2;\r\n\t\t\tSystem.out.println(\"The corresponding number is \" + number);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(ch + \" invalid input!\");\r\n\t\t}\r\n\t}", "public void setAcideAmine(String codon) {\n switch (codon) {\n \n case \"GCU\" :\n case \"GCC\" :\n case \"GCA\" :\n case \"GCG\" : \n this.acideAmine = \"Alanine\";\n break;\n case \"CGU\" :\n case \"CGC\" :\n case \"CGA\" :\n case \"CGG\" :\n case \"AGA\" :\n case \"AGG\" :\n this.acideAmine = \"Arginine\";\n break;\n case \"AAU\" :\n case \"AAC\" :\n this.acideAmine = \"Asparagine\";\n break;\n case \"GAU\" :\n case \"GAC\" :\n this.acideAmine = \"Aspartate\";\n break;\n case \"UGU\" :\n case \"UGC\" :\n this.acideAmine = \"Cysteine\";\n break;\n case \"GAA\" :\n case \"GAG\" :\n this.acideAmine = \"Glutamate\";\n break;\n case \"CAA\" :\n case \"CAG\" :\n this.acideAmine = \"Glutamine\";\n break;\n case \"GGU\" :\n case \"GGC\" :\n case \"GGA\" :\n case \"GGG\" :\n this.acideAmine = \"Glycine\";\n break;\n case \"CAU\" :\n case \"CAC\" :\n this.acideAmine = \"Histidine\";\n break;\n case \"AUU\" :\n case \"AUC\" :\n case \"AUA\" :\n this.acideAmine = \"Isoleucine\";\n break;\n case \"UUA\" :\n case \"UUG\" :\n case \"CUU\" :\n case \"CUC\" :\n case \"CUA\" :\n case \"CUG\" :\n this.acideAmine = \"Leucine\";\n break;\n case \"AAA\" :\n case \"AAG\" :\n this.acideAmine = \"Lysine\";\n break;\n case \"AUG\" :\n this.acideAmine = \"Methionine\";\n break;\n case \"UUU\" :\n case \"UUC\" :\n this.acideAmine = \"Phenylalanine\";\n break;\n case \"CCU\" :\n case \"CCC\" :\n case \"CCA\" :\n case \"CCG\" :\n this.acideAmine = \"Proline\";\n break;\n case \"UAG\" :\n this.acideAmine = \"Pyrrolysine\";\n break;\n case \"UGA\" :\n this.acideAmine = \"Selenocysteine\";\n break;\n case \"UCU\" :\n case \"UCC\" :\n case \"UCA\" :\n case \"UCG\" :\n case \"AGU\" :\n case \"AGC\" :\n this.acideAmine = \"Serine\";\n break;\n case \"ACU\" :\n case \"ACC\" :\n case \"ACA\" :\n case \"ACG\" :\n this.acideAmine = \"Threonine\";\n break;\n case \"UGG\" :\n this.acideAmine = \"Tryptophane\";\n break;\n case \"UAU\" :\n case \"UAC\" :\n this.acideAmine = \"Tyrosine\";\n break;\n case \"GUU\" :\n case \"GUC\" :\n case \"GUA\" :\n case \"GUG\" :\n this.acideAmine = \"Valine\";\n break;\n case \"UAA\" :\n this.acideAmine = \"Marqueur\";\n break;\n }\n }", "public static void main(String[] args) {\n int beratbadan;\n String nama;\n Scanner scan = new Scanner(System.in);\n\n // mengambil input\n System.out.print(\"Nama: \");\n nama = scan.nextLine();\n System.out.print(\"Berat Badan: \");\n beratbadan = scan.nextInt();\n\n // cek apakah dia ideal atau tidak\n if( beratbadan <= 50 ) {\n System.out.println(\"Selamat \" + nama + \", berat badan anda ideal!\");\n } else {\n System.out.println(\"Maaf \" + nama + \", berat badan anda overdose\");\n }\n\n }", "public void TicTac()\n {\n if(minutos<=59)\n {\n minutos=minutos+1;\n \n }\n else\n {\n minutos=00;\n horas+=1;\n \n }\n if(horas>23)\n {\n horas=00;\n \n }\n else\n {\n minutos+=1;\n }\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.nextLine();\n\t\tint hour = in.nextInt();\n\t\tString []num = s.split(\" \");\n\t\tint [] array = new int[num.length];\n\t\tfor(int i=0;i<num.length;i++)\n\t\t{\n\t\t\tarray[i]=Integer.parseInt(num[i]);\n\t\t}\n\t\t\n\t\tSystem.out.print(getMinSpeed(array,hour));\n\t}", "public static int cariNilai(String kata, int x, int y) {\r\n int hasil = 0;\r\n\r\n for (int i = 0; i < kata.length(); i++) {\r\n int nilaiSubstr = ((int) kata.charAt(i) - 96) % y;\r\n int nilaiPerKata = pangkatxmody(i, x, y, nilaiSubstr);\r\n hasil += nilaiPerKata;\r\n\r\n }\r\n\r\n hasil = hasil % y;\r\n return hasil;\r\n }", "public static void main(String[] args) {\n\t\tint n,s=0;\n\t\tScanner sc= new Scanner(System.in);\n\t\tSystem.out.println(\"enter seat no:\");\n\t\tn=sc.nextInt();\n\t\ts=n%12;\n\t\tswitch(s)\n\t\t{\n\t\tcase 0:\n\t\t\tSystem.out.println(\"seat:\"+(n-11)+\" WS\");\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tSystem.out.println(\"seat:\"+(n+11)+\" WS\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"seat:\"+(n+9)+\" MS\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"seat:\"+(n+7)+\" AS\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"seat:\"+(n+5)+\" AS\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"seat:\"+(n+3)+\" MS\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"seat:\"+(n+1)+\" WS\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"seat:\"+(n-1)+\" WS\");\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tSystem.out.println(\"seat:\"+(n-3)+\" MS\");\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tSystem.out.println(\"seat:\"+(n-5)+\" AS\");\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tSystem.out.println(\"seat:\"+(n-7)+\" AS\");\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tSystem.out.println(\"seat:\"+(n-9)+\" MS\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\n\t}", "void tampilKarakterA();", "float getMonatl_kosten();", "private static boolean isKata(String s) {\n\t\tchar c = s.charAt(0);\n\t\tif (c < '0' || c > '9') return true;\n\t\t\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn false;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn true;\n\t\t}\n\t}", "public int mo36g() {\n return 8;\n }", "public void anazitisiSintagisVaseiAstheni() {\n\t\tint amkaCode = 0;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tamkaCode = sir.readPositiveInt(\"EISAGETAI TO AMKA TOU ASTHENH: \"); // Zitaw apo ton xrhsth na mou dwsei ton amka tou asthenh pou thelei\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t\tif(amkaCode == prescription[i].getPatientAmka()) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou proorizetai gia ton sygkekrimeno asthenh\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t\tprescription[i].print(); // Emfanizw thn/tis sintagh/sintages oi opoies proorizontai gia ton sigkekrimeno asthenh\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\ttmp_2++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON ASTHENH ME AMKA: \" + amkaCode);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public int getTON() {\r\n return ton;\r\n }", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "void setCharacter(int c) {\n setStat(c, character);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tF = sc.nextInt(); // 최고높이\n\t\tint S = sc.nextInt(); // 현재\n\t\tint G = sc.nextInt(); // 목적지\n\t\tU = sc.nextInt(); // 올라가는 \n\t\tD = sc.nextInt(); // 내려가는\n\t\t\n\t\tupdown(G, S);\n\t\t// 찾지 못했을 경우.\n\t\tif(min==1000001){\n\t\t\tSystem.out.println(\"use the stairs\");\n\t\t}\n\t\telse{\n\t\tSystem.out.println(min);\n\t\t}\n\t}", "public void setTrangthaiChiTiet(int trangthaiChiTiet);", "static String stringCutter1(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n\n // pemotongan string untuk pemotongan kelompok pertama\n String sentence1 = s.substring(0, value);\n\n // perulangan untuk menggeser nilai setiap karakter\n String wordNow = \"\";\n for (int i = 0; i < sentence1.length(); i++) {\n char alphabet = sentence1.toUpperCase().charAt(i);\n // pengubahan setiap karakter menjadi int\n // untuk menggeser 3 setiap nilai nya\n int asciiDecimal = (int) alphabet;\n // pengecekan kondisi apabila karakter melewati kode ascii nya\n if (asciiDecimal > 124) {\n int alphabetTransfer = 0 + (127 - asciiDecimal);\n wordNow += (char) alphabetTransfer;\n\n } else {\n int alphabetTrasfer = asciiDecimal + 3;\n wordNow += (char) alphabetTrasfer;\n }\n }\n return wordNow;\n }", "public void setKelas(String sekolah){\n\t\ttempat = sekolah;\n\t}", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "public double calculatedConsuption(){\nint tressToSow=0;\n\nif (getKiloWatts() >=1 && getKiloWatts() <= 1000){\n\ttressToSow = 8;\n}\nelse if (getKiloWatts() >=1001 && getKiloWatts ()<=3000){\n\ttressToSow = 35;\n}\nelse if (getKiloWatts() > 3000){\n\ttressToSow=500;\n}\nreturn tressToSow;\n}", "public static void main(String[] args) {\n int age = 18; // Assign value of 18 to the age variable\n double pi = 3.14;\n\n boolean beautiful = true;\n boolean hot = false;\n\n char firstAlphabetLetter = 65;\n char letterC = 'C';\n\n System.out.println(age);\n System.out.println(pi);\n\n System.out.println(20);\n\n System.out.println(beautiful);\n System.out.println(hot);\n\n System.out.println(firstAlphabetLetter);\n\n byte b = 100;\n short s = 100;\n long l = 100;\n\n float f = 10.0f;\n\n System.out.println(b);\n System.out.println(s);\n System.out.println(l);\n System.out.println(f);\n\n System.out.println(15.0f);\n\n char letterZ = 'Z';\n\n System.out.println((int) letterZ);\n\n String txt = \"How are you doing today?\";\n\n System.out.println(txt);\n }", "public int getAtkAmount(){\r\n return (int) (Math.random() * (maxAtk - minAtk) + minAtk);\r\n\r\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t\n\t\tSystem.out.println(Character.getNumericValue('s'));\n\t\t//10 a\n\t\t//35 z\n\t\t//28 s\n\t\twhile(true) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif(s.equals(\"halt\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchar prev = ' ';\n\t\t\t\tfor(int i = 0; i<s.length(); i++) {\n\t\t\t\t\tchar c = s.charAt(i);\n\t\t\t\t\tint numericValue = Character.getNumericValue(c);\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\n\t}", "private void jam() {\n ActionListener taskPerformer=new ActionListener(){ ////klik ALT+ENTER -> import ActionListener ->TOP\n \n public void actionPerformed(ActionEvent evt){ ////klik ALT+ENTER -> import actionPerformed ->TOP\n String nol_bulan=\"\";\n String nol_hari=\"\";\n String nol_jam=\"\";\n String nol_menit=\"\";\n String nol_detik=\"\";\n Calendar dt=Calendar.getInstance(); ////untuk mengambil informasi waktu\n \n int nilai_jam=dt.get(Calendar.HOUR_OF_DAY); ////3.Calendar.HOUR_OF_DAY digunakan untuk settingan jam\n int nilai_menit=dt.get(Calendar.MINUTE); ////4.Calendar.MINUTE digunakan untuk settingan menit\n int nilai_detik=dt.get(Calendar.SECOND); ////5.Calendar.SECOND digunakan untuk settingan detik\n \n \n if(nilai_jam<=9){\n nol_jam=\"0\";\n }\n if(nilai_menit<=9){\n nol_menit=\"0\";\n }\n if(nilai_detik<=9){\n nol_detik=\"0\";\n }\n \n String jam=nol_jam+Integer.toString(nilai_jam);\n String menit=nol_menit+Integer.toString(nilai_menit);\n String detik=nol_detik+Integer.toString(nilai_detik);\n jammm.setText(jam+\":\"+menit+\":\"+detik); ////6.Label dengan variabel \"jammm\" akan berubah sesuai settingan jam menit dan detik\n\n }\n };\n new javax.swing.Timer(1000,taskPerformer).start(); ////untuk start\n }" ]
[ "0.58929336", "0.5873349", "0.582574", "0.5741803", "0.564933", "0.56333005", "0.55913025", "0.55666274", "0.5555027", "0.5548274", "0.55252147", "0.54697037", "0.54674", "0.5463876", "0.54573715", "0.54492646", "0.5442437", "0.5441701", "0.542819", "0.5400898", "0.53942096", "0.5379697", "0.5379219", "0.5361296", "0.53486884", "0.53445876", "0.5333978", "0.53209513", "0.5312673", "0.53040624", "0.52791625", "0.52769816", "0.5270604", "0.5269903", "0.52654564", "0.52499187", "0.5241549", "0.52039987", "0.5193813", "0.5189685", "0.51794004", "0.5170825", "0.5169197", "0.5164469", "0.5162424", "0.5158028", "0.51525575", "0.51498497", "0.5149164", "0.5146932", "0.51467264", "0.51396376", "0.5134762", "0.51342416", "0.51285386", "0.51194817", "0.5114358", "0.51140285", "0.51029223", "0.5102822", "0.50922096", "0.5091797", "0.5086811", "0.508395", "0.50812584", "0.5077784", "0.50777525", "0.5075141", "0.5070711", "0.5065259", "0.5061513", "0.50584996", "0.50459176", "0.5042099", "0.50363135", "0.5030315", "0.50287575", "0.500906", "0.5006902", "0.5005765", "0.50031507", "0.50010157", "0.49975812", "0.49901855", "0.49892056", "0.49883997", "0.49816918", "0.49778533", "0.4973464", "0.4972819", "0.49720672", "0.49716496", "0.49715844", "0.49671343", "0.49631178", "0.49613038", "0.4960504", "0.49600944", "0.4958588", "0.4955126", "0.49548718" ]
0.0
-1
/ The activity that creates an instance of this dialog fragment must implement this interface in order to receive event callbacks. Each method passes the DialogFragment in case the host needs to query it.
public interface TrackPlayerDialogListener { void onPreviousClick(DialogFragment dialog); void onPlayPauseClick(DialogFragment dialog); void onNextClick(DialogFragment dialog); void onDialogViewCreated(View view); void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n\n public void openDialog(MotionEvent event);\n\n public void closeDialog();\n\n}", "public interface DialogFragmentClickListener {\n public void onClick(DialogFragment dialogFragment);\n}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the SelectPetDialogListener so we can send events to the host\n listener = (SelectPetDialogListener) context;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(\"Activity must implement AddPetDialogListener\");\n }\n }", "public interface DialogInterface {\n void setTitleContent();\n\n void setContainer();\n\n void OnClickListenEvent(View v);\n}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(getArguments().getString(\"title\"))\n .setMessage(getArguments().getString(\"message\"))\n .setCancelable(false)\n .setPositiveButton(R.string.OK, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n // call callback method\n // mListener.onInfoDialogOKClick(InfoDialog.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public void onAttach(@NonNull Context context) {\n super.onAttach(context);\n\n try {\n dListener = (dialogListener) context; // dialog interface is equal to activity instance\n } catch (ClassCastException e) {\n // in case dialogListener didnt implemented\n throw new ClassCastException(context.toString() + \"must Implement dialogListener interface to MainActivity First\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n dialogListener = (AddContractDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString() + \" must implement AddContractDialogListener\");\n }\n }", "public void onDialogPositiveClick(DialogFragment dialog);", "public interface StationFragmentListener{\n public void onDialogPositiveClick(DialogFragment dialog);\n public void onDialogNegativeClick(DialogFragment dialog);\n }", "public interface OnDialogDismissed {\r\n public void action(View view, Context context);\r\n}", "@Override\n\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the listener so we can send events to the host\n mListener = (TrackPlayerDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement TrackPlayerDialogListener\");\n }\n }", "public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (VoidReasonDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement VoidReasonDialogListener\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (DialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (NewProjectDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n }", "public interface DialogListener {\n\n /**\n * Called when a dialog completes.\n *\n * Executed by the thread that initiated the dialog.\n *\n * @param values\n * Key-value string pairs extracted from the response.\n */\n public void onComplete(Bundle values);\n\n \n /**\n * Called when a dialog is canceled by the user.\n *\n * Executed by the thread that initiated the dialog.\n *\n */\n public void onCancel();\n}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface ActivityNavigationListenerEmergencia {\n public void onDialogPositiveClick(DeleteDialogEmergencia dialog);\n}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }", "public interface VoidReasonDialogListener {\n void onDialogPositiveClick(VoidReasonDialogFragment dialog);\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n // get a reference to the hosting activity in listener, works bc host activity must implement interface\n listener = (OnFragmentInteractionListener) context;\n }", "public interface CustomDialogListener {\n void onCustomLayout(View rootView, Dialog dialog);\n\n void onOk(Callback callback);\n\n void onCancel(Callback callback);\n}", "public interface OnDialogListener {\n void onPositiveListener();\n void onNegativeListener();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }", "@Override\n public void onAttach(Context context){\n super.onAttach(context);\n Activity activity = (Activity) context;\n if (context instanceof Activity){\n activity = (Activity) context;\n }\n\n try{\n listener = (StationFragmentListener) activity;\n }\n catch(ClassCastException e){\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n\n\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\n // TODOS: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n fragment=this;\n View dialogView = inflater.inflate(R.layout.travel_search_dialog,null);\n builder.setView(dialogView);\n\n dialog = builder.create();\n //finding edittext box for user to enter travel search term\n searchTerm = (EditText) dialogView.findViewById(R.id.travel_search_term);\n\n //set up search button\n searchButton= (Button) dialogView.findViewById(R.id.search_button);\n searchButton.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n //ensure user has entered text into field\n if (searchTerm.getText().length() > 0) {\n String searchWord =searchTerm.getText().toString().replace(\" \", \"%20\");\n MainActivity.searchTerm = searchWord;\n new PhotoSearch(fragment).execute(MainActivity.searchTerm);\n\n } else\n Toast.makeText(getContext(), \"Enter a travel search term.\", Toast.LENGTH_SHORT).show();\n }\n });\n\n return dialog;\n\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }" ]
[ "0.7598494", "0.7218609", "0.7076603", "0.6957207", "0.68691754", "0.68023705", "0.6757945", "0.6672891", "0.66720295", "0.66576976", "0.6634115", "0.6612126", "0.6593207", "0.6547196", "0.65466565", "0.65285313", "0.6525513", "0.6488911", "0.64776075", "0.64560485", "0.64557236", "0.64508736", "0.64455986", "0.64396507", "0.64198583", "0.64045936", "0.63990796", "0.6390982", "0.6369941", "0.6369941", "0.6369941", "0.6369941", "0.6369941", "0.6369941", "0.6369941", "0.6369365", "0.6368998", "0.6366785", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965", "0.63636965" ]
0.0
-1
Override the Fragment.onAttach() method to instantiate the listener
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Verify that the host activity implements the callback interface try { // Instantiate the listener so we can send events to the host mListener = (TrackPlayerDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement TrackPlayerDialogListener"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic void onAttach(Activity activity) {\n\t\t\tsuper.onAttach(activity);\r\n\t\t\tmCallback=(Fragment_Listener)activity;\r\n\t\t\t\r\n\t\t}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n mMesasListListener = (MesasListListener) getActivity();\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof FragmentTwo.fragmentTwoInterface) {\n listener = (FragmentTwo.fragmentTwoInterface) context;\n }\n else {\n throw new RuntimeException();\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n // get a reference to the hosting activity in listener, works bc host activity must implement interface\n listener = (OnFragmentInteractionListener) context;\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof OnFragmentInteractionListener) {\n mListener = (OnFragmentInteractionListener) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if(context instanceof onSelectGeboortejaarFragmentListener){\n mListener = (onSelectGeboortejaarFragmentListener) context;\n }else{\n throw new RuntimeException(context.toString()\n + \" must implement onSelectGeboortejaarFragment\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof ProgrammingLangC_BookmarkFragmentProgram.OnFragmentInteractionListener) {\n mListener = (ProgrammingLangC_BookmarkFragmentProgram.OnFragmentInteractionListener) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }", "@Override\r\n public void onAttach(Context context) {\r\n super.onAttach(context);\r\n if (context instanceof OnFragmentInteractionListener) {\r\n mListener = (OnFragmentInteractionListener) context;\r\n } else {\r\n throw new RuntimeException(context.toString()\r\n + \" must implement OnFragmentInteractionListener\");\r\n }\r\n }", "public void onAttach() {\n super.onAttach(getActivity());\n Log.i(sFragmentName, \"onAttach()\");\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n listener = (LoginFragment.LoginFragmentListener) context;\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof ParadasFragment.FragmentFromFragment) {\n fragmentFromFragmentListener = (ParadasFragment.FragmentFromFragment) context;\n } else {\n throw new ClassCastException(context.toString() + \" must implements MainScreenFragment.OnNewSurveyClicked\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n try{\n// mCallback = (FragmentIterationListener) activity;\n// }catch(CastClassException ex){\n }catch(Exception ex){\n Log.e(MovimientoListFragment.TAG, \"El Activity debe implementar la interfaz FragmentIterationListener\");\n }\n }", "@Override\n public void onAttach(Activity activity){\n super.onAttach(activity);\n\n //refer the listener variable declared above to the host activity when the fragment is attached\n listener = (AddEditCardListener) activity;\n }", "private void myOnAttach(Context context) {\n\n if (context instanceof LoginFragmentInteractionListener) {\n mListener = (LoginFragmentInteractionListener) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement LoginFragmentInteractionListener\");\n }\n }", "protected void onAttachToContext(Context context) {\n if (context instanceof Activity) {\n this.listener = (FragmentActivity) context;\n }\n }", "@Override\n public void onAttach(Activity activity) {\n \tsuper.onAttach(activity);\n \tthis.act=activity;\n \t\n try{\n mCallback = (FragmentIterationListener) activity;\n }catch(ClassCastException ex){\n Log.e(\"ExampleFragment\", \"El Activity debe implementar la interfaz FragmentIterationListener\");\n }\n }", "@Override\n public void onFragmentAttached() {\n }", "@Override\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\n\t\tlistenr = (CheckStateListener) getActivity();\n\t}", "@Override\n public void onAttach(Context context){\n super.onAttach(context);\n Activity activity = (Activity) context;\n if (context instanceof Activity){\n activity = (Activity) context;\n }\n\n try{\n listener = (StationFragmentListener) activity;\n }\n catch(ClassCastException e){\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n\n\n }", "@Override\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\n\t\tLog.d(\"Fragment02\",\"onAttach\");\n\t}", "@Override\r\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\r\n\t\tfbcl=(fragmentBtnClickListener) activity;\r\n\t}", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n try {\n mListener = (IFragmentListener) activity;\n } catch (ClassCastException e) {\n throw new ClassCastException(activity.toString() + \" must implement IFragmentListener\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the SelectPetDialogListener so we can send events to the host\n listener = (SelectPetDialogListener) context;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(\"Activity must implement AddPetDialogListener\");\n }\n }", "public abstract void onAttach();", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n // Activities containing this fragment must implement its callbacks.\n if (!(activity instanceof Callbacks)) {\n throw new IllegalStateException(\n \"Activity must implement fragment's callbacks.\");\n }\n mCallbacks = (Callbacks) activity;\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n\n // This makes sure that the host activity has implemented the callback interface\n // If not, it throws an exception\n try {\n mCallback = (OnStepClickListener) context;\n } catch (ClassCastException e) {\n throw new ClassCastException(context.toString()\n + \" must implement OnStepClickListener\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n\n Log.d(TAG, \"onAttach\");\n\n if(context instanceof SurveyVoteListener){\n mVoteListener = (SurveyVoteListener) context;\n Log.d(TAG, \"On attach survey vote listener set \" + mVoteListener);\n } else {\n throw new RuntimeException(context.toString() + \" must implement SurveyVoteListener\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n fragmentCallBack = (MainActivity) activity;// ActivityʵfragmentCallBack\n }", "@Override\n public void onAttachFragment(Fragment fragment){\n // check if the current fragment is the recyclerview fragment and replace it with a word fragment\n if (fragment instanceof WordListFragment) {\n WordListFragment wordListFragment = (WordListFragment) fragment;\n wordListFragment.setOnViewClickListener(this);\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }", "@Override\r\n public void onAttach(Context context) {\r\n super.onAttach(context);\r\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n\n }", "@SuppressWarnings(\"deprecation\")\n @Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n callEvents = (MesiboVideoCallFragment.OnCallEvents) activity;\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n // Ensure attached activity has implemented the callback interface.\n try {\n // Acquire the implemented callback\n mLoginFinishBtnClickListener = (onLoginFinishBtnClickListener) context;\n } catch (ClassCastException e) {\n // If not, it throws an exception\n throw new ClassCastException(context.toString() + \" must implement onLoginFinishBtnClickListener\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof ComposeTweetListener) {\n mTweetListener = (ComposeTweetListener) context;\n } else {\n throw new ClassCastException(context.toString()\n + \" must implement ComposeTweetFragment.ComposeTweetListener\");\n }\n }", "public interface OnViewFragmentListener {\r\n public void onViewCreated();\r\n}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n\n // This makes sure that the host activity has implemented the callback interface\n // If not, it throws an exception\n try {\n mOnClickHandler = (RecipeDetailFragmentStepAdapter.OnRecipeStepClickHandler) context;\n mRecipeDetailHandler = (RecipeDetailHandler) context;\n } catch (ClassCastException e) {\n throw new ClassCastException(context.toString()\n + \" must implement RecipeDetailFragmentStepAdapter.OnRecipeStepClickHandler AND RecipeDetailHandler\");\n }\n }", "public interface OnAttachListener {\n void onAttached();\n\n void onDetached();\n}", "@Override\r\n\tpublic void onAttach(Activity activity) {\r\n\t\tLog.d(TAG, \"onAttach\");\r\n\t\tsuper.onAttach(activity);\r\n\t\tmActivity = activity;\r\n\t\ttry{\r\n\t\t\tCallBackLocalUserListFragmentListener listener = (CallBackLocalUserListFragmentListener)activity;\r\n\t\t\tlistener.getLocalUserListFragment(this);\r\n\t\t}catch (ClassCastException e) {\r\n\t\t\tLog.d(TAG, activity.toString() + \"must implement CallBackLocalUserListFragmentListener\");\r\n\t\t}\r\n\t}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof OnSubmittedListFragmentInteractionListener) {\n mListener = (OnSubmittedListFragmentInteractionListener) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnRejectedListFragmentInteractionListener\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n listener = (DeleteFishListener) context;\n }", "@Override\n public void onAttach(Context context){\n super.onAttach(context);\n if(context instanceof OnFragmentInteractionListener) {\n mListener = (OnFragmentInteractionListener) context;\n } else {\n throw new ClassCastException(context.toString()\n + getResources().getString(R.string.exception_message));\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n // This makes sure that the container activity has implemented\n // the callback interface. If not, it throws an exception\n try {\n mCallback = (OnFriendSelectedListener) activity;\n } catch (ClassCastException e) {\n throw new ClassCastException(activity.toString()\n + \" must implement OnHeadlineSelectedListener\");\n }\n }", "@Override\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\n\t if (activity instanceof OnActionSelectedListener) {\n\t \tlistener = (OnActionSelectedListener) activity;\n\t } else {\n\t throw new ClassCastException(activity.toString()\n\t + \" must implement MyListFragment.OnItemSelectedListener\");\n\t }\n\t}", "@Override\r\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\r\n\t\ttry {\r\n\t\t\tmListener = (AddItemDialogListener) activity;\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n dialogListener = (AddContractDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString() + \" must implement AddContractDialogListener\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (Listener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n }", "@Override\n public void attachFragment(Fragment fragment) {\n\n this.playerFragment = fragment; // Attaches the playerFragment to this class.\n\n // If the service has disconnected, the SSMusicService is restarted.\n if (!serviceBound) {\n setUpAudioService(); // Sets up the SSMusicService.\n }\n\n // Attaches the SSPlayerFragment.\n else {\n musicService.attachPlayerFragment(fragment);\n }\n }", "@Override\n public void onAttach(Activity activity)\n {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try\n {\n // Instantiate the RestartGameDialogListener so we can send events\n // to the host\n mListener = (RestartGameDialogListener)activity;\n }\n catch (ClassCastException e)\n {\n throw new ClassCastException(activity.toString()\n + \" must implement RestartGameDialogListener\");\n }\n }", "@Override\r\n\tpublic void onFragmentStart() {\n\t}", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n Log.v(TAG, \"on attach\");\n callback = (Callback)activity;\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the SetPasswordDialogListener so we can send events to the host\n deleteUserPromptListener = (DeleteUserPrompt.DeleteUserPromptListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement DeleteUserPromptListener\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (NewProjectDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n }", "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "@TargetApi(23)\n @Override\n public void onAttach(Context context) {\n super.onAttach(context);\n onAttachToContext(context);\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (NoticeDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n Activity activity = getActivity();\n try {\n appBarHandler = ((HasAppBarHandler) activity).getAppBarHandler();\n } catch (ClassCastException e) {\n throw new ClassCastException(activity + \" must implement HasAppBarHandler\");\n }\n PLYAndroidHolder plyAndroidHolder;\n try {\n plyAndroidHolder = ((HasPLYAndroidHolder) activity).getPLYAndroidHolder();\n } catch (ClassCastException e) {\n throw new ClassCastException(activity + \" must implement HasPLYAndroidHolder\");\n }\n client = plyAndroidHolder.getPLYAndroid();\n if (client == null) {\n throw new RuntimeException(\"PLYAndroid must bet set before creating fragment \" + this);\n }\n // execute some of the queries sequentially (i.e. creating product, uploading image and info)\n sequentialClient = client.copyForOrderedThreadExecution();\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n\n // This makes sure that the host activity has implemented the callback interface\n // If not, it throws an exception\n try {\n paginationHandler = (PaginationHandler) context;\n } catch (ClassCastException e) {\n Timber.d(\"PaginationHandler is not set. Must be a tablet then.\");\n }\n }", "protected void onAttachToContext(Context context) {\n if (context instanceof OnItemSelectedListener) {\n listener = (OnItemSelectedListener) context;\n } else {\n throw new ClassCastException(context.toString()\n + \" must implement MyListFragment.OnItemSelectedListener\");\n }\n }", "@Override\n public void onAttach(@NonNull Context context) {\n super.onAttach(context);\n\n try {\n dListener = (dialogListener) context; // dialog interface is equal to activity instance\n } catch (ClassCastException e) {\n // in case dialogListener didnt implemented\n throw new ClassCastException(context.toString() + \"must Implement dialogListener interface to MainActivity First\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (DialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }", "public interface FragmentListener {\n\n public void callbackEvento(Evento evento);\n public void callbackEventoConfirmados(Evento evento);\n\n public void callbackNoticias();\n}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n try {\n listener = (ScoreDialogPickerListener) context;\n } catch (ClassCastException e) {\n throw new ClassCastException(context.toString() +\n \"must implement example dialog listener\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n \tthis.activity = activity;\n \t\n \tsuper.onAttach(activity);\n \n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (NoticeDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement NoticeDialogListener\");\n }\n }", "public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }", "public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }", "@Override\n\tpublic void onAttach(final Activity activity) {\n\t\tsuper.onAttach(activity);\n\t\t// Verify that the host activity implements the callback interface\n\t\ttry {\n\t\t\t// Instantiate the NoticeDialogListener so we can send events to the\n\t\t\t// host\n\t\t\tmListener = (NoticeDialogListener) activity;\n\t\t} catch (final ClassCastException e) {\n\t\t\t// The activity doesn't implement the interface, throw exception\n\t\t\tthrow new ClassCastException(activity.toString()\n\t\t\t\t\t+ \" must implement NoticeDialogListener\");\n\t\t}\n\t}", "public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }", "public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n // mHost=(NetworkDialogListener)context;\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n if (callbackManager != null) callbackManager.setActivity(activity);\n }", "public interface OpenFragmentListener {\n // TODO: Update argument type and name\n void OpenFragmentInteraction();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\t\n\t\tILog.v(\"MyFragment onActivityCreated\");\n\t}", "@Override\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\n\t\tmyContext=(FragmentActivity) activity;\n\t}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }", "public interface LoginFragmentListener {\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (LeaveChanDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement LeaveChanDialogListener\");\n }\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the NoticeDialogListener so we can send events to the host\n mListener = (VoidReasonDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement VoidReasonDialogListener\");\n }\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface\n try {\n // Instantiate the SettingsManualInputDialogListener so we can send events to the host\n mListener = (SettingsManualInputDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception\n throw new ClassCastException(activity.toString()\n + \" must implement SettingsManualInputDialogListener\");\n }\n }", "@Override\n public void onDetach() {\n super.onDetach();\n Log.i(sFragmentName, \"onDetach()\");\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (mHasLoad) {\n return;\n }\n initFragment();\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n // Verify that the host activity implements the callback interface.\n try {\n // Instantiate the ImageChooserDialogListener so we can send events to the host.\n mListener = (ImageChooserDialogListener) activity;\n } catch (ClassCastException e) {\n // The activity doesn't implement the interface, throw exception.\n throw new ClassCastException(activity.toString()\n + \" must implement ImageChooserDialogListener.\");\n }\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n try {\n callback = (QuestionDisplay.Display) context;\n } catch (ClassCastException e) {\n throw new ClassCastException(context.toString()\n + \" must implement OnHeadlineSelectedListener\");\n }\n }", "public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }", "@Override\n public void onAttachFragment(@NonNull Fragment fragment) {\n super.onAttachFragment(fragment);\n if(fragment.getClass() == ListFragment.class)\n lista = (ListFragment)fragment;\n else if(fragment.getClass() == DataFragment.class)\n datos = (DataFragment)fragment;\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }", "public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}", "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n if (activity instanceof LoadingListener) {\n loadingListener = (LoadingListener) activity;\n } else {\n throw new ClassCastException(activity.toString() + \" must implement LoadingListener\");\n }\n }", "@Override\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\n\t\ttry {\n\t\t\tmListener = (OnSettingItemSelect) activity;\n\t\t} catch (ClassCastException e) {\n\t\t\tthrow new ClassCastException(activity.toString()\n\t\t\t\t\t+ \"must implement onSettingItemClick!\");\n\t\t}\n\t}", "private void initFragmentAutoInjection() {\n BucketApplication app;\n app = (BucketApplication) getApplication();\n\n getSupportFragmentManager().registerFragmentLifecycleCallbacks(new FragmentLifecycleCallbacks() {\n @Override\n public void onFragmentAttached(FragmentManager fm, Fragment f, Context context) {\n super.onFragmentAttached(fm, f, context);\n if(f instanceof ListingFragment) {\n app.getAppComponentInjector().inject((ListingFragment) f);\n } else if (f instanceof ListingPreferencesFragment) {\n app.getAppComponentInjector().inject((ListingPreferencesFragment) f);\n }\n }\n }, false);\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n\tpublic void onDetach() {\n\t\tsuper.onDetach();\n\t\tLog.d(\"Fragment02\",\"onDetach\");\n\t}" ]
[ "0.7678983", "0.7538587", "0.7526182", "0.7513844", "0.7461138", "0.74444026", "0.74415123", "0.74396265", "0.7395343", "0.7381896", "0.7379693", "0.72474235", "0.72467834", "0.717937", "0.7156928", "0.7148006", "0.7043064", "0.7037008", "0.70259285", "0.69490075", "0.6944131", "0.69322", "0.6912946", "0.68925965", "0.6891043", "0.6803185", "0.6800729", "0.67616564", "0.676141", "0.6736592", "0.6702875", "0.6672164", "0.6655629", "0.66521436", "0.6645763", "0.6636891", "0.66284406", "0.6621486", "0.66176564", "0.66093946", "0.6560631", "0.6557267", "0.6533904", "0.6497655", "0.6495789", "0.64719296", "0.6442765", "0.6387654", "0.63640547", "0.63616025", "0.63487005", "0.63439447", "0.6333543", "0.628801", "0.62877244", "0.6286705", "0.6277583", "0.6271628", "0.62449795", "0.62385", "0.62360877", "0.6235588", "0.6230679", "0.6217663", "0.62054205", "0.61980224", "0.61866087", "0.6179952", "0.61530745", "0.6148324", "0.6144842", "0.61294436", "0.61217666", "0.6121443", "0.61159086", "0.61110556", "0.61026657", "0.61008227", "0.610078", "0.6096408", "0.6096272", "0.60843235", "0.60793304", "0.60685384", "0.60675603", "0.6061166", "0.60366696", "0.6035598", "0.6029081", "0.6028689", "0.6025428", "0.60236156", "0.6008348", "0.5999211", "0.59980065", "0.5997625", "0.5996478", "0.5995455", "0.5991989", "0.59831965" ]
0.64365757
47
The system calls this to get the DialogFragment's layout, regardless of whether it's being displayed as a dialog or an embedded fragment.
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //get a reference to this dialog so that it can be passed to listener callback methods mDialog = this; //get fragment arguments to set up the view with Bundle arguments = getArguments(); if (arguments != null) { mTrackInfo = arguments.getStringArrayList(TopTracksActivity.KEY_TRACK_INFO_ARRAY_LIST); Log.i(TAG, "arguments are not null and mTrackInfo is " + mTrackInfo); } else { Log.i(TAG, "onCreateView called and arguments are null!"); } // Inflate the layout to use as dialog or embedded fragment View view = inflater.inflate(R.layout.fragment_track_player, container, false); TextView artistTextView = (TextView) view.findViewById(R.id.track_player_artist); artistTextView.setText(mTrackInfo.get(TopTracksFragment.COL_ARTIST_NAME)); TextView albumTextView = (TextView) view.findViewById(R.id.track_player_album); albumTextView.setText(mTrackInfo.get(TopTracksFragment.COL_ALBUM_NAME)); TextView trackTextView = (TextView) view.findViewById(R.id.track_player_song); trackTextView.setText(mTrackInfo.get(TopTracksFragment.COL_TRACK_NAME)); mElapsedTimeTextView = (TextView) view.findViewById(R.id.track_player_elapsed_time); mTimeLeftTextView = (TextView) view.findViewById(R.id.track_player_time_left); ImageView imageView = (ImageView) view.findViewById(R.id.track_player_album_art); String albumImageUrl = mTrackInfo.get(TopTracksFragment.COL_ALBUM_IMAGE_URL); if (albumImageUrl.length() > 0) { Picasso.with(getActivity()).load(albumImageUrl).placeholder(R.drawable.default_placeholder).error(R.drawable.default_placeholder) .resize(600, 600).centerCrop().into(imageView); } else { Picasso.with(getActivity()).load(R.drawable.default_placeholder) .resize(600, 600).centerCrop().into(imageView); } SeekBar seekBar = (SeekBar) view.findViewById(R.id.track_player_seek_bar); seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { mListener.onProgressChanged(seekBar, progress, fromUser); double progressDouble = (double)progress/1000; double timeLeftDouble = 30 - (double)progress/1000; mElapsedTimeTextView.setText("0:" + String.format("%02d", Math.round(progressDouble))); mTimeLeftTextView.setText("0:" + String.format("%02d", Math.round(timeLeftDouble))); } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onStopTrackingTouch(SeekBar seekBar) { } }); ImageButton previousButton = (ImageButton) view.findViewById(R.id.track_player_previous); previousButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mListener.onPreviousClick(mDialog); } }); mPauseButton = (ImageButton) view.findViewById(R.id.track_player_pause); if (getArguments().getBoolean(TopTracksActivity.KEY_IS_TRACK_PAUSED)) { mPauseButton.setSelected(true); } mPauseButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mListener.onPlayPauseClick(mDialog); } }); ImageButton nextButton = (ImageButton) view.findViewById(R.id.track_player_next); nextButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mListener.onNextClick(mDialog); } }); Log.i(TAG, "track player view successfully updated"); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int getFragmentLayout();", "protected abstract int getFragmentLayout();", "protected abstract int getFragmentLayout();", "public abstract int getFragmentLayout();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.alert_dialog_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_varification_dialog, container, false);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "public void requestLargeLayout() {\n Dialog dialog = getDialog();\n if (dialog == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout dialog has not init yet!\");\n return;\n }\n Window window = dialog.getWindow();\n if (window == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout window has not init yet!\");\n return;\n }\n FragmentActivity activity = getActivity();\n if (activity != null) {\n float displayWidthInDip = UIUtil.getDisplayWidthInDip(activity);\n float displayHeightInDip = UIUtil.getDisplayHeightInDip(activity);\n int dimensionPixelSize = getResources().getDimensionPixelSize(C4558R.dimen.annotate_dialog_min_width);\n if (displayWidthInDip < displayHeightInDip) {\n displayHeightInDip = displayWidthInDip;\n }\n if (displayHeightInDip < ((float) dimensionPixelSize)) {\n window.setLayout(dimensionPixelSize, -1);\n }\n }\n }", "public abstract View getMainDialogContainer();", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //set new View to the builder and create the Dialog\n Dialog dialog = builder.setView(new View(getActivity())).create();\n\n //get WindowManager.LayoutParams, copy attributes from Dialog to LayoutParams and override them with MATCH_PARENT\n WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();\n layoutParams.copyFrom(dialog.getWindow().getAttributes());\n layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT;\n layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;\n //show the Dialog before setting new LayoutParams to the Dialog\n dialog.show();\n dialog.getWindow().setAttributes(layoutParams);\n\n return dialog;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_loading_dialog, container, false);\n }", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\r\n\t\tAlertDialog.Builder builder = new Builder(this.getActivity());\r\n\t\tView view = LayoutInflater.from(getActivity()).inflate(\r\n\t\t\t\tR.layout.load_dialog, null);\r\n\r\n\t\tbuilder.setView(view);\r\n\t\tbuilder.setCancelable(false);\r\n\t\tdialog=builder.create();\r\n\t\treturn dialog;\r\n\t}", "@Override\n public void onResume() {\n super.onResume();\n Log.e(LOG_TAG, \"onResume=\"+getShowsDialog());\n if (getShowsDialog()) {\n // Set the width of the dialog to the width of the screen in portrait mode\n DisplayMetrics metrics = getActivity().getResources().getDisplayMetrics();\n int dialogWidth = Math.min(metrics.widthPixels, metrics.heightPixels);\n getDialog().getWindow().setLayout(dialogWidth, WRAP_CONTENT);\n }\n }", "private void findDialogView() {\n dialog = new BottomSheetDialog(getActivity(), R.style.BottomSharingSheet);\n View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.sharing_bottom_sheet, null);\n dialog.setContentView(dialogView);\n closeNavigation = dialogView.findViewById(R.id.imgClose);\n llFacebook = dialogView.findViewById(R.id.llFacebook);\n llTwitter = dialogView.findViewById(R.id.llemail);\n llInstagram = dialogView.findViewById(R.id.lltalk);\n llStories = dialogView.findViewById(R.id.llGoogle);\n llBand = dialogView.findViewById(R.id.llBand);\n llMore = dialogView.findViewById(R.id.llMore);\n llVideoReport = dialogView.findViewById(R.id.llVideoReport);\n closeNavigation.setOnClickListener(this);\n llFacebook.setOnClickListener(this);\n llTwitter.setOnClickListener(this);\n llInstagram.setOnClickListener(this);\n llStories.setOnClickListener(this);\n llBand.setOnClickListener(this);\n llMore.setOnClickListener(this);\n llVideoReport.setOnClickListener(this);\n\n }", "@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n \n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n View view = inflater.inflate(R.layout.signin_dialog, null);\n view.findViewById(R.id.sign_in_button).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mHelper.beginUserInitiatedSignIn();\n SignInDialogFragment.this.dismiss();\n }\n });\n builder.setView(view);\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_ranking_settings_dialog, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_dialog, container, false);\n recyclerView = (RecyclerView) view.findViewById(R.id.dialogrecycle);\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n getDialog().setTitle(\"Search Results: Select One\");\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n view = inflater.inflate(R.layout.fragment_atsc, container, false);\n mtextView = inflater.inflate(R.layout.dialog_text_layout,null,false);\n// mlayout = inflater.inflate(R.layout.dialog_text_layout,(ViewGroup) container.findViewById(R.id.dialog));\n mContext = this.getActivity();\n\n WindowManager wm = (WindowManager) getContext()\n .getSystemService(Context.WINDOW_SERVICE);\n\n width = wm.getDefaultDisplay().getWidth();\n height = wm.getDefaultDisplay().getHeight();\n// TextView txt_content = (TextView)view.findViewById(R.id.txt_atsccontent);\n// txt_content.setText(\"第一个Fragment\");\n\n Log.e(\"HEHE\", \"1日狗\");\n initView();\n initListener();\n return view;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "int getActivityLayoutId();", "FrameLayout getUserLayout() {\n LayoutInflater inflater = LayoutInflater.from(getActivity());\n return (FrameLayout) inflater.inflate(R.layout.user_msg_layout, null);\n }", "@Override\n public void onResume() {\n int width = ConstraintLayout.LayoutParams.MATCH_PARENT;\n int height = ConstraintLayout.LayoutParams.WRAP_CONTENT;\n getDialog().getWindow().setLayout(width, height);\n\n super.onResume();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflator = getActivity().getLayoutInflater();\n View view = inflator.inflate(R.layout.informationdialog, datePicker);\n builder.setView(view);\n init(view);\n Dialog dialog = builder.create();\n\n //Dialog will not close automatically until user click on cancle button.\n setCancelable(false);\n return dialog;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dialog_customer_info, container, false);\n if (getDialog()!=null){\n getDialog().requestWindowFeature( STYLE_NO_TITLE );\n\n int width = ViewGroup.LayoutParams.MATCH_PARENT;\n int height = ViewGroup.LayoutParams.MATCH_PARENT;\n getDialog().getWindow().setLayout(width, height);\n }\n\n progressBar = view.findViewById( R.id.progress_circular );\n layoutContent = view.findViewById( R.id.layoutContent );\n layoutMonthlyRecharge = view.findViewById( R.id.layoutMonthlyRecharge );\n\n operatorName = view.findViewById(R.id.operatorName);\n customerName = view.findViewById( R.id.customerName );\n balance = view.findViewById( R.id.balance );\n nextRechargeDate = view.findViewById( R.id.nextRechargeDate );\n monthlyRecharge = view.findViewById( R.id.monthlyRecharge );\n planName = view.findViewById( R.id.planName );\n deleteBtn = view.findViewById( R.id.imageButtonClose );\n\n // --- Click Action\n deleteBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FragmentDialogCustomerInfo.this.dismiss();\n }\n });\n\n if (callDTHInfo == null){\n // Query...\n DBQuery.queryToGetCustomerInfo( this, s_Username, s_Password, s_provider, s_mobile );\n\n }else {\n setData();\n }\n\n return view;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n\tpublic Fragment createFragment() {\n\t\treturn new SelectDialogFragment();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dialog, container, false);\n mUnbinder = ButterKnife.bind(this, view);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n mView = inflater.inflate(R.layout.fragment_bottom_sheet, container, false);\n slideUpTo(mView);\n return mView;\n }", "public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n\t return mDialog;\r\n\t }", "protected LayoutInflater getInflater(){\n return getActivity().getLayoutInflater();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n setRetainInstance(true);\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n View view = inflater.inflate(R.layout.void_reason_dialog, null);\n\n final TextView voidSummaryText = (TextView) view.findViewById(R.id.void_summary);\n\n if(voidOrder)\n voidSummaryText.setText(getString(R.string.void_order));\n else\n voidSummaryText.setText(getString(R.string.void_summary, noItems));\n\n voidReason = (EditText) view.findViewById(R.id.reason_text);\n\n builder.setTitle(R.string.void_title);\n builder.setView(view)\n // Add action buttons\n .setPositiveButton(R.string.void_item, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n //Nothing on purpose to avoid closing the dialog when the reason is not filled out\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n VoidReasonDialogFragment.this.getDialog().cancel();\n }\n });\n\n Dialog dialog = builder.create();\n dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n return dialog;\n }", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\r\n\t\t// Set up the layout inflater\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\r\n\t\t// Set the title, message and layout of the dialog box\r\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_box_layout, null))\r\n\t\t\t\t.setTitle(R.string.dialog_title);\r\n\r\n\t\t// User accepts the thing in the dialog box\r\n\t\tbuilder.setPositiveButton(R.string.dialog_accpet,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(),\r\n\t\t\t\t\t\t\t\t\"Thank you for your kiss ^.^\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t// User cancels the thing in the dialog box\r\n\t\tbuilder.setNegativeButton(R.string.dialog_cancel,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Refuse my kiss??? >.<\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\treturn builder.create(); // return the AlertDialog object\r\n\t}", "public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tView dialogView = inflater.inflate(R.layout.posted, null);\r\n\r\n\t\tbuilder.setTitle(\"Posted Message to:\");\r\n\t\tbuilder.setView(dialogView);\r\n\t\tfinal AlertDialog dialog = builder.show();\r\n\t\t//dialog.getWindow().setLayout(520, 525);\r\n\t\t\r\n\t\tTextView message = (TextView) dialog.findViewById(R.id.sites_posted);\r\n\t\tmessage.setText(sites);\r\n\r\n\t\tButton done = (Button) dialog.findViewById(R.id.done);\r\n\t\tdone.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO open social media options\r\n\t\t\t\tdialog.cancel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\treturn dialog;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_dialog_add_hole, container, false);\n butOk = root.findViewById(R.id.butOk);\n butCancelar = root.findViewById(R.id.butCancelar);\n latLng = root.findViewById(R.id.lntLng);\n address = root.findViewById(R.id.ads);\n latLng.setText(latlng);\n address.setText(ad);\n\n butOk.setOnClickListener(this);\n butCancelar.setOnClickListener(this);\n\n return root;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setTitle(\"Add Participant...\");\n builder.setMessage(\"Participant address:\");\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setLayoutParams(lp);\n builder.setView(input); // uncomment this line\n\n\n builder.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogAdd(input.getText().toString());\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogCancel();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "@Override // com.zhihu.android.topic.widget.dialog.BaseCenterDialogFragment\n /* renamed from: a */\n public int mo110846a() {\n return R.layout.z1;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n Dialog dialog = new Dialog(getContext(), R.style.alert_dialog_style);\n dialog.setCancelable(false);\n dialog.setCanceledOnTouchOutside(false);\n View view = View.inflate(getContext(), R.layout.loading, null);\n dialog.setContentView(view);\n return dialog;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n // Pass null as the parent view because its going in the dialog layout.\n View view = inflater.inflate(R.layout.dialog_image_chooser, null);\n\n View cameraView = view.findViewById(R.id.action_camera);\n View galleryView = view.findViewById(R.id.action_gallery);\n\n cameraView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the camera click event back to the host activity.\n mListener.onDialogCameraClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n galleryView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the gallery click event back to the host activity.\n mListener.onDialogGalleryClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n // Create an AlertDialog.Builder and set the layout.\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setView(view);\n\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.complete_workout_dialog,null);\n builder.setView(view);\n completeScore = view.findViewById(R.id.score_edit_text);\n completeTime = view.findViewById(R.id.time_edit_text);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n // Add action buttons\n builder.setMessage(\"\")\n .setPositiveButton(\"Ok \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n completeWorkoutListener.onCompletedWorkoutSelected(completeScore.getText().toString(), completeTime.getText().toString());\n }\n })\n .setNegativeButton(\" Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n sharedPreferences = getActivity().getSharedPreferences(\"VALUES\", Context.MODE_PRIVATE);\n currentTheme = sharedPreferences.getInt(\"THEME\", 0);\n\n //inflate theme_dialog.xml\n view = inflater.inflate(R.layout.theme_dialog, container);\n\n // remove title (already defined in theme_dialog.xml)\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n\n // Declare buttons and onClick methods\n dialogButtons();\n\n setUltimoThemeBooton(currentTheme);\n\n return view;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.at_home_question)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n listener.onAlign(getDialog());\n }\n })\n .setNeutralButton(R.string.go_home, null) // See onResume\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n listener.onCancel(getDialog());\n }\n }).setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n listener.onCancel(getDialog());\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public int onCreateViewLayout() {\n return R.layout.gb_fragment_performance_settings;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }", "@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tbuilder.setMessage(message).setTitle(\"Device's IP address :\")\n\t\t\t\t.setNeutralButton(\"OK\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\t// close the dialog\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t// Create the AlertDialog object and return it\n\t\treturn builder.create();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //return super.onCreateDialog(savedInstanceState); // TODO: should we call it?\n final String title = getArguments().getString(\"TITLE\");\n final String msg = getArguments().getString(\"MESSAGE\");\n final String pos = getArguments().getString(\"POS\");\n final String neg = getArguments().getString(\"NEG\");\n final String neu = getArguments().getString(\"NEU\");\n // TODO - this is just an int... what about other ... Parcelable\n final int idx = getArguments().getInt(\"IDX\");\n final int iconid = getArguments().getInt(\"ICON_ID\");\n final float textsize = getArguments().getFloat(\"MSGSIZE\");\n\n if (savedInstanceState != null) {\n tag = savedInstanceState.getString(\"TAG\");\n }\n\n final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialogInterface, int clickedButton) {\n ConfirmListener act = (ConfirmListener) getActivity();\n act.processConfirmation(clickedButton, tag, idx);\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(title)\n .setMessage(msg);\n if (iconid != 0 && getResources().getResourceTypeName(iconid).equals(\"drawable\")) {\n // this must be a R.drawable.id, otherwise crash!\n // android.content.res.Resources$NotFoundException:\n builder.setIcon(iconid);\n }\n if (pos != null) {\n builder.setPositiveButton(pos, listener);\n }\n if (neg != null) {\n builder.setNegativeButton(neg, listener);\n }\n if (neu != null) {\n builder.setNeutralButton(neu, listener);\n }\n\n dialog = builder.create();\n if (textsize != 0) {\n dialog.show(); // need to call this to be able to get the TextView as non-null pointer\n TextView tv = (TextView) dialog.findViewById(android.R.id.message);\n if (tv != null) {\n tv.setTextSize(textsize);\n }\n }\n return dialog;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_settings_dialog_planned_basal_injections, container, false);\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(mContext);\n\n builder.setMessage(R.string.dialog_delete_lesson_part)\n .setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User confirm the dialog\n mListener.onDialogDeletePartPositiveClick(DeletePartDialogFragment.this, lesson_part_id);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n mListener.onDialogDeletePartNegativeClick(DeletePartDialogFragment.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "void showDialog() {\n\t\tDialogFragment newFragment = MyAlertDialogFragment\n\t\t\t\t.newInstance(R.string.not_enoughth_information);\n\t\tnewFragment.show(getFragmentManager(), \"dialog\");\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedstanceState) {\n return inflater.inflate(R.layout.fragment_violations, container, false);\n }", "@Override // com.oculus.panelapp.assistant.dialogs.AssistantDialog\n public View onCreateView(Context context) {\n return LayoutInflater.from(context).inflate(R.layout.system_dialog, (ViewGroup) null, false);\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.modeselectfragment, null, false);\n mListView = (ListView) view.findViewById(R.id.mode_select_list);\n getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n return view;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n \n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View dialogView = inflater.inflate(R.layout.password_dialog, null);\n CheckBox rememberCheckbox = (CheckBox) dialogView.findViewById(R.id.rememberPassword);\n rememberCheckbox.setChecked(app.getRememberPassword());\n \n //Set Error message\n if(message != null)\n ((TextView)dialogView.findViewById(R.id.authErrorView)).setText(message);\n \n builder.setView(dialogView);\n \n \n builder.setMessage(R.string.authenticate)\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String password = ((EditText)AuthDialogFragment.this.getDialog().findViewById(R.id.password)).getText().toString();\n boolean rememberPassword = ((CheckBox)AuthDialogFragment.this.getDialog().findViewById(R.id.rememberPassword)).isChecked();\n \n app.setRememberPass(rememberPassword);\n \n service.authenticate(password);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog, shutdown everything\n if(service != null)\n {\n service.disconnect();\n }\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\t public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t \n\t \n\t \n\t LayoutInflater inflater = getActivity().getLayoutInflater();\n\t \n\t final View inflator = inflater.inflate(R.layout.dialog_signin, null);\n\t \n\t \n\t \n\t builder.setView(inflator)\n\t \n\t \n\t .setPositiveButton(\"Set\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t EditText username = (EditText) inflator.findViewById(R.id.username);\n\t \t String str = username.getText().toString();\n\t System.out.println(str);\n\t mEditText.setText(str);\n\t }\n\t })\n\t .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t });\n\t // Create the AlertDialog object and return it\n\t return builder.create();\n\t }", "public String getPageLayout() {\n\t\treturn layout.getText();\n\t}", "public abstract int getFragmentView();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_hint_dialog, container, false);\n \n cancel_btn = (ImageView) view.findViewById(R.id.cancel_btn);\n confirm_btn = (TextView) view.findViewById(R.id.confirm_btn);\n hint_image = (ImageView) view.findViewById(R.id.hint_icon);\n hint_text = (TextView) view.findViewById(R.id.hint_text);\n\n Glide.with(getActivity()).load(R.drawable.snack_bar_icon).into(hint_image);\n hint_text.setText(hint);\n \n cancel_btn.setOnClickListener(this);\n confirm_btn.setOnClickListener(this);\n\n return view;\n }", "@Override\r\n protected int getLayoutId() {\n return R.layout.fragment_settings;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_open_composition, null, false);\n compositionSelectionList = (ListView) view.findViewById(R.id.savedCompositionSelectionList);\n\n getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n return view;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n FragmentDialogReviewListBinding mBinding = FragmentDialogReviewListBinding.inflate(inflater, container, false);\n\n this.getDialog().setTitle(this.mMovie.getTitle() + \"'s Reviews\");\n\n TextView textView = (TextView) this.getDialog().findViewById(android.R.id.title);\n if (textView != null)\n {\n textView.setGravity(Gravity.CENTER);\n }\n\n RecyclerView mRecyclerView = mBinding.reviewRecyclerViewLarge;\n\n BaseReviewAdapter mAdapter = new BaseReviewAdapter(this, this.mReviews, R.layout.item_review_list_large);\n\n mRecyclerView.setAdapter(mAdapter);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));\n mRecyclerView.addItemDecoration(new ItemDivider(this.getActivity()));\n if (this.mSelectedIndex != 0)\n {\n mRecyclerView.scrollToPosition(this.mSelectedIndex);\n }\n\n return mBinding.getRoot();\n }", "private JDialog getParentDialog() {\n return (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, this);\n }", "public int getContentLayout() {\n return R.layout.activity_search_contact;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){\n View layout = inflater.inflate(R.layout.setup_chatroom_dialog, container, false);\n Button setupButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_setup_button);\n Button cancelButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_cancel_button);\n editText = (EditText)layout.findViewById(R.id.setup_chatRoom_dialog_edit_text);\n setupButton.setOnClickListener(setupListener);\n cancelButton.setOnClickListener(cancelListener);\n return layout;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n setRetainInstance(true);\n\n Dialog dialog = new Dialog(getContext(), R.style.DialogTheme);\n dialog.setContentView(R.layout.add_student_feedback_dialog);\n\n return dialog;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //setting the message and the title of dialog\n builder.setTitle(R.string.dialog_title)\n .setMessage(R.string.dialog_message)\n .setPositiveButton(android.R.string.yes, (dialog, which) -> {\n getActivity().finish();\n })\n .setOnCancelListener(dialog -> getActivity().finish());\n\n //creating and returning the dialog\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "@SuppressLint(\"InflateParams\")\n @Override @NonNull\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n builder.setTitle(R.string.settings_manual_input_dialog_title)\n .setView(inflater.inflate(R.layout.dialog_settings_manual_input, null))\n .setPositiveButton(R.string.settings_manual_input_dialog_ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Send the positive button event back to the host activity\n\n String tokenName = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_name)).getText().toString();\n String token = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_value)).getText().toString();\n String issuerUrl = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_url)).getText().toString();\n mListener.onSettingsManualInputDialogOkClick(tokenName, token, issuerUrl);\n }\n })\n .setNegativeButton(R.string.settings_manual_input_dialog_cancel, null);\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tActivity activity = getActivity();\n\t\t// Get the layout inflater\n\t\tLayoutInflater inflater = activity.getLayoutInflater();\n\n\t\t// inflate the view\n\t\t// Inflate and set the layout for the dialog \n\t\t// Pass null as the parent view because its going in the dialog layout \n\t\tView view = inflater.inflate(R.layout.settings, null);\n\t\t\n\t\t// dialog builder\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(activity);\n\t\tbuilder.setView(view)\n\t\t\t .setTitle(R.string.settings)\n\t\t\t\t\n\t\t\t // Add action buttons \n\t\t\t\t\n\t\t\t\t.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { \n\t\t\t \t\n\t\t\t \t@Override \n\t\t\t \tpublic void onClick(DialogInterface dialog, int id) { \n\t\t\t \t\t// Send the positive button event back to the host activity\n\t\t\t \t\tmListener.onSettingsPositiveClick(SettingsDialogFragment.this);\n\t\t\t \t} \n\t\t \t}) \n\t\t \t.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { \n\n\t\t \t\t@Override \n\t\t \t\tpublic void onClick(DialogInterface dialog, int id) { \n\t\t \t\t\t// Send the negative button event back to the host activity\n\t\t\t \t\tmListener.onSettingsNegativeClick(SettingsDialogFragment.this);\n\t\t \t\t} \n\t \t\t}); \n \n\t\tmCheckBoxPlaySound = (CheckBox)view.findViewById(R.id.cbPlaySound);\n\t\tmRadioButtonDrawOne = (RadioButton)view.findViewById(R.id.rbDrawOne);\n\t\tfinal RadioButton radioButtonDrawThree = (RadioButton)view.findViewById(R.id.rbDrawThree);\n\t\tmRadioButtonGreen = (RadioButton)view.findViewById(R.id.rbGreen);\n\t\tfinal RadioButton radioButtonBlue = (RadioButton)view.findViewById(R.id.rbBlue);\n\t\tmCheckBoxPlaySound.setChecked(mIsPlaySound);\n\t\tif (mIsDrawOne)\n\t\t\tmRadioButtonDrawOne.setChecked(true);\n\t\telse\n\t\t\tradioButtonDrawThree.setChecked(true);\n\t\tif (mIsBackgroundGreen)\n\t\t\tmRadioButtonGreen.setChecked(true);\n\t\telse\n\t\t\tradioButtonBlue.setChecked(true);\n\t\t\n\t\treturn builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState)\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n contentView = inflater.inflate(R.layout.dialog_add_contract, null);\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n builder.setView(contentView, 36, 36, 36, 36);\n\n final DialogFragment fragment = this;\n builder.setTitle(R.string.add_contract_dialog_title)\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id)\n {\n // address was added manually\n if(optionAddContract.isChecked())\n {\n selectedContractAddress = contractAddressField.getText().toString();\n dialogListener.onAddContract(selectedContractAddress, selectedContractType);\n }else{\n dialogListener.onCreateContract(selectedContractType);\n }\n }\n })\n .setNegativeButton(R.string.cancel, null);\n\n // Create the AlertDialog object and return it\n Dialog diag = builder.create();\n\n //Find and init the UI components\n contractAddressField = (EditText) contentView.findViewById(R.id.contract_address_field);\n contractAddressSection = (LinearLayout)contentView.findViewById(R.id.manual_contract_address_section);\n\n optionAddContract = (RadioButton) contentView.findViewById(R.id.option_add_contract);\n optionCreateContract = (RadioButton) contentView.findViewById(R.id.option_create_contract);\n radioGroup = (RadioGroup) contentView.findViewById(R.id.account_radio_group);\n radioGroup.setOnCheckedChangeListener(this);\n\n contractTypeSpinner = (Spinner) contentView.findViewById(R.id.contract_type_spinner);\n contractTypeSpinner.setAdapter(new ArrayAdapter<ContractType>(contentView.getContext(), android.R.layout.simple_list_item_1, ContractType.values()));\n contractTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n selectedContractType = ContractType.values()[i];\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n selectedContractType = ContractType.Purchase;\n }\n });\n\n return diag;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.dialog_change_password, null);\n\n curPass = (EditText) view.findViewById(R.id.currentPasswordInput);\n newPass = (EditText) view.findViewById(R.id.newPasswordInput);\n conPass = (EditText) view.findViewById(R.id.confirmPasswordInput);\n\n builder.setTitle(\"Change Password\");\n builder.setMessage(\"Enter your current password, then enter a new password and confirm it.\");\n\n // Set the dialog view to the inflated xml\n builder.setView(view);\n\n\n // Set positive button's text to Add\n // Don't do anything because this will be overridden\n builder.setPositiveButton(\"Save\", null);\n // Set negative button's text to Cancel\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Cancel the dialog when button is pressed\n ChangePasswordFragment.this.getDialog().cancel();\n }\n });\n\n // Create the dialog\n dialog = builder.create();\n\n // Set a new onShowListener to override positive button's listener\n dialog.setOnShowListener(new DialogInterface.OnShowListener() {\n\n @Override\n public void onShow(DialogInterface dialog) {\n // Get the positive button of the dialog\n Button submit = ChangePasswordFragment.this.dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n\n // We override the original listener method because we do not want to exit the dialog\n // until we verify that the entered email is valid\n submit.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // Call positive button listener's on click method\n // and pass in current dialog fragment\n pListener.onDialogPositiveClick(ChangePasswordFragment.this);\n\n // Don't dismiss\n // Listener will dismiss when data is validated\n }\n });\n }\n });\n\n\n\n return dialog;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dialog, container, false);\n\n youTubePlayerView = view.findViewById(R.id.youtube_player_view);\n getLifecycle().addObserver(youTubePlayerView);\n initPictureInPicture(youTubePlayerView);\n\n youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() {\n @Override\n public void onReady(@NonNull YouTubePlayer youTubePlayer) {\n String videoId = \"SQNtGoM3FVU\";\n youTubePlayer.loadVideo(videoId, 0);\n }\n });\n return view;\n }", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\tBundle savedInstanceState) {\n\n\t\t\tView rootView = inflater.inflate(R.layout.status_update_layout, container,\n\t\t\t\t\tfalse);\n\t\t\tgetDialog().getWindow().setBackgroundDrawableResource(android.R.color.white);\n\t\t\tgetDialog().setTitle(\"Post Status Update\"); \n\n\t\t\tstatusLayoutHandle(rootView);\n\n\t\t\treturn rootView;\n\t\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"CREA USUARIO\")\n .setView(inflater.inflate(R.layout.register_dialog, null))\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n editUser = ((AlertDialog) dialog).findViewById(R.id.username);\n editPass = ((AlertDialog) dialog).findViewById(R.id.password);\n startConexion();\n }\n })\n .setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public DialogImpl\n getDialog(String dialogId) {\n \tif (LogWriter.needsLogging)\n \t\tLogWriter.logMessage(\"Getting dialog for \" + dialogId);\n synchronized(dialogTable) {\n return (DialogImpl)dialogTable.get(dialogId);\n }\n }", "public static DialogFragment notEnoughAcceptableDialog(Context context) {\n if (context == null) {\n return null;\n }\n BasicInfoDialogFragment dialogFragment = new BasicInfoDialogFragment();\n dialogFragment.setText(\n context.getString(R.string.dialog_wizard_low_acceptable_title),\n context.getString(R.string.dialog_wizard_low_acceptable_message));\n dialogFragment.setPositive(context.getString(R.string.dialog_wizard_low_acceptable_positive), null);\n commitFragment(context, dialogFragment, \"notEnoughAcceptableDialogTag\");\n return dialogFragment;\n }", "public abstract int presentViewLayout();", "@Override\n protected int getActivityLayout() {\n return R.layout.activity_search_estate;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.filter_dialog, null);\n\n\n\n /* Inflate and set the layout for the dialog */\n /* Pass null as the parent view because its going in the dialog layout*/\n builder.setView(rootView)\n /* Add action buttons */\n .setPositiveButton(R.string.filter, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n addShoppingList();\n }\n });\n\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_creation, container, false);\n\n mQueryController = new QueryController(getActivity());\n\n\n LinearLayout linear = (LinearLayout)rootView.findViewById(R.id.flipLayout);\n final CustomDialogClass cdd=new CustomDialogClass(getActivity());\n linear.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n cdd.show();\n Window window = cdd.getWindow();\n window.setLayout(600,900);\n\n }\n });\n\n LinearLayout linearCustom = (LinearLayout)rootView.findViewById(R.id.contentLayout);\n final CustomContentDialogClass ccd=new CustomContentDialogClass(getActivity());\n linearCustom.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n ccd.show();\n Window window = ccd.getWindow();\n window.setLayout(600,500);\n\n }\n });\n\n\n mCreateVideo = (Button) rootView.findViewById(R.id.btn_create_video);\n //setting create video button listener\n mCreateVideo.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n //settin values to the Query object\n mQuery.setmDuration(VideoActivity.INTERVAL.toString());\n // added checks here so that it performs automatic checking of non-initilaization of query element\n\n if (CustomContentDialogClass.mScenery != null){\n mQuery.setmIsSceneryChecked(CustomContentDialogClass.mScenery.isChecked());\n Log.d(\"CREATEFRAG\",\"Scene check: \"+CustomContentDialogClass.mScenery.isChecked());\n }\n\n if (CustomContentDialogClass.mPeople != null){\n mQuery.setmIsPeopleChecked(CustomContentDialogClass.mPeople.isChecked());\n Log.d(\"CREATEFRAG\", \"People check: \" + CustomContentDialogClass.mPeople.isChecked());\n }\n\n if (CustomContentDialogClass.mSelfie != null){\n mQuery.setmIsSelfieClicked(CustomContentDialogClass.mSelfie.isChecked());\n Log.d(\"CREATEFRAG\", \"Selfie check: \" + CustomContentDialogClass.mSelfie.isChecked());\n }\n\n Long time_start = new Long(0);\n Long time_end = Calendar.getInstance().getTimeInMillis();\n try {\n Date date_start = new SimpleDateFormat(\"MM/dd/yy\", Locale.ENGLISH).parse(CustomDialogClass.mStartText.getText().toString());\n time_start = date_start.getTime();\n\n Date date_end = new SimpleDateFormat(\"MM/dd/yy\", Locale.ENGLISH).parse(CustomDialogClass.mEndText.getText().toString());\n time_end = date_end.getTime();\n }\n catch(Exception e)\n {\n\n }\n\n mQuery.setmStartDate(time_start);\n mQuery.setmEnddate(time_end);\n mQuery.setmRadius(MapsActivity.radius);\n\n\n if (MapsActivity.mPosition != null) {\n mQuery.setmLocation(new LatLng(MapsActivity.mPosition.latitude,\n MapsActivity.mPosition.longitude));\n Log.d(\"Creation fragemnt\", MapsActivity.mPosition.latitude + \"\");\n Log.d(\"Creation fragemnt\", MapsActivity.mPosition.longitude + \"\");\n }\n else\n {\n Log.d(\"CREATION FRAGMENT\", \"NO LOCATION SPECIFIED\" );\n }\n\n ArrayList<String> file_paths = mQueryController.HandleQuery(mQuery);\n\n Intent intent = new Intent(getActivity(),\n VideoActivity.class);\n\n intent.putStringArrayListExtra(IMAGES_FROM_QUERY,file_paths);\n\n startActivity(intent);\n }\n });\n\n return rootView;\n }", "@Override\r\n \tprotected Dialog onCreateDialog(int id) {\n \t\tDialog dialog;\r\n \t\tswitch (id) {\r\n \t\t\tcase DIALOG_LOCATION_HISTORY:\r\n \t\t\t\t//logically, this cannot appear before the location layout is updated, so there is no \r\n \t\t\t\t//chance historyLayout can be null, except you are doing something wrong\r\n \t\t\t\tdialog = new Dialog(this);\r\n \t\t\t\tdialog.setTitle(\"Location History\");\r\n \t\t\t\tdialog.setContentView(detachedHistoryLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\t\t\r\n \t\t\tcase DIALOG_LOCATION:\r\n \t\t\t\tlocationLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t\t(R.layout.manual_location_dialog, null);\r\n \t\t\t\tdetachedHistoryLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t(R.layout.manual_location_history_dialog, null);\r\n \t\t\t\t\r\n \t\t\t\tfinal LinearLayout historyLayout = (LinearLayout) detachedHistoryLayout.findViewById(R.id.historyLayout); \r\n \t\t\t\t\r\n \t\t\t\tfinal TextView currentLocation = (TextView) locationLayout.findViewById(R.id.locationText);\r\n \t\t\t\tif (MyApplication.currentLocation != null)\r\n \t\t\t\t{\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Your last updated location is \" + '\\n' + \r\n \t\t\t\t\t\t\t\tMyApplication.currentLocation.getString(\"name\") + \" within approx. \" \r\n \t\t\t\t\t\t\t\t+ MyApplication.currentLocation.getString(\"accuracy\"));\r\n \t\t\t\t\t} catch (JSONException e) {\r\n \t\t\t\t\t\te.printStackTrace();\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Cannot get your current location.\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\tfinal RelativeLayout showHistoryLayout = (RelativeLayout) locationLayout.findViewById(R.id.showHistoryLayout);\r\n \t\t\t\tshowHistoryLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tshowDialog(Page.DIALOG_LOCATION_HISTORY);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\r\n \t\t\t\tRelativeLayout autoLocLayout = (RelativeLayout) locationLayout.findViewById(R.id.autoLocLayout);\r\n \t\t\t\tautoLocLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tLocationTracker.autoLoc = true;\r\n \t\t\t\t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\t\te.printStackTrace();\r\n \t\t\t\t\t\t\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try again later\", \r\n \t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\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\r\n \t\t\t\tfinal EditText manualLocationField = (EditText) locationLayout.findViewById(R.id.manualLocationField);\r\n \t\t\t\tmanualLocationField.setOnKeyListener(new OnKeyListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\r\n \t\t\t\t\t\tif (event.getAction() == KeyEvent.ACTION_DOWN)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\tswitch (keyCode) {\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_ENTER:\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_DPAD_CENTER:\r\n \t\t\t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t\t\treturn true;\r\n \t\t\t\t\t\t\tdefault:\r\n \t\t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\treturn false;\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tButton setLocation = (Button) locationLayout.findViewById(R.id.setLocationButton);\r\n \t\t\t\tsetLocation.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\t\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try \" +\r\n \t\t\t\t\t\t\t\t\t\"again later\", Toast.LENGTH_SHORT).show();\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\r\n \t\t\t\tdialog = new LocationDialog(this);\r\n \t\t\t\tdialog.setTitle(\"Update your location\");\r\n \t\t\t\tdialog.setContentView(locationLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\tdefault:\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t\treturn super.onCreateDialog(id);\r\n \t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"They decliened your invitation\";\n if(getArguments().getBoolean(\"hostDeclined\"))\n {\n mess = \"They canceled their invitation\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\tprotected int layoutFragmentRes() {\n\t\treturn R.layout.fragment_statistics_chart_order;\n\t}", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(this.m)\n .setPositiveButton(R.string.donesuccess, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // onFailure();\n onLoginFailed(m);\n }\n });\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // The only reason you might override this method when using onCreateView() is\n // to modify any dialog characteristics. For example, the dialog includes a\n // title by default, but your custom layout might not need it. So here you can\n // remove the dialog title, but you must call the superclass to get the Dialog.\n Dialog dialog = super.onCreateDialog(savedInstanceState);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n return dialog;\n }", "void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n // The only reason you might override this method when using onCreateView() is\r\n // to modify any dialog characteristics. For example, the dialog includes a\r\n // title by default, but your custom layout might not need it. So here you can\r\n // remove the dialog title, but you must call the superclass to get the Dialog.\r\n Dialog dialog = super.onCreateDialog(savedInstanceState);\r\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n return dialog;\r\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.app_help_title);\n builder.setMessage(R.string.app_help_message)\n .setPositiveButton(R.string.app_help_ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_alarm, container, false);\n timepick=view.findViewById(R.id.time);\n Button cancel=view.findViewById(R.id.cancel);\n\n timepick.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n DialogFragment timePicker=new TimePicker(\"alarm\");\n timePicker.show(getFragmentManager(),\"timepicker\");\n }\n });\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n androidx.fragment.app.Fragment fragment=new All();\n FragmentManager fragmentManager=getFragmentManager();\n FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.frag,fragment);\n fragmentTransaction.commit();\n }\n });\n\n return view;\n }", "@Nullable\n public abstract LayoutHelper getLayoutHelper(int position);", "public final int getLayout() {\n return 2130970726;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_help_center, container, false);\n }", "protected XWalkDialogManager getDialogManager() {\n return mActivityDelegate.getDialogManager();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_contest_search_dialog, container, false);\n\n initUi(view);\n\n setInitialData();\n\n getData(IApiEvent.REQUEST_SEARCH_NEWS_FEED_MIRROR_CODE);\n\n return view;\n }", "public View getPresentView() {\r\n\t\tView _presentView;\r\n\r\n\t\t// check present view\r\n\t\tif (null == _mView) {\r\n\t\t\t// get layout inflater\r\n\t\t\tLayoutInflater _layoutInflater = (LayoutInflater) getContext()\r\n\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\r\n\t\t\t// inflater present view, save it and return\r\n\t\t\t_presentView = _mView = _layoutInflater.inflate(\r\n\t\t\t\t\tpresentViewLayout(), null);\r\n\t\t} else {\r\n\t\t\t// return immediately\r\n\t\t\t_presentView = _mView;\r\n\t\t}\r\n\r\n\t\treturn _presentView;\r\n\t}", "String getLayout();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_send_invitation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_message_viewer, container, false);\n }" ]
[ "0.62713253", "0.62713253", "0.62713253", "0.61956906", "0.6169787", "0.6157008", "0.61369586", "0.60786545", "0.6039579", "0.5993138", "0.5948618", "0.5928539", "0.59140384", "0.5905838", "0.5896048", "0.5880192", "0.5878724", "0.5864349", "0.5824652", "0.5777124", "0.577234", "0.5757695", "0.5752636", "0.57156944", "0.5693296", "0.5693001", "0.56678647", "0.566539", "0.56538975", "0.56213444", "0.5616023", "0.5600655", "0.5592992", "0.5579196", "0.5560001", "0.55494934", "0.5547885", "0.55412495", "0.55401105", "0.5516271", "0.5480079", "0.5467641", "0.54554135", "0.54551065", "0.54461926", "0.54408234", "0.5430509", "0.54263204", "0.53811455", "0.53781575", "0.53753215", "0.5359906", "0.5357495", "0.5348222", "0.5340948", "0.5337935", "0.5336265", "0.53344804", "0.53330296", "0.5325692", "0.53173935", "0.5312405", "0.53050077", "0.53023326", "0.5290616", "0.5289249", "0.5282511", "0.52816314", "0.5274828", "0.52719116", "0.5269442", "0.52682644", "0.52640384", "0.5260679", "0.52597535", "0.523272", "0.52299976", "0.5229386", "0.52268225", "0.5218583", "0.5210693", "0.52007097", "0.5197219", "0.5192966", "0.5189703", "0.518023", "0.5174094", "0.5169375", "0.51687825", "0.51635283", "0.51581496", "0.5157825", "0.5150106", "0.51491606", "0.51427543", "0.51419866", "0.5140266", "0.5138553", "0.51368755", "0.5130553", "0.5128236" ]
0.0
-1
The system calls this only when creating the layout in a dialog.
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { // The only reason you might override this method when using onCreateView() is // to modify any dialog characteristics. For example, the dialog includes a // title by default, but your custom layout might not need it. So here you can // remove the dialog title, but you must call the superclass to get the Dialog. Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); return dialog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "@Override\n public void layout() {\n // TODO: not implemented\n }", "protected void createDialogSize ()\n {\n }", "private void layout() {\n\n\n _abortButton= makeAbortButton();\n _abortButton.addStyleName(\"download-group-abort\");\n _content.addStyleName(\"download-group-content\");\n _detailUI= new DetailUIInfo[getPartCount(_monItem)];\n layoutDetails();\n }", "public void requestLargeLayout() {\n Dialog dialog = getDialog();\n if (dialog == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout dialog has not init yet!\");\n return;\n }\n Window window = dialog.getWindow();\n if (window == null) {\n Log.w(getClass().getSimpleName(), \"requestLargeLayout window has not init yet!\");\n return;\n }\n FragmentActivity activity = getActivity();\n if (activity != null) {\n float displayWidthInDip = UIUtil.getDisplayWidthInDip(activity);\n float displayHeightInDip = UIUtil.getDisplayHeightInDip(activity);\n int dimensionPixelSize = getResources().getDimensionPixelSize(C4558R.dimen.annotate_dialog_min_width);\n if (displayWidthInDip < displayHeightInDip) {\n displayHeightInDip = displayWidthInDip;\n }\n if (displayHeightInDip < ((float) dimensionPixelSize)) {\n window.setLayout(dimensionPixelSize, -1);\n }\n }\n }", "@Override\n public void onResume() {\n int width = ConstraintLayout.LayoutParams.MATCH_PARENT;\n int height = ConstraintLayout.LayoutParams.WRAP_CONTENT;\n getDialog().getWindow().setLayout(width, height);\n\n super.onResume();\n }", "protected void onLoadLayout(View view) {\n }", "@Override\n public void setLayout(Layout layout) {\n checkWidget();\n return;\n }", "public abstract int presentViewLayout();", "public void setupLayout() {\n // left empty for subclass to override\n }", "@Override\r\n\t protected void onPrepareDialog(int id, Dialog dialog) {\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t \tdialog.setTitle(\"Job Details\");\r\n\t \tButton myButton = new Button(this);\r\n\t \tmyButton.setText(\"Cancel\");\r\n\t \tmyButton.setBackgroundColor(Color.parseColor(\"#ff4c67\"));\r\n\t \tmyButton.setTextColor(Color.parseColor(\"#ffffff\"));\r\n\t \tRelativeLayout datlis = (RelativeLayout)screenDialog.findViewById(R.id.datalist01);\r\n\t \tLayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\r\n\t \tlp.addRule(RelativeLayout.BELOW, list.getId());\r\n\t \tdatlis.addView(myButton, lp);\r\n\t \tmyButton.setOnClickListener(dismissscreen);\r\n\t \t\r\n\t break;\r\n\t }\r\n\t }", "protected abstract void iniciarLayout();", "@Override\n\tpublic void onFinishLayout(View lay) {\n\t}", "private void initDialog() {\n }", "protected LayoutManager createLayout() {\n return new SpinnerLayout(); }", "private void initDialogLayout(){\r\n\t\tsetContentView(R.layout.media);\r\n\t\tsetTitle(\"Media Option...\");\r\n\r\n\t\t//Assign the controls\r\n\t\tbtn_txt = (Button)findViewById(R.id.btn_txt);\r\n\t\t//Set text\r\n\t\tbtn_image = (Button)findViewById(R.id.btn_image);\r\n\r\n\t\tbtn_audio = (Button)findViewById(R.id.btn_audio);\r\n\t\t//btn_vedio = (Button)findViewById(R.id.btn_video);\r\n\t\tbtn_cancel = (Button)findViewById(R.id.btn_cancel);\r\n\r\n\t\tbtn_txt.setOnClickListener(this);\r\n\t\tbtn_image.setOnClickListener(this);\r\n\t\tbtn_audio.setOnClickListener(this);\r\n\t\t//btn_vedio.setOnClickListener(this);\r\n\t\tbtn_cancel.setOnClickListener(this);\r\n\t\t \r\n\t\t}", "@Override\r\n \tprotected Dialog onCreateDialog(int id) {\n \t\tDialog dialog;\r\n \t\tswitch (id) {\r\n \t\t\tcase DIALOG_LOCATION_HISTORY:\r\n \t\t\t\t//logically, this cannot appear before the location layout is updated, so there is no \r\n \t\t\t\t//chance historyLayout can be null, except you are doing something wrong\r\n \t\t\t\tdialog = new Dialog(this);\r\n \t\t\t\tdialog.setTitle(\"Location History\");\r\n \t\t\t\tdialog.setContentView(detachedHistoryLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\t\t\r\n \t\t\tcase DIALOG_LOCATION:\r\n \t\t\t\tlocationLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t\t(R.layout.manual_location_dialog, null);\r\n \t\t\t\tdetachedHistoryLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t(R.layout.manual_location_history_dialog, null);\r\n \t\t\t\t\r\n \t\t\t\tfinal LinearLayout historyLayout = (LinearLayout) detachedHistoryLayout.findViewById(R.id.historyLayout); \r\n \t\t\t\t\r\n \t\t\t\tfinal TextView currentLocation = (TextView) locationLayout.findViewById(R.id.locationText);\r\n \t\t\t\tif (MyApplication.currentLocation != null)\r\n \t\t\t\t{\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Your last updated location is \" + '\\n' + \r\n \t\t\t\t\t\t\t\tMyApplication.currentLocation.getString(\"name\") + \" within approx. \" \r\n \t\t\t\t\t\t\t\t+ MyApplication.currentLocation.getString(\"accuracy\"));\r\n \t\t\t\t\t} catch (JSONException e) {\r\n \t\t\t\t\t\te.printStackTrace();\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Cannot get your current location.\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\tfinal RelativeLayout showHistoryLayout = (RelativeLayout) locationLayout.findViewById(R.id.showHistoryLayout);\r\n \t\t\t\tshowHistoryLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tshowDialog(Page.DIALOG_LOCATION_HISTORY);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\r\n \t\t\t\tRelativeLayout autoLocLayout = (RelativeLayout) locationLayout.findViewById(R.id.autoLocLayout);\r\n \t\t\t\tautoLocLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tLocationTracker.autoLoc = true;\r\n \t\t\t\t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\t\te.printStackTrace();\r\n \t\t\t\t\t\t\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try again later\", \r\n \t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\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\r\n \t\t\t\tfinal EditText manualLocationField = (EditText) locationLayout.findViewById(R.id.manualLocationField);\r\n \t\t\t\tmanualLocationField.setOnKeyListener(new OnKeyListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\r\n \t\t\t\t\t\tif (event.getAction() == KeyEvent.ACTION_DOWN)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\tswitch (keyCode) {\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_ENTER:\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_DPAD_CENTER:\r\n \t\t\t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t\t\treturn true;\r\n \t\t\t\t\t\t\tdefault:\r\n \t\t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\treturn false;\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tButton setLocation = (Button) locationLayout.findViewById(R.id.setLocationButton);\r\n \t\t\t\tsetLocation.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\t\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try \" +\r\n \t\t\t\t\t\t\t\t\t\"again later\", Toast.LENGTH_SHORT).show();\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\r\n \t\t\t\tdialog = new LocationDialog(this);\r\n \t\t\t\tdialog.setTitle(\"Update your location\");\r\n \t\t\t\tdialog.setContentView(locationLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\tdefault:\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t\treturn super.onCreateDialog(id);\r\n \t}", "public Dialog setLayout(int layout) {\n this.setContentView(layout);\n txtclose = (TextView) this.findViewById(R.id.dialog_close);\n txtclose.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n }\n });\n\n this.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n getOwnerActivity().finish();\n }\n });\n\n this.setCanceledOnTouchOutside(false);\n this.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n return this;\n }", "private void progressLayoutHandler() {\n layoutProgress = (LinearLayout) findViewById(R.id.layoutProgress);\n\n layoutProgress.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(context);\n bottomSheetDialog.setCancelable(true);\n bottomSheetDialog.setCanceledOnTouchOutside(true);\n bottomSheetDialog.setContentView(getProgressView(bottomSheetDialog));\n bottomSheetDialog.show();\n }\n });\n }", "@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }", "private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }", "public void initLayouts() {\n\t\tJPanel p_header = (JPanel) getComponentByName(\"p_header\");\n\t\tJPanel p_container = (JPanel) getComponentByName(\"p_container\");\n\t\tJPanel p_tree = (JPanel) getComponentByName(\"p_tree\");\n\t\tJPanel p_commands = (JPanel) getComponentByName(\"p_commands\");\n\t\tJPanel p_execute = (JPanel) getComponentByName(\"p_execute\");\n\t\tJPanel p_buttons = (JPanel) getComponentByName(\"p_buttons\");\n\t\tJPanel p_view = (JPanel) getComponentByName(\"p_view\");\n\t\tJPanel p_info = (JPanel) getComponentByName(\"p_info\");\n\t\tJPanel p_chooseFile = (JPanel) getComponentByName(\"p_chooseFile\");\n\t\tJButton bt_apply = (JButton) getComponentByName(\"bt_apply\");\n\t\tJButton bt_revert = (JButton) getComponentByName(\"bt_revert\");\n\t\tJTextArea ta_header = (JTextArea) getComponentByName(\"ta_header\");\n\t\tJLabel lb_icon = (JLabel) getComponentByName(\"lb_icon\");\n\t\tJLabel lb_name = (JLabel) getComponentByName(\"lb_name\");\n\t\tJTextField tf_name = (JTextField) getComponentByName(\"tf_name\");\n\n\t\tBorder etched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);\n\n\t\tp_header.setBorder(etched);\n\t\tp_container.setBorder(etched);\n\t\tp_commands.setBorder(etched);\n\t\t// p_execute.setBorder(etched);\n\t\t// p_view.setBorder(etched);\n\t\t// p_buttons.setBorder(etched);\n\n\t\tp_buttons.setLayout(new FlowLayout(FlowLayout.LEFT, 25, 2));\n\t\tp_chooseFile.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 1));\n\t\tp_view.setLayout(new BorderLayout(0, 0));\n\t\tp_info.setLayout(null);\n\n\t\t// GroupLayout for main JFrame\n\t\t// If you want to change this, use something like netbeans or read more\n\t\t// into group layouts\n\t\tGroupLayout groupLayout = new GroupLayout(getContentPane());\n\t\tgroupLayout\n\t\t\t\t.setHorizontalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\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\tAlignment.LEADING)\n\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\tgroupLayout\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_commands,\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\t225,\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\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\tgroupLayout\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.LEADING)\n\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\tp_execute,\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\t957,\n\t\t\t\t\t\t\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\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\tp_container,\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\t957,\n\t\t\t\t\t\t\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_header,\n\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\t1188,\n\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.addContainerGap()));\n\t\tgroupLayout\n\t\t\t\t.setVerticalGroup(groupLayout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgroupLayout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_header,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, 57,\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\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\tAlignment.LEADING)\n\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\tp_commands,\n\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\t603,\n\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.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroupLayout\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_container,\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\t549,\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\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\tp_execute,\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\t48,\n\t\t\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.addContainerGap()));\n\n\t\tGroupLayout gl_p_container = new GroupLayout(p_container);\n\t\tgl_p_container\n\t\t\t\t.setHorizontalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\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\tAlignment.LEADING)\n\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\tp_view,\n\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\t955,\n\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.addGroup(\n\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\tgl_p_container\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt_apply)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\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\tbt_revert))\n\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\tgl_p_container\n\t\t\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\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlb_name)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\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\ttf_name,\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\t893,\n\t\t\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.addContainerGap()));\n\t\tgl_p_container\n\t\t\t\t.setVerticalGroup(gl_p_container\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_container\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\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\tAlignment.BASELINE)\n\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\ttf_name,\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\t\tGroupLayout.DEFAULT_SIZE,\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.addComponent(lb_name))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addComponent(p_view,\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\t\t466, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\tComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_container\n\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\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_revert)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(bt_apply))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(\n\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\tShort.MAX_VALUE)));\n\t\tp_container.setLayout(gl_p_container);\n\n\t\t// GroupLayout for p_header\n\n\t\tGroupLayout gl_p_header = new GroupLayout(p_header);\n\t\tgl_p_header.setHorizontalGroup(gl_p_header.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tAlignment.TRAILING,\n\t\t\t\tgl_p_header\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(ta_header, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t1069, Short.MAX_VALUE).addGap(18)\n\t\t\t\t\t\t.addComponent(lb_icon).addGap(4)));\n\t\tgl_p_header\n\t\t\t\t.setVerticalGroup(gl_p_header\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_header\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_header\n\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\tAlignment.BASELINE)\n\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\tta_header,\n\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\t44,\n\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.addComponent(lb_icon))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tp_header.setLayout(gl_p_header);\n\n\t\tGroupLayout gl_p_commands = new GroupLayout(p_commands);\n\t\tgl_p_commands\n\t\t\t\t.setHorizontalGroup(gl_p_commands\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_p_commands\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_p_commands\n\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\tAlignment.LEADING)\n\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\tp_tree,\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\t\t211,\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tp_buttons,\n\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\tGroupLayout.DEFAULT_SIZE,\n\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.addContainerGap()));\n\t\tgl_p_commands.setVerticalGroup(gl_p_commands.createParallelGroup(\n\t\t\t\tAlignment.LEADING).addGroup(\n\t\t\t\tgl_p_commands\n\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(p_buttons, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.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(p_tree, GroupLayout.DEFAULT_SIZE, 558,\n\t\t\t\t\t\t\t\tShort.MAX_VALUE).addContainerGap()));\n\t\tp_commands.setLayout(gl_p_commands);\n\n\t\tgetContentPane().setLayout(groupLayout);\n\t}", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){\n View layout = inflater.inflate(R.layout.setup_chatroom_dialog, container, false);\n Button setupButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_setup_button);\n Button cancelButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_cancel_button);\n editText = (EditText)layout.findViewById(R.id.setup_chatRoom_dialog_edit_text);\n setupButton.setOnClickListener(setupListener);\n cancelButton.setOnClickListener(cancelListener);\n return layout;\n }", "public abstract View getMainDialogContainer();", "private void defineLayout(IPageLayout layout) {\n String editorArea = layout.getEditorArea();\r\n\r\n IFolderLayout folder;\r\n\r\n // Place remote system view to left of editor area.\r\n folder = layout.createFolder(NAV_FOLDER_ID, IPageLayout.LEFT, 0.2F, editorArea);\r\n folder.addView(getRemoveSystemsViewID());\r\n\r\n // Place properties view below remote system view.\r\n folder = layout.createFolder(PROPS_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, NAV_FOLDER_ID);\r\n folder.addView(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n\r\n // Place job log explorer view below editor area.\r\n folder = layout.createFolder(JOB_LOG_EXPLORER_FOLDER_ID, IPageLayout.BOTTOM, 0.0F, editorArea);\r\n folder.addView(JobLogExplorerView.ID);\r\n\r\n // Place command log view below editor area.\r\n folder = layout.createFolder(CMDLOG_FOLDER_ID, IPageLayout.BOTTOM, 0.75F, JobLogExplorerView.ID);\r\n folder.addView(getCommandLogViewID());\r\n\r\n layout.addShowViewShortcut(getRemoveSystemsViewID());\r\n layout.addShowViewShortcut(\"org.eclipse.ui.views.PropertySheet\"); //$NON-NLS-1$\r\n layout.addShowViewShortcut(getCommandLogViewID());\r\n\r\n layout.addPerspectiveShortcut(ID);\r\n\r\n layout.setEditorAreaVisible(false);\r\n }", "private void InitUI() \n\t{\n\n\t\tRelativeLayout rel_abt = (RelativeLayout) rootView.findViewById(R.id.rel_abt);\n\t\tRelativeLayout rel_chgpass = (RelativeLayout) rootView.findViewById(R.id.rel_chgpass);\n\t\tRelativeLayout rel_tc = (RelativeLayout) rootView.findViewById(R.id.rel_tc);\n\t\tRelativeLayout rel_pp = (RelativeLayout) rootView.findViewById(R.id.rel_pp);\n\n\t\trel_abt.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\n\t\trel_chgpass.setOnClickListener(new OnClickListener() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\n\t\t\t\n\t\t\t\tshowdialog();\n\n\t\t\t}\n\t\t});\n\n\t\trel_tc.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\n\t\trel_pp.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t/*\n\t\t\t\tFragment fragment = new PrivacyPolicy();\n\t\t\t\tFragmentManager fmanager = getActivity().getSupportFragmentManager();\n\t\t\t\tFragmentTransaction ftans = fmanager.beginTransaction();\n\t\t\t\tftans.replace(R.id.frame_container, fragment);\n\t\t\t\tftans.commit();\n*/\n\t\t\t}\n\t\t});\n\n\t}", "public void createInitialLayout(IPageLayout layout) {\n \n\t}", "private void setLayout() {\n\tHorizontalLayout main = new HorizontalLayout();\n\tmain.setMargin(true);\n\tmain.setSpacing(true);\n\n\t// vertically divide the right area\n\tVerticalLayout left = new VerticalLayout();\n\tleft.setSpacing(true);\n\tmain.addComponent(left);\n\n\tleft.addComponent(openProdManager);\n\topenProdManager.addListener(new Button.ClickListener() {\n\t public void buttonClick(ClickEvent event) {\n\t\tCustomerWindow productManagerWin = new CustomerWindow(CollectorManagerApplication.this);\n\t\tproductManagerWin.addListener(new Window.CloseListener() {\n\t\t public void windowClose(CloseEvent e) {\n\t\t\topenProdManager.setEnabled(true);\n\t\t }\n\t\t});\n\n\t\tCollectorManagerApplication.this.getMainWindow().addWindow(productManagerWin);\n\t\topenProdManager.setEnabled(false);\n\t }\n\t});\n\n\t\n\tsetMainWindow(new Window(\"Sistema de Cobranzas\", main));\n\n }", "public abstract void initDialog();", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setTitle(\"Add Participant...\");\n builder.setMessage(\"Participant address:\");\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setLayoutParams(lp);\n builder.setView(input); // uncomment this line\n\n\n builder.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogAdd(input.getText().toString());\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogCancel();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\tBundle savedInstanceState) {\n\n\t\t\tView rootView = inflater.inflate(R.layout.status_update_layout, container,\n\t\t\t\t\tfalse);\n\t\t\tgetDialog().getWindow().setBackgroundDrawableResource(android.R.color.white);\n\t\t\tgetDialog().setTitle(\"Post Status Update\"); \n\n\t\t\tstatusLayoutHandle(rootView);\n\n\t\t\treturn rootView;\n\t\t}", "public ReorganizeDialog() { }", "public boolean requiresLayout() {\n return false;\n }", "public boolean requiresLayout() {\n return false;\n }", "public boolean requiresLayout() {\n return true;\n }", "public abstract void doLayout();", "@Override\r\n\tprotected int layoutId() {\n\t\treturn R.layout.mine_new_huankuan;\r\n\t}", "public BaseDialog create()\n {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // instantiate the dialog with the custom Theme\n final BaseDialog dialog = new BaseDialog(context, R.style.Dialog);\n\n View layout = inflater.inflate(R.layout.view_shared_basedialog, null);\n\n //set the dialog's image\n this.icon = (ImageView) layout.findViewById(R.id.view_shared_basedialog_icon);\n\n if (this.imageResource > 0 || this.imageUrl != null)\n {\n this.icon.setVisibility(View.VISIBLE);\n if (this.imageResource > 0)\n {\n this.icon.setBackgroundResource(this.imageResource);\n }\n else\n {\n// TextureRender.getInstance().setBitmap(this.imageUrl, this.icon, R.drawable.no_data_error_image);\n }\n }\n else\n {\n this.icon.setVisibility(View.GONE);\n }\n\n // set check box's text and default value\n this.checkLayout = layout.findViewById(R.id.view_shared_basedialog_checkbox_layout);\n this.checkBox = (CheckBox) layout.findViewById(R.id.view_shared_basedialog_checkbox);\n this.checkBoxTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_checkbox_text);\n\n if (!TextUtils.isEmpty(this.checkBoxText))\n {\n this.checkLayout.setVisibility(View.VISIBLE);\n this.checkBoxTextView.setText(this.checkBoxText);\n this.checkBox.setChecked(checkBoxDefaultState);\n }\n else\n {\n this.checkLayout.setVisibility(View.GONE);\n }\n\n // set the dialog main title and sub title\n this.maintitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_maintitle_textview);\n this.subtitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_subtitle_textview);\n this.titleDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_titledivide_textview);\n if (!TextUtils.isEmpty(title1))\n {\n this.maintitleTextView.setText(title1);\n if (this.title1BoldAndBig)\n {\n this.maintitleTextView.setTypeface(null, Typeface.BOLD);\n this.maintitleTextView.setTextSize(17);\n }\n\n this.maintitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.maintitleTextView.setVisibility(View.GONE);\n }\n\n if (!TextUtils.isEmpty(title2))\n {\n this.subtitleTextView.setText(title2);\n this.subtitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.subtitleTextView.setVisibility(View.GONE);\n }\n this.titleDivideTextView.setVisibility(View.GONE);\n\n // set the confirm button\n this.positiveButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_positivebutton));\n if (!TextUtils.isEmpty(positiveButtonText))\n {\n this.positiveButton.setText(positiveButtonText);\n this.positiveButton.setVisibility(View.VISIBLE);\n if (positiveButtonClickListener != null)\n {\n this.positiveButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n positiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n if (checkBox.isChecked()&&onCheckBoxListener!=null)\n {\n onCheckBoxListener.checkedOperation();\n }\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.positiveButton.setVisibility(View.GONE);\n }\n\n // set the cancel button\n this.negativeButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_negativebutton));\n if (!TextUtils.isEmpty(negativeButtonText))\n {\n this.negativeButton.setText(negativeButtonText);\n this.negativeButton.setVisibility(View.VISIBLE);\n if (negativeButtonClickListener != null)\n {\n this.negativeButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n negativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.negativeButton.setVisibility(View.GONE);\n }\n\n // set button's background\n this.buttonDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_buttondivide_textview);\n if (!TextUtils.isEmpty(negativeButtonText) && !TextUtils.isEmpty(negativeButtonText))\n {\n this.buttonDivideTextView.setVisibility(View.VISIBLE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_rightbottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_leftbottom);\n }\n else\n {\n this.buttonDivideTextView.setVisibility(View.GONE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n }\n\n // set the content message\n this.contentLayout = layout.findViewById(R.id.view_shared_basedialog_content_layout);\n if (!TextUtils.isEmpty(message))\n {\n this.contentTextView = ((TextView) layout.findViewById(R.id.view_shared_basedialog_content_textview));\n this.contentTextView.setText(message);\n this.contentTextView.setMovementMethod(ScrollingMovementMethod.getInstance());\n }\n else if (contentView != null)\n {\n // if no message set\n // add the contentView to the dialog body\n ((ViewGroup) this.contentLayout).removeAllViews();\n ((ViewGroup) this.contentLayout).addView(contentView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n }\n else\n {\n this.contentLayout.setVisibility(View.GONE);\n }\n\n int[] params = Utils.getLayoutParamsForHeroImage();\n dialog.setContentView(layout, new ViewGroup.LayoutParams(params[0]*4/5, ViewGroup.LayoutParams.MATCH_PARENT));\n return dialog;\n }", "@Override\r\n\tprotected void setLayout() {\n\t\tsetContentView(R.layout.edit_trace_info_activity);\r\n\t}", "private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "private void setLayout() {\n\t\ttxtNickname.setId(\"txtNickname\");\n\t\ttxtPort.setId(\"txtPort\");\n\t\ttxtAdress.setId(\"txtAdress\");\n\t\tlblNickTaken.setId(\"lblNickTaken\");\n\n\t\tgrid.setPrefSize(516, 200);\n\t\tbtnLogin.setDisable(true);\n\t\ttxtNickname.setPrefSize(200, 25);\n\t\tlblNickTaken.setPrefSize(250, 10);\n\t\tlblNickTaken.setText(null);\n\t\tlblNickTaken.setTextFill(Color.RED);\n\t\tlblNick.setPrefSize(120, 50);\n\t\ttxtAdress.setText(\"localhost\");\n\t\ttxtPort.setText(\"4455\");\n\t\tlblCardDesign.setPrefSize(175, 25);\n\t\tcomboBoxCardDesign.getSelectionModel().select(0);\n\t\tbtnLogin.setGraphic(imvStart);\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.notepad_main, container, false);\r\n\t\tbody=(LineEditText) v.findViewById(R.id.body);\r\n\t\tdel=(Button) v.findViewById(R.id.delAll);\r\n\t\tdel.setOnClickListener(this);\r\n\t\treturn v;\r\n\t}", "private void inflateView() {\n\t\tLog.v(T, \"inflateView\");\n\t\tif (!isInEditMode()) {\n\t\t\tString inflaterService = Context.LAYOUT_INFLATER_SERVICE;\n\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) getContext()\n\t\t\t\t\t.getSystemService(inflaterService);\n\t\t\tlayoutInflater.inflate(R.layout.dms_coordinate, this, true);\n\n\t\t\t// Get child control references\n\t\t\teditDegrees = (EditText) findViewById(R.id.editDegrees);\n\t\t\teditMinutes = (EditText) findViewById(R.id.editMinutes);\n\t\t\teditSeconds = (EditText) findViewById(R.id.editSeconds);\n\t\t}\n\t}", "private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"100%\");\r\n\t\tmainLayout.setMargin(false);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tmainLayout.setWidth(\"100.0%\");\r\n\t\tmainLayout.setHeight(\"100.0%\");\r\n\t\t\r\n\t\t// label\r\n\t\tlabel = new Label();\r\n\t\tlabel.setImmediate(false);\r\n\t\tlabel.setWidth(\"-1px\");\r\n\t\tlabel.setHeight(\"-1px\");\r\n\t\tlabel.setValue(\"Stellvertreter ernennen\");\r\n\t\tlabel.setStyleName(Runo.LABEL_H1);\r\n\t\tmainLayout.addComponent(label, \"top:25.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// benutzer\r\n\t\tbenutzer = new ListSelect();\r\n\t\tbenutzer.setImmediate(false);\r\n\t\tbenutzer.setWidth(\"46.0%\");\r\n\t\tbenutzer.setHeight(\"70.0%\");\r\n\t\tmainLayout.addComponent(benutzer, \"top:35.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// ok\r\n\t\tok = new Button();\r\n\t\tok.setCaption(\"Stellvertreter ernennen\");\r\n\t\tok.setImmediate(false);\r\n\t\tok.setWidth(\"25%\");\r\n\t\tok.setHeight(\"-1px\");\r\n\t\tok.addListener(this);\r\n\t\tmainLayout.addComponent(ok, \"top:83.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// delete\r\n\t\tdelete = new Button();\r\n\t\tdelete.setCaption(\"Stellvertreter löschen\");\r\n\t\tdelete.setImmediate(false);\r\n\t\tdelete.setWidth(\"25%\");\r\n\t\tdelete.setHeight(\"-1px\");\r\n\t\tdelete.addListener(this);\r\n\t\tmainLayout.addComponent(delete, \"top:88.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// logout\r\n\t\tlogout = new Button();\r\n\t\tlogout.setCaption(\"logout\");\r\n\t\tlogout.setImmediate(false);\r\n\t\tlogout.setWidth(\"-1px\");\r\n\t\tlogout.setHeight(\"-1px\");\r\n\t\tlogout.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tlogout.addListener(this);\r\n\t\tmainLayout.addComponent(logout, \"top:97.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// back\r\n\t\tback = new Button();\r\n\t\tback.setCaption(\"Startseite\");\r\n\t\tback.setImmediate(true);\r\n\t\tback.setWidth(\"-1px\");\r\n\t\tback.setHeight(\"-1px\");\r\n\t\tback.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tback.addListener(this);\r\n\t\tmainLayout.addComponent(back, \"top:94.0%;left:35.0%;\");\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "private void createLayout() {\n\t\t\n\t\tmenu = new JMenuBar();\n\t\tfile = new JMenu(\"Arquivo\");\n\t\tedit = new JMenu(\"Editar\");\n\t\tmenu.add(file);\n\t\tmenu.add(edit);\n\n\t\tnewfile = new JMenuItem(\"Novo\");\n\t\tnewfile.addActionListener(new NewFileListener());\n\t\tfile.add(newfile);\n\t\t\n\t\tcopy = new JMenuItem(\"Copiar\");\n\t\tcopy.addActionListener(new CopyListener());\n\t\tedit.add(copy);\n\t\t\n\t\tcut = new JMenuItem(\"Cortar\");\n\t\tcut.addActionListener(new CutListener());\n\t\tedit.add(cut);\n\t\t\n\t\tpaste = new JMenuItem(\"Colar\");\n\t\tpaste.addActionListener(new PasteListener());\n\t\tedit.add(paste);\n\n \n edit.add(undoAction);\n edit.add(redoAction);\n \n \t\topen = new JMenuItem(\"Abrir\");\n\t\topen.addActionListener(new OpenFileListener());\n\t\tfile.add(open);\n\n\t\texit = new JMenuItem(\"Sair\");\n\t\texit.addActionListener(new ExitFileListener());\n\t\tfile.add(exit);\n\t\tframe.setJMenuBar(menu);\n\t\t\n\t\tcaret = new DefaultCaret();\n\t\tarea = new JTextArea(25, 65);\n\t\tarea.setLineWrap(true);\n\t\tarea.setText(documentText);\n\t\tarea.setWrapStyleWord(true);\n\t\t\n\t\t\n\t\tarea.setCaret(caret);\n\t\tdocumentListener = new TextDocumentListener();\n\t\tarea.getDocument().addDocumentListener(documentListener); \n\t\t\n area.getDocument().addUndoableEditListener(new UndoListener());\n \n\t\tscrollpane = new JScrollPane(area);\n\t\tscrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n\t\tGroupLayout layout = new GroupLayout(this);\n\t\tsetLayout(layout);\n\t\tlayout.setAutoCreateGaps(true);\n\t\tlayout.setAutoCreateContainerGaps(true);\n\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup()\n\t\t\t\t.addComponent(documentNameLabel)\n\t\t\t\t.addComponent(scrollpane));\n\t\tlayout.setVerticalGroup(layout.createSequentialGroup()\n\t\t\t\t.addComponent(documentNameLabel)\n\t\t\t\t.addComponent(scrollpane));\n\t}", "private void initial() {\n\t\tsetTitleTxt(getString(R.string.choose_game));\n\t\tLinearLayout contentView = (LinearLayout) findViewById(R.id.contentView);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tview = View.inflate(this, R.layout.user_choose_game, null);\n\t\tcontentView.addView(view, params);\n\t\tgameGrid = (GridView) view.findViewById(R.id.game_list);\n\t\tgameContent = (LinearLayout) view.findViewById(R.id.game_list_info);\n\t\tview.setVisibility(View.GONE);\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "public void setup() {\n self.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n // make dialog background unselectable\n self.setCanceledOnTouchOutside(false);\n }", "protected abstract JDialog createDialog();", "public void initPopupLayout() {\n popup = new BackToMainScreenPopup(this.getContext(), getActivity());\n popup.showPopupWindow();\n }", "@Override\n public void onGlobalLayout() {\n //on all of the container area create a rectangle off same height and width\n Rect r = new Rect();\n //put the size of the layout to the rectangle\n loginActivity.getWindowVisibleDisplayFrame(r);\n //check if the rectangle height shrinks like when keyboard launches\n //for than check on the difference between regular container's height and\n //actual container's\n int heightDiff = loginActivity.getRootView().getHeight() - (r.bottom - r.top);\n if (login != null && password != null) {\n // if more than 100 pixels, its probably a keyboard...\n if (heightDiff > 100) {\n //then set cursor visible for login and password\n login.setCursorVisible(true);\n password.setCursorVisible(true);\n } else {\n //else set both cursors invisible\n //cursor will appear when item is selected only\n //so when keyboard launches\n login.setCursorVisible(false);\n password.setCursorVisible(false);\n }\n }\n }", "public void finishLayout() {\n\t\tsetTypeState(ir_type_state.layout_fixed);\n\t}", "@Override // com.oculus.panelapp.assistant.dialogs.AssistantDialog\n public View onCreateView(Context context) {\n return LayoutInflater.from(context).inflate(R.layout.system_dialog, (ViewGroup) null, false);\n }", "private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }", "private void setDialog()\n {\n //this.setSize(350,500);\n this.setTitle(Constant.getTextBundle(\"ปฏิกิริยาต่อกัน\"));\n Toolkit thekit = this.getToolkit(); \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation((screenSize.width-this.getSize().width)/2, (screenSize.height-this.getSize().height)/2);\n }", "private void initLayout(){\r\n\t\t\r\n\t\tlabelSalvar.setLayoutX(((pane.getWidth() - labelSalvar.getWidth()) / 2) - 332);\r\n\t\tlabelSalvar.setLayoutY(60);\r\n\t\ttxSalvar.setLayoutX(((pane.getWidth() - txSalvar.getWidth()) / 2) - 100);\r\n\t\ttxSalvar.setPrefWidth(500);\r\n\t\ttxSalvar.setLayoutY(60);\r\n\t\t\r\n\t\tlabelArquivoRTF.setLayoutX(((pane.getWidth() - labelArquivoRTF.getWidth()) / 2) - 325);\r\n\t\tlabelArquivoRTF.setLayoutY(100);\r\n\t\ttxArquivoRTF.setLayoutX(((pane.getWidth() - txArquivoRTF.getWidth()) / 2) - 100);\r\n\t\ttxArquivoRTF.setPrefWidth(500);\r\n\t\ttxArquivoRTF.setLayoutY(100);\r\n\t\t\r\n\t\tlabelLinhaInicio.setLayoutX(((pane.getWidth() - labelLinhaInicio.getWidth()) / 2) - 145);\r\n\t\tlabelLinhaInicio.setLayoutY(140);\r\n\t\ttxLinhaInicio.setLayoutX(((pane.getWidth() - txArquivoRTF.getWidth()) / 2) - 10);\r\n\t\ttxLinhaInicio.setPrefWidth(50);\r\n\t\ttxLinhaInicio.setLayoutY(140);\r\n\t\t\r\n\t\tlabelLinhaFim.setLayoutX(((pane.getWidth() - labelLinhaFim.getWidth()) / 2) + 220);\r\n\t\tlabelLinhaFim.setLayoutY(140);\r\n\t\ttxLinhaFinal.setLayoutX(((pane.getWidth() - txLinhaFinal.getWidth()) / 2) + 350);\r\n\t\ttxLinhaFinal.setPrefWidth(50);\r\n\t\ttxLinhaFinal.setLayoutY(140);\r\n\t\t\r\n\t\tbtnExecutar.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) + 80);\r\n\t\tbtnExecutar.setLayoutY(210);\r\n\t\t\r\n\t\tprogressBar.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) + 260);\r\n\t\tprogressBar.setLayoutY(280);\r\n\t\t\r\n\t\tlabelBy.setLayoutX(((pane.getWidth() - btnExecutar.getWidth()) / 2) - 350);\r\n\t\tlabelBy.setScaleY(0.5);\r\n\t\tlabelBy.setScaleX(0.5);\r\n\t\tlabelBy.setLayoutY(280);\r\n\t\t\r\n\t}", "private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\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\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}", "public void onDialogConfigButtonClicked(View view) {\n\t\tLinearLayout parent = (LinearLayout) view.getParent().getParent();\n\t\tLinearLayout layout = (LinearLayout) parent.getChildAt(9); // magic\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// number!!\n\t\tif (view.getId() == R.id.button_dialog_config_add_service) {\n\t\t\tView child = getLayoutInflater().inflate(\n\t\t\t\t\tR.layout.dialog_agent_config_service, layout, false);\n\t\t\tEditText et = (EditText) child\n\t\t\t\t\t.findViewById(R.id.editText_dialog_agent_config_service_port);\n\t\t\tet.addTextChangedListener(shortTextWatcher);\n\t\t\tet.setOnFocusChangeListener(shortFocusChangeListener);\n\t\t\tlayout.addView(child);\n\t\t} else {\n\t\t\tint index = layout.getChildCount();\n\t\t\tLog.d(\"qwe\", \"index= \" + index + \" layout\" + layout);\n\t\t\tif (index > 0)\n\t\t\t\tlayout.removeViewAt(index - 1);\n\t\t}\n\t}", "protected abstract void createNestedWidgets();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n this.setContentView(R.layout.dialog_bottom);\n getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);\n }", "public CustomLimitsDialogBuilder setLayout(int layoutId) {\n LayoutInflater inflater = context.getLayoutInflater();\n View dialogView = inflater.inflate(layoutId,\n (ViewGroup) context.findViewById(R.id.dialogRoot));\n dialogView.setPadding(0, 0, 0, 0);\n limitET = (PrefixedEditText) dialogView.findViewById(R.id.editTextLimitValue);\n edtProtein = (PrefixedEditText) dialogView.findViewById(R.id.editTextProtein);\n edtFat = (PrefixedEditText) dialogView.findViewById(R.id.editTextFat);\n edtCarbon = (PrefixedEditText) dialogView.findViewById(R.id.editTextCarbon);\n chkIos = (CheckBox) dialogView.findViewById(R.id.cbLimit);\n tvProtein = (TextView) dialogView.findViewById(R.id.textViewProtein);\n tvFat = (TextView) dialogView.findViewById(R.id.textViewFat);\n tvCarbon = (TextView) dialogView.findViewById(R.id.textViewCarbon);\n\n limitET.setPrefix(context.getString(R.string.kcal) + \":\");\n limitET.addTextChangedListener(textWatcherTotal);\n textWatcherPFC = new TextWatcherWithParameter(limitET, edtProtein, edtFat, edtCarbon);\n edtProtein.addTextChangedListener(textWatcherPFC);\n edtCarbon.addTextChangedListener(textWatcherPFC);\n edtFat.addTextChangedListener(textWatcherPFC);\n\n edtProtein.setPrefix(context.getString(R.string.gram));\n edtFat.setPrefix(context.getString(R.string.gram));\n edtCarbon.setPrefix(context.getString(R.string.gram));\n multiSlider = (MultiSlider) dialogView.findViewById(R.id.range_slider5);\n int limitKkal = SaveUtils.readInt(SaveUtils.LIMIT, Integer.valueOf(SaveUtils.getMETA(context)), context);\n int limitProtein = SaveUtils.readInt(SaveUtils.LIMIT_PROTEIN, 17, context);\n int limitCarbon = SaveUtils.readInt(SaveUtils.LIMIT_CARBON, 67, context);\n int limitFat = SaveUtils.readInt(SaveUtils.LIMIT_FAT, 16, context);\n multiSlider.getThumb(0).setValue(limitProtein);\n multiSlider.getThumb(1).setValue(limitFat + limitProtein);\n\n multiSlider.setOnThumbValueChangeListener(slideListener);\n if (limitKkal > 0) {\n limitET.setText(String.valueOf(limitKkal));\n castomLimitLayout = (LinearLayout) dialogView.findViewById(R.id.linearLayoutCastomLimit);\n castomLimitLayoutBSU = (LinearLayout) dialogView.findViewById(R.id.linearLayoutCastomLimitBSU);\n castomLimitLayout.setVisibility(View.VISIBLE);\n castomLimitLayoutBSU.setVisibility(View.VISIBLE);\n multiSlider.setVisibility(View.VISIBLE);\n }\n setView(dialogView);\n return this;\n }", "public Layout() {\n }", "protected abstract void closeLayout( );", "@Override\n public void onGlobalLayout() {\n ll_width.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n WindowManager windowManager = (WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE);\n int left=ll_width.getLeft()*2;\n int width =(windowManager.getDefaultDisplay().getWidth() - left);\n dePatPopWin = new PopupWindow(view, width, LinearLayout.LayoutParams.WRAP_CONTENT);\n dePatPopWin.setFocusable(true);\n dePatPopWin.setOutsideTouchable(true);\n dePatPopWin.setBackgroundDrawable(new BitmapDrawable());\n }", "public void setLayout( final Layout layout ) {\n checkWidget();\n // ignore - CTabFolder manages its own layout\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_dialog_add_hole, container, false);\n butOk = root.findViewById(R.id.butOk);\n butCancelar = root.findViewById(R.id.butCancelar);\n latLng = root.findViewById(R.id.lntLng);\n address = root.findViewById(R.id.ads);\n latLng.setText(latlng);\n address.setText(ad);\n\n butOk.setOnClickListener(this);\n butCancelar.setOnClickListener(this);\n\n return root;\n }", "@Override\r\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\r\n\t\tGridData dGrid = new GridData();\r\n\t\tdGrid.horizontalSpan = 180;\r\n\t\tdGrid.horizontalAlignment = GridData.FILL;\r\n\t\tcontainer.setLayoutData(dGrid);\r\n\t\t\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tnameLabel = new Label(container,SWT.LEFT);\r\n\t\tString labelText = \"Most of the features for SimplifIDE require knowledge of the project structure.\\r\\n\";\r\n\t\tlabelText += \"Currently you are editting a file outside of the project where many features will not work properly.\\r\\n\";\r\n\t\tlabelText += \"Instructions for setting up your project can be found at http://simplifide.com/html2/project_structure/simplifide_structure.htm, or\\r\\n\";\r\n\t\tlabelText += \"for a simple project only containing rtl files at http://simplifide.com/html2/getting_started/simple_suite.htm.\\r\\n\";\r\n\t\tnameLabel.setText(labelText);\r\n\t\t\r\n\t\tthis.ONESHOT = true;\r\n\t\t\r\n\t\treturn container;\r\n\t}", "@Override\n public void setContentView(int layoutResID){\n }", "private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }", "private void init() {\n super.setPersistent(false);\n super.setDialogLayoutResource(R.layout.login_edit);\n }", "public void setViewResource(int layout) {\n/* 114 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void computeNewLayout();", "private void createGroupDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_group_title);\n dialog.setMessage(R.string.add_new_group_description);\n\n View newGroupDialog = getLayoutInflater().inflate(R.layout.new_group_dialog, null);\n dialog.setView(newGroupDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddGroupButtonListener(alertDialog, newGroupDialog);\n\n alertDialog.show();\n }", "private void showLayout(String layout) {\n studentList.setVisibility(View.GONE);\n addTable.setVisibility(View.GONE);\n editTable.setVisibility(View.GONE);\n\n switch(layout) {\n case \"studentList\":\n Student.this.recreate();\n// startActivity(getIntent());\n// studentList.setVisibility(View.VISIBLE);\n// adapter.notifyDataSetChanged();\n break;\n case \"addTable\":\n addTable.setVisibility(View.VISIBLE);\n break;\n case \"editTable\":\n editTable.setVisibility(View.VISIBLE);\n break;\n default:\n Toast.makeText(this, \"Warning: showLayout() layout do not match.\", Toast.LENGTH_SHORT).show();\n break;\n }\n\n\n }", "private void loadLayout(final Context context, AttributeSet attrs, int defStyle)\n\t{\n\t\t\n\t\tLayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView view = inflater.inflate(R.layout.reinstallstart, null);\n\t\tTextView l_infoTxtVw = (TextView)view.findViewById(R.id.startBody);\n\t\taddView(view);\n\t\tl_infoTxtVw.setText(context.getString(org.droidtv.ui.strings.R.string.MAIN_WI_SAT_UPDATE_CHANNELS));\n\t\tOnClickListener buttonCancel_Listener = new OnClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tmSatelliteWizard.launchPreviousScren();\n\t\t\t}\n\t\t};\n\n\t\tOnClickListener buttonSettings_Listener = new OnClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tLog.i(TAG, \"buttonSettings:onClick called\");\n\t\t\t\tmSatelliteWizard.launchScreen(ScreenRequest.SATELLITESELECTION, getScreenName());\n\t\t\t}\n\t\t};\n\n\t\tOnClickListener buttonUpdate_Listener = new OnClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tLog.i(TAG, \"buttonUpdate:onClick called\");\n\t\t\t\tmSatelliteWizard.launchScreen(ScreenRequest.UPDATESCAN, getScreenName());\n\t\t\t}\n\t\t};\n\n\t\tsetButton1(context.getString(org.droidtv.ui.strings.R.string.MAIN_BUTTON_CANCEL), buttonCancel_Listener, View.VISIBLE);\n\t\tsetButton2(context.getString(org.droidtv.ui.strings.R.string.MAIN_BUTTON_SETTINGS), buttonSettings_Listener, View.VISIBLE);\n\t\tsetButton3(context.getString(org.droidtv.ui.strings.R.string.MAIN_BUTTON_UPDATE), buttonUpdate_Listener, View.VISIBLE);\n\t\thideHint();\n\t}", "public void initKnowledgePointPopupLayout() {\n knowledgePointPopup = new FrontGateKnowledgePointPopup(this.getContext());\n knowledgePointPopup.showPopupWindow();\n }", "private VerticalLayout createVerticalLayout(int hCount,int vCount)\r\n {\n\r\n VerticalLayout verticalLayout = new VerticalLayout();\r\n verticalLayout.setSizeFull();\r\n\r\n // verticalLayout.add(button);\r\n verticalLayout.getStyle().set(\"border\",\"3px dashed gray\");\r\n verticalLayout.getStyle().set(\"border-radius\",\"5px\");\r\n //verticalLayout.setDefaultHorizontalComponentAlignment(Alignment.CENTER);\r\n //verticalLayout.setAlignItems(Alignment.CENTER);\r\n verticalLayout.setAlignItems(Alignment.STRETCH);\r\n\r\n SalonDetay salonDetay = new SalonDetay();\r\n\r\n salonDetay.setX(vCount);\r\n salonDetay.setY(hCount);\r\n\r\n Button btnDefine = new Button(\"Buranın ne olduğunu belirle\");\r\n\r\n btnDefine.addClickListener(e->{\r\n Dialog dialog = new Dialog();\r\n\r\n Button btnMasa = new Button(\"Masa\");\r\n btnMasa.addClickListener(ez-> {\r\n Dialog dialog2 = new Dialog();\r\n dialog2.add(new Label(\"Hoşgeldiniz\"));\r\n\r\n List<Integer> integerList = new ArrayList<>();\r\n for (int i = 1; i < 12; i++)\r\n integerList.add(i);\r\n\r\n ComboBox<Integer> comboBox = new ComboBox<>(\"Katılacak Kişi Sayısını Seçiniz\");\r\n comboBox.setItems(integerList);\r\n\r\n dialog2.add(comboBox);\r\n\r\n Button ekleButton = new Button(\"Tamamla\");\r\n\r\n ekleButton.addClickListener(ex -> {\r\n if (comboBox.getValue() == null) {\r\n Notification.show(\"Lütfen kişi sayısını seçiniz\", 1000, Notification.Position.TOP_STRETCH);\r\n return;\r\n }\r\n List<Component> componentList = beSmart(comboBox.getValue());\r\n componentList.forEach(ele -> verticalLayout.add(ele));\r\n dialog2.close();\r\n dialog.close();\r\n verticalLayout.remove(btnDefine);\r\n });\r\n dialog2.add(ekleButton);\r\n dialog2.open();\r\n });\r\n\r\n Button btnKoridor = new Button(\"Koridor\");\r\n btnKoridor.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Koridor\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n Button btnDugun = new Button(\"Düğün Masası\");\r\n btnDugun.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Düğün Masası\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n Button btnSahne = new Button(\"Sahne\");\r\n btnSahne.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Sahne\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n dialog.add(btnMasa,btnKoridor,btnSahne,btnDugun);\r\n dialog.open();\r\n });\r\n\r\n verticalLayout.add(btnDefine);\r\n /*\r\n button.addClickListener(e->{\r\n\r\n verticalLayout.remove(button);\r\n\r\n Dialog dialog = new Dialog();\r\n dialog.add(new Label(\"Hoşgeldiniz\"));\r\n\r\n List<Integer> integerList = new ArrayList<>();\r\n for (int i=1 ;i<12 ; i++)\r\n integerList.add(i);\r\n\r\n ComboBox<Integer> comboBox = new ComboBox<>(\"Katılacak Kişi Sayısını Seçiniz\");\r\n comboBox.setItems(integerList);\r\n\r\n dialog.add(comboBox);\r\n\r\n Button ekleButton = new Button(\"Tamamla\");\r\n\r\n ekleButton.addClickListener(ex->{\r\n if (comboBox.getValue() == null)\r\n {\r\n Notification.show(\"Lütfen kişi sayısını seçiniz\",1000, Notification.Position.TOP_STRETCH);\r\n return;\r\n }\r\n\r\n List<Component> componentList = beSmart(comboBox.getValue());\r\n\r\n componentList.forEach(ele-> verticalLayout.add(ele));\r\n\r\n dialog.close();\r\n });\r\n\r\n\r\n dialog.add(ekleButton);\r\n\r\n dialog.open();\r\n //verticalLayout.setAlignItems(Alignment.STRETCH);\r\n //verticalLayout.add(createPersonButton(\"1\"),createPersonButton(\"2\"),createPersonButton(\"3\"));\r\n\r\n }); */\r\n\r\n return verticalLayout;\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \tsuper.onCreate(savedInstanceState);\n\n \t/* Disabled code for dialog style theme which seems to make text fields almost unusable. */\n// \tDisplayMetrics metrics = new DisplayMetrics();\n//\t\tWindowManager winMan = (WindowManager)getSystemService(Context.WINDOW_SERVICE);\n//\t\twinMan.getDefaultDisplay().getMetrics(metrics);\n//\t\t\n//\t\tint hMargin = (int)(5 * metrics.density);\n//\t\tint vMargin = (int)(29 * metrics.density);\n//\t\t\n// \tgetWindow().setLayout(metrics.widthPixels - hMargin, metrics.heightPixels - vMargin);\n }", "private void showCalendarInDialog(String title, int layoutResId) {\n theDialog = new android.app.AlertDialog.Builder(getContext()) //\n .setTitle(title)\n .setView(dialogView)\n .setNeutralButton(\"Dismiss\", new DialogInterface.OnClickListener() {\n @Override public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n })\n .create();\n theDialog.setOnShowListener(new DialogInterface.OnShowListener() {\n @Override public void onShow(DialogInterface dialogInterface) {\n Log.d(TAG, \"onShow: fix the dimens!\");\n dialogView.fixDialogDimens();\n }\n });\n theDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }", "public void onAttachedToWindow() {\n super.onAttachedToWindow();\n this.mFirstLayout = true;\n }", "private void initPanel() {\r\n panel = new JDialog(mdiForm);\r\n panel.setTitle(\"Groups\");\r\n panel.setSize(325, 290);\r\n panel.getContentPane().add(groupsController.getControlledUI());\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n java.awt.Dimension dlgSize = panel.getSize();\r\n int x = screenSize.width/1 - ((dlgSize.width/1)+20);\r\n int y = screenSize.height/1 - ((dlgSize.height/1)+60);\r\n panel.setLocation(x, y);\r\n panel.setFocusable(false);\r\n panel.show();\r\n panel.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r\n panel.addWindowListener(new java.awt.event.WindowAdapter() {\r\n public void windowClosing(java.awt.event.WindowEvent event) {\r\n panel.dispose();\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n }\r\n });\r\n }", "public Layout() {\n super(\"Chitrashala\");\n initComponents();\n }", "public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void setViews() {\n lv.setAdapter(adapter);\n\n dialog2 = new MiddleDialog2(INSTANCE, getResources().getString(R.string.title), getResources().getString(R.string.value), new MiddleDialog2.onBottonListener() {\n @Override\n public void onOk() {\n\n finish();\n }\n },R.style.registDialog);\n }", "public void initComponents(String alternateLayout)\n {\n // Add the menus\n m_FileMenu = FileMenu.createMenu(this, getDocument(), \"&File\");\n /* m_EditMenu = */edu.umich.soar.debugger.menu.EditMenu.createMenu(\n this, getDocument(), \"&Edit\");\n /* m_PrintMenu = */PrintMenu.createMenu(this, getDocument(), \"&Print\");\n /* m_CommandsMenu = */CommandsMenu.createMenu(this, getDocument(),\n \"&Commands\");\n /* m_DebugLevelMenu = */DebugLevelMenu.createMenu(this, getDocument(),\n \"&Debug Level\");\n /* m_LayoutMenu = */LayoutMenu.createMenu(this, getDocument(),\n \"&Layout\");\n m_AgentMenu = AgentMenu.createMenu(this, getDocument(), \"&Agents\");\n m_KernelMenu = KernelMenu.createMenu(this, getDocument(), \"&Kernel\");\n /* m_HelpMenu = */HelpMenu.createMenu(this, getDocument(), \"&Help\");\n\n getShell().setMenuBar(m_MenuBar);\n\n // Load the alternate layout file first,.\n boolean loaded = alternateLayout != null && loadLayoutFileSpecial(alternateLayout);\n\n // If that failed, load the last known layout\n loaded = loaded || loadUserLayoutFile();\n\n // Install default layout files\n install(new String[] { \"default-layout.dlf\", \"default-text.dlf\" });\n\n // If that failed, load the default layout\n if (!loaded)\n {\n System.out\n .println(\"Failed to load the stored layout, so using default instead\");\n useDefaultLayout();\n }\n\n getShell().addShellListener(new ShellAdapter()\n {\n\n public void shellClosed(ShellEvent e)\n {\n thisWindowClosing();\n }\n });\n\n // Set the initial window size\n boolean max = this.getAppBooleanProperty(\"Window.Max\", true);\n\n if (max)\n {\n // Maximize the window\n getShell().setMaximized(true);\n }\n else\n {\n int width = this.getAppIntegerProperty(\"Window.width\");\n int height = this.getAppIntegerProperty(\"Window.height\");\n int xPos = this.getAppIntegerProperty(\"Window.x\");\n int yPos = this.getAppIntegerProperty(\"Window.y\");\n\n // \"cascade\" effect for multiple windows\n int offset = (m_Document.getNumberFrames() - 1) * 20;\n xPos += offset;\n yPos += offset;\n\n if (width > 0 && width < Integer.MAX_VALUE && height > 0\n && height < Integer.MAX_VALUE)\n getShell().setSize(width, height);\n\n if (xPos >= 0 && xPos < Integer.MAX_VALUE && yPos > 0\n && yPos != Integer.MAX_VALUE)\n getShell().setLocation(xPos, yPos);\n }\n\n // Try to load the user's font preference\n String fontName = this.getAppStringProperty(\"TextFont.Name\");\n int fontSize = this.getAppIntegerProperty(\"TextFont.Size\");\n int fontStyle = this.getAppIntegerProperty(\"TextFont.Style\");\n\n if (fontName != null && fontName.length() > 0\n && fontSize != Integer.MAX_VALUE && fontSize > 0\n && fontStyle != Integer.MAX_VALUE && fontStyle >= 0)\n {\n setTextFont(new FontData(fontName, fontSize, fontStyle));\n }\n else\n {\n setTextFont(kDefaultFontData);\n }\n\n // Make sure our menus are enabled correctly\n updateMenus();\n updateTitle();\n }", "@JsOverlay\n public final void layout() {\n Dagre.get().layout(this);\n }", "private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}", "private void buildLayout() {\n HorizontalLayout actions = new HorizontalLayout(filter, newPart);\n actions.setWidth(\"100%\"); //what portion of screen to take\n filter.setWidth(\"100%\"); //what portion filter textbox takes\n actions.setExpandRatio(filter, 1); //expand (leaves no gaps)\n\n VerticalLayout left = new VerticalLayout(actions, partList);\n left.setSizeFull();\n partList.setSizeFull();\n left.setExpandRatio(partList, 1);\n\n HorizontalLayout mainLayout = new HorizontalLayout(left, partForm);\n mainLayout.setSizeFull();\n mainLayout.setExpandRatio(left, 1);\n\n // Split and allow resizing\n setContent(mainLayout);\n }", "@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}", "public WorkFlowLayout() {\r\n WorkFlowLayout.this.setWidth(100, Unit.PERCENTAGE);\r\n WorkFlowLayout.this.setHeight(100, Unit.PERCENTAGE);\r\n\r\n VerticalLayout content = new VerticalLayout();\r\n content.setHeightUndefined();\r\n content.setWidth(100, Unit.PERCENTAGE);\r\n WorkFlowLayout.this.setContent(content);\r\n WorkFlowLayout.this.setStyleName(\"subframe\");\r\n\r\n content.setSpacing(true);\r\n\r\n Label titleLabel = new Label(\"SearchGUI-PeptideShaker-WorkFlow\");\r\n titleLabel.setStyleName(\"frametitle\");\r\n content.addComponent(titleLabel);\r\n\r\n searchSettingsFileList = new DropDownList(\"Search Settings (Select or Enter New Name)\");\r\n content.addComponent(searchSettingsFileList);\r\n searchSettingsFileList.setFocous();\r\n\r\n HorizontalLayout btnsFrame = new HorizontalLayout();\r\n btnsFrame.setWidthUndefined();\r\n btnsFrame.setSpacing(true);\r\n btnsFrame.setStyleName(\"bottomformlayout\");\r\n content.addComponent(btnsFrame);\r\n\r\n Label addNewSearchSettings = new Label(\"Add\");\r\n addNewSearchSettings.addStyleName(\"windowtitle\");\r\n btnsFrame.addLayoutClickListener(new LayoutEvents.LayoutClickListener() {\r\n @Override\r\n public void layoutClick(LayoutEvents.LayoutClickEvent event) {\r\n Component c = event.getClickedComponent();\r\n if (c != null && c instanceof Label && ((Label) c).getValue().equalsIgnoreCase(\"Add\")) {\r\n String basepath = VaadinService.getCurrent().getBaseDirectory().getAbsolutePath();\r\n File file = new File(basepath + \"/VAADIN/default_searching.par\");\r\n SearchParameters searchParameters;\r\n try {\r\n searchParameters = SearchParameters.getIdentificationParameters(file);\r\n searchParameters.setFastaFile(null);\r\n } catch (IOException | ClassNotFoundException ex) {\r\n\r\n ex.printStackTrace();\r\n return;\r\n }\r\n searchParameters.setDefaultAdvancedSettings();\r\n searchSettingsLayout.updateForms(searchParameters, null);\r\n editSearchOption.setPopupVisible(true);\r\n } else if (c != null && c instanceof Label && ((Label) c).getValue().equalsIgnoreCase(\"Edit\")) {\r\n\r\n try {\r\n File file = searchSettingsMap.get(searchSettingsFileList.getSelectedValue()).getFile();\r\n searchParameters = SearchParameters.getIdentificationParameters(file);\r\n } catch (IOException | ClassNotFoundException ex) {\r\n ex.printStackTrace();\r\n return;\r\n }\r\n searchSettingsLayout.updateForms(searchParameters, searchSettingsFileList.getSelectedValue());\r\n editSearchOption.setPopupVisible(true);\r\n\r\n }\r\n }\r\n });\r\n btnsFrame.addComponent(addNewSearchSettings);\r\n Label editSearchSettings = new Label(\"Edit\");\r\n editSearchSettings.addStyleName(\"windowtitle\");\r\n btnsFrame.addComponent(editSearchSettings);\r\n searchSettingsLayout = new SearchSettingsLayout() {\r\n @Override\r\n public void saveSearchingFile(SearchParameters searchParameters, boolean editMode) {\r\n checkAndSaveSearchSettingsFile(searchParameters, editMode);\r\n editSearchOption.setPopupVisible(false);\r\n }\r\n\r\n @Override\r\n public void cancel() {\r\n editSearchOption.setPopupVisible(false);\r\n }\r\n\r\n };\r\n editSearchOption = new PopupWindow(\"Edit\");\r\n editSearchOption.setContent(searchSettingsLayout);\r\n editSearchOption.setSizeFull();\r\n editSearchOption.addStyleName(\"centerwindow\");\r\n\r\n Label searchSettingInfo = new Label();\r\n searchSettingInfo.setWidth(400, Unit.PIXELS);\r\n searchSettingInfo.setHeight(90, Unit.PIXELS);\r\n searchSettingInfo.setStyleName(\"subpanelframe\");\r\n searchSettingInfo.addStyleName(\"bottomformlayout\");\r\n searchSettingInfo.addStyleName(\"smallfontlongtext\");\r\n content.addComponent(searchSettingInfo);\r\n\r\n mgfFileList = new MultiSelectOptionGroup(\"Spectrum File(s)\", false);\r\n content.addComponent(mgfFileList);\r\n mgfFileList.setRequired(true, \"Select at least 1 MGF file\");\r\n mgfFileList.setViewList(true);\r\n\r\n MultiSelectOptionGroup searchEngines = new MultiSelectOptionGroup(\"Search Engines\", false);\r\n content.addComponent(searchEngines);\r\n searchEngines.setRequired(true, \"Select at least 1 search engine\");\r\n searchEngines.setViewList(true);\r\n\r\n Map<String, String> searchEngienList = new LinkedHashMap<>();\r\n searchEngienList.put(\"X!Tandem\", \"X!Tandem\");\r\n searchEngienList.put(\"MS-GF+\", \"MS-GF+\");\r\n searchEngienList.put(\"OMSSA\", \"OMSSA\");\r\n searchEngienList.put(\"Comet\", \"Comet\");\r\n searchEngienList.put(\"Tide\", \"Tide\");\r\n searchEngienList.put(\"MyriMatch\", \"MyriMatch\");\r\n searchEngienList.put(\"MS_Amanda\", \"MS_Amanda\");\r\n searchEngienList.put(\"DirecTag\", \"DirecTag\");\r\n searchEngienList.put(\"Novor (Select for non-commercial use only)\", \"Novor (Select for non-commercial use only)\");\r\n searchEngines.updateList(searchEngienList);\r\n searchEngines.setSelectedValue(\"X!Tandem\");\r\n searchEngines.setSelectedValue(\"MS-GF+\");\r\n searchEngines.setSelectedValue(\"OMSSA\");\r\n HorizontalLayout bottomLayout = new HorizontalLayout();\r\n bottomLayout.setStyleName(\"bottomformlayout\");\r\n bottomLayout.setWidth(400, Unit.PIXELS);\r\n bottomLayout.setSpacing(true);\r\n content.addComponent(bottomLayout);\r\n\r\n projectNameField = new HorizontalLabelTextField(\"<b>Project Name</b>\", \"New Project Name\", null);\r\n projectNameField.setWidth(100, Unit.PERCENTAGE);\r\n projectNameField.setRequired(true);\r\n bottomLayout.addComponent(projectNameField);\r\n bottomLayout.setExpandRatio(projectNameField, 70);\r\n\r\n Button executeWorkFlow = new Button(\"Execute\");\r\n executeWorkFlow.setStyleName(ValoTheme.BUTTON_SMALL);\r\n executeWorkFlow.addStyleName(ValoTheme.BUTTON_TINY);\r\n bottomLayout.addComponent(executeWorkFlow);\r\n bottomLayout.setComponentAlignment(executeWorkFlow, Alignment.TOP_RIGHT);\r\n bottomLayout.setExpandRatio(executeWorkFlow, 30);\r\n\r\n executeWorkFlow.addClickListener((Button.ClickEvent event) -> {\r\n String fastFileId = searchSettingsLayout.getFastaFileId();\r\n Set<String> spectrumIds = mgfFileList.getSelectedValue();\r\n Set<String> searchEnginesIds = searchEngines.getSelectedValue();\r\n String projectName = projectNameField.getSelectedValue().replace(\" \", \"_\").replace(\"-\", \"_\");\r\n if (!projectNameField.isValid() || fastFileId == null || spectrumIds == null || searchEnginesIds == null) {\r\n return;\r\n }\r\n Map<String, Boolean> selectedSearchEngines = new HashMap<>();\r\n searchEngienList.keySet().forEach((paramId) -> {\r\n selectedSearchEngines.put(paramId, searchEngines.getSelectedValue().contains(paramId));\r\n });\r\n executeWorkFlow(projectName, fastFileId, spectrumIds, searchEnginesIds, searchSettingsLayout.getSearchParameters(), selectedSearchEngines);\r\n });\r\n mgfFileList.setEnabled(false);\r\n searchEngines.setEnabled(false);\r\n projectNameField.setEnabled(false);\r\n editSearchSettings.setEnabled(false);\r\n executeWorkFlow.setEnabled(false);\r\n searchSettingsFileList.addValueChangeListener((Property.ValueChangeEvent event) -> {\r\n if (searchSettingsFileList.getSelectedValue() != null) {\r\n mgfFileList.setEnabled(true);\r\n searchEngines.setEnabled(true);\r\n projectNameField.setEnabled(true);\r\n editSearchSettings.setEnabled(true);\r\n executeWorkFlow.setEnabled(true); \r\n try { \r\n File file = searchSettingsMap.get(searchSettingsFileList.getSelectedValue()).getFile(); \r\n searchParameters = SearchParameters.getIdentificationParameters(file);\r\n String descrip = searchParameters.getShortDescription();\r\n descrip = descrip.replace(searchParameters.getFastaFile().getName(), searchSettingsLayout.getFastaFileName(searchParameters.getFastaFile().getName().split(\"__\")[0]));\r\n searchSettingInfo.setValue(descrip);\r\n } catch (IOException | ClassNotFoundException ex) {\r\n ex.printStackTrace();\r\n return;\r\n }\r\n searchSettingsLayout.updateForms(searchParameters, searchSettingsFileList.getSelectedValue());\r\n\r\n }\r\n });\r\n }", "private void initBaseLayout() {\n if (topText != null) {\n TextView topicText = new TextView(mainContext);\n topicText.setText(topText);\n dimensionsContainer.setViewStyle(KEY_TOPIC_TEXT, topicText);\n topicText.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_topic));\n topicText.setClickable(true);\n topicText.setOnClickListener(generalClickListener);\n blankLayout.addView(topicText);\n }\n//Add topLayout\n //if (topLayout == null) {\n topLayout = new LinearLayout(mainContext);\n topLayout.setOrientation(LinearLayout.HORIZONTAL);\n topLayout.setLayoutParams(layoutParams_WC_WC);\n topLayout.setBackgroundColor(bgColor_Table);\n blankLayout.addView(topLayout);\n//Add numTop\n TextView numTop = new TextView(mainContext);\n numTop.setText(R.string.symbol_num);\n dimensionsContainer.setViewStyle(KEY_NUM_TOP, numTop);\n numTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_top));\n numTop.setClickable(true);\n numTop.setOnClickListener(generalClickListener);\n topLayout.addView(numTop);\n//Add nameTop\n TextView nameTop = new TextView(mainContext);\n nameTop.setText(nameTopTextResId);\n dimensionsContainer.setViewStyle(KEY_NAME_TOP, nameTop);\n nameTop.setTag(new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_name_top));\n nameTop.setClickable(true);\n nameTop.setOnClickListener(generalClickListener);\n topLayout.addView(nameTop);\n\n\n\n\n\n\n//Add topHScrollView\n// if (layoutHandler.topHScrollView == null) {\n topHScrollView = new SyncedHorizontalScrollView(mainContext);\n topHScrollView.setLayoutParams(layoutParams_WC_MP);\n topHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor() !=\n null) //OverScrollColor\n {\n topHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_TOP).getBgColor());\n }\n topLayout.addView(topHScrollView);\n\n//Add topScrollLayout\n // if(layoutHandler.topScrollLayout == null) {\n topScrollLayout = new LinearLayout(mainContext);\n topScrollLayout.setBackgroundColor(bgColor_Table);\n topHScrollView.addView(topScrollLayout);\n\n//Add bodyScrollView\n //if(layoutHandler.bodyScrollView == null) {\n bodyScrollView = new ScrollView(mainContext);\n bodyScrollView.setLayoutParams(layoutParams_MP_WC);\n bodyScrollView.setVerticalScrollBarEnabled(false);\n //bodyScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER);\n blankLayout.addView(bodyScrollView);\n//Add bodyLayout\n //if(layoutHandler.bodyLayout == null) {\n bodyLayout = new LinearLayout(mainContext);\n bodyLayout.setOrientation(LinearLayout.HORIZONTAL);\n bodyLayout.setLayoutParams(layoutParams_WC_WC);\n bodyScrollView.addView(bodyLayout);\n\n//Add bodyLeftLayout\n //if(layoutHandler.bodyLeftLayout == null) {\n bodyLeftLayout = new LinearLayout(mainContext);\n bodyLeftLayout.setOrientation(LinearLayout.VERTICAL);\n bodyLeftLayout.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.setBackgroundColor(bgColor_Table);\n bodyLayout.addView(bodyLeftLayout);\n\n//Add bodyHScrollView\n //if(layoutHandler.bodyHScrollView == null) {\n bodyHScrollView = new SyncedHorizontalScrollView(mainContext);\n bodyHScrollView.setLayoutParams(layoutParams_WC_WC);\n bodyHScrollView.setHorizontalScrollBarEnabled(false);\n if (dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor() !=\n null)//OverScrollColor\n {\n bodyHScrollView.setBackgroundColor(\n dimensionsContainer.findDimensions(KEY_NAME_LEFT).getBgColor());\n }\n bodyLayout.addView(bodyHScrollView);\n\n//Add bodyRightLayout\n //if(layoutHandler.bodyRightLayout == null) {\n bodyRightLayout = new LinearLayout(mainContext);\n bodyRightLayout.setOrientation(LinearLayout.VERTICAL);\n bodyRightLayout.setBackgroundColor(bgColor_Table);\n bodyHScrollView.addView(bodyRightLayout);\n\n//Add Scroll Listeners\n\n ScrollManager scrollManager = new ScrollManager();\n scrollManager.setScrollDirection(ScrollManager.SCROLL_HORIZONTAL);\n scrollManager.addScrollClient(topHScrollView);\n scrollManager.addScrollClient(bodyHScrollView);\n\n// bodyScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// bodyHScrollView.getParent().requestDisallowInterceptTouchEvent(false);\n// return false;\n// }\n// });\n// bodyHScrollView.setOnTouchListener(new View.OnTouchListener() {\n// @Override\n// public boolean onTouch(View v, MotionEvent event) {\n// v.getParent().requestDisallowInterceptTouchEvent(true);\n// return false;\n// }\n// });\n\n //ScrollManager.disallowParentScroll(bodyHScrollView, 100);\n //ScrollManager.disallowChildScroll(bodyHScrollView, bodyLayout, 100);\n //bodyHScrollView.getWidth());\n //Dimensions.dipToPixels(mainContext, 800));\n// ScrollManager\n// .disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 200));\n //TODO: disallowParentScroll(bodyHScrollView, Dimensions.dipToPixels(mainContext, 50));\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_ranking_settings_dialog, container, false);\n }", "private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //set new View to the builder and create the Dialog\n Dialog dialog = builder.setView(new View(getActivity())).create();\n\n //get WindowManager.LayoutParams, copy attributes from Dialog to LayoutParams and override them with MATCH_PARENT\n WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();\n layoutParams.copyFrom(dialog.getWindow().getAttributes());\n layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT;\n layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;\n //show the Dialog before setting new LayoutParams to the Dialog\n dialog.show();\n dialog.getWindow().setAttributes(layoutParams);\n\n return dialog;\n }", "public Object getLayoutInfo() { return _layoutInfo; }" ]
[ "0.6870186", "0.6779498", "0.6743565", "0.6649771", "0.6595942", "0.65761936", "0.6561887", "0.6551714", "0.6535678", "0.64691406", "0.6387663", "0.6387387", "0.63664204", "0.63547313", "0.634894", "0.63424534", "0.6322212", "0.6287714", "0.6252628", "0.6247687", "0.6238804", "0.6219753", "0.6219221", "0.6216738", "0.62085056", "0.61774147", "0.6155268", "0.61433506", "0.6126688", "0.61253935", "0.6116823", "0.61160207", "0.60923016", "0.60922307", "0.6090158", "0.60833424", "0.60833424", "0.60790735", "0.6062986", "0.60609955", "0.605901", "0.6057443", "0.6053366", "0.6038872", "0.60264075", "0.6025634", "0.6014027", "0.6012476", "0.59910774", "0.59439045", "0.593881", "0.5938487", "0.593567", "0.5934809", "0.5926142", "0.59237397", "0.59205526", "0.5918901", "0.5918173", "0.59177357", "0.5916205", "0.5913491", "0.5911089", "0.59097135", "0.59059477", "0.5902825", "0.5899324", "0.58980465", "0.58974034", "0.5897396", "0.58951324", "0.5892695", "0.5887552", "0.588716", "0.58826405", "0.5877717", "0.5877481", "0.5877136", "0.58708894", "0.5861818", "0.58309025", "0.58286864", "0.58239704", "0.58229595", "0.58226174", "0.5819", "0.5817394", "0.5811415", "0.5808312", "0.58079", "0.58031666", "0.5788427", "0.57833946", "0.5779609", "0.576948", "0.5767034", "0.57621074", "0.57581896", "0.5757552", "0.57485294", "0.57462466" ]
0.0
-1
/ TN 5250 sessions
public static ITn5250Session findTn5250Session(final WebSocketSession session, final Tn5250ScreenRequest data) { final Map<String, ITn5250Session> map = getTn5250Sessions(session); return map.get(data.getDisplayID()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getActiveSessions();", "public abstract int getNumSessions();", "public long getSessionCounter();", "public int getActiveSessions();", "private int getNextSessionID() {\n\t\treturn sessionNum++;\n\t}", "int getSessionCount();", "RunningTasks getActiveHarvestingSessions() throws RepoxException;", "@Override\r\n \t\t\tpublic long getSessionDuration() {\n \t\t\t\treturn 0;\r\n \t\t\t}", "public static short getSession(){\n\t\treturn (short)++sessao;\n\t}", "public void setSessionCounter(long sessionCounter);", "com.weizhu.proto.WeizhuProtos.Session getSession();", "public abstract I_SessionInfo[] getSessions();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Session> \n getSessionsList();", "void setAccessCounterForSession(int cnt);", "int getAccessCounterForSession();", "public List<Long> getSessionNodes() {\n List<Long> ret = new ArrayList<>();\n\n for (int i = 0; i < sessionsList.size(); i++) {\n ret.add(sessionsList.get(i).dhtNodes());\n }\n\n return ret;\n }", "private void updateSessionCounter(HttpSessionEvent httpSessionEvent){\n httpSessionEvent.getSession().getServletContext()\r\n .setAttribute(\"activeSession\", counter.get());\r\n LOG.info(\"Total active session are {} \",counter.get());\r\n }", "static void startSession() {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG,\"startSession() called\");\n }*/\n if (!isContextAndApiKeySet(\"startSession()\")) {\n return;\n }\n final long now = System.currentTimeMillis();\n\n runOnLogWorker(new Runnable() {\n @Override\n public void run() {\n logWorker.removeCallbacks(endSessionRunnable);\n long previousEndSessionId = getEndSessionId();\n long lastEndSessionTime = getEndSessionTime();\n if (previousEndSessionId != -1\n && now - lastEndSessionTime < Constants.Z_MIN_TIME_BETWEEN_SESSIONS_MILLIS) {\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n dbHelper.removeEvent(previousEndSessionId);\n }\n //startSession() can be called in every activity by developer, hence upload events and sync datastore\n // only if it is a new session\n //syncToServerIfNeeded(now);\n startNewSessionIfNeeded(now);\n\n openSession();\n\n // Update last event time\n setLastEventTime(now);\n //syncDataStore();\n //uploadEvents();\n\n }\n });\n }", "int getSessionId();", "public int getTimeOfSession();", "protected static String indexSession(SBTarget session) {\n\t\treturn DebugClient.getId(session);\n\t}", "void incrementAccessCounterForSession();", "public void run() {\r\n\t\t\tactivityStartTimestamp = startTimestamp + lastCommandTimestamp;\r\n//\t\t\tSystem.out.println(\"Session started\");\r\n\t\t\tActivitySessionStarted.newCase(this, activityStartTimestamp);\r\n//\t\t\tDate startDate = new Date(); // make this global also\r\n\t\t\t startDate = new Date(); // make this global also\r\n\r\n//\t\t\tDate endDate = new Date(); // in case we get no more commands or we terminate early\r\n//\t\t\tint idleCycles = 0; // make this a global so eclipse termination can access it\r\n\t\t\t// make this global also\r\n\t\t\tendDate = new Date(); // in case we get no more commands or we terminate early\r\n\t\t\tidleCycles = 0; // make this a global so eclipse termination can access it\r\n\t\t\twhile(idleCycles < IDLE_CYCLES_THRESHOLD) {\r\n\r\n//\t\t\twhile(idleCycles < 10) {\r\n\t\t\t\t\r\n\t\t\t\tidleLastCycle = true;\r\n\t\t\t\ttry {\r\n//\t\t\t\t\tThread.sleep(/*60 * */ 1000); // why is 60 removed?\r\n\t\t\t\t\tThread.sleep(IDLE_CYCLE_GRANULARITY); // why is 60 removed?\r\n\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t\tif(idleLastCycle) {\r\n\t\t\t\t\tidleCycles++;\r\n\t\t\t\t\tIdleCycleDetected.newCase(this, startTimestamp + lastCommandTimestamp, idleCycles);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tendDate = new Date(); // this seems wrong, we have not ended session\r\n\t\t\t\t\t// actually it is correct as this is ths last cycle in which the session was active\r\n//\t\t\t\t\tidleCycles = 0;\r\n\t\t\t\t\tinitActivitySession();\r\n\t\t\t\t}\r\n\t\t\t}\r\n//\t\t\tDate endDate = new Date(); // current time\r\n//\r\n//\t\t\tinActivitySession = false;\r\n//\t\t\tsessionEnded(startDate, endDate);\r\n\t\t\trecordEndSession();\r\n\t\t}", "public int getSessionMaxAliveTime();", "public static void loadSessions() {\n try (Connection con = getConnection()) {\n String query = \"SELECT `usermask`,`username` FROM \" + mysql_db + \".`sessions`\";\n try (PreparedStatement pst = con.prepareStatement(query)) {\n ResultSet r = pst.executeQuery();\n while (r.next()) {\n Bot.addUserSession(r.getString(\"usermask\"), r.getString(\"username\"));\n }\n pst.close();\n con.close();\n }\n con.close();\n } catch (SQLException e) {\n Logger.logMessage(LOGLEVEL_IMPORTANT, \"SQL Error in 'loadSessions()': \" + e.getMessage());\n }\n }", "public static Map[] main(String[] args) {\n String mUserID = \"\";\n String mPassword = \"\";\n String mURL = \"\";\n String mConnection = \"\";\n String mDBName = \"\";\n String mPin = \"\";\n O2GSession mSession = null;\n \n // Check for correct number of arguments\n if (args.length < 4) {\n System.out.println(\"Not Enough Parameters!\");\n System.out.println(\"USAGE: [user ID] [password] [URL] [connection] [session ID (if needed)] [pin (if needed)]\");\n System.exit(1);\n }\n \n // Get command line arguments\n mUserID = args[0];\n mPassword = args[1];\n mURL = args[2];\n mConnection = args[3];\n if (args.length > 4) {\n mDBName = args[4];\n }\n if (args.length > 5) {\n mPin = args[5];\n }\n \n // Create a session, subscribe to session listener, login, get open positions information, logout\n try {\n \n // Create a session\n mSession = O2GTransport.createSession();\n \n // Specify that your session uses a table manager\n mSession.useTableManager(O2GTableManagerMode.YES, null);\n SessionStatusListener statusListener = new SessionStatusListener(mSession, mDBName, mPin);\n mSession.subscribeSessionStatus(statusListener);\n \n // Login into the trading server\n mSession.login(mUserID, mPassword, mURL, mConnection);\n while (!statusListener.isConnected() && !statusListener.hasError()) {\n Thread.sleep(50);\n }\n if (!statusListener.hasError()) {\n \n // Get an instance of table manager\n O2GTableManager tableManager = mSession.getTableManager();\n \n // Check the table manager status\n while (tableManager.getStatus() != O2GTableManagerStatus.TABLES_LOADED &&\n tableManager.getStatus() != O2GTableManagerStatus.TABLES_LOAD_FAILED) {\n Thread.sleep(50);\n }\n if (tableManager.getStatus() == O2GTableManagerStatus.TABLES_LOADED) {\n\n // Get an instance of the O2GTradesTable\n O2GMessagesTable messagesTable = (O2GMessagesTable)tableManager.getTable(O2GTableType.MESSAGES);\n \n // Get row level information\n Data = new Map[messagesTable.size()];\n for (int i = 0; i < messagesTable.size(); i++) {\n HashMap<String, Object> responseData = new HashMap<String, Object>();\n O2GMessageTableRow message = messagesTable.getRow(i);\n responseData.put(\"MsgID\" , message.getMsgID());\n responseData.put(\"Time\" , message.getTime());\n responseData.put(\"From\" , message.getFrom());\n responseData.put(\"Type\" , message.getType());\n responseData.put(\"Feature\" , message.getFeature());\n responseData.put(\"Text\" , message.getText());\n responseData.put(\"Subject\" , message.getSubject());\n responseData.put(\"HTMLFragmentFlag\" , message.getHTMLFragmentFlag());\n Data[i] = responseData;\n System.out.println(responseData);\n// System.out.println(Data[i]);\n }\n \n// // Create an instance of a table listener class\n// TableListener tableListener = new TableListener();\n// \n// // Subscribe table listener to table updates\n// tradeTable.subscribeUpdate(O2GTableUpdateType.UPDATE, tableListener);\n// tradeTable.subscribeUpdate(O2GTableUpdateType.INSERT, tableListener);\n// \n// // Process updates (see TableListener.java)\n// Thread.sleep(10000);\n// \n// // Unsubscribe table listener\n// tradeTable.unsubscribeUpdate(O2GTableUpdateType.UPDATE, tableListener);\n// tradeTable.unsubscribeUpdate(O2GTableUpdateType.INSERT, tableListener);\n\n mSession.logout();\n while (!statusListener.isDisconnected()) {\n Thread.sleep(50);\n }\n }\n }\n mSession.unsubscribeSessionStatus(statusListener);\n mSession.dispose();\n// System.exit(1);\n \t\treturn Data;\n } catch (Exception e) {\n System.out.println (\"Exception: \" + e.getMessage());\n// System.exit(1);\n return Data;\n }\n\t}", "@Override\n\tpublic void sessionCreated(HttpSessionEvent event) {\n\n\t\tHttpSession session = event.getSession();\n\t\tServletContext application = session.getServletContext();\n\t\tInteger online = (Integer) application.getAttribute(\"online\");\n\t\tif(online != null){\n\t\t\tonline++;\n\t\t}else{\n\t\t\tonline = 1;\n\t\t}\n\t\tapplication.setAttribute(\"online\", online);\n\t}", "static void beginNewSession() {\n SESSION_ID = null;\n Prefs.INSTANCE.setEventPlatformSessionId(null);\n\n // A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.\n PAGEVIEW_ID = null;\n }", "public void sessionToken(byte[] sesTok) {\n this.sesTok = sesTok;\n }", "public Session[] findSessions();", "private int generateSessionId(){\n int id;\n do{\n id = smIdGenerator.nextInt(50000);\n }while(mSessionMap.containsKey(id));\n\n Log.i(TAG, \"generating session id:\" + id);\n return id;\n }", "public void sessionStarted() {\n\t\t\r\n\t}", "public void trackNewSession() {\n if(isTelemetryEnabled()){\n new CreateDataTask(CreateDataTask.DataType.NEW_SESSION).execute();\n }\n }", "public static int getCurrentSessionCount() {\n\t\treturn (currentSessionCount);\n\t}", "private void updateActiveSession(Session s)\r\n\t{\r\n\t\t\r\n\t\t/**\r\n\t\t * Part Two\r\n\t\t */\r\n\t\t//TODO: BMH\r\n\t\t\r\n\t\t/**\r\n\t\t * Part Three\r\n\t\t */\r\n\t\ttry\r\n\t\t{\r\n\t\t\ts.serverSock.setSoTimeout(1);\r\n\t\t\tSocket client = s.serverSock.accept();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOutput.processMessage(\"Accepted a connection from: \"+\r\n\t\t \t\tclient.getInetAddress(), Constants.Message_Type.debug);\r\n\t\t\t\r\n\t\t\r\n\t\t\tif (client != null)\r\n\t\t\t{\r\n\t\t\t\tSessionUtils.acceptNewClient(client, s);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public void incrementExcepionalSessions() {\n exceptionalSessions++;\n }", "public void getTestSessions(){\n TestSessionDAO sessionsManager = DAOFactory.getTestSessionDAO();\n //populate with values from the database\n if(!sessionsManager.readInactiveTestSessions(testSessions)){\n //close the window due to read failure\n JOptionPane.showMessageDialog(rootPanel, \"Failed to read test sessions from database. Please check your internet connection and try again.\");\n System.exit(-2);\n }\n }", "public int getSessionAverageAliveTime();", "int getClientSessionID();", "public void testStagesSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads2());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n\n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, final TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n\n session0.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Initiator: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n });\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "private void updateUserSession(int state) {\n // Update the current session.\n request.updateSession(state, offerTime.getTime());\n }", "public void incrementUnexpectedSessions() {\n unexpectedSessions++;\n }", "public FeedingSession()\n {\n super(SessionType.FEEDING_SESSION);\n }", "public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t\t\tsessionIds.add(currLock.getSessionId());\r\n \t\t}\t\r\n \t}\r\n \t\r\n \treturn sessionIds;\r\n }", "java.lang.String getSessionID();", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public String getSessionState();", "String getSessionID();", "String getSessionID();", "public abstract Thread startSession();", "Session getCurrentSession();", "Session getCurrentSession();", "public Collection<Long> getSessions() {\n return dataTree.getSessions();\n }", "private static void startNewSession(final long timestamp) {\n openSession();\n\n sessionId = timestamp;\n //Log.i(\"sessionId\",\"updated at startNewSession()\");\n SharedPreferences preferences = CommonUtils.getSharedPreferences(context);\n preferences.edit().putLong(Constants.Z_PREFKEY_LAST_END_SESSION_ID, sessionId).apply();\n\n logEvent(START_SESSION_EVENT, null, null, timestamp, false);\n logWorker.post(new Runnable() {\n @Override\n public void run() {\n sendEventToServer(START_SESSION_EVENT, timestamp, Constants.Z_START_SESSION_EVENT_LOG_URL, true);\n }\n });\n\n }", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "private void updateSessionDetailsInDB(GlusterGeoRepSession session) {\n for (GlusterGeoRepSessionDetails sessDetails : session.getSessionDetails()) {\n sessDetails.setSessionId(session.getId());\n }\n getGeoRepDao().saveOrUpdateDetailsInBatch(session.getSessionDetails());\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.getSessionInfo(sessionId);\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tSessionInfoReturn data = (SessionInfoReturn) result.data;\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}", "public void mo749s() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(18, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "public long getExpiredSessions();", "public int getCountAtSessionStart() {\r\n return countAtSessionStart;\r\n }", "public static int getTotalSessionCount() {\n\t\treturn (totalSessionCount);\n\t}", "public int getSessionNo() {\n String[] sid = sessionid.split(\"/\");\n return Integer.parseInt(sid[0]);\n }", "public int mo744n() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(37, obtain, obtain2, 0);\n obtain2.readException();\n return obtain2.readInt();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "@Override\r\n \t\t\tpublic long getDefaultSessionDuration() {\n \t\t\t\treturn 0;\r\n \t\t\t}", "private void checkSession(final long sessionID, final long sessionVerID)\n {\n }", "public SessionList() { \n sessions = ExpiringMap.builder().variableExpiration().build();\n }", "void recordSessionTime(DefaultSession session);", "public int getRejectedSessions();", "private void updateList() {\r\n\t\ttry {\r\n\t \t// Reset the list\r\n\t\t\tsipSessions.clear();\r\n\t \t\r\n\t \t// Get list of pending sessions\r\n\t \tList<IBinder> sessions = sipApi.getSessions();\r\n\t\t\tfor (IBinder session : sessions) {\r\n\t\t\t\tISipSession sipSession = ISipSession.Stub.asInterface(session);\r\n\t\t\t\tsipSessions.add(sipSession);\r\n\t\t\t}\r\n\t\t\tif (sipSessions.size() > 0){\r\n\t\t String[] items = new String[sipSessions.size()]; \r\n\t\t for (int i = 0; i < items.length; i++) {\r\n\t\t\t\t\titems[i]=sipSessions.get(i).getSessionID();\r\n\t\t }\r\n\t\t\t\tsetListAdapter(new ArrayAdapter<String>(SessionsList.this, android.R.layout.simple_list_item_1, items));\r\n\t\t\t} else {\r\n\t\t\t\tsetListAdapter(null);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tUtils.showMessageAndExit(SessionsList.this, getString(R.string.label_session_failed));\r\n\t\t}\r\n }", "public void createSession(int uid);", "void sessionHeartbeat() throws IOException, InterruptedException;", "public int getSessionId() {\n return sessionId_;\n }", "@Test\n public void testGetTasksForSession() {\n\n List<Task> tasks;\n\n tasks = Session.getTasks(Session.NAME.PRE, 1);\n\n assertNotNull(tasks);\n assertTrue(\"Pre should have two tasks.\", tasks.size() == 2);\n assertEquals(\"Unique name for the task should be DASS_21\", \"DASS21_AS\", tasks.get(0).getName());\n assertEquals(\"First task should be named Status Questionnaire\", \"Status Questionnaire\", tasks.get(0).getDisplayName());\n assertEquals(\"First task should point to the DASS21 questionniare\", Task.TYPE.questions, tasks.get(0).getType());\n assertEquals(\"First task should point to the DASS21 questionniare\",\"questions/DASS21_AS\", tasks.get(0).getRequestMapping());\n assertTrue(\"First task should be completed\",tasks.get(0).isComplete());\n assertFalse(\"First task should not be current\",tasks.get(0).isCurrent());\n assertFalse(\"Second task should not be completed\",tasks.get(1).isComplete());\n assertTrue(\"Second task should be current\",tasks.get(1).isCurrent());\n\n Session s = new Session();\n s.setTasks(tasks);\n assertEquals(\"Second task is returned when current requested\", tasks.get(1), s.getCurrentTask());\n\n }", "public static List getAllSessions() {\n\t\tsynchronized (FQN) {\n\t\t\tList<MemberSession> msList = new ArrayList<MemberSession>();\n//\t\t\tObject object = cache.getValues(FQN);\n\t\t\tObject object = null;\n\t\t\tif (object != null) {\n\t\t\t\tmsList = (List<MemberSession>) object;\n\t\t\t\treturn new ArrayList(msList);\n\t\t\t} else {\n\t\t\t\tCollection list = new ArrayList();\n\t\t\t\tobject = cache.getValues(FQN);\n\t\t\t\tif(object != null){\n\t\t\t\t\tlist = (Collection) object;\n\t\t\t\t}\n\t\t\t\tmsList = new ArrayList(list);\n//\t\t\t\tfor (MemberSession ms : msList) {\n//\t\t\t\t\tcache.add(FQN, ms.getSessionId(), ms);\n//\t\t\t\t}\n\t\t\t\treturn msList;\n\t\t\t}\n\n\t\t}\n\t}", "public List<SessionDetails> getSessionDetails(JobStep js);", "@Test\r\n public void testGetMostRecentCompletedSession() {\r\n System.out.println(\"getMostRecentCompletedSession\");\r\n assertNotNull(sm);\r\n \r\n ISimulationSessionInfo result = sm.getMostRecentCompletedSession();\r\n assertTrue(result.getFinishTime() >= sm.getSession(\"test1\").getFinishTime());\r\n assertTrue(result.getFinishTime() >= sm.getSession(\"test2\").getFinishTime());\r\n }", "@Override\r\npublic void sessionWillPassivate(HttpSessionEvent arg0) {\n\t\r\n}", "List<Session> getAllSessions();", "private void m1169c(long j) {\n C3490e3.m665e(\"Refresh session started\");\n C3702r2.m1571c().mo55769a(C3717s2.C3720c.refreshSession);\n C3646n3.m1337m().mo55667a(\"2.0.0\", (C3660o4<ConfigurationContract>) new C3620e(System.currentTimeMillis(), j));\n }", "@Test\r\n @SuppressWarnings(\"SleepWhileInLoop\")\r\n public void testRemoveCompletedSessions() {\r\n System.out.println(\"removeCompletedSessions\");\r\n assertNotNull(sm);\r\n \r\n Map<String, ISimulationSessionInfo> result = sm.removeCompletedSessions();\r\n assertNotNull(result.get(\"test1\"));\r\n assertNotNull(result.get(\"test2\"));\r\n assertNull(result.get(\"test3\"));\r\n assertNull(sm.getSession(\"test1\"));\r\n assertNull(sm.getSession(\"test2\"));\r\n assertNotNull(sm.getSession(\"test3\"));\r\n }", "public boolean increase() {\n\n if (sessionsList.size() >= MAX_SESSIONS) {\n return false;\n }\n\n SessionSettings.Builder builder = new SessionSettings.Builder()\n .setNetworkInterfaces(NetworkInterfacePolicy\n .networkInterfaces(sessionsList.size(),\n sessionQuota.getInterfacesQuota()));\n\n TauSession s = new TauSession(builder.build());\n Worker w = new Worker(sessionsList.size(), s, inputQueue, counter, regulator,\n putCache, getCache);\n\n if (w.start()) {\n synchronized (lock) {\n sessionToWorkerMap.put(s, w);\n sessionsList.add(s);\n }\n\n if (readOnly) {\n s.setReadOnly(readOnly);\n }\n\n return true;\n }\n\n return false;\n }", "public createsessions() {\n initComponents();\n loadlec();\n loadlec2();\n\n // subcode() ;\n loadsubname();\n loadsubname1();\n\n loadtag();\n loadtag2();\n\n loadgrpid();\n loadgrpid2();\n\n loadsubgrpid1();\n loadsubgrpid2();\n\n }", "public SessionDetails getSessionDetails(JobStep js, Sessions s);", "public void generateInstallSessionID() {\n// generateSessionID();\n// hasInstallSession = true;\n }", "public static int getMaxSessionCount() {\n\t\treturn (maxSessionCount);\n\t}", "private static String firstSessionId() {\n\t\t// do we have any stored sessions from earlier login events?\n\t\tif (pmaSessions.size() > 0) {\n\t\t\t// yes we do! This means that when there's a PMA.core active session AND\n\t\t\t// PMA.core.lite version running,\n\t\t\t// the PMA.core active will be selected and returned\n\t\t\treturn pmaSessions.keySet().toArray()[0].toString();\n\t\t} else {\n\t\t\t// ok, we don't have stored sessions; not a problem per se...\n\t\t\tif (pmaIsLite()) {\n\t\t\t\tif (!pmaSlideInfos.containsKey(pmaCoreLiteSessionID)) {\n\t\t\t\t\tpmaSlideInfos.put(pmaCoreLiteSessionID, new HashMap<String, Object>());\n\t\t\t\t}\n\t\t\t\tif (!pmaAmountOfDataDownloaded.containsKey(pmaCoreLiteSessionID)) {\n\t\t\t\t\tpmaAmountOfDataDownloaded.put(pmaCoreLiteSessionID, 0);\n\t\t\t\t}\n\t\t\t\treturn pmaCoreLiteSessionID;\n\t\t\t} else {\n\t\t\t\t// no stored PMA.core sessions found NOR PMA.core.lite\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "public Long getSessionValue(String session) { return validSessions.get(session); }", "public void mo750t() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(19, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "public void sessionCreated(HttpSessionEvent arg0) {\n\t\t ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(arg0.getSession().getServletContext());\r\n\t\t RedisUtil ru = (RedisUtil) ctx.getBean(BEANNAME);\t\t \r\n\t\t Jedis je = ru.getConnection();\r\n\t\t //记录当前在线用户数量\r\n\t\t je.incr(CURRENT_USER_COUNT);\r\n\t\t //记录访问过的总人次\r\n\t\t je.incr(ALL_USER_COUNT);\r\n\t\t ru.returnResource(je);\r\n\t}", "@Before\n public void getTestSession() {\n if (sessionId == null) {\n sessionId = Util.getSessionID();\n }\n }", "public String getSessionID() {\n\t\treturn SID;\n\t}", "public void sessionCreated(IoSession session) {\r\n\t\tServerLogger.log(\"Session created...\" + session, Constants.DEBUG);\r\n\t\tsession.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);\r\n\t}", "public short getSessionId() {\n return sessionId;\n }", "public void testEqualPayloadsSetSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54213);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54531);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n \n man0.addCreationListener(ftm0);\n man1.addCreationListener(ftm1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request with equal payloads, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 1);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "public PSUserSession getSession();", "String getSessionId();", "String getSessionId();", "String getSessionId();", "String getSessionId();", "@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}", "public void mo751u() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(20, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }" ]
[ "0.6629472", "0.65841633", "0.6572673", "0.65371805", "0.64005", "0.62207973", "0.61894786", "0.612571", "0.6085266", "0.6034893", "0.59439003", "0.5940794", "0.59391", "0.5889903", "0.5885982", "0.5843122", "0.58190656", "0.5786811", "0.577543", "0.57498825", "0.57283795", "0.57230234", "0.5714537", "0.56887656", "0.566986", "0.56534034", "0.56458277", "0.5642023", "0.5631927", "0.56091285", "0.5607224", "0.55808014", "0.55677986", "0.5556949", "0.55429304", "0.55422276", "0.55407125", "0.55394846", "0.5538291", "0.5530584", "0.55231535", "0.5503929", "0.55002296", "0.54938924", "0.54838145", "0.5483183", "0.5480123", "0.5474968", "0.5474968", "0.54704475", "0.5445643", "0.5445643", "0.54408836", "0.54400104", "0.54388195", "0.5434485", "0.5431399", "0.542625", "0.5425595", "0.5423685", "0.54167306", "0.5414987", "0.5412907", "0.5405836", "0.54050535", "0.54037195", "0.5402079", "0.5400728", "0.5399989", "0.53709275", "0.53625554", "0.53498775", "0.5330241", "0.5323663", "0.52870595", "0.5285832", "0.5283837", "0.52837396", "0.5282723", "0.5279859", "0.5279435", "0.52782714", "0.527769", "0.5265427", "0.52594537", "0.52546966", "0.5251998", "0.52506524", "0.5247427", "0.5242741", "0.5242257", "0.52421165", "0.52417415", "0.523894", "0.5237641", "0.5235752", "0.5235752", "0.5235752", "0.5235752", "0.5232416", "0.52321345" ]
0.0
-1
/ TN 3812 sessions
public static ITn3812Context findTn3812Session(final WebSocketSession session, final String name) { final Map<String, ITn3812Context> map = getTn3812Sessions(session); return map.get(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getActiveSessions();", "public long getSessionCounter();", "public static short getSession(){\n\t\treturn (short)++sessao;\n\t}", "com.weizhu.proto.WeizhuProtos.Session getSession();", "private int getNextSessionID() {\n\t\treturn sessionNum++;\n\t}", "public int getActiveSessions();", "public abstract int getNumSessions();", "RunningTasks getActiveHarvestingSessions() throws RepoxException;", "public abstract I_SessionInfo[] getSessions();", "static void beginNewSession() {\n SESSION_ID = null;\n Prefs.INSTANCE.setEventPlatformSessionId(null);\n\n // A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.\n PAGEVIEW_ID = null;\n }", "public void sessionStarted() {\n\t\t\r\n\t}", "Session getCurrentSession();", "Session getCurrentSession();", "int getSessionId();", "@Override\r\n \t\t\tpublic long getSessionDuration() {\n \t\t\t\treturn 0;\r\n \t\t\t}", "static void startSession() {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG,\"startSession() called\");\n }*/\n if (!isContextAndApiKeySet(\"startSession()\")) {\n return;\n }\n final long now = System.currentTimeMillis();\n\n runOnLogWorker(new Runnable() {\n @Override\n public void run() {\n logWorker.removeCallbacks(endSessionRunnable);\n long previousEndSessionId = getEndSessionId();\n long lastEndSessionTime = getEndSessionTime();\n if (previousEndSessionId != -1\n && now - lastEndSessionTime < Constants.Z_MIN_TIME_BETWEEN_SESSIONS_MILLIS) {\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n dbHelper.removeEvent(previousEndSessionId);\n }\n //startSession() can be called in every activity by developer, hence upload events and sync datastore\n // only if it is a new session\n //syncToServerIfNeeded(now);\n startNewSessionIfNeeded(now);\n\n openSession();\n\n // Update last event time\n setLastEventTime(now);\n //syncDataStore();\n //uploadEvents();\n\n }\n });\n }", "int getAccessCounterForSession();", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "int getSessionCount();", "protected static String indexSession(SBTarget session) {\n\t\treturn DebugClient.getId(session);\n\t}", "public String getSessionState();", "java.lang.String getSessionID();", "String getSessionID();", "String getSessionID();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Session> \n getSessionsList();", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "void incrementAccessCounterForSession();", "public int getTimeOfSession();", "public void mo749s() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(18, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "int getClientSessionID();", "@Override\r\npublic void sessionWillPassivate(HttpSessionEvent arg0) {\n\t\r\n}", "public SessionDetails getSessionDetails(JobStep js, Sessions s);", "void setAccessCounterForSession(int cnt);", "public void run() {\r\n\t\t\tactivityStartTimestamp = startTimestamp + lastCommandTimestamp;\r\n//\t\t\tSystem.out.println(\"Session started\");\r\n\t\t\tActivitySessionStarted.newCase(this, activityStartTimestamp);\r\n//\t\t\tDate startDate = new Date(); // make this global also\r\n\t\t\t startDate = new Date(); // make this global also\r\n\r\n//\t\t\tDate endDate = new Date(); // in case we get no more commands or we terminate early\r\n//\t\t\tint idleCycles = 0; // make this a global so eclipse termination can access it\r\n\t\t\t// make this global also\r\n\t\t\tendDate = new Date(); // in case we get no more commands or we terminate early\r\n\t\t\tidleCycles = 0; // make this a global so eclipse termination can access it\r\n\t\t\twhile(idleCycles < IDLE_CYCLES_THRESHOLD) {\r\n\r\n//\t\t\twhile(idleCycles < 10) {\r\n\t\t\t\t\r\n\t\t\t\tidleLastCycle = true;\r\n\t\t\t\ttry {\r\n//\t\t\t\t\tThread.sleep(/*60 * */ 1000); // why is 60 removed?\r\n\t\t\t\t\tThread.sleep(IDLE_CYCLE_GRANULARITY); // why is 60 removed?\r\n\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t\tif(idleLastCycle) {\r\n\t\t\t\t\tidleCycles++;\r\n\t\t\t\t\tIdleCycleDetected.newCase(this, startTimestamp + lastCommandTimestamp, idleCycles);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tendDate = new Date(); // this seems wrong, we have not ended session\r\n\t\t\t\t\t// actually it is correct as this is ths last cycle in which the session was active\r\n//\t\t\t\t\tidleCycles = 0;\r\n\t\t\t\t\tinitActivitySession();\r\n\t\t\t\t}\r\n\t\t\t}\r\n//\t\t\tDate endDate = new Date(); // current time\r\n//\r\n//\t\t\tinActivitySession = false;\r\n//\t\t\tsessionEnded(startDate, endDate);\r\n\t\t\trecordEndSession();\r\n\t\t}", "public void sessionToken(byte[] sesTok) {\n this.sesTok = sesTok;\n }", "public abstract Thread startSession();", "public Session[] findSessions();", "private void checkSession(final long sessionID, final long sessionVerID)\n {\n }", "public List<SessionDetails> getSessionDetails(JobStep js);", "public void setSessionCounter(long sessionCounter);", "public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t\t\tsessionIds.add(currLock.getSessionId());\r\n \t\t}\t\r\n \t}\r\n \t\r\n \treturn sessionIds;\r\n }", "private static void startNewSession(final long timestamp) {\n openSession();\n\n sessionId = timestamp;\n //Log.i(\"sessionId\",\"updated at startNewSession()\");\n SharedPreferences preferences = CommonUtils.getSharedPreferences(context);\n preferences.edit().putLong(Constants.Z_PREFKEY_LAST_END_SESSION_ID, sessionId).apply();\n\n logEvent(START_SESSION_EVENT, null, null, timestamp, false);\n logWorker.post(new Runnable() {\n @Override\n public void run() {\n sendEventToServer(START_SESSION_EVENT, timestamp, Constants.Z_START_SESSION_EVENT_LOG_URL, true);\n }\n });\n\n }", "private void updateSessionCounter(HttpSessionEvent httpSessionEvent){\n httpSessionEvent.getSession().getServletContext()\r\n .setAttribute(\"activeSession\", counter.get());\r\n LOG.info(\"Total active session are {} \",counter.get());\r\n }", "public void trackNewSession() {\n if(isTelemetryEnabled()){\n new CreateDataTask(CreateDataTask.DataType.NEW_SESSION).execute();\n }\n }", "private void updateActiveSession(Session s)\r\n\t{\r\n\t\t\r\n\t\t/**\r\n\t\t * Part Two\r\n\t\t */\r\n\t\t//TODO: BMH\r\n\t\t\r\n\t\t/**\r\n\t\t * Part Three\r\n\t\t */\r\n\t\ttry\r\n\t\t{\r\n\t\t\ts.serverSock.setSoTimeout(1);\r\n\t\t\tSocket client = s.serverSock.accept();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOutput.processMessage(\"Accepted a connection from: \"+\r\n\t\t \t\tclient.getInetAddress(), Constants.Message_Type.debug);\r\n\t\t\t\r\n\t\t\r\n\t\t\tif (client != null)\r\n\t\t\t{\r\n\t\t\t\tSessionUtils.acceptNewClient(client, s);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public static void loadSessions() {\n try (Connection con = getConnection()) {\n String query = \"SELECT `usermask`,`username` FROM \" + mysql_db + \".`sessions`\";\n try (PreparedStatement pst = con.prepareStatement(query)) {\n ResultSet r = pst.executeQuery();\n while (r.next()) {\n Bot.addUserSession(r.getString(\"usermask\"), r.getString(\"username\"));\n }\n pst.close();\n con.close();\n }\n con.close();\n } catch (SQLException e) {\n Logger.logMessage(LOGLEVEL_IMPORTANT, \"SQL Error in 'loadSessions()': \" + e.getMessage());\n }\n }", "@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}", "void recordSessionTime(DefaultSession session);", "@Override\r\npublic void sessionCreated(HttpSessionEvent arg0) {\n\t\r\n}", "private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// session = new EvernoteSession(info, result, getTempDir());\n// }\n ConnectionUtils.connectFirstTime();\n updateUiForLoginState();\n }", "com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder();", "Session begin();", "void sessionCreated(SessionEvent se);", "public interface ServerSession {\n\n /**\n * Fixed field used to store the initial URI used to create this session\n */\n public static final String INITIAL_URI = \"_INITIAL_URI\";\n\n /**\n * Fixed field containing the user agent used to request the initial url\n */\n public static final String USER_AGENT = \"_USER_AGENT\";\n\n /**\n * Fixed field storing the name of the current user owning this session\n */\n public static final String USER = \"_USER\";\n\n /**\n * Fixed field storing the IP which was used to create the session\n */\n public static final String REMOTE_IP = \"_REMOTE_IP\";\n\n /**\n * Returns the timestamp of the sessions creation\n *\n * @return the timestamp in milliseconds when the session was created\n */\n long getCreationTime();\n\n /**\n * Returns the unique session id\n *\n * @return the session id\n */\n String getId();\n\n /**\n * Returns the timestamp when the session was last accessed\n *\n * @return the timestamp in milliseconds when the session was last accessed\n */\n long getLastAccessedTime();\n\n /**\n * Returns the max. time span a session is permitted to be inactive (not accessed) before it is eligible for\n * invalidation.\n * <p>\n * If the session was not accessed since its creation, this time span is rather short, to get quickly rid of\n * \"one call\" sessions created by bots. After the second call, the timeout is expanded.\n *\n * @return the max number of seconds since the last access before the session is eligible for invalidation\n */\n int getMaxInactiveInterval();\n\n /**\n * Fetches a previously stored value from the session.\n *\n * @param key the key for which the value is requested.\n * @return the stored value, wrapped as {@link sirius.kernel.commons.Value}\n */\n @Nonnull\n Value getValue(String key);\n\n /**\n * Returns a list of all keys for which a value is stored in the session\n *\n * @return a list of all keys for which a value is stored\n */\n List<String> getKeys();\n\n /**\n * Determines if a key with the given name is already present.\n *\n * @param key the name of the key\n * @return <tt>true</tt> if a value with the given key exists, <tt>false</tt> otherwise\n */\n boolean hasKey(String key);\n\n /**\n * Stores the given name value pair in the session.\n *\n * @param key the key used to associate the data with\n * @param data the data to store for the given key. Note that data needs to be serializable!\n */\n void putValue(String key, Object data);\n\n /**\n * Deletes the stored value for the given key.\n *\n * @param key the key identifying the data to be removed\n */\n void removeValue(String key);\n\n /**\n * Deletes this session.\n */\n void invalidate();\n\n /**\n * Determines if the session is new.\n * <p>\n * A new session was created by the current request and not fetched from the session map using its ID.\n *\n * @return <tt>true</tt> if the session was created by this request, <tt>false</tt> otherwise.\n */\n boolean isNew();\n\n /**\n * Signals the system that this session belongs to a user which logged in. This will normally enhance the\n * session live time over a session without an attached user.\n */\n void markAsUserSession();\n\n}", "private void updateSessionDetailsInDB(GlusterGeoRepSession session) {\n for (GlusterGeoRepSessionDetails sessDetails : session.getSessionDetails()) {\n sessDetails.setSessionId(session.getId());\n }\n getGeoRepDao().saveOrUpdateDetailsInBatch(session.getSessionDetails());\n }", "public void createSession(int uid);", "public PSUserSession getSession();", "public String getSessionID() {\n\t\treturn SID;\n\t}", "@Override\n\tpublic void sessionCreated(HttpSessionEvent event) {\n\n\t\tHttpSession session = event.getSession();\n\t\tServletContext application = session.getServletContext();\n\t\tInteger online = (Integer) application.getAttribute(\"online\");\n\t\tif(online != null){\n\t\t\tonline++;\n\t\t}else{\n\t\t\tonline = 1;\n\t\t}\n\t\tapplication.setAttribute(\"online\", online);\n\t}", "public List<Long> getSessionNodes() {\n List<Long> ret = new ArrayList<>();\n\n for (int i = 0; i < sessionsList.size(); i++) {\n ret.add(sessionsList.get(i).dhtNodes());\n }\n\n return ret;\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.getSessionInfo(sessionId);\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tSessionInfoReturn data = (SessionInfoReturn) result.data;\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}", "String getAssociatedSession();", "String getSessionId();", "String getSessionId();", "String getSessionId();", "String getSessionId();", "Object getNativeSession();", "public int mo744n() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(37, obtain, obtain2, 0);\n obtain2.readException();\n return obtain2.readInt();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "public int getSessionId() {\n return sessionId_;\n }", "public createsessions() {\n initComponents();\n loadlec();\n loadlec2();\n\n // subcode() ;\n loadsubname();\n loadsubname1();\n\n loadtag();\n loadtag2();\n\n loadgrpid();\n loadgrpid2();\n\n loadsubgrpid1();\n loadsubgrpid2();\n\n }", "@Before\n public void getTestSession() {\n if (sessionId == null) {\n sessionId = Util.getSessionID();\n }\n }", "public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}", "public int getSessionNo() {\n String[] sid = sessionid.split(\"/\");\n return Integer.parseInt(sid[0]);\n }", "public void testStagesSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads2());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n\n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, final TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n\n session0.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Initiator: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n });\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "public static Map[] main(String[] args) {\n String mUserID = \"\";\n String mPassword = \"\";\n String mURL = \"\";\n String mConnection = \"\";\n String mDBName = \"\";\n String mPin = \"\";\n O2GSession mSession = null;\n \n // Check for correct number of arguments\n if (args.length < 4) {\n System.out.println(\"Not Enough Parameters!\");\n System.out.println(\"USAGE: [user ID] [password] [URL] [connection] [session ID (if needed)] [pin (if needed)]\");\n System.exit(1);\n }\n \n // Get command line arguments\n mUserID = args[0];\n mPassword = args[1];\n mURL = args[2];\n mConnection = args[3];\n if (args.length > 4) {\n mDBName = args[4];\n }\n if (args.length > 5) {\n mPin = args[5];\n }\n \n // Create a session, subscribe to session listener, login, get open positions information, logout\n try {\n \n // Create a session\n mSession = O2GTransport.createSession();\n \n // Specify that your session uses a table manager\n mSession.useTableManager(O2GTableManagerMode.YES, null);\n SessionStatusListener statusListener = new SessionStatusListener(mSession, mDBName, mPin);\n mSession.subscribeSessionStatus(statusListener);\n \n // Login into the trading server\n mSession.login(mUserID, mPassword, mURL, mConnection);\n while (!statusListener.isConnected() && !statusListener.hasError()) {\n Thread.sleep(50);\n }\n if (!statusListener.hasError()) {\n \n // Get an instance of table manager\n O2GTableManager tableManager = mSession.getTableManager();\n \n // Check the table manager status\n while (tableManager.getStatus() != O2GTableManagerStatus.TABLES_LOADED &&\n tableManager.getStatus() != O2GTableManagerStatus.TABLES_LOAD_FAILED) {\n Thread.sleep(50);\n }\n if (tableManager.getStatus() == O2GTableManagerStatus.TABLES_LOADED) {\n\n // Get an instance of the O2GTradesTable\n O2GMessagesTable messagesTable = (O2GMessagesTable)tableManager.getTable(O2GTableType.MESSAGES);\n \n // Get row level information\n Data = new Map[messagesTable.size()];\n for (int i = 0; i < messagesTable.size(); i++) {\n HashMap<String, Object> responseData = new HashMap<String, Object>();\n O2GMessageTableRow message = messagesTable.getRow(i);\n responseData.put(\"MsgID\" , message.getMsgID());\n responseData.put(\"Time\" , message.getTime());\n responseData.put(\"From\" , message.getFrom());\n responseData.put(\"Type\" , message.getType());\n responseData.put(\"Feature\" , message.getFeature());\n responseData.put(\"Text\" , message.getText());\n responseData.put(\"Subject\" , message.getSubject());\n responseData.put(\"HTMLFragmentFlag\" , message.getHTMLFragmentFlag());\n Data[i] = responseData;\n System.out.println(responseData);\n// System.out.println(Data[i]);\n }\n \n// // Create an instance of a table listener class\n// TableListener tableListener = new TableListener();\n// \n// // Subscribe table listener to table updates\n// tradeTable.subscribeUpdate(O2GTableUpdateType.UPDATE, tableListener);\n// tradeTable.subscribeUpdate(O2GTableUpdateType.INSERT, tableListener);\n// \n// // Process updates (see TableListener.java)\n// Thread.sleep(10000);\n// \n// // Unsubscribe table listener\n// tradeTable.unsubscribeUpdate(O2GTableUpdateType.UPDATE, tableListener);\n// tradeTable.unsubscribeUpdate(O2GTableUpdateType.INSERT, tableListener);\n\n mSession.logout();\n while (!statusListener.isDisconnected()) {\n Thread.sleep(50);\n }\n }\n }\n mSession.unsubscribeSessionStatus(statusListener);\n mSession.dispose();\n// System.exit(1);\n \t\treturn Data;\n } catch (Exception e) {\n System.out.println (\"Exception: \" + e.getMessage());\n// System.exit(1);\n return Data;\n }\n\t}", "private Boolean isInSession(String token, String username) {\n \treturn true;\n }", "public void mo751u() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(20, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "Session getSession();", "Session getSession();", "public void sessionCreated(HttpSessionEvent sessionEvent) {\n\t\tHttpSession session = sessionEvent.getSession();\n\t\tDate date = new Date();\n\t\tSystem.out.println(\">>> Created Session : [\" + session.getId() + \"] at [\" + date.toString() + \"] <<<\"); \n\t\tSystem.out.println(\">>> getMaxInactiveInterval : [\" + session.getMaxInactiveInterval() + \" ] <<<\"); \n\t}", "@Test\n public void testGetTasksForSession() {\n\n List<Task> tasks;\n\n tasks = Session.getTasks(Session.NAME.PRE, 1);\n\n assertNotNull(tasks);\n assertTrue(\"Pre should have two tasks.\", tasks.size() == 2);\n assertEquals(\"Unique name for the task should be DASS_21\", \"DASS21_AS\", tasks.get(0).getName());\n assertEquals(\"First task should be named Status Questionnaire\", \"Status Questionnaire\", tasks.get(0).getDisplayName());\n assertEquals(\"First task should point to the DASS21 questionniare\", Task.TYPE.questions, tasks.get(0).getType());\n assertEquals(\"First task should point to the DASS21 questionniare\",\"questions/DASS21_AS\", tasks.get(0).getRequestMapping());\n assertTrue(\"First task should be completed\",tasks.get(0).isComplete());\n assertFalse(\"First task should not be current\",tasks.get(0).isCurrent());\n assertFalse(\"Second task should not be completed\",tasks.get(1).isComplete());\n assertTrue(\"Second task should be current\",tasks.get(1).isCurrent());\n\n Session s = new Session();\n s.setTasks(tasks);\n assertEquals(\"Second task is returned when current requested\", tasks.get(1), s.getCurrentTask());\n\n }", "@java.lang.Deprecated\n public final com.facebook.Session getSession() {\n /*\n r7 = this;\n r1 = 0;\n r2 = 0;\n L_0x0002:\n r3 = r7.lock;\n monitor-enter(r3);\n r0 = r7.userSetSession;\t Catch:{ all -> 0x0019 }\n if (r0 == 0) goto L_0x000d;\n L_0x0009:\n r0 = r7.userSetSession;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n L_0x000c:\n return r0;\n L_0x000d:\n r0 = r7.session;\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x0015;\n L_0x0011:\n r0 = r7.sessionInvalidated;\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x001c;\n L_0x0015:\n r0 = r7.session;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n goto L_0x000c;\n L_0x0019:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n throw r0;\n L_0x001c:\n r0 = r7.accessToken;\t Catch:{ all -> 0x0019 }\n r4 = r7.session;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x0025;\n L_0x0023:\n r0 = r2;\n goto L_0x000c;\n L_0x0025:\n if (r4 == 0) goto L_0x004e;\n L_0x0027:\n r0 = r4.getPermissions();\n L_0x002b:\n r3 = new com.facebook.Session$Builder;\n r4 = r7.pendingAuthorizationActivity;\n r3.<init>(r4);\n r4 = r7.mAppId;\n r3 = r3.setApplicationId(r4);\n r4 = r7.getTokenCache();\n r3 = r3.setTokenCachingStrategy(r4);\n r3 = r3.build();\n r4 = r3.getState();\n r5 = com.facebook.SessionState.CREATED_TOKEN_LOADED;\n if (r4 == r5) goto L_0x005e;\n L_0x004c:\n r0 = r2;\n goto L_0x000c;\n L_0x004e:\n r0 = r7.pendingAuthorizationPermissions;\n if (r0 == 0) goto L_0x0059;\n L_0x0052:\n r0 = r7.pendingAuthorizationPermissions;\n r0 = java.util.Arrays.asList(r0);\n goto L_0x002b;\n L_0x0059:\n r0 = java.util.Collections.emptyList();\n goto L_0x002b;\n L_0x005e:\n r4 = new com.facebook.Session$OpenRequest;\n r5 = r7.pendingAuthorizationActivity;\n r4.<init>(r5);\n r4 = r4.setPermissions(r0);\n r0 = r0.isEmpty();\n if (r0 != 0) goto L_0x0092;\n L_0x006f:\n r0 = 1;\n L_0x0070:\n r7.openSession(r3, r4, r0);\n r4 = r7.lock;\n monitor-enter(r4);\n r0 = r7.sessionInvalidated;\t Catch:{ all -> 0x0094 }\n if (r0 != 0) goto L_0x007e;\n L_0x007a:\n r0 = r7.session;\t Catch:{ all -> 0x0094 }\n if (r0 != 0) goto L_0x0097;\n L_0x007e:\n r0 = r7.session;\t Catch:{ all -> 0x0094 }\n r7.session = r3;\t Catch:{ all -> 0x0094 }\n r5 = 0;\n r7.sessionInvalidated = r5;\t Catch:{ all -> 0x0094 }\n r6 = r3;\n r3 = r0;\n r0 = r6;\n L_0x0088:\n monitor-exit(r4);\t Catch:{ all -> 0x0094 }\n if (r3 == 0) goto L_0x008e;\n L_0x008b:\n r3.close();\n L_0x008e:\n if (r0 == 0) goto L_0x0002;\n L_0x0090:\n goto L_0x000c;\n L_0x0092:\n r0 = r1;\n goto L_0x0070;\n L_0x0094:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0094 }\n throw r0;\n L_0x0097:\n r0 = r2;\n r3 = r2;\n goto L_0x0088;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.android.Facebook.getSession():com.facebook.Session\");\n }", "public FeedingSession()\n {\n super(SessionType.FEEDING_SESSION);\n }", "public abstract String getSessionList();", "java.lang.String getSessionId();", "@Override\n public int getSessionId() {\n return sessionId_;\n }", "public static List getAllSessions() {\n\t\tsynchronized (FQN) {\n\t\t\tList<MemberSession> msList = new ArrayList<MemberSession>();\n//\t\t\tObject object = cache.getValues(FQN);\n\t\t\tObject object = null;\n\t\t\tif (object != null) {\n\t\t\t\tmsList = (List<MemberSession>) object;\n\t\t\t\treturn new ArrayList(msList);\n\t\t\t} else {\n\t\t\t\tCollection list = new ArrayList();\n\t\t\t\tobject = cache.getValues(FQN);\n\t\t\t\tif(object != null){\n\t\t\t\t\tlist = (Collection) object;\n\t\t\t\t}\n\t\t\t\tmsList = new ArrayList(list);\n//\t\t\t\tfor (MemberSession ms : msList) {\n//\t\t\t\t\tcache.add(FQN, ms.getSessionId(), ms);\n//\t\t\t\t}\n\t\t\t\treturn msList;\n\t\t\t}\n\n\t\t}\n\t}", "public void generateInstallSessionID() {\n// generateSessionID();\n// hasInstallSession = true;\n }", "@Test\n\tpublic void checkSessionInfoDisplayedCorrectly()\n\t{\n\t\tonView(withIndex(withText(R.string.timetable_tab), 1)).perform(click());\n\t\t//now click on the session\n\t\tonView(withText(\"Using ARKit with SpriteKit\")).perform(click());\n\n\t\tonView(withId(R.id.nav_host_fragment)).check((view, noViewFoundException) ->\n\t\t{\n\t\t\tTextView speakerName = view.findViewById(R.id.session_view_speaker_name);\n\t\t\tTextView sessionTitle = view.findViewById(R.id.session_view_title);\n\t\t\tTextView sessionType = view.findViewById(R.id.session_view_session_type);\n\t\t\tTextView sessionTime = view.findViewById(R.id.session_view_date_time);\n\t\t\tTextView sessionPlace = view.findViewById(R.id.session_view_location_name);\n\n\t\t\tassertEquals(speakerName.getText(), \"Janie Clayton @redqueencoder\");\n\t\t\tassertEquals(speakerName.getVisibility(), View.VISIBLE);\n\n\t\t\tassertEquals(sessionTitle.getText(), \"Using ARKit with SpriteKit\");\n\t\t\tassertEquals(sessionTitle.getVisibility(), View.VISIBLE);\n\n\t\t\tassertEquals(sessionType.getText(), \"Workshop\");\n\t\t\tassertEquals(sessionType.getVisibility(), View.VISIBLE);\n\n\t\t\tassertEquals(sessionTime.getText(), \"Tuesday 10th December, 16:00 - 18:00\");\n\t\t\tassertEquals(sessionTime.getVisibility(), View.VISIBLE);\n\n\t\t\tassertEquals(sessionPlace.getText(), \"Llandinam B23\");\n\t\t\tassertEquals(sessionPlace.getVisibility(), View.VISIBLE);\n\t\t});\n\t}", "protected String getSessionID(Session session) {\n String[] authorizationValues = session.getUpgradeRequest().getHeader(\"Authorization\").split(\":\");\n if (authorizationValues.length < 3) {\n session.close(HttpStatus.BAD_REQUEST_400, \"Invalid Authorization header.\");\n }\n return Player.getPlayer(authorizationValues[2]).getSession().getSessionID();\n\n }", "@Override\n\t\t\tpublic void handleNewSession() throws Exception {\n\t\t\t\t\n\t\t\t}", "public short getSessionId() {\n return sessionId;\n }", "public void incrementExcepionalSessions() {\n exceptionalSessions++;\n }", "private static String firstSessionId() {\n\t\t// do we have any stored sessions from earlier login events?\n\t\tif (pmaSessions.size() > 0) {\n\t\t\t// yes we do! This means that when there's a PMA.core active session AND\n\t\t\t// PMA.core.lite version running,\n\t\t\t// the PMA.core active will be selected and returned\n\t\t\treturn pmaSessions.keySet().toArray()[0].toString();\n\t\t} else {\n\t\t\t// ok, we don't have stored sessions; not a problem per se...\n\t\t\tif (pmaIsLite()) {\n\t\t\t\tif (!pmaSlideInfos.containsKey(pmaCoreLiteSessionID)) {\n\t\t\t\t\tpmaSlideInfos.put(pmaCoreLiteSessionID, new HashMap<String, Object>());\n\t\t\t\t}\n\t\t\t\tif (!pmaAmountOfDataDownloaded.containsKey(pmaCoreLiteSessionID)) {\n\t\t\t\t\tpmaAmountOfDataDownloaded.put(pmaCoreLiteSessionID, 0);\n\t\t\t\t}\n\t\t\t\treturn pmaCoreLiteSessionID;\n\t\t\t} else {\n\t\t\t\t// no stored PMA.core sessions found NOR PMA.core.lite\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "private String getTopcatSessionId() {\r\n HttpServletRequest request = this.getThreadLocalRequest();\r\n HttpSession session = request.getSession();\r\n String sessionId = null;\r\n if (session.getAttribute(\"SESSION_ID\") == null) { // First time login\r\n try {\r\n sessionId = userManager.login();\r\n session.setAttribute(\"SESSION_ID\", sessionId);\r\n } catch (AuthenticationException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n } else {\r\n sessionId = (String) session.getAttribute(\"SESSION_ID\");\r\n }\r\n return sessionId;\r\n }", "protected void onSessionStateChange(SessionState state, Exception exception) {\n }", "void sessionHeartbeat() throws IOException, InterruptedException;", "private void updateUserSession(int state) {\n // Update the current session.\n request.updateSession(state, offerTime.getTime());\n }", "public default void sessionCreated(HttpSessionEvent se) {\n }", "public int mo746p() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(47, obtain, obtain2, 0);\n obtain2.readException();\n return obtain2.readInt();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "public void mo753w() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n this.f822a.transact(22, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }" ]
[ "0.6643699", "0.6558465", "0.6536923", "0.64826316", "0.6482508", "0.6453398", "0.6444796", "0.63701075", "0.62509644", "0.62276894", "0.6175882", "0.61255395", "0.61255395", "0.6123394", "0.6120583", "0.60865086", "0.6074924", "0.60730606", "0.6068566", "0.6063978", "0.60465425", "0.6036987", "0.6029097", "0.6029097", "0.60227287", "0.60222614", "0.60012233", "0.5984893", "0.5950864", "0.59453374", "0.5940786", "0.59398144", "0.59343237", "0.5922181", "0.5912698", "0.5912339", "0.58972037", "0.58864844", "0.5884915", "0.58845013", "0.5864458", "0.5849141", "0.584902", "0.58426666", "0.5840137", "0.5822384", "0.5821097", "0.5814201", "0.5809137", "0.57938796", "0.5790722", "0.5779559", "0.57597184", "0.5754386", "0.57502204", "0.57488227", "0.5746163", "0.57413805", "0.57317054", "0.5706573", "0.57049316", "0.57", "0.5692235", "0.5692235", "0.5692235", "0.5692235", "0.5692142", "0.56918955", "0.5690694", "0.568807", "0.56657076", "0.56564283", "0.565248", "0.56400836", "0.5639142", "0.5636088", "0.5628879", "0.56284267", "0.56284267", "0.5623794", "0.5623282", "0.5616511", "0.56072325", "0.560387", "0.56033957", "0.56033933", "0.55971265", "0.5584788", "0.55847436", "0.5584488", "0.5582267", "0.55808794", "0.55807954", "0.55790013", "0.5569877", "0.55689013", "0.5565145", "0.55619204", "0.5561041", "0.55597115", "0.55485976" ]
0.0
-1
Given: a order request that won't match with anything (because market is empty)
@Test public void enterOrderWithUnmatchedActiveOrder() throws Exception { LimitOrderRequest limitOrderRequest = getLimitOrderRequest(Direction.BUY); LimitOrder referenceLimitOrder = getLimitOrder(); String orderRequestJsonString = jsonMapper.writeValueAsString(limitOrderRequest); //When: the order is posted to the service MvcResult postResponse = performEnterOrderPostRequest(orderRequestJsonString); OrderRequestResponse response = jsonMapper .readValue(postResponse.getResponse().getContentAsString(), OrderRequestResponse.class); Assert.assertEquals("Response should be successful", ResponseType.SUCCESS, response.getResponseType()); MvcResult getResponse = mvc.perform(get("/status") .contentType(MediaType.APPLICATION_JSON)) .andReturn(); PublicMarketStatus status = jsonMapper .readValue(getResponse.getResponse().getContentAsString(), PublicMarketStatus.class); //Then: the order is entered correctly in to the market List<Ticker> tickers = status.getOrders(); Assert.assertEquals("There is a ticker", 1, tickers.size()); Ticker ticker = tickers.get(0); Assert.assertEquals("Ticker name is correct", limitOrderRequest.getTicker(), ticker.getName()); Assert.assertTrue("Order is not in wrong queue", ticker.getSell().isEmpty()); Assert.assertEquals("Order is in right queue", 1, ticker.getBuy().size()); AbstractActiveOrder order = ticker.getBuy().get(0); Assert.assertEquals("Order is correct one", referenceLimitOrder, order); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TradeHistoryReq market(String market) {\n this.market = market;\n return this;\n }", "@Test\n\tpublic void testOrderWithoutShoppingCart() {\n\t\ttry {\n\t\t\tassertEquals(orderService.order(order), null);\n\t\t} catch (OrderException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void whenNoPricesForVendor_ThenAnEmptyResponseIsReturned() {\n getByInstrumentId(\"unknown\").isEqualTo(new Price[] {});\n }", "void matchAllOrders()throws OrderBookTradeException, \n OrderBookOrderException;", "@Test\n\tpublic void shouldNotGetCustomerWithWrongOrder()\n\t{\n\t\tfinal Response get = performGetCustomersWithDifferentQueries(\n\t\t\t\tImmutableMap.of(BASE_SITE_PARAM, BASE_SITE_ID, \"orderId\", \"wrong_order\"));\n\t\tassertResponse(Status.BAD_REQUEST, get);\n\t}", "private void defaultOrdersLineShouldNotBeFound(String filter) throws Exception {\n restOrdersLineMockMvc.perform(get(\"/api/orders-lines?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restOrdersLineMockMvc.perform(get(\"/api/orders-lines/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "void getMarketOrders();", "@Test\n public void enterOrderWithMatchedActiveOrderToCreateTrade() throws Exception {\n List<LimitOrderRequest> orderRequests = new ArrayList<>();\n orderRequests.add(getLimitOrderRequest(Direction.BUY));\n orderRequests.add(getLimitOrderRequest(Direction.SELL));\n\n Trade tradeReference = Trade.builder()\n .matchPrice(orderRequests.get(0).getLimit())\n .matchQuantity(orderRequests.get(0).getQuantity())\n .ticker(orderRequests.get(0).getTicker())\n .buyOrder(1)\n .sellOrder(2)\n .build();\n\n //When: the orders are posted to the service\n for (LimitOrderRequest orderRequest : orderRequests) {\n String orderRequestJsonString = jsonMapper.writeValueAsString(orderRequest);\n performEnterOrderPostRequest(orderRequestJsonString);\n }\n\n MvcResult getResponse = mvc.perform(get(\"/status\")\n .contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n\n PublicMarketStatus status = jsonMapper\n .readValue(getResponse.getResponse().getContentAsString(), PublicMarketStatus.class);\n\n //Then: the trade is shown correctly in the market and the orders disappear\n List<Ticker> tickers = status.getOrders();\n Assert.assertEquals(\"There is no ticker\", 0, tickers.size());\n\n List<Trade> trades = status.getTrades();\n Assert.assertEquals(\"There is a trade\", 1, trades.size());\n Trade trade = trades.get(0);\n Assert.assertEquals(\"Trade is correct one\", tradeReference, trade);\n\n }", "private void businessValidationForOnlinePaymentServiceRequestOrder(PaymentFeeLink order, OnlineCardPaymentRequest request) {\n Optional<BigDecimal> totalCalculatedAmount = order.getFees().stream().map(paymentFee -> paymentFee.getCalculatedAmount()).reduce(BigDecimal::add);\n if (totalCalculatedAmount.isPresent() && (totalCalculatedAmount.get().compareTo(request.getAmount()) != 0)) {\n throw new ServiceRequestExceptionForNoMatchingAmount(\"The amount should be equal to serviceRequest balance\");\n }\n\n //Business validation for amount due for fees\n Optional<BigDecimal> totalAmountDue = order.getFees().stream().map(paymentFee -> paymentFee.getAmountDue()).reduce(BigDecimal::add);\n if (totalAmountDue.isPresent() && totalAmountDue.get().compareTo(BigDecimal.ZERO) == 0) {\n throw new ServiceRequestExceptionForNoAmountDue(\"The serviceRequest has already been paid\");\n }\n }", "public void setMarket(String market) {\r\n this.market = market == null ? null : market.trim();\r\n }", "boolean checkOrderNotAcceptedYet(int idOrder);", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "Trade matchOrder(List<Order> buyList, List<Order> sellList) throws \n OrderBookOrderException, OrderBookTradeException;", "private void defaultMQuestSpecialRewardShouldNotBeFound(String filter) throws Exception {\n restMQuestSpecialRewardMockMvc.perform(get(\"/api/m-quest-special-rewards?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restMQuestSpecialRewardMockMvc.perform(get(\"/api/m-quest-special-rewards/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "@Test\n public void testMarketOrder() throws InterruptedException {\n setUp();\n testMatchingEngine.start();\n\n NewOrder nosB1 = createLimitOrder(\"BUY1\", Side.BUY, 100, 100.1, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB1);\n NewOrder nosB2 = createLimitOrder(\"BUY2\", Side.BUY, 200, 99.99, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB2);\n NewOrder nosB3 = createLimitOrder(\"BUY3\", Side.BUY, 300, 99.79, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB3);\n\n // Sell Order with Qty=150 and Market Order\n NewOrder nosS1 = createMarketOrder(\"SELL1\", Side.SELL, 700, System.currentTimeMillis());\n clientSession.sendNewOrder(nosS1);\n\n List<Event> msg = clientSession.getMessagesInQueue();\n assertEquals(7, msg.size());\n\n Trade t = ( Trade) msg.get(0);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(1);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(2);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(3);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(4);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n t = ( Trade) msg.get(5);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n Canceled t1 = ( Canceled) msg.get(6);\n assertEquals( t1.getCanceledQty() , 100 );\n }", "@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}", "@Test\n public void getNullCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.NULL_QUOTE_SYMBOL);\n assertTrue(comps.isEmpty());\n }", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "void rejectNewOrders();", "private void defaultPaymentShouldNotBeFound(String filter) throws Exception {\n restPaymentMockMvc.perform(get(\"/api/payments?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic int compareTo(BuyOrder order) {\n\t\treturn 0;\n\t}", "private void defaultStocksShouldNotBeFound(String filter) throws Exception {\n restStocksMockMvc.perform(get(\"/api/stocks?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restStocksMockMvc.perform(get(\"/api/stocks/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public void setMarketNo(String marketNo) {\r\n this.marketNo = marketNo == null ? null : marketNo.trim();\r\n }", "public void callMarket(OrderManagementContext orderManagementContext_);", "public String SendNewAutoTraderMarketDataRequest(String ticker) {\n\t\treturn null;\n\t}", "public boolean p4_canBeReturned(Order order) {\n\t\t//return true; // order.getOrderLines().stream() // INITIAL\n\t\t// SOLUTION(\n\t\treturn order.getOrderLines().stream()\n\t\t\t\t\t//.filter(OrderLine::wasDelivered) // Change: daca v-as fi spus ca doar orderline-urile livrate...\n\t\t\t\t\t.noneMatch(line -> line.isSpecialOffer());\n\t\t// SOLUTION)\n\t}", "void rejectOrder(String orderId);", "@Test\n public void testReturnPickUpRequest() {\n List<List<String>> orders = new ArrayList<>();\n ArrayList<String> order1 = new ArrayList<>();\n order1.add(\"White\");\n order1.add(\"SE\");\n orders.add(order1);\n ArrayList<String> order2 = new ArrayList<>();\n order2.add(\"Red\");\n order2.add(\"S\");\n orders.add(order2);\n ArrayList<String> order3 = new ArrayList<>();\n order3.add(\"Blue\");\n order3.add(\"SEL\");\n orders.add(order3);\n ArrayList<String> order4 = new ArrayList<>();\n order4.add(\"Beige\");\n order4.add(\"S\");\n orders.add(order4);\n PickUpRequest expected = new PickUpRequest(orders, translation);\n warehouseManager.makePickUpRequest(orders);\n assertEquals(expected.getSkus(), warehouseManager.returnPickUpRequest().getSkus());\n }", "List<Trade> getMyTrades(MyTradeRequest request);", "public static ObservableMarketDataFunction none() {\n return requirements -> ImmutableMap.of();\n }", "public String checkOrder(ArrayList<ArrayList<Furniture>> orders, boolean gui){\n ArrayList<ArrayList<Furniture>> last = new ArrayList<ArrayList<Furniture>>();\n // if the amount requested is larger than the amount of valid orders found then the request fails\n if(getRequestNum() > orders.size()){\n return printOutputFail(gui);\n }else{\n for(int i = 0; i < getRequestNum(); i++){\n last.add(orders.get(i));\n }\n deleteOrders(last);\n return printOutput(last, gui);\n }\n }", "public String getOpenOrders(String market) {\n\n\t\tString method = \"getopenorders\";\n\n\t\tif(market.equals(\"\"))\n\n\t\t\treturn getJson(API_VERSION, MARKET, method);\n\n\t\treturn getJson(API_VERSION, MARKET, method, returnCorrectMap(\"market\", market));\n\t}", "public void findOrderCanceledOrValidate() {\n log.info(\"OrdersBean : findOrderCanceledOrValidate\");\n\n FacesContext context = FacesContext.getCurrentInstance();\n\n log.info(\"requestOrdersList : \" + requestOrdersList);\n if ((requestOrdersList.equals(\"\")) || (!findOrdersCanceledOrValidateByIdOrder()) && (!findOrdersCanceledOrValidateByIdUser()) && (!findOrdersCanceledOrValidateByUsername())) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.ordersList.requestError\"), null));\n ordersEntities = Collections.emptyList();\n }\n }", "com.google.openrtb.OpenRtb.BidRequest getRequest();", "@Test\n public void testStoreSaleWrongInput() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"-1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n assertEquals(\"ERROR\", responseMsg);\n }", "List<ItemPriceDTO> findAllWhereProductIsNull();", "public void receiveOrder(MissMintOrder order) {\n\t\tAssert.notNull(order, \"order should not be null\");\n\n\t\tMissMintService service = serviceManager.getService(order);\n\t\tAssert.isTrue(orderService.isOrderAcceptable(service), \"service must be acceptable\");\n\t\titemCatalog.save(order.getItem());\n\n\t\torder.getOrderLines().forEach(orderLine ->\n\t\t\tfinanceService.add(\n\t\t\t\tmessages.get(\"orders.service.\" + orderLine.getProductName()) + \" \" + order.getId(),\n\t\t\t\torderLine.getPrice())\n\t\t);\n\n\t\tTimeTableEntry entry = timeTableService.createEntry(order);\n\t\torder.setExpectedFinished(entry.getDate());\n\t\torderManager.save(order);\n\t\tentryRepository.save(entry);\n\n\t\tServiceCategory serviceCategory = ServiceManager.getCategory(service);\n\t\tServiceConsumptionManager.serviceMatRelation.get(serviceCategory).forEach(x ->\n\t\t\t{\n\t\t\t\tString materialName = x.getFirst();\n\t\t\t\tQuantity quantity = x.getSecond();\n\t\t\t\tMaterial material = materialManager.fromName(materialName);\n\t\t\t\tUniqueInventoryItem item = materialInventory.findByProduct(material).orElseThrow(() -> new RuntimeException(\"could not find inventory item\"));\n\t\t\t\tmaterialManager.checkAndConsume(item.getId(), quantity.getAmount().intValue());\n\t\t\t}\n\t\t);\n\n\t}", "@Test\n void noRequestParamForOptionalBook() throws Exception {\n this.mvc.perform(get(\"/rp/optional_book\"))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$\").doesNotExist());\n }", "public void setBuyOrders(List<MarketOrder> buyOrders) {\n this.buyOrders = buyOrders;\n }", "@Test\n public void verifyNoOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 2);\n \tbasket.getProducts().put(product2, 1);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 8 items = 4.3 ==> \", (calculator.calculatePrice(basket) - 4.3) < 0.0001);\n }", "@Test\n\tpublic void constructTradeRequest() {\n\t\t\n\t\tTradeRequest tradeRequest = new TradeRequest();\n\t\t\n\t\tAssert.assertTrue(\"tradeRequest should not be null\", \n\t\t\t\ttradeRequest != null);\n\t\t\n\t\tAssert.assertFalse(\"tradeRequest is not null\", tradeRequest == null);\n\t}", "private void defaultCustomerShouldNotBeFound(String filter) throws Exception {\n restCustomerMockMvc.perform(get(\"/api/customers?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "@Test(expected = SymbolNotFoundException.class)\n public void getNullQuote() throws Exception {\n quoteService.getQuote(TestConfiguration.NULL_QUOTE_SYMBOL);\n }", "public void save_order_without_payment(String advert, String userWhoGive,String userWhoGet,Date date,Date start, Date finish,Float price);", "@Test\n public void testMarketTransaction ()\n {\n initializeService();\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.5, -45.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(3), 0.7, -43.0);\n assertEquals(0, accountingService.getPendingTariffTransactions().size(), \"no tariff tx\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n assertEquals(2, pending.size(), \"correct number in list\");\n MarketTransaction mtx = (MarketTransaction)pending.get(0);\n assertNotNull(mtx, \"first mtx not null\");\n assertEquals(2, mtx.getTimeslot().getSerialNumber(), \"correct timeslot id 0\");\n assertEquals(-45.0, mtx.getPrice(), 1e-6, \"correct price id 0\");\n Broker b1 = mtx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n mtx = (MarketTransaction)pending.get(1);\n assertNotNull(mtx, \"second mtx not null\");\n assertEquals(0.7, mtx.getMWh(), 1e-6, \"correct quantity id 1\");\n // broker market positions should have been updated already\n MarketPosition mp2 = bob.findMarketPositionByTimeslot(2);\n assertNotNull(mp2, \"should be a market position in slot 2\");\n assertEquals(0.5, mp2.getOverallBalance(), 1e-6, \".5 mwh in ts2\");\n MarketPosition mp3 = bob.findMarketPositionByTimeslot(3);\n assertNotNull(mp3, \"should be a market position in slot 3\");\n assertEquals(0.7, mp3.getOverallBalance(), 1e-6, \".7 mwh in ts3\");\n }", "public void setMarketName(String marketName) {\r\n this.marketName = marketName == null ? null : marketName.trim();\r\n }", "private void defaultRecommendationShouldNotBeFound(String filter) throws Exception {\n restRecommendationMockMvc.perform(get(\"/api/recommendations?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restRecommendationMockMvc.perform(get(\"/api/recommendations/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "@Test(expected=IllegalArgumentException.class)\r\n\tpublic void emptyFlightSearch() {\r\n\t\tList<FlightAbstract> flightResults = SearchEngine.flightSearch(newFlightSearch);\r\n\t}", "@Override\n\tpublic boolean queryReturnGoodsRequestEntityByCondition(String waybillNo) {\n\t\treturn false;\n\t}", "public void matchRecord(String buyRequestNo, String sellRequestNo, Integer buyId, Integer sellId, BigDecimal num,\n\t\t\tBigDecimal price, String symbol);", "@Test\n public void getOrderByIdTest() {\n Long orderId = 10L;\n Order response = api.getOrderById(orderId);\n Assert.assertNotNull(response);\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/order/10\")));\n }", "@Test\n public void testOrderFactoryEmpty() {\n OrderController orderController = orderFactory.getOrderController();\n assertEquals(0, orderController.getOrders().size());\n }", "@Test\n public void placeOrderTest() {\n Order body = new Order().id(10L)\n .petId(10L)\n .complete(false)\n .status(Order.StatusEnum.PLACED)\n .quantity(1);\n Order response = api.placeOrder(body);\n\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n Assert.assertEquals(true, response.isComplete());\n Assert.assertEquals(Order.StatusEnum.APPROVED, response.getStatus());\n\n verify(exactly(1), postRequestedFor(urlEqualTo(\"/store/order\")));\n }", "private void prepareNoResponse() {\n when(mSentenceDataRepository.getTodaysSentenceResponse()).thenReturn(null);\n }", "@Test\n\tpublic void authenticateBuyerInvalid() throws InfyMarketException {\n\t\tList<Buyer> buyerList = new ArrayList<Buyer>();\n\n\t\tBuyer buyerEntity = new Buyer();\n//\t\tbuyerEntity.setBuyerid(\"B10\");\n//\t\tbuyerEntity.setEmail(\"madhuri@gmail\");\n//\t\tbuyerEntity.setName(\"Madhuri\");\n//\t\tbuyerEntity.setPassword(\"Madhu@123\");\n//\t\tbuyerEntity.setPhoneno(\"9009009001\");\n//\t\tbuyerEntity.setIsprivileged(true);\n//\t\tbuyerEntity.setIsactive(true);\n//\t\tbuyerEntity.setRewardpoints(20000);\n\n\t\tbuyerEntity.setBuyerid(\"B10\");\n\t\tbuyerEntity.setEmail(\"madhuri\");\n\t\tbuyerEntity.setName(\"Madhi\");\n\t\tbuyerEntity.setPassword(\"adhu@123\");\n\t\tbuyerEntity.setPhoneno(\"909009001\");\n\t\tbuyerEntity.setIsprivileged(true);\n\t\tbuyerEntity.setIsactive(true);\n\t\tbuyerEntity.setRewardpoints(20000);\n\t\t\n\t\tbuyerList.add(buyerEntity);\n\t\tOptional opt = Optional.of(buyerEntity);// Valid\n\n\t\tOptional opt1 = Optional.empty();// Invalid\n\n\t\tMockito.when(buyerRepository.findById(Mockito.anyString())).thenReturn(opt1);\n\n//\t\tMockito.when(buyerRepository.findAll()).thenReturn(buyerList);\n\t\tList<BuyerDTO> rePlans = buyerService.getAllBuyer();\n\t\tAssertions.assertEquals(rePlans.isEmpty(), buyerList.isEmpty());\n\t}", "List<Order> getHistoryOrders(HistoryOrderRequest orderRequest);", "@Test(groups = \"fast\")\n public void testGetAddressesEmpty() {\n assertEquals(new VertexResponseDataExtractor(new ApiSuccessResponseTransactionResponseTypeData()\n .customer(null))\n .getAddresses().size(), 0);\n\n // when no customer destination\n assertEquals(new VertexResponseDataExtractor(new ApiSuccessResponseTransactionResponseTypeData()\n .customer(new CustomerType().destination(null)))\n .getAddresses().size(), 0);\n\n // when no tax-registration physical address\n assertEquals(new VertexResponseDataExtractor(new ApiSuccessResponseTransactionResponseTypeData().customer(\n new CustomerType().taxRegistrations(Collections.singletonList(\n new TaxRegistrationType().physicalLocations(null))))).getAddresses().size(), 0);\n\n // when no tax-registrations\n assertEquals(new VertexResponseDataExtractor(new ApiSuccessResponseTransactionResponseTypeData().customer(\n new CustomerType().taxRegistrations(ImmutableList.of()))).getAddresses().size(), 0);\n\n }", "@Test\n public void testPayUnpaidOrderFails() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // issue an order\n int orderId = shop.issueOrder(productCode, 10, 1);\n\n // trying to pay for an order with receiveCashPayment fails\n assertEquals(-1, shop.receiveCashPayment(orderId, 10), 0.001);\n\n // verify order is still in ISSUED state\n assertEquals(\"ISSUED\", shop.getAllOrders().stream()\n .filter(b -> b.getBalanceId() == orderId)\n .map(Order::getStatus)\n .findAny()\n .orElse(null));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public void completeTx(SendRequest req) throws InsufficientMoneyException {\n try {\n checkArgument(!req.completed, \"Given SendRequest has already been completed.\");\n // Calculate the amount of value we need to import.\n Coin value = Coin.ZERO;\n for (TransactionOutput output : req.tx.getOutputs()) {\n value = value.add(output.getValue());\n }\n\n log.info(\"Completing send tx with {} outputs totalling {} and a fee of {}/kB\", req.tx.getOutputs().size(),\n value.toFriendlyString(), req.feePerKb.toFriendlyString());\n\n // If any inputs have already been added, we don't need to get their value from wallet\n Coin totalInput = Coin.ZERO;\n for (TransactionInput input : req.tx.getInputs())\n if (input.getConnectedOutput() != null)\n totalInput = totalInput.add(input.getConnectedOutput().getValue());\n else\n log.warn(\"SendRequest transaction already has inputs but we don't know how much they are worth - they will be added to fee.\");\n value = value.subtract(totalInput);\n\n List<TransactionInput> originalInputs = new ArrayList<TransactionInput>(req.tx.getInputs());\n\n // Check for dusty sends and the OP_RETURN limit.\n if (req.ensureMinRequiredFee && !req.emptyWallet) { // Min fee checking is handled later for emptyWallet.\n int opReturnCount = 0;\n for (TransactionOutput output : req.tx.getOutputs()) {\n if (output.isDust())\n throw new DustySendRequested();\n if (output.getScriptPubKey().isOpReturn())\n ++opReturnCount;\n }\n if (opReturnCount > 1) // Only 1 OP_RETURN per transaction allowed.\n throw new MultipleOpReturnRequested();\n }\n\n // Calculate a list of ALL potential candidates for spending and then ask a coin selector to provide us\n // with the actual outputs that'll be used to gather the required amount of value. In this way, users\n // can customize coin selection policies. The call below will ignore immature coinbases and outputs\n // we don't have the keys for.\n List<TransactionOutput> candidates = calculateAllSpendCandidates(true, req.missingSigsMode == MissingSigsMode.THROW);\n\n CoinSelection bestCoinSelection;\n TransactionOutput bestChangeOutput = null;\n List<Coin> updatedOutputValues = null;\n if (!req.emptyWallet) {\n // This can throw InsufficientMoneyException.\n FeeCalculation feeCalculation = calculateFee(req, value, originalInputs, req.ensureMinRequiredFee, candidates);\n bestCoinSelection = feeCalculation.bestCoinSelection;\n bestChangeOutput = feeCalculation.bestChangeOutput;\n updatedOutputValues = feeCalculation.updatedOutputValues;\n } else {\n // We're being asked to empty the wallet. What this means is ensuring \"tx\" has only a single output\n // of the total value we can currently spend as determined by the selector, and then subtracting the fee.\n checkState(req.tx.getOutputs().size() == 1, \"Empty wallet TX must have a single output only.\");\n CoinSelector selector = req.coinSelector == null ? coinSelector : req.coinSelector;\n bestCoinSelection = selector.select(params.getMaxMoney(), candidates);\n candidates = null; // Selector took ownership and might have changed candidates. Don't access again.\n req.tx.getOutput(0).setValue(bestCoinSelection.valueGathered);\n log.info(\" emptying {}\", bestCoinSelection.valueGathered.toFriendlyString());\n }\n\n for (TransactionOutput output : bestCoinSelection.gathered)\n req.tx.addInput(output);\n\n if (req.emptyWallet) {\n final Coin feePerKb = req.feePerKb == null ? Coin.ZERO : req.feePerKb;\n if (!adjustOutputDownwardsForFee(req.tx, bestCoinSelection, feePerKb, req.ensureMinRequiredFee))\n throw new CouldNotAdjustDownwards();\n }\n\n if (updatedOutputValues != null) {\n for (int i = 0; i < updatedOutputValues.size(); i++) {\n req.tx.getOutput(i).setValue(updatedOutputValues.get(i));\n }\n }\n\n if (bestChangeOutput != null) {\n req.tx.addOutput(bestChangeOutput);\n log.info(\" with {} change\", bestChangeOutput.getValue().toFriendlyString());\n }\n\n // Now shuffle the outputs to obfuscate which is the change.\n if (req.shuffleOutputs)\n req.tx.shuffleOutputs();\n\n // Now sign the inputs, thus proving that we are entitled to redeem the connected outputs.\n if (req.signInputs)\n signTransaction(req);\n\n // Check size.\n final int size = req.tx.unsafeUlordSerialize().length;\n if (size > UldTransaction.MAX_STANDARD_TX_SIZE)\n throw new ExceededMaxTransactionSize();\n\n // Label the transaction as being a user requested payment. This can be used to render GUI wallet\n // transaction lists more appropriately, especially when the wallet starts to generate transactions itself\n // for internal purposes.\n req.tx.setPurpose(UldTransaction.Purpose.USER_PAYMENT);\n // Record the exchange rate that was valid when the transaction was completed.\n req.tx.setMemo(req.memo);\n req.completed = true;\n log.info(\" completed: {}\", req.tx);\n } finally {\n }\n }", "@Override\n public void matchOrders() throws IOException, MissingEntityException, InvalidEntityException {\n List<Order> buyOrders = getOrdersBySideAndStatus(true, ACTIVE);\n List<Order> sellOrders = getOrdersBySideAndStatus(false, ACTIVE);\n for (Order buyOrder : buyOrders) {\n for (Order sellOrder : sellOrders) {\n checkForMatch(buyOrder, sellOrder);\n }\n }\n }", "public void submitOrder(BeverageOrder order);", "public abstract void msgCanOnlyDeliverPartial(Market market, Food food, int amountDeliverable);", "public String getMarket() {\r\n return market;\r\n }", "boolean checkForUnfinishedOrders (int userId) throws ServiceException;", "void cancelOrder(String orderKey);", "public void ExecuteSellOrder() throws SQLException, InvalidOrderException, InvalidAssetException, NegativePriceException, UnitException {\n // Current asset instance\n Asset currentAsset = Asset.findAsset(this.assetID);\n\n // Check if just ordered asset has corresponding order\n\n // Find buy orders of same asset\n Statement smt = connection.createStatement();\n String sqlFindOrder\n = \"SELECT * FROM orders WHERE assetID = '\" + assetID + \"' and orderType = 'BUY' \" +\n \"and orderStatus = 'INCOMPLETE' and unitID != '\" + this.unitID + \"' \" +\n \"ORDER BY orderTime;\";\n ResultSet buyOrders = smt.executeQuery(sqlFindOrder);\n\n // List to store corresponding buy orders of the same asset\n ArrayList<Order> matchingOrders = new ArrayList<>();\n\n // Add queried rows as new Buy Orders in list\n while (buyOrders.next()) {\n matchingOrders.add(\n new BuyOrder(\n buyOrders.getString(\"orderID\"),\n buyOrders.getString(\"userID\"),\n buyOrders.getString(\"unitID\"),\n buyOrders.getString(\"assetID\"),\n buyOrders.getString(\"orderTime\").substring(0,19),\n OrderStatus.valueOf(buyOrders.getString(\"orderStatus\")),\n OrderType.valueOf(buyOrders.getString(\"orderType\")),\n buyOrders.getDouble(\"orderPrice\"),\n buyOrders.getInt(\"orderQuantity\"),\n buyOrders.getInt(\"quantFilled\"),\n buyOrders.getInt(\"quantRemain\")\n )\n );\n }\n\n // Remove orders if the buy bid is less than the sell ask\n matchingOrders.removeIf(buys -> (buys.orderPrice < this.orderPrice));\n\n // List to store required orders that can fully/partially or completely not fill order\n ArrayList<Order> requiredOrders = new ArrayList<>();\n\n // Required asset amount to facilitate quantity of this order\n int requiredQuant = this.quantRemain;\n\n // Loop through orders matching conditions and append as many orders possible to\n // fully/partially facilitate this order\n for (int i = 0; i < matchingOrders.size(); i++) {\n // Stores quantity of current order in matchingOrders list\n int quantity = matchingOrders.get(i).quantRemain;\n if (requiredQuant > 0) {\n requiredOrders.add(matchingOrders.get(i));\n requiredQuant -= quantity;\n } else if (requiredQuant <= 0) {\n break;\n }\n }\n\n // If requiredOrders is filled it can either\n // - Have enough buy orders to fully facilitate the sell order\n // * Complete sell order (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Update buyer and seller inventory numbers\n // * Change buy order (INCOMPLETE, quantFilled, quantRemain)\n // - Have enough buy orders to partially fill the sell order\n // * Complete the corresponding buy order/s (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Change sell order (INCOMPLETE, change quant remain, change quant filled)\n // * Add inventory entry and update corresponding inventory numbers\n\n for (int i = 0; i < requiredOrders.size(); i++) {\n // How much this order has remaining to fill\n int sellQuant = this.quantRemain;\n // How much can this corresponding order faciliate of this order\n int buyQuant = requiredOrders.get(i).quantRemain;\n\n // Track executed quantity\n int executed = 0;\n\n if (buyQuant > sellQuant) {\n // When this order has more than the quantity required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n\n } else if (buyQuant == sellQuant) {\n // When this order has exactly the same amount required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n this.ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n } else {\n // When this order has less than required amount to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += requiredOrders.get(i).quantRemain;\n this.quantRemain -= requiredOrders.get(i).quantRemain;\n\n assert this.quantRemain + this.quantFilled == this.orderQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= buyQuant;\n requiredOrders.get(i).quantFilled += buyQuant;\n executed = buyQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n ChangeStatus(OrderStatus.INCOMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n }\n\n // Change asset price\n currentAsset.SetPrice(requiredOrders.get(i).orderPrice);\n\n // Change inventory amounts\n new InventoryItem(this.unitID, this.assetID, requiredOrders.get(i).orderPrice, -executed, this.orderID);\n new InventoryItem(requiredOrders.get(i).unitID, requiredOrders.get(i).assetID, requiredOrders.get(i).orderPrice, executed, requiredOrders.get(i).orderID);\n\n // Set credit balance of units\n Unit sellerUnit = Unit.getUnit(this.unitID);\n sellerUnit.ChangeUnitBalance(this.unitID, requiredOrders.get(i).orderPrice * executed);\n Unit buyerUnit = Unit.getUnit(requiredOrders.get(i).unitID);\n buyerUnit.ChangeUnitBalance(requiredOrders.get(i).unitID, -requiredOrders.get(i).orderPrice * executed);\n }\n\n // If requiredOrders is empty, no current buy orders are able to facilitate sell order\n\n // Modify watchlist balances\n\n }", "public ArrayList<ArrayList<Furniture>> produceOrder(){\n ArrayList<ArrayList<Furniture>> orders = new ArrayList<ArrayList<Furniture>>();\n ArrayList<ArrayList<Furniture>> all = getSubsets(getFoundFurniture());\n ArrayList<ArrayList<Furniture>> valid = getValid(all);\n ArrayList<ArrayList<Furniture>> orderedCheapest = comparePrice(valid);\n\n int n = 0;\n boolean set;\n // adding up to the number requested\n while(n != getRequestNum()){\n for(int i = 0; i < orderedCheapest.size(); i++){\n set = true;\n for(int j = 0; j < orderedCheapest.get(i).size(); j++){\n // looking at furniture item\n for(ArrayList<Furniture> furn : orders){\n // if the list of orders already contains an id dont add that furniture combo to the order\n if(furn.contains(orderedCheapest.get(i).get(j))){\n set = false;\n }\n }\n }\n if(set){\n orders.add(orderedCheapest.get(i));\n }\n }\n n++;\n }\n return orders;\n }", "@Test\n\tpublic void equalsTest() {\n\t\t\n\t\tString offeredCollectionIdOne = \"1\";\n\t\tString userIdOne = \"1\";\n\t\t\n\t\tTradeRequest firstRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, userIdOne);\n\t\t\n\t\tString requestIdOne = \"1\";\n\t\tfirstRequest.setRequestId(requestIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Request should not equal null\", \n\t\t\t\tfirstRequest != null);\n\t\t\n\t\tTradeRequest equalRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdOne);\n\t\t\n\t\tequalRequest.setRequestId(requestIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Requests should be equal if they have the same \" + \n\t\t\t\t\"collectionId and user id\", \n\t\t\t\tfirstRequest.equals(equalRequest));\n\t\t\n\t\tString offeredCollectionIdTwo = \"2\";\n\t\tString userIdTwo = \"2\";\n\t\t\n\t\tTradeRequest requestIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tString requestIdTwo = \"2\";\n\t\trequestIdDifferentRequest.setRequestId(requestIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if requestIds are \" + \n\t\t\t\t\"different\", !firstRequest.equals(requestIdDifferentRequest));\n\t\t\n\t\tTradeRequest collectionIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdTwo, \n\t\t\t\t\t\tuserIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if collectionIds are \" + \n\t\t\t\t\"different\", \n\t\t\t\t!firstRequest.equals(collectionIdDifferentRequest));\n\t\t\n\t\tTradeRequest userIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if userIds are \" + \n\t\t\t\t\"different\", \n\t\t\t\t!firstRequest.equals(userIdDifferentRequest));\n\t\t\n\t\t\n\t\tTradeRequest idsDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdTwo, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if collectionIds and \" + \"\"\n\t\t\t\t+ \"userIds are different\", \n\t\t\t\t!firstRequest.equals(idsDifferentRequest));\n\t}", "private OrderRequest buildRequestBody(OriginalOrder originalOrder) {\n String currency = \"MXN\";\n\n OrderRequest orderRequest = new OrderRequest();\n orderRequest.intent(originalOrder.getIntent());\n\n ApplicationContext applicationContext = new ApplicationContext()\n .brandName(originalOrder.getBrandName())\n .landingPage(originalOrder.getLandingPage())\n .shippingPreference(originalOrder.getShippingPreference());\n orderRequest.applicationContext(applicationContext);\n System.out.println(\"item Category: \"+ originalOrder.getItems().get(0).getCategory());\n List<PurchaseUnitRequest> purchaseUnitRequests = new ArrayList<PurchaseUnitRequest>();\n PurchaseUnitRequest purchaseUnitRequest = new PurchaseUnitRequest()\n .referenceId(originalOrder.getReferenceId())\n .description(originalOrder.getDescription())\n .customId(originalOrder.getCustomId())\n .softDescriptor(originalOrder.getSoftDescriptor())\n .amount(new AmountWithBreakdown().currencyCode(currency).value(originalOrder.getTotal())\n .breakdown(\n new AmountBreakdown().itemTotal(new Money().currencyCode(currency).value(originalOrder.getTotal()))\n .shipping(new Money().currencyCode(currency).value(originalOrder.getShipping()))\n .handling(new Money().currencyCode(currency).value(originalOrder.getHandling()))\n .taxTotal(new Money().currencyCode(currency).value(originalOrder.getTaxTotal()))\n .shippingDiscount(new Money().currencyCode(currency).value(originalOrder.getShippingDiscount()))))\n .items(new ArrayList<Item>() {\n {\n add(new Item()\n .name(originalOrder.getItems().get(0).getName())\n .description(originalOrder.getItems().get(0).getDescription())\n .sku(originalOrder.getItems().get(0).getSku())\n .unitAmount(new Money().currencyCode(currency).value(originalOrder.getItems().get(0).getUnitAmount()))\n .tax(new Money().currencyCode(currency).value(originalOrder.getItems().get(0).getTax()))\n .quantity(originalOrder.getItems().get(0).getQuantity())\n .category(originalOrder.getItems().get(0).getCategory()));\n }\n })\n .shipping(new ShippingDetails().name(new Name().fullName(originalOrder.getAddress().getName()))\n .addressPortable(new AddressPortable()\n .addressLine1(originalOrder.getAddress().getAddressLine1())\n .addressLine2(originalOrder.getAddress().getAddressLine2())\n .adminArea2(originalOrder.getAddress().getAdminArea2())\n .adminArea1(originalOrder.getAddress().getAdminArea1())\n .postalCode(originalOrder.getAddress().getPostalCode())\n .countryCode(originalOrder.getAddress().getCountryCode())));\n System.out.println(\"purchaseUnitRequest: \\n\" +\n \"\\ndescription \"+ purchaseUnitRequest.description() +\n \"\\nreferenceId \"+ purchaseUnitRequest.referenceId() +\n \"\\nsoftDescriptor \"+ purchaseUnitRequest.softDescriptor() +\n \"\\namount currencyCode \"+ purchaseUnitRequest.amount().currencyCode() +\n \"\\namount value\"+ purchaseUnitRequest.amount().value() +\n \"\\namount taxTotal \"+ purchaseUnitRequest.amount().breakdown().taxTotal().value() +\n \"\\namount handling \"+ purchaseUnitRequest.amount().breakdown().handling().value() +\n \"\\namount shipping \"+ purchaseUnitRequest.amount().breakdown().shipping().value() +\n \"\\namount shippingDiscount \"+ purchaseUnitRequest.amount().breakdown().shippingDiscount().value() +\n \"\\namount itemTotal \"+ purchaseUnitRequest.amount().breakdown().itemTotal().value()\n );\n purchaseUnitRequests.add(purchaseUnitRequest);\n orderRequest.purchaseUnits(purchaseUnitRequests);\n System.out.println(\"Request: \" + orderRequest.toString());\n return orderRequest;\n }", "public void haltMarket(OrderManagementContext orderManagementContext_);", "@Test\n public void testGetByKeyEmpty() throws Exception {\n thrown.expect(ProductNotFoundException.class);\n thrown.expectMessage(\"Product with key \" + this.product.getKey() + \" not found!\");\n\n when(repository.findByKey(this.product.getKey())).thenReturn(Optional.empty());\n service.getByKey(this.product.getKey());\n }", "private void defaultRestaurantShouldNotBeFound(String filter) throws Exception {\n restRestaurantMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restRestaurantMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "CancelOrderResponse cancelOrder(CancelOrderRequest cancelOrderRequest);", "private void defaultFillingGapsTestItemShouldNotBeFound(String filter) throws Exception {\n restFillingGapsTestItemMockMvc.perform(get(\"/api/filling-gaps-test-items?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "@Test\n public void test_whenUnknownRequest_itIsFlagged() {\n EntityV1 uknownRequest = EntityV1.newBuilder()\n .setUuid(UUID.randomUUID().toString())\n .setEntryDate(System.currentTimeMillis())\n .setEntityTypeName(\"dummy\")\n .setEntitySubdomainName(\"dummy\")\n .setEntityIdInSubdomain(\"dummy\")\n .build();\n\n commandProcessor.process(\"dummy\", uknownRequest);\n\n // Nothing should be stored.\n verifyZeroInteractions(entityKVStateStoreMock);\n // Nothing should be forwarded.\n verify(processorContextMock).getStateStore(any());\n verifyNoMoreInteractions(processorContextMock);\n }", "private void defaultInvoiceShouldNotBeFound(String filter) throws Exception {\n restInvoiceMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restInvoiceMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "com.exacttarget.wsdl.partnerapi.QueryRequest getQueryRequest();", "private void defaultPosicionShouldNotBeFound(String filter) throws Exception {\n restPosicionMockMvc.perform(get(\"/api/posicions?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restPosicionMockMvc.perform(get(\"/api/posicions/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "@Test\n public void testAddOrder() throws Exception {\n String stringDate1 = \"06272017\";\n LocalDate date = LocalDate.parse(stringDate1, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n Orders order1 = new Orders(2);\n order1.setOrderNumber(2);\n order1.setDate(date);\n order1.setCustomerName(\"Joel\");\n order1.setArea(new BigDecimal(\"250\"));\n Tax tax1 = new Tax(\"PA\");\n tax1.setState(\"PA\");\n order1.setTax(tax1);\n Product product1 = new Product(\"Wood\");\n product1.setProductType(\"Wood\");\n order1.setProduct(product1);\n service.addOrder(order1);\n\n assertEquals(new BigDecimal(\"4.75\"), service.getOrder(order1.getDate(), order1.getOrderNumber()).getProduct().getLaborCostPerSqFt());\n assertEquals(new BigDecimal(\"6.75\"), service.getOrder(order1.getDate(), order1.getOrderNumber()).getTax().getTaxRate());\n\n//Testing with invalid data\n Orders order2 = new Orders(2);\n order2.setOrderNumber(2);\n order2.setDate(date);\n order2.setCustomerName(\"Eric\");\n order2.setArea(new BigDecimal(\"250\"));\n Tax tax2 = new Tax(\"MN\");\n tax2.setState(\"MN\");\n order2.setTax(tax2);\n Product product = new Product(\"Carpet\");\n product.setProductType(\"Carpet\");\n order2.setProduct(product);\n try {\n service.addOrder(order2);\n fail(\"Expected exception was not thrown\");\n } catch (FlooringMasteryPersistenceException | InvalidProductAndStateException | InvalidProductException | InvalidStateException e) {\n }\n\n }", "private void defaultMQuestSpecialRewardShouldBeFound(String filter) throws Exception {\n restMQuestSpecialRewardMockMvc.perform(get(\"/api/m-quest-special-rewards?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(mQuestSpecialReward.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].groupId\").value(hasItem(DEFAULT_GROUP_ID)))\n .andExpect(jsonPath(\"$.[*].weight\").value(hasItem(DEFAULT_WEIGHT)))\n .andExpect(jsonPath(\"$.[*].rank\").value(hasItem(DEFAULT_RANK)))\n .andExpect(jsonPath(\"$.[*].contentType\").value(hasItem(DEFAULT_CONTENT_TYPE)))\n .andExpect(jsonPath(\"$.[*].contentId\").value(hasItem(DEFAULT_CONTENT_ID)))\n .andExpect(jsonPath(\"$.[*].contentAmount\").value(hasItem(DEFAULT_CONTENT_AMOUNT)));\n\n // Check, that the count call also returns 1\n restMQuestSpecialRewardMockMvc.perform(get(\"/api/m-quest-special-rewards/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "boolean isOrderCertain();", "void pay(Order order);", "public String getOrderDetails(String symbol,String currency) \r\n\t{\r\n\t\t//timestamp is mandatory one \t\t\r\n\t\tWebTarget target = getTarget().path(RESOURCE_OPENORDER);\r\n\t\t Map<String, String> postData = new TreeMap<String, String>();\r\n\t\t//symbol is not mandatory one\r\n\t\tif(symbol!= null && !symbol.equalsIgnoreCase(\"\") && currency!=null && !currency.equalsIgnoreCase(\"\")) \r\n\t\t{\r\n\t\t\t postData.put(CURRENCY_PAIR, getSymbolForExchange(symbol,currency));\r\n\t\t}\t\r\n\t\t\r\n String queryString = buildQueryString(postData);\r\n TradeLogger.LOGGER.finest(\"QueryString to generate the signature \" + queryString);\t\r\n \r\n\t\tString signature = generateSignature(queryString);\r\n\t\tTradeLogger.LOGGER.finest(\"Signature Genereated \" + signature);\r\n\t\tString returnValue= null;\r\n\t\tif(signature!= null )\r\n\t\t{\t\r\n\t\t\ttarget = addParametersToRequest(postData, target);\r\n\t\t\tTradeLogger.LOGGER.finest(\"Final Request URL : \"+ target.getUri().toString());\r\n\t\t\tResponse response = target.request(MediaType.APPLICATION_JSON).header(APIKEY_HEADER_KEY,API_KEY).header(\"Sign\", signature).get();\r\n\t\t\t\t\r\n\t\t\tif(response.getStatus() == 200) \r\n\t\t\t{\r\n\t\t\t\treturnValue = response.readEntity(String.class);\r\n\t\t\t\tTradeLogger.LOGGER.info(returnValue);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tTradeLogger.LOGGER.severe(\"Response Code \" + response.getStatus());\r\n\t\t\t\tTradeLogger.LOGGER.severe(\"Response Data \" + response.readEntity(String.class));\r\n\t\t\t}\r\n\t\t\tresponse.close();\r\n\t\t}\r\n\t\treturn returnValue;\r\n\r\n\t}", "Order getOrderStatus(OrderStatusRequest orderStatusRequest);", "public SveaRequest<SveaCloseOrder> prepareRequest() {\n String errors = validateRequest();\n \n if (!errors.equals(\"\")) {\n throw new SveaWebPayException(\"Validation failed\", new ValidationException(errors));\n }\n \n // build inspectable request object and insert into order builder\n SveaCloseOrder sveaCloseOrder = new SveaCloseOrder();\n sveaCloseOrder.Auth = getStoreAuthorization();\n SveaCloseOrderInformation orderInfo = new SveaCloseOrderInformation();\n orderInfo.SveaOrderId = order.getOrderId();\n sveaCloseOrder.CloseOrderInformation = orderInfo;\n \n SveaRequest<SveaCloseOrder> object = new SveaRequest<SveaCloseOrder>();\n object.request = sveaCloseOrder;\n \n return object;\n }", "@GetMapping(\"/items\")\n public List<Items> getAllItems(@RequestParam(required = false) String filter) {\n if (\"reviewreveals-is-null\".equals(filter)) {\n log.debug(\"REST request to get all Itemss where reviewReveals is null\");\n return StreamSupport\n .stream(itemsRepository.findAll().spliterator(), false)\n .filter(items -> items.getReviewReveals() == null)\n .collect(Collectors.toList());\n }\n log.debug(\"REST request to get all Items\");\n return itemsRepository.findAll();\n }", "private void checkoutNotEmptyBag() {\n\t\tSystem.out.println(\"Checking out \" + bag.getSize() + \" items.\");\n\t\tbag.print();\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tdouble salesPrice = bag.salesPrice();\n\t\tSystem.out.println(\"*Sales total: $\" + df.format(salesPrice));\n\t\tdouble salesTax = bag.salesTax();\n\t\tSystem.out.println(\"*Sales tax: $\" + df.format(salesTax));\n\t\tdouble totalPrice = salesPrice + salesTax;\n\t\tSystem.out.println(\"*Total amount paid: $\" + df.format(totalPrice));\n\t\tbag = new ShoppingBag(); // Empty bag after checking out.\n\t}", "private void defaultPaymentShouldBeFound(String filter) throws Exception {\n restPaymentMockMvc.perform(get(\"/api/payments?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(payment.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].type\").value(hasItem(DEFAULT_TYPE.toString())))\n .andExpect(jsonPath(\"$.[*].cartName\").value(hasItem(DEFAULT_CART_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].cardNumber\").value(hasItem(DEFAULT_CARD_NUMBER.toString())))\n .andExpect(jsonPath(\"$.[*].expiryMonth\").value(hasItem(DEFAULT_EXPIRY_MONTH)))\n .andExpect(jsonPath(\"$.[*].expiryYear\").value(hasItem(DEFAULT_EXPIRY_YEAR)))\n .andExpect(jsonPath(\"$.[*].cvc\").value(hasItem(DEFAULT_CVC)))\n .andExpect(jsonPath(\"$.[*].holderName\").value(hasItem(DEFAULT_HOLDER_NAME.toString())));\n }", "public static void verifyPlaceStoreOrderResponse(Response response, long expectedId, long expectedPetId, int expectedQuantity, String expectedShipDate, String expectedStatus, boolean expectedCompleted) {\n verifySuccessStatusCodeInPlaceStoreOrderResponse(response);\n\n StoreOrderResponse storeOrderResponse = response.as(StoreOrderResponse.class);\n\n long actualId = storeOrderResponse.getId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - id, Actual: \" + actualId + \" , Expected: \" + expectedId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualId, expectedId, \"Place Store Order service response - id field error\");\n\n long actualPetId = storeOrderResponse.getPetId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - pet id, Actual: \" + actualPetId + \" , Expected: \" + expectedPetId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualPetId, expectedPetId, \"Place Store Order service response - pet id field error\");\n\n int actualQuantity = storeOrderResponse.getQuantity();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - quantity, Actual: \" + actualQuantity + \" , Expected: \" + expectedQuantity);\n MicroservicesEnvConfig.softAssert.assertEquals(actualQuantity, expectedQuantity, \"Place Store Order service response - quantity field error\");\n\n String actualShipDate = storeOrderResponse.getShipDate().substring(0,23);\n expectedShipDate = expectedShipDate.replace(\"Z\", \"\");\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - ship date, Actual: \" + actualShipDate + \" , Expected: \" + expectedShipDate);\n MicroservicesEnvConfig.softAssert.assertEquals(actualShipDate, expectedShipDate, \"Place Store Order service response - ship date field error\");\n\n String actualStatus = storeOrderResponse.getStatus();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - status, Actual: \" + actualStatus + \" , Expected: \" + expectedStatus);\n MicroservicesEnvConfig.softAssert.assertEquals(actualStatus, expectedStatus, \"Place Store Order service response - status field error\");\n\n boolean actualCompleted = storeOrderResponse.isComplete();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - complete, Actual: \" + actualCompleted + \" , Expected: \" + expectedCompleted);\n MicroservicesEnvConfig.softAssert.assertEquals(actualCompleted, expectedCompleted, \"Place Store Order service response - complete field error\");\n }", "public Market() {\n }", "private void defaultReservationShouldNotBeFound(String filter) throws Exception {\n restReservationMockMvc.perform(get(ReservationController.BASE_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.data.content\").isArray())\n .andExpect(jsonPath(\"$.data.content\").isEmpty());\n\n }", "@GetMapping(path = \"/orders/unassigned\")\n Iterable<ShopOrder> getUnassignedOrders(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "@Test\n public void testEquality() {\n final Decimal P1 = new Decimal(700);\n final Decimal A1 = new Decimal(15.2);\n final int C1 = 5;\n Order o1 = new Order(P1, A1, C1);\n assertFalse(o1.equals(null));\n Order o2 = new Order(P1, A1, C1);\n assertTrue(o1.equals(o2));\n \n final Decimal P2 = new Decimal(0.0000000007);\n final Decimal A2 = new Decimal(15.2);\n final int C2 = 4;\n o2 = new Order(P2, A2, C2);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, C2);\n assertTrue(o1.equals(o2));\n\n // Try null count\n o2 = new Order(P2, A2, null);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n o1 = new Order(P2, A2, 0);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, -1);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n // Try both with null count\n o1 = new Order(P2, A2, null);\n assertTrue(o2.equals(o1));\n \n }", "com.google.openrtb.OpenRtb.BidRequestOrBuilder getRequestOrBuilder();", "@Test\n public void testGetOrderBook() throws Exception {\n String orderBook =\n new String(\n Files.readAllBytes(\n Paths.get(ClassLoader.getSystemResource(\"order-book.json\").toURI())));\n\n when(streamingService.subscribeChannel(eq(\"order_book-BTC_EUR\"), eq(\"order_book\")))\n .thenReturn(Observable.just(orderBook));\n\n List<LimitOrder> bids = new ArrayList<>();\n bids.add(\n new LimitOrder(\n Order.OrderType.BID,\n new BigDecimal(\"2.48345723\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"852.8\")));\n bids.add(\n new LimitOrder(\n Order.OrderType.BID,\n new BigDecimal(\"0.50521505\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"850.37\")));\n\n List<LimitOrder> asks = new ArrayList<>();\n asks.add(\n new LimitOrder(\n Order.OrderType.ASK,\n new BigDecimal(\"0.04\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"853.35\")));\n asks.add(\n new LimitOrder(\n Order.OrderType.ASK,\n new BigDecimal(\"11.89247706\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"854.5\")));\n asks.add(\n new LimitOrder(\n Order.OrderType.ASK,\n new BigDecimal(\"0.38478732\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"855.48\")));\n\n // Call get order book observable\n TestObserver<OrderBook> test = marketDataService.getOrderBook(CurrencyPair.BTC_EUR).test();\n\n // We get order book object in correct order\n test.assertValue(\n orderBook1 -> {\n assertThat(orderBook1.getAsks()).as(\"Asks\").isEqualTo(asks);\n assertThat(orderBook1.getBids()).as(\"Bids\").isEqualTo(bids);\n return true;\n });\n\n test.assertNoErrors();\n }", "@Test\n public void testReceiverReturnsNoParams() {\n ResponseEntity response = dataController.getReceiverDataByOrgans(\"N\", null, null, null);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);" ]
[ "0.5771097", "0.56576294", "0.55283326", "0.5526109", "0.5518371", "0.54348737", "0.54147255", "0.53615624", "0.53325695", "0.52475834", "0.52190465", "0.5215989", "0.51656604", "0.51626444", "0.5133653", "0.51195407", "0.51112145", "0.51052463", "0.51027334", "0.50821054", "0.5053501", "0.5053501", "0.5043654", "0.504356", "0.5030539", "0.5024076", "0.50133973", "0.49942443", "0.49863395", "0.49544722", "0.4947119", "0.49445114", "0.49318025", "0.49296337", "0.49284127", "0.49153474", "0.49137992", "0.49030635", "0.49025282", "0.4899649", "0.48966518", "0.48782128", "0.4864664", "0.48488435", "0.48415834", "0.48386905", "0.48336345", "0.4817711", "0.48154634", "0.48132375", "0.4808731", "0.4804383", "0.47916463", "0.47821867", "0.4758916", "0.4757842", "0.4754921", "0.47540182", "0.47421554", "0.47398955", "0.4739356", "0.4734955", "0.47326106", "0.47312108", "0.4726721", "0.47234488", "0.47146538", "0.47097483", "0.47086033", "0.47046578", "0.4703481", "0.4696439", "0.46669817", "0.46646658", "0.46634072", "0.46609652", "0.46580574", "0.46537894", "0.46524262", "0.46409163", "0.46350664", "0.4624279", "0.46198854", "0.46109298", "0.46082792", "0.4607622", "0.4605729", "0.46057135", "0.4602665", "0.45946115", "0.45896482", "0.45869213", "0.45853585", "0.45709777", "0.45700267", "0.45659032", "0.45612592", "0.45566308", "0.45503062", "0.45410526" ]
0.5746496
1
Given: two order requests that will fully match each other
@Test public void enterOrderWithMatchedActiveOrderToCreateTrade() throws Exception { List<LimitOrderRequest> orderRequests = new ArrayList<>(); orderRequests.add(getLimitOrderRequest(Direction.BUY)); orderRequests.add(getLimitOrderRequest(Direction.SELL)); Trade tradeReference = Trade.builder() .matchPrice(orderRequests.get(0).getLimit()) .matchQuantity(orderRequests.get(0).getQuantity()) .ticker(orderRequests.get(0).getTicker()) .buyOrder(1) .sellOrder(2) .build(); //When: the orders are posted to the service for (LimitOrderRequest orderRequest : orderRequests) { String orderRequestJsonString = jsonMapper.writeValueAsString(orderRequest); performEnterOrderPostRequest(orderRequestJsonString); } MvcResult getResponse = mvc.perform(get("/status") .contentType(MediaType.APPLICATION_JSON)) .andReturn(); PublicMarketStatus status = jsonMapper .readValue(getResponse.getResponse().getContentAsString(), PublicMarketStatus.class); //Then: the trade is shown correctly in the market and the orders disappear List<Ticker> tickers = status.getOrders(); Assert.assertEquals("There is no ticker", 0, tickers.size()); List<Trade> trades = status.getTrades(); Assert.assertEquals("There is a trade", 1, trades.size()); Trade trade = trades.get(0); Assert.assertEquals("Trade is correct one", tradeReference, trade); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void matchOrders() throws IOException, MissingEntityException, InvalidEntityException {\n List<Order> buyOrders = getOrdersBySideAndStatus(true, ACTIVE);\n List<Order> sellOrders = getOrdersBySideAndStatus(false, ACTIVE);\n for (Order buyOrder : buyOrders) {\n for (Order sellOrder : sellOrders) {\n checkForMatch(buyOrder, sellOrder);\n }\n }\n }", "@Test\n public void equalsChecking2() {\n str = METHOD_POST + URI_SAMPLE + \" \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.site.ru\" + ENDL +\n \"Referer: http://www.site.ru/index.html\" + ENDL +\n \"Cookie: income=1\" + ENDL +\n \"Content-Type: application/x-www-form-urlencoded\" + ENDL +\n \"Content-Length: 35\" + ENDL +\n \"login=Petya%20Vasechkin&password=qq\";\n String str1 = METHOD_GET + \"http://foo.com/someservlet.jsp?param1=foo \" + HTTP_VERSION + ENDL +\n ACCEPT + \": text/jsp\" + ENDL +\n CONNECTION_CLOSE;\n HttpRequest request1 = new HttpRequest(str, IP_ADDRESS, HOST);\n HttpRequest request2 = new HttpRequest(str, IP_ADDRESS, HOST);\n HttpRequest request3 = new HttpRequest(str1, IP_ADDRESS, HOST);\n assertEquals(request1.equals(request2), true);\n assertEquals(request1.equals(request3), false);\n assertEquals(request1.hashCode(), request2.hashCode());\n assertEquals(request1.getHeaders(), request2.getHeaders());\n }", "@Test\n public void enterOrderWithUnmatchedActiveOrder() throws Exception {\n LimitOrderRequest limitOrderRequest = getLimitOrderRequest(Direction.BUY);\n LimitOrder referenceLimitOrder = getLimitOrder();\n String orderRequestJsonString = jsonMapper.writeValueAsString(limitOrderRequest);\n\n //When: the order is posted to the service\n MvcResult postResponse = performEnterOrderPostRequest(orderRequestJsonString);\n\n OrderRequestResponse response = jsonMapper\n .readValue(postResponse.getResponse().getContentAsString(), OrderRequestResponse.class);\n Assert.assertEquals(\"Response should be successful\", ResponseType.SUCCESS,\n response.getResponseType());\n\n MvcResult getResponse = mvc.perform(get(\"/status\")\n .contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n\n PublicMarketStatus status = jsonMapper\n .readValue(getResponse.getResponse().getContentAsString(), PublicMarketStatus.class);\n\n //Then: the order is entered correctly in to the market\n List<Ticker> tickers = status.getOrders();\n Assert.assertEquals(\"There is a ticker\", 1, tickers.size());\n Ticker ticker = tickers.get(0);\n Assert.assertEquals(\"Ticker name is correct\", limitOrderRequest.getTicker(), ticker.getName());\n Assert.assertTrue(\"Order is not in wrong queue\", ticker.getSell().isEmpty());\n Assert.assertEquals(\"Order is in right queue\", 1, ticker.getBuy().size());\n AbstractActiveOrder order = ticker.getBuy().get(0);\n Assert.assertEquals(\"Order is correct one\", referenceLimitOrder, order);\n\n }", "@Test\n public void equalsChecking1() {\n str = METHOD_POST + URI_SAMPLE + \" \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.site.ru\" + ENDL +\n \"Referer: \" + URI_SAMPLE + ENDL +\n \"Cookie: income=1\" + ENDL +\n \"Content-Type: application/x-www-form-urlencoded\" + ENDL +\n \"Content-Length: 35\" + ENDL +\n \"login=Petya%20Vasechkin&password=qq\";\n HttpRequest request1 = new HttpRequest(str, IP_ADDRESS, HOST);\n HttpRequest request2 = new HttpRequest(str, IP_ADDRESS, HOST);\n assertEquals(request1.getHeader(\"Content-Length\"), request2.getHeader(\"Content-Length\"));\n assertEquals(request1.getHeader(\"Cookie\"), request2.getHeader(\"Cookie\"));\n assertEquals(request1.getUrn(), request2.getUrn());\n assertEquals(request1.getHeaders(), request2.getHeaders());\n assertEquals(request1.getParameters(), request2.getParameters());\n assertEquals(request1.equals(request2), true);\n }", "static void acceptTwoServerRequests(Tracer server1Tracer, Tracer server2Tracer) {\n Span server1 = server1Tracer.newTrace().name(\"get\").kind(Kind.SERVER).start();\n Span server2 = server1Tracer.newTrace().name(\"get\").kind(Kind.SERVER).start();\n try {\n Span client1 =\n server1Tracer.newChild(server1.context()).name(\"post\").kind(Kind.CLIENT).start();\n\n server2Tracer.joinSpan(fakeUseOfHeaders(client1.context()))\n .name(\"post\")\n .kind(Kind.SERVER)\n .start().finish();\n\n ScopedSpan local1 = server1Tracer.startScopedSpanWithParent(\"controller\", server1.context());\n try {\n try {\n server1Tracer.newTrace().name(\"async1\").start().finish();\n server2Tracer.newTrace().name(\"async2\").start().finish();\n\n ScopedSpan local2 =\n server1Tracer.startScopedSpanWithParent(\"controller2\", server2.context());\n Span client2 = server1Tracer.nextSpan().name(\"post\").kind(Kind.CLIENT).start();\n try {\n server2Tracer.joinSpan(fakeUseOfHeaders(client2.context()))\n .name(\"post\")\n .kind(Kind.SERVER)\n .start().error(new RuntimeException()).finish();\n\n server1Tracer.nextSpan()\n .name(\"post\")\n .kind(Kind.CLIENT)\n .start()\n .remoteServiceName(\"uninstrumentedServer\")\n .error(new RuntimeException())\n .finish();\n } finally {\n client2.finish();\n local2.finish();\n }\n } finally {\n server2.finish();\n }\n } finally {\n client1.finish();\n local1.finish();\n }\n } finally {\n server1.finish();\n }\n }", "Trade matchOrder(List<Order> buyList, List<Order> sellList) throws \n OrderBookOrderException, OrderBookTradeException;", "public void testQuery() throws Exception {\n DummyApprovalRequest req1 = new DummyApprovalRequest(reqadmin, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req2 = new DummyApprovalRequest(admin1, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req3 = new DummyApprovalRequest(admin2, null, 3, 2, false);\n\n approvalSessionRemote.addApprovalRequest(admin1, req1, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req2, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req3, gc);\n\n // Make som queries\n Query q1 = new Query(Query.TYPE_APPROVALQUERY);\n q1.add(ApprovalMatch.MATCH_WITH_APPROVALTYPE, BasicMatch.MATCH_TYPE_EQUALS, \"\" + req1.getApprovalType());\n\n List result = approvalSessionRemote.query(admin1, q1, 0, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 2 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 0, 1, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() == 1);\n\n Query q2 = new Query(Query.TYPE_APPROVALQUERY);\n q2.add(ApprovalMatch.MATCH_WITH_STATUS, BasicMatch.MATCH_TYPE_EQUALS, \"\" + ApprovalDataVO.STATUS_WAITINGFORAPPROVAL, Query.CONNECTOR_AND);\n q2.add(ApprovalMatch.MATCH_WITH_REQUESTADMINCERTSERIALNUMBER, BasicMatch.MATCH_TYPE_EQUALS, reqadmincert.getSerialNumber().toString(16));\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n // Remove the requests\n int id1 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req1.generateApprovalId()).iterator().next()).getId();\n int id2 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req2.generateApprovalId()).iterator().next()).getId();\n int id3 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req3.generateApprovalId()).iterator().next()).getId();\n approvalSessionRemote.removeApprovalRequest(admin1, id1);\n approvalSessionRemote.removeApprovalRequest(admin1, id2);\n approvalSessionRemote.removeApprovalRequest(admin1, id3);\n }", "@Test\n public void testOrderInNegotiation() {\n Player l_player = new Player();\n l_player.setD_playerName(\"user2\");\n l_player.setD_negotiatePlayer(d_player.getD_playerName());\n\n Country l_country2 = new Country();\n l_country2.setD_continentIndex(1);\n l_country2.setD_countryIndex(3);\n l_country2.setD_countryName(\"nepal\");\n List<Country> l_countryList = new ArrayList();\n l_countryList.add(l_country2);\n l_player.setD_ownedCountries(l_countryList);\n\n d_gameData.getD_playerList().add(l_player);\n\n d_orderProcessor.processOrder(\"negotiate user2\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n\n d_orderProcessor.processOrder(\"advance india nepal 5\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order1 = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(false, l_order1.executeOrder());\n }", "@Test\n public void testIfThreadsGetsTheItemsFromQueueInOrder() throws InterruptedException {\n\t\t\n\t\tfinal UserRequest req1 = createUserRequest(1, 5, ElevatorDirection.UP);\n\t\tfinal UserRequest req2 = createUserRequest(1, 8, ElevatorDirection.UP);\n \n final Thread t1 = startTestThread( new TestRunnable() {\n\t\t\t@Override\n\t\t\tprotected void runTestThread() throws Throwable {\n\t\t\t\tfinal UserRequest req = queue.pickRequest(1, ElevatorDirection.UP);\n\t\t\t\tAssert.assertNotNull(req);\n\t\t\t\tAssert.assertEquals(req1, req);\n\t\t\t}\n\t\t});\n \n final Thread t2 = startTestThread( new TestRunnable() {\n\t\t\t@Override\n\t\t\tprotected void runTestThread() throws Throwable {\n\t\t\t\tfinal UserRequest req = queue.pickRequest(1, ElevatorDirection.UP);\n\t\t\t\tAssert.assertNotNull(req);\n\t\t\t\tAssert.assertEquals(req2, req);\n\t\t\t}\n\t\t});\n t1.start();\n t2.start();\n queue.addUserRequest(req1);\n queue.addUserRequest(req2);\n \n }", "private void orderItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "@Test(priority = 2)\n public void testPurchaseMultipleItemsAndGetTotal() throws Exception {\n URI uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n HttpEntity<String> request = new HttpEntity<>(headersUser2);\n ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.GET, request, String.class);\n assertEquals(200, result.getStatusCodeValue());\n setCookie(result, headersUser2);\n\n // doing an API call to get products and select a random product\n List<ProductDTO> products = getProducts(headersUser2);\n Random random = new Random();\n ProductDTO product1 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n BigDecimal exceptedTotal = new BigDecimal(\"0.0\");\n CartItemDTO item1 = new CartItemDTO();\n item1.setQuantity((long) (random.nextInt(5) + 1));\n item1.setProduct(product1);\n\n BigDecimal price1 = product1.getPrice().add(product1.getTax());\n exceptedTotal = exceptedTotal.add(price1.multiply(new BigDecimal(item1.getQuantity())));\n\n // doing an API call to add the select product into cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/items\");\n HttpEntity<CartItemDTO> itemAddRequest = new HttpEntity<>(item1, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // Select another random product\n ProductDTO product2 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n CartItemDTO item2 = new CartItemDTO();\n item2.setQuantity((long) (random.nextInt(5) + 1));\n item2.setProduct(product2);\n\n BigDecimal price2 = product2.getPrice().add(product2.getTax());\n exceptedTotal = exceptedTotal.add(price2.multiply(new BigDecimal(item2.getQuantity())));\n\n // doing an API call to add the select product into cart.\n itemAddRequest = new HttpEntity<>(item2, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // doing an API call to get the content of the cart\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser2);\n ResponseEntity<ShoppingCartDTO> cartResponse = restTemplate.exchange(uri,\n HttpMethod.GET, request, ShoppingCartDTO.class);\n assertEquals(200, cartResponse.getStatusCodeValue());\n assertNotNull(cartResponse.getBody());\n exceptedTotal = exceptedTotal.multiply(new BigDecimal(\"1.15\"));\n assertEquals(exceptedTotal, cartResponse.getBody().getTotalAmount());\n\n // doing an API call to submit the cart to process.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/submit\");\n request = new HttpEntity<>(headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, request, String.class);\n assertEquals(201, result.getStatusCodeValue());\n }", "@Test\n\tpublic void equalsTest() {\n\t\t\n\t\tString offeredCollectionIdOne = \"1\";\n\t\tString userIdOne = \"1\";\n\t\t\n\t\tTradeRequest firstRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, userIdOne);\n\t\t\n\t\tString requestIdOne = \"1\";\n\t\tfirstRequest.setRequestId(requestIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Request should not equal null\", \n\t\t\t\tfirstRequest != null);\n\t\t\n\t\tTradeRequest equalRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdOne);\n\t\t\n\t\tequalRequest.setRequestId(requestIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Requests should be equal if they have the same \" + \n\t\t\t\t\"collectionId and user id\", \n\t\t\t\tfirstRequest.equals(equalRequest));\n\t\t\n\t\tString offeredCollectionIdTwo = \"2\";\n\t\tString userIdTwo = \"2\";\n\t\t\n\t\tTradeRequest requestIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tString requestIdTwo = \"2\";\n\t\trequestIdDifferentRequest.setRequestId(requestIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if requestIds are \" + \n\t\t\t\t\"different\", !firstRequest.equals(requestIdDifferentRequest));\n\t\t\n\t\tTradeRequest collectionIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdTwo, \n\t\t\t\t\t\tuserIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if collectionIds are \" + \n\t\t\t\t\"different\", \n\t\t\t\t!firstRequest.equals(collectionIdDifferentRequest));\n\t\t\n\t\tTradeRequest userIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if userIds are \" + \n\t\t\t\t\"different\", \n\t\t\t\t!firstRequest.equals(userIdDifferentRequest));\n\t\t\n\t\t\n\t\tTradeRequest idsDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdTwo, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Requests should not equal if collectionIds and \" + \"\"\n\t\t\t\t+ \"userIds are different\", \n\t\t\t\t!firstRequest.equals(idsDifferentRequest));\n\t}", "private void addRequest(HttpPipelineRequest p_addRequest_1_, List<HttpPipelineRequest> p_addRequest_2_) {\n/* 86 */ p_addRequest_2_.add(p_addRequest_1_);\n/* 87 */ notifyAll();\n/* */ }", "@Test\n public void doubleSortWithExchangeUnbalancedNodes() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n SingleSender ss = new SingleSender(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), Mockito.mock(BatchSchema.class), es1, 0,\n MinorFragmentIndexEndpoint.newBuilder().setMinorFragmentId(0).build());\n Fragment f1 = new Fragment();\n f1.addOperator(ss);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Arrays.asList(N1, N2));\n\n UnorderedReceiver or = new UnorderedReceiver(OpProps.prototype(1, Long.MAX_VALUE), Mockito.mock(BatchSchema.class), 0, Collections.emptyList(), false);\n ExternalSort es2 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), or, Collections.emptyList(), false);\n Fragment f2 = new Fragment();\n f2.addOperator(es2);\n Wrapper w2 = new Wrapper(f2, 0);\n w2.overrideEndpoints(Collections.singletonList(N1));\n\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1, f2, w2), 10 + adjustReserve);\n assertEquals(3L, es1.getProps().getMemLimit());\n assertEquals(3L, es2.getProps().getMemLimit());\n }", "public static void compareJson(Response r1, Response r2){\n //Compare in response\n r1.editableUntil = r1.editableUntil .equals(r2.editableUntil ) ? r1.editableUntil : r2.editableUntil ;\n r1.dislikes = r1.dislikes == r2.dislikes ? r1.dislikes : r2.dislikes ;\n r1.numReports = r1.numReports == r2.numReports ? r1.numReports : r2.numReports ;\n r1.likes = r1.likes == r2.likes ? r1.likes : r2.likes ;\n r1.message = r1.message .equals(r2.message ) ? r1.message : r2.message ;\n r1.id = r1.id .equals(r2.id ) ? r1.id : r2.id ;\n r1.createdAt = r1.createdAt .equals(r2.createdAt ) ? r1.createdAt : r2.createdAt ;\n r1.media = r1.media .equals(r2.media ) ? r1.media : r2.media ;\n r1.isSpam = r1.isSpam .equals(r2.isSpam ) ? r1.isSpam : r2.isSpam ;\n r1.isDeletedByAuthor = r1.isDeletedByAuthor.equals(r2.isDeletedByAuthor) ? r1.isDeletedByAuthor : r2.isDeletedByAuthor;\n r1.isDeleted = r1.isDeleted .equals(r2.isDeleted ) ? r1.isDeleted : r2.isDeleted ;\n\n try{\n r1.parent = r1.parent .equals(r2.parent ) ? r1.parent : r2.parent ;\n } catch(NullPointerException e){\n r1.parent = r2.parent != null ? r2.parent: r1.parent;\n }\n\n r1.isApproved = r1.isApproved .equals(r2.isApproved ) ? r1.isApproved : r2.isApproved ;\n r1.isFlagged = r1.isFlagged .equals(r2.isFlagged ) ? r1.isFlagged : r2.isFlagged ;\n r1.rawMessage = r1.rawMessage .equals(r2.rawMessage ) ? r1.rawMessage : r2.rawMessage ;\n r1.isHighlighted = r1.isHighlighted .equals(r2.isHighlighted ) ? r1.isHighlighted : r2.isHighlighted ;\n r1.canVote = r1.canVote .equals(r2.canVote ) ? r1.canVote : r2.canVote ;\n r1.thread = r1.thread .equals(r2.thread ) ? r1.thread : r2.thread ;\n r1.forum = r1.forum .equals(r2.forum ) ? r1.forum : r2.forum ;\n r1.points = r1.points .equals(r2.points ) ? r1.points : r2.points ;\n r1.moderationLabels = r1.moderationLabels .equals(r2.moderationLabels ) ? r1.moderationLabels : r2.moderationLabels ;\n r1.isEdited = r1.isEdited .equals(r2.isEdited ) ? r1.isEdited : r2.isEdited ;\n r1.sb = r1.sb .equals(r2.sb ) ? r1.sb : r2.sb ;\n\n //Compare in Author\n r1.author.profileUrl = r1.author.profileUrl .equals(r2.author.profileUrl ) ? r1.author.profileUrl : r2.author.profileUrl ;\n\n try{\n r1.author.disable3rdPartyTrackers = r1.author.disable3rdPartyTrackers .equals(r2.author.disable3rdPartyTrackers) ? r1.author.disable3rdPartyTrackers : r2.author.disable3rdPartyTrackers;\n } catch(NullPointerException e){\n r1.author.disable3rdPartyTrackers = r2.author.disable3rdPartyTrackers != null ? r2.author.disable3rdPartyTrackers: r1.author.disable3rdPartyTrackers;\n }\n\n try{\n r1.author.joinedAt = r1.author.joinedAt .equals(r2.author.joinedAt ) ? r1.author.joinedAt : r2.author.joinedAt ;\n } catch(NullPointerException e){\n r1.author.joinedAt = r2.author.joinedAt != null ? r2.author.joinedAt: r1.author.joinedAt;\n }\n\n try{\n r1.author.about = r1.author.about .equals(r2.author.about ) ? r1.author.about : r2.author.about ;\n } catch(NullPointerException e){\n r1.author.about = r2.author.about != null ? r2.author.about: r1.author.about;\n }\n\n try{\n r1.author.isPrivate = r1.author.isPrivate .equals(r2.author.isPrivate ) ? r1.author.isPrivate : r2.author.isPrivate ;\n } catch(NullPointerException e){\n r1.author.isPrivate = r2.author.isPrivate != null ? r2.author.isPrivate: r1.author.isPrivate;\n }\n\n r1.author.url = r1.author.url .equals(r2.author.url ) ? r1.author.url : r2.author.url ;\n r1.author.isAnonymous = r1.author.isAnonymous .equals(r2.author.isAnonymous ) ? r1.author.isAnonymous : r2.author.isAnonymous ;\n\n try{\n r1.author.isPowerContributor = r1.author.isPowerContributor .equals(r2.author.isPowerContributor ) ? r1.author.isPowerContributor : r2.author.isPowerContributor ;\n } catch(NullPointerException e){\n r1.author.isPowerContributor = r2.author.isPowerContributor != null ? r2.author.isPowerContributor: r1.author.isPowerContributor;\n }\n\n try{\n r1.author.isPrimary = r1.author.isPrimary .equals(r2.author.isPrimary ) ? r1.author.isPrimary : r2.author.isPrimary ;\n } catch(NullPointerException e){\n r1.author.isPrimary = r2.author.isPrimary != null ? r2.author.isPrimary: r1.author.isPrimary;\n }\n\n r1.author.name = r1.author.name .equals(r2.author.name ) ? r1.author.name : r2.author.name ;\n\n try{\n r1.author.location = r1.author.location .equals(r2.author.location ) ? r1.author.location : r2.author.location ;\n } catch(NullPointerException e){\n r1.author.location = r2.author.location != null ? r2.author.location: r1.author.location;\n }\n\n try{\n r1.author.id = r1.author.id .equals(r2.author.id ) ? r1.author.id : r2.author.id ;\n } catch(NullPointerException e){\n r1.author.id = r2.author.id != null ? r2.author.id: r1.author.id;\n }\n r1.author.signedUrl = r1.author.signedUrl .equals(r2.author.signedUrl ) ? r1.author.signedUrl : r2.author.signedUrl ;\n\n try{\n r1.author.username = r1.author.username .equals(r2.author.username ) ? r1.author.username : r2.author.username ;\n } catch(NullPointerException e){\n r1.author.username = r2.author.username != null ? r2.author.username: r1.author.username;\n }\n\n //Compare in Avatar\n r1.author.avatar.cache = r1.author.avatar.cache .equals(r2.author.avatar.cache ) ? r1.author.avatar.cache : r2.author.avatar.cache ;\n\n try{\n r1.author.avatar.isCustom = r1.author.avatar.isCustom .equals(r2.author.avatar.isCustom ) ? r1.author.avatar.isCustom : r2.author.avatar.isCustom ;\n } catch(NullPointerException e){\n r1.author.avatar.isCustom = r2.author.avatar.isCustom != null ? r2.author.avatar.isCustom: r1.author.avatar.isCustom;\n }\n\n r1.author.avatar.permalink = r1.author.avatar.permalink .equals(r2.author.avatar.permalink) ? r1.author.avatar.permalink : r2.author.avatar.permalink;\n\n //Compare Small\n r1.author.avatar.small.cache = r1.author.avatar.small.cache .equals(r2.author.avatar.small.cache ) ? r1.author.avatar.small.cache : r2.author.avatar.small.cache ;\n r1.author.avatar.small.permalink = r1.author.avatar.small.permalink .equals(r2.author.avatar.small.permalink ) ? r1.author.avatar.small.permalink : r2.author.avatar.small.permalink ;\n\n //Compare Large\n r1.author.avatar.large.cache = r1.author.avatar.large.cache .equals(r2.author.avatar.large.cache ) ? r1.author.avatar.large.cache : r2.author.avatar.large.cache ;\n r1.author.avatar.large.permalink = r1.author.avatar.large.permalink .equals(r2.author.avatar.large.permalink ) ? r1.author.avatar.large.permalink : r2.author.avatar.large.permalink ;\n }", "ResponseEntity<Response> placesInCommon(String userId1, String listName1, String userId2, String listName2);", "@Test\n public void testStoreSaleAdjSale2() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"2\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"operator\", \"2\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "@Test\n void testRequestInterleaving() throws Exception {\n final BlockerSync sync = new BlockerSync();\n testHandler.handlerBody =\n id -> {\n if (id == 1) {\n try {\n sync.block();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n return CompletableFuture.completedFuture(new TestResponse(id.toString()));\n };\n\n // send first request and wait until the handler blocks\n final CompletableFuture<TestResponse> response1 =\n sendRequestToTestHandler(new TestRequest(1));\n sync.awaitBlocker();\n\n // send second request and verify response\n final CompletableFuture<TestResponse> response2 =\n sendRequestToTestHandler(new TestRequest(2));\n assertThat(response2.get().getStatus()).isEqualTo(\"2\");\n\n // wake up blocked handler\n sync.releaseBlocker();\n\n // verify response to first request\n assertThat(response1.get().getStatus()).isEqualTo(\"1\");\n }", "public void mergeFrom(Permutation other, SortedSet<String> liveRebindRequests) {\n if (getClass().desiredAssertionStatus()) {\n for (SortedMap<String, String> myRebind : orderedRebindAnswers) {\n for (SortedMap<String, String> otherRebind : other.orderedRebindAnswers) {\n for (String rebindRequest : liveRebindRequests) {\n String myAnswer = myRebind.get(rebindRequest);\n String otherAnswer = otherRebind.get(rebindRequest);\n assert myAnswer.equals(otherAnswer);\n }\n }\n }\n }\n mergeRebindsFromCollapsed(other);\n }", "public void testSenderOrderWithMultipleSiteMasters() throws Exception {\n MyReceiver<Object> rx=new MyReceiver<>().rawMsgs(true).verbose(true),\n ry=new MyReceiver<>().rawMsgs(true).verbose(true), rz=new MyReceiver<>().rawMsgs(true).verbose(true);\n final int NUM=512;\n final String sm_picker_impl=SiteMasterPickerImpl.class.getName();\n a=createNode(LON, \"A\", LON_CLUSTER, 2, sm_picker_impl, null);\n b=createNode(LON, \"B\", LON_CLUSTER, 2, sm_picker_impl, null);\n c=createNode(LON, \"C\", LON_CLUSTER, 2, sm_picker_impl, null);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, a,b,c);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, 2, sm_picker_impl, rx);\n y=createNode(SFO, \"Y\", SFO_CLUSTER, 2, sm_picker_impl, ry);\n z=createNode(SFO, \"Z\", SFO_CLUSTER, 2, sm_picker_impl, rz);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, x,y,z);\n\n waitForBridgeView(4, 10000, 1000, a,b,x,y);\n\n // C in LON sends messages to the site master of SFO (via either SM A or B); everyone in SFO (x,y,z)\n // must receive them in correct order\n SiteMaster target_sm=new SiteMaster(SFO);\n System.out.printf(\"%s: sending %d messages to %s:\\n\", c.getAddress(), NUM, target_sm);\n for(int i=1; i <= NUM; i++) {\n Message msg=new BytesMessage(target_sm, i); // the seqno is in the payload of the message\n c.send(msg);\n }\n\n boolean running=true;\n for(int i=0; running && i < 10; i++) {\n for(MyReceiver<Object> r: Arrays.asList(rx,ry,rz)) {\n if(r.size() >= NUM) {\n running=false;\n break;\n }\n }\n Util.sleep(1000);\n }\n\n System.out.printf(\"X: size=%d\\nY: size=%d\\nZ: size=%d\\n\", rx.size(), ry.size(), rz.size());\n assert rx.size() == NUM || ry.size() == NUM;\n assert rz.size() == 0;\n }", "@Test\n\tpublic void testMultipleAddConsistency() {\n\n\t\tcontroller.addNewNodes(2);\n\t\tSignalNode first = controller.getNodesToTest().getFirst();\n\t\tSignalNode last = controller.getNodesToTest().getLast();\n\n\t\tcontroller.addSignalsToNode(first, 10000);\n\n\t\ttry {\n\t\t\tSignal sig = src.next();\n\t\t\tResult r1 = first.findSimilarTo(sig);\n\t\t\tResult r2 = last.findSimilarTo(sig);\n\t\t\tAssert.assertEquals(r1, r2);\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n public void testStoreSaleMultiple() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "@Test\n\tpublic void shouldNotGetCustomerWithWrongOrder()\n\t{\n\t\tfinal Response get = performGetCustomersWithDifferentQueries(\n\t\t\t\tImmutableMap.of(BASE_SITE_PARAM, BASE_SITE_ID, \"orderId\", \"wrong_order\"));\n\t\tassertResponse(Status.BAD_REQUEST, get);\n\t}", "boolean isOrderCertain();", "@Test\n public void testStoreSaleAdjSale1() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"2\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"operator\", \"1\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "private static void verifyMultipleSingleScanResults(InOrder handlerOrder, Handler handler,\n int requestId1, ScanResults results1, int requestId2, ScanResults results2,\n int listenerRequestId, ScanResults listenerResults) {\n ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);\n handlerOrder.verify(handler, times(listenerResults == null ? 4 : 5))\n .handleMessage(messageCaptor.capture());\n int firstListenerId = messageCaptor.getAllValues().get(0).arg2;\n assertTrue(firstListenerId + \" was neither \" + requestId2 + \" nor \" + requestId1,\n firstListenerId == requestId2 || firstListenerId == requestId1);\n if (firstListenerId == requestId2) {\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n } else {\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n }\n }", "@Test\n\tpublic void moreComplexAssertion() {\n\t\tOrder order1 = null, order2 = null, order3 = null, order4 = null;\n\t\t// when\n\t\tList<Order> orders = null;// orderSearchService.getOrders(trader,\n\t\t\t\t\t\t\t\t\t// tradingAcct, goldIsinCode);\n\t\t// then\n\t\t// Using Basic JUnit\n\t\tassertEquals(orders.size(), 2);\n\t\tIterator<Order> itr = orders.iterator();\n\t\tassertEquals(itr.next(), order3);\n\t\tassertEquals(itr.next(), order4);\n\t\t// Using Hamcrest\n\t\tassertThat(orders, hasItems(order3, order4));\n\t\tassertThat(orders.size(), is(2));\n\t\t// Using FEST Assertions\n\t\tassertThat(orders).containsOnly(order3, order4);\n\t\t// Using FEST Assertions (chained assertions)\n\t\tassertThat(orders).containsOnly(order3, order4).containsSequence(order3, order4);\n\t}", "@Then(\"^response includes the following in any order$\")\npublic void response_includes_the_following_in_any_order(DataTable arg1) throws Throwable {\n throw new PendingException();\n}", "@Test\n public void testGetOrderBook() throws Exception {\n String orderBook =\n new String(\n Files.readAllBytes(\n Paths.get(ClassLoader.getSystemResource(\"order-book.json\").toURI())));\n\n when(streamingService.subscribeChannel(eq(\"order_book-BTC_EUR\"), eq(\"order_book\")))\n .thenReturn(Observable.just(orderBook));\n\n List<LimitOrder> bids = new ArrayList<>();\n bids.add(\n new LimitOrder(\n Order.OrderType.BID,\n new BigDecimal(\"2.48345723\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"852.8\")));\n bids.add(\n new LimitOrder(\n Order.OrderType.BID,\n new BigDecimal(\"0.50521505\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"850.37\")));\n\n List<LimitOrder> asks = new ArrayList<>();\n asks.add(\n new LimitOrder(\n Order.OrderType.ASK,\n new BigDecimal(\"0.04\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"853.35\")));\n asks.add(\n new LimitOrder(\n Order.OrderType.ASK,\n new BigDecimal(\"11.89247706\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"854.5\")));\n asks.add(\n new LimitOrder(\n Order.OrderType.ASK,\n new BigDecimal(\"0.38478732\"),\n CurrencyPair.BTC_EUR,\n null,\n null,\n new BigDecimal(\"855.48\")));\n\n // Call get order book observable\n TestObserver<OrderBook> test = marketDataService.getOrderBook(CurrencyPair.BTC_EUR).test();\n\n // We get order book object in correct order\n test.assertValue(\n orderBook1 -> {\n assertThat(orderBook1.getAsks()).as(\"Asks\").isEqualTo(asks);\n assertThat(orderBook1.getBids()).as(\"Bids\").isEqualTo(bids);\n return true;\n });\n\n test.assertNoErrors();\n }", "@Test\n public void testSynchronousScoresWithNoAbuseTypes() throws Exception {\n String expectedRequestBody = \"{\\n\" +\n \" \\\"$type\\\" : \\\"$create_order\\\",\\n\" +\n \" \\\"$api_key\\\" : \\\"YOUR_API_KEY\\\",\\n\" +\n \" \\\"$user_id\\\" : \\\"billy_jones_301\\\"\\n\" +\n \"}\";\n\n // Start a new mock server and enqueue a mock response.\n MockWebServer server = new MockWebServer();\n MockResponse response = new MockResponse();\n response.setResponseCode(HTTP_OK);\n String bodyStr = \"{\\n\" +\n \" \\\"status\\\" : 0,\\n\" +\n \" \\\"error_message\\\" : \\\"OK\\\",\\n\" +\n \" \\\"time\\\" : 1327604222,\\n\" +\n \" \\\"request\\\" : \\\"\" + TestUtils.unescapeJson(expectedRequestBody) + \"\\\",\\n\" +\n \" \\\"score_response\\\": {\\n\" +\n \" \\\"status\\\": 0, \\n\" +\n \" \\\"error_message\\\": \\\"OK\\\", \\n\" +\n \" \\\"user_id\\\": \\\"billy_jones_301\\\",\\n\" +\n \" \\\"scores\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.898391231245,\\n\" +\n \" \\\"reasons\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"name\\\": \\\"UsersPerDevice\\\",\\n\" +\n \" \\\"value\\\": 4,\\n\" +\n \" \\\"details\\\": {\\n\" +\n \" \\\"users\\\": \\\"a, b, c, d\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.472838192111,\\n\" +\n \" \\\"reasons\\\": []\\n\" +\n \" }\\n\" +\n \" },\\n\" +\n \" \\\"latest_labels\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": true,\\n\" +\n \" \\\"time\\\": 1352201880,\\n\" +\n \" \\\"description\\\": \\\"received a chargeback\\\"\\n\" +\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": false,\\n\" +\n \" \\\"time\\\": 1362205000\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\";\n response.setBody(bodyStr);\n server.enqueue(response);\n server.start();\n\n // Create a new client and link it to the mock server.\n SiftClient client = new SiftClient(\"YOUR_API_KEY\", \"YOUR_ACCOUNT_ID\",\n new OkHttpClient.Builder()\n .addInterceptor(OkHttpUtils.urlRewritingInterceptor(server))\n .build());\n\n // Build and execute the request against the mock server.\n EventRequest request = client.buildRequest(\n new CreateOrderFieldSet().setUserId(\"billy_jones_301\")).withScores();\n EventResponse siftResponse = request.send();\n\n // Verify the request.\n RecordedRequest request1 = server.takeRequest();\n Assert.assertEquals(\"POST\", request1.getMethod());\n Assert.assertEquals(\"/v205/events?return_score=true\", request1.getPath());\n JSONAssert.assertEquals(expectedRequestBody, request.getFieldSet().toJson(), true);\n\n // Verify the response.\n Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());\n Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());\n JSONAssert.assertEquals(response.getBody().readUtf8(),\n siftResponse.getBody().toJson(), false);\n Assert.assertEquals(siftResponse.getAbuseScore(\"payment_abuse\").getScore(),\n (Double) 0.898391231245);\n\n server.shutdown();\n }", "@Test\n public void multipleProducerAndMultipleConsumerScenarioTest() throws InterruptedException, ExecutionException {\n List<Chunk> chunkList1 = new ArrayList<>();\n //generate chunks for producer 1\n int numOfChunksToUpload = 1000;\n while (numOfChunksToUpload > 0) {\n chunkList1.add(generateChunk(10));\n numOfChunksToUpload--;\n }\n\n //Calculate the cached price list for producer 1\n Map<String, Record> expectedPriceList = new HashMap<>();\n String expectedPrice;\n chunkList1.forEach((chunk) -> {\n Map<String, List<Record>> groupedRecords = chunk.getData().stream().collect(Collectors.groupingBy(Record::getId));\n groupedRecords.forEach((s, l) -> {\n l.sort(recordComparator);\n Record latestRecord = l.get(0);\n expectedPriceList.put(latestRecord.getId(), latestRecord);\n\n });\n\n });\n\n\n List<Chunk> chunkList2 = new ArrayList<>();\n //generate chunks for producer 2\n numOfChunksToUpload = 1000;\n while (numOfChunksToUpload > 0) {\n chunkList2.add(generateChunk(10));\n numOfChunksToUpload--;\n }\n\n //Calculate cached price list for producer 2\n Map<String, Record> cachedPriceList = new HashMap<>();\n chunkList2.forEach((chunk) -> {\n Map<String, List<Record>> groupedRecords = chunk.getData().stream().collect(Collectors.groupingBy(Record::getId));\n groupedRecords.forEach((s, l) -> {\n l.sort(recordComparator);\n Record latestRecord = l.get(0);\n cachedPriceList.put(latestRecord.getId(), latestRecord);\n\n });\n\n });\n\n //calculating expected price with both the producer's cached price list\n cachedPriceList.forEach((k, v) -> {\n Record originalRecord = expectedPriceList.get(k);\n if (originalRecord != null) {\n if (v.getAsOf().compareTo(originalRecord.getAsOf()) >= 0) {\n expectedPriceList.put(k, v);\n }\n } else {\n expectedPriceList.put(k, v);\n }\n });\n\n expectedPrice = String.valueOf(expectedPriceList.get(\"5\").getPayload().get(\"Price\"));\n log.info(\"Expected latest price: \" + expectedPrice);\n //Start the producer 1 thread\n ExecutorService executorService = Executors.newFixedThreadPool(4);\n ProducerThread producerThread1 = new ProducerThread(\"Producer1\", chunkList1, 100, new ApplicationService());\n Future<String> producerResult1 = executorService.submit(producerThread1);\n\n //Start the producer 2 thread\n ProducerThread producerThread2 = new ProducerThread(\"Producer2\", chunkList2, 100, new ApplicationService());\n Future<String> producerResult2 = executorService.submit(producerThread2);\n\n //Wait for both the batch run to start\n Thread.sleep(20);\n //Start a consumer thread to access the price while the batch is running\n Future<String> consumer1Result = executorService.submit(new ConsumerThread(\"Consumer1\", 1, new ApplicationService()));\n assertNull(consumer1Result.get());\n\n //Wait for all the batch runs to be completed\n if (ProducerConstants.BATCH_COMPLETION_MESSAGE.equals(producerResult1.get()) && ProducerConstants.BATCH_COMPLETION_MESSAGE.equals(producerResult2.get())) {\n //Start a consumer thread to access the price and then apply assertion to the expected and actual price\n Future<String> consumer2Result = executorService.submit(new ConsumerThread(\"Consumer2\", 5, new ApplicationService()));\n assertEquals(expectedPrice, consumer2Result.get());\n }\n executorService.shutdown();\n\n }", "@Test\n void compareTo_PotentiallyRelated_AddressMightMatch()\n {\n runIsMatchTest(AnswerType.no, AnswerType.maybe, AnswerType.no, AnswerType.no,\n ContactMatchType.PotentiallyRelated);\n }", "protected abstract boolean sendNextRequests();", "public Future<Map<String, UUID>> checkReqItems(Map<String, List<String>> request, String userId) {\n Promise<Map<String, UUID>> p = Promise.promise();\n\n if (request.containsKey(RES_SERVER)) {\n\n List<String> servers = request.get(RES_SERVER);\n\n if (servers.isEmpty()) {\n p.fail(BAD_REQUEST);\n return p.future();\n }\n\n Future<Map<String, UUID>> checkSer = checkResSer(servers, userId);\n checkSer\n .onSuccess(\n obj -> {\n servers.removeAll(obj.keySet());\n if (!servers.isEmpty()) p.fail(SERVER_NOT_PRESENT + servers.toString());\n else p.complete(obj);\n })\n .onFailure(failHandler -> p.fail(failHandler.getLocalizedMessage()));\n } else {\n\n Future<Map<String, List<String>>> resources = checkResExist(request);\n\n Future<List<JsonObject>> fetchItem =\n resources.compose(\n obj -> {\n if (obj.size() == 0) return Future.succeededFuture(new ArrayList<JsonObject>());\n else return fetch(obj);\n });\n\n Future<Boolean> insertItems =\n fetchItem.compose(\n toInsert -> {\n if (toInsert.size() == 0) return Future.succeededFuture(true);\n else return insertItemToDb(toInsert);\n });\n\n Future<Map<String, UUID>> resDetails =\n insertItems.compose(\n obj -> {\n if (request.containsKey(RES)) return getResDetails(request.get(RES));\n return Future.succeededFuture(new HashMap<>());\n });\n\n Future<Map<String, UUID>> resGrpDetails =\n insertItems.compose(\n obj -> {\n if (request.containsKey(RES_GRP)) return getResGrpDetails(request.get(RES_GRP));\n return Future.succeededFuture(new HashMap<>());\n });\n\n Map<String, UUID> result = new HashMap<>();\n\n CompositeFuture.all(resDetails, resGrpDetails)\n .onSuccess(\n success -> {\n if (!resDetails.result().isEmpty()) result.putAll(resDetails.result());\n if (!resGrpDetails.result().isEmpty()) result.putAll(resGrpDetails.result());\n p.complete(result);\n })\n .onFailure(failHandler -> p.fail(failHandler.getLocalizedMessage()));\n }\n\n return p.future();\n }", "@Test(description = \"Passing valid Request\", groups = { \"APIKonnectResponseErrorCode\", \"2WayOBDHighPriority\" }, priority = 1)\n\tpublic void TwowayOBD_lowPriority_validRequest() throws InterruptedException {\n\t\trecpList.add(\"2348100000001\");\n\t\trecpList.add(\"2348100000002\");\n\t\trecpList.add(\"2348100000003\");\n\t\t\n\t\trequestSpec = KonnectRequestBuilder.buildReqOBDCalls(KonnectAPIConstant.str_KA_Account2_API_TOKEN_AUTHval);\n\t\t\n\t\tresponseObj = given().spec(requestSpec)\n\t\t\t\t.body(KonnectPayLoad.TwoWay_OBDRequest(KonnectAPIConstant.id, KonnectAPIConstant.str_KA_Account2_callerID, recpList,\n\t\t\t\t\t\tKonnectAPIConstant.mediaURL, KonnectAPIConstant.callBckUrl, KonnectAPIConstant.direction_2Way,\n\t\t\t\t\t\tKonnectAPIConstant.str_priority_low, KonnectAPIConstant.str_KA_Account2_2wayOBD_IVRNumber_low_Priority))\n\t\t\t\t.when().post(KonnectAPIConstant.str_KA_Account2_ACCOUNT_Id+\"/\"+KonnectAPIConstant.CallsEndPoint).then().log()\n\t\t\t\t.all().extract().response();\n\t\t\n\t\t// Status code\n\t\tAPIResponseValidationLibrary.responseStatusCodeValidation(responseObj, \"success\");\n\t\t\n\t\t// Header Validation\n\t\t//APIResponseValidationLibrary.responseHeaderValidation_ContentEncoding(responseObj);\n\t\t\n\t // Status\n APIResponseValidationLibrary.generic_responseFieldValidation(responseObj, \"status\", KonnectAPIConstant.str_OK_Status,\"String\",\"\");\n\t\n Thread.sleep(5000);\n \n System.out.println(\"-- Detach number processing --\");\n String delPhNumber = KonnectAPIConstant.str_KA_Account2_2wayOBD_IVRNumber_low_Priority;\n String delete_resourceEndPointURL = KonnectAPIConstant.str_KA_Account2_ACCOUNT_Id+\"/\"+KonnectAPIConstant.InboundPhoneNumbersEndPoint+\"/\"+delPhNumber;\n \n RequestSpecification requestSpec1 = KonnectRequestBuilder.buildReq(KonnectAPIConstant.str_KA_Account2_API_TOKEN_AUTHval);\n \n \n Response responseObj1 = given().spec(requestSpec1).when()\n\t\t\t\t .delete(delete_resourceEndPointURL)\n\t\t\t\t .then().log().all().extract().response(); \n \n // Status code\n APIResponseValidationLibrary.responseStatusCodeValidation(responseObj1, \"success\"); \n \n // Status\n APIResponseValidationLibrary.generic_responseFieldValidation(responseObj, \"status\", KonnectAPIConstant.str_OK_Status,\"String\",\"\");\n\t\n Thread.sleep(8000);\n \n\t }", "@Test\n public void testEquality() {\n final Decimal P1 = new Decimal(700);\n final Decimal A1 = new Decimal(15.2);\n final int C1 = 5;\n Order o1 = new Order(P1, A1, C1);\n assertFalse(o1.equals(null));\n Order o2 = new Order(P1, A1, C1);\n assertTrue(o1.equals(o2));\n \n final Decimal P2 = new Decimal(0.0000000007);\n final Decimal A2 = new Decimal(15.2);\n final int C2 = 4;\n o2 = new Order(P2, A2, C2);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, C2);\n assertTrue(o1.equals(o2));\n\n // Try null count\n o2 = new Order(P2, A2, null);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n o1 = new Order(P2, A2, 0);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, -1);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n // Try both with null count\n o1 = new Order(P2, A2, null);\n assertTrue(o2.equals(o1));\n \n }", "protected void doQuery2(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tint orderNo = 0;\r\n\t\tif (null != request.getParameter(\"orderNo\")) {\r\n\t\t\torderNo = Integer.parseInt(request.getParameter(\"orderNo\"));\r\n\t\t\t// orderNo = new String(orderNo.getBytes(\"iso-8859-1\"), \"utf-8\");\r\n\t\t\tSystem.out.println(orderNo);\r\n\t\t}\r\n\t\t// List<Logistics> list = ls.queryLogisticsByOrderNo(1);\r\n\t\t// for (Logistics logistics : list) {\r\n\t\t// System.out.println(logistics);\r\n\t\t// }\r\n\t\t// System.out.println(list);\r\n\t\t// 将查询的关键字也存储起来 传递到jsp\r\n\t\t// request.setAttribute(\"logistics\", list);\r\n\r\n\t\t// 转发到页面\r\n\t\trequest.getRequestDispatcher(\"follow.jsp\").forward(request, response);\r\n\t}", "protected ComparisonResult compareBodies(byte []expectedBody, ContentType expectedContentType, byte []receivedBody, ContentType receivedContentType)\n {\n if (Arrays.equals(normalize(expectedBody),normalize(receivedBody)))\n {\n return ComparisonResult.MATCHES;\n }\n else\n {\n String diffMessage = createDiffMessage(normalize(expectedBody),expectedContentType,normalize(receivedBody),receivedContentType);\n return new ComparisonResult(false,diffMessage);\n }\n }", "@Test\n public void testStoreSaleAdjSale0() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"2\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"operator\", \"0\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "@Test\r\n public void testAddOrder() throws FlooringMasteryPersistenceException{\r\n firstTest = order1();\r\n secondTest = order2();\r\n\r\n assertEquals(firstTest, dao.getOrder(orderList, 1));\r\n\r\n assertEquals(secondTest, dao.getOrder(orderList, 2));\r\n\r\n }", "@Test\n void compareTo_Related_AddressMatch()\n {\n runIsMatchTest(AnswerType.no, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.Related);\n }", "public Boolean order(LA param1, LA param2) {\n return param1.equals(this.meet(param1, param2));\n }", "@Test\n public void testGetAllOrders() {\n Order addedOrder = new Order();\n Order addedOrder2 = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Order One\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n addedOrder2.setOrderNumber(2);\n addedOrder2.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder2.setCustomer(\"Order Two\");\n addedOrder2.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder2.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder2.setArea(new BigDecimal(\"100.00\"));\n addedOrder2.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder2.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder2.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder2.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder2);\n\n assertEquals(2, dao.getAllOrders().size());\n }", "@Test\n public void actionsFail() throws Exception {\n Language english = (Language)new English();\n Issue issue1 = this.githubIssue(\"amihaiemil\", \"@charlesmike index\");\n Issue issue2 = this.githubIssue(\"jeff\", \"@charlesmike index\");\n \n Comments comments = Mockito.mock(Comments.class);\n Comment com = Mockito.mock(Comment.class);\n Mockito.when(com.json()).thenThrow(new IOException(\"expected IOException...\"));\n Mockito.when(comments.iterate()).thenReturn(Arrays.asList(com));\n \n Issue mockedIssue1 = Mockito.mock(Issue.class);\n Mockito.when(mockedIssue1.comments())\n .thenReturn(comments)\n .thenReturn(issue1.comments());\n\n Issue mockedIssue2 = Mockito.mock(Issue.class);\n Mockito.when(mockedIssue2.comments())\n .thenReturn(comments)\n .thenReturn(issue2.comments());\n \n final Action ac1 = new Action(mockedIssue1);\n final Action ac2 = new Action(mockedIssue2);\n \n final ExecutorService executorService = Executors.newFixedThreadPool(5);\n List<Future> futures = new ArrayList<Future>();\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac1.perform();;\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac2.perform();\n }\n }));\n\n for(Future f : futures) {\n assertTrue(f.get()==null);\n }\n \n List<Comment> commentsWithReply1 = Lists.newArrayList(issue1.comments().iterate());\n List<Comment> commentsWithReply2 = Lists.newArrayList(issue2.comments().iterate());\n\n String expectedStartsWith = \"There was an error when processing your command. [Here](/\";\n assertTrue(commentsWithReply1.get(1).json().getString(\"body\")\n .startsWith(expectedStartsWith)); //there should be only 2 comments - the command and the reply.\n \n assertTrue(commentsWithReply2.get(1).json().getString(\"body\")\n .startsWith(expectedStartsWith)); //there should be only 2 comments - the command and the reply.\n \n }", "void matchAllOrders()throws OrderBookTradeException, \n OrderBookOrderException;", "@Test\n public void testMarketOrder() throws InterruptedException {\n setUp();\n testMatchingEngine.start();\n\n NewOrder nosB1 = createLimitOrder(\"BUY1\", Side.BUY, 100, 100.1, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB1);\n NewOrder nosB2 = createLimitOrder(\"BUY2\", Side.BUY, 200, 99.99, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB2);\n NewOrder nosB3 = createLimitOrder(\"BUY3\", Side.BUY, 300, 99.79, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB3);\n\n // Sell Order with Qty=150 and Market Order\n NewOrder nosS1 = createMarketOrder(\"SELL1\", Side.SELL, 700, System.currentTimeMillis());\n clientSession.sendNewOrder(nosS1);\n\n List<Event> msg = clientSession.getMessagesInQueue();\n assertEquals(7, msg.size());\n\n Trade t = ( Trade) msg.get(0);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(1);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(2);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(3);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(4);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n t = ( Trade) msg.get(5);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n Canceled t1 = ( Canceled) msg.get(6);\n assertEquals( t1.getCanceledQty() , 100 );\n }", "private static void checkForOppositeAlreadyPlacedOrders(Stock stock,\n List<Order> oppositeAlreadyPlacedOrders,\n Order arrivedOrder,\n AtomicBoolean arrivedOrderWasTreated,\n AtomicLong serialTime) {\n for (Iterator<Order> it = oppositeAlreadyPlacedOrders.iterator();\n it.hasNext(); ) {\n Order oppositeAlreadyPlacedOrder = it.next();\n\n /*\n * check if the 'arrivedOrder' is a 'Sell' Order.\n * compare orders: if 'buy' >= 'sell':\n */\n if (checkForOppositeBuyAlreadyPlacedOrders(stock, arrivedOrder, it,\n oppositeAlreadyPlacedOrder, arrivedOrderWasTreated,\n serialTime)) {}\n\n /*\n * check if the 'arrivedOrder' is a 'Buy' Order.\n * compare orders: if 'buy' >= 'sell':\n */\n else if (checkForOppositeSellAlreadyPlacedOrders(stock,\n arrivedOrder, it, oppositeAlreadyPlacedOrder,\n arrivedOrderWasTreated, serialTime)) {}\n\n /*\n * we found that there are no matching 'opposite already placed' Orders,\n * so we do not make a Transaction,\n * and the 'arrived' Order stays as it was in the data-base.\n */\n }\n }", "@BeforeAll\n public static void beforeAll()\n {\n cart1.add(\"apple\");\n\n seq1.add(List.of(\"apple\"));\n\n result1 = 1;\n\n // Cart: [Apple, Orange]\n // Seq: [[Orange], [Apple]]\n // Winner: False, items in cart not in the right order\n cart2.add(\"apple\");\n cart2.add(\"orange\");\n\n seq2.add(List.of(\"orange\"));\n seq2.add(List.of(\"apple\"));\n\n result2 = 0;\n\n // Cart: [Apple, Orange, Pear, Apple]\n // Seq: [[Apple], [Orange,Apple]]\n // Winner: False, items not contiguous\n cart3.add(\"apple\");\n cart3.add(\"orange\");\n cart3.add(\"pear\");\n cart3.add(\"apple\");\n\n seq3.add(List.of(\"apple\"));\n seq3.add(List.of(\"orange\", \"apple\"));\n\n result3 = 0;\n\n // Cart: [Apple, Orange, Pear, Apple]\n // Seq: [[Apple], [Any, Apple]]\n // Winner: True, careful that \"any\" doesn't start consuming once \"orange\" is encountered\n cart4.add(\"apple\");\n cart4.add(\"orange\");\n cart4.add(\"pear\");\n cart4.add(\"apple\");\n\n seq4.add(List.of(\"apple\"));\n seq4.add(List.of(\"any\", \"apple\"));\n\n result4 = 1;\n\n // Cart: [Apple]\n // Seq: [[Apple, Any]]\n // Winner: False, No match for apple\n cart5.add(\"apple\");\n\n seq5.add(List.of(\"apple\", \"any\"));\n\n result5 = 0;\n\n // Cart: [Apple]\n // Seq: [[Apple], [Apple]]\n // Winner: False, fruit can't be matched multiple times.\n cart6.add(\"apple\");\n\n seq6.add(List.of(\"apple\"));\n seq6.add(List.of(\"apple\"));\n\n result6 = 0;\n\n // Cart: [Apple, Orange, Pear, Apple]\n // Seq: [[Apple], [Pear, Any]]\n // Winner: True\n cart7.add(\"apple\");\n cart7.add(\"orange\");\n cart7.add(\"pear\");\n cart7.add(\"apple\");\n\n seq7.add(List.of(\"apple\"));\n seq7.add(List.of(\"pear\", \"any\"));\n\n result7 = 1;\n\n // Cart: [Apple, Orange, Apple, Orange, Pear]\n // Seq: [[Apple, Orange, Pear]]\n // Winner: True\n\n cart8.add(\"apple\");\n cart8.add(\"orange\");\n cart8.add(\"apple\");\n cart8.add(\"orange\");\n cart8.add(\"pear\");\n\n seq8.add(List.of(\"apple\", \"orange\", \"pear\"));\n\n result8 = 1;\n }", "@Test\r\n public void testSearchOrders() throws FlooringMasteryPersistenceException{\r\n order1();\r\n order2();\r\n\r\n List<Order> orders = dao.searchOrders(date);\r\n assertEquals(2, orders.size());\r\n }", "@Test\n public void testSameCountriesInBombCommand() {\n d_orderProcessor.processOrder(\"boMb china\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertFalse(l_order.executeOrder());\n }", "@Test\n\tpublic void testSearchBasedOnRequest2() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tPreference prefs = prefManager.getUserPreference();\n\t\tprefs.setThreshold(10000);\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"lokeyanhao\", prefs, true);\n\t\tassertTrue(sugg.size() > 0);\n\t\tassertTrue(sugg.get(0).getType() == Suggestion.ENTITY);\n\t}", "@Test\n public void queryWithOneInnerQueryCreate() throws IOException {\n BaseFuseClient fuseClient = new BaseFuseClient(\"http://localhost:8888/fuse\");\n //query request\n CreateQueryRequest request = new CreateQueryRequest();\n request.setId(\"1\");\n request.setName(\"test\");\n request.setQuery(Q1());\n //submit query\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .body(request)\n .post(\"/fuse/query\")\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1/cursor\"));\n assertEquals(1,queryResourceInfo.getInnerUrlResourceInfos().size());\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(201)\n .contentType(\"application/json;charset=UTF-8\");\n\n //get query resource by id\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .get(\"/fuse/query/\"+request.getId()+\"->\"+Q2().getName())\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(200)\n .contentType(\"application/json;charset=UTF-8\");\n\n\n }", "@Test\n public void testSubsystemCalledOnceForStateMatch() throws Exception{\n\n Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> admin1Attributes = new HashMap<>();\n FilterNode adminsFilterNode = getAdminsFilterNode(\"admin1\");\n admin1Attributes.put(CIRCUS_MODELNODEID, new Pair<>(new ArrayList<>(), Collections.singletonList(adminsFilterNode)));\n\n verifyGet(m_server, \"/getwithstatecontainertest/get-with-filter-admin-matchnode.xml\",\n \"/getwithstatecontainertest/get-with-filter-admin-matchnode-response.xml\", MESSAGE_ID);\n verify(m_adminSubSystem, times(1)).retrieveStateAttributes(Mockito.eq(admin1Attributes), Mockito.any(NetconfQueryParams.class));\n verify(m_jukeboxSubsystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_librarySystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_choiceCaseSubSystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n /**\n * Two state match nodes : <album>\n * <name>Circus</name>\n * <admins>\n * <admin>\n * <label>admin1</label> -> State match Node\n * </admin>\n * </admins>\n * </album>\n * <album>\n * <name>Greatest hits</name>\n * <admins>\n * <admin>\n * <label>admin3</label> -> State match Node\n * </admin>\n * </admins>\n * </album>\n */\n\n Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> admin3Attributes = new HashMap<>();\n FilterNode admin3MatchNode = getAdminsFilterNode(\"admin3\");\n List<FilterNode> filterNodes = new ArrayList<>();\n filterNodes.add(admin3MatchNode);\n admin3Attributes.put(GREATESTHITS_MODELNODEID, new Pair<>(new ArrayList<>(), filterNodes));\n\n verifyGet(m_server, \"/getwithstatecontainertest/get-with-filter-admin-2-matchnodes.xml\",\n \"/getwithstatecontainertest/get-with-filter-admin-2-matchnodes-response.xml\", MESSAGE_ID);\n verify(m_adminSubSystem, times(2)).retrieveStateAttributes(Mockito.eq(admin1Attributes), Mockito.any(NetconfQueryParams.class));\n verify(m_adminSubSystem, times(1)).retrieveStateAttributes(Mockito.eq(admin3Attributes), Mockito.any(NetconfQueryParams.class));\n verify(m_jukeboxSubsystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_librarySystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_choiceCaseSubSystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n\n /**\n * Two State Match nodes : <admins>\n * <admin>\n * <label>admin3</label> -> State match Node\n * </admin>\n * </admins>\n * <sponsors>\n * <sponsor>\n * <name>JD</name> -> State match Node\n * </sponsor>\n * </sponsors>\n */\n\n FilterNode sponsorsMatchNode = getSponsorsFilterNode(\"JD\");\n filterNodes.add(sponsorsMatchNode);\n\n verifyGet(m_server, \"/getwithstatecontainertest/get-with-filter-admin-matchnode-sponsor-matchnode.xml\",\n \"/getwithstatecontainertest/get-with-filter-admin-matchnode-sponsor-matchnode-response.xml\", MESSAGE_ID);\n verify(m_adminSubSystem, times(1)).retrieveStateAttributes(Mockito.eq(admin3Attributes), Mockito.any(NetconfQueryParams.class));\n verify(m_jukeboxSubsystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_librarySystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_choiceCaseSubSystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n }", "@Test\n public void testProcessRequestAirBookFollowedByIAReplacesOriginDestinationsInIAResponse() throws Exception {\n TestHelper.setupSessionsInfoManager(\"A3OE_951658ACFB3489F0420482DB0DCDF9AF\", \"OTA_AirBookLLS\");\n // AirBook request\n createServiceNode(\"OTA_AirBookLLS\", \".*LocationCode=.([a-zA-Z]{0,3}).*/#\");\n mockResponse = TestHelper.AIR_BOOK_RESPONSE;\n phs.processRequest(new GenericRequestWrapperMock(TestHelper.AIR_BOOK_REQUEST),\n new GenericResponseWrapperMock(), \"2P\");\n // IA request\n createServiceNode(\"SabreCommandLLS\", \"0\");\n mockResponse = TestHelper.SABRE_COMMAND_LLS_IA_RESPONSE;\n GenericResponseWrapperMock iaResponse = new GenericResponseWrapperMock();\n phs.processRequest(new GenericRequestWrapperMock(TestHelper.SABRE_COMMAND_LLS_IA_REQUEST),\n iaResponse, \"2P\");\n String iaResponseString = iaResponse.getResponseString();\n// assert iaResponseString.contains(\"02SEP\");\n// assert iaResponseString.contains(\"17OCT\");\n }", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "public void testTwoTraversers() {\n List<Schedule> schedules = getSchedules(MockInstantiator.TRAVERSER_NAME1);\n schedules.addAll(getSchedules(MockInstantiator.TRAVERSER_NAME2));\n runWithSchedules(schedules, createMockInstantiator());\n }", "@Test\n\tpublic void testPathPriorityByLength() {\n\n\t\tthis.requestDefinitions.get(0).setPathParts(new PathDefinition[1]);\n\t\tthis.requestDefinitions.get(1).setPathParts(new PathDefinition[3]);\n\t\tthis.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(2), this.requestDefinitions.get(0));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}", "@Test\n\tpublic void hashCodeTest() {\n\t\t\n\t\tString offeredCollectionIdOne = \"1\";\n\t\tString userIdOne = \"1\";\n\t\t\n\t\tTradeRequest firstRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdOne);\n\t\t\n\t\tString requestIdOne = \"1\";\n\t\tfirstRequest.setRequestId(requestIdOne);\n\t\t\n\t\tTradeRequest equalRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdOne);\n\t\t\n\t\tequalRequest.setRequestId(requestIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Request hash codes should be equal if they \" + \n\t\t\t\t\"have the same requestId, collectionId and userId\", \n\t\t\t\tfirstRequest.hashCode() == equalRequest.hashCode());\n\t\t\n\t\tString requestIdTwo = \"2\";\n\t\tString offeredCollectionIdTwo = \"2\";\n\t\tString userIdTwo = \"2\";\n\t\t\n\t\tTradeRequest requestIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdOne, \n\t\t\t\t\t\tuserIdOne);\n\t\t\n\t\trequestIdDifferentRequest.setRequestId(requestIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Request hash codes should not equal if \" + \n\t\t\t\t\" requestIds are different\", firstRequest.hashCode() != \n\t\t\t\trequestIdDifferentRequest.hashCode());\n\t\t\n\t\tTradeRequest collectionIdDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdTwo, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tcollectionIdDifferentRequest.setRequestId(requestIdOne);\n\t\t\n\t\tAssert.assertTrue(\"Request hash codes should not equal if \" + \n\t\t\t\t\"collectionIds are different\", firstRequest.hashCode() != \n\t\t\t\tcollectionIdDifferentRequest.hashCode());\n\t\t\n\t\t\n\t\tTradeRequest idsDifferentRequest = \n\t\t\t\tnew TradeRequest(offeredCollectionIdTwo, \n\t\t\t\t\t\tuserIdTwo);\n\t\t\n\t\tidsDifferentRequest.setRequestId(requestIdTwo);\n\t\t\n\t\tAssert.assertTrue(\"Request hash codes should not equal if \" +\n\t\t\t\t\"requestIds, collectionIds and userIds are different\", \n\t\t\t\tfirstRequest.hashCode() != idsDifferentRequest.hashCode());\t\n\t}", "@Test\n public void Task4() {\n\n given()\n\n .when()\n .get(\"https://jsonplaceholder.typicode.com/todos/2\")\n .then()\n .statusCode(200)\n .contentType(ContentType.JSON)\n // .log().body()\n .body(\"completed\",equalTo(false))\n ;\n // 2 yol\n boolean completed=\n given()\n .when()\n .get(\"https://jsonplaceholder.typicode.com/todos/2\")\n .then()\n .statusCode(200)\n .contentType(ContentType.JSON)\n // .log().body()\n //.body(\"completed\",equalTo(false))\n .extract().path(\"completed\")\n ;\n Assert.assertFalse(completed);\n }", "@Test\n\tpublic void testHttpMethodPriorityVsOtherAttributes() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setAccept(MediaType.HTML);\n\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);\n\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(2).setAccept(MediaType.HTML);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}", "@Override\n\tpublic void accept_order() {\n\t\t\n\t}", "@Test\n public void fetchMultipleRefund() throws RazorpayException{\n String mockedResponseJson = \"{\\n\" +\n \" \\\"entity\\\": \\\"collection\\\",\\n\" +\n \" \\\"count\\\": 1,\\n\" +\n \" \\\"items\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": \\\"rfnd_FP8DDKxqJif6ca\\\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 300100,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FIKOnlyii5QGNx\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"comment\\\": \\\"Comment for refund\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": \\\"10000000000000\\\"\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078124,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n List<Refund> fetch = refundClient.fetchMultipleRefund(REFUND_ID);\n assertNotNull(fetch);\n assertTrue(fetch.get(0).has(\"id\"));\n assertTrue(fetch.get(0).has(\"entity\"));\n assertTrue(fetch.get(0).has(\"amount\"));\n assertTrue(fetch.get(0).has(\"currency\"));\n assertTrue(fetch.get(0).has(\"payment_id\"));\n String fetchRequest = getHost(String.format(Constants.REFUND_MULTIPLE,REFUND_ID));\n verifySentRequest(false, null, fetchRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "public synchronized void requestFinished(Request request)\n {\n needsReorder = true;\n if (request.getDeadline() < clock.getTick())\n request.getStream().addMissedRequest();\n else\n request.getStream().addMetRequest();\n }", "@Test\n public void multipleNetServers() throws Exception {\n String gNode1 = \"graphNode1\";\n String gNode2 = \"graphNode2\";\n\n Map<String, String> rcaConfTags = new HashMap<>();\n rcaConfTags.put(\"locus\", RcaConsts.RcaTagConstants.LOCUS_DATA_NODE);\n IntentMsg msg = new IntentMsg(gNode1, gNode2, rcaConfTags);\n wireHopper2.getSubscriptionManager().setCurrentLocus(RcaConsts.RcaTagConstants.LOCUS_DATA_NODE);\n\n wireHopper1.sendIntent(msg);\n\n WaitFor.waitFor(() ->\n wireHopper2.getSubscriptionManager().getSubscribersFor(gNode2).size() == 1,\n 10,\n TimeUnit.SECONDS);\n GenericFlowUnit flowUnit = new SymptomFlowUnit(System.currentTimeMillis());\n DataMsg dmsg = new DataMsg(gNode2, Lists.newArrayList(gNode1), Collections.singletonList(flowUnit));\n wireHopper2.sendData(dmsg);\n wireHopper1.getSubscriptionManager().setCurrentLocus(RcaConsts.RcaTagConstants.LOCUS_DATA_NODE);\n\n WaitFor.waitFor(() -> {\n List<FlowUnitMessage> receivedMags = wireHopper1.getReceivedFlowUnitStore().drainNode(gNode2);\n return receivedMags.size() == 1;\n }, 10, TimeUnit.SECONDS);\n }", "@Test\n public void testInsertSharedService () {\n\n ArrayList<SharedService> sharedServicesBefore =\n given().\n header(\"AJP_eppn\", userEPPN).\n expect().\n statusCode(200).\n when().\n get(SHARED_SERVICE_ENDPOINT).\n as(ArrayList.class);\n\n int serviceId = 1;\n int userId = 102;\n int idSharedService = addSharedService(serviceId, userId);\n assertTrue(idSharedService != -1);\n ServiceLogger.log(logTag, \"inserted shared servie, id =\" + idSharedService);\n\n ArrayList<SharedService> sharedServicesAfter =\n given().\n header(\"AJP_eppn\", userEPPN).\n expect().\n statusCode(200).\n when().\n get(SHARED_SERVICE_ENDPOINT).\n as(ArrayList.class);\n\n int numBefore = (sharedServicesBefore != null) ? sharedServicesBefore.size() : 0;\n int numAfter = (sharedServicesAfter != null) ? sharedServicesAfter.size() : 0;\n int numExpected = numBefore + 1;\n assertTrue (numAfter == numExpected);\n\n ArrayList<SharedService> sharedServiceLookup =\n given().\n header(\"AJP_eppn\", userEPPN).\n expect().\n statusCode(200).\n when().\n get(SHARED_SERVICE_GET_BY_ID, idSharedService).\n as(ArrayList.class);\n int numLookup = (sharedServiceLookup != null) ? sharedServiceLookup.size() : 0;\n ServiceLogger.log(logTag, \"get shared service by id returns list of size =\" + numLookup);\n assertTrue (numLookup == 1);\n\n }", "public void t6_whenGetTwoAlarms_thenProvideTagOfNextAlarm() {\n\n // Create three alarms. (so in the log we have: 0, 1, 2)\n //\n for (int i = 0; i < TEST_KEYS.length; i++) {\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[i], EXISTING_ALARM.json);\n }\n // Let's remove all.\n //\n for (int i = 0; i < TEST_KEYS.length; i++) {\n dao.removeAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[i]);\n }\n // Create three alarms again.\n //\n for (int i = 0; i < TEST_KEYS.length; i++) {\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[i], EXISTING_ALARM.json);\n }\n // (so in the log we have: 0, 1, 2, x, x, x, 0, 1, 2)\n //\n // We expect:\n // all results - three alarms are returned.\n // first pack - two alarms are returned.\n // second pack - three alarms are returned.\n //\n check_for_t6(TEST_KEYS,\n new String[] {TEST_KEYS[0], TEST_KEYS[1]},\n TEST_KEYS);\n\n // Update one alarm.\n // It should be returned in the first pack AND in the second pack.\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[0], EXISTING_ALARM.json);\n // (so in the log we have: 0, 1, 2, x, x, x, 0, 1, 2, 0)\n //\n // We expect:\n // all results - three alarms are returned.\n // first pack - two alarms are returned. Exactly in the same order.\n // second pack - three alarms are returned.\n //\n check_for_t6(new String[] {TEST_KEYS[1], TEST_KEYS[2], TEST_KEYS[0]},\n new String[] {TEST_KEYS[0], TEST_KEYS[1]},\n new String[] {TEST_KEYS[1], TEST_KEYS[2], TEST_KEYS[0]});\n\n // Update another alarm.\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[2], EXISTING_ALARM.json);\n // (so in the log we have: 0, 1, 2, x, x, x, 0, 1, 2, 0, 2)\n //\n // We expect:\n // all results - three alarms are returned.\n // first pack - two alarms are returned. Exactly in the same order.\n // second pack - three alarms are returned.\n //\n check_for_t6(new String[] {TEST_KEYS[1], TEST_KEYS[0], TEST_KEYS[2]},\n new String[] {TEST_KEYS[0], TEST_KEYS[1]},\n new String[] {TEST_KEYS[1], TEST_KEYS[0], TEST_KEYS[2]});\n }", "private boolean areTwoMatchingRelators(final ExpressionJpa expression) {\n /*\n * since we are only dealing Person and CorporateBody\n * an assertion is that we are only dealing with 700 and 710 fields\n * and can reuse our counts\n */\n\n return (countMatchingPerson(expression)\n + countMatchingCorpBody(expression))\n >= 2;\n }", "public ArrayList<ArrayList<Furniture>> produceOrder(){\n ArrayList<ArrayList<Furniture>> orders = new ArrayList<ArrayList<Furniture>>();\n ArrayList<ArrayList<Furniture>> all = getSubsets(getFoundFurniture());\n ArrayList<ArrayList<Furniture>> valid = getValid(all);\n ArrayList<ArrayList<Furniture>> orderedCheapest = comparePrice(valid);\n\n int n = 0;\n boolean set;\n // adding up to the number requested\n while(n != getRequestNum()){\n for(int i = 0; i < orderedCheapest.size(); i++){\n set = true;\n for(int j = 0; j < orderedCheapest.get(i).size(); j++){\n // looking at furniture item\n for(ArrayList<Furniture> furn : orders){\n // if the list of orders already contains an id dont add that furniture combo to the order\n if(furn.contains(orderedCheapest.get(i).get(j))){\n set = false;\n }\n }\n }\n if(set){\n orders.add(orderedCheapest.get(i));\n }\n }\n n++;\n }\n return orders;\n }", "private MetaSparqlRequest createQueryMT2() {\n\t\treturn createQueryMT1();\n\t}", "@Test\n @Tag(NON_PR)\n void testAddressOrdering() throws Exception {\n Address ab = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"ab\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"AB\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n resourcesManager.setAddresses(ab);\n\n Address aa = new AddressBuilder()\n .withNewMetadata()\n .withNamespace(getSharedAddressSpace().getMetadata().getNamespace())\n .withName(AddressUtils.generateAddressMetadataName(getSharedAddressSpace(), \"aa\"))\n .endMetadata()\n .withNewSpec()\n .withType(\"queue\")\n .withAddress(\"aa\")\n .withPlan(getDefaultPlan(AddressType.QUEUE))\n .endSpec()\n .build();\n\n // For this bug, 'ab' will end up in the bad state\n resourcesManager.setAddresses(TimeoutBudget.ofDuration(Duration.ofMinutes(2)), aa, ab);\n }", "private boolean compareBaseHeaderFields(HeaderMsg requestHeader, HeaderMsg responseHeader) {\n return requestHeader.getRequestId() == responseHeader.getRequestId() &&\n requestHeader.getEpoch() == responseHeader.getEpoch() &&\n requestHeader.getClientId().equals(responseHeader.getClientId()) &&\n requestHeader.getClusterId().equals(responseHeader.getClusterId());\n }", "@Test\n public void testAcceptTether() throws IOException, InterruptedException {\n createTethering(\"xyz\", NAMESPACES, REQUEST_TIME, DESCRIPTION);\n // Tethering status should be PENDING\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.PENDING,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.INACTIVE);\n\n // Duplicate tether initiation should be ignored\n createTethering(\"xyz\", NAMESPACES, REQUEST_TIME, DESCRIPTION);\n // Tethering status should be PENDING\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.PENDING,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.INACTIVE);\n\n TetheringControlResponseV2 expectedResponse =\n new TetheringControlResponseV2(Collections.emptyList(), TetheringStatus.PENDING);\n // Tethering status on server side should be PENDING.\n expectTetheringControlResponse(\"xyz\", HttpResponseStatus.OK, GSON.toJson(expectedResponse));\n\n // User accepts tethering on the server\n acceptTethering();\n // Tethering status should become ACTIVE\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.ACCEPTED,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.ACTIVE);\n\n // Duplicate accept tethering should fail\n TetheringActionRequest request = new TetheringActionRequest(\"accept\");\n HttpRequest.Builder builder =\n HttpRequest.builder(HttpMethod.POST, config.resolveURL(\"tethering/connections/xyz\"))\n .withBody(GSON.toJson(request));\n HttpResponse response = HttpRequests.execute(builder.build());\n Assert.assertEquals(HttpResponseStatus.BAD_REQUEST.code(), response.getResponseCode());\n\n // Wait until we don't receive any control messages from the peer for upto the timeout interval.\n Thread.sleep(cConf.getInt(Constants.Tethering.CONNECTION_TIMEOUT_SECONDS) * 1000);\n // Tethering connection status should become INACTIVE\n expectTetheringStatus(\n \"xyz\",\n TetheringStatus.ACCEPTED,\n NAMESPACES,\n REQUEST_TIME,\n DESCRIPTION,\n TetheringConnectionStatus.INACTIVE);\n }", "@Test\n public void testSynchronousScores() throws Exception {\n String expectedRequestBody = \"{\\n\" +\n \" \\\"$type\\\" : \\\"$create_order\\\",\\n\" +\n \" \\\"$api_key\\\" : \\\"YOUR_API_KEY\\\",\\n\" +\n \" \\\"$user_id\\\" : \\\"billy_jones_301\\\"\\n\" +\n \"}\";\n\n // Start a new mock server and enqueue a mock response.\n MockWebServer server = new MockWebServer();\n MockResponse response = new MockResponse();\n response.setResponseCode(HTTP_OK);\n String bodyStr = \"{\\n\" +\n \" \\\"status\\\" : 0,\\n\" +\n \" \\\"error_message\\\" : \\\"OK\\\",\\n\" +\n \" \\\"time\\\" : 1327604222,\\n\" +\n \" \\\"request\\\" : \\\"\" + TestUtils.unescapeJson(expectedRequestBody) + \"\\\",\\n\" +\n \" \\\"score_response\\\": {\\n\" +\n \" \\\"status\\\": 0, \\n\" +\n \" \\\"error_message\\\": \\\"OK\\\", \\n\" +\n \" \\\"user_id\\\": \\\"billy_jones_301\\\",\\n\" +\n \" \\\"scores\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.898391231245,\\n\" +\n \" \\\"reasons\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"name\\\": \\\"UsersPerDevice\\\",\\n\" +\n \" \\\"value\\\": 4,\\n\" +\n \" \\\"details\\\": {\\n\" +\n \" \\\"users\\\": \\\"a, b, c, d\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" ],\\n\" +\n \" \\\"percentiles\\\": {\\n\"+\n \" \\\"last_7_days\\\": -1.0,\\n\"+\n \" \\\"last_1_days\\\": -1.0,\\n\"+\n \" \\\"last_10_days\\\": 0.019955654101995565,\\n\"+\n \" \\\"last_5_days\\\": -1.0\\n\"+\n \" }\\n\"+\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"score\\\": 0.472838192111,\\n\" +\n \" \\\"reasons\\\": []\\n\" +\n \" }\\n\" +\n \" },\\n\" +\n \" \\\"latest_labels\\\": {\\n\" +\n \" \\\"payment_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": true,\\n\" +\n \" \\\"time\\\": 1352201880,\\n\" +\n \" \\\"description\\\": \\\"received a chargeback\\\"\\n\" +\n \" },\\n\" +\n \" \\\"promotion_abuse\\\": {\\n\" +\n \" \\\"is_bad\\\": false,\\n\" +\n \" \\\"time\\\": 1362205000\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\";\n response.setBody(bodyStr);\n server.enqueue(response);\n server.start();\n\n // Create a new client and link it to the mock server.\n SiftClient client = new SiftClient(\"YOUR_API_KEY\", \"YOUR_ACCOUNT_ID\",\n new OkHttpClient.Builder()\n .addInterceptor(OkHttpUtils.urlRewritingInterceptor(server))\n .build());\n\n // Build and execute the request against the mock server.\n EventRequest request = client.buildRequest(\n new CreateOrderFieldSet().setUserId(\"billy_jones_301\"))\n .withScores(\"payment_abuse\", \"promotion_abuse\")\n .withScorePercentiles();\n EventResponse siftResponse = request.send();\n\n // Verify the request.\n RecordedRequest request1 = server.takeRequest();\n Assert.assertEquals(\"POST\", request1.getMethod());\n Assert.assertEquals(\"/v205/events?return_score=true\" +\n \"&fields=score_percentiles\" +\n \"&abuse_types=payment_abuse,promotion_abuse\", request1.getPath());\n JSONAssert.assertEquals(expectedRequestBody, request.getFieldSet().toJson(), true);\n\n // Verify the response.\n Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());\n Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());\n JSONAssert.assertEquals(response.getBody().readUtf8(),\n siftResponse.getBody().toJson(), false);\n Assert.assertEquals((Double) 0.898391231245,\n siftResponse.getAbuseScore(\"payment_abuse\").getScore());\n Assert.assertEquals(expectedPercentiles(),\n siftResponse.getAbuseScore(\"payment_abuse\").getPercentiles());\n\n server.shutdown();\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 static void ensureEquivalent(Message m1, JBossMessage m2) throws JMSException\n {\n assertTrue(m1 != m2);\n \n //Can't compare message id since not set until send\n \n assertEquals(m1.getJMSTimestamp(), m2.getJMSTimestamp());\n \n byte[] corrIDBytes = null;\n String corrIDString = null;\n \n try\n {\n corrIDBytes = m1.getJMSCorrelationIDAsBytes();\n }\n catch(JMSException e)\n {\n // correlation ID specified as String\n corrIDString = m1.getJMSCorrelationID();\n }\n \n if (corrIDBytes != null)\n {\n assertTrue(Arrays.equals(corrIDBytes, m2.getJMSCorrelationIDAsBytes()));\n }\n else if (corrIDString != null)\n {\n assertEquals(corrIDString, m2.getJMSCorrelationID());\n }\n else\n {\n // no correlation id\n \n try\n {\n byte[] corrID2 = m2.getJMSCorrelationIDAsBytes();\n assertNull(corrID2);\n }\n catch(JMSException e)\n {\n // correlatin ID specified as String\n String corrID2 = m2.getJMSCorrelationID();\n assertNull(corrID2);\n }\n }\n assertEquals(m1.getJMSReplyTo(), m2.getJMSReplyTo());\n assertEquals(m1.getJMSDestination(), m2.getJMSDestination());\n assertEquals(m1.getJMSDeliveryMode(), m2.getJMSDeliveryMode());\n //We don't check redelivered since this is always dealt with on the proxy\n assertEquals(m1.getJMSType(), m2.getJMSType());\n assertEquals(m1.getJMSExpiration(), m2.getJMSExpiration());\n assertEquals(m1.getJMSPriority(), m2.getJMSPriority());\n \n int m1PropertyCount = 0, m2PropertyCount = 0;\n for(Enumeration p = m1.getPropertyNames(); p.hasMoreElements(); m1PropertyCount++)\n {\n p.nextElement();\n }\n for(Enumeration p = m2.getPropertyNames(); p.hasMoreElements(); m2PropertyCount++)\n {\n p.nextElement();\n }\n \n assertEquals(m1PropertyCount, m2PropertyCount);\n \n for(Enumeration props = m1.getPropertyNames(); props.hasMoreElements(); )\n {\n boolean found = false;\n \n String name = (String)props.nextElement();\n \n boolean booleanProperty = false;\n try\n {\n booleanProperty = m1.getBooleanProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a boolean\n }\n \n if (found)\n {\n assertEquals(booleanProperty, m2.getBooleanProperty(name));\n continue;\n }\n \n byte byteProperty = 0;\n try\n {\n byteProperty = m1.getByteProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a byte\n }\n \n if (found)\n {\n assertEquals(byteProperty, m2.getByteProperty(name));\n continue;\n }\n \n short shortProperty = 0;\n try\n {\n shortProperty = m1.getShortProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a short\n }\n \n if (found)\n {\n assertEquals(shortProperty, m2.getShortProperty(name));\n continue;\n }\n \n \n int intProperty = 0;\n try\n {\n intProperty = m1.getIntProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a int\n }\n \n if (found)\n {\n assertEquals(intProperty, m2.getIntProperty(name));\n continue;\n }\n \n \n long longProperty = 0;\n try\n {\n longProperty = m1.getLongProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a long\n }\n \n if (found)\n {\n assertEquals(longProperty, m2.getLongProperty(name));\n continue;\n }\n \n \n float floatProperty = 0;\n try\n {\n floatProperty = m1.getFloatProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a float\n }\n \n if (found)\n {\n assertTrue(floatProperty == m2.getFloatProperty(name));\n continue;\n }\n \n double doubleProperty = 0;\n try\n {\n doubleProperty = m1.getDoubleProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a double\n }\n \n if (found)\n {\n assertTrue(doubleProperty == m2.getDoubleProperty(name));\n continue;\n }\n \n String stringProperty = null;\n try\n {\n stringProperty = m1.getStringProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a String\n }\n \n if (found)\n {\n assertEquals(stringProperty, m2.getStringProperty(name));\n continue;\n }\n \n \n fail(\"Cannot identify property \" + name);\n }\n }", "@Test\n public void testSuccessfulMultipleParBySameClient() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.FALSE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.FALSE, oidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(oidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n assertEquals(OIDCLoginProtocol.CLIENT_SECRET_BASIC, oidcCRep.getTokenEndpointAuthMethod());\n\n // Pushed Authorization Request #1\n oauth.clientId(clientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(201, pResp.getStatusCode());\n String requestUriOne = pResp.getRequestUri();\n\n // Pushed Authorization Request #2\n oauth.clientId(clientId);\n oauth.scope(\"microprofile-jwt\" + \" \" + \"profile\");\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n pResp = oauth.doPushedAuthorizationRequest(clientId, clientSecret);\n assertEquals(201, pResp.getStatusCode());\n String requestUriTwo = pResp.getRequestUri();\n\n // Authorization Request with request_uri of PAR #2\n // remove parameters as query strings of uri\n oauth.redirectUri(null);\n oauth.scope(null);\n oauth.responseType(null);\n oauth.requestUri(requestUriTwo);\n String state = oauth.stateParamRandom().getState();\n oauth.stateParamHardcoded(state);\n OAuthClient.AuthorizationEndpointResponse loginResponse = oauth.doLogin(TEST_USER2_NAME, TEST_USER2_PASSWORD);\n assertEquals(state, loginResponse.getState());\n String code = loginResponse.getCode();\n String sessionId =loginResponse.getSessionState();\n\n // Token Request #2\n oauth.redirectUri(CLIENT_REDIRECT_URI); // get tokens, it needed. https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3\n OAuthClient.AccessTokenResponse res = oauth.doAccessTokenRequest(code, clientSecret);\n assertEquals(200, res.getStatusCode());\n\n AccessToken token = oauth.verifyToken(res.getAccessToken());\n String userId = findUserByUsername(adminClient.realm(REALM_NAME), TEST_USER2_NAME).getId();\n assertEquals(userId, token.getSubject());\n assertEquals(sessionId, token.getSessionState());\n // The following check is not valid anymore since file store does have the same ID, and is redundant due to the previous line\n // Assert.assertNotEquals(TEST_USER2_NAME, token.getSubject());\n assertEquals(clientId, token.getIssuedFor());\n assertTrue(token.getScope().contains(\"openid\"));\n assertTrue(token.getScope().contains(\"microprofile-jwt\"));\n assertTrue(token.getScope().contains(\"profile\"));\n\n // Logout\n oauth.doLogout(res.getRefreshToken(), clientSecret); // same oauth instance is used so that this logout is needed to send authz request consecutively.\n\n // Authorization Request with request_uri of PAR #1\n // remove parameters as query strings of uri\n oauth.redirectUri(null);\n oauth.scope(null);\n oauth.responseType(null);\n oauth.requestUri(requestUriOne);\n state = oauth.stateParamRandom().getState();\n oauth.stateParamHardcoded(state);\n loginResponse = oauth.doLogin(TEST_USER_NAME, TEST_USER_PASSWORD);\n assertEquals(state, loginResponse.getState());\n code = loginResponse.getCode();\n sessionId =loginResponse.getSessionState();\n\n // Token Request #1\n oauth.redirectUri(CLIENT_REDIRECT_URI); // get tokens, it needed. https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3\n res = oauth.doAccessTokenRequest(code, clientSecret);\n assertEquals(200, res.getStatusCode());\n\n token = oauth.verifyToken(res.getAccessToken());\n userId = findUserByUsername(adminClient.realm(REALM_NAME), TEST_USER_NAME).getId();\n assertEquals(userId, token.getSubject());\n assertEquals(sessionId, token.getSessionState());\n // The following check is not valid anymore since file store does have the same ID, and is redundant due to the previous line\n // Assert.assertNotEquals(TEST_USER_NAME, token.getSubject());\n assertEquals(clientId, token.getIssuedFor());\n assertFalse(token.getScope().contains(\"microprofile-jwt\"));\n assertTrue(token.getScope().contains(\"openid\"));\n }", "@Test\n public void testAddOrder() throws Exception {\n String stringDate1 = \"06272017\";\n LocalDate date = LocalDate.parse(stringDate1, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n Orders order1 = new Orders(2);\n order1.setOrderNumber(2);\n order1.setDate(date);\n order1.setCustomerName(\"Joel\");\n order1.setArea(new BigDecimal(\"250\"));\n Tax tax1 = new Tax(\"PA\");\n tax1.setState(\"PA\");\n order1.setTax(tax1);\n Product product1 = new Product(\"Wood\");\n product1.setProductType(\"Wood\");\n order1.setProduct(product1);\n service.addOrder(order1);\n\n assertEquals(new BigDecimal(\"4.75\"), service.getOrder(order1.getDate(), order1.getOrderNumber()).getProduct().getLaborCostPerSqFt());\n assertEquals(new BigDecimal(\"6.75\"), service.getOrder(order1.getDate(), order1.getOrderNumber()).getTax().getTaxRate());\n\n//Testing with invalid data\n Orders order2 = new Orders(2);\n order2.setOrderNumber(2);\n order2.setDate(date);\n order2.setCustomerName(\"Eric\");\n order2.setArea(new BigDecimal(\"250\"));\n Tax tax2 = new Tax(\"MN\");\n tax2.setState(\"MN\");\n order2.setTax(tax2);\n Product product = new Product(\"Carpet\");\n product.setProductType(\"Carpet\");\n order2.setProduct(product);\n try {\n service.addOrder(order2);\n fail(\"Expected exception was not thrown\");\n } catch (FlooringMasteryPersistenceException | InvalidProductAndStateException | InvalidProductException | InvalidStateException e) {\n }\n\n }", "@Override\r\n\tprotected boolean prerequisites() {\n\t\treturn _player1.getClient().getPlayer().getWrappedObject().getPosition()\r\n\t\t\t\t.equals(_player2.getClient().getPlayer().getWrappedObject().getPosition());\r\n\t}", "@Test\n public void testEditOrder() throws Exception {\n String stringDate1 = \"10012017\";\n LocalDate date = LocalDate.parse(stringDate1, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n String stringDate2 = \"11052020\";\n LocalDate date2 = LocalDate.parse(stringDate2, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n Orders edittedOrder = new Orders(1);\n edittedOrder.setOrderNumber(1);\n edittedOrder.setDate(date2);\n edittedOrder.setCustomerName(\"Jenna\");\n edittedOrder.setArea(new BigDecimal(\"30\"));\n Tax tax = new Tax(\"PA\");\n tax.setState(\"PA\");\n edittedOrder.setTax(tax);\n Product product = new Product(\"Tile\");\n product.setProductType(\"Tile\");\n edittedOrder.setProduct(product);\n service.addOrder(edittedOrder);\n\n Orders oldOrder = service.getOrder(date, 1);\n service.editOrder(oldOrder, edittedOrder);\n\n// Testing order date and product change \n assertEquals(new BigDecimal(\"4.15\"), service.getOrder(edittedOrder.getDate(), edittedOrder.getOrderNumber()).getProduct().getLaborCostPerSqFt());\n assertEquals(new BigDecimal(\"6.75\"), service.getOrder(edittedOrder.getDate(), edittedOrder.getOrderNumber()).getTax().getTaxRate());\n\n try {\n// Testing if order was removed from previous the date after the edit method\n service.getOrder(date, 1).getProduct().getProductType();\n fail(\"Exception was expected\");\n } catch (Exception e) {\n return;\n }\n\n }", "private void assertEquivalentPair(Set<Pair> result, String s1, String s2) {\n\t\tPair resultPair = filterResult(result, s1, s2);\n\t\tassertFalse(resultPair.isMarked());\n\t}", "@Test\n\tpublic void testPathPriorityByWildCard() {\n\n\t\tthis.requestDefinitions.get(0).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(0).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(0).getPathParts()[0].setValue(\"a\");\n\t\tthis.requestDefinitions.get(0).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(0).getPathParts()[1].setValue(null);\n\n\t\tthis.requestDefinitions.get(1).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(1).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(1).getPathParts()[0].setValue(\"a\");\n\t\tthis.requestDefinitions.get(1).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(1).getPathParts()[1].setValue(\"a\");\n\n\t\tthis.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(2).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(2).getPathParts()[0].setValue(null);\n\t\tthis.requestDefinitions.get(2).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(2).getPathParts()[1].setValue(\"a\");\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}", "private void editMatchedOrders(Order order, Trade trade) throws\n IOException,\n MissingEntityException,\n InvalidEntityException {\n // might want outside of private method so executes match lock for both orders first\n order.setStatus(MATCH_LOCK);\n orderDao.editOrder(order);\n LocalDateTime versionTime = LocalDateTime.now().minusSeconds(1);\n order.setVersionTime(versionTime);\n order.setSize(order.getSize() - trade.getQuantity());\n if (order.getSize() == 0) {\n order.setStatus(FULFILLED);\n } else {\n order.setStatus(ACTIVE);\n }\n orderDao.editOrder(order);\n auditDao.writeMessage(\"Edit order \" + order.getId() + \", matched.\");\n }", "@Test\n public void actionsExecute() throws Exception {\n Language english = (Language)new English();\n Issue issue1 = this.githubIssue(\"amihaiemil\", \"@charlesmike hello there\");\n Issue issue2 = this.githubIssue(\"jeff\", \"@charlesmike hello\");\n Issue issue3 = this.githubIssue(\"vlad\", \"@charlesmike, hello\");\n Issue issue4 = this.githubIssue(\"marius\", \"@charlesmike hello\");\n final Action ac1 = new Action(issue1);\n final Action ac2 = new Action(issue2);\n final Action ac3 = new Action(issue3);\n final Action ac4 = new Action(issue4);\n \n final ExecutorService executorService = Executors.newFixedThreadPool(5);\n List<Future> futures = new ArrayList<Future>();\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac1.perform();\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac2.perform();\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac3.perform();\n \n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac4.perform();\n }\n }));\n\n for(Future f : futures) {\n assertTrue(f.get()==null);\n }\n \n List<Comment> commentsWithReply1 = Lists.newArrayList(issue1.comments().iterate());\n List<Comment> commentsWithReply2 = Lists.newArrayList(issue2.comments().iterate());\n List<Comment> commentsWithReply3 = Lists.newArrayList(issue3.comments().iterate());\n List<Comment> commentsWithReply4 = Lists.newArrayList(issue4.comments().iterate());\n String expectedReply1 = \"> @charlesmike hello there\\n\\n\" + String.format(english.response(\"hello.comment\"),\"amihaiemil\");\n assertTrue(commentsWithReply1.get(1).json().getString(\"body\")\n .equals(expectedReply1)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply2 = \"> @charlesmike hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"jeff\");\n assertTrue(commentsWithReply2.get(1).json().getString(\"body\")\n .equals(expectedReply2)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply3 = \"> @charlesmike, hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"vlad\");\n assertTrue(commentsWithReply3.get(1).json().getString(\"body\")\n .equals(expectedReply3)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply4 = \"> @charlesmike hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"marius\");\n assertTrue(commentsWithReply4.get(1).json().getString(\"body\")\n .equals(expectedReply4)); //there should be only 2 comments - the command and the reply.\n \n }", "private static boolean fun3(List<String> res, List<String> ac1) {\n\t\tHashSet<String> hs=new HashSet<String>();\r\n\t\tfor(int i=0;i<res.size();i++){\r\n\t\t\ths.add(res.get(i));\r\n\t\t}\r\n\t\tfor(int i=0;i<ac1.size();i++){\r\n\t\t\tif(hs.contains(ac1.get(i)))\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static void prefixMerge(Client [] list1, Client [] list2, Client[] result){\n int resultCount = 0;\n for (int i = 0; resultCount < result.length; i++) //goes through list1 up until the end of result\n {\n for (int j = 0; j < list2.length && resultCount < result.length; j++) //goes through list2 up until the end of list2\n {\n for (int k = 0; k < resultCount; k++) { //check if current element of list2 is already in result\n if (list2[j].compareClient(result[k]) == 0) { j++; } //without this there is an issue where the previous element of list1 is\n } //repeated in list2 but the current element of list1 is larger\n\n if (list2[j].compareClient(list1[i]) < 0) { //copies current element of list2 to result if it is smaller\n result[resultCount] = list2[j]; //than current element of list1\n resultCount++;\n }\n }\n if (resultCount < result.length) { //copies current element of list1 to result if there is room in result\n result[resultCount] = list1[i]; // needed if statement because of outOfBounds exception where all elements\n resultCount++; //in result were already filled by list2\n }\n }\n\n }", "public static void mergeJsonIntoBase(List<Response> r1, List<Response> r2){\n //List of json objects in the new but not old json\n List<String> toAdd = new ArrayList<>();\n for(int i = 0; i < r1.size(); i ++){\n String r1ID = r1.get(i).getId();\n for(int j = 0; j < r2.size(); j ++){\n String r2ID = r2.get(j).getId();\n if(r1ID.equals(r2ID)){\n compareJson(r1.get(i), r2.get(j));\n }else{\n if (!toAdd.contains(r2ID)) {\n toAdd.add(r2ID);\n }\n }\n }\n }\n //Add all new elements into the base element\n List<Response> remainderToAdd = getElementListById(toAdd, r2);\n\n for(Response r: remainderToAdd){\n r1.add(r);\n }\n }", "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "public static void verifyPlaceStoreOrderResponse(Response response, long expectedId, long expectedPetId, int expectedQuantity, String expectedShipDate, String expectedStatus, boolean expectedCompleted) {\n verifySuccessStatusCodeInPlaceStoreOrderResponse(response);\n\n StoreOrderResponse storeOrderResponse = response.as(StoreOrderResponse.class);\n\n long actualId = storeOrderResponse.getId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - id, Actual: \" + actualId + \" , Expected: \" + expectedId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualId, expectedId, \"Place Store Order service response - id field error\");\n\n long actualPetId = storeOrderResponse.getPetId();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - pet id, Actual: \" + actualPetId + \" , Expected: \" + expectedPetId);\n MicroservicesEnvConfig.softAssert.assertEquals(actualPetId, expectedPetId, \"Place Store Order service response - pet id field error\");\n\n int actualQuantity = storeOrderResponse.getQuantity();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - quantity, Actual: \" + actualQuantity + \" , Expected: \" + expectedQuantity);\n MicroservicesEnvConfig.softAssert.assertEquals(actualQuantity, expectedQuantity, \"Place Store Order service response - quantity field error\");\n\n String actualShipDate = storeOrderResponse.getShipDate().substring(0,23);\n expectedShipDate = expectedShipDate.replace(\"Z\", \"\");\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - ship date, Actual: \" + actualShipDate + \" , Expected: \" + expectedShipDate);\n MicroservicesEnvConfig.softAssert.assertEquals(actualShipDate, expectedShipDate, \"Place Store Order service response - ship date field error\");\n\n String actualStatus = storeOrderResponse.getStatus();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - status, Actual: \" + actualStatus + \" , Expected: \" + expectedStatus);\n MicroservicesEnvConfig.softAssert.assertEquals(actualStatus, expectedStatus, \"Place Store Order service response - status field error\");\n\n boolean actualCompleted = storeOrderResponse.isComplete();\n APILogger.logInfo(LOGGER,\"Verifying Place Store Order service response - complete, Actual: \" + actualCompleted + \" , Expected: \" + expectedCompleted);\n MicroservicesEnvConfig.softAssert.assertEquals(actualCompleted, expectedCompleted, \"Place Store Order service response - complete field error\");\n }", "public void testSearchByContent() {\n Message m1 = new Message(\"test\",\"bla bla david moshe\",_u1);\n Message.incId();\n try {\n Thread.sleep(10);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n Message m2 = new Message(\"test2\",\"bla2 bla david tikva moshe\",_u1);\n Message.incId();\n Message m3 = new Message(\"test2\",\"moshe cohen\",_u1);\n Message.incId();\n\n this.allMsgs.put(m1.getMsg_id(), m1);\n this.allMsgs.put(m2.getMsg_id(), m2);\n this.allMsgs.put(m3.getMsg_id(), m3);\n\n this.searchEngine.addData(m1);\n this.searchEngine.addData(m2);\n this.searchEngine.addData(m3);\n\n /* SearchHit[] result = this.searchEngine.searchByContent(\"bla2\", 0,1);\n assertTrue(result.length==1);\n assertTrue(result[0].getMessage().equals(m2));\n\n SearchHit[] result2 = this.searchEngine.searchByContent(\"bla david tikva\", 0,2);\n assertTrue(result2.length==1);\n assertEquals(result2[0].getScore(),3.0);\n //assertEquals(result2[1].getScore(),2.0);\n assertTrue(result2[0].getMessage().equals(m2));\n //assertTrue(result2[1].getMessage().equals(m1));\n\n SearchHit[] result3 = this.searchEngine.searchByContent(\"bla2 tikva\", 0, 5);\n assertTrue(result3.length==0);\n */\n\n/*\n SearchHit[] result4 = this.searchEngine.searchByContent(\"bla OR tikva\", 0, 5);\n assertTrue(result4.length==2);\n assertTrue(result4[0].getMessage().equals(m2));\n assertTrue(result4[1].getMessage().equals(m1));\n\n SearchHit[] result5 = this.searchEngine.searchByContent(\"bla AND cohen\", 0, 5);\n assertTrue(result5.length==0);\n\n result5 = this.searchEngine.searchByContent(\"bla AND moshe\",0,5);\n assertTrue(result5.length==2);\n assertTrue(result5[0].getScore() == result5[1].getScore());\n assertTrue(result5[0].getMessage().equals(m2));\n assertTrue(result5[1].getMessage().equals(m1));\n\n result5 = this.searchEngine.searchByContent(\"bla AND moshe\", 10, 11);\n assertTrue(result5.length==0);\n */\n\n }", "private static Map<String, String> syncAttributes(Map<String, String> first, Map<String, String> second){\n Map<String, String> synced = new HashMap<>();\n\n for(String firstKey : first.keySet()){\n if(second.containsKey(firstKey)){\n //both contain the same key -> take from second\n synced.put(firstKey, second.get(firstKey));\n }else{\n //second doesn't contain this key -> take from first\n synced.put(firstKey, first.get(firstKey));\n }\n }\n\n for(String secondKey : second.keySet()){\n if(!synced.containsKey(secondKey)){\n //since first doesn't contain this key (or it would already be in syned) we take this key\n synced.put(secondKey, second.get(secondKey));\n }\n }\n return synced;\n }", "private void phaseTwo(){\r\n\r\n\t\tCollections.shuffle(allNodes, random);\r\n\t\tList<Pair<Node, Node>> pairs = new ArrayList<Pair<Node, Node>>();\r\n\t\t\r\n\t\t//For each node in allNode, get all relationshpis and iterate through each relationship.\r\n\t\tfor (Node n1 : allNodes){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//If a node n1 is related to any other node in allNodes, add those relationships to rels.\r\n\t\t\t\t//Avoid duplication, and self loops.\r\n\t\t\t\tIterable<Relationship> ite = n1.getRelationships(Direction.BOTH);\t\t\t\t\r\n\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\tNode n2 = rel.getOtherNode(n1);\t//Get the other node\r\n\t\t\t\t\tif (allNodes.contains(n2) && !n1.equals(n2)){\t\t\t\t\t//If n2 is part of allNodes and n1 != n2\r\n\t\t\t\t\t\tif (!rels.contains(rel)){\t\t\t\t\t\t\t\t\t//If the relationship is not already part of rels\r\n\t\t\t\t\t\t\tPair<Node, Node> pA = new Pair<Node, Node>(n1, n2);\r\n\t\t\t\t\t\t\tPair<Node, Node> pB = new Pair<Node, Node>(n2, n1);\r\n\r\n\t\t\t\t\t\t\tif (!pairs.contains(pA)){\r\n\t\t\t\t\t\t\t\trels.add(rel);\t\t\t\t\t\t\t\t\t\t\t//Add the relationship to the lists.\r\n\t\t\t\t\t\t\t\tpairs.add(pA);\r\n\t\t\t\t\t\t\t\tpairs.add(pB);\r\n\t\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}\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}", "@Test\n\tpublic void test2() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query02.rq\", \"/tests/basic/query02.ttl\", false);\n\t}", "@Test(dataProvider = \"uris\")\n void testWithCustomSubscriber(String uri) throws Exception {\n HttpClient client = HttpClient.newBuilder().sslContext(sslContext).build();\n\n Map<HttpRequest, String> requests = new HashMap<>();\n for (int i=0;i<CONCURRENT_REQUESTS; i++) {\n HttpRequest request = HttpRequest.newBuilder(URI.create(uri + \"?\" + i))\n .build();\n requests.put(request, BODIES[i]);\n }\n\n // initial connection to seed the cache so next parallel connections reuse it\n client.sendAsync(HttpRequest.newBuilder(URI.create(uri)).build(), discard(null)).join();\n\n // will reuse connection cached from the previous request ( when HTTP/2 )\n CompletableFuture.allOf(requests.keySet().parallelStream()\n .map(request -> client.sendAsync(request, CustomSubscriber.handler))\n .map(cf -> cf.thenCompose(ConcurrentResponses::assert200ResponseCode))\n .map(cf -> cf.thenCompose(response -> assertbody(response, requests.get(response.request()))))\n .toArray(CompletableFuture<?>[]::new))\n .join();\n }", "@Test\n public void multipleShocksOnSameDataReversed() {\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(relativeShift, absoluteShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.6, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "@Override\r\n\t\tpublic boolean equalsWithOrder(\r\n\t\t\t\tPair<? extends T, ? extends S> anotherPair) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equalsWithOrder(anotherPair);\r\n\t\t\t}\r\n\t\t}", "@Override\n public void addRequest(Address beforeNewPickup, Address newPickup, Address beforeNewDelivery, Address newDelivery) throws Exception {\n if(!intersectionList.contains(beforeNewPickup) || !intersectionList.contains(newPickup)\n || !intersectionList.contains(beforeNewDelivery) || !intersectionList.contains(newDelivery)){\n this.setChanged();\n this.notifyObservers(\"Address doesn't exist in the map.\");\n throw new Exception();\n }else{\n Request newRequest = new Request(newPickup, newDelivery);\n Path oldPath1 = tour.findPathOrigin(beforeNewPickup);\n Path oldPath2 = tour.findPathOrigin(beforeNewDelivery);\n Path newPath1;\n Path newPath2;\n Path newPath3;\n Path newPath4;\n try {\n newPath1 = findShortestPath(beforeNewPickup, newPickup);\n newPath2 = findShortestPath(newPickup, oldPath1.getArrival());\n }catch (Exception e){\n this.setChanged();\n this.notifyObservers(newPickup);\n throw new Exception(\"newPickup unreachable\");\n }\n try {\n newPath3 = findShortestPath(beforeNewDelivery, newDelivery);\n newPath4 = findShortestPath(newDelivery, oldPath2.getArrival());\n }catch (Exception e){\n this.setChanged();\n this.notifyObservers(newDelivery);\n throw new Exception(\"newDelivery unreachable\");\n }\n tour.replaceOldPath(oldPath1, newPath1, newPath2);\n tour.replaceOldPath(oldPath2, newPath3, newPath4);\n this.planningRequest.addRequest(newRequest);\n this.setChanged();\n this.notifyObservers();\n }\n }", "@Test\n public void Task2() {\n String text=\n given()\n .when()\n .get(\"https://httpstat.us/203\")\n .then()\n .statusCode(203)\n .contentType(ContentType.TEXT)\n // .body(equalTo(\"203 Non-Authoritative Information\")) // aslinda böyle yapmaliyiz\n .extract().body().asString()\n ;\n Assert.assertEquals(text,\"203 Non-Authoritative Information\");\n // 2 yol\n given()\n .when()\n .get(\"https://httpstat.us/203\")\n .then()\n .statusCode(203)\n .contentType(ContentType.TEXT)\n .body(equalTo(\"203 Non-Authoritative Information\")) // aslinda böyle yapmaliyiz\n ;\n }", "@Test\n public void testReturnPickUpRequest() {\n List<List<String>> orders = new ArrayList<>();\n ArrayList<String> order1 = new ArrayList<>();\n order1.add(\"White\");\n order1.add(\"SE\");\n orders.add(order1);\n ArrayList<String> order2 = new ArrayList<>();\n order2.add(\"Red\");\n order2.add(\"S\");\n orders.add(order2);\n ArrayList<String> order3 = new ArrayList<>();\n order3.add(\"Blue\");\n order3.add(\"SEL\");\n orders.add(order3);\n ArrayList<String> order4 = new ArrayList<>();\n order4.add(\"Beige\");\n order4.add(\"S\");\n orders.add(order4);\n PickUpRequest expected = new PickUpRequest(orders, translation);\n warehouseManager.makePickUpRequest(orders);\n assertEquals(expected.getSkus(), warehouseManager.returnPickUpRequest().getSkus());\n }", "@Test(priority = 10)\n\tpublic void testGetAllClients2() {\n\t\tResponse response = given().header(\"Authorization\", \"Bad Token\").when().get(URL).then().extract().response();\n\n\t\tassertTrue(response.statusCode() == 401);\n\t\tassertTrue(response.asString().contains(\"Unauthorized\"));\n\n\t\tgiven().header(\"Authorization\", token).when().get(URL + \"/notAURL\").then().assertThat().statusCode(404);\n\n\t\tgiven().header(\"Authorization\", token).when().post(URL).then().assertThat().statusCode(405);\n\t}", "public String checkOrder(ArrayList<ArrayList<Furniture>> orders, boolean gui){\n ArrayList<ArrayList<Furniture>> last = new ArrayList<ArrayList<Furniture>>();\n // if the amount requested is larger than the amount of valid orders found then the request fails\n if(getRequestNum() > orders.size()){\n return printOutputFail(gui);\n }else{\n for(int i = 0; i < getRequestNum(); i++){\n last.add(orders.get(i));\n }\n deleteOrders(last);\n return printOutput(last, gui);\n }\n }" ]
[ "0.5897281", "0.58182657", "0.5803511", "0.5759828", "0.5734682", "0.5730469", "0.5608106", "0.55540943", "0.55224806", "0.54430103", "0.5420481", "0.54058236", "0.5355025", "0.5335518", "0.53214216", "0.5260433", "0.52579576", "0.5251097", "0.5222557", "0.51894337", "0.518266", "0.51785195", "0.516054", "0.51580715", "0.5149877", "0.50900847", "0.5079614", "0.5068788", "0.5054778", "0.5037564", "0.5034723", "0.50310946", "0.50259507", "0.50025874", "0.49975446", "0.4981706", "0.49803454", "0.49787483", "0.4976565", "0.496747", "0.49639067", "0.49530467", "0.49467558", "0.49395928", "0.49392048", "0.49309963", "0.490685", "0.48960808", "0.48936978", "0.48904496", "0.48731834", "0.48596203", "0.48536664", "0.4853351", "0.48360974", "0.4835978", "0.4834807", "0.482886", "0.48195586", "0.48191792", "0.4818682", "0.4817001", "0.48140785", "0.48127383", "0.48112437", "0.47883594", "0.47869572", "0.47866815", "0.47846562", "0.4784054", "0.47766837", "0.47750264", "0.4769349", "0.47689345", "0.47647604", "0.47594061", "0.4756173", "0.47561458", "0.47561216", "0.4748958", "0.47470897", "0.47462648", "0.4737684", "0.47372892", "0.4736218", "0.47313166", "0.4720864", "0.47206", "0.47199723", "0.47191992", "0.47154546", "0.47145364", "0.4709734", "0.47095498", "0.47091392", "0.47080094", "0.47075102", "0.47025126", "0.46992862", "0.46979684" ]
0.5292745
15
Returns the parameter type
public ParameterType getType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getParameterType() { return parameterType; }", "public java.lang.Integer getParameterType() {\r\n return parameterType;\r\n }", "public String getParamType() {\n return paramType;\n }", "public String getParamType() {\n return paramType;\n }", "int getParamType(String type);", "List<Type> getTypeParameters();", "public String getType() {\n\t\tString type = C;\n\t\t// Modify if constrained\n\t\tParameterConstraint constraint = this.constraint;\n\t\tif (constraint != null) type = \"Constrained\" + type;\n\t\treturn type;\n\t}", "Type getMethodParameterType() throws IllegalArgumentException;", "public Class<?> getParameterClass()\n\t{\n\t\treturn parameterClass;\n\t}", "public ActionParameterType getType() {\n\n\t\treturn _type;\n\n\t}", "char[][] getTypeParameterNames();", "type getType();", "@TestMethod(value=\"testGetParameterType_String\")\n public Object getParameterType(String name) {\n \tif (\"maxIterations\".equals(name)) return Integer.MAX_VALUE;\n \tif (\"lpeChecker\".equals(name)) return Boolean.TRUE;\n \tif (\"maxResonStruc\".equals(name)) return Integer.MAX_VALUE;\n return null;\n }", "TypeInfo[] typeParams();", "public String getTypeName()\n {\n return getArgumentTypeName(type);\n }", "public TypeParameterListNode getTypeParameters()throws ClassCastException;", "@TestMethod(value=\"testGetParameterType_String\")\n public Object getParameterType(String name) {\n \tif (\"maxIterations\".equals(name)) return Integer.MAX_VALUE;\n return null;\n }", "@Pure\n\tpublic JvmTypeParameter getJvmTypeParameter() {\n\t\treturn this.parameter;\n\t}", "public String[] getParamTypeNames()\n/* */ {\n/* 353 */ return this.parameterTypeNames;\n/* */ }", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public Parameter getTypeParameter(StratmasObject object)\n {\n // Find youngest base type with a mapping\n for (Type walker = object.getType(); \n walker != null; walker = walker.getBaseType()) {\n ParameterFactory parameterFactory = (ParameterFactory) getTypeMapping().get(walker);\n if (parameterFactory != null) {\n return parameterFactory.getParameter(object);\n }\n }\n\n return null;\n }", "Type type();", "Type type();", "public ActionParameterTypes getParametersTypes() {\n\t\treturn this.signature;\n\t}", "String provideType();", "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();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();" ]
[ "0.8441452", "0.80371493", "0.77001435", "0.77001435", "0.75304043", "0.7369274", "0.7148292", "0.6931482", "0.6793942", "0.67825055", "0.6633532", "0.66332775", "0.66298056", "0.66196316", "0.65610296", "0.6560963", "0.6521654", "0.650673", "0.65028024", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.6489094", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64784193", "0.64363635", "0.64227915", "0.64227915", "0.641774", "0.6417588", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.6408766", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.64034575", "0.6399285", "0.6399285", "0.6399285", "0.6399285", "0.6399285", "0.6399285", "0.6399285" ]
0.8964635
0
Returns this parameter's name. The name must be unique within one ParameterSet.
public String getName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getParameterName()\n {\n checkPrecondition(hasParameterName(), \"no parameter name\");\n return this.paramName;\n }", "public String getParameterName( )\n {\n return _strParameterName;\n }", "public String getParameterName() {\n return this.parameterName;\n }", "public String getParameterName()\r\n\t{\r\n\t\treturn this.paramName;\r\n\t}", "public String getParameterGroupName() {\n return parameterGroupName;\n }", "public java.lang.String getParameterName() {\n java.lang.Object ref = parameterName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n parameterName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getParameterUrlName() {\r\n\t\treturn parameterUrlName;\r\n\t}", "public java.lang.String getParameterName() {\n java.lang.Object ref = parameterName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n parameterName_ = s;\n }\n return s;\n }\n }", "public String getParameterName() {\n\t\treturn parameterName;\n\t}", "public String getParameterName() {\r\n return parameterName;\r\n }", "public String getParameterName() {\n return parameterName;\n }", "java.lang.String getParameterName();", "public String getName() {\n return getProperty(Property.NAME);\n }", "protected String getParameterName()\n {\n return parameterName;\n }", "public String getName() {\n return (String) mProperties.get(FIELD_NAME);\n }", "public String getParameterName()\n {\n return parameterName;\n }", "public String getName() {\r\n\t\treturn name.get();\r\n\t}", "public String getName() {\n\t\treturn this.toString();\n\t}", "public java.lang.String getParameterId() {\n java.lang.Object ref = parameterId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n parameterId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getName() {\n return name.get();\n }", "public com.google.protobuf.ByteString getParameterNameBytes() {\n java.lang.Object ref = parameterName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n parameterName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String toString() {\n return \"DatasetParameterPK[units=\" + units + \", name=\" + name + \", datasetId=\" + datasetId + \"]\";\n }", "public String name() {\n return getString(FhirPropertyNames.PROPERTY_NAME);\n }", "public String getName() {\r\n assert name != null;\r\n return name;\r\n }", "public com.google.protobuf.ByteString getParameterNameBytes() {\n java.lang.Object ref = parameterName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n parameterName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public final String getName() {\n String ret = null;\n for (String s : getNameFields()) {\n if (ret == null) {\n ret = get(s);\n } else {\n ret = ret + \",\" + get(s);\n }\n }\n return ret;\n }", "@objid (\"c9430e32-5923-4873-9196-70620b195552\")\n public String getPatternParameterName() {\n return this.elt.getTagValue(PatternParameter.MdaTypes.PATTERNPARAMETER_NAME_TAGTYPE_ELT);\n }", "public Object getName() {\n\t\treturn this.name;\n\t}", "public Object getName() {\n\t\treturn this.name;\n\t}", "@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}", "@java.lang.Override\n public java.lang.String getParameterId() {\n java.lang.Object ref = parameterId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n parameterId_ = s;\n return s;\n }\n }", "public String getName() {\n\t\treturn(name);\n\t}", "public String getParamName() {\n return paramName;\n }", "public String getName() {\n return (String) getValue(NAME);\n }", "@Override\n\tpublic String getName() {\n\n\t\treturn name;\n\t}", "public String getName() {\r\n return this.name();\r\n }", "public String getName() {\n\n\t\treturn name;\n\t}", "public String getName() {\n\n\t\treturn name;\n\t}", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "public final String name() {\n\t\treturn name;\n\t}", "public String getName() {\n\t\t\treturn this.name;\n\t\t}", "public String getName() {\n\t\t\treturn name;\n\t\t}", "public String getName() {\n\t\t\treturn name;\n\t\t}", "public String getName() {\n\t\t\treturn name;\n\t\t}", "public String getName() {\n\t\t\treturn name;\n\t\t}", "public String getName() {\n\t\t\treturn name;\n\t\t}", "public java.lang.String getName();", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}", "@Override\r\n\tpublic String getName() {\n\t\treturn this.name;\r\n\t}", "public String getName() {\r\n\t\treturn this.name;\r\n\t}" ]
[ "0.752844", "0.68205607", "0.6804812", "0.67795897", "0.6777581", "0.67028505", "0.6653352", "0.66512716", "0.66154623", "0.6580927", "0.6579807", "0.6533015", "0.6509432", "0.64916646", "0.6482084", "0.64803433", "0.64576274", "0.6438864", "0.6382192", "0.6355023", "0.63371664", "0.63354367", "0.6330141", "0.63240665", "0.63113725", "0.6304318", "0.6298416", "0.62951833", "0.62951833", "0.62904286", "0.6275441", "0.6259724", "0.62503517", "0.62441486", "0.6238184", "0.6236464", "0.62364066", "0.62364066", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6230129", "0.6221853", "0.62184566", "0.6209013", "0.6209013", "0.6209013", "0.6209013", "0.6209013", "0.6204928", "0.62009186", "0.61952496", "0.61905986" ]
0.0
-1
Creates new instance of Cell.
public Cell() { this.alive = false; // Initially dead this.age = 0; // Initially age of 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cell(){}", "public Cell()\n\t{\n\t}", "public NotebookCell() {}", "@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}", "MemberCell createMemberCell();", "public Cell ()\n {\n cellStatus = false;\n xCoordinate = 0;\n yCoordinate = 0;\n button = new JButton();\n }", "public Cell(int col, int row){ // constructor\n this.col = col;\n this.row = row;\n }", "@Override\n\tpublic Cell makeCell(int x, int y, int start, Grid g,\n\t\t\tMap<String, Double> map) {\n\t\tmyGrid = g;\n\t\tGameOfLifeCell c = new GameOfLifeCell(x, y, start, this);\n\t\treturn c;\n\t}", "public Cell(int row, int column){\r\n this.row = row;\r\n this.column = column;\r\n }", "public DataCell() {\n super();\n }", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "@Override\n\tpublic Cell createCell(int arg0, int arg1) {\n\t\treturn null;\n\t}", "AttributeCell createAttributeCell();", "Cell() {\r\n\t\tstate = CellState.EMPTY;\r\n\t}", "public Cell(T val)\n {\n _value = val;\n _visited = false;\n }", "public abstract Cell createDataCell() throws DailyFollowUpException;", "public Cell(int i, int j){\n this.i = i;\n this.j = j;\n }", "private Cell(E data) {\n Cell.this.data = data;\n }", "public Cell(int row, int col)\n\t{\n\t\tthis.row = row;\n\t\tthis.col = col;\n\t}", "public void init(CellImpl cell);", "public Cell(int row, int col) {\n\t\talive = false;\n\t\tmyRow = row;\n\t\tmyCol = col;\n\t\tneighbors = new ArrayList<>();\n\t}", "public Cell() {\r\n\t\tthis.mineCount = 0;\r\n\t\tthis.isFlagged = false;\r\n\t\tthis.isExposed = false;\r\n\t\tthis.isMine = false;\r\n\t}", "protected GridCell(int x, int y, GridDomain parent) {\n\t\tcoord = new GridCoord(x, y);\n\t\tthis.parent = parent;\n\t\tcelltype = GridCellType.getDefault();\n\t\tcellCost = celltype.cost;\n\t}", "public Cell(int posX, int posY) {\n this.posX = posX;\n this.posY = posY;\n this.level = 0;\n this.currWorker = null;\n this.dome = false;\n }", "private Cell createCell(Point position, CellType type) {\n\t\tfor (AgentListener listener : listeners) {\n\t\t\tlistener.changeCellType(position, type);\n\t\t}\n\t\treturn new Cell(position, type);\n\t}", "VariableCell createVariableCell();", "public Cell(DCEL_Face face) {\n\t\tthis(face, -1);\n\n\t}", "public Cell()\n\t{\n\t\tthis.alive = 0;\n\t\tthis.neighbors = 0;\n\t}", "public Cell(int x,int y){\r\n this.x = x;\r\n this.y = y;\r\n level = 0;\r\n occupiedBy = null;\r\n }", "public Cell(Cell original){\n this.i = original.i;\n this.j = original.j;\n this.type = original.type;\n if (original.entity != null) {\n if (original.entity instanceof Agent) {\n Agent agent = (Agent) original.entity;\n this.entity = new Agent(agent);\n }\n else if (original.entity instanceof Box) {\n Box box = (Box) original.entity;\n this.entity = new Box(box);\n }\n }\n else {\n this.entity = null;\n }\n this.goalLetter = original.goalLetter;\n }", "public Cell(String state, int x, int y) {\n this.state = state;\n this.nextState = state;\n this.coordinate = new Point(x, y);\n }", "public Table() {\n // <editor-fold desc=\"Initialize Cells\" defaultstate=\"collapsed\">\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (cells[row][column] == null) {\n cells[row][column] = new Cell(row, column);\n }\n }\n }\n // </editor-fold>\n }", "public CellReference(Cell cell) {\n\t\tthis(cell, false, false);\n\t}", "public Cell createCell(Row row, int column, String cellValue) {\n // Create a cell and put a value in it.\n Cell cell = row.createCell(column);\n cell.setCellValue(cellValue);\n return cell;\n }", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "public RCellBlock( Sheet sheet, int startRowIndex, int startColIndex, \n \tint nRows, int nCols, boolean create)\n {\n cells = new Cell[nCols][nRows];\n noRows = nRows;\n noCols = nCols;\n \n\t\tfor (int i = 0; i < nRows; i++) {\n\t\t\tRow r = sheet.getRow(startRowIndex + i);\n\t\t\tif (r == null) { // row is not already there\n\t\t\t\tif (create)\n\t\t\t\t\tr = sheet.createRow(startRowIndex + i);\n\t\t\t\telse\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"Row \"\n\t\t\t\t\t\t\t\t\t+ (startRowIndex + i)\n\t\t\t\t\t\t\t\t\t+ \" doesn't exist in the sheet. Need to call with argument create=TRUE.\");\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j = 0; j < nCols; j++) {\n\t\t\t\tcells[j][i] = create ? r.createCell(startColIndex+j)\n : r.getCell(startColIndex+j, Row.CREATE_NULL_AS_BLANK);\n\t\t\t}\n\t\t}\n\t}", "public GameBoard(){\r\n boardCells = new GameCell[NUMBER_OF_CELLS];\r\n for( int i= 0; i< NUMBER_OF_CELLS; i++ ){\r\n boardCells[i] = new GameCell(i);//\r\n }\r\n }", "public MotifCellFactoryObservable() {\r\n\t\tsuper();\r\n\t}", "public Cell(){\n \tthis.shot=false;\n }", "public FuelCell() {\n fuelCellMot = new VictorSPX(fuelCellConstants.fuelCellMot);\n raiseHopper = new Solenoid(driveConstants.PCM, fuelCellConstants.raiseHopper);\n lowerHopper = new Solenoid(driveConstants.PCM, fuelCellConstants.lowerHopper);\n }", "public Cell(int state) {\n \t\tthis.state = state;\n \t}", "public static CellModel getInstance() {\r\n if (cellModel == null) {\r\n throw new NullPointerException(\"Cell model not initialized\");\r\n }\r\n return cellModel;\r\n }", "public ZonaFasciculataCells() {\r\n\r\n\t}", "public Cell(boolean cellStatus, int xCoordinate, int yCoordinate)\n {\n this.cellStatus = cellStatus;\n\n if (xCoordinate >= 0)\n {\n this.xCoordinate = xCoordinate;\n }\n else \n {\n this.xCoordinate = 0;\n }// end of if (xCoordinate >= 0)\n\n if (yCoordinate >= 0)\n {\n this.yCoordinate = yCoordinate;\n }\n else \n {\n this.yCoordinate = 0;\n } // end of if (yCoordinate >= 0)\n\n button = new JButton();\n }", "VARCell createVARCell();", "public BoardCell(int x, int y){\n xCor=x;\n yCor=y;\n }", "Cell(int x, int y, Color color, boolean flooded, ACell left, ACell top, ACell right,\r\n ACell bottom) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = left;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n }", "public Cell(int row, int col, int startingState, int[] neighborRowIndexes,\n int[] neighborColIndexes) {\n myState = startingState;\n myRow = row;\n myCol = col;\n neighborRowIndex = neighborRowIndexes;\n if (hexagon) {\n neighborEvenColIndex = new int[]{-1, -1, 0, 1, 0, -1};\n neighborOddColIndex = new int[]{-1, 0, 1, 1, 1, 0};\n neighborRowIndex = new int[]{0, -1, -1, 0, 1, 1};\n } else {\n neighborEvenColIndex = neighborColIndexes;\n neighborOddColIndex = neighborColIndexes;\n }\n }", "public BoardCell(int rowNum, int colNum) {\t\t\t\t\t\t\t\t\t// Constructor with row and column parameters passed into it\n\t\tthis.row = rowNum;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setting the row of the cell to the row parameter\n\t\tthis.column = colNum;\t\t\t\t\t\t\t\t\t\t\t\t\t// setting the column of the cell to the column parameter\n\t}", "Grid(int width, int height) {\n this.width = width;\n this.height = height;\n\n // Create the grid\n grid = new Cell[width][height];\n\n // Populate with dead cells to start\n populateGrid(grid);\n }", "public Cell(DCEL_Face face, Point dualPoint) {\n\t\tthis.face = face;\n\t\tthis.label = 0;\n\t\tthis.dualPoint = dualPoint;\n\n\t}", "@SuppressWarnings({\"deprecation\", \"rawtypes\", \"unchecked\"})\n public static <S, T> javafx.scene.control.cell.TextFieldTableCellBuilder<S, T, ?> create() {\n return new javafx.scene.control.cell.TextFieldTableCellBuilder();\n }", "@Test\n public void Create_A_Live_Cell()\n {\n GameCell cell = new GameCell();\n cell.setState(1);\n Assert.assertEquals(1, cell.getState());\n }", "public Cell(int x, int y){\n\t\tif((x<0 || x>7) || (y<0 || y>7)){\n\t\t\tSystem.out.println(\"The provided coordinates for the cell are out of range.\");\n\t\t\treturn;\n\t\t}\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.placedPiece = null;\n\t}", "public Cell(int diameterInMicrometers, int growthIncrementInMicrometers) {\n if (diameterInMicrometers < 1\n || diameterInMicrometers > 41\n || growthIncrementInMicrometers < 1\n || growthIncrementInMicrometers > 6\n ) {\n throw new IllegalArgumentException(\"Bacterium size must start between 0 and 40 \" +\n \"and growth increment between 0 and 5\");\n }\n this.diameterInMicrometers = diameterInMicrometers;\n //growth increment can never be changed after construction\n this.growthIncrementInMicrometers = growthIncrementInMicrometers;\n }", "public CellPane(Simulator simulator, int xPosition, int yPosition) {\n this.simulator = simulator;\n this.xPosition = xPosition;\n this.yPosition = yPosition;\n\n alive = false;\n\n cell = new Rectangle(50, 50);\n\n setColor();\n\n getChildren().addAll(cell);\n\n this.setOnMousePressed(this::handleMouseInput);\n this.setOnMouseEntered(this::handleMouseHover);\n this.setOnMouseExited(this::handleMouseExit);\n }", "Cell(int x, int y, Color color, boolean flooded) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }", "protected GridCell(int x, int y, GridDomain parent,\n\t\t\tGridCellType defaultterrain) {\n\t\tcoord = new GridCoord(x, y);\n\t\tthis.parent = parent;\n\t\tcelltype = defaultterrain;\n\t\tif (celltype == null) celltype = GridCellType.getDefault();\n\t\tcellCost = celltype.cost;\n\t}", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "public void setCell(Cell cell)\n {\n myCell = cell;\n }", "private static void InitializeCells()\n {\n cells = new Cell[Size][Size];\n\n for (int i = 0; i < Size; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n cells[i][j] = new Cell(i, j);\n }\n }\n }", "public Cell(final int indX, final int indY, int x, int y) {\r\n\t\tthis.stage = GameScreen.stage;\r\n\t\tthis.indX = indX;\r\n\t\tthis.indY = indY;\r\n\r\n\t\tthis.img = new Image(Assets.manager.get(Assets.SQUARE_TXT, Texture.class));\r\n\t\timg.setX(x);\r\n\t\timg.setY(y);\r\n\t\tstage.addActor(img);\r\n\t\timg.addListener(new InputListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\r\n\t\t\t\t// Call gameLogic to find where piece belongs and check game state\r\n\t\t\t\tGameScreen.game.placePiece(indX, indY);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public Cell(int playerNumber) {\n\t\tthis.playerNumber = playerNumber;\n\t}", "public BoardCell(BoardCell existingBoardCell){\n xCor=existingBoardCell.getXCor();\n yCor=existingBoardCell.getYCor();\n }", "public void initialize() {\n\t\t// set seed, if defined\n\t\tif (randomSeed > Integer.MIN_VALUE) {\n\t\t\tapp.randomSeed(randomSeed);\n\t\t}\n\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = new Cell(\n\t\t\t\t\tapp,\n\t\t\t\t\tcellSize,\n\t\t\t\t\tcolors[(int)app.random(colors.length)],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tc.position = PVector.add(offset, new PVector(x * cellSize, y * cellSize));\n\t\t\t\tcells[x + (y * gridX)] = c;\n\t\t\t\tnewCells[x + (y * gridX)] = c;\n\t\t\t}\n\t\t}\n\t}", "public abstract void initCell(\r\n int row,\r\n int col,\r\n double valueToInitialise);", "public GridPane() {\n\t\t for (int i=0;i<MAX_X; i++) {\n\t\t\tfor (int j=0;j<MAX_Y;j++) {\n\t\t\t\tseed[i][j] = new Cell(i,j,false);\n\t\t\t}//end for j\n\t\t }//end for i\n\t\n\t \tdefaultBackground = getBackground();\n\t\n\t MatteBorder border = new MatteBorder(1, 1, 1, 1, Color.BLACK);\n\t \tthis.setBorder(border);\n\t \t\t\n\t\t addMouseListener(new MouseAdapter() {\n\t @Override\n\t public void mouseClicked(MouseEvent e) {\n\t \t int x1 = (int)(e.getX()/CELL_WIDTH);\n\t \t int y1 = (int)(e.getY()/CELL_WIDTH);\n\t \t if(seed[x1][y1].isAlive()) {\n\t \t\t seed[x1][y1].isAlive = false;\n\t \t }\n\t \t else {\n\t \t\t seed[x1][y1].isAlive = true;\n\t \t }\n//\t \t System.out.println(\"[\"+x1+\",\"+y1+\"]\");\n\t repaint();\n\t }\n\t });\n\t }", "public void createCellBoard(int rows, int cols) {\n\t\trowcount = rows;\n\t\tcolcount = cols;\n\t\tcells = new int[rows][cols];\n\t}", "public MapCell(int row, int column){\n\t\tsetPosition(row, column);\n\t}", "public Cell(char data, Pos position)\r\n\t{\r\n\t\tthis(false, 0, position, false, AntColor.Black);\r\n\t\tswitch (data)\r\n\t\t{\r\n\t\tcase '#':\r\n\t\t\tisRocky = true;\r\n\t\t\tbreak;\r\n\t\tcase '+':\r\n\t\t\tantHillColor = AntColor.Red;\r\n\t\t\tantHill = true;\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tantHillColor = AntColor.Black;\r\n\t\t\tantHill = true;\r\n\t\t\tbreak;\r\n\t\tcase '.':\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tfoodCount = Integer.parseInt(\"\" + data);\r\n\t\t\t} catch (NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle addNewNwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(NWCELL$26);\n return target;\n }\n }", "public Couple cellContent(int x, int y);", "public Cell(final Boolean state) {\n this.alive = state;\n this.newState = state;\n this.neighbors = new LinkedList<Cell>();\n }", "@Override\n public AbstractViewHolder onCreateCellViewHolder(ViewGroup parent, int viewType) {\n return new CellViewHolder(mInflater.inflate(R.layout.table_view_cell_layout, parent, false));\n }", "public RedCell()\n {\n super(1, Greenfoot.getRandomNumber(2) + 1);\n setRotation(Greenfoot.getRandomNumber(360));\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 }", "GroupCell createGroupCell();", "public static BoardCell boardCell(int row, int column) {\n\t\tBoardCell boardCell = new BoardCell(row, column);\n\t\treturn boardCell;\n\t}", "public CellPane(CellPaneGrid<T> grid, int i, int j, double cw, double ch, double dx, double dy, T cell) {\n\t\tthis.grid = grid;\n\t\tthis.i = i;\n\t\tthis.j = j;\n\t\tthis.cw = cw;\n\t\tthis.ch = ch;\n\t\tthis.setTranslateX(dx);\n\t\tthis.setTranslateY(dy);\n\t\tthis.cell = cell;\n\t\tcell.setPane(this);\n\t\tsyncView();\n\t\tthis.setOnMouseClicked(e -> this.cell.onClick());\n\t}", "public CellStyle createCellStyle() {\n\t\treturn null;\n\t}", "public Grid(int recRowSize, int recColSize) {\r\n counter = 0;\r\n rowSize = recRowSize;\r\n colSize = recColSize;\r\n myCells = new Cell[recRowSize + 2][recColSize + 2];\r\n for (int row = 0; row < myCells.length; row++) {\r\n for (int col = 0; col < myCells[row].length; col++) {\r\n myCells[row][col] = new Cell();\r\n }\r\n }\r\n }", "public void testSetCell()\n {\n // Test setting a cell under ideal conditions\n assertTrue(b1.getCell(0, 0) == Cell.EMPTY);\n assertTrue(b1.setCell(0, 0, Cell.RED1));\n assertTrue(b1.getCell(0, 0) == Cell.RED1 );\n\n // If a cell is out of bounds, should fail\n assertFalse(b1.setCell(-1, 0, Cell.RED1));\n assertFalse(b1.setCell(0, -1, Cell.RED1));\n assertFalse(b1.setCell(3, 0, Cell.RED1));\n assertFalse(b1.setCell(0, 3, Cell.RED1));\n\n // If a cell is already occupied, should fail\n assertFalse(b1.setCell(0, 0, Cell.RED1));\n\n // If the board is won, should fail\n assertTrue(b1.setCell(0, 1, Cell.RED1));\n assertTrue(b1.setCell(0, 2, Cell.RED1));\n assertEquals(b1.getWhoHasWon(), Cell.RED1);\n assertFalse(b1.setCell(1, 1, Cell.RED1)); // Unoccupied\n assertFalse(b1.setCell(0, 0, Cell.RED1)); // Occupied\n\n\n\n\n }", "private Environment(int rows, int columns)\r\n\t{\r\n\t\tthis.rows = rows;\r\n\t\tthis.columns = columns;\r\n\t\tcells = new Cell[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++)\r\n\t\t\tfor (int j = 0; j < columns; j++)\r\n\t\t\t\tcells[i][j] = new Cell();\r\n\t}", "public Cell(int i, int j, Type type, Entity entity, char goalLetter){\n this.i = i;\n this.j = j;\n this.type = type;\n this.entity = entity;\n this.goalLetter = goalLetter;\n }", "public CellularAutomaton(int width, int height) {\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tcellMatrix = new int[width][height];\n\t}", "Cell(int xpos, int ypos, int status)\n {\n this.X = xpos;\n this.Y = ypos;\n this.status = status;\n if (status == 0)\n {\n cell.setVisible(false);\n }\n cell.setFill(Color.WHITE);\n }", "public Cell(){\n this.ship = null;\n this.hasBeenShot = false;\n }", "public Cell containingCell() {\n return new Cell(x / NBROFSUBCELLINCELL, y / NBROFSUBCELLINCELL);\n }", "public TeleportationCell(int i,BasicCell nc) {\n\t\tsuper(i);\n\t\tthis.newCell = nc;\n\t}", "public TicTacToeBoard() {\n grid = new Cell[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++)\n grid[i][j] = new Cell(i, j, '-');\n }\n }", "public Cell(final ByteBuffer key, final Value value, final long generation) {\n this.key = key;\n this.value = value;\n this.generation = generation;\n }", "public Cell createCell(Sheet sheet, int c, int r, String cellValue) {\n Row row = sheet.getRow(r);\n if (row == null) {\n row = sheet.createRow(r);\n }\n // Create a cell and put a value in it.\n Cell cell = row.createCell(c);\n cell.setCellValue(cellValue);\n return cell;\n }", "public AbstractCellTableBuilder(AbstractCellTable<T> cellTable) {\n this.cellTable = cellTable;\n }", "private static void createCell(Workbook wb, Row row, int column, HorizontalAlignment halign, VerticalAlignment valign) {\n Cell cell = row.createCell(column);\n cell.setCellValue(\"Align It\");\n CellStyle cellStyle = wb.createCellStyle();\n //水平对其\n// cellStyle.setAlignment(halign);\n //垂直对齐\n// cellStyle.setVerticalAlignment(valign);\n cell.setCellStyle(cellStyle);\n }", "private Cell()\n\t{\n\t\tsupplied = false;\n\t\tconnections = new boolean[4];\n\t\t\n\t\tfor(int i = 0; i < 4; ++i)\n\t\t\tconnections[i] = false;\n\t}", "public Grid() {\n }", "public CellList() {\n head = null;\n size = 0;\n }", "Cell getCellAt(Coord coord);", "public void testSetCell()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n board.setCell(1, 2, MineSweeperCell.FLAGGED_MINE);\r\n assertBoard(board, \"OOOO\",\r\n \"OOOO\",\r\n \"OMOO\",\r\n \"OOOO\");\r\n }", "public RegularGrid() {\r\n }" ]
[ "0.8148088", "0.7474055", "0.7383424", "0.7202012", "0.6947779", "0.6882466", "0.68609166", "0.6847595", "0.6838269", "0.6778066", "0.6751761", "0.67233557", "0.6690646", "0.65488017", "0.6515062", "0.649925", "0.64839673", "0.64470536", "0.64309806", "0.64097846", "0.6370733", "0.63397807", "0.63217294", "0.6310933", "0.6295936", "0.62740356", "0.62564856", "0.6238956", "0.6219169", "0.62024826", "0.6196437", "0.6187028", "0.6185218", "0.61730087", "0.61634946", "0.61602384", "0.613894", "0.61142105", "0.6104084", "0.60678893", "0.6061418", "0.60598636", "0.6041647", "0.60352314", "0.6009056", "0.59972185", "0.5990291", "0.5961565", "0.5942962", "0.59380233", "0.58993727", "0.58971244", "0.5886615", "0.5878352", "0.58637935", "0.5859653", "0.58573014", "0.5852978", "0.5849836", "0.58435255", "0.5840797", "0.5837613", "0.58278984", "0.5807778", "0.5802935", "0.5782461", "0.57670105", "0.57655555", "0.5755365", "0.5738709", "0.57278854", "0.5718105", "0.57099694", "0.5703962", "0.5695576", "0.5693512", "0.56839097", "0.5682573", "0.5681386", "0.5676411", "0.5662635", "0.5646639", "0.564306", "0.5630378", "0.5629572", "0.5626698", "0.5624569", "0.562012", "0.5618543", "0.56108", "0.55913496", "0.5585016", "0.55726755", "0.5567739", "0.5548933", "0.5541082", "0.5538228", "0.55327463", "0.55291724", "0.5515981" ]
0.6652628
13
Sets this Cell's alive status to the opposite of its current
public void setAlive() { if (this.alive == true) { this.alive = false; } else { this.alive = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toggleAlive() {\n\t\tthis.isAlive = !isAlive;\n\t}", "void dead() { this.alive = false; }", "public void turnOff() {\n update(0,0,0);\n this.status = false;\n }", "public void changeStatus(){\n Status = !Status;\n\n }", "public synchronized void switchCell()\n {\n cellValue = (cellValue == ALIVE) ? DEAD : ALIVE;\n }", "public void deactivate(){\n state = State.invisible;\n active = false;\n }", "public void setAlive() {\n\t\tif(alive)\n\t\t\talive = false;\n\t\telse\n\t\t\talive = true;\n\t}", "private void clearAlive() {\n \n alive_ = false;\n }", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "public void deactivate() {\n this.active = false;\n }", "protected void setInactive() {\r\n\t\tactive = false;\r\n\t}", "public void deactivate() {\n\t\tactive_status = false;\n\t}", "private void bringToLife(){\n this.dead = false;\n }", "public void setDead(){\n\t\t//queue this blood for cleanup\n\t\tvisible = false;\n\t\tDEAD = true;\n\t\tcleanUp();\n\t}", "public void setDead(boolean value);", "public Cell() {\n\t\tthis.alive = false; // Initially dead\n\t\tthis.age = 0; // Initially age of 0\n\t}", "@Override\n public void kill() {\n alive = false;\n Board.getInstance().setPoints(points);\n }", "protected void setDead()\n {\n alive = false;\n if(location != null) {\n field.clear(location);\n location = null;\n field = null;\n }\n }", "protected void setDead()\n {\n alive = false;\n if(location != null) {\n field.clear(location);\n location = null;\n field = null;\n }\n }", "private void setAlive(boolean value) {\n \n alive_ = value;\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }", "public void setAlive(boolean alive){\r\n\t\tthis.alive = alive;\r\n\t}", "public void setInactive() {\n\t\tactive = false;\n\t}", "public void toggle()\n\t{\n\t\tbitHolder.setValue(Math.abs(bitHolder.getValue() - 1 ));\n\t\t\n\t}", "@Override\n public void stepUp(Cell currentCell) {\n if(currentCell.getOldNoOfAliveNeighbours()==3)\n {\n currentCell.setState(new Alive());\n }\n }", "public void setAlive(boolean alive) {\r\n\t\tthis.alive = alive;\r\n\t}", "public void setAlive(boolean alive)\n {\n this.alive = alive;\n }", "public void setAlive(boolean state) {\n alive = state;\n setColor();\n }", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "public void deactivate()\n\t{\n\t\t_active = false;\n\t\t_leader.setObjectHandler(null);\n\t}", "public void turnOff() {\n\t\tisOn = false;\n\t}", "private OffState() {\n instance = this;\n }", "@Override\r\n public boolean shouldRevive(int i, int j) {\r\n return (!getCell(i, j).isAlive())\r\n && (numberOfNeighborhoodAliveCells(i, j) == 3 || numberOfNeighborhoodAliveCells(i, j) == 6);\r\n }", "public void setAlive(boolean alive) {\n\t\tthis.alive = alive;\n\t}", "public void setAlive(boolean alive) {\n\t\tthis.alive = alive;\n\t}", "public void turn_off () {\n this.on = false;\n }", "public void unsetNeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NECELL$24, 0);\n }\n }", "public void changeState() {\n if (!isDead) {\n Bitmap temp = getBitmap();\n setBitmap(stateBitmap);\n stateBitmap = temp;\n }\n }", "public void setAlive(boolean aliveStatus) {\n\t\t\n\t\tthis.aliveStatus = aliveStatus;\n\t}", "public void removeStatus() {\n this.setStatus(StatusNamesies.NO_STATUS.getStatus());\n }", "public void revert()\n\t{\n\t\tswingingWay1 = !swingingWay1;\n\t}", "public void setUnstable() {\n this.unstable = true;\n this.unstableTimeline.play();\n if (this.online == true) {\n this.statusLed.setStatus(\"alert\");\n this.statusLed.setFastBlink(true);\n }\n }", "public Cell()\n\t{\n\t\tthis.alive = 0;\n\t\tthis.neighbors = 0;\n\t}", "public void unsetSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWCELL$20, 0);\n }\n }", "private synchronized void neigborStausChanged(Node caller){\n if(this.getStatus().equals(Status.BLUE)) {\n this.setState(Status.YELLOW);\n burner = new StatusChecker(this);\n liveNeighbors.remove(caller);\n }\n }", "public void gameOver() {\n this.lives --;\n this.alive = false;\n }", "public void setAlive(boolean x){\n \talive = x;\r\n }", "public Cell(){\n this.ship = null;\n this.hasBeenShot = false;\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "void oracle(){\n if (this.neighbors < 1){\n if (!isAlive()){\n observer.deleteCell(id);\n }\n }\n }", "public void updateNewState() {\n Integer aliveCount = 0;\n for (final Cell neighbor : this.neighbors) {\n if (neighbor.isAlive()) {\n aliveCount++;\n }\n }\n\n if (aliveCount < 2) {\n this.setNewState(false);\n } else if (!this.isAlive() && aliveCount == 3) {\n this.setNewState(true);\n } else if (aliveCount > 3) {\n this.setNewState(false);\n }\n }", "public void punishment(){\n\t\tthis.cell = 0;\n\t}", "public void unpause() {\n\t\t// Move the real time clock up to now\n\t\tsynchronized (mSurfaceHolder) {\n\t\t\tmLastTime = System.currentTimeMillis() + 100;\n\t\t}\n\t\tsetState(GameState.RUNNING_LVL);\n\t}", "public void deactivate();", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "public void clearState() {\n // if the user press the wrong cells, aka path, etc.\n // set state back to grass\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n } else if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n\n }\n }", "public void lose(){\n // If this object is not the current arena state obsolete it.\n if(this != battleState) return;\n\n isOver = true;\n battleStateLose();\n }", "public void notAlive() {\n\n for (var i = ownedAnimals.size() - 1; i >= 0; i--) {\n if (ownedAnimals.get(i).healthPoints <= 0) {\n System.out.println(\"The \"\n + ownedAnimals.get(i).type\n + \" \" + ownedAnimals.get(i).animalName\n + \" died\");\n ownedAnimals.remove(i);\n\n\n }\n\n\n }\n }", "public boolean isAlive ()\n {\n return cellStatus;\n }", "void setAlive(boolean isAlive);", "private void bounceOffVerticalWall() {\n vx = -vx;\n }", "public void unsetNwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NWCELL$26, 0);\n }\n }", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "@Override\n\tpublic void adjust() {\n\t\tstate = !state;\n\t}", "void unsetStatus();", "private void FalseFlag() {\r\n\t\tfor(int i = 0; i < rows_size; i ++ ) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++)\r\n\t\t\t\tgame[i][j].setFlag(false);\r\n\t\t}\r\n\t}", "public void decisionOnCellState(int counter, int row, int column)\r\n {\r\n if (cellGrid[column][row].isAlive())\r\n {\r\n if (counter < 2)\r\n {\r\n cellGrid[column][row].setToBeAlive(false);\r\n }\r\n else if (counter == 2 || counter == 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(true);\r\n }\r\n else if (counter > 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(false);\r\n } // end of if (counter < 2)\r\n }\r\n else\r\n {\r\n if (counter == 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(true);\r\n } // end of if (counter == 3)\r\n } // end of if (cellGrid[column][row].isAlive())\r\n }", "public void setAlive(final Boolean state) {\n this.alive = state;\n this.newState = state;\n }", "private final void kill() {\n\t\tgrown=false;\t\t\n\t}", "private void setCell(boolean[][] board, int i, int j) {\n\t\tint numOfNeighbors = getNeighbors(board, i, j);\n\t\tif(board[i][j]) { // if alive\n\t\t\tif(numOfNeighbors < 2 || numOfNeighbors >= 4) {\n\t\t\t\ttempBoard[i][j] = false; // kill cell\n\t\t\t}\n\t\t}else{ // if dead\n\t\t\tif(numOfNeighbors == 3)\n\t\t\t\ttempBoard[i][j] = true; // become alive\n\t\t}\n\t}", "void setStatus(boolean destroyed);", "public void setNeutralState() {\n redLED.set(true);\n greenLED.set(true);\n blueLED.set(true);\n }", "public Cell(){\n \tthis.shot=false;\n }", "public void setAlive(boolean state) {\n\t\talive = state;\n\t}", "public synchronized void setCellValue(byte in_cellValue)\n {\n cellValue = (in_cellValue > DEAD) ? ALIVE : DEAD;\n }", "@Override\r\n public void turnOff() {\r\n isOn = false;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_OFF);\r\n if (this.engaged()) {\r\n disengageLoads();\r\n }\r\n }", "public void setDead(boolean dead) {\n this.dead = dead;\n Graphics g = image.getGraphics();\n g.setColor(Color.BLACK);\n g.fillRect(0,0,pieceSize,pieceSize);\n g = getCoveredImage().getGraphics();\n g.setColor(Color.BLACK);\n g.fillRect(0,0,pieceSize,pieceSize);\n }", "public Builder clearStatus() {\n \n status_ = false;\n onChanged();\n return this;\n }", "public Builder clearStatus() {\n \n status_ = false;\n onChanged();\n return this;\n }", "public Builder clearStatus() {\n \n status_ = false;\n onChanged();\n return this;\n }", "void alive() { this.alive = true; }", "public void resetTossedStatus(){\n\t\tdiceTossed = false;\n\t}", "@Override\r\n\tpublic void disable() {\n\t\tcurrentState.disable();\r\n\t}", "public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}", "private void kill(Cell cell)\n\t{\n\t\tcell.setNextState(EMPTY);\n\t\tresetBreedTime(cell);\n\t\tresetStarveTime(cell);\n\t}", "public boolean notAlive() {\r\n\r\n if (LOG.isLoggable(Level.FINEST)) {\r\n LOG.finest(\"notAlive ( ) called \");\r\n }\r\n\r\n return !alive();\r\n }", "public void down() {\n\t\tstate.down();\n\t}", "public void playerMissedBall(){ active = false;}", "private void toogleLifeStatus (int line, int column) {\n assert isInUniverse(line, column);\n futureUniverse[line][column] = !universe[line][column];\n }", "private void breakSpecialState() {\n this.inSpecialState = false;\n this.resetXMovement();\n }", "public void lostLife(){\r\n\t\tthis.lives--;\r\n\t}", "public Cell(final Boolean state) {\n this.alive = state;\n this.newState = state;\n this.neighbors = new LinkedList<Cell>();\n }", "public void kill() { _isAlive = false; }", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "private void bounceOffHorizontalWall() {\n vy = -vy;\n }", "public State getDead() {\n\t\treturn dead;\n\t}", "public void setDead(boolean dead) {\n this.isDead = dead;\n }", "@Override\n public void Die() {\n this.setAlive(false);\n }", "public void setDead(boolean dead) {\n isDead = dead;\n }" ]
[ "0.6656837", "0.64100325", "0.6381748", "0.6320198", "0.6266454", "0.6248295", "0.62020814", "0.6109143", "0.6002625", "0.5952967", "0.5952698", "0.59408194", "0.59360534", "0.5857576", "0.58248615", "0.57728136", "0.5770449", "0.5757333", "0.5757333", "0.57324374", "0.57094693", "0.5703594", "0.57026505", "0.56909436", "0.56863964", "0.5663898", "0.56617224", "0.5649486", "0.5627342", "0.56261486", "0.5621311", "0.56192034", "0.56141156", "0.56119835", "0.5595075", "0.5595075", "0.55919266", "0.5588707", "0.5583169", "0.5566632", "0.5535999", "0.55302167", "0.55218047", "0.5517662", "0.5514731", "0.55112493", "0.5499484", "0.54864025", "0.54723805", "0.5470003", "0.5460455", "0.5460093", "0.5442406", "0.54400975", "0.54371524", "0.54346687", "0.54307353", "0.5417864", "0.5408781", "0.5407656", "0.5405793", "0.53989136", "0.5392285", "0.5381661", "0.53656054", "0.53542894", "0.5349221", "0.5347177", "0.5343695", "0.53434914", "0.5342947", "0.53410995", "0.53364575", "0.5331769", "0.53293425", "0.5328697", "0.5307959", "0.52937084", "0.5285047", "0.5285047", "0.5285047", "0.52813953", "0.5273559", "0.52721", "0.52657926", "0.52627516", "0.5261699", "0.52610385", "0.5256738", "0.5252681", "0.52509415", "0.5247338", "0.52433", "0.5242865", "0.5238035", "0.5234905", "0.52344173", "0.5229056", "0.5212261", "0.5206236" ]
0.6214884
6
Sets this Cell's alive status to the given boolean value.
public void setAlive(boolean alive) { this.alive = alive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setAlive(boolean value) {\n \n alive_ = value;\n }", "public void setAlive(boolean aliveStatus) {\n\t\t\n\t\tthis.aliveStatus = aliveStatus;\n\t}", "public void setAlive(boolean alive){\r\n\t\tthis.alive = alive;\r\n\t}", "public void setAlive(boolean alive)\n {\n this.alive = alive;\n }", "public void setAlive(boolean alive) {\r\n\t\tthis.alive = alive;\r\n\t}", "public void setAlive() {\n\t\tif (this.alive == true) {\n\t\t\tthis.alive = false;\n\t\t} else {\n\t\t\tthis.alive = true;\n\t\t}\n\t}", "void setAlive(boolean isAlive);", "public void setAlive() {\n\t\tif(alive)\n\t\t\talive = false;\n\t\telse\n\t\t\talive = true;\n\t}", "public void setAlive(boolean state) {\n alive = state;\n setColor();\n }", "public void setAlive(boolean x){\n \talive = x;\r\n }", "public Builder setAlive(boolean value) {\n copyOnWrite();\n instance.setAlive(value);\n return this;\n }", "public void setAlive(boolean state) {\n\t\talive = state;\n\t}", "public void setAlive(final Boolean state) {\n this.alive = state;\n this.newState = state;\n }", "protected void setIsAlive(boolean newValue) {\n\t\tisAlive = newValue;\n\t}", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "public boolean setPropertyAlive(boolean aValue)\n {\n return setPropertyBool(iPropertyAlive, aValue);\n }", "public void toggleAlive() {\n\t\tthis.isAlive = !isAlive;\n\t}", "public void setDead(boolean value);", "public boolean isAlive() {\n\t\treturn aliveStatus;\n\t}", "void alive() { this.alive = true; }", "public boolean isAlive ()\n {\n return cellStatus;\n }", "public void setLivingStatus(boolean livingStatus){\n this.livingStatus = livingStatus;\n }", "public void status(boolean b) {\n status = b;\n }", "public boolean isAlive(){\n \t\treturn alive;\n \t}", "public boolean isAlive() { return alive; }", "public void setStatus(boolean value) {\n this.status = value;\n }", "public void setStatus(boolean value) {\n this.status = value;\n }", "public boolean isAlive(){\n \treturn alive;\r\n }", "public boolean setPropertyAlive(boolean aValue);", "public void enablePropertyAlive()\n {\n iPropertyAlive = new PropertyBool(new ParameterBool(\"Alive\"));\n addProperty(iPropertyAlive);\n }", "public final boolean isAlive() {\n return alive;\n }", "public boolean isAlive() {\r\n\t\treturn alive;\r\n\t}", "boolean isAlive() { return alive; }", "public boolean isAlive() {\n return alive;\n }", "public boolean isAlive() {\n return alive;\n }", "public void setStatus(Boolean s){ status = s;}", "public void setStatus(boolean newstatus){activestatus = newstatus;}", "public void setStatus(boolean newStatus);", "public boolean getAlive() {\n return alive_;\n }", "@Accessor(qualifier = \"active\", type = Accessor.Type.SETTER)\n\tpublic void setActive(final Boolean value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(ACTIVE, value);\n\t}", "public boolean isAlive() {\n\t\treturn alive;\n\t}", "public boolean isAlive() {\n\t\treturn alive;\n\t}", "public boolean isAlive() {\n\t\treturn alive;\n\t}", "public boolean isAlive()\n {\n return alive;\n }", "public boolean isAlive()\n\t{\n\t\treturn alive;\n\t}", "public boolean isAlive()\n\t{\n\t\treturn alive;\n\t}", "public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }", "public Builder setStatus(boolean value) {\n \n status_ = value;\n onChanged();\n return this;\n }", "public Builder setStatus(boolean value) {\n \n status_ = value;\n onChanged();\n return this;\n }", "public Builder setStatus(boolean value) {\n \n status_ = value;\n onChanged();\n return this;\n }", "protected boolean isAlive()\n {\n return alive;\n }", "protected boolean isAlive()\n {\n return alive;\n }", "public boolean getIsAlive() {\n return isAlive;\n }", "protected void publishIsAlive(java.lang.Boolean newIsAliveValue) {\n _isAlive = newIsAliveValue;\n getProcessor().publishValue(getOutProperties(), \"isAlive\", newIsAliveValue); \n }", "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 active(boolean value) {\n\t\tactive = value;\n\t}", "public void setCellStatus(boolean cellStatus)\n {\n this.cellStatus = cellStatus;\n }", "public boolean isAlive(){\n\t\treturn isAlive;\n\t}", "public void setHvacStateOn(boolean value) {\r\n this.hvacStateOn = value;\r\n }", "public boolean isAlive() {\n\t\treturn state;\n\t}", "public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }", "public boolean isAlive() {\n\t\treturn this.alive;\n\t}", "public void setPing(boolean ping)\n {\n _isPing = ping;\n }", "public void setStatus( boolean avtive ){\r\n\t\tthis.activ = avtive;\r\n\t}", "public void setStatus(boolean status) {\n\tthis.status = status;\n }", "public void setStatus(boolean stat) {\n\t\tstatus = stat;\n\t}", "protected boolean getIsAlive() {\n\t\treturn isAlive;\n\t}", "public void setNetworkReachable(boolean value);", "public void setActiveStatus(Boolean active){ this.status = active; }", "public Cell(final Boolean state) {\n this.alive = state;\n this.newState = state;\n this.neighbors = new LinkedList<Cell>();\n }", "public boolean isAlive() {\n\t\treturn isAlive;\n\t}", "public void setStatus(final boolean statusConta) {\r\n this.status = statusConta;\r\n }", "public boolean isAlive() {\n return health > 0;\n }", "void setBoolean(boolean value);", "public void setDead(boolean dead) {\n isDead = dead;\n }", "public ByteBuf setBoolean(int index, boolean value)\r\n/* 265: */ {\r\n/* 266:280 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 267:281 */ return super.setBoolean(index, value);\r\n/* 268: */ }", "public void updateNewState() {\n Integer aliveCount = 0;\n for (final Cell neighbor : this.neighbors) {\n if (neighbor.isAlive()) {\n aliveCount++;\n }\n }\n\n if (aliveCount < 2) {\n this.setNewState(false);\n } else if (!this.isAlive() && aliveCount == 3) {\n this.setNewState(true);\n } else if (aliveCount > 3) {\n this.setNewState(false);\n }\n }", "private void markOnline(boolean b) {\n usersRef.child(userMe.getId()).child(\"online\").setValue(b);\n }", "public void setState( boolean bool ) { state = bool; }", "void setOnStatus(Boolean on) {\n this.on = on;\n }", "public void setIsDead(boolean isDead) {\n this.isDead = isDead;\n }", "@Override\n public boolean isAlive() {\n return health > 0f;\n }", "boolean getAlive();", "void dead() { this.alive = false; }", "public void changeStatus(){\n Status = !Status;\n\n }", "public void setLaneChange(java.lang.Boolean value);", "public void setDead(boolean dead) {\n this.isDead = dead;\n }", "public boolean isAlive(){\r\n\t\tif(dead==true){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void setActive(boolean value) {\n this.active = value;\n }", "public void setDead(boolean dead) {\r\n this.dead = dead;\r\n }", "void set(boolean value);", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "public static void setEnemyOne(boolean state)\r\n\t{\r\n\t\tenemyOne = state;\r\n\t}", "public void setParking(java.lang.Boolean value);", "public void setWon(){\n won = true;\n }", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "void set(boolean on);" ]
[ "0.8177237", "0.79098296", "0.7834533", "0.7824402", "0.77644384", "0.76830864", "0.7554666", "0.7500137", "0.74950206", "0.7416112", "0.7408434", "0.73429585", "0.72738147", "0.726435", "0.7107263", "0.6933466", "0.6874692", "0.66931784", "0.6636336", "0.6521487", "0.6379306", "0.63754576", "0.6355438", "0.6351094", "0.63451385", "0.6274787", "0.6274787", "0.6268804", "0.62510747", "0.61962557", "0.6189437", "0.6188676", "0.61778015", "0.616841", "0.616841", "0.6157701", "0.61529666", "0.6144619", "0.61389554", "0.6123041", "0.611083", "0.611083", "0.611083", "0.60912704", "0.6015197", "0.6015197", "0.6004826", "0.59677476", "0.59677476", "0.59677476", "0.596386", "0.596386", "0.5958665", "0.59508216", "0.5909892", "0.5909892", "0.5909892", "0.5882495", "0.58621347", "0.58585775", "0.58528525", "0.5851871", "0.5841712", "0.5834976", "0.5827146", "0.5820733", "0.5813796", "0.5799158", "0.57756627", "0.57743275", "0.577075", "0.5762742", "0.57472336", "0.5738894", "0.57014513", "0.5695995", "0.5683806", "0.56787103", "0.56781065", "0.56765753", "0.5671812", "0.56668156", "0.56664026", "0.5666132", "0.5665749", "0.5641212", "0.5636566", "0.5626988", "0.5623247", "0.56146944", "0.56113195", "0.56051564", "0.56048316", "0.55867875", "0.55659306", "0.55547506", "0.5544511", "0.554307", "0.5540558" ]
0.76860124
6
Returns this Cell's age
public int getAge() { return this.age; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAge() {\n return Integer.parseInt(getCellContent(AGE));\n }", "public double getAge()\n\t{\n\t\treturn theAge;\n\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "@Override\n\tpublic int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n\t\treturn _age;\n\t}", "@Override\r\n\tpublic int getAge() \r\n\t{\r\n\t\treturn this._age;\r\n\t}", "public int getAge()\n\t{\n\t\treturn this.age;\n\t}", "public int getAge()\r\n\t{\r\n\t\tint age = calculateAge();\r\n\t\treturn age;\r\n\t}", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public Integer getAge() {\r\n return age;\r\n }", "public int age() {\n int age = 0;\n /*MyDate currentDate = new MyDate(\n (Calendar.getInstance().get(Calendar.DATE)),\n (Calendar.getInstance().get(Calendar.MONTH) + 1),\n (Calendar.getInstance().get(Calendar.YEAR))\n );*/\n \n age = this.birthday.differenceInYears(currentDate);\n \n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }", "public int getAge() {\n return this.age;\n }", "public int getAge() {\n return mAge;\n }", "@java.lang.Override\n public int getAge() {\n return age_;\n }", "public int getAge() {\n\t \t return age; \n\t}", "public int getAge() {\r\n return age;\r\n }", "private int calculateAge() {\n\t\treturn LocalDate.now().getYear() - this.birthYear;\n\t}", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n return age;\n }", "public int getAge() {\n\t\tif (ageField.getText().isEmpty()) {\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn Integer.parseInt(ageField.getText());\n\t\t}\n\t}", "public Age getAge() {\n return age;\n }", "public String getAge() {\n return age;\n }", "public int getAge()\n {\n return age;\n }", "public java.lang.String getAge() {\r\n return localAge;\r\n }", "public Integer getAccountAge() {\n return accountAge;\n }", "@java.lang.Override\n public int getAge() {\n return age_;\n }", "public int getAge() {\n\t\tInteger prop = (Integer) getObject(\"age\");\n\t\tif (prop != null) {\n\t\t\treturn prop;\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"The Task doesn't have its age set\");\n\t\t}\n\t}", "public int getAge()\r\n {\r\n return age;\r\n }", "int getToAge();", "public int getAge() {\n Period period = Period.between(this.birthday, LocalDate.now());\n int age = period.getYears();\n int months = period.getMonths();\n int days = period.getDays();\n\n // Compensate for part-thereof of a year\n if (months > 0 || days > 0) {\n age += 1;\n } else if (months < 0 || days < 0) {\n age -= 1;\n }\n return age < 0\n ? 0 // Set age to zero if value is negative\n : age;\n }", "public Age ageAge() {\n return getObject(Age.class, FhirPropertyNames.PROPERTY_AGE_AGE);\n }", "public Byte getUserAge() {\r\n return userAge;\r\n }", "public int getAge(){\n return age;\n }", "int getFromAge();", "@SuppressWarnings(\"static-access\")\r\n\tprivate int calculateAge()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tnow = new GregorianCalendar(now.YEAR, now.MONTH, now.DATE);//simplifys the date so there is no problem with times\r\n\t\tGregorianCalendar birthDay = new GregorianCalendar(now.YEAR, bDate.MONTH, bDate.DATE);\r\n\t\tint age = 0;\r\n\t\tif(now.before(birthDay) || now.equals(birthDay))\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t\tage--;\r\n\t\t}\r\n\t\treturn age;\r\n\t}", "public int getAge() {return age;}", "int getAge();", "int getAge();", "int getAge();", "public int getDogAge() {\r\n return 5 * getAge();\r\n }", "public int getAge();", "public int getAge();", "public HouseholdFactory.AgeCohort getAgeOfContactor() {\r\n\t\treturn info.age;\r\n\t}", "int getStudentAge();", "public CustomerAgeElements getCustomerAgeAccess() {\n\t\treturn pCustomerAge;\n\t}", "public int getLife(){\r\n\t\treturn this.life;\r\n\t}", "public int getLife() {\n\t\treturn this.life;\n\t}", "int getAgeInYears(Person p);", "public Range ageRange() {\n return getObject(Range.class, FhirPropertyNames.PROPERTY_AGE_RANGE);\n }", "public int getMinAge()\r\n {\r\n return minAge;\r\n }", "public int getBirths()\n\t{\n \treturn currentBirths;\n\t}", "com.google.ads.googleads.v14.common.AgeRangeInfo getAgeRange();", "public long age() {\n if (startTime == 0) {\n return 0;\n } else {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }\n }", "public String ageString() {\n return getString(FhirPropertyNames.PROPERTY_AGE_STRING);\n }", "protected int get_breeding_age()\n {\n return breeding_age;\n }", "public int getAge(int i) {\n\t\treturn 0;\r\n\t}", "public Boolean estimatedAge() {\n return data.getBoolean(FhirPropertyNames.PROPERTY_ESTIMATED_AGE);\n }", "public int getLife()\n\t{\n\t\treturn life;\n\t}", "@Override\n\tpublic int getGrowingAge() {\n\t\t// adapter for vanilla code to enable breeding interaction\n\t\treturn isAdult() ? 0 : -1;\n\t}", "public int getLife() {\r\n\t\treturn life;\r\n\t}", "public int getLife() {\n return life;\n }", "@Override\r\n\t@MockNumber(min=0, max=100)\r\n\tpublic Integer getAttr_age() {\n\t\treturn super.getAttr_age();\r\n\t}", "private String getAge(Calendar born){\n Calendar today = Calendar.getInstance();\n\n\n int age = today.get(Calendar.YEAR) - born.get(Calendar.YEAR);\n\n if (today.get(Calendar.DAY_OF_YEAR) < born.get(Calendar.DAY_OF_YEAR)){\n age--;\n }\n\n Integer ageInt = new Integer(age);\n String ageS = ageInt.toString();\n\n return ageS;\n }", "public Age deceasedAge() {\n return getObject(Age.class, FhirPropertyNames.PROPERTY_DECEASED_AGE);\n }", "@Override\n\tpublic int covidVaccineAge() {\n\t\tSystem.out.println(\"FH---covid vaccine age is 18 years\");\n\t\treturn 30;\n\t}", "public int age(){\r\n\t\t//1000 ms = 1s, 60s = 1 min, 60 min = 1h, 24h = 1 day\r\n\t\t//1 Day = 1000 * 60 * 60 * 24\r\n\t\tlong divide = 1000 * 60 * 60 * 24;\r\n\t\tDate d = new Date();\r\n\t\tlong timeNow = d.getTime();\r\n\t\tlong pubDate = dateOfPublication.getTime();\r\n\t\t\r\n\t\tlong between = timeNow - pubDate;\r\n\t\t\r\n\t\tlong daysSincePub = between / divide;\r\n\t\treturn (int) daysSincePub;\r\n\t}", "public int getLife() {\n\t\treturn life;\n\t}", "private String getWorldAge(){\r\n\t\tlong worldage = minecraft.world.getTotalWorldTime();\r\n\t\tint sek = (int) (worldage/20);\r\n\t\t\r\n\t\tint basesec = 1;\r\n\t\tint basemin = (60*basesec);\r\n\t\tint basehour = (60*basemin);\r\n\t\tint baseday = (24*basehour);\r\n\t\tint baseyear = (365*baseday);\r\n\t\t\r\n\t\tint years = sek/(baseday)/365;\r\n\t\tint days = (sek%baseyear)/(baseday);\r\n\t\tint hours = (sek%baseday)/(basehour);\r\n\t\tint mins = (sek%basehour)/(basemin);\r\n\t\tint seconds = (sek%basemin*basesec);\r\n\t\t\t\t\r\n\t\tArrayList<String> back = new ArrayList<String>();\r\n\t\t\r\n\t\tif(years > 0){\r\n\t\t\tback.add( years + \" Y\");\r\n\t\t}\r\n\t\tif(days > 0){\r\n\t\t\tback.add(days + \" D\");\r\n\t\t}\r\n\t\tif(hours > 0){\r\n\t\t\tback.add(hours + \" H\");\r\n\t\t}\r\n\t\tif(mins > 0){\r\n\t\t\tback.add(mins + \" M\");\r\n\t\t}\r\n\t\tif(seconds > 0){\r\n\t\t\tback.add(seconds + \" S\");\r\n\t\t}\t\t\t\r\n\t\treturn back.toString().replace(\"[\", \"\").replace(\"]\", \"\");\r\n\t}", "public Age onsetAge() {\n return getObject(Age.class, FhirPropertyNames.PROPERTY_ONSET_AGE);\n }", "double getAgeDays();", "public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}", "public static void calculateTheAge (int birthYear){\n int age = 2021 - birthYear;\n System.out.println(\"The person is \" + age + \" years old\");\n }", "public int getYears() {\n return this.years;\n }", "public int getAgeInWeeks() {\n return ageInWeeks;\n }", "public static int getAge(int yearBorn)\n {\n return 2016-yearBorn;\n }", "public Integer getMaxAge() {\r\n\t\t\treturn maxAge;\r\n\t\t}", "public GuiPositions getPosWorldAge() {\r\n\t\treturn posWorldAge;\r\n\t}" ]
[ "0.8506726", "0.7682022", "0.7626646", "0.7626646", "0.7626646", "0.7617086", "0.7617086", "0.7617086", "0.7617086", "0.761525", "0.7571329", "0.7571329", "0.7571329", "0.75670767", "0.75620764", "0.7561572", "0.7548045", "0.7540079", "0.7540079", "0.7540079", "0.7459681", "0.7454736", "0.74303913", "0.74303913", "0.74303913", "0.74303913", "0.74303913", "0.7407924", "0.7398525", "0.73884255", "0.7380239", "0.73665243", "0.7332619", "0.7323424", "0.7323424", "0.7323424", "0.7323424", "0.7323424", "0.7323424", "0.7323424", "0.7323424", "0.72592396", "0.722848", "0.72206634", "0.7219804", "0.717344", "0.7167288", "0.71429825", "0.7135902", "0.7120438", "0.708461", "0.70083207", "0.7004912", "0.696155", "0.69312394", "0.6924387", "0.68917596", "0.68658745", "0.68177533", "0.68177533", "0.68177533", "0.67482996", "0.67110443", "0.67110443", "0.6615597", "0.65605295", "0.65483195", "0.65394187", "0.65258753", "0.65132976", "0.64938414", "0.6484577", "0.6445959", "0.6435092", "0.64261633", "0.64096725", "0.64095324", "0.6359606", "0.63211155", "0.63002026", "0.6295014", "0.6293706", "0.62851506", "0.6277246", "0.6275872", "0.6272072", "0.62626755", "0.6252687", "0.6246142", "0.62359744", "0.62358683", "0.619222", "0.6173791", "0.616576", "0.6165286", "0.61586773", "0.6150714", "0.611923", "0.61106503" ]
0.7607135
10
Sets this Cell's age to the given int value. Used when copying Cells into new array during generation.
public void setAge(int age) { this.age = age; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setAge(int age) {\r\n\t\tthis.age = age;\r\n\t}", "@Override\r\n\tpublic final void setAge(final int theAge) {\r\n\t\tthis.age = theAge;\r\n\t}", "public void setAge(final int age) {\n mAge = age;\n }", "public void setAge(int age) {\n\t\tif (age < 0) {\n\t\t\tthis.age = 0;\n\t\t} else {\n\t\t\tthis.age = age;\n\t\t}\n\t}", "public Builder setAge(int value) {\n bitField0_ |= 0x00000004;\n age_ = value;\n onChanged();\n return this;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(double age) {\r\n\t\tif (age <= 2) setAge(age * 10.5);\r\n\t\telse setAge(21 + (4 * (age - 2)));\r\n\t}", "public void set_age(int obj_age) {\n\t\tage = obj_age;\n\t}", "public void setAge(int age) { \n\t\t this.age = age; \n\t}", "public void setAge(int age) {\r\n\t\tif (age >= 0) \r\n\t\t\tthis.age = age;\r\n\t\t//else //ideally we should let the caller know we didn't set the Age\r\n\t}", "public void setAge(Integer age) {\r\n this.age = age;\r\n }", "@Override\r\n\tpublic void setAge(int newAge) \r\n\t{\r\n\t\tthis._age = newAge;\r\n\t}", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public void setAge(int age)\r\n {\r\n this.age = age;\r\n }", "public HumanBuilder setAge( int age) {\n\t\t\t/*\n\t\t\t * id is a instance variable of hte HumanBuilder class, and we are inside a \n\t\t\t * instance method so we CAN access the variable id\n\t\t\t */\n\t\t\tid=3;\n\t\t\t//we can also access statics of the HumanBuilder class in an instance method\n\t\t\tstatInt++;\n\t\t\t//this int age is a LOCAL variable\n\t\t\t/*\n\t\t\t * if i pass in a minus number, this will give age a new value of 1\n\t\t\t */\n\t\t\tif(age<=0)\n\t\t\t\tage=1;\n\t\t\t/*\n\t\t\t * cannot access age directly as this is a static nested class, so we first create\n\t\t\t * a Human object, then we access the age of that Human\n\t\t\t */\n\t\t\tmyHuman.age=age;\n\t\t\treturn this;\n\t\t}", "protected void setAge(Age age) {\n this.age = age;\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public void setAge(int age){\n this.age = age;\n }", "@Override\n\tpublic void setAge () {\n\t\t// defining the random range for age between 1 up to 50\n\t\tint age = 1 + (int)(Math.random()*(3));\n\t\tthis.age = age;\n\t}", "@Override\n\tpublic void setAge(int age) throws RemoteException {\n\t\tthis.age = age;\n\t}", "public void setAge(int age) { this.age = age; }", "public void setAge(int age);", "void setAge(int age);", "public AnimalBuilder setAge(int age) {\n\t\tthis.age=age;\n\t\treturn this;\n\t}", "public UserBuilder age(int age) {\n\t\t\tthis.age = age;\n\t\t\treturn this; // return this to make expression chainable.\n\t\t\t\n\t\t}", "public static void setAge(String age){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyAge, age);\n }", "public void setAge(String age)\r\n\t{\n\t\tthis.age = validateInteger( age, \"age\" );\r\n\t}", "@Override\n\tpublic void Age(int age) {\n\t\t\n\t}", "public void setAge(double theAge)\n\t{\n\t\tthis.theAge=theAge;\n\n\t\tif(theAge<0.0)\n\t\t{\n\t\t\tthis.theAge=0.0;\n\t\t}\n\t}", "public void setAge(final int a) {\n this.age = a;\n }", "public static void updateAge() {\n\t\tfor (int i =0; i < data.size(); i++){\n\t\t\tdata.get(i).setAge(data.get(i).getAge()+1);\n\t\t}\n\t}", "UserInfo setAge(Integer age);", "public void setAverageLifeExp(int age) {\n averageLifeExp = age;\n }", "public void setAge(String age) {\n this.age = age;\n }", "public Object setAge(int i) {\n\t\treturn null;\r\n\t}", "public int changeDogAge(int dogAge) {\n this.age = dogAge;\n return age;\n }", "protected void incrementAge()\n {\n age++;\n if(age > max_age) {\n setDead();\n }\n }", "public void setInfo(int inAge){\n\t\tage = inAge;\n\t}", "@Override\n\tpublic void setGrowingAge(int age) {\n\t\t// managed by DragonLifeStageHelper, so this is a no-op\n\t}", "public void setUserAge(Byte userAge) {\r\n this.userAge = userAge;\r\n }", "public void setAccountAge(Integer accountAge) {\n this.accountAge = accountAge;\n }", "public void setAge(String age) {\n\n Instant instant = Instant.parse(age) ;\n\n Date dateAge = Date.from(instant) ;\n\n //Date dateAge = format.parse(age);\n Log.e(\"age convert: \", String.valueOf(dateAge));\n this.age = dateAge;\n }", "public void incrementAge(int dogAge) {\n this.age = this.age + 1;\n }", "public CustomerBuilder setAge(final int ageParam) {\n this.ageNested = ageParam;\n return this;\n }", "public int birthday(int age) {//reference type\n\t\t// grow old by a year\n\t\tage = age + 1;\n\t\t\n\t\treturn age;\n\t}", "public int getAge() {\n return Integer.parseInt(getCellContent(AGE));\n }", "public AgeData (int age) {\n if (age<0){\n throw new IllegalArgumentException ();\n }\n this.age = age;\n total=1;\n }", "public void setMaxAge(int age) {\n long old = getMaxAge();\n this.maxAge = age;\n firePropertyChange(\"maxAge\", old, getMaxAge());\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int setAge(int age){\n \n if (age >= 0 && age < 18){\n \n System.out.println(\"OMG! He was too young to date, still a babe!\");\n }\n \n else if(age == 18){\n \n System.out.println(\"He was about your age!\");\n }\n \n else if (age < 0) {\n \n System.out.println(\"That is impossible. Liar! He doesn't exist!\");\n } \n \n else if(age > 18 && age <= 25){\n \n System.out.println(\"Great! He was marriage material!\");\n }\n \n else if (age >= 26 && age <=34){\n \n System.out.println(\"He was a bit old for you\");\n } \n \n else if (age >= 35 && age <=100){\n \n System.out.println(\"He was a sugar daddy!\");\n }\n \n else {\n \n System.out.println(\"That is unlikely to have happened. Were you dating a mummy?\");\n } \n \n return age;\n }", "public void setAge(java.lang.String param) {\r\n localAgeTracker = param != null;\r\n\r\n this.localAge = param;\r\n }", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "public int getAge() {\r\n\t\treturn age;\r\n\t}", "@java.lang.Override\n public int getAge() {\n return age_;\n }", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n return age_;\n }", "public int getAge() {\n\t \t return age; \n\t}", "@Override\n\tpublic int getAge() {\n\t\treturn age;\n\t}", "public int getAge() {\n\t\treturn _age;\n\t}", "public Animal(int theAge) {\n\t\t// TODO Auto-generated constructor stub\n\t\tage = theAge;\n\t}", "public int getAge(int i) {\n\t\treturn 0;\r\n\t}", "public void update() {\n setAge(getAge() - 1);\n }", "@java.lang.Override\n public int getAge() {\n return age_;\n }", "@Override\r\n\tpublic int getAge() \r\n\t{\r\n\t\treturn this._age;\r\n\t}", "public Female( int age ) {\n\t\tcurrent_age = age;\n\t}", "private int calculateAge() {\n\t\treturn LocalDate.now().getYear() - this.birthYear;\n\t}", "private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }", "public int getAge() {\n\t\treturn this.age;\n\t}", "public int getAge() {\n\t\treturn this.age;\n\t}", "public void setAgeDelta(int[] ageDelta) {\n this.ageDelta = ageDelta;\n }", "public int getAge() {\n\t\tif (ageField.getText().isEmpty()) {\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn Integer.parseInt(ageField.getText());\n\t\t}\n\t}", "public Integer getAge() {\r\n return age;\r\n }", "public void updateAge(int block, int age){\n\t\tblocks[block].updateAge(age);\n\t\tsortBlocks();\n\t}", "public void setAge(String un, int age){\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n // updating user database\n collRU.findOneAndUpdate(\n eq(\"username\", un),\n Updates.set(\"age\", age)\n );\n }", "public void grow() {\n if (!getIsWilted()) {\n age++;\n }\n }", "public Integer getAge() {\n return age;\n }", "public Integer getAge() {\n return age;\n }" ]
[ "0.78352743", "0.7800469", "0.77893054", "0.7738912", "0.7645378", "0.7521566", "0.7521566", "0.7521566", "0.7521566", "0.7521566", "0.7521566", "0.75135016", "0.7498752", "0.7474491", "0.7465758", "0.74618655", "0.7458472", "0.74257094", "0.74232155", "0.74232155", "0.74232155", "0.74232155", "0.74093074", "0.74093074", "0.74081886", "0.73898035", "0.7386296", "0.73830533", "0.73657477", "0.7302557", "0.7226118", "0.7216528", "0.70920193", "0.70468473", "0.70325357", "0.69530845", "0.6951326", "0.6928899", "0.68811196", "0.68540645", "0.68196297", "0.677171", "0.6751446", "0.6740314", "0.67334247", "0.67113787", "0.67103887", "0.67042196", "0.66711384", "0.6653845", "0.6451569", "0.64457184", "0.6438903", "0.6429199", "0.6416675", "0.6395194", "0.63693917", "0.6330004", "0.629856", "0.6220353", "0.6220353", "0.6220353", "0.62026227", "0.6167774", "0.6136156", "0.6136156", "0.6136156", "0.6111096", "0.6100755", "0.6100755", "0.6100755", "0.6100755", "0.6081825", "0.6081825", "0.6081825", "0.606133", "0.60347325", "0.6027012", "0.59932506", "0.59790075", "0.59675807", "0.59329563", "0.5932853", "0.5930691", "0.5919731", "0.59050936", "0.5888668", "0.5888668", "0.58759546", "0.5873876", "0.58640134", "0.582013", "0.57831186", "0.5782253", "0.57813", "0.57813" ]
0.7628579
8
Returns alive status of this cell
public boolean isAlive() { return this.alive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isAlive ()\n {\n return cellStatus;\n }", "public boolean isAlive() {\n\t\treturn aliveStatus;\n\t}", "public boolean getAlive() {\n return alive_;\n }", "boolean isAlive() { return alive; }", "public boolean isAlive() { return alive; }", "public boolean isAlive(){\n \t\treturn alive;\n \t}", "public boolean isAlive(){\n \treturn alive;\r\n }", "public boolean isAlive()\n {\n return alive;\n }", "public boolean isAlive() {\n return alive;\n }", "public boolean isAlive() {\n return alive;\n }", "boolean getAlive();", "public boolean isAlive() {\r\n\t\treturn alive;\r\n\t}", "public boolean isAlive() {\n\t\treturn alive;\n\t}", "public boolean isAlive() {\n\t\treturn alive;\n\t}", "public boolean isAlive() {\n\t\treturn alive;\n\t}", "public boolean isAlive()\n\t{\n\t\treturn alive;\n\t}", "public boolean isAlive()\n\t{\n\t\treturn alive;\n\t}", "public final boolean isAlive() {\n return alive;\n }", "public boolean getAlive() {\n return instance.getAlive();\n }", "public Status getStatus() {\n return board.getStatus();\n }", "public boolean getIsAlive() {\n return isAlive;\n }", "public int getStatus() {\n return alive ? CacheConstants.STATUS_ALIVE : CacheConstants.STATUS_DISPOSED;\n }", "public boolean isAlive() {\n\t\treturn state;\n\t}", "public boolean isAlive() {\n return health > 0;\n }", "boolean getIsAlive();", "public boolean isAlive(){\n\t\treturn isAlive;\n\t}", "public int getNumAlive() {\n return numAlive;\n }", "public boolean isAlive() {\n return this.isAlive;\n }", "public boolean isAlive() {\n\t\treturn isAlive;\n\t}", "public boolean getStatus()\n\t{\n\t\treturn idle;\n\t}", "public boolean isAlive();", "protected boolean isAlive()\n {\n return alive;\n }", "protected boolean isAlive()\n {\n return alive;\n }", "protected boolean getIsAlive() {\n\t\treturn isAlive;\n\t}", "public boolean isAlive() {\r\n\t\treturn hp > 0;\r\n\t}", "public boolean isAlive() {\n return this.getHealthPower().hasSomeHealth();\n }", "public boolean alive() {\r\n\t\treturn myHP > 0;\r\n\t}", "public GameStatus getStatus() {\n\t\treturn status;\n\t}", "boolean isAlive();", "boolean isAlive();", "public boolean[] getStatus()\n {\n\t return online;\n }", "public boolean isAlive() {\r\n\t\treturn life > 0;\r\n\t}", "public boolean getStatus(){\r\n\t\treturn status;\r\n\t}", "private boolean isAlive(){\n boolean alive = true;\n for(int i = 0; i < COLS; i++){\n if(grid[ROWS - 1][i].num != 0) {\n alive = false;\n }\n }\n return alive;\n }", "public boolean getStatus() {\n\treturn status;\n }", "public boolean getStatus() {\n\t\treturn status;\n\t}", "public Byte getStatus() {\n\t\treturn status;\n\t}", "public Byte getStatus() {\n\t\treturn status;\n\t}", "@Override\n public boolean isAlive() {\n return health > 0f;\n }", "public com.google.protobuf.ByteString getStatus() {\n return instance.getStatus();\n }", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public boolean isAlive() {\n synchronized (this) {\n return mIsAlive;\n }\n }", "public int getStatus ()\n {\n return status;\n }", "public int getStatus ()\n {\n return status;\n }", "public String getStatus() {\r\n if (status == null)\r\n status = cells.get(7).findElement(By.tagName(\"div\")).getText();\r\n return status;\r\n }", "public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }", "public Byte getStatus() {\r\n\t\treturn status;\r\n\t}", "int getCellStatus(int x, int y);", "public Status getStatus()\n {\n return (this.status);\n }", "public final boolean isAlive() { return true; }", "public boolean status() {\n return status;\n }", "public java.lang.Object getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Byte getStatus() {\n return status;\n }", "public Integer getStatus() {\n\t\treturn status;\n\t}", "public Integer getStatus() {\n\t\treturn status;\n\t}", "public Byte getStatus() {\r\n return status;\r\n }", "public Byte getStatus() {\r\n return status;\r\n }", "public Byte getStatus() {\r\n return status;\r\n }", "public Byte getStatus() {\r\n return status;\r\n }", "public Byte getStatus() {\r\n return status;\r\n }", "public Byte getStatus() {\r\n return status;\r\n }", "public Byte getStatus() {\r\n return status;\r\n }", "public WorkerStatus getStatus(){\r\n\t\ttry {\r\n\t\t\t//System.out.println(\"Place 1\");\r\n\t\t\treturn this.workerStatusHandler.getWorkerStatus(this.getPassword());\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t//System.out.println(\"Place 2\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tdead = true;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public int status() {\n return status;\n }", "public boolean health(){\n return health;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public Integer getStatus() {\r\n return status;\r\n }", "public Integer getStatus() {\r\n return status;\r\n }", "public boolean getStatus(){\n return activestatus;\n }", "public boolean getStatus()\n\t{\n\t\treturn getBooleanIOValue(\"Status\", false);\n\t}", "public boolean isAlive(){\n if(this.hp <= 0){\n return false;\n }\n else{\n return true;\n }\n }", "public Status getStatus()\n\t{\n\t\treturn status;\n\t}", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }" ]
[ "0.8247651", "0.75384337", "0.73765355", "0.73594844", "0.73198867", "0.72402793", "0.72116995", "0.71335393", "0.71084446", "0.71084446", "0.7050428", "0.7044124", "0.69946", "0.69946", "0.69946", "0.69832873", "0.69832873", "0.6930183", "0.6927892", "0.69236207", "0.6904055", "0.6868088", "0.68367857", "0.6830743", "0.68050474", "0.67860264", "0.675496", "0.6734923", "0.6705969", "0.6672481", "0.666441", "0.6657337", "0.6657337", "0.66243356", "0.6578562", "0.65762687", "0.6575713", "0.65711737", "0.6545422", "0.6545422", "0.6534695", "0.6532147", "0.6512723", "0.6512053", "0.6496789", "0.6481692", "0.64702266", "0.64702266", "0.64580846", "0.6457559", "0.6451827", "0.6451827", "0.6451827", "0.6441688", "0.6423681", "0.6423681", "0.641846", "0.6415434", "0.64104766", "0.64088714", "0.6400359", "0.6395594", "0.6385997", "0.63834095", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6378304", "0.6365119", "0.6365119", "0.63574374", "0.63574374", "0.63574374", "0.63574374", "0.63574374", "0.63574374", "0.63574374", "0.6357144", "0.6352302", "0.6342756", "0.63194877", "0.63194877", "0.63194877", "0.63113093", "0.63113093", "0.63112015", "0.6311098", "0.63093454", "0.63054585", "0.62987846", "0.62987846" ]
0.6952557
17
TODO Autogenerated method stub
@Override public int getMaxLag() { return pos; }
{ "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 double getValue(int index) { if (data==null) return 0; double d = 0; int begin=index+pos; if (begin<0) begin=0; if (begin>data.size()-1) begin = data.size()-1; d = data.get(begin).getOpen(); return d; }
{ "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
Executes a callable, ensuring that Wicket's threadlocal context is available during the execution. This method uses a default locale. This method uses the Wicket application currently attached to the thread, or (if there's none) a default Wicket application (which is implementationdependent).
@Override <T> T runWithContext(Callable<T> callable) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T runWithContext(Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(WebApplication application, Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;", "<T> T runWithContext(WebApplication application, Callable<T> callable) throws Exception;", "public <T> T executeInApplicationScope(Callable<T> op) throws Exception {\n return manager.executeInApplicationContext(op);\n }", "<T> T callInContext(ContextualCallable<T> callable) {\n InternalContext[] reference = localContext.get();\n if (reference[0] == null) {\n reference[0] = new InternalContext(this);\n try {\n return callable.call(reference[0]);\n }\n finally {\n // Only remove the context if this call created it.\n reference[0] = null;\n }\n }\n else {\n // Someone else will clean up this context.\n return callable.call(reference[0]);\n }\n }", "@Override\n public T call() {\n try {\n return callable.call();\n }\n catch (Throwable e) {\n Log.e(\"Scheduler\", \"call code exception: %s\", e);\n return null;\n }\n }", "public Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "public <T> T performWorkWithContext(\n PrefabContextSetReadable prefabContext,\n Callable<T> callable\n ) throws Exception {\n try (PrefabContextScope ignored = performWorkWithAutoClosingContext(prefabContext)) {\n return callable.call();\n }\n }", "public interface LocaleContext {\n Locale getLocale();\n}", "public static <T> T callInHandlerThread(Callable<T> callable, T defaultValue) {\n if (handler != null)\n return handler.callInHandlerThread(callable, defaultValue);\n return defaultValue;\n }", "public static void initForWeChatTranslate(String str, ApplicationInfo applicationInfo, ClassLoader classLoader) {\n if (\"com.hkdrjxy.wechart.xposed.XposedInit\".equals(str)) {\n if (\"com.hiwechart.translate\".equals(applicationInfo.processName) || \"com.tencent.mm\".equals(applicationInfo.processName)) {\n final IBinder[] iBinderArr = new IBinder[1];\n Intent intent = new Intent();\n intent.setAction(\"com.hiwechart.translate.aidl.TranslateService\");\n intent.setComponent(new ComponentName(\"com.hiwechart.translate\", \"com.hiwechart.translate.aidl.TranslateService\"));\n appContext.bindService(intent, new ServiceConnection() {\n public void onServiceDisconnected(ComponentName componentName) {\n }\n\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n iBinderArr[0] = iBinder;\n }\n }, 1);\n Class findClass = XposedHelpers.findClass(\"android.os.ServiceManager\", classLoader);\n final String str2 = VERSION.SDK_INT >= 21 ? \"user.wechart.trans\" : \"wechart.trans\";\n XposedHelpers.findAndHookMethod(findClass, \"getService\", String.class, new XC_MethodHook() {\n /* access modifiers changed from: protected */\n public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n super.beforeHookedMethod(methodHookParam);\n if (str2.equals(methodHookParam.args[0])) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"get service :\");\n sb.append(iBinderArr[0]);\n Log.i(\"mylog\", sb.toString());\n methodHookParam.setResult(iBinderArr[0]);\n }\n }\n });\n }\n }\n }", "public void asHigherOrderFunctions() {\nThreadLocal<DateFormat> localFormatter\n = ThreadLocal.withInitial(() -> new SimpleDateFormat());\n\n// Usage\nDateFormat formatter = localFormatter.get();\n// END local_formatter\n\n// BEGIN local_thread_id\n// Or...\nAtomicInteger threadId = new AtomicInteger();\nThreadLocal<Integer> localId\n = ThreadLocal.withInitial(() -> threadId.getAndIncrement());\n\n// Usage\nint idForThisThread = localId.get();\n// END local_thread_id\n }", "public static PackageContext getContext(StarlarkThread thread) throws EvalException {\n PackageContext value = thread.getThreadLocal(PackageContext.class);\n if (value == null) {\n // if PackageContext is missing, we're not called from a BUILD file. This happens if someone\n // uses native.some_func() in the wrong place.\n throw Starlark.errorf(\n \"The native module can be accessed only from a BUILD thread. \"\n + \"Wrap the function in a macro and call it from a BUILD file\");\n }\n return value;\n }", "<T> T runWithDebugging(Environment env, String threadName, DebugCallable<T> callable)\n throws EvalException, InterruptedException;", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "public String call() {\n return Thread.currentThread().getName() + \" executing ...\";\n }", "public static void fromCallable() {\n Observable<List<String>> myObservable = Observable.fromCallable(() -> {\n System.out.println(\"call, thread = \" + Thread.currentThread().getName());\n return Utils.getData();\n });\n myObservable.subscribeOn(Schedulers.io())\n //.observeOn(AndroidSchedulers.mainThread()) For ANDROID use Android Schedulers.\n .observeOn(Schedulers.newThread()) // For ease of unit test, this is used\n .subscribe(consumerList);\n }", "public static PythonInterpreter threadLocalStateInterpreter(PyObject dict) {\n return null;\n }", "protected final <T> T getLocalCache(CacheKeyMain<T> key, Callable<T> caller){\n try {\n return key.cast(spanMainCache.get(key, caller));\n } catch (ExecutionException e) {\n throw new RuntimeException(e.getCause());\n }\n }", "default void withContext(String tenantId, Runnable runnable) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n runnable.run();\n } finally {\n setContext(origContext.orElse(null));\n }\n }", "public String getLocale()\n {\n return (m_taskVector == null || m_taskVector.size() == 0) ?\n DEFAULT_LOCALE :\n taskAt(0).getSourceLanguage();\n }", "private static Locale getUserPreferredLocale() {\n\t\tfinal ResourceLoader rl = new ResourceLoader();\n\t\treturn rl.getLocale();\n\t}", "@Override\r\n\tpublic int call(Runnable thread_base, String strMsg) {\n\t\treturn 0;\r\n\t}", "public interface LocaleSettingsExtPoint extends CSSStartupExtensionPoint\n{\n\t/** The name of this extension point element */\n\tpublic static final String NAME = \"locale\"; //$NON-NLS-1$\n\t\n\t/**\n\t * Applies the locale settings. The locale settings can be gathered from any\n\t * location specified by the implementation and can be set to whatever part\n\t * of the application.\n\t * \n\t * @param context the application context which triggered this call and for\n\t * \t\t\twhich the settings are being applied\n\t * @param parameters contains additional parameters, which can define\n\t * \t\t\tsome special behavior during the execution of this method (the keys\n\t * \t\t\tare parameters names and the values are parameters values)\n\t * \n\t * @return the exit code if something happened which requires to exit or restart \n\t * \t\t\tapplication or null if everything is alright\n\t * \n\t * @throws Exception if an error occurred during the operation\n\t */\n\tpublic Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;\n}", "public void render(Callable<Object> callable) {\n\t\trenderQueue.enqueue(callable);\n\t}", "static Scheduler m34951a(Function<? super Callable<Scheduler>, ? extends Scheduler> hVar, Callable<Scheduler> callable) {\n return (Scheduler) ObjectHelper.m35048a(m34956a(hVar, (T) callable), \"Scheduler Callable result can't be null\");\n }", "public void runInThread() {\n\t\tTaskRunner taskRunner = Dep.get(TaskRunner.class);\n\t\tATask atask = new ATask<Object>(getClass().getSimpleName()) {\n\t\t\t@Override\n\t\t\tprotected Object run() throws Exception {\n\t\t\t\tBuildTask.this.run();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t};\n\t\ttaskRunner.submitIfAbsent(atask);\n\t}", "public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }", "T call() throws EvalException, InterruptedException;", "public interface AppScheduler {\n Scheduler getNewThread();\n Scheduler getMainThread();\n}", "public static void main(String[] args) {\n\t\tWithoutThreadLocal safetask = new WithoutThreadLocal();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tThread thread = new Thread(safetask);\n\t\t\tthread.start();\n\t\t\ttry {\n\t\t\t\tTimeUnit.SECONDS.sleep(2);\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\tSystem.out.println(\"This output is thread local\");\n\t\t//Thsi Code is with thread local cocept\n\t\tWithThreadLocal task = new WithThreadLocal();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tThread thread = new Thread(task);\n\t\t\tthread.start();\n\t\t\ttry {\n\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public abstract ApplicationLoader.Context context();", "@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}", "public Object call(Context cx, Scriptable scope, Scriptable thisObj,\n Object[] args);", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "@Override\n public Object run() throws ZuulException {\n HttpServletRequest req = RequestContext.getCurrentContext().getRequest();\n logger.info(\">>> Request uri : {} \" , req.getRequestURL());\n return null;\n }", "public void registerCurrentThread() {\n // Remember this stage in TLS so that rendering thread can get it later.\n THREAD_LOCAL_STAGE.set(this);\n }", "public Void call() throws Exception {\n if (mStopping)\n return null;\n Process.setThreadPriority(getThreadPriority(mPass));\n try {\n Render render = render(mParam, mPass);\n if (render == null) {\n mFailed = true;\n } else {\n // record the render, we will apply to the view it cache it\n // later\n mRender = render;\n // increment the pass now - since later calls aren't\n // guaranteed to occur\n mPass++;\n }\n mHandler.post(this);\n return null;\n } finally {\n Process.setThreadPriority(mInheritedThreadPriority);\n }\n }", "protected final <T> Optional<T> getLocalCache(CacheKeyOptional<T> key,\n Callable<Optional<T>> caller\n ){\n try {\n return key.cast(spanOptionalCache.get(key, caller));\n } catch (ExecutionException e) {\n throw new RuntimeException(e.getCause());\n }\n }", "private Locale getLocale() {\n Locale selectedLocale = (Locale) Sessions.getCurrent().getAttribute(Attributes.PREFERRED_LOCALE);\n if (selectedLocale != null) {\n return selectedLocale;\n }\n Locale defaultLocale = ((HttpServletRequest) Executions.getCurrent().getNativeRequest()).getLocale();\n Sessions.getCurrent().setAttribute(org.zkoss.web.Attributes.PREFERRED_LOCALE, defaultLocale);\n return defaultLocale;\n }", "@Override\n\tpublic void execute() {\n\t\ttry {\n\t\t\tProperties properties\t = new Properties();\n\t\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\t\tInputStream propertiesFile = classLoader.getResourceAsStream(\"languages/language_\" + lang + \".properties\");\n\t\t\tproperties.load(propertiesFile);\n\t\t\tResultSearchFrame rsf = new ResultSearchFrame(properties.getProperty(\"view_search_result\") , dto.getRootNode() , dto.getSessionId() , dto.getSearchName() , wordManagerFrame.getTransmitter() , lang);\n\t\t\trsf.showWindows();\n\t\t\tpropertiesFile.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Problem to load languages\" , e);\n\t\t}\n\t\t\n\t}", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "public void testPrivilegedCallableUsingCCLWithPrivs() throws Exception {\n Runnable r = new CheckedRunnable() {\n public void realRun() throws Exception {\n Executors.privilegedCallableUsingCurrentClassLoader\n (new NoOpCallable())\n .call();\n }};\n\n runWithPermissions(r,\n new RuntimePermission(\"getClassLoader\"),\n new RuntimePermission(\"setContextClassLoader\"));\n }", "public static Scheduler m34963c(Callable<Scheduler> callable) {\n ObjectHelper.m35048a(callable, \"Scheduler Callable can't be null\");\n Function<? super Callable<Scheduler>, ? extends Scheduler> hVar = f27421f;\n if (hVar == null) {\n return m34966e(callable);\n }\n return m34951a(hVar, callable);\n }", "public static String getDisplayScript(String localeID, ULocale displayLocale) {\n/* 604 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void doLocalCall() {\n\n // Create the intent used to identify the bound service\n final Intent boundIntent = new Intent(this, MyLocalBoundService.class);\n\n // Lets get a reference to it (asynchronously, hence the ServiceConnection object)\n bindService(boundIntent, new ServiceConnection() {\n @Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n // Let's call it!\n ((MyLocalBoundServiceContract) service).doSomething(10);\n // We're done. Free the reference to the service\n unbindService(this);\n }\n\n @Override\n public void onServiceDisconnected(ComponentName name) {\n // Called upon unbind, just in case we need some cleanup\n }\n }, Context.BIND_AUTO_CREATE);\n }", "public void init() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();//gets the info from the URL\n this.setFormId(paramMap.get(\"id\"));//gets the form ID from the URL and sets it to the variable\n\n\n this.startDateQuestionSet();//executes the method\n this.startMultQuestionSet();//executes the method\n this.startSingleQuestionSet();//executes the method\n this.startTextQuestionSet();//executes the method\n }", "@Override\r\n public void service(HttpServletRequest request, \r\n HttpServletResponse response) {\r\n Context cx = Context.enter();\r\n //cx.setOptimizationLevel(-1);\r\n cx.putThreadLocal(\"rhinoServer\",RhinoServlet.this);\r\n try {\r\n \r\n // retrieve JavaScript...\r\n JavaScript s = loader.loadScript(entryPoint);\r\n \r\n ScriptableObject threadScope = makeChildScope(\"RequestScope\", \r\n globalScope.getModuleScope(entryPoint));\r\n \r\n cx.putThreadLocal(\"globalScope\", globalScope);\r\n // Define thread-local variables\r\n threadScope.defineProperty(\"request\", request, PROTECTED);\r\n threadScope.defineProperty(\"response\", response, PROTECTED);\r\n \r\n // Evaluate the script in this scope\r\n s.evaluate(cx, threadScope);\r\n } catch (Throwable ex) {\r\n handleError(response,ex);\r\n } finally {\r\n Context.exit();\r\n }\r\n }", "private Locale getLocale(PageContext pageContext) {\n HttpSession session = pageContext.getSession();\n Locale ret = null;\n // See if a Locale has been set up for Struts\n if (session != null) {\n ret = (Locale) session.getAttribute(Globals.LOCALE_KEY);\n }\n\n // If we've found nothing so far, use client browser's Locale\n if (ret == null) {\n ret = pageContext.getRequest().getLocale();\n }\n return ret;\n }", "public interface SchedulerProvider {\n Scheduler background();\n Scheduler ui();\n}", "@Override\n public Object run() throws ZuulException {\n HttpServletRequest request = RequestContext.getCurrentContext().getRequest();\n logger.info(\"request-> {} request uri -> {}\", request, request.getRequestURI());\n\n return null;\n }", "public static String getDisplayScript(String localeID, String displayLocaleID) {\n/* 595 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static Scheduler m34953a(Callable<Scheduler> callable) {\n ObjectHelper.m35048a(callable, \"Scheduler Callable can't be null\");\n Function<? super Callable<Scheduler>, ? extends Scheduler> hVar = f27418c;\n if (hVar == null) {\n return m34966e(callable);\n }\n return m34951a(hVar, callable);\n }", "private void setWSClientToKeepSeparateContextPerThread() {\n ((BindingProvider) movilizerCloud).getRequestContext()\n .put(THREAD_LOCAL_CONTEXT_KEY, \"true\");\n }", "@Override\n\t\t\tpublic void execute(GameEngine context) {\n\t\t\t\tWorld.getWorld().tickManager.submit(tickable);\n\t\t\t}", "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n/* 28: */ throws ServletException\r\n/* 29: */ {\r\n/* 30:67 */ String newLocale = request.getParameter(this.paramName);\r\n/* 31:68 */ if (newLocale != null)\r\n/* 32: */ {\r\n/* 33:69 */ LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);\r\n/* 34:70 */ if (localeResolver == null) {\r\n/* 35:71 */ throw new IllegalStateException(\"No LocaleResolver found: not in a DispatcherServlet request?\");\r\n/* 36: */ }\r\n/* 37:73 */ localeResolver.setLocale(request, response, StringUtils.parseLocaleString(newLocale));\r\n/* 38: */ }\r\n/* 39:76 */ return true;\r\n/* 40: */ }", "@Override\r\n\tpublic String execute(HttpServletRequest request) {\t\t\r\n\t\tString page = ConfigurationManager.getProperty(\"path.page.login\");\r\n\t\tString language = request.getParameter(PARAM_NAME_LANGUAGE);\r\n\t\tswitch (language) {\r\n\t\tcase \"en\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"en\");\r\n\t\t\tbreak;\r\n\t\tcase \"ru\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"ru\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn page;\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"com/i18n/common/application-context.xml\");\r\n\t\tSystem.out.println(\"ApplicationContext class Object type \"+applicationContext.getClass().getName());\r\n\t\tString messageFromApplivationContext = applicationContext.getMessage(\"title\",null,Locale.getDefault());\r\n\t\tSystem.out.println(\"Message From ApplicationContext \"+messageFromApplivationContext);;\r\n\t\t\r\n\t}", "@Context\r\npublic interface ThreadContext\r\n{\r\n /**\r\n * Get the minimum thread level.\r\n *\r\n * @param min the default minimum value\r\n * @return the minimum thread level\r\n */\r\n int getMin( int min );\r\n \r\n /**\r\n * Return maximum thread level.\r\n *\r\n * @param max the default maximum value\r\n * @return the maximum thread level\r\n */\r\n int getMax( int max );\r\n \r\n /**\r\n * Return the deamon flag.\r\n *\r\n * @param flag true if a damon thread \r\n * @return the deamon thread policy\r\n */\r\n boolean getDaemon( boolean flag );\r\n \r\n /**\r\n * Get the thread pool name.\r\n *\r\n * @param name the pool name\r\n * @return the name\r\n */\r\n String getName( String name );\r\n \r\n /**\r\n * Get the thread pool priority.\r\n *\r\n * @param priority the thread pool priority\r\n * @return the priority\r\n */\r\n int getPriority( int priority );\r\n \r\n /**\r\n * Get the maximum idle time.\r\n *\r\n * @param idle the default maximum idle time\r\n * @return the maximum idle time in milliseconds\r\n */\r\n int getIdle( int idle );\r\n \r\n}", "static Scheduler m34966e(Callable<Scheduler> callable) {\n try {\n return (Scheduler) ObjectHelper.m35048a(callable.call(), \"Scheduler Callable result can't be null\");\n } catch (Throwable th) {\n throw C8162d.m35182a(th);\n }\n }", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "boolean inStaticContext();", "@Override\n public void initialize() {\n CallInvokerHolderImpl jsCallInvokerHolder = (CallInvokerHolderImpl) getReactApplicationContext().getCatalystInstance().getJSCallInvokerHolder();\n setupFlushUiQueue(jsCallInvokerHolder);\n }", "public interface PostExecutionThread {\n Scheduler getScheduler();\n}", "public interface PostExecutionThread {\n Scheduler getScheduler();\n}", "public interface PostExecutionThread {\n Scheduler getScheduler();\n}", "@Override\n public void run() {\n\n System.out.println(ThreadLocalInstance.getInstance());\n }", "void setDynamicLauncherShortcutsFromMainThread()\n {\n\n final Context appContext = context;\n //PPApplication.startHandlerThread(/*\"DataWrapper.setDynamicLauncherShortcutsFromMainThread\"*/);\n //final Handler __handler = new Handler(PPApplication.handlerThread.getLooper());\n //__handler.post(new PPHandlerThreadRunnable(\n // context, dataWrapper, null, null) {\n //__handler.post(() -> {\n Runnable runnable = () -> {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", \"START run - from=DataWrapper.setDynamicLauncherShortcutsFromMainThread\");\n\n //Context appContext= appContextWeakRef.get();\n //DataWrapper dataWrapper = dataWrapperWeakRef.get();\n //Profile profile = profileWeakRef.get();\n //Activity activity = activityWeakRef.get();\n\n //if ((appContext != null) && (dataWrapper != null) /*&& (profile != null) && (activity != null)*/) {\n PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = null;\n try {\n if (powerManager != null) {\n wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, PPApplication.PACKAGE_NAME + \":DataWrapper_setDynamicLauncherShortcutsFromMainThread\");\n wakeLock.acquire(10 * 60 * 1000);\n }\n\n DataWrapperStatic.setDynamicLauncherShortcuts(context);\n\n } catch (Exception e) {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", Log.getStackTraceString(e));\n PPApplicationStatic.recordException(e);\n } finally {\n if ((wakeLock != null) && wakeLock.isHeld()) {\n try {\n wakeLock.release();\n } catch (Exception ignored) {\n }\n }\n }\n //}\n }; //);\n PPApplicationStatic.createBasicExecutorPool();\n PPApplication.basicExecutorPool.submit(runnable);\n }", "@Override\n public Object callStatic(Class receiver, Object arg1, @Nullable Object arg2, @Nullable Object arg3) throws Throwable {\n if (receiver.equals(ProcessGroovyMethods.class)) {\n Optional<Process> result = tryCallExecute(arg1, arg2, arg3);\n if (result.isPresent()) {\n return result.get();\n }\n }\n return super.callStatic(receiver, arg1, arg2, arg3);\n }", "public void testDefaultsToMainThread() throws Exception {\n\n Executor executor = new LooperExecutor();\n final CountDownLatch latch = new CountDownLatch(1);\n executor.execute(new Runnable() {\n @Override\n public void run() {\n assertEquals(\"running on ui thread\", Looper.getMainLooper(), Looper.myLooper());\n latch.countDown();\n }\n });\n latch.await();\n }", "public void testCallable3() throws Exception {\n Callable c = Executors.callable(new PrivilegedAction() {\n public Object run() { return one; }});\n assertSame(one, c.call());\n }", "@Override\n\tpublic Object compute(IEclipseContext context, String contextKey) {\n\t\tTaskService taskService = \n\t\t\t\tContextInjectionFactory.make(TransientTaskServiceImpl.class, context);\n\t\t\n\t\t// add instance of TaskService to context so that\n//\t\t// test next caller gets the same instance\n//\t\tMApplication app = context.get(MApplication.class);\n//\t\tIEclipseContext appCtx = app.getContext();\n//\t\tappCtx.set(TaskService.class, taskService);\n\t\t\n\t\t// in case the TaskService is also needed in the OSGi layer, e.g.\n\t\t// by other OSGi services, register the instance also in the OSGi service layer\n\t\tBundle bundle = FrameworkUtil.getBundle(this.getClass());\n\t\tBundleContext bundleContext = bundle.getBundleContext();\n\t\tbundleContext.registerService(TaskService.class, taskService, null);\n\n\t\t// return model for current invocation \n\t\t// next invocation uses object from application context\n\t\treturn taskService;\n\t}", "public interface BeanInvoker<T> {\n\n default void invoke(T param) throws Exception {\n ManagedContext requestContext = Arc.container().requestContext();\n if (requestContext.isActive()) {\n invokeBean(param);\n } else {\n try {\n requestContext.activate();\n invokeBean(param);\n } finally {\n requestContext.terminate();\n }\n }\n }\n\n void invokeBean(T param) throws Exception;\n\n}", "private LocalizationProvider() {\r\n\t\tthis.language = DEFAULT_LANGUAGE;\r\n\t\tthis.bundle = ResourceBundle.getBundle(\"hr.fer.zemris.java.hw11.jnotepadapp.local.languages\",\r\n\t\t\t\tLocale.forLanguageTag(language));\r\n\t}", "public <T> T callWithSync(final Callable<T> callable) throws Exception {\n\t\tsynchronized (this.monitor) {\n\t\t\treturn callable.call();\n\t\t}\n\t}", "protected Locale getCurrentLocale()\n\t{\n\t\tLocale locale = getArchLocale();\n\t\tif (locale == null) {\n\t\t\t//Fallback to Spring locale\n\t\t\tlocale = LocaleContextHolder.getLocale();\n\t\t}\n\t\treturn locale;\n\t}", "private Locale getBotLocale( HttpServletRequest request )\r\n {\r\n String strLanguage = request.getParameter( PARAMETER_LANGUAGE );\r\n\r\n if ( strLanguage != null )\r\n {\r\n return new Locale( strLanguage );\r\n }\r\n\r\n return LocaleService.getDefault( );\r\n }", "@Override\n\tpublic Object run() throws ZuulException {\n\t\tRequestContext requestContext = RequestContext.getCurrentContext();\n\t\tHttpServletRequest request = requestContext.getRequest();\n\t\trequestContext.set(FilterConstants.LOAD_BALANCER_KEY, request.getHeader(CUSTOM_ROUTE_HEADER));\n\t\t\n\t\treturn null;\n\t}", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "public OnMainThread() {\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected Void doInBackground(Void... params) {\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n run();\n }\n }.execute();\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void testExecuteWithInvocationContext() throws Exception {\n TestApplicationWithoutEngine processApplication = spy(pa);\n ProcessApplicationReference processApplicationReference = mock(ProcessApplicationReference.class);\n when(processApplicationReference.getProcessApplication()).thenReturn(processApplication);\n\n // when execute with context\n InvocationContext invocationContext = new InvocationContext(mock(BaseDelegateExecution.class));\n Context.executeWithinProcessApplication(mock(Callable.class), processApplicationReference, invocationContext);\n\n // then the execute method should be invoked with context\n verify(processApplication).execute(any(Callable.class), eq(invocationContext));\n // and forward to call to the default execute method\n verify(processApplication).execute(any(Callable.class));\n }", "private void showOrLoadApplications() {\n //nocache!!\n GetAppList getAppList = new GetAppList();\n if (plsWait == null && (getAppList.getStatus() == AsyncTask.Status.PENDING || getAppList.getStatus() == AsyncTask.Status.FINISHED)) {\n getAppList.setContext(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n }", "@Override\n\tpublic final void onInit() {\n\t\tsuper.onInit();\n\t\tBeanFactory beanFactory = getBeanFactory();\n\t\tBroadcastingDispatcher dispatcherToUse = getDispatcher();\n\t\tif (this.executor != null) {\n\t\t\tAssert.state(dispatcherToUse.getHandlerCount() == 0,\n\t\t\t\t\t\"When providing an Executor, you cannot subscribe() until the channel \"\n\t\t\t\t\t\t\t+ \"bean is fully initialized by the framework. Do not subscribe in a @Bean definition\");\n\t\t\tif (!(this.executor instanceof ErrorHandlingTaskExecutor)) {\n\t\t\t\tif (this.errorHandler == null) {\n\t\t\t\t\tthis.errorHandler = ChannelUtils.getErrorHandler(beanFactory);\n\t\t\t\t}\n\t\t\t\tthis.executor = new ErrorHandlingTaskExecutor(this.executor, this.errorHandler);\n\t\t\t}\n\t\t\tdispatcherToUse = new BroadcastingDispatcher(this.executor, this.requireSubscribers);\n\t\t\tdispatcherToUse.setIgnoreFailures(this.ignoreFailures);\n\t\t\tdispatcherToUse.setApplySequence(this.applySequence);\n\t\t\tdispatcherToUse.setMinSubscribers(this.minSubscribers);\n\t\t\tthis.dispatcher = dispatcherToUse;\n\t\t}\n\t\telse if (this.errorHandler != null) {\n\t\t\tthis.logger.warn(() -> \"The 'errorHandler' is ignored for the '\" + getComponentName() +\n\t\t\t\t\t\"' (an 'executor' is not provided) and exceptions will be thrown \" +\n\t\t\t\t\t\"directly within the sending Thread\");\n\t\t}\n\n\t\tif (this.maxSubscribers == null) {\n\t\t\tsetMaxSubscribers(getIntegrationProperties().getChannelsMaxBroadcastSubscribers());\n\t\t}\n\t\tdispatcherToUse.setBeanFactory(beanFactory);\n\n\t\tdispatcherToUse.setMessageHandlingTaskDecorator(task -> {\n\t\t\tif (PublishSubscribeChannel.this.executorInterceptorsSize > 0) {\n\t\t\t\treturn new MessageHandlingTask(task);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn task;\n\t\t\t}\n\t\t});\n\t}", "public String getDisplayScript(ULocale displayLocale) {\n/* 585 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public Integer call() {\n if (properties != null && !properties.isEmpty()) {\n System.getProperties().putAll(properties);\n }\n\n final List<File> templateDirectories = getTemplateDirectories(baseDir);\n\n final Settings settings = Settings.builder()\n .setArgs(args)\n .setTemplateDirectories(templateDirectories)\n .setTemplateName(template)\n .setSourceEncoding(sourceEncoding)\n .setOutputEncoding(outputEncoding)\n .setOutputFile(outputFile)\n .setInclude(include)\n .setLocale(locale)\n .isReadFromStdin(readFromStdin)\n .isEnvironmentExposed(isEnvironmentExposed)\n .setSources(sources != null ? sources : new ArrayList<>())\n .setProperties(properties != null ? properties : new HashMap<>())\n .setWriter(writer(outputFile, outputEncoding))\n .build();\n\n try {\n return new FreeMarkerTask(settings).call();\n } finally {\n if (settings.hasOutputFile()) {\n close(settings.getWriter());\n }\n }\n }", "String getCurrentLocaleString();", "private Context getContextAsync() {\n return getActivity() == null ? IotSensorsApplication.getApplication().getApplicationContext() : getActivity();\n }", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "@Override\n\tpublic String call() throws Exception {\n\t\treturn \"hello\";\n\t}", "void localizationChaneged();", "private void translate()\r\n\t{\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\t\r\n\t\tString language = locale.getLanguage();\r\n\t\t\r\n\t\ttranslate(language);\r\n\t}", "public static Object get(String key){\n return getThreadContext().get(key);\n }", "long getCurrentContext();", "@Override\n public void onProjectRequest(ProjectModel projectModel) {\n SettingPersistent settingPersistent = new SettingPersistent(this);\n SettingUserModel settingUserModel = settingPersistent.getSettingUserModel();\n\n // -- Get SessionLoginModel from SessionPersistent --\n SessionPersistent sessionPersistent = new SessionPersistent(this);\n SessionLoginModel sessionLoginModel = sessionPersistent.getSessionLoginModel();\n\n // -- Prepare ProjectGetAsyncTask --\n ProjectGetAsyncTask projectGetAsyncTask = new ProjectGetAsyncTask() {\n @Override\n public void onPreExecute() {\n mAsyncTaskList.add(this);\n }\n\n @Override\n public void onPostExecute(ProjectGetAsyncTaskResult projectHandleTaskResult) {\n mAsyncTaskList.remove(this);\n\n if (projectHandleTaskResult != null) {\n onProjectRequestSuccess(projectHandleTaskResult.getContractModel(), projectHandleTaskResult.getProjectModel(), projectHandleTaskResult.getProjectStageModels(), projectHandleTaskResult.getProjectPlanModels());\n if (projectHandleTaskResult.getMessage() != null)\n onProjectRequestMessage(projectHandleTaskResult.getMessage());\n }\n }\n\n @Override\n protected void onProgressUpdate(String... messages) {\n if (messages != null) {\n if (messages.length > 0) {\n onProjectRequestProgress(messages[0]);\n }\n }\n }\n };\n\n // -- Do ProjectGetAsyncTask --\n projectGetAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new ProjectGetAsyncTaskParam(this, settingUserModel, projectModel, sessionLoginModel.getProjectMemberModel()));\n }", "public ExecutionContext getContext();", "@Override\n\tpublic LoggerContext getContext(final String fqcn, final ClassLoader loader, final Object externalContext,\n\t\t\tfinal boolean currentContext, final URI configLocation, final String name) {\n\t\tfinal LoggerContext ctx = selector.getContext(fqcn, loader, currentContext, configLocation);\n\t\tif (externalContext != null && ctx.getExternalContext() == null) {\n\t\t\tctx.setExternalContext(externalContext);\n\t\t}\n\t\tif (name != null) {\n\t\t\tctx.setName(name);\n\t\t}\n\t\tif (ctx.getState() == LifeCycle.State.INITIALIZED) {\n\t\t\tif (configLocation != null || name != null) {\n\t\t\t\tContextAnchor.THREAD_CONTEXT.set(ctx);\n\t\t\t\tfinal Configuration config = ConfigurationFactory.getInstance().getConfiguration(ctx, name,\n\t\t\t\t\t\tconfigLocation);\n\t\t\t\tLOGGER.debug(\"Starting LoggerContext[name={}] from configuration at {}\", ctx.getName(), configLocation);\n\t\t\t\tctx.start(config);\n\t\t\t\tContextAnchor.THREAD_CONTEXT.remove();\n\t\t\t} else {\n\t\t\t\tctx.start();\n\t\t\t}\n\t\t}\n\t\treturn ctx;\n\t}", "public void init() {\n\t\tThread appThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tSwingUtilities.invokeAndWait(doHelloWorld);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Finished on \" + Thread.currentThread());\n\t\t\t}\n\t\t};\n\t\tappThread.start();\n\t}" ]
[ "0.7069263", "0.7057525", "0.69220364", "0.5509805", "0.54390496", "0.5315774", "0.51810694", "0.4957164", "0.49294934", "0.49125513", "0.4802648", "0.46501815", "0.46417087", "0.45928577", "0.45559368", "0.45488757", "0.45436263", "0.4501049", "0.4476309", "0.4470759", "0.44423294", "0.44197327", "0.4417778", "0.4390044", "0.4341061", "0.429809", "0.42848894", "0.42762092", "0.4271972", "0.42405865", "0.42243302", "0.421156", "0.41968656", "0.41959935", "0.41914532", "0.41856313", "0.41817915", "0.4180313", "0.41721833", "0.41507393", "0.41396263", "0.41385457", "0.41377836", "0.41319332", "0.41240007", "0.41228712", "0.4116271", "0.4105965", "0.41052365", "0.41033566", "0.41026607", "0.41025966", "0.40983784", "0.4097168", "0.4093238", "0.40931624", "0.40930095", "0.4076673", "0.40723565", "0.40575948", "0.40543595", "0.40502724", "0.40493616", "0.4040939", "0.40403956", "0.4021513", "0.40179065", "0.40179065", "0.40179065", "0.40122724", "0.4011369", "0.4009519", "0.40080655", "0.39912397", "0.39857537", "0.3973796", "0.39699498", "0.39696264", "0.39637175", "0.3960187", "0.39380175", "0.39353606", "0.39300027", "0.3921131", "0.39207548", "0.39205605", "0.39171907", "0.39167342", "0.39140153", "0.39100134", "0.39061093", "0.39057693", "0.3901638", "0.3901497", "0.38995698", "0.38986546", "0.38967103", "0.38954607", "0.38942492", "0.38867515" ]
0.5131437
7
Executes a callable, ensuring that Wicket's threadlocal context is available during the execution. This method sets the given locale on the Wicket Session. This method uses the Wicket application currently attached to the thread, or (if there's none) a default Wicket application (which is implementationdependent).
<T> T runWithContext(Callable<T> callable, Locale locale) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T runWithContext(WebApplication application, Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;", "public Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;", "public static void setCurrentLocale(HttpSession session, Locale locale) {\r\n\t\tif (session == null)\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Cannot set an attribute on a null session\");\r\n\t\tif (locale == null)\r\n\t\t\tthrow new IllegalArgumentException(\"the value of the \"\r\n\t\t\t\t\t+ CURRENT_LOCALE_NAME + \" attribute should not be null\");\r\n\t\tsession.setAttribute(CURRENT_LOCALE_NAME, locale);\r\n\t}", "public interface LocaleContext {\n Locale getLocale();\n}", "public void setLocale(Locale locale) {\n fLocale = locale;\n }", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "@Override\r\n\tpublic String execute(HttpServletRequest request) {\t\t\r\n\t\tString page = ConfigurationManager.getProperty(\"path.page.login\");\r\n\t\tString language = request.getParameter(PARAM_NAME_LANGUAGE);\r\n\t\tswitch (language) {\r\n\t\tcase \"en\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"en\");\r\n\t\t\tbreak;\r\n\t\tcase \"ru\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"ru\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn page;\r\n\t}", "public void setUserLocale(String userLocale) {\n sessionData.setUserLocale(userLocale);\n }", "public <T> T executeInApplicationScope(Callable<T> op) throws Exception {\n return manager.executeInApplicationContext(op);\n }", "public void setLocale (\r\n String strLocale) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }", "public void setLocale(Locale locale) {\n/* 462 */ ParamChecks.nullNotPermitted(locale, \"locale\");\n/* 463 */ this.locale = locale;\n/* 464 */ setStandardTickUnits(createStandardDateTickUnits(this.timeZone, this.locale));\n/* */ \n/* 466 */ fireChangeEvent();\n/* */ }", "public void setRequestedLocale(final Locale val) {\n requestedLocale = val;\n }", "public void setContexto() {\n this.contexto = FacesContext.getCurrentInstance().getViewRoot().getLocale().toString();\r\n // this.contexto =httpServletRequest.getLocale().toString();\r\n \r\n \r\n //obtenemos el HttpServletRequest de la peticion para poder saber\r\n // el locale del cliente\r\n HttpServletRequest requestObj = (HttpServletRequest) \r\n FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n \r\n //Locale del cliente\r\n this.contextoCliente = requestObj.getLocale().toString();\r\n \r\n \r\n //Asignamos al locale de la aplicacion el locale del cliente\r\n FacesContext.getCurrentInstance().getViewRoot().setLocale(requestObj.getLocale());\r\n }", "public void setPreferredLocale(Locale locale);", "public interface LocaleSettingsExtPoint extends CSSStartupExtensionPoint\n{\n\t/** The name of this extension point element */\n\tpublic static final String NAME = \"locale\"; //$NON-NLS-1$\n\t\n\t/**\n\t * Applies the locale settings. The locale settings can be gathered from any\n\t * location specified by the implementation and can be set to whatever part\n\t * of the application.\n\t * \n\t * @param context the application context which triggered this call and for\n\t * \t\t\twhich the settings are being applied\n\t * @param parameters contains additional parameters, which can define\n\t * \t\t\tsome special behavior during the execution of this method (the keys\n\t * \t\t\tare parameters names and the values are parameters values)\n\t * \n\t * @return the exit code if something happened which requires to exit or restart \n\t * \t\t\tapplication or null if everything is alright\n\t * \n\t * @throws Exception if an error occurred during the operation\n\t */\n\tpublic Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;\n}", "public RequestAndSessionLocaleResolver(Locale locale) {\n\t\tsetDefaultLocale(locale);\n\t}", "private void setLocale(String lang) {\n Locale myLocale = new Locale(lang);\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration conf = res.getConfiguration();\n conf.setLocale(myLocale);\n res.updateConfiguration(conf, dm);\n Intent refresh = new Intent(this, MainActivity.class);\n startActivity(refresh);\n finish();\n }", "private void setLanguageForApp(){\n String lang = sharedPreferences.getString(EXTRA_PREF_LANG,\"en\");\n\n Locale locale = new Locale(lang);\n Resources resources = getResources();\n Configuration configuration = resources.getConfiguration();\n DisplayMetrics displayMetrics = resources.getDisplayMetrics();\n configuration.setLocale(locale);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n getApplicationContext().createConfigurationContext(configuration);\n } else {\n resources.updateConfiguration(configuration,displayMetrics);\n }\n getApplicationContext().getResources().updateConfiguration(configuration, getApplicationContext().getResources().getDisplayMetrics());\n }", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "public void updateLanguage() {\n try {\n getUserTicket().setLanguage(EJBLookup.getLanguageEngine().load(updateLanguageId));\n } catch (FxApplicationException e) {\n new FxFacesMsgErr(e).addToContext();\n }\n }", "public Future<Void> setLanguage(String pLanguage) throws DynamicCallException, ExecutionException{\n return call(\"setLanguage\", pLanguage);\n }", "@Override\n\tpublic void setLocale(Locale loc) {\n\t}", "public void setLocale (Locale locale) {\n _locale = locale;\n _cache.clear();\n _global = getBundle(_globalName);\n }", "public void setLocale(Locale locale) {\n\n\t}", "protected void localeChanged() {\n\t}", "public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}", "public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }", "@Test\r\n\tpublic void testSessionLocale() throws Exception {\n\t}", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "public static void setLocale(Locale locale) {\n// Recarga las entradas de la tabla con la nueva localizacion \n RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, locale);\n}", "@Override\n public String execute(final HttpServletRequest request, final HttpServletResponse response, ModelMap model) throws Exception {\n request.getSession().setAttribute(\"language\", request.getParameter(\"language\"));\n\n\n // model.addAttribute(\"language\",request.getParameter(\"language\"));\n // model.addAttribute(\"loginmessage\",\"null\");\n\n request.getSession().setAttribute(\"loginmessage\", \"\");\n return \"login\";\n }", "public void setLocale(Locale loc) {\n this.response.setLocale(loc);\n }", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "public static void updateLocale(HttpSession session, Locale locale) {\n\t\tsession.setAttribute(CURRENT_SESSION_LOCALE, locale);\n\t\tConfig.set(session, Config.FMT_LOCALE, locale);\n\t}", "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n/* 28: */ throws ServletException\r\n/* 29: */ {\r\n/* 30:67 */ String newLocale = request.getParameter(this.paramName);\r\n/* 31:68 */ if (newLocale != null)\r\n/* 32: */ {\r\n/* 33:69 */ LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);\r\n/* 34:70 */ if (localeResolver == null) {\r\n/* 35:71 */ throw new IllegalStateException(\"No LocaleResolver found: not in a DispatcherServlet request?\");\r\n/* 36: */ }\r\n/* 37:73 */ localeResolver.setLocale(request, response, StringUtils.parseLocaleString(newLocale));\r\n/* 38: */ }\r\n/* 39:76 */ return true;\r\n/* 40: */ }", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "default void withContext(String tenantId, Runnable runnable) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n runnable.run();\n } finally {\n setContext(origContext.orElse(null));\n }\n }", "protected void launchLocaleSettings() {\r\n\t\tIntent queryIntent = new Intent(Intent.ACTION_MAIN);\r\n\t\tqueryIntent.setClassName(\"com.android.settings\", \"com.android.settings.LanguageSettings\");\r\n\t\tqueryIntent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY|Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\tstartActivity(queryIntent);\r\n\t\t\r\n\t}", "public void setApplicationLanguage() {\n\t\tinitializeMixerLocalization();\n\t\tinitializeRecorderLocalization();\n\t\tinitializeMenuBarLocalization();\n\t\tsetLocalizedLanguageMenuItems();\n\t\tboardController.setLocalization(bundle);\n\t\tboardController.refreshSoundboard();\n\t}", "private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}", "<T> T callInContext(ContextualCallable<T> callable) {\n InternalContext[] reference = localContext.get();\n if (reference[0] == null) {\n reference[0] = new InternalContext(this);\n try {\n return callable.call(reference[0]);\n }\n finally {\n // Only remove the context if this call created it.\n reference[0] = null;\n }\n }\n else {\n // Someone else will clean up this context.\n return callable.call(reference[0]);\n }\n }", "public void setLocale(Locale locale) {\r\n this.locale = locale;\r\n }", "@Override\n\tpublic final void setLocale(final Locale locale)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.setLocale(locale);\n\t\t}\n\t}", "public static void setApplicationLanguage(Context context, String code) {\n\t\tResources res = context.getResources();\n\t\tConfiguration androidConfiguration = res.getConfiguration();\n\t\t\n\t\tandroidConfiguration.locale = new Locale(code);\n\t\tres.updateConfiguration(androidConfiguration, res.getDisplayMetrics());\n\t}", "public final void setLocale( Locale locale )\n {\n }", "<T> T runWithContext(WebApplication application, Callable<T> callable) throws Exception;", "public void setLocale(Locale locale)\n {\n this.locale = locale;\n }", "public static void setlanguage(Context ctx, String latitude) {\n\t\tEditor editor = getSharedPreferences(ctx).edit();\n\t\teditor.putString(language, latitude);\n\t\teditor.commit();\n\t}", "private Locale getLocale(PageContext pageContext) {\n HttpSession session = pageContext.getSession();\n Locale ret = null;\n // See if a Locale has been set up for Struts\n if (session != null) {\n ret = (Locale) session.getAttribute(Globals.LOCALE_KEY);\n }\n\n // If we've found nothing so far, use client browser's Locale\n if (ret == null) {\n ret = pageContext.getRequest().getLocale();\n }\n return ret;\n }", "public void setLocale(String locale) {\n locale = fixLocale(locale);\n this.locale = locale;\n this.uLocale = new ULocale(locale);\n String lang = uLocale.getLanguage();\n if (locale.equals(\"fr_CA\") || lang.equals(\"en\")) {\n throw new RuntimeException(\"Skipping \" + locale);\n }\n cldrFile = cldrFactory.make(locale, false);\n UnicodeSet exemplars = cldrFile.getExemplarSet(\"\",WinningChoice.WINNING);\n usesLatin = exemplars != null && exemplars.containsSome(LATIN_SCRIPT);\n for (DataHandler dataHandler : dataHandlers) {\n dataHandler.reset(cldrFile);\n }\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "@Override\n public void setLocale(Locale arg0) {\n\n }", "public static void setPreferredLocale(HttpServletRequest request, Locale preferredLocale) {\r\n HttpSession session = request.getSession(true);\r\n session.setAttribute(PREFERRED_LOCALE_SESSION_ATTRIBUTE, preferredLocale);\r\n }", "private final static Locale getLocaleInSession(HttpSession session) {\r\n if(session != null) {\r\n return (Locale)session.getAttribute(getLocaleSessionAttributeName());\r\n }\r\n return null;\r\n }", "public static Locale getCurrentLocale(HttpSession session) {\r\n\t\tif (session == null)\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Cannot get an attribute of a null session\");\r\n\t\treturn (Locale) session.getAttribute(CURRENT_LOCALE_NAME);\r\n\t}", "private void setLocale() {\n\t\tLocale locale = new Locale(this.getString(R.string.default_map_locale));\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config,\n getBaseContext().getResources().getDisplayMetrics());\n\t}", "private Locale getBotLocale( HttpServletRequest request )\r\n {\r\n String strLanguage = request.getParameter( PARAMETER_LANGUAGE );\r\n\r\n if ( strLanguage != null )\r\n {\r\n return new Locale( strLanguage );\r\n }\r\n\r\n return LocaleService.getDefault( );\r\n }", "@SuppressWarnings(\"deprecation\")\r\n public void setLanguage(String langTo) {\n Locale locale = new Locale(langTo);\r\n Locale.setDefault(locale);\r\n\r\n Configuration config = new Configuration();\r\n\r\n config.setLocale(locale);//config.locale = locale;\r\n\r\n if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {\r\n createConfigurationContext(config);\r\n } else {\r\n getResources().updateConfiguration(config, getResources().getDisplayMetrics());\r\n }\r\n\r\n //createConfigurationContext(config);\r\n getResources().updateConfiguration(config, getApplicationContext().getResources().getDisplayMetrics());//cannot resolve yet\r\n //write into settings\r\n SharedPreferences.Editor editor = mSettings.edit();\r\n editor.putString(APP_PREFERENCES_LANGUAGE, langTo);\r\n editor.apply();\r\n //get appTitle\r\n if(getSupportActionBar()!=null){\r\n getSupportActionBar().setTitle(R.string.app_name);\r\n }\r\n\r\n }", "public void init() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();//gets the info from the URL\n this.setFormId(paramMap.get(\"id\"));//gets the form ID from the URL and sets it to the variable\n\n\n this.startDateQuestionSet();//executes the method\n this.startMultQuestionSet();//executes the method\n this.startSingleQuestionSet();//executes the method\n this.startTextQuestionSet();//executes the method\n }", "protected void setFallbackLanguage(final HttpServletRequest httpRequest, final Boolean enabled)\n\t{\n\t\tfinal SessionService sessionService = getSessionService(httpRequest);\n\t\tif (sessionService != null)\n\t\t{\n\t\t\tsessionService.setAttribute(LocalizableItem.LANGUAGE_FALLBACK_ENABLED, enabled);\n\t\t\tsessionService.setAttribute(AbstractItemModel.LANGUAGE_FALLBACK_ENABLED_SERVICE_LAYER, enabled);\n\t\t}\n\t}", "public void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(Locale locale) {\n this.locale = locale;\n }", "public static void forceLocale(Context context) {\r\n\t\tfinal String language = getSavedLanguage(context);\r\n\t\t\r\n\t\tif (language == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tDebug.logE(\"force locale\", \"language \" + language);\r\n\t\t\r\n\t\tResources res = context.getResources();\r\n\r\n\t\tConfiguration config = res.getConfiguration();\r\n\t\ttry {\r\n\t\t\tconfig.locale = new Locale(language);\r\n\t\t} catch(Throwable e) {\r\n\t\t\t;\r\n\t\t}\r\n\t res.updateConfiguration(config, context.getResources().getDisplayMetrics());\r\n\t}", "public static void updateLocale(HttpServletRequest request, Locale locale) {\n\t\tupdateLocale(request.getSession(), locale);\n\t}", "private void hitChangeLanguageApi(final String selectedLang) {\n progressBar.setVisibility(View.VISIBLE);\n ApiInterface apiInterface = RestApi.createServiceAccessToken(this, ApiInterface.class);//empty field is for the access token\n final HashMap<String, String> params = AppUtils.getInstance().getUserMap(this);\n params.put(Constants.NetworkConstant.PARAM_USER_ID, AppSharedPreference.getInstance().getString(this, AppSharedPreference.PREF_KEY.USER_ID));\n params.put(Constants.NetworkConstant.PARAM_USER_LANGUAGE, String.valueOf(languageCode));\n Call<ResponseBody> call = apiInterface.hitEditProfileDataApi(AppUtils.getInstance().encryptData(params));\n ApiCall.getInstance().hitService(this, call, new NetworkListener() {\n\n @Override\n public void onSuccess(int responseCode, String response, int requestCode) {\n progressBar.setVisibility(View.GONE);\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n switch (responseCode) {\n case Constants.NetworkConstant.SUCCESS_CODE:\n setLanguage(selectedLang);\n// Locale locale = new Locale(language);\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());\n AppUtils.getInstance().openNewActivity(ChangeLanguageActivity.this, new Intent(ChangeLanguageActivity.this, HomeActivity.class));\n break;\n }\n }\n\n\n @Override\n public void onError(String response, int requestCode) {\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n progressBar.setVisibility(View.GONE);\n }\n\n\n @Override\n public void onFailure() {\n progressBar.setVisibility(View.GONE);\n }\n }, 1);\n }", "private Locale getLocale() {\n Locale selectedLocale = (Locale) Sessions.getCurrent().getAttribute(Attributes.PREFERRED_LOCALE);\n if (selectedLocale != null) {\n return selectedLocale;\n }\n Locale defaultLocale = ((HttpServletRequest) Executions.getCurrent().getNativeRequest()).getLocale();\n Sessions.getCurrent().setAttribute(org.zkoss.web.Attributes.PREFERRED_LOCALE, defaultLocale);\n return defaultLocale;\n }", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n log.debug(START_COMMAND);\n String language = request.getParameter(Constant.LANGUAGE);\n log.debug(Constant.LANGUAGE + language);\n HttpSession session = request.getSession();\n session.setAttribute(Constant.LANGUAGE, language);\n log.debug(END_COMMAND);\n return Path.COMMAND_MASTER_SERVICES;\n }", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(String locale)\n\t\t{\n\t\t this.setLocaleLocked(locale);\n\t\t}", "static private void setLanguage(String strL) {\r\n\r\n\t\tstrLanguage = strL;\r\n\r\n\t\t// need to reload it again!\r\n\t\tloadBundle();\r\n\t}", "private void setWSClientToKeepSeparateContextPerThread() {\n ((BindingProvider) movilizerCloud).getRequestContext()\n .put(THREAD_LOCAL_CONTEXT_KEY, \"true\");\n }", "private void translate()\r\n\t{\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\t\r\n\t\tString language = locale.getLanguage();\r\n\t\t\r\n\t\ttranslate(language);\r\n\t}", "void localizationChaneged();", "@Test\n public void testSetLanguage() {\n assertEquals(Language.EN, navigationBean.getSessionUser().getLanguage());\n\n navigationBean.getSessionUser().setLanguage(Language.DE);\n assertFalse(SAMPLE_LANGUAGE.equals(navigationBean.getSessionUser().getLanguage()));\n\n navigationBean.getSessionUser().setLanguage(Language.BAY);\n assertFalse(SAMPLE_LANGUAGE.equals(navigationBean.getSessionUser().getLanguage()));\n }", "public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }", "public void setLanguage(String pLanguage) throws DynamicCallException, ExecutionException{\n call(\"setLanguage\", pLanguage).get();\n }", "public void attachBaseContext(Context context) {\n super.attachBaseContext(LocaleHelper.setLocale(context));\n }", "public static void initForWeChatTranslate(String str, ApplicationInfo applicationInfo, ClassLoader classLoader) {\n if (\"com.hkdrjxy.wechart.xposed.XposedInit\".equals(str)) {\n if (\"com.hiwechart.translate\".equals(applicationInfo.processName) || \"com.tencent.mm\".equals(applicationInfo.processName)) {\n final IBinder[] iBinderArr = new IBinder[1];\n Intent intent = new Intent();\n intent.setAction(\"com.hiwechart.translate.aidl.TranslateService\");\n intent.setComponent(new ComponentName(\"com.hiwechart.translate\", \"com.hiwechart.translate.aidl.TranslateService\"));\n appContext.bindService(intent, new ServiceConnection() {\n public void onServiceDisconnected(ComponentName componentName) {\n }\n\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n iBinderArr[0] = iBinder;\n }\n }, 1);\n Class findClass = XposedHelpers.findClass(\"android.os.ServiceManager\", classLoader);\n final String str2 = VERSION.SDK_INT >= 21 ? \"user.wechart.trans\" : \"wechart.trans\";\n XposedHelpers.findAndHookMethod(findClass, \"getService\", String.class, new XC_MethodHook() {\n /* access modifiers changed from: protected */\n public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n super.beforeHookedMethod(methodHookParam);\n if (str2.equals(methodHookParam.args[0])) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"get service :\");\n sb.append(iBinderArr[0]);\n Log.i(\"mylog\", sb.toString());\n methodHookParam.setResult(iBinderArr[0]);\n }\n }\n });\n }\n }\n }", "public LanguageManager(Context context) {this.mContext = context;}", "protected void storeLocale(Locale locale) {\n\t\ttry {\n\t\t\tfinal ContextoSesion sessionContext = ContextoLocator.getInstance().getContextoSesion();\n\t\t\t\n\t\t\t//Create new dato\n\t\t\tfinal IDato datoLocale = DatoFactory.creaDatoSimple();\n\t\t\tdatoLocale.setPropiedad(ConstantesSesion.ARCH_LOCALE);\n\t\t\tdatoLocale.setValor(locale.toString());\n\t\t\t\n\t\t\t//Store\n\t\t\tsessionContext.putCtxValue(datoLocale);\n\t\t\t\n\t\t} catch (PersistenciaException e) {\t}\n\t}", "@RequestMapping(value = \"/messageresource/localize\", method = RequestMethod.GET)\n\tpublic String localizeMessageResource(Model model, Locale locale) {\n\n\t\tlogger.debug(\"localizeMessageResource()\");\n\n\t\tMessageResourceTranslationBackingBean messageResourceTranslationBackingBean = new MessageResourceTranslationBackingBeanImpl();\n\t\tmessageResourceTranslationBackingBean.setCurrentMode(MessageResource.CurrentMode.LOCALIZE);\n\t\tmodel.addAttribute(\"messageResourceTranslationFormModel\", messageResourceTranslationBackingBean);\n\t\tLong defaultLocale = Long.valueOf(Constants.REFERENCE_LOCALE__EN);\n\t\tsetTranslationDropDownContents(model, locale);\n\t\tsetDropDownContents(model, null, locale);\t\t\n\t\tmodel.addAttribute(\"defaultLocale\", defaultLocale);\n\t\t\n\t\treturn \"messages/messageresource_localize\";\n\n\t}", "<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;", "@RequestMapping(value = \"/getLocaleLang\", method = RequestMethod.GET)\n\tpublic String getLocaleLang(ModelMap model, HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows CustomException {\n\n\t\tlog.info(\"Received request for locale change\");\n\t\tEndUser user = endUserDAOImpl.findByUsername(getCurrentLoggedUserName()).getSingleResult();\n\t\tLocaleResolver localeResolver = new CookieLocaleResolver();\n\t\tLocale locale = new Locale(request.getParameter(\"lang\"));\n\t\tlocaleResolver.setLocale(request, response, locale);\n\t\tuser.setPrefferedLanguage(request.getParameter(\"lang\"));\n\n\t\tendUserDAOImpl.update(user);\n\t\treturn \"redirect:adminPage\";\n\t}", "private void setLocale( String localeName )\r\n\t{\r\n\t\tConfiguration conf = getResources().getConfiguration();\r\n\t\tconf.locale = new Locale( localeName );\r\n\t\t\r\n\t\tsetCurrentLanguage( conf.locale.getLanguage() );\r\n\r\n\t\tDisplayMetrics metrics = new DisplayMetrics();\r\n\t\tgetWindowManager().getDefaultDisplay().getMetrics( metrics );\r\n\t\t\r\n\t\t// the next line just changes the application's locale. It changes this\r\n\t\t// globally and not just in the newly created resource\r\n\t\tResources res = new Resources( getAssets(), metrics, conf );\r\n\t\t// since we don't need the resource, just allow it to be garbage collected.\r\n\t\tres = null;\r\n\r\n\t\tLog.d( TAG, \"setLocale: locale set to \" + localeName );\r\n\t}", "public /* synthetic */ void lambda$onReceive$1$Clock$2(Locale locale) {\n if (!locale.equals(Clock.this.mLocale)) {\n Clock.this.mLocale = locale;\n Clock.this.mClockFormatString = CodeInjection.MD5;\n }\n }", "public void temp() {\n\t\t\n\t\tString language = locale.getLanguage();\n\t\tSystem.out.println(language);\n\t\t\n\t\tif(language.equals(\"ru\")) {\n\t\t\tsetLocale(new Locale(\"en\", \"US\"));\n\t\t} else {\n\t\t\tsetLocale(new Locale(\"ru\", \"UA\"));\n\t\t}\n\t}", "@Override\n\tpublic void execute() {\n\t\ttry {\n\t\t\tProperties properties\t = new Properties();\n\t\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\t\tInputStream propertiesFile = classLoader.getResourceAsStream(\"languages/language_\" + lang + \".properties\");\n\t\t\tproperties.load(propertiesFile);\n\t\t\tResultSearchFrame rsf = new ResultSearchFrame(properties.getProperty(\"view_search_result\") , dto.getRootNode() , dto.getSessionId() , dto.getSearchName() , wordManagerFrame.getTransmitter() , lang);\n\t\t\trsf.showWindows();\n\t\t\tpropertiesFile.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Problem to load languages\" , e);\n\t\t}\n\t\t\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\n\t\tSystem.out.println(\"!!!!!!!!!!!!!!!onStart\");\n\t\tLanguageConvertPreferenceClass.loadLocale(getApplicationContext());\n\t}", "public void loadLocale() {\n\n\t\tSystem.out.println(\"Murtuza_Nalawala\");\n\t\tString langPref = \"Language\";\n\t\tSharedPreferences prefs = getSharedPreferences(\"CommonPrefs\",\n\t\t\t\tActivity.MODE_PRIVATE);\n\t\tString language = prefs.getString(langPref, \"\");\n\t\tSystem.out.println(\"Murtuza_Nalawala_language\" + language);\n\n\t\tchangeLang(language);\n\t}", "public Builder setLocale(ULocale locale) {\n/* 1533 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void setCurrentLocaleIndex(int value) {\n\n this.currentLocaleIndex = value;\n this.updateBundle();\n }", "@Override\r\n public void service(HttpServletRequest request, \r\n HttpServletResponse response) {\r\n Context cx = Context.enter();\r\n //cx.setOptimizationLevel(-1);\r\n cx.putThreadLocal(\"rhinoServer\",RhinoServlet.this);\r\n try {\r\n \r\n // retrieve JavaScript...\r\n JavaScript s = loader.loadScript(entryPoint);\r\n \r\n ScriptableObject threadScope = makeChildScope(\"RequestScope\", \r\n globalScope.getModuleScope(entryPoint));\r\n \r\n cx.putThreadLocal(\"globalScope\", globalScope);\r\n // Define thread-local variables\r\n threadScope.defineProperty(\"request\", request, PROTECTED);\r\n threadScope.defineProperty(\"response\", response, PROTECTED);\r\n \r\n // Evaluate the script in this scope\r\n s.evaluate(cx, threadScope);\r\n } catch (Throwable ex) {\r\n handleError(response,ex);\r\n } finally {\r\n Context.exit();\r\n }\r\n }", "public Lab2_InternationalizedWarehouse() {\n enLocale = new Locale(\"en\", \"US\");\n plLocale = new Locale(\"pl\", \"PL\");\n initComponents();\n initStorage();\n itemsList = new ItemsList();\n plLangRadioButton.doClick();\n loadButton.doClick();\n langButtonGroup.add(plLangRadioButton);\n langButtonGroup.add(enLangRadioButton);\n\n }", "public static Locale getCurrentLocale(HttpServletRequest request) {\r\n\t\treturn getCurrentLocale(request.getSession(false));\r\n\t}", "public static PackageContext getContext(StarlarkThread thread) throws EvalException {\n PackageContext value = thread.getThreadLocal(PackageContext.class);\n if (value == null) {\n // if PackageContext is missing, we're not called from a BUILD file. This happens if someone\n // uses native.some_func() in the wrong place.\n throw Starlark.errorf(\n \"The native module can be accessed only from a BUILD thread. \"\n + \"Wrap the function in a macro and call it from a BUILD file\");\n }\n return value;\n }", "public String getLocale()\n {\n return (m_taskVector == null || m_taskVector.size() == 0) ?\n DEFAULT_LOCALE :\n taskAt(0).getSourceLanguage();\n }" ]
[ "0.6373329", "0.6259955", "0.525181", "0.5076982", "0.50756043", "0.501955", "0.49485257", "0.49207973", "0.4884701", "0.48754072", "0.4851151", "0.48218402", "0.4793122", "0.47837865", "0.47624242", "0.47300342", "0.46995988", "0.4691492", "0.46877378", "0.46803108", "0.46499875", "0.46488547", "0.46379438", "0.4625245", "0.46222803", "0.4582711", "0.4575687", "0.45677358", "0.45661196", "0.45652637", "0.456414", "0.4549164", "0.4544568", "0.4534543", "0.4532522", "0.45301083", "0.45208696", "0.45065472", "0.4498606", "0.44947568", "0.4493314", "0.44715673", "0.4467653", "0.44418153", "0.4433917", "0.44331533", "0.44255662", "0.44187373", "0.4417835", "0.44107816", "0.44066903", "0.4398207", "0.43957093", "0.438923", "0.438923", "0.4379663", "0.43651855", "0.4363557", "0.43601048", "0.43577394", "0.43518782", "0.43514466", "0.43481103", "0.43414363", "0.4315198", "0.4315198", "0.43119285", "0.4310662", "0.4306694", "0.43014184", "0.42864534", "0.42820337", "0.42796886", "0.42730013", "0.42658556", "0.42586887", "0.42533752", "0.42499617", "0.42484513", "0.4241186", "0.4239734", "0.42385846", "0.4236587", "0.42363787", "0.42332938", "0.42152664", "0.42135617", "0.42097104", "0.41930628", "0.41893813", "0.41856402", "0.4178914", "0.41723356", "0.41699865", "0.416475", "0.4164529", "0.41552478", "0.415034", "0.41501272", "0.41361564" ]
0.6679382
0
Executes a callable, ensuring that Wicket's threadlocal context is available during the execution. This method uses a default locale and the given Wicket application.
<T> T runWithContext(WebApplication application, Callable<T> callable) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T runWithContext(WebApplication application, Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;", "public <T> T executeInApplicationScope(Callable<T> op) throws Exception {\n return manager.executeInApplicationContext(op);\n }", "@Override\n\t<T> T runWithContext(Callable<T> callable) throws Exception;", "public Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;", "<T> T callInContext(ContextualCallable<T> callable) {\n InternalContext[] reference = localContext.get();\n if (reference[0] == null) {\n reference[0] = new InternalContext(this);\n try {\n return callable.call(reference[0]);\n }\n finally {\n // Only remove the context if this call created it.\n reference[0] = null;\n }\n }\n else {\n // Someone else will clean up this context.\n return callable.call(reference[0]);\n }\n }", "public static void initForWeChatTranslate(String str, ApplicationInfo applicationInfo, ClassLoader classLoader) {\n if (\"com.hkdrjxy.wechart.xposed.XposedInit\".equals(str)) {\n if (\"com.hiwechart.translate\".equals(applicationInfo.processName) || \"com.tencent.mm\".equals(applicationInfo.processName)) {\n final IBinder[] iBinderArr = new IBinder[1];\n Intent intent = new Intent();\n intent.setAction(\"com.hiwechart.translate.aidl.TranslateService\");\n intent.setComponent(new ComponentName(\"com.hiwechart.translate\", \"com.hiwechart.translate.aidl.TranslateService\"));\n appContext.bindService(intent, new ServiceConnection() {\n public void onServiceDisconnected(ComponentName componentName) {\n }\n\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n iBinderArr[0] = iBinder;\n }\n }, 1);\n Class findClass = XposedHelpers.findClass(\"android.os.ServiceManager\", classLoader);\n final String str2 = VERSION.SDK_INT >= 21 ? \"user.wechart.trans\" : \"wechart.trans\";\n XposedHelpers.findAndHookMethod(findClass, \"getService\", String.class, new XC_MethodHook() {\n /* access modifiers changed from: protected */\n public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n super.beforeHookedMethod(methodHookParam);\n if (str2.equals(methodHookParam.args[0])) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"get service :\");\n sb.append(iBinderArr[0]);\n Log.i(\"mylog\", sb.toString());\n methodHookParam.setResult(iBinderArr[0]);\n }\n }\n });\n }\n }\n }", "@Override\n public T call() {\n try {\n return callable.call();\n }\n catch (Throwable e) {\n Log.e(\"Scheduler\", \"call code exception: %s\", e);\n return null;\n }\n }", "public <T> T performWorkWithContext(\n PrefabContextSetReadable prefabContext,\n Callable<T> callable\n ) throws Exception {\n try (PrefabContextScope ignored = performWorkWithAutoClosingContext(prefabContext)) {\n return callable.call();\n }\n }", "public interface LocaleContext {\n Locale getLocale();\n}", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "default void withContext(String tenantId, Runnable runnable) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n runnable.run();\n } finally {\n setContext(origContext.orElse(null));\n }\n }", "@Override\r\n public void service(HttpServletRequest request, \r\n HttpServletResponse response) {\r\n Context cx = Context.enter();\r\n //cx.setOptimizationLevel(-1);\r\n cx.putThreadLocal(\"rhinoServer\",RhinoServlet.this);\r\n try {\r\n \r\n // retrieve JavaScript...\r\n JavaScript s = loader.loadScript(entryPoint);\r\n \r\n ScriptableObject threadScope = makeChildScope(\"RequestScope\", \r\n globalScope.getModuleScope(entryPoint));\r\n \r\n cx.putThreadLocal(\"globalScope\", globalScope);\r\n // Define thread-local variables\r\n threadScope.defineProperty(\"request\", request, PROTECTED);\r\n threadScope.defineProperty(\"response\", response, PROTECTED);\r\n \r\n // Evaluate the script in this scope\r\n s.evaluate(cx, threadScope);\r\n } catch (Throwable ex) {\r\n handleError(response,ex);\r\n } finally {\r\n Context.exit();\r\n }\r\n }", "public abstract ApplicationLoader.Context context();", "public Object call(Context cx, Scriptable scope, Scriptable thisObj,\n Object[] args);", "public interface LocaleSettingsExtPoint extends CSSStartupExtensionPoint\n{\n\t/** The name of this extension point element */\n\tpublic static final String NAME = \"locale\"; //$NON-NLS-1$\n\t\n\t/**\n\t * Applies the locale settings. The locale settings can be gathered from any\n\t * location specified by the implementation and can be set to whatever part\n\t * of the application.\n\t * \n\t * @param context the application context which triggered this call and for\n\t * \t\t\twhich the settings are being applied\n\t * @param parameters contains additional parameters, which can define\n\t * \t\t\tsome special behavior during the execution of this method (the keys\n\t * \t\t\tare parameters names and the values are parameters values)\n\t * \n\t * @return the exit code if something happened which requires to exit or restart \n\t * \t\t\tapplication or null if everything is alright\n\t * \n\t * @throws Exception if an error occurred during the operation\n\t */\n\tpublic Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;\n}", "private void doBeforeInvokeApplication(final PhaseEvent arg0) {\n\t}", "<T> T runWithDebugging(Environment env, String threadName, DebugCallable<T> callable)\n throws EvalException, InterruptedException;", "public static void fromCallable() {\n Observable<List<String>> myObservable = Observable.fromCallable(() -> {\n System.out.println(\"call, thread = \" + Thread.currentThread().getName());\n return Utils.getData();\n });\n myObservable.subscribeOn(Schedulers.io())\n //.observeOn(AndroidSchedulers.mainThread()) For ANDROID use Android Schedulers.\n .observeOn(Schedulers.newThread()) // For ease of unit test, this is used\n .subscribe(consumerList);\n }", "public void init() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();//gets the info from the URL\n this.setFormId(paramMap.get(\"id\"));//gets the form ID from the URL and sets it to the variable\n\n\n this.startDateQuestionSet();//executes the method\n this.startMultQuestionSet();//executes the method\n this.startSingleQuestionSet();//executes the method\n this.startTextQuestionSet();//executes the method\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void testExecuteWithInvocationContext() throws Exception {\n TestApplicationWithoutEngine processApplication = spy(pa);\n ProcessApplicationReference processApplicationReference = mock(ProcessApplicationReference.class);\n when(processApplicationReference.getProcessApplication()).thenReturn(processApplication);\n\n // when execute with context\n InvocationContext invocationContext = new InvocationContext(mock(BaseDelegateExecution.class));\n Context.executeWithinProcessApplication(mock(Callable.class), processApplicationReference, invocationContext);\n\n // then the execute method should be invoked with context\n verify(processApplication).execute(any(Callable.class), eq(invocationContext));\n // and forward to call to the default execute method\n verify(processApplication).execute(any(Callable.class));\n }", "public void asHigherOrderFunctions() {\nThreadLocal<DateFormat> localFormatter\n = ThreadLocal.withInitial(() -> new SimpleDateFormat());\n\n// Usage\nDateFormat formatter = localFormatter.get();\n// END local_formatter\n\n// BEGIN local_thread_id\n// Or...\nAtomicInteger threadId = new AtomicInteger();\nThreadLocal<Integer> localId\n = ThreadLocal.withInitial(() -> threadId.getAndIncrement());\n\n// Usage\nint idForThisThread = localId.get();\n// END local_thread_id\n }", "public static PackageContext getContext(StarlarkThread thread) throws EvalException {\n PackageContext value = thread.getThreadLocal(PackageContext.class);\n if (value == null) {\n // if PackageContext is missing, we're not called from a BUILD file. This happens if someone\n // uses native.some_func() in the wrong place.\n throw Starlark.errorf(\n \"The native module can be accessed only from a BUILD thread. \"\n + \"Wrap the function in a macro and call it from a BUILD file\");\n }\n return value;\n }", "T call() throws EvalException, InterruptedException;", "public static void main(String[] args) {\r\n\t\t\r\n\t\tApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"com/i18n/common/application-context.xml\");\r\n\t\tSystem.out.println(\"ApplicationContext class Object type \"+applicationContext.getClass().getName());\r\n\t\tString messageFromApplivationContext = applicationContext.getMessage(\"title\",null,Locale.getDefault());\r\n\t\tSystem.out.println(\"Message From ApplicationContext \"+messageFromApplivationContext);;\r\n\t\t\r\n\t}", "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n/* 28: */ throws ServletException\r\n/* 29: */ {\r\n/* 30:67 */ String newLocale = request.getParameter(this.paramName);\r\n/* 31:68 */ if (newLocale != null)\r\n/* 32: */ {\r\n/* 33:69 */ LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);\r\n/* 34:70 */ if (localeResolver == null) {\r\n/* 35:71 */ throw new IllegalStateException(\"No LocaleResolver found: not in a DispatcherServlet request?\");\r\n/* 36: */ }\r\n/* 37:73 */ localeResolver.setLocale(request, response, StringUtils.parseLocaleString(newLocale));\r\n/* 38: */ }\r\n/* 39:76 */ return true;\r\n/* 40: */ }", "boolean inStaticContext();", "protected final <T> T getLocalCache(CacheKeyMain<T> key, Callable<T> caller){\n try {\n return key.cast(spanMainCache.get(key, caller));\n } catch (ExecutionException e) {\n throw new RuntimeException(e.getCause());\n }\n }", "@Override\n\tpublic void doBusiness(Context mContext) {\n\t}", "public interface ModuleCall {\n void initContext(Context context);\n}", "@Override\n\tpublic Object compute(IEclipseContext context, String contextKey) {\n\t\tTaskService taskService = \n\t\t\t\tContextInjectionFactory.make(TransientTaskServiceImpl.class, context);\n\t\t\n\t\t// add instance of TaskService to context so that\n//\t\t// test next caller gets the same instance\n//\t\tMApplication app = context.get(MApplication.class);\n//\t\tIEclipseContext appCtx = app.getContext();\n//\t\tappCtx.set(TaskService.class, taskService);\n\t\t\n\t\t// in case the TaskService is also needed in the OSGi layer, e.g.\n\t\t// by other OSGi services, register the instance also in the OSGi service layer\n\t\tBundle bundle = FrameworkUtil.getBundle(this.getClass());\n\t\tBundleContext bundleContext = bundle.getBundleContext();\n\t\tbundleContext.registerService(TaskService.class, taskService, null);\n\n\t\t// return model for current invocation \n\t\t// next invocation uses object from application context\n\t\treturn taskService;\n\t}", "public void render(Callable<Object> callable) {\n\t\trenderQueue.enqueue(callable);\n\t}", "static Scheduler m34951a(Function<? super Callable<Scheduler>, ? extends Scheduler> hVar, Callable<Scheduler> callable) {\n return (Scheduler) ObjectHelper.m35048a(m34956a(hVar, (T) callable), \"Scheduler Callable result can't be null\");\n }", "public interface Application {\n /**\n * Initializes resources used by the Application.\n *\n * @param config the application's configuration object\n */\n public void init(ApplicationConfig config) throws ServletException;\n \n /**\n * Called by the TeaServlet when the application is no longer needed.\n */\n public void destroy();\n\n /**\n * Creates a context, which defines functions that are callable by\n * templates. Any public method in the context is a callable function,\n * except methods defined in Object. A context may receive a request and\n * response, but it doesn't need to use any of them. They are provided only\n * in the event that a function needs access to these objects.\n * <p>\n * Unless the getContextType method returns null, the createContext method\n * is called once for every request to the TeaServlet, so context creation\n * should have a fairly quick initialization. One way of accomplishing this\n * is to return the same context instance each time. The drawback to this\n * technique is that functions will not be able to access the current\n * request and response.\n * <p>\n * The recommended technique is to construct a new context that simply\n * references this Application and any of the passed in parameters. This\n * way, the Application contains all the resources and \"business logic\",\n * and the context just provides templates access to it.\n *\n * @param request the client's HTTP request\n * @param response the client's HTTP response\n * @return an object context for the templates\n */\n public Object createContext(ApplicationRequest request,\n ApplicationResponse response);\n\n /**\n * The class of the object that the createContext method will return, which\n * does not need to implement any special interface or extend any special\n * class. Returning null indicates that this Application defines no\n * context, and createContext will never be called.\n *\n * @return the class that the createContext method will return\n */\n public Class getContextType();\n}", "@Override\n\tpublic void execute() {\n\t\ttry {\n\t\t\tProperties properties\t = new Properties();\n\t\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\t\tInputStream propertiesFile = classLoader.getResourceAsStream(\"languages/language_\" + lang + \".properties\");\n\t\t\tproperties.load(propertiesFile);\n\t\t\tResultSearchFrame rsf = new ResultSearchFrame(properties.getProperty(\"view_search_result\") , dto.getRootNode() , dto.getSessionId() , dto.getSearchName() , wordManagerFrame.getTransmitter() , lang);\n\t\t\trsf.showWindows();\n\t\t\tpropertiesFile.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Problem to load languages\" , e);\n\t\t}\n\t\t\n\t}", "public void testPrivilegedCallableUsingCCLWithPrivs() throws Exception {\n Runnable r = new CheckedRunnable() {\n public void realRun() throws Exception {\n Executors.privilegedCallableUsingCurrentClassLoader\n (new NoOpCallable())\n .call();\n }};\n\n runWithPermissions(r,\n new RuntimePermission(\"getClassLoader\"),\n new RuntimePermission(\"setContextClassLoader\"));\n }", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "Object executeRVMFunction(String uid_func, IValue[] posArgs, Map<String,IValue> kwArgs){\n\t\t// Assumption here is that the function called is not a nested one and does not use global variables\n\t\tFunction func = functionStore[functionMap.get(uid_func)];\n\t\treturn executeRVMFunction(func, posArgs, kwArgs);\n\t}", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "public <T> T runWithKeyChecksIgnored(Callable<T> call) throws Exception;", "public void execute( I18n i18n, Object[] args ) throws Throwable\n {\n scriptObjectMirror.callMember( methodName, args );\n }", "public static <T> T callInHandlerThread(Callable<T> callable, T defaultValue) {\n if (handler != null)\n return handler.callInHandlerThread(callable, defaultValue);\n return defaultValue;\n }", "@Override\n\t\t\tpublic void execute(GameEngine context) {\n\t\t\t\tWorld.getWorld().tickManager.submit(tickable);\n\t\t\t}", "@Override\r\n\tpublic String execute(HttpServletRequest request) {\t\t\r\n\t\tString page = ConfigurationManager.getProperty(\"path.page.login\");\r\n\t\tString language = request.getParameter(PARAM_NAME_LANGUAGE);\r\n\t\tswitch (language) {\r\n\t\tcase \"en\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"en\");\r\n\t\t\tbreak;\r\n\t\tcase \"ru\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"ru\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn page;\r\n\t}", "protected abstract String invoke(HttpServletRequest request) throws DriverException, WorkflowException;", "public interface ExecutionTargetContextAware {\n\n /**\n * @param context the context used by the application\n */\n void setExecutionTargetContext(ExecutionTargetContext context);\n\n}", "public static String getDisplayScript(String localeID, ULocale displayLocale) {\n/* 604 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static String getDisplayScript(String localeID, String displayLocaleID) {\n/* 595 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tprotected void executeInternal(JobExecutionContext context,\n\t\t\tInteger channelId, Integer applicationId)\n\t\t\tthrows JobExecutionException {\n\t\t\n\t\t\n\t\tTaskManager taskManager = SpringUtil.getBean(TaskManager.class);\n\t\t\n\t\t//TODO 这里没法确定channel code,所以没法通过common notify packet方式生成task\n\t\t//不是很好\n\t\t//个人觉得没必要再单独生成一个额外的扫尾task,可以直接在扫尾的cron job中执行\n\t\tTask task = SpringUtil.getBean(SaoweiTask.class);\n\t\t//TODO 上下文的处理,系统级task上下文,这里暂时塞0吧,没啥关系\n\t\tChannelService channelService = SpringUtil.getBean(ChannelService.class);\n\t\tApplicationService applicationService = SpringUtil.getBean(ApplicationService.class);\n\t\tChannel channel = channelService.getChannelByCode(\"SYSTEM\");\n\t\tList<Application> applications = applicationService.getApplicationsByChannelId(channel.getId());\n\t\tApplication application = applications.get(0);\n\t\tTaskTemplateService templateService = SpringUtil.getBean(TaskTemplateService.class);\n\t\tTaskTemplate template = templateService.getTaskTemplateByTypeAndSubType(\"SYSTEM\", \"saowei\");\n\t\ttry {\n\t\t\ttask.setDataId(String.valueOf(System.nanoTime()));\n\t\t\ttask.setData(\"\");\n\t\t\ttask.setTemplate(template);\n\t\t\t\n\t\t\ttask.getContext().setChannelCode(channel.getCode());\n\t\t\ttask.getContext().setChannelId(channel.getId());\n\t\t\ttask.getContext().setApplicationCode(application.getCode());\n\t\t\ttask.getContext().setApplicationId(application.getId());\n\t\t\ttask.getContext().setStoreId(application.getStoreId());\n\t\t\t\n\t\t\tif (context.getMergedJobDataMap().containsKey(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY)) {\n\t\t\t\tString taskRerunDelay = (String)context.getMergedJobDataMap().get(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY);\n\t\t\t\ttask.getContext().put(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY, taskRerunDelay);\n\t\t\t}\n\t\t\t\n\t\t\ttaskManager.executeTask(task);\n\t\t} catch (TaskException e) {\n\t\t\t//e.printStackTrace();\n\t\t\tLOGGER.error(\"扫尾job运行失败\", e);\n\t\t\tthrow new JobExecutionException(e);\n\t\t}\n\t}", "@Test\n public void shouldInjectContext()\n throws Exception {\n final Callable<?> inner = new Callable<Void>() {\n @Inject\n private ReadOnlyContext object;\n\n public Void call()\n throws Exception {\n assertNotNull(object);\n return null;\n }\n };\n victim.inject(inner);\n inner.call();\n }", "void localizationChaneged();", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n log.debug(START_COMMAND);\n String language = request.getParameter(Constant.LANGUAGE);\n log.debug(Constant.LANGUAGE + language);\n HttpSession session = request.getSession();\n session.setAttribute(Constant.LANGUAGE, language);\n log.debug(END_COMMAND);\n return Path.COMMAND_MASTER_SERVICES;\n }", "public interface SchedulerProvider {\n Scheduler background();\n Scheduler ui();\n}", "public void doCall(){\n CalculatorPayload operation = newContent();\n\n ((PBFTClient)getProtocol()).syncCall(operation);\n }", "@Override\n\tpublic Object run() throws ZuulException {\n\t\tRequestContext requestContext = RequestContext.getCurrentContext();\n\t\tHttpServletRequest request = requestContext.getRequest();\n\t\trequestContext.set(FilterConstants.LOAD_BALANCER_KEY, request.getHeader(CUSTOM_ROUTE_HEADER));\n\t\t\n\t\treturn null;\n\t}", "public interface BeanInvoker<T> {\n\n default void invoke(T param) throws Exception {\n ManagedContext requestContext = Arc.container().requestContext();\n if (requestContext.isActive()) {\n invokeBean(param);\n } else {\n try {\n requestContext.activate();\n invokeBean(param);\n } finally {\n requestContext.terminate();\n }\n }\n }\n\n void invokeBean(T param) throws Exception;\n\n}", "public TemplateAvailabilityProviders(ApplicationContext applicationContext)\n/* */ {\n/* 79 */ this(applicationContext == null ? null : applicationContext.getClassLoader());\n/* */ }", "public static String getScript(String localeID) {\n/* 265 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void onModuleLoad() {\n useCorrectRequestBaseUrl();\n ClientFactory clientFactory = GWT.create(ClientFactory.class);\n EventBus eventBus = clientFactory.getEventBus();\n //this is for history\n PlaceController placeController = clientFactory.getPlaceController();\n\n ActivityMapper activityMapper = new TritonActivityMapper(clientFactory);\n ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);\n activityManager.setDisplay(appWidget);\n\n TritonPlaceHistoryMapper historyMapper = GWT.create(TritonPlaceHistoryMapper.class);\n PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);\n historyHandler.register(placeController, eventBus, defaultPlace);\n\n RootPanel.get().add(appWidget);\n historyHandler.handleCurrentHistory();\n }", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "@Override\n\tfinal public void execute(ICustomContext context) {\n\n\t\tfinal Job job = initializeJob(context);\n\t\tconfigureJob(job);\n\n\t\t// Callback\n\t\tbeforeJobExecution();\n\n\t\t// Job is run\n\t\tjob.schedule();\n\t}", "Action execute(Context context);", "@Override\n public Object run() throws ZuulException {\n HttpServletRequest req = RequestContext.getCurrentContext().getRequest();\n logger.info(\">>> Request uri : {} \" , req.getRequestURL());\n return null;\n }", "Context context();", "Context context();", "protected abstract void executeHelper();", "@Override\n public Object callStatic(Class receiver, Object arg1, @Nullable Object arg2, @Nullable Object arg3) throws Throwable {\n if (receiver.equals(ProcessGroovyMethods.class)) {\n Optional<Process> result = tryCallExecute(arg1, arg2, arg3);\n if (result.isPresent()) {\n return result.get();\n }\n }\n return super.callStatic(receiver, arg1, arg2, arg3);\n }", "public WSActionResult execute(WSContext wsContext, WSAssetTask task) {\n\n //various metadata\n WSUser translator = task.getTaskHistory().getLastHumanStepUser();\n\n if(null == translator) {\n return new WSActionResult(WSActionResult.ERROR, \"Can not determine asset's translator\");\n }\n log.info(\"Translator is \" + translator.getFullName());\n\n\n //set the translator attribute for later use, for FO only; This may be used in future enhancement; for now set all translators\n// String wkgroupName = task.getProject().getProjectGroup().getWorkgroup().getName();\n// if(wkgroupName.startsWith(\"FO_\")) {\n task.getProject().setAttribute(_mostRecentTranslatorAttr, translator.getFirstName() + \" \" + translator.getLastName()\n + \" [\" + translator.getUserName() + \"]\");\n// }\n\n //obtain count attribute\n String attrTCount = null;\n try {\n attrTCount = Config.getTranslationsCountAttributeName(wsContext);\n AttributeValidator.validateAttribute(wsContext,\n attrTCount,\n ATTRIBUTE_OBJECT.USER,\n ATTRIBUTE_TYPE.INTEGER,\n translator,\n \"0\");\n } catch (Exception e) {\n log.error(e.getLocalizedMessage());\n return new WSActionResult(WSActionResult.ERROR,\n \"Attribute \" + attrTCount + \" is misconfigured. \" + e.getLocalizedMessage());\n }\n\n\n int tasksTranslated;\n if(null == translator.getAttribute(attrTCount)\n || translator.getAttribute(attrTCount).length() == 0) {\n log.info(\"First time user. Set initial count of translated letters to 0\");\n tasksTranslated = 0;\n }\n else {\n tasksTranslated = WSAttributeUtils.getIntegerAttribute(this,\n translator,\n attrTCount);\n }\n\n if(tasksTranslated < 0) {\n return new WSActionResult(WSActionResult.ERROR,\n \"Invalid number of translated letters for user \" +\n translator.getUserName() +\n \": \" + tasksTranslated);\n }\n\n translator.setAttribute(attrTCount,\n String.valueOf(++tasksTranslated));\n\n return new WSActionResult(DONE,\n \"User \" + translator.getFullName() + \" (\"\n + translator.getUserName() + \") has translated \"\n + tasksTranslated + \" assets\");\n\n }", "ViewProcessWorker createWorker(ViewProcessWorkerContext context, ViewExecutionOptions executionOptions, ViewDefinition viewDefinition);", "@Override\n public CompletionStage<Result> call(final Http.Context ctx) {\n final RequestHookRunner hookRunner = injector.instanceOf(RequestHookRunner.class);\n HttpRequestStartedHook.runHook(hookRunner, ctx);\n return delegate.call(ctx)\n .thenCompose(result -> hookRunner.waitForHookedComponentsToFinish()\n .thenApplyAsync(unused -> HttpRequestEndedHook.runHook(hookRunner, result), HttpExecution.defaultContext()));\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "public void onModuleLoad() {\n\t\tGWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onUncaughtException(Throwable e) {\n\t\t\t\tThrowable unwrapped = getExceptionToDisplay(e);\n\t\t\t\tAppClientFactory.printSevereLogger(\"Exception Caught !! \"+unwrapped.getMessage());\n\t\t\t}\n\t\t});\n\t\t\n\t\tDelayedBindRegistry.bind(appInjector);\n\t\tAppClientFactory.setAppGinjector(appInjector);\n\t\t ArrayList<LoadLibrary> loadLibraries = new ArrayList<LoadApi.LoadLibrary>();\n\t\t loadLibraries.add(LoadLibrary.ADSENSE);\n\t\t loadLibraries.add(LoadLibrary.DRAWING);\n\t\t loadLibraries.add(LoadLibrary.GEOMETRY);\n\t\t loadLibraries.add(LoadLibrary.PANORAMIO);\n\t\t loadLibraries.add(LoadLibrary.PLACES);\n\t\t loadLibraries.add(LoadLibrary.WEATHER);\n\t\t loadLibraries.add(LoadLibrary.VISUALIZATION);\n\t\t \n\t\t \n\t\tString device = BrowserAgent.returnFormFactorWithSizeView();\n\t\tString size[] = device.split(\"-\");\n\n\t\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\t\tappInjector.getPlaceManager().revealCurrentPlace();\n\t\t\t\t\tAppClientFactory.setProtocol(getHttpOrHttpsProtocol());\n\t\t\t\t\tregisterWindowEvents();\n\t\t\t\t}\n\t\t\t});\n\t\t\tAppClientFactory.setAppGinjector(appInjector);\n\n\t\tgetloggersStatus();\n\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 240px) and (max-width: 767px) {\" + PlayerStyleBundle.INSTANCE.getPlayerMobileStyle().getText() + \"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 768px) and (max-width: 991px) {\" + PlayerStyleBundle.INSTANCE.getPlayerTabletStyle().getText() + \"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 240px) and (max-width: 550px) {\" + PlayerSmallMobileBundle.INSTANCE.getPlayerSmallMobile().getText() + \"}\");\n\t\tPlayerStyleBundle.INSTANCE.getPlayerStyleResource().ensureInjected();\n\t\t\n\t\tStyleInjector.injectAtEnd(\"@media (max-width: 767px){\"+SearchCBundle.INSTANCE.getResponsiveStyle().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (max-width: 767px) and (orientation:portrait){\"+SearchCBundle.INSTANCE.getResponsive1Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (max-width: 767px) and (orientation:landscape){\"+SearchCBundle.INSTANCE.getResponsive2Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 480px) and (max-width: 767px){\"+SearchCBundle.INSTANCE.getResponsive3Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 240px) and (max-width: 319px){\"+SearchCBundle.INSTANCE.getResponsive4Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 320px) and (max-width: 479px){\"+SearchCBundle.INSTANCE.getResponsive5Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media screen and (min-width: 768px){\"+SearchCBundle.INSTANCE.getResponsive6Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 1200px){\"+SearchCBundle.INSTANCE.getResponsive7Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 768px) and (max-width: 991px) {\"+SearchCBundle.INSTANCE.getResponsive8Style().getText()+\"}\");\n\n\t\tSearchCBundle.INSTANCE.css().ensureInjected();\n\t\t\n\t\t\n\t\t\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 240px) and (max-width: 319px){\"+LoginPopUpCBundle.INSTANCE.getResponsiveStyle().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 320px) and (max-width: 479px){\"+LoginPopUpCBundle.INSTANCE.getResponsive1Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 480px) and (max-width: 767px){\"+LoginPopUpCBundle.INSTANCE.getResponsive2Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 768px) and (max-width: 991px){\"+LoginPopUpCBundle.INSTANCE.getResponsive3Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 1200px){\"+LoginPopUpCBundle.INSTANCE.getResponsive4Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media screen and (max-width: 767px) {\"+LoginPopUpCBundle.INSTANCE.getResponsive5Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media screen and (min-width: 768px) {\"+LoginPopUpCBundle.INSTANCE.getResponsive6Style().getText()+\"}\");\n\n\t\tLoginPopUpCBundle.INSTANCE.css().ensureInjected();\n\t\t\n\t\tStyleInjector.injectAtEnd(\"@media (max-width: 767px) {\"+AnalyticsTabCBundle.INSTANCE.getResponsiveStyle().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 768px) and (max-width: 991px) {\"+AnalyticsTabCBundle.INSTANCE.getResponsive1Style().getText()+\"}\");\n\t\t\n\t\tAnalyticsTabCBundle.INSTANCE.css().ensureInjected();\n\t\t\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 240px) and (max-width: 319px){\"+ResourcePlayerCBundle.INSTANCE.getResponsive1Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 320px) and (max-width: 479px){\"+ResourcePlayerCBundle.INSTANCE.getResponsive2Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 480px) and (max-width: 767px){\"+ResourcePlayerCBundle.INSTANCE.getResponsive3Style().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 768px) and (max-width: 992px){\"+ResourcePlayerCBundle.INSTANCE.getResponsive4Style().getText()+\"}\");\n\n\t\tResourcePlayerCBundle.INSTANCE.css().ensureInjected();\n\t\n\n\t\tStyleInjector.injectAtEnd(\"@media (max-width: 767px) {\"+CollectionSummaryIndividualCBundle.INSTANCE.getResponsiveStyle().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 768px) and (max-width: 991px) {\"+CollectionSummaryIndividualCBundle.INSTANCE.getResponsive1Style().getText()+\"}\");\n\t\t\n\t\tCollectionSummaryIndividualCBundle.INSTANCE.css().ensureInjected();\n\t\t\n\t\tStyleInjector.injectAtEnd(\"@media (max-width: 767px) {\"+CollectionPlaySummaryCBundle.INSTANCE.getResponsiveStyle().getText()+\"}\");\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 768px) and (max-width: 991px) {\"+CollectionPlaySummaryCBundle.INSTANCE.getResponsive1Style().getText()+\"}\");\n\t\t\n\t\tCollectionPlaySummaryCBundle.INSTANCE.css().ensureInjected();\n\t\t\n\t\tStyleInjector.injectAtEnd(\"@media (min-width: 480px) and (max-width: 767px){\"+FolderContainerCBundle.INSTANCE.getResponsiveStyle().getText()+\"}\");\n\t\tFolderContainerCBundle.INSTANCE.css().ensureInjected();\n\t}", "public void initWithCachedInAppMessages() {\n }", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n log.trace(View.COMMAND_EXECUTE + this.getClass().getName());\n if(request.getParameter(View.COUNTRY_PAGE).equals(View.UA)){\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeUA));\n }else {\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeEN));\n }\n Command command = CommandList.valueOf(View.DRAW_INDEX).getCommand();\n return command.execute(request,response);\n }", "public void jobToBeExecuted(JobExecutionContext jobExecutionContext) {}", "@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\r\n\tpublic void runFunc() {\n\r\n\t}", "public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }", "@Override\n public Integer call() {\n if (properties != null && !properties.isEmpty()) {\n System.getProperties().putAll(properties);\n }\n\n final List<File> templateDirectories = getTemplateDirectories(baseDir);\n\n final Settings settings = Settings.builder()\n .setArgs(args)\n .setTemplateDirectories(templateDirectories)\n .setTemplateName(template)\n .setSourceEncoding(sourceEncoding)\n .setOutputEncoding(outputEncoding)\n .setOutputFile(outputFile)\n .setInclude(include)\n .setLocale(locale)\n .isReadFromStdin(readFromStdin)\n .isEnvironmentExposed(isEnvironmentExposed)\n .setSources(sources != null ? sources : new ArrayList<>())\n .setProperties(properties != null ? properties : new HashMap<>())\n .setWriter(writer(outputFile, outputEncoding))\n .build();\n\n try {\n return new FreeMarkerTask(settings).call();\n } finally {\n if (settings.hasOutputFile()) {\n close(settings.getWriter());\n }\n }\n }", "public static void setApplicationLanguage(Context context, String code) {\n\t\tResources res = context.getResources();\n\t\tConfiguration androidConfiguration = res.getConfiguration();\n\t\t\n\t\tandroidConfiguration.locale = new Locale(code);\n\t\tres.updateConfiguration(androidConfiguration, res.getDisplayMetrics());\n\t}", "JobResponse apply(Context context);", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "public JexlEvalContext(JexlContext context) {\n this(context, context instanceof JexlContext.NamespaceResolver ? (JexlContext.NamespaceResolver) context : null);\n }", "void init(@NotNull ExecutionContext context);", "public void contextInitialized(ServletContextEvent servletcontextevent) \n\t {\n\t\t JobContext.getInstance().setContext(servletcontextevent.getServletContext()); \n\t }", "static io.reactivex.Scheduler applyRequireNonNull(io.reactivex.functions.Function<java.util.concurrent.Callable<io.reactivex.Scheduler>, io.reactivex.Scheduler> r3, java.util.concurrent.Callable<io.reactivex.Scheduler> r4) {\n /*\n java.lang.Object r0 = apply(r3, r4)\n io.reactivex.Scheduler r0 = (io.reactivex.Scheduler) r0\n if (r0 != 0) goto L_0x0011\n java.lang.NullPointerException r1 = new java.lang.NullPointerException\n java.lang.String r2 = \"Scheduler Callable returned null\"\n r1.<init>(r2)\n throw r1\n L_0x0011:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.plugins.RxAndroidPlugins.applyRequireNonNull(io.reactivex.functions.Function, java.util.concurrent.Callable):io.reactivex.Scheduler\");\n }", "private void showOrLoadApplications() {\n //nocache!!\n GetAppList getAppList = new GetAppList();\n if (plsWait == null && (getAppList.getStatus() == AsyncTask.Status.PENDING || getAppList.getStatus() == AsyncTask.Status.FINISHED)) {\n getAppList.setContext(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n }", "Object doWithContext(final Context context) throws ExceptionBase;", "public static Scheduler m34963c(Callable<Scheduler> callable) {\n ObjectHelper.m35048a(callable, \"Scheduler Callable can't be null\");\n Function<? super Callable<Scheduler>, ? extends Scheduler> hVar = f27421f;\n if (hVar == null) {\n return m34966e(callable);\n }\n return m34951a(hVar, callable);\n }", "@Override\r\n\tpublic int call(Runnable thread_base, String strMsg) {\n\t\treturn 0;\r\n\t}", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "public String call() {\n return Thread.currentThread().getName() + \" executing ...\";\n }", "PrioritizedReactiveTask(Bot bot) {\n exchangeContext(bot);\n }", "private void doLocalCall() {\n\n // Create the intent used to identify the bound service\n final Intent boundIntent = new Intent(this, MyLocalBoundService.class);\n\n // Lets get a reference to it (asynchronously, hence the ServiceConnection object)\n bindService(boundIntent, new ServiceConnection() {\n @Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n // Let's call it!\n ((MyLocalBoundServiceContract) service).doSomething(10);\n // We're done. Free the reference to the service\n unbindService(this);\n }\n\n @Override\n public void onServiceDisconnected(ComponentName name) {\n // Called upon unbind, just in case we need some cleanup\n }\n }, Context.BIND_AUTO_CREATE);\n }", "public static Scheduler m34953a(Callable<Scheduler> callable) {\n ObjectHelper.m35048a(callable, \"Scheduler Callable can't be null\");\n Function<? super Callable<Scheduler>, ? extends Scheduler> hVar = f27418c;\n if (hVar == null) {\n return m34966e(callable);\n }\n return m34951a(hVar, callable);\n }", "public interface AppScheduler {\n Scheduler getNewThread();\n Scheduler getMainThread();\n}", "abstract public void execute(FunctionContext context) throws Exception;", "@Override\n public void run() {\n\n String userid = SharedPreferenceStore.getValue(getApplicationContext(), \"Userid\", \"\");\n String userCompId = SharedPreferenceStore.getValue(getApplicationContext(), \"client_comp_id\", \"\");\n String loginType = SharedPreferenceStore.getValue(getApplicationContext(), \"Type\",\"\");\n SharedPreferenceStore.getValue(getApplicationContext(), \"LoadingPoint\", \"\");\n String country_code = SharedPreferenceStore.getValue(getApplicationContext(), \"country_code\",\"AE\"); // May Put Here default\n String currency_code = SharedPreferenceStore.getValue(getApplicationContext(),\"currency_code\",\"AED\"); // May put here Default\n appGlobal.userType = loginType ;\n appGlobal.userId = userid;\n appGlobal.userCompId = userCompId;\n appGlobal.currency_code = currency_code ;\n appGlobal.country_code = country_code ;\n\n /*******************/\n if(userid.isEmpty()) {\n Intent intent = new Intent(SplashActivity.this, HomeContainer.class); // LoginContainer.class\n startActivity(intent);\n finish();\n }\n else\n {\n Intent intent = new Intent(getApplicationContext(), HomeContainer.class);\n startActivity(intent);\n finish();\n }\n\n }" ]
[ "0.77018166", "0.7599884", "0.738416", "0.6043455", "0.5769875", "0.53472155", "0.50903505", "0.5061527", "0.4858024", "0.46913528", "0.46536648", "0.4580317", "0.44808486", "0.447387", "0.4361966", "0.43584558", "0.4351334", "0.43496403", "0.43344828", "0.43196353", "0.43025365", "0.42992446", "0.42814112", "0.42408788", "0.42130873", "0.41719002", "0.41624427", "0.41536185", "0.41473657", "0.4147108", "0.41192234", "0.4118366", "0.4104607", "0.41035157", "0.41011095", "0.4087861", "0.40869918", "0.40819424", "0.40813807", "0.4078645", "0.4054603", "0.4053224", "0.40518144", "0.4046877", "0.40401086", "0.4036626", "0.40352973", "0.40277067", "0.40116575", "0.4007109", "0.40068766", "0.39998567", "0.39867565", "0.39859733", "0.3973543", "0.39698172", "0.3968715", "0.39640257", "0.39632678", "0.39604354", "0.3955674", "0.3947684", "0.39447513", "0.3940488", "0.3940433", "0.39397335", "0.39397335", "0.3938469", "0.3935018", "0.39306682", "0.3929981", "0.3928929", "0.39217395", "0.39214224", "0.39194208", "0.3914921", "0.39134616", "0.39061287", "0.3900497", "0.3900301", "0.38979617", "0.38976172", "0.3894657", "0.38946268", "0.38881013", "0.388745", "0.38837403", "0.3880165", "0.3875579", "0.38755193", "0.38751712", "0.38722318", "0.38691062", "0.3866835", "0.38650942", "0.38641998", "0.3860347", "0.38596424", "0.3857762", "0.38547444" ]
0.622458
3
Executes a callable, ensuring that Wicket's threadlocal context is available during the execution. This method sets the given locale on the Wicket Session and uses the given Wicket application.
<T> T runWithContext(WebApplication application, Callable<T> callable, Locale locale) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T runWithContext(Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;", "public <T> T executeInApplicationScope(Callable<T> op) throws Exception {\n return manager.executeInApplicationContext(op);\n }", "public Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;", "<T> T runWithContext(WebApplication application, Callable<T> callable) throws Exception;", "<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;", "public interface LocaleContext {\n Locale getLocale();\n}", "@Override\r\n\tpublic String execute(HttpServletRequest request) {\t\t\r\n\t\tString page = ConfigurationManager.getProperty(\"path.page.login\");\r\n\t\tString language = request.getParameter(PARAM_NAME_LANGUAGE);\r\n\t\tswitch (language) {\r\n\t\tcase \"en\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"en\");\r\n\t\t\tbreak;\r\n\t\tcase \"ru\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"ru\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn page;\r\n\t}", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "public void setUserLocale(String userLocale) {\n sessionData.setUserLocale(userLocale);\n }", "public void setLocale(Locale locale) {\n fLocale = locale;\n }", "<T> T callInContext(ContextualCallable<T> callable) {\n InternalContext[] reference = localContext.get();\n if (reference[0] == null) {\n reference[0] = new InternalContext(this);\n try {\n return callable.call(reference[0]);\n }\n finally {\n // Only remove the context if this call created it.\n reference[0] = null;\n }\n }\n else {\n // Someone else will clean up this context.\n return callable.call(reference[0]);\n }\n }", "public interface LocaleSettingsExtPoint extends CSSStartupExtensionPoint\n{\n\t/** The name of this extension point element */\n\tpublic static final String NAME = \"locale\"; //$NON-NLS-1$\n\t\n\t/**\n\t * Applies the locale settings. The locale settings can be gathered from any\n\t * location specified by the implementation and can be set to whatever part\n\t * of the application.\n\t * \n\t * @param context the application context which triggered this call and for\n\t * \t\t\twhich the settings are being applied\n\t * @param parameters contains additional parameters, which can define\n\t * \t\t\tsome special behavior during the execution of this method (the keys\n\t * \t\t\tare parameters names and the values are parameters values)\n\t * \n\t * @return the exit code if something happened which requires to exit or restart \n\t * \t\t\tapplication or null if everything is alright\n\t * \n\t * @throws Exception if an error occurred during the operation\n\t */\n\tpublic Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;\n}", "public static void setCurrentLocale(HttpSession session, Locale locale) {\r\n\t\tif (session == null)\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Cannot set an attribute on a null session\");\r\n\t\tif (locale == null)\r\n\t\t\tthrow new IllegalArgumentException(\"the value of the \"\r\n\t\t\t\t\t+ CURRENT_LOCALE_NAME + \" attribute should not be null\");\r\n\t\tsession.setAttribute(CURRENT_LOCALE_NAME, locale);\r\n\t}", "private void setLanguageForApp(){\n String lang = sharedPreferences.getString(EXTRA_PREF_LANG,\"en\");\n\n Locale locale = new Locale(lang);\n Resources resources = getResources();\n Configuration configuration = resources.getConfiguration();\n DisplayMetrics displayMetrics = resources.getDisplayMetrics();\n configuration.setLocale(locale);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n getApplicationContext().createConfigurationContext(configuration);\n } else {\n resources.updateConfiguration(configuration,displayMetrics);\n }\n getApplicationContext().getResources().updateConfiguration(configuration, getApplicationContext().getResources().getDisplayMetrics());\n }", "public static void initForWeChatTranslate(String str, ApplicationInfo applicationInfo, ClassLoader classLoader) {\n if (\"com.hkdrjxy.wechart.xposed.XposedInit\".equals(str)) {\n if (\"com.hiwechart.translate\".equals(applicationInfo.processName) || \"com.tencent.mm\".equals(applicationInfo.processName)) {\n final IBinder[] iBinderArr = new IBinder[1];\n Intent intent = new Intent();\n intent.setAction(\"com.hiwechart.translate.aidl.TranslateService\");\n intent.setComponent(new ComponentName(\"com.hiwechart.translate\", \"com.hiwechart.translate.aidl.TranslateService\"));\n appContext.bindService(intent, new ServiceConnection() {\n public void onServiceDisconnected(ComponentName componentName) {\n }\n\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n iBinderArr[0] = iBinder;\n }\n }, 1);\n Class findClass = XposedHelpers.findClass(\"android.os.ServiceManager\", classLoader);\n final String str2 = VERSION.SDK_INT >= 21 ? \"user.wechart.trans\" : \"wechart.trans\";\n XposedHelpers.findAndHookMethod(findClass, \"getService\", String.class, new XC_MethodHook() {\n /* access modifiers changed from: protected */\n public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n super.beforeHookedMethod(methodHookParam);\n if (str2.equals(methodHookParam.args[0])) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"get service :\");\n sb.append(iBinderArr[0]);\n Log.i(\"mylog\", sb.toString());\n methodHookParam.setResult(iBinderArr[0]);\n }\n }\n });\n }\n }\n }", "public void updateLanguage() {\n try {\n getUserTicket().setLanguage(EJBLookup.getLanguageEngine().load(updateLanguageId));\n } catch (FxApplicationException e) {\n new FxFacesMsgErr(e).addToContext();\n }\n }", "@Override\n\t<T> T runWithContext(Callable<T> callable) throws Exception;", "public static void setApplicationLanguage(Context context, String code) {\n\t\tResources res = context.getResources();\n\t\tConfiguration androidConfiguration = res.getConfiguration();\n\t\t\n\t\tandroidConfiguration.locale = new Locale(code);\n\t\tres.updateConfiguration(androidConfiguration, res.getDisplayMetrics());\n\t}", "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n/* 28: */ throws ServletException\r\n/* 29: */ {\r\n/* 30:67 */ String newLocale = request.getParameter(this.paramName);\r\n/* 31:68 */ if (newLocale != null)\r\n/* 32: */ {\r\n/* 33:69 */ LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);\r\n/* 34:70 */ if (localeResolver == null) {\r\n/* 35:71 */ throw new IllegalStateException(\"No LocaleResolver found: not in a DispatcherServlet request?\");\r\n/* 36: */ }\r\n/* 37:73 */ localeResolver.setLocale(request, response, StringUtils.parseLocaleString(newLocale));\r\n/* 38: */ }\r\n/* 39:76 */ return true;\r\n/* 40: */ }", "@Test\r\n\tpublic void testSessionLocale() throws Exception {\n\t}", "public void setContexto() {\n this.contexto = FacesContext.getCurrentInstance().getViewRoot().getLocale().toString();\r\n // this.contexto =httpServletRequest.getLocale().toString();\r\n \r\n \r\n //obtenemos el HttpServletRequest de la peticion para poder saber\r\n // el locale del cliente\r\n HttpServletRequest requestObj = (HttpServletRequest) \r\n FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n \r\n //Locale del cliente\r\n this.contextoCliente = requestObj.getLocale().toString();\r\n \r\n \r\n //Asignamos al locale de la aplicacion el locale del cliente\r\n FacesContext.getCurrentInstance().getViewRoot().setLocale(requestObj.getLocale());\r\n }", "protected void localeChanged() {\n\t}", "public void setApplicationLanguage() {\n\t\tinitializeMixerLocalization();\n\t\tinitializeRecorderLocalization();\n\t\tinitializeMenuBarLocalization();\n\t\tsetLocalizedLanguageMenuItems();\n\t\tboardController.setLocalization(bundle);\n\t\tboardController.refreshSoundboard();\n\t}", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "public void setLocale(Locale locale) {\n/* 462 */ ParamChecks.nullNotPermitted(locale, \"locale\");\n/* 463 */ this.locale = locale;\n/* 464 */ setStandardTickUnits(createStandardDateTickUnits(this.timeZone, this.locale));\n/* */ \n/* 466 */ fireChangeEvent();\n/* */ }", "default void withContext(String tenantId, Runnable runnable) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n runnable.run();\n } finally {\n setContext(origContext.orElse(null));\n }\n }", "public Future<Void> setLanguage(String pLanguage) throws DynamicCallException, ExecutionException{\n return call(\"setLanguage\", pLanguage);\n }", "@Override\n public String execute(final HttpServletRequest request, final HttpServletResponse response, ModelMap model) throws Exception {\n request.getSession().setAttribute(\"language\", request.getParameter(\"language\"));\n\n\n // model.addAttribute(\"language\",request.getParameter(\"language\"));\n // model.addAttribute(\"loginmessage\",\"null\");\n\n request.getSession().setAttribute(\"loginmessage\", \"\");\n return \"login\";\n }", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }", "public void init() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();//gets the info from the URL\n this.setFormId(paramMap.get(\"id\"));//gets the form ID from the URL and sets it to the variable\n\n\n this.startDateQuestionSet();//executes the method\n this.startMultQuestionSet();//executes the method\n this.startSingleQuestionSet();//executes the method\n this.startTextQuestionSet();//executes the method\n }", "@Override\r\n public void service(HttpServletRequest request, \r\n HttpServletResponse response) {\r\n Context cx = Context.enter();\r\n //cx.setOptimizationLevel(-1);\r\n cx.putThreadLocal(\"rhinoServer\",RhinoServlet.this);\r\n try {\r\n \r\n // retrieve JavaScript...\r\n JavaScript s = loader.loadScript(entryPoint);\r\n \r\n ScriptableObject threadScope = makeChildScope(\"RequestScope\", \r\n globalScope.getModuleScope(entryPoint));\r\n \r\n cx.putThreadLocal(\"globalScope\", globalScope);\r\n // Define thread-local variables\r\n threadScope.defineProperty(\"request\", request, PROTECTED);\r\n threadScope.defineProperty(\"response\", response, PROTECTED);\r\n \r\n // Evaluate the script in this scope\r\n s.evaluate(cx, threadScope);\r\n } catch (Throwable ex) {\r\n handleError(response,ex);\r\n } finally {\r\n Context.exit();\r\n }\r\n }", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n log.debug(START_COMMAND);\n String language = request.getParameter(Constant.LANGUAGE);\n log.debug(Constant.LANGUAGE + language);\n HttpSession session = request.getSession();\n session.setAttribute(Constant.LANGUAGE, language);\n log.debug(END_COMMAND);\n return Path.COMMAND_MASTER_SERVICES;\n }", "public void setLocale (\r\n String strLocale) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public RequestAndSessionLocaleResolver(Locale locale) {\n\t\tsetDefaultLocale(locale);\n\t}", "public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}", "public void setPreferredLocale(Locale locale);", "public void setLocale(Locale loc) {\n this.response.setLocale(loc);\n }", "@Override\n\tpublic void setLocale(Locale loc) {\n\t}", "public static void setlanguage(Context ctx, String latitude) {\n\t\tEditor editor = getSharedPreferences(ctx).edit();\n\t\teditor.putString(language, latitude);\n\t\teditor.commit();\n\t}", "private void setLocale(String lang) {\n Locale myLocale = new Locale(lang);\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration conf = res.getConfiguration();\n conf.setLocale(myLocale);\n res.updateConfiguration(conf, dm);\n Intent refresh = new Intent(this, MainActivity.class);\n startActivity(refresh);\n finish();\n }", "public void setRequestedLocale(final Locale val) {\n requestedLocale = val;\n }", "public static void setLocale(Locale locale) {\n// Recarga las entradas de la tabla con la nueva localizacion \n RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, locale);\n}", "private void hitChangeLanguageApi(final String selectedLang) {\n progressBar.setVisibility(View.VISIBLE);\n ApiInterface apiInterface = RestApi.createServiceAccessToken(this, ApiInterface.class);//empty field is for the access token\n final HashMap<String, String> params = AppUtils.getInstance().getUserMap(this);\n params.put(Constants.NetworkConstant.PARAM_USER_ID, AppSharedPreference.getInstance().getString(this, AppSharedPreference.PREF_KEY.USER_ID));\n params.put(Constants.NetworkConstant.PARAM_USER_LANGUAGE, String.valueOf(languageCode));\n Call<ResponseBody> call = apiInterface.hitEditProfileDataApi(AppUtils.getInstance().encryptData(params));\n ApiCall.getInstance().hitService(this, call, new NetworkListener() {\n\n @Override\n public void onSuccess(int responseCode, String response, int requestCode) {\n progressBar.setVisibility(View.GONE);\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n switch (responseCode) {\n case Constants.NetworkConstant.SUCCESS_CODE:\n setLanguage(selectedLang);\n// Locale locale = new Locale(language);\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());\n AppUtils.getInstance().openNewActivity(ChangeLanguageActivity.this, new Intent(ChangeLanguageActivity.this, HomeActivity.class));\n break;\n }\n }\n\n\n @Override\n public void onError(String response, int requestCode) {\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n progressBar.setVisibility(View.GONE);\n }\n\n\n @Override\n public void onFailure() {\n progressBar.setVisibility(View.GONE);\n }\n }, 1);\n }", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n log.trace(View.COMMAND_EXECUTE + this.getClass().getName());\n if(request.getParameter(View.COUNTRY_PAGE).equals(View.UA)){\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeUA));\n }else {\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeEN));\n }\n Command command = CommandList.valueOf(View.DRAW_INDEX).getCommand();\n return command.execute(request,response);\n }", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "public static void updateLocale(HttpSession session, Locale locale) {\n\t\tsession.setAttribute(CURRENT_SESSION_LOCALE, locale);\n\t\tConfig.set(session, Config.FMT_LOCALE, locale);\n\t}", "void localizationChaneged();", "public void setLocale(Locale locale) {\n\n\t}", "@Override\n public void setLocale(Locale arg0) {\n\n }", "public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }", "public <T> T performWorkWithContext(\n PrefabContextSetReadable prefabContext,\n Callable<T> callable\n ) throws Exception {\n try (PrefabContextScope ignored = performWorkWithAutoClosingContext(prefabContext)) {\n return callable.call();\n }\n }", "public LanguageManager(Context context) {this.mContext = context;}", "@Override\n\tpublic void execute() {\n\t\ttry {\n\t\t\tProperties properties\t = new Properties();\n\t\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\t\tInputStream propertiesFile = classLoader.getResourceAsStream(\"languages/language_\" + lang + \".properties\");\n\t\t\tproperties.load(propertiesFile);\n\t\t\tResultSearchFrame rsf = new ResultSearchFrame(properties.getProperty(\"view_search_result\") , dto.getRootNode() , dto.getSessionId() , dto.getSearchName() , wordManagerFrame.getTransmitter() , lang);\n\t\t\trsf.showWindows();\n\t\t\tpropertiesFile.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Problem to load languages\" , e);\n\t\t}\n\t\t\n\t}", "public void setLocale (Locale locale) {\n _locale = locale;\n _cache.clear();\n _global = getBundle(_globalName);\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\n\t\tSystem.out.println(\"!!!!!!!!!!!!!!!onStart\");\n\t\tLanguageConvertPreferenceClass.loadLocale(getApplicationContext());\n\t}", "@Override\n public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException {\n HttpSession session = request.getSession();\n String page = request.getParameter(PAGE);\n String lang = request.getParameter(LANG);\n String parameters = request.getParameter(PARAM);\n session.setAttribute(LANG, lang);\n String address = parameters.isEmpty() ? page : SERVLET + \"?\" + parameters;\n response.sendRedirect(address);\n }", "private void translate()\r\n\t{\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\t\r\n\t\tString language = locale.getLanguage();\r\n\t\t\r\n\t\ttranslate(language);\r\n\t}", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "@SuppressWarnings(\"deprecation\")\r\n public void setLanguage(String langTo) {\n Locale locale = new Locale(langTo);\r\n Locale.setDefault(locale);\r\n\r\n Configuration config = new Configuration();\r\n\r\n config.setLocale(locale);//config.locale = locale;\r\n\r\n if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {\r\n createConfigurationContext(config);\r\n } else {\r\n getResources().updateConfiguration(config, getResources().getDisplayMetrics());\r\n }\r\n\r\n //createConfigurationContext(config);\r\n getResources().updateConfiguration(config, getApplicationContext().getResources().getDisplayMetrics());//cannot resolve yet\r\n //write into settings\r\n SharedPreferences.Editor editor = mSettings.edit();\r\n editor.putString(APP_PREFERENCES_LANGUAGE, langTo);\r\n editor.apply();\r\n //get appTitle\r\n if(getSupportActionBar()!=null){\r\n getSupportActionBar().setTitle(R.string.app_name);\r\n }\r\n\r\n }", "public /* synthetic */ void lambda$onReceive$1$Clock$2(Locale locale) {\n if (!locale.equals(Clock.this.mLocale)) {\n Clock.this.mLocale = locale;\n Clock.this.mClockFormatString = CodeInjection.MD5;\n }\n }", "public void initWithCachedInAppMessages() {\n }", "public void attachBaseContext(Context context) {\n super.attachBaseContext(LocaleHelper.setLocale(context));\n }", "@RequestMapping(value = \"/getLocaleLang\", method = RequestMethod.GET)\n\tpublic String getLocaleLang(ModelMap model, HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows CustomException {\n\n\t\tlog.info(\"Received request for locale change\");\n\t\tEndUser user = endUserDAOImpl.findByUsername(getCurrentLoggedUserName()).getSingleResult();\n\t\tLocaleResolver localeResolver = new CookieLocaleResolver();\n\t\tLocale locale = new Locale(request.getParameter(\"lang\"));\n\t\tlocaleResolver.setLocale(request, response, locale);\n\t\tuser.setPrefferedLanguage(request.getParameter(\"lang\"));\n\n\t\tendUserDAOImpl.update(user);\n\t\treturn \"redirect:adminPage\";\n\t}", "public void setLocale(String locale) {\n locale = fixLocale(locale);\n this.locale = locale;\n this.uLocale = new ULocale(locale);\n String lang = uLocale.getLanguage();\n if (locale.equals(\"fr_CA\") || lang.equals(\"en\")) {\n throw new RuntimeException(\"Skipping \" + locale);\n }\n cldrFile = cldrFactory.make(locale, false);\n UnicodeSet exemplars = cldrFile.getExemplarSet(\"\",WinningChoice.WINNING);\n usesLatin = exemplars != null && exemplars.containsSome(LATIN_SCRIPT);\n for (DataHandler dataHandler : dataHandlers) {\n dataHandler.reset(cldrFile);\n }\n }", "private final static Locale getLocaleInSession(HttpSession session) {\r\n if(session != null) {\r\n return (Locale)session.getAttribute(getLocaleSessionAttributeName());\r\n }\r\n return null;\r\n }", "@Override\n\tpublic final void setLocale(final Locale locale)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.setLocale(locale);\n\t\t}\n\t}", "@Override\n public void run() {\n\n String userid = SharedPreferenceStore.getValue(getApplicationContext(), \"Userid\", \"\");\n String userCompId = SharedPreferenceStore.getValue(getApplicationContext(), \"client_comp_id\", \"\");\n String loginType = SharedPreferenceStore.getValue(getApplicationContext(), \"Type\",\"\");\n SharedPreferenceStore.getValue(getApplicationContext(), \"LoadingPoint\", \"\");\n String country_code = SharedPreferenceStore.getValue(getApplicationContext(), \"country_code\",\"AE\"); // May Put Here default\n String currency_code = SharedPreferenceStore.getValue(getApplicationContext(),\"currency_code\",\"AED\"); // May put here Default\n appGlobal.userType = loginType ;\n appGlobal.userId = userid;\n appGlobal.userCompId = userCompId;\n appGlobal.currency_code = currency_code ;\n appGlobal.country_code = country_code ;\n\n /*******************/\n if(userid.isEmpty()) {\n Intent intent = new Intent(SplashActivity.this, HomeContainer.class); // LoginContainer.class\n startActivity(intent);\n finish();\n }\n else\n {\n Intent intent = new Intent(getApplicationContext(), HomeContainer.class);\n startActivity(intent);\n finish();\n }\n\n }", "protected void setFallbackLanguage(final HttpServletRequest httpRequest, final Boolean enabled)\n\t{\n\t\tfinal SessionService sessionService = getSessionService(httpRequest);\n\t\tif (sessionService != null)\n\t\t{\n\t\t\tsessionService.setAttribute(LocalizableItem.LANGUAGE_FALLBACK_ENABLED, enabled);\n\t\t\tsessionService.setAttribute(AbstractItemModel.LANGUAGE_FALLBACK_ENABLED_SERVICE_LAYER, enabled);\n\t\t}\n\t}", "public void setAllMessageFired(final Map<Language,String> value)\r\n\t{\r\n\t\tsetAllMessageFired( getSession().getSessionContext(), value );\r\n\t}", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }", "public static void forceLocale(Context context) {\r\n\t\tfinal String language = getSavedLanguage(context);\r\n\t\t\r\n\t\tif (language == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tDebug.logE(\"force locale\", \"language \" + language);\r\n\t\t\r\n\t\tResources res = context.getResources();\r\n\r\n\t\tConfiguration config = res.getConfiguration();\r\n\t\ttry {\r\n\t\t\tconfig.locale = new Locale(language);\r\n\t\t} catch(Throwable e) {\r\n\t\t\t;\r\n\t\t}\r\n\t res.updateConfiguration(config, context.getResources().getDisplayMetrics());\r\n\t}", "@Override\n public T call() {\n try {\n return callable.call();\n }\n catch (Throwable e) {\n Log.e(\"Scheduler\", \"call code exception: %s\", e);\n return null;\n }\n }", "@Override\n public void process(Node externs, Node root) {\n NodeUtil.createSynthesizedExternsSymbol(compiler, GOOG_LOCALE_REPLACEMENT);\n ProtectCurrentLocale protectLocaleCallback = new ProtectCurrentLocale(compiler);\n NodeTraversal.traverse(compiler, root, protectLocaleCallback);\n localeData = new LocaleDataImpl(null);\n }", "public void setLanguage(String pLanguage) throws DynamicCallException, ExecutionException{\n call(\"setLanguage\", pLanguage).get();\n }", "private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}", "public void setLocale(Locale locale) {\r\n this.locale = locale;\r\n }", "private Locale getLocale(PageContext pageContext) {\n HttpSession session = pageContext.getSession();\n Locale ret = null;\n // See if a Locale has been set up for Struts\n if (session != null) {\n ret = (Locale) session.getAttribute(Globals.LOCALE_KEY);\n }\n\n // If we've found nothing so far, use client browser's Locale\n if (ret == null) {\n ret = pageContext.getRequest().getLocale();\n }\n return ret;\n }", "@Test\n public void testSetLanguage() {\n assertEquals(Language.EN, navigationBean.getSessionUser().getLanguage());\n\n navigationBean.getSessionUser().setLanguage(Language.DE);\n assertFalse(SAMPLE_LANGUAGE.equals(navigationBean.getSessionUser().getLanguage()));\n\n navigationBean.getSessionUser().setLanguage(Language.BAY);\n assertFalse(SAMPLE_LANGUAGE.equals(navigationBean.getSessionUser().getLanguage()));\n }", "@Override\n\tpublic void onRestart() {\n\t\tsuper.onRestart();\n\n\t\tSystem.out.println(\"!!!!!!!!!!!!!!!onRestart\");\n\t\tLanguageConvertPreferenceClass.loadLocale(getApplicationContext());\n\t}", "protected void launchLocaleSettings() {\r\n\t\tIntent queryIntent = new Intent(Intent.ACTION_MAIN);\r\n\t\tqueryIntent.setClassName(\"com.android.settings\", \"com.android.settings.LanguageSettings\");\r\n\t\tqueryIntent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY|Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\tstartActivity(queryIntent);\r\n\t\t\r\n\t}", "public Builder setLocale(ULocale locale) {\n/* 1533 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setLocale(Locale locale)\n {\n this.locale = locale;\n }", "public interface Translator\n{\n Locale SWEDISH = Locale.forLanguageTag(\"sv\");\n\n List<Locale> supportedLanguages();\n Map<Locale, List<Locale>> supportedDirections();\n Translation translate(Translation message);\n String pageTranslationURL(String sourceURL, Translation message);\n}", "public Lab2_InternationalizedWarehouse() {\n enLocale = new Locale(\"en\", \"US\");\n plLocale = new Locale(\"pl\", \"PL\");\n initComponents();\n initStorage();\n itemsList = new ItemsList();\n plLangRadioButton.doClick();\n loadButton.doClick();\n langButtonGroup.add(plLangRadioButton);\n langButtonGroup.add(enLangRadioButton);\n\n }", "private Locale getBotLocale( HttpServletRequest request )\r\n {\r\n String strLanguage = request.getParameter( PARAMETER_LANGUAGE );\r\n\r\n if ( strLanguage != null )\r\n {\r\n return new Locale( strLanguage );\r\n }\r\n\r\n return LocaleService.getDefault( );\r\n }", "void localizationChanged();", "void localizationChanged();", "void localizationChanged();", "public void temp() {\n\t\t\n\t\tString language = locale.getLanguage();\n\t\tSystem.out.println(language);\n\t\t\n\t\tif(language.equals(\"ru\")) {\n\t\t\tsetLocale(new Locale(\"en\", \"US\"));\n\t\t} else {\n\t\t\tsetLocale(new Locale(\"ru\", \"UA\"));\n\t\t}\n\t}", "public final void setLocale( Locale locale )\n {\n }", "void setCurrentLocaleIndex(int value) {\n\n this.currentLocaleIndex = value;\n this.updateBundle();\n }", "@Override\n\tpublic void doBusiness(Context mContext) {\n\t}", "public static Locale getCurrentLocale(HttpSession session) {\r\n\t\tif (session == null)\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Cannot get an attribute of a null session\");\r\n\t\treturn (Locale) session.getAttribute(CURRENT_LOCALE_NAME);\r\n\t}", "@Override\n public void addInterceptors(InterceptorRegistry registry) {\n registry.addInterceptor(localeChangeInterceptor());\n }" ]
[ "0.6955571", "0.68356603", "0.5474249", "0.52729166", "0.52389467", "0.4909414", "0.49033004", "0.4690469", "0.46593845", "0.4615608", "0.45943096", "0.4583929", "0.45612687", "0.45452687", "0.4544098", "0.4532532", "0.44987252", "0.4491671", "0.4482373", "0.44816843", "0.4449799", "0.44451517", "0.4442261", "0.44361013", "0.44331118", "0.4390131", "0.43700278", "0.43696496", "0.43681347", "0.43613195", "0.43426752", "0.43395", "0.43275094", "0.43151888", "0.43095225", "0.43070787", "0.43001497", "0.42807162", "0.42631108", "0.42615938", "0.425561", "0.4253688", "0.4253371", "0.42298135", "0.4227232", "0.42088807", "0.419399", "0.41921064", "0.41895187", "0.41827583", "0.4150547", "0.4142228", "0.41418847", "0.41313562", "0.41272235", "0.41191208", "0.41175383", "0.41134557", "0.41132224", "0.4111206", "0.40899011", "0.40852177", "0.4078817", "0.40765956", "0.40726107", "0.40644276", "0.40609616", "0.40591398", "0.40333915", "0.40333194", "0.40287152", "0.40122768", "0.40025848", "0.39949262", "0.39949262", "0.39934784", "0.39902228", "0.39838588", "0.39782435", "0.39751878", "0.397457", "0.39719445", "0.3969413", "0.3967137", "0.3963311", "0.396136", "0.39600742", "0.3953753", "0.3949961", "0.39480534", "0.39473438", "0.39444587", "0.39444587", "0.39444587", "0.39387646", "0.39375472", "0.3930098", "0.39256015", "0.39217126", "0.39207536" ]
0.7080771
0
Executes a callable, ensuring that Wicket's threadlocal context is available during the execution. This method uses a default locale and the Wicket application with the given name.
<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(WebApplication application, Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(WebApplication application, Callable<T> callable) throws Exception;", "public <T> T executeInApplicationScope(Callable<T> op) throws Exception {\n return manager.executeInApplicationContext(op);\n }", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "@Override\n\t<T> T runWithContext(Callable<T> callable) throws Exception;", "public static void initForWeChatTranslate(String str, ApplicationInfo applicationInfo, ClassLoader classLoader) {\n if (\"com.hkdrjxy.wechart.xposed.XposedInit\".equals(str)) {\n if (\"com.hiwechart.translate\".equals(applicationInfo.processName) || \"com.tencent.mm\".equals(applicationInfo.processName)) {\n final IBinder[] iBinderArr = new IBinder[1];\n Intent intent = new Intent();\n intent.setAction(\"com.hiwechart.translate.aidl.TranslateService\");\n intent.setComponent(new ComponentName(\"com.hiwechart.translate\", \"com.hiwechart.translate.aidl.TranslateService\"));\n appContext.bindService(intent, new ServiceConnection() {\n public void onServiceDisconnected(ComponentName componentName) {\n }\n\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n iBinderArr[0] = iBinder;\n }\n }, 1);\n Class findClass = XposedHelpers.findClass(\"android.os.ServiceManager\", classLoader);\n final String str2 = VERSION.SDK_INT >= 21 ? \"user.wechart.trans\" : \"wechart.trans\";\n XposedHelpers.findAndHookMethod(findClass, \"getService\", String.class, new XC_MethodHook() {\n /* access modifiers changed from: protected */\n public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n super.beforeHookedMethod(methodHookParam);\n if (str2.equals(methodHookParam.args[0])) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"get service :\");\n sb.append(iBinderArr[0]);\n Log.i(\"mylog\", sb.toString());\n methodHookParam.setResult(iBinderArr[0]);\n }\n }\n });\n }\n }\n }", "void onUpdateCachedEngineName(FirstRunActivity caller);", "public String call() {\n return Thread.currentThread().getName() + \" executing ...\";\n }", "<T> T callInContext(ContextualCallable<T> callable) {\n InternalContext[] reference = localContext.get();\n if (reference[0] == null) {\n reference[0] = new InternalContext(this);\n try {\n return callable.call(reference[0]);\n }\n finally {\n // Only remove the context if this call created it.\n reference[0] = null;\n }\n }\n else {\n // Someone else will clean up this context.\n return callable.call(reference[0]);\n }\n }", "public Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;", "@Override\n public T call() {\n try {\n return callable.call();\n }\n catch (Throwable e) {\n Log.e(\"Scheduler\", \"call code exception: %s\", e);\n return null;\n }\n }", "<T> T runWithDebugging(Environment env, String threadName, DebugCallable<T> callable)\n throws EvalException, InterruptedException;", "public Object call(Context cx, Scriptable scope, Scriptable thisObj,\n Object[] args);", "public S<T> callFun(String name){\n\t\t\n\t\tClass<? extends Activity> aClass = activity.getClass();\n\t\ttry {\n\t\t\tjava.lang.reflect.Method method = aClass.getMethod(name, new Class[]{});\n\t\t\tmethod.invoke(activity,new Object[] {});\n\t\t\t\n\t\t} catch (NoSuchMethodException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn this;\n\t}", "@Override\r\n\tpublic String execute(HttpServletRequest request) {\t\t\r\n\t\tString page = ConfigurationManager.getProperty(\"path.page.login\");\r\n\t\tString language = request.getParameter(PARAM_NAME_LANGUAGE);\r\n\t\tswitch (language) {\r\n\t\tcase \"en\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"en\");\r\n\t\t\tbreak;\r\n\t\tcase \"ru\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"ru\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn page;\r\n\t}", "@Override\n\tpublic void execute() {\n\t\ttry {\n\t\t\tProperties properties\t = new Properties();\n\t\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\t\tInputStream propertiesFile = classLoader.getResourceAsStream(\"languages/language_\" + lang + \".properties\");\n\t\t\tproperties.load(propertiesFile);\n\t\t\tResultSearchFrame rsf = new ResultSearchFrame(properties.getProperty(\"view_search_result\") , dto.getRootNode() , dto.getSessionId() , dto.getSearchName() , wordManagerFrame.getTransmitter() , lang);\n\t\t\trsf.showWindows();\n\t\t\tpropertiesFile.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Problem to load languages\" , e);\n\t\t}\n\t\t\n\t}", "public interface Callable {\n void call(String name, String telNumber);\n}", "protected void run(final String name, final Callable<?> cb) {\n executor.submit(new Runnable() {\n @Override\n public void run() {\n try {\n cb.call();\n } catch (Exception | Error t) {\n sendError(name, t);\n }\n }\n });\n }", "protected final <T> T getLocalCache(CacheKeyMain<T> key, Callable<T> caller){\n try {\n return key.cast(spanMainCache.get(key, caller));\n } catch (ExecutionException e) {\n throw new RuntimeException(e.getCause());\n }\n }", "public void asHigherOrderFunctions() {\nThreadLocal<DateFormat> localFormatter\n = ThreadLocal.withInitial(() -> new SimpleDateFormat());\n\n// Usage\nDateFormat formatter = localFormatter.get();\n// END local_formatter\n\n// BEGIN local_thread_id\n// Or...\nAtomicInteger threadId = new AtomicInteger();\nThreadLocal<Integer> localId\n = ThreadLocal.withInitial(() -> threadId.getAndIncrement());\n\n// Usage\nint idForThisThread = localId.get();\n// END local_thread_id\n }", "@Override\n\tpublic LoggerContext getContext(final String fqcn, final ClassLoader loader, final Object externalContext,\n\t\t\tfinal boolean currentContext, final URI configLocation, final String name) {\n\t\tfinal LoggerContext ctx = selector.getContext(fqcn, loader, currentContext, configLocation);\n\t\tif (externalContext != null && ctx.getExternalContext() == null) {\n\t\t\tctx.setExternalContext(externalContext);\n\t\t}\n\t\tif (name != null) {\n\t\t\tctx.setName(name);\n\t\t}\n\t\tif (ctx.getState() == LifeCycle.State.INITIALIZED) {\n\t\t\tif (configLocation != null || name != null) {\n\t\t\t\tContextAnchor.THREAD_CONTEXT.set(ctx);\n\t\t\t\tfinal Configuration config = ConfigurationFactory.getInstance().getConfiguration(ctx, name,\n\t\t\t\t\t\tconfigLocation);\n\t\t\t\tLOGGER.debug(\"Starting LoggerContext[name={}] from configuration at {}\", ctx.getName(), configLocation);\n\t\t\t\tctx.start(config);\n\t\t\t\tContextAnchor.THREAD_CONTEXT.remove();\n\t\t\t} else {\n\t\t\t\tctx.start();\n\t\t\t}\n\t\t}\n\t\treturn ctx;\n\t}", "@Override\r\n public void service(HttpServletRequest request, \r\n HttpServletResponse response) {\r\n Context cx = Context.enter();\r\n //cx.setOptimizationLevel(-1);\r\n cx.putThreadLocal(\"rhinoServer\",RhinoServlet.this);\r\n try {\r\n \r\n // retrieve JavaScript...\r\n JavaScript s = loader.loadScript(entryPoint);\r\n \r\n ScriptableObject threadScope = makeChildScope(\"RequestScope\", \r\n globalScope.getModuleScope(entryPoint));\r\n \r\n cx.putThreadLocal(\"globalScope\", globalScope);\r\n // Define thread-local variables\r\n threadScope.defineProperty(\"request\", request, PROTECTED);\r\n threadScope.defineProperty(\"response\", response, PROTECTED);\r\n \r\n // Evaluate the script in this scope\r\n s.evaluate(cx, threadScope);\r\n } catch (Throwable ex) {\r\n handleError(response,ex);\r\n } finally {\r\n Context.exit();\r\n }\r\n }", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "private void doLocalCall() {\n\n // Create the intent used to identify the bound service\n final Intent boundIntent = new Intent(this, MyLocalBoundService.class);\n\n // Lets get a reference to it (asynchronously, hence the ServiceConnection object)\n bindService(boundIntent, new ServiceConnection() {\n @Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n // Let's call it!\n ((MyLocalBoundServiceContract) service).doSomething(10);\n // We're done. Free the reference to the service\n unbindService(this);\n }\n\n @Override\n public void onServiceDisconnected(ComponentName name) {\n // Called upon unbind, just in case we need some cleanup\n }\n }, Context.BIND_AUTO_CREATE);\n }", "public void execute( I18n i18n, Object[] args ) throws Throwable\n {\n scriptObjectMirror.callMember( methodName, args );\n }", "public interface LocaleContext {\n Locale getLocale();\n}", "@Override\n\tpublic String call() throws Exception {\n\t\treturn \"hello\";\n\t}", "public static String call(PageContext pc, String input) throws PageException {\n \t\treturn invoke( pc.getConfig(), input, null, null, 1 );\n \t}", "public <T> T performWorkWithContext(\n PrefabContextSetReadable prefabContext,\n Callable<T> callable\n ) throws Exception {\n try (PrefabContextScope ignored = performWorkWithAutoClosingContext(prefabContext)) {\n return callable.call();\n }\n }", "<T> T runGroovyScript(String name, Map<String, Object> context);", "void localizationChaneged();", "private Response execute_work(Request request){\n if (request.getFname().equals(\"tellmenow\")){\n int returnValue = tellMeNow();\n }\n else if(request.getFname().equals(\"countPrimes\")){\n int returnValue = countPrimes(request.getArgs()[0]);\n }\n else if(request.getFname().equals(\"418Oracle\")){\n int returnValue = oracle418();\n }\n else{\n System.out.println(\"[Worker\"+String.valueOf(this.id)+\"] WARNING function name not recognized, dropping request\");\n }\n\n return new Response(id,request.getId(),request.getFname(),0);//0 meaning ok!\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"com/i18n/common/application-context.xml\");\r\n\t\tSystem.out.println(\"ApplicationContext class Object type \"+applicationContext.getClass().getName());\r\n\t\tString messageFromApplivationContext = applicationContext.getMessage(\"title\",null,Locale.getDefault());\r\n\t\tSystem.out.println(\"Message From ApplicationContext \"+messageFromApplivationContext);;\r\n\t\t\r\n\t}", "@Override\n protected void callFunction(final String name, final Object... arguments) {\n\n if (!unsupported) {\n super.callFunction(name, arguments);\n } else {\n Logger.getLogger(getClass().getName()).warning(\n \"PushState is unsupported by the client \"\n + \"browser. Ignoring RPC call for \"\n + getClass().getSimpleName() + \".\" + name);\n }\n }", "@Override\n\tpublic String call() throws Exception {\n\t\t\n\t\tString name = Thread.currentThread().getName();\n\t\tSystem.out.println(name + \" is running...\");\n\t\tlong s = getRandomSleep();\n\t\tSystem.out.println(name + \" will sleep \" + s);\n\t\tThread.sleep(s);\n\t\treturn name + \" \"+runtimeFmt();\n\t}", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "T call() throws EvalException, InterruptedException;", "void setLocalExecutionEnabled(final boolean localExecutionEnabled);", "default void withContext(String tenantId, Runnable runnable) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n runnable.run();\n } finally {\n setContext(origContext.orElse(null));\n }\n }", "public interface LocaleSettingsExtPoint extends CSSStartupExtensionPoint\n{\n\t/** The name of this extension point element */\n\tpublic static final String NAME = \"locale\"; //$NON-NLS-1$\n\t\n\t/**\n\t * Applies the locale settings. The locale settings can be gathered from any\n\t * location specified by the implementation and can be set to whatever part\n\t * of the application.\n\t * \n\t * @param context the application context which triggered this call and for\n\t * \t\t\twhich the settings are being applied\n\t * @param parameters contains additional parameters, which can define\n\t * \t\t\tsome special behavior during the execution of this method (the keys\n\t * \t\t\tare parameters names and the values are parameters values)\n\t * \n\t * @return the exit code if something happened which requires to exit or restart \n\t * \t\t\tapplication or null if everything is alright\n\t * \n\t * @throws Exception if an error occurred during the operation\n\t */\n\tpublic Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;\n}", "public void testPrivilegedCallableUsingCCLWithPrivs() throws Exception {\n Runnable r = new CheckedRunnable() {\n public void realRun() throws Exception {\n Executors.privilegedCallableUsingCurrentClassLoader\n (new NoOpCallable())\n .call();\n }};\n\n runWithPermissions(r,\n new RuntimePermission(\"getClassLoader\"),\n new RuntimePermission(\"setContextClassLoader\"));\n }", "public void render(Callable<Object> callable) {\n\t\trenderQueue.enqueue(callable);\n\t}", "public void init() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();//gets the info from the URL\n this.setFormId(paramMap.get(\"id\"));//gets the form ID from the URL and sets it to the variable\n\n\n this.startDateQuestionSet();//executes the method\n this.startMultQuestionSet();//executes the method\n this.startSingleQuestionSet();//executes the method\n this.startTextQuestionSet();//executes the method\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "public interface SchedulerProvider {\n Scheduler background();\n Scheduler ui();\n}", "protected abstract String invoke(HttpServletRequest request) throws DriverException, WorkflowException;", "public static void main(String[] args) {\n\t\tWithoutThreadLocal safetask = new WithoutThreadLocal();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tThread thread = new Thread(safetask);\n\t\t\tthread.start();\n\t\t\ttry {\n\t\t\t\tTimeUnit.SECONDS.sleep(2);\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\tSystem.out.println(\"This output is thread local\");\n\t\t//Thsi Code is with thread local cocept\n\t\tWithThreadLocal task = new WithThreadLocal();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tThread thread = new Thread(task);\n\t\t\tthread.start();\n\t\t\ttry {\n\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "@Override\r\n\tpublic int call(Runnable thread_base, String strMsg) {\n\t\treturn 0;\r\n\t}", "public abstract ApplicationLoader.Context context();", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n log.debug(START_COMMAND);\n String language = request.getParameter(Constant.LANGUAGE);\n log.debug(Constant.LANGUAGE + language);\n HttpSession session = request.getSession();\n session.setAttribute(Constant.LANGUAGE, language);\n log.debug(END_COMMAND);\n return Path.COMMAND_MASTER_SERVICES;\n }", "public DefaultScriptExecutor(String language) {\n\t\tScriptEngineManager manager = new ScriptEngineManager();\n\t\tif (log.isDebugEnabled()){\n\t\t\tfor (ScriptEngineFactory factory: manager.getEngineFactories()) {\n\t\t\t\tlog.debug(factory.getNames());\n\t\t\t}\n\t\t}\n\t\t\n\t\tscriptEngine = manager.getEngineByName(language);\n\t\tAssert.notNull(scriptEngine,\"JVM cannot create a script engine for name [\" + language + \"]\"); \n\t\t\n\t}", "@Override\r\n\tpublic void call(String value) {\n\t\t\r\n\t}", "@Override\n public Integer call() {\n if (properties != null && !properties.isEmpty()) {\n System.getProperties().putAll(properties);\n }\n\n final List<File> templateDirectories = getTemplateDirectories(baseDir);\n\n final Settings settings = Settings.builder()\n .setArgs(args)\n .setTemplateDirectories(templateDirectories)\n .setTemplateName(template)\n .setSourceEncoding(sourceEncoding)\n .setOutputEncoding(outputEncoding)\n .setOutputFile(outputFile)\n .setInclude(include)\n .setLocale(locale)\n .isReadFromStdin(readFromStdin)\n .isEnvironmentExposed(isEnvironmentExposed)\n .setSources(sources != null ? sources : new ArrayList<>())\n .setProperties(properties != null ? properties : new HashMap<>())\n .setWriter(writer(outputFile, outputEncoding))\n .build();\n\n try {\n return new FreeMarkerTask(settings).call();\n } finally {\n if (settings.hasOutputFile()) {\n close(settings.getWriter());\n }\n }\n }", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "public void setCurrentTaskName(String name);", "String execute(HttpServletRequest request);", "private void invokeStockMarketModule(String resourceName)\r\n {\r\n\r\n debug(\"invokeStockMarketModule(\" + resourceName + \") - preparing to change\");\r\n debug(\"invokeStockMarketModule() - shudown thread timers\");\r\n shutdownWatchListTimers();\r\n\r\n debug(\"invokeStockMarketModule() - get a handle to the main application\");\r\n StockMarketApp mainApp = getMainApp();\r\n\r\n if (mainApp != null)\r\n {\r\n debug(\"invokeStockMarketModule() - Sending message to change applications\");\r\n mainApp.notifyChangeModules(resourceName);\r\n }\r\n else\r\n {\r\n System.out.println(\"invokeStockMarketModule() - module [\" + resourceName + \"] cannot be invoked!\");\r\n System.out.println(\" - This function only works when... \");\r\n System.out.println(\" - The Full Application is running.\");\r\n }\r\n\r\n debug(\"invokeStockMarketModule() - Processing completed\");\r\n }", "public static void fromCallable() {\n Observable<List<String>> myObservable = Observable.fromCallable(() -> {\n System.out.println(\"call, thread = \" + Thread.currentThread().getName());\n return Utils.getData();\n });\n myObservable.subscribeOn(Schedulers.io())\n //.observeOn(AndroidSchedulers.mainThread()) For ANDROID use Android Schedulers.\n .observeOn(Schedulers.newThread()) // For ease of unit test, this is used\n .subscribe(consumerList);\n }", "@Override\n public void run() {\n sensitiva(\"nombre\");\n }", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "public String call() {\n\t\treturn Thread.currentThread().getName() + \" executing ...\" + count.incrementAndGet(); // Consumer\n\t}", "public abstract String resolveText(Locale locale, String key, Serializable[] arguments);", "@Override\n public Object run() throws ZuulException {\n HttpServletRequest req = RequestContext.getCurrentContext().getRequest();\n logger.info(\">>> Request uri : {} \" , req.getRequestURL());\n return null;\n }", "private void setTranslationKey(String name) {\n\t\t\r\n\t}", "public static String getScript(String localeID) {\n/* 265 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void executeUserHook(String username) {\n hookServiceProvider.get().execute(hookContextFactory.createUserHookContext(username));\n }", "public static void setTLSContextName(String name) {\n TLSContextName = name;\n }", "@Override\n\t\t\tpublic void execute(GameEngine context) {\n\t\t\t\tWorld.getWorld().tickManager.submit(tickable);\n\t\t\t}", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n log.trace(View.COMMAND_EXECUTE + this.getClass().getName());\n if(request.getParameter(View.COUNTRY_PAGE).equals(View.UA)){\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeUA));\n }else {\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeEN));\n }\n Command command = CommandList.valueOf(View.DRAW_INDEX).getCommand();\n return command.execute(request,response);\n }", "public interface ModuleCall {\n void initContext(Context context);\n}", "public Object invoke(String name, Object... args) throws Exception;", "public static String getDisplayScript(String localeID, String displayLocaleID) {\n/* 595 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public interface BeanInvoker<T> {\n\n default void invoke(T param) throws Exception {\n ManagedContext requestContext = Arc.container().requestContext();\n if (requestContext.isActive()) {\n invokeBean(param);\n } else {\n try {\n requestContext.activate();\n invokeBean(param);\n } finally {\n requestContext.terminate();\n }\n }\n }\n\n void invokeBean(T param) throws Exception;\n\n}", "void call();", "public static String getDisplayScript(String localeID, ULocale displayLocale) {\n/* 604 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "String GetTaskName(int Catalog_ID);", "protected void sequence_LanguageName(ISerializationContext context, LanguageName semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getLanguageName_Id()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getLanguageName_Id()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getLanguageNameAccess().getIdIDTerminalRuleCall_0(), semanticObject.getId());\n\t\tfeeder.finish();\n\t}", "public static <V> V execute(String context, String uniqueLockId, String operationName, Callable<V> callable) throws Exception {\n String uniqueLockResource = getUniqueLockResource(context, uniqueLockId);\n Lock lock = getLock(uniqueLockResource);\n return LockUtils.executeInLock(uniqueLockResource, \"\", operationName, lock, callable);\n }", "public void testPrivilegedCallableWithPrivs() throws Exception {\n Runnable r = new CheckedRunnable() {\n public void realRun() throws Exception {\n Executors.privilegedCallable(new CheckCCL()).call();\n }};\n\n runWithPermissions(r,\n new RuntimePermission(\"getClassLoader\"),\n new RuntimePermission(\"setContextClassLoader\"));\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\t\t\t\tif(mSp.getBoolean(\"auto_update\", true)){\r\n\t\t\t\t\tupdateUtils.getCloudVersion();//当获取当前包名后就发出请求\r\n\t\t\t\t}else{\r\n\t\t\t\t\tupdateUtils.enterHome();\r\n\t\t\t\t}\t\r\n\t\t\t}", "Object executeRVMFunction(String uid_func, IValue[] posArgs, Map<String,IValue> kwArgs){\n\t\t// Assumption here is that the function called is not a nested one and does not use global variables\n\t\tFunction func = functionStore[functionMap.get(uid_func)];\n\t\treturn executeRVMFunction(func, posArgs, kwArgs);\n\t}", "public void registerCurrentThread() {\n // Remember this stage in TLS so that rendering thread can get it later.\n THREAD_LOCAL_STAGE.set(this);\n }", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "@Override\n public CompletionStage<Result> call(final Http.Context ctx) {\n final RequestHookRunner hookRunner = injector.instanceOf(RequestHookRunner.class);\n HttpRequestStartedHook.runHook(hookRunner, ctx);\n return delegate.call(ctx)\n .thenCompose(result -> hookRunner.waitForHookedComponentsToFinish()\n .thenApplyAsync(unused -> HttpRequestEndedHook.runHook(hookRunner, result), HttpExecution.defaultContext()));\n }", "protected final <T> Optional<T> getLocalCache(CacheKeyOptional<T> key,\n Callable<Optional<T>> caller\n ){\n try {\n return key.cast(spanOptionalCache.get(key, caller));\n } catch (ExecutionException e) {\n throw new RuntimeException(e.getCause());\n }\n }", "@Override\n\tpublic Object run() throws ZuulException {\n\t\tRequestContext requestContext = RequestContext.getCurrentContext();\n\t\tHttpServletRequest request = requestContext.getRequest();\n\t\trequestContext.set(FilterConstants.LOAD_BALANCER_KEY, request.getHeader(CUSTOM_ROUTE_HEADER));\n\t\t\n\t\treturn null;\n\t}", "String execute(HttpServletRequest request) throws Exception;", "@Override\r\n\tpublic void subTask(String name) {\n\t}", "private void YeWuMethod(String name) {\n\n for (int j = 0; j < 10; j++) {\n\n\n// Runnable task = new RunnableTask();\n// Runnable ttlRunnable = TtlRunnable.get(task);\n\n// executor.execute(ttlRunnable);\n\n executor.execute(() -> {\n System.out.println(\"==========\"+name+\"===\"+threadLocal.get());\n });\n }\n\n// for (int i = 0; i < 10; i++) {\n// new Thread(() -> {\n// System.out.println(name+\"===\"+threadLocal.get());\n// }, \"input thread name\").start();\n// }\n\n\n\n\n }", "@Override\n public void run() {\n AlertDialog.Builder dialog = new AlertDialog.Builder( getMapController().getContext());\n dialog.setTitle(geoCode.getDisplayName());\n dialog.show();\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}", "public boolean execute(String name, String[] args) {\n\t\tif (!load(name, args))\n\t\t\treturn false;\n\n\t\tthread = new UThread(this);\n\t\tthread.setName(name).fork();\n\n\t\treturn true;\n }", "@Override\n public Object run() throws ZuulException {\n HttpServletRequest request = RequestContext.getCurrentContext().getRequest();\n logger.info(\"request-> {} request uri -> {}\", request, request.getRequestURI());\n\n return null;\n }", "public MimeLookupLanguageProviderTest(String name) {\n super(name);\n }", "protected void execute() {\n\t\tContainer container = (Container) model;\n\t\tString name = Utilities.ask(\"Component name?\");\n\t\ttry {\n\t\t\tcontainer.launch(name);\n\t\t}catch(Exception e) {\n\t\t\t//Utilities.error(\"must be component name\");\n\t\t\tUtilities.error(e.getMessage());\n\t\t\t//System.out.println(\"The name:\" + name);\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinvoke();\n\t\t\t\t\t}", "@Override\n protected Thread createThread(final Runnable runnable, final String name) {\n return new Thread(runnable, Thread.currentThread().getName() + \"-exec\");\n }", "public void runtimeCallback(final x10.core.Rail<java.lang.String> args) {\r\n // call the original app-main method\r\n p1.main(args);\r\n }" ]
[ "0.7303237", "0.67714393", "0.66616035", "0.52411526", "0.50503963", "0.480956", "0.48037565", "0.48006684", "0.47934303", "0.47732446", "0.46745998", "0.46326265", "0.46280134", "0.44978708", "0.4476431", "0.4467011", "0.43947855", "0.43824723", "0.43768698", "0.4372225", "0.43649226", "0.4353373", "0.4347245", "0.43463156", "0.4337237", "0.43130013", "0.42983127", "0.42746496", "0.42636794", "0.42338133", "0.42312506", "0.4231018", "0.42221737", "0.4204886", "0.41981897", "0.41891384", "0.41852397", "0.41844124", "0.41800594", "0.41718733", "0.41717005", "0.4160163", "0.415129", "0.4147672", "0.41335958", "0.41262516", "0.41250128", "0.41246325", "0.41223186", "0.41060042", "0.41047943", "0.40989035", "0.4096654", "0.40936384", "0.40869728", "0.40868697", "0.4077889", "0.40765554", "0.40754247", "0.40586904", "0.4044757", "0.4042138", "0.4042068", "0.40407333", "0.40281013", "0.40280977", "0.4022941", "0.40130803", "0.40119085", "0.4007771", "0.39988324", "0.3997758", "0.39976424", "0.39924902", "0.39914787", "0.3988109", "0.39729568", "0.39606982", "0.39566198", "0.3955109", "0.39503664", "0.39493078", "0.39455837", "0.39425457", "0.3940532", "0.39352608", "0.39335564", "0.39286643", "0.39264867", "0.39217576", "0.39098594", "0.3909719", "0.3905763", "0.39041162", "0.3900648", "0.3898389", "0.38978046", "0.38948545", "0.3893996", "0.389179" ]
0.5822177
3
Executes a callable, ensuring that Wicket's threadlocal context is available during the execution. This method sets the given locale on the Wicket Session and uses the Wicket application with the given name.
<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T runWithContext(Callable<T> callable, Locale locale) throws Exception;", "<T> T runWithContext(WebApplication application, Callable<T> callable, Locale locale) throws Exception;", "@Override\r\n\tpublic String execute(HttpServletRequest request) {\t\t\r\n\t\tString page = ConfigurationManager.getProperty(\"path.page.login\");\r\n\t\tString language = request.getParameter(PARAM_NAME_LANGUAGE);\r\n\t\tswitch (language) {\r\n\t\tcase \"en\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"en\");\r\n\t\t\tbreak;\r\n\t\tcase \"ru\":\r\n\t\t\trequest.getSession().setAttribute(\"lang\", \"ru\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn page;\r\n\t}", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "public Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;", "public <T> T executeInApplicationScope(Callable<T> op) throws Exception {\n return manager.executeInApplicationContext(op);\n }", "private void setLocale( String localeName )\r\n\t{\r\n\t\tConfiguration conf = getResources().getConfiguration();\r\n\t\tconf.locale = new Locale( localeName );\r\n\t\t\r\n\t\tsetCurrentLanguage( conf.locale.getLanguage() );\r\n\r\n\t\tDisplayMetrics metrics = new DisplayMetrics();\r\n\t\tgetWindowManager().getDefaultDisplay().getMetrics( metrics );\r\n\t\t\r\n\t\t// the next line just changes the application's locale. It changes this\r\n\t\t// globally and not just in the newly created resource\r\n\t\tResources res = new Resources( getAssets(), metrics, conf );\r\n\t\t// since we don't need the resource, just allow it to be garbage collected.\r\n\t\tres = null;\r\n\r\n\t\tLog.d( TAG, \"setLocale: locale set to \" + localeName );\r\n\t}", "public interface LocaleContext {\n Locale getLocale();\n}", "<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;", "public static void initForWeChatTranslate(String str, ApplicationInfo applicationInfo, ClassLoader classLoader) {\n if (\"com.hkdrjxy.wechart.xposed.XposedInit\".equals(str)) {\n if (\"com.hiwechart.translate\".equals(applicationInfo.processName) || \"com.tencent.mm\".equals(applicationInfo.processName)) {\n final IBinder[] iBinderArr = new IBinder[1];\n Intent intent = new Intent();\n intent.setAction(\"com.hiwechart.translate.aidl.TranslateService\");\n intent.setComponent(new ComponentName(\"com.hiwechart.translate\", \"com.hiwechart.translate.aidl.TranslateService\"));\n appContext.bindService(intent, new ServiceConnection() {\n public void onServiceDisconnected(ComponentName componentName) {\n }\n\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n iBinderArr[0] = iBinder;\n }\n }, 1);\n Class findClass = XposedHelpers.findClass(\"android.os.ServiceManager\", classLoader);\n final String str2 = VERSION.SDK_INT >= 21 ? \"user.wechart.trans\" : \"wechart.trans\";\n XposedHelpers.findAndHookMethod(findClass, \"getService\", String.class, new XC_MethodHook() {\n /* access modifiers changed from: protected */\n public void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {\n super.beforeHookedMethod(methodHookParam);\n if (str2.equals(methodHookParam.args[0])) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"get service :\");\n sb.append(iBinderArr[0]);\n Log.i(\"mylog\", sb.toString());\n methodHookParam.setResult(iBinderArr[0]);\n }\n }\n });\n }\n }\n }", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "public void setLocale (\r\n String strLocale) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public static void setCurrentLocale(HttpSession session, Locale locale) {\r\n\t\tif (session == null)\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Cannot set an attribute on a null session\");\r\n\t\tif (locale == null)\r\n\t\t\tthrow new IllegalArgumentException(\"the value of the \"\r\n\t\t\t\t\t+ CURRENT_LOCALE_NAME + \" attribute should not be null\");\r\n\t\tsession.setAttribute(CURRENT_LOCALE_NAME, locale);\r\n\t}", "void onUpdateCachedEngineName(FirstRunActivity caller);", "public void setLocale(Locale locale) {\n fLocale = locale;\n }", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "public void updateLanguage() {\n try {\n getUserTicket().setLanguage(EJBLookup.getLanguageEngine().load(updateLanguageId));\n } catch (FxApplicationException e) {\n new FxFacesMsgErr(e).addToContext();\n }\n }", "public void setUserLocale(String userLocale) {\n sessionData.setUserLocale(userLocale);\n }", "public interface LocaleSettingsExtPoint extends CSSStartupExtensionPoint\n{\n\t/** The name of this extension point element */\n\tpublic static final String NAME = \"locale\"; //$NON-NLS-1$\n\t\n\t/**\n\t * Applies the locale settings. The locale settings can be gathered from any\n\t * location specified by the implementation and can be set to whatever part\n\t * of the application.\n\t * \n\t * @param context the application context which triggered this call and for\n\t * \t\t\twhich the settings are being applied\n\t * @param parameters contains additional parameters, which can define\n\t * \t\t\tsome special behavior during the execution of this method (the keys\n\t * \t\t\tare parameters names and the values are parameters values)\n\t * \n\t * @return the exit code if something happened which requires to exit or restart \n\t * \t\t\tapplication or null if everything is alright\n\t * \n\t * @throws Exception if an error occurred during the operation\n\t */\n\tpublic Object applyLocaleSettings(IApplicationContext context, Map<String, Object> parameters) throws Exception;\n}", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n log.debug(START_COMMAND);\n String language = request.getParameter(Constant.LANGUAGE);\n log.debug(Constant.LANGUAGE + language);\n HttpSession session = request.getSession();\n session.setAttribute(Constant.LANGUAGE, language);\n log.debug(END_COMMAND);\n return Path.COMMAND_MASTER_SERVICES;\n }", "public Future<Void> setLanguage(String pLanguage) throws DynamicCallException, ExecutionException{\n return call(\"setLanguage\", pLanguage);\n }", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "private void setLocale(String lang) {\n Locale myLocale = new Locale(lang);\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration conf = res.getConfiguration();\n conf.setLocale(myLocale);\n res.updateConfiguration(conf, dm);\n Intent refresh = new Intent(this, MainActivity.class);\n startActivity(refresh);\n finish();\n }", "void localizationChaneged();", "<T> T runWithContext(WebApplication application, Callable<T> callable) throws Exception;", "private void setLanguageForApp(){\n String lang = sharedPreferences.getString(EXTRA_PREF_LANG,\"en\");\n\n Locale locale = new Locale(lang);\n Resources resources = getResources();\n Configuration configuration = resources.getConfiguration();\n DisplayMetrics displayMetrics = resources.getDisplayMetrics();\n configuration.setLocale(locale);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n getApplicationContext().createConfigurationContext(configuration);\n } else {\n resources.updateConfiguration(configuration,displayMetrics);\n }\n getApplicationContext().getResources().updateConfiguration(configuration, getApplicationContext().getResources().getDisplayMetrics());\n }", "protected void localeChanged() {\n\t}", "@Override\n public String execute(final HttpServletRequest request, final HttpServletResponse response, ModelMap model) throws Exception {\n request.getSession().setAttribute(\"language\", request.getParameter(\"language\"));\n\n\n // model.addAttribute(\"language\",request.getParameter(\"language\"));\n // model.addAttribute(\"loginmessage\",\"null\");\n\n request.getSession().setAttribute(\"loginmessage\", \"\");\n return \"login\";\n }", "protected void launchLocaleSettings() {\r\n\t\tIntent queryIntent = new Intent(Intent.ACTION_MAIN);\r\n\t\tqueryIntent.setClassName(\"com.android.settings\", \"com.android.settings.LanguageSettings\");\r\n\t\tqueryIntent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY|Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\tstartActivity(queryIntent);\r\n\t\t\r\n\t}", "@Override\n\tpublic void execute() {\n\t\ttry {\n\t\t\tProperties properties\t = new Properties();\n\t\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\t\tInputStream propertiesFile = classLoader.getResourceAsStream(\"languages/language_\" + lang + \".properties\");\n\t\t\tproperties.load(propertiesFile);\n\t\t\tResultSearchFrame rsf = new ResultSearchFrame(properties.getProperty(\"view_search_result\") , dto.getRootNode() , dto.getSessionId() , dto.getSearchName() , wordManagerFrame.getTransmitter() , lang);\n\t\t\trsf.showWindows();\n\t\t\tpropertiesFile.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Problem to load languages\" , e);\n\t\t}\n\t\t\n\t}", "private void translate()\r\n\t{\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\t\r\n\t\tString language = locale.getLanguage();\r\n\t\t\r\n\t\ttranslate(language);\r\n\t}", "public void setPreferredLocale(Locale locale);", "public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n log.trace(View.COMMAND_EXECUTE + this.getClass().getName());\n if(request.getParameter(View.COUNTRY_PAGE).equals(View.UA)){\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeUA));\n }else {\n request.getSession().setAttribute(View.BUNDLE,ResourceBundle.getBundle(View.BUNDLE_NAME , View.localeEN));\n }\n Command command = CommandList.valueOf(View.DRAW_INDEX).getCommand();\n return command.execute(request,response);\n }", "public void setLocale(Locale locale) {\n/* 462 */ ParamChecks.nullNotPermitted(locale, \"locale\");\n/* 463 */ this.locale = locale;\n/* 464 */ setStandardTickUnits(createStandardDateTickUnits(this.timeZone, this.locale));\n/* */ \n/* 466 */ fireChangeEvent();\n/* */ }", "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n/* 28: */ throws ServletException\r\n/* 29: */ {\r\n/* 30:67 */ String newLocale = request.getParameter(this.paramName);\r\n/* 31:68 */ if (newLocale != null)\r\n/* 32: */ {\r\n/* 33:69 */ LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);\r\n/* 34:70 */ if (localeResolver == null) {\r\n/* 35:71 */ throw new IllegalStateException(\"No LocaleResolver found: not in a DispatcherServlet request?\");\r\n/* 36: */ }\r\n/* 37:73 */ localeResolver.setLocale(request, response, StringUtils.parseLocaleString(newLocale));\r\n/* 38: */ }\r\n/* 39:76 */ return true;\r\n/* 40: */ }", "public void setRequestedLocale(final Locale val) {\n requestedLocale = val;\n }", "public static void setLocale(Locale locale) {\n// Recarga las entradas de la tabla con la nueva localizacion \n RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, locale);\n}", "public static void setlanguage(Context ctx, String latitude) {\n\t\tEditor editor = getSharedPreferences(ctx).edit();\n\t\teditor.putString(language, latitude);\n\t\teditor.commit();\n\t}", "public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}", "public static void setApplicationLanguage(Context context, String code) {\n\t\tResources res = context.getResources();\n\t\tConfiguration androidConfiguration = res.getConfiguration();\n\t\t\n\t\tandroidConfiguration.locale = new Locale(code);\n\t\tres.updateConfiguration(androidConfiguration, res.getDisplayMetrics());\n\t}", "private void hitChangeLanguageApi(final String selectedLang) {\n progressBar.setVisibility(View.VISIBLE);\n ApiInterface apiInterface = RestApi.createServiceAccessToken(this, ApiInterface.class);//empty field is for the access token\n final HashMap<String, String> params = AppUtils.getInstance().getUserMap(this);\n params.put(Constants.NetworkConstant.PARAM_USER_ID, AppSharedPreference.getInstance().getString(this, AppSharedPreference.PREF_KEY.USER_ID));\n params.put(Constants.NetworkConstant.PARAM_USER_LANGUAGE, String.valueOf(languageCode));\n Call<ResponseBody> call = apiInterface.hitEditProfileDataApi(AppUtils.getInstance().encryptData(params));\n ApiCall.getInstance().hitService(this, call, new NetworkListener() {\n\n @Override\n public void onSuccess(int responseCode, String response, int requestCode) {\n progressBar.setVisibility(View.GONE);\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n switch (responseCode) {\n case Constants.NetworkConstant.SUCCESS_CODE:\n setLanguage(selectedLang);\n// Locale locale = new Locale(language);\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());\n AppUtils.getInstance().openNewActivity(ChangeLanguageActivity.this, new Intent(ChangeLanguageActivity.this, HomeActivity.class));\n break;\n }\n }\n\n\n @Override\n public void onError(String response, int requestCode) {\n AppUtils.getInstance().printLogMessage(Constants.NetworkConstant.ALERT, response);\n progressBar.setVisibility(View.GONE);\n }\n\n\n @Override\n public void onFailure() {\n progressBar.setVisibility(View.GONE);\n }\n }, 1);\n }", "@Override\r\n public void service(HttpServletRequest request, \r\n HttpServletResponse response) {\r\n Context cx = Context.enter();\r\n //cx.setOptimizationLevel(-1);\r\n cx.putThreadLocal(\"rhinoServer\",RhinoServlet.this);\r\n try {\r\n \r\n // retrieve JavaScript...\r\n JavaScript s = loader.loadScript(entryPoint);\r\n \r\n ScriptableObject threadScope = makeChildScope(\"RequestScope\", \r\n globalScope.getModuleScope(entryPoint));\r\n \r\n cx.putThreadLocal(\"globalScope\", globalScope);\r\n // Define thread-local variables\r\n threadScope.defineProperty(\"request\", request, PROTECTED);\r\n threadScope.defineProperty(\"response\", response, PROTECTED);\r\n \r\n // Evaluate the script in this scope\r\n s.evaluate(cx, threadScope);\r\n } catch (Throwable ex) {\r\n handleError(response,ex);\r\n } finally {\r\n Context.exit();\r\n }\r\n }", "public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}", "private void setTranslationKey(String name) {\n\t\t\r\n\t}", "@Override\n\tpublic void setLocale(Locale loc) {\n\t}", "public RequestAndSessionLocaleResolver(Locale locale) {\n\t\tsetDefaultLocale(locale);\n\t}", "static private void setLanguage(String strL) {\r\n\r\n\t\tstrLanguage = strL;\r\n\r\n\t\t// need to reload it again!\r\n\t\tloadBundle();\r\n\t}", "void localizationChanged();", "void localizationChanged();", "void localizationChanged();", "public void init() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();//gets the info from the URL\n this.setFormId(paramMap.get(\"id\"));//gets the form ID from the URL and sets it to the variable\n\n\n this.startDateQuestionSet();//executes the method\n this.startMultQuestionSet();//executes the method\n this.startSingleQuestionSet();//executes the method\n this.startTextQuestionSet();//executes the method\n }", "public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }", "public void setLocale(Locale loc) {\n this.response.setLocale(loc);\n }", "public void setLocale (Locale locale) {\n _locale = locale;\n _cache.clear();\n _global = getBundle(_globalName);\n }", "public void setLanguage(String pLanguage) throws DynamicCallException, ExecutionException{\n call(\"setLanguage\", pLanguage).get();\n }", "<T> T callInContext(ContextualCallable<T> callable) {\n InternalContext[] reference = localContext.get();\n if (reference[0] == null) {\n reference[0] = new InternalContext(this);\n try {\n return callable.call(reference[0]);\n }\n finally {\n // Only remove the context if this call created it.\n reference[0] = null;\n }\n }\n else {\n // Someone else will clean up this context.\n return callable.call(reference[0]);\n }\n }", "public void setLocale(String locale) {\n locale = fixLocale(locale);\n this.locale = locale;\n this.uLocale = new ULocale(locale);\n String lang = uLocale.getLanguage();\n if (locale.equals(\"fr_CA\") || lang.equals(\"en\")) {\n throw new RuntimeException(\"Skipping \" + locale);\n }\n cldrFile = cldrFactory.make(locale, false);\n UnicodeSet exemplars = cldrFile.getExemplarSet(\"\",WinningChoice.WINNING);\n usesLatin = exemplars != null && exemplars.containsSome(LATIN_SCRIPT);\n for (DataHandler dataHandler : dataHandlers) {\n dataHandler.reset(cldrFile);\n }\n }", "public void showLanguage(String which){\n switch (which) {\n case \"en\":\n locale = new Locale(\"en\");\n config.locale = locale;\n //MainActivity.language = 0;\n languageToLoadWizard=\"en\";\n break;\n case \"sw\":\n locale = new Locale(\"sw\");\n config.locale = locale;\n //MainActivity.language = 1;\n languageToLoadWizard=\"sw\";\n break;\n case \"es\":\n locale = new Locale(\"es\");\n config.locale = locale;\n languageToLoadWizard=\"es\";\n break;\n }\n getResources().updateConfiguration(config, null);\n Intent refresh = new Intent(Language.this, Wizard.class);\n startActivity(refresh);\n finish();\n }", "public void setApplicationLanguage() {\n\t\tinitializeMixerLocalization();\n\t\tinitializeRecorderLocalization();\n\t\tinitializeMenuBarLocalization();\n\t\tsetLocalizedLanguageMenuItems();\n\t\tboardController.setLocalization(bundle);\n\t\tboardController.refreshSoundboard();\n\t}", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "protected void setFallbackLanguage(final HttpServletRequest httpRequest, final Boolean enabled)\n\t{\n\t\tfinal SessionService sessionService = getSessionService(httpRequest);\n\t\tif (sessionService != null)\n\t\t{\n\t\t\tsessionService.setAttribute(LocalizableItem.LANGUAGE_FALLBACK_ENABLED, enabled);\n\t\t\tsessionService.setAttribute(AbstractItemModel.LANGUAGE_FALLBACK_ENABLED_SERVICE_LAYER, enabled);\n\t\t}\n\t}", "public void setLocale(Locale locale) {\n\n\t}", "@Test\r\n\tpublic void testSessionLocale() throws Exception {\n\t}", "public Lab2_InternationalizedWarehouse() {\n enLocale = new Locale(\"en\", \"US\");\n plLocale = new Locale(\"pl\", \"PL\");\n initComponents();\n initStorage();\n itemsList = new ItemsList();\n plLangRadioButton.doClick();\n loadButton.doClick();\n langButtonGroup.add(plLangRadioButton);\n langButtonGroup.add(enLangRadioButton);\n\n }", "@SuppressWarnings(\"deprecation\")\r\n public void setLanguage(String langTo) {\n Locale locale = new Locale(langTo);\r\n Locale.setDefault(locale);\r\n\r\n Configuration config = new Configuration();\r\n\r\n config.setLocale(locale);//config.locale = locale;\r\n\r\n if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {\r\n createConfigurationContext(config);\r\n } else {\r\n getResources().updateConfiguration(config, getResources().getDisplayMetrics());\r\n }\r\n\r\n //createConfigurationContext(config);\r\n getResources().updateConfiguration(config, getApplicationContext().getResources().getDisplayMetrics());//cannot resolve yet\r\n //write into settings\r\n SharedPreferences.Editor editor = mSettings.edit();\r\n editor.putString(APP_PREFERENCES_LANGUAGE, langTo);\r\n editor.apply();\r\n //get appTitle\r\n if(getSupportActionBar()!=null){\r\n getSupportActionBar().setTitle(R.string.app_name);\r\n }\r\n\r\n }", "@RequestMapping(value = \"/getLocaleLang\", method = RequestMethod.GET)\n\tpublic String getLocaleLang(ModelMap model, HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows CustomException {\n\n\t\tlog.info(\"Received request for locale change\");\n\t\tEndUser user = endUserDAOImpl.findByUsername(getCurrentLoggedUserName()).getSingleResult();\n\t\tLocaleResolver localeResolver = new CookieLocaleResolver();\n\t\tLocale locale = new Locale(request.getParameter(\"lang\"));\n\t\tlocaleResolver.setLocale(request, response, locale);\n\t\tuser.setPrefferedLanguage(request.getParameter(\"lang\"));\n\n\t\tendUserDAOImpl.update(user);\n\t\treturn \"redirect:adminPage\";\n\t}", "private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setContexto() {\n this.contexto = FacesContext.getCurrentInstance().getViewRoot().getLocale().toString();\r\n // this.contexto =httpServletRequest.getLocale().toString();\r\n \r\n \r\n //obtenemos el HttpServletRequest de la peticion para poder saber\r\n // el locale del cliente\r\n HttpServletRequest requestObj = (HttpServletRequest) \r\n FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n \r\n //Locale del cliente\r\n this.contextoCliente = requestObj.getLocale().toString();\r\n \r\n \r\n //Asignamos al locale de la aplicacion el locale del cliente\r\n FacesContext.getCurrentInstance().getViewRoot().setLocale(requestObj.getLocale());\r\n }", "default void withContext(String tenantId, Runnable runnable) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n runnable.run();\n } finally {\n setContext(origContext.orElse(null));\n }\n }", "public interface Translator\n{\n Locale SWEDISH = Locale.forLanguageTag(\"sv\");\n\n List<Locale> supportedLanguages();\n Map<Locale, List<Locale>> supportedDirections();\n Translation translate(Translation message);\n String pageTranslationURL(String sourceURL, Translation message);\n}", "public String changeLeguage(){\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tLocale miLocale = new Locale(\"en\",\"US\");\r\n\t\tcontext.getViewRoot().setLocale(miLocale);\r\n\t\treturn \"login\";\r\n\t}", "@Override\n public void setLocale(Locale arg0) {\n\n }", "private Locale getBotLocale( HttpServletRequest request )\r\n {\r\n String strLanguage = request.getParameter( PARAMETER_LANGUAGE );\r\n\r\n if ( strLanguage != null )\r\n {\r\n return new Locale( strLanguage );\r\n }\r\n\r\n return LocaleService.getDefault( );\r\n }", "public abstract String resolveText(Locale locale, String key, Serializable[] arguments);", "@RequestMapping(value = \"/messageresource/localize\", method = RequestMethod.GET)\n\tpublic String localizeMessageResource(Model model, Locale locale) {\n\n\t\tlogger.debug(\"localizeMessageResource()\");\n\n\t\tMessageResourceTranslationBackingBean messageResourceTranslationBackingBean = new MessageResourceTranslationBackingBeanImpl();\n\t\tmessageResourceTranslationBackingBean.setCurrentMode(MessageResource.CurrentMode.LOCALIZE);\n\t\tmodel.addAttribute(\"messageResourceTranslationFormModel\", messageResourceTranslationBackingBean);\n\t\tLong defaultLocale = Long.valueOf(Constants.REFERENCE_LOCALE__EN);\n\t\tsetTranslationDropDownContents(model, locale);\n\t\tsetDropDownContents(model, null, locale);\t\t\n\t\tmodel.addAttribute(\"defaultLocale\", defaultLocale);\n\t\t\n\t\treturn \"messages/messageresource_localize\";\n\n\t}", "public static void localize(String text) {\n }", "private void setLocale() {\n\t\tLocale locale = new Locale(this.getString(R.string.default_map_locale));\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config,\n getBaseContext().getResources().getDisplayMetrics());\n\t}", "protected final <T> T getLocalCache(CacheKeyMain<T> key, Callable<T> caller){\n try {\n return key.cast(spanMainCache.get(key, caller));\n } catch (ExecutionException e) {\n throw new RuntimeException(e.getCause());\n }\n }", "@Bean\n LocaleChangeInterceptor localeChangeInterceptor(){\n LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();\n localeChangeInterceptor.setParamName(\"lang\");\n return localeChangeInterceptor;\n }", "protected void sequence_LanguageName(ISerializationContext context, LanguageName semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getLanguageName_Id()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getLanguageName_Id()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getLanguageNameAccess().getIdIDTerminalRuleCall_0(), semanticObject.getId());\n\t\tfeeder.finish();\n\t}", "@Override\n public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException {\n HttpSession session = request.getSession();\n String page = request.getParameter(PAGE);\n String lang = request.getParameter(LANG);\n String parameters = request.getParameter(PARAM);\n session.setAttribute(LANG, lang);\n String address = parameters.isEmpty() ? page : SERVLET + \"?\" + parameters;\n response.sendRedirect(address);\n }", "public /* synthetic */ void lambda$onReceive$1$Clock$2(Locale locale) {\n if (!locale.equals(Clock.this.mLocale)) {\n Clock.this.mLocale = locale;\n Clock.this.mClockFormatString = CodeInjection.MD5;\n }\n }", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor(){\n var lci = new LocaleChangeInterceptor();\n lci.setParamName(\"lang\");// lang para que despues desde la url escojamos el idioma\n return lci;\n }", "void setCurrentLocaleIndex(int value) {\n\n this.currentLocaleIndex = value;\n this.updateBundle();\n }", "@Override\n\tpublic final void setLocale(final Locale locale)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.setLocale(locale);\n\t\t}\n\t}", "@Override\n\tprotected Object getCacheKey(String viewName, Locale locale) {\n\t\treturn viewName;\n\t}", "public Locale getPageLocale(SlingHttpServletRequest request) {\r\n LOG.debug(\"in getPageLocale method\");\r\n try {\r\n Resource resource = request.getResource();\r\n LOG.debug(\"returning locale from getPageLocale\");\r\n return getLanguageManager().getLanguage(resource);\r\n\r\n } catch (Exception e) {\r\n LOG.error(\"error in getPageLocale\", e);\r\n return null;\r\n }\r\n }", "public static void setPreferredLocale(HttpServletRequest request, Locale preferredLocale) {\r\n HttpSession session = request.getSession(true);\r\n session.setAttribute(PREFERRED_LOCALE_SESSION_ATTRIBUTE, preferredLocale);\r\n }", "public void setLocale(Locale locale) {\r\n this.locale = locale;\r\n }", "public void setLocale(Locale locale)\n {\n this.locale = locale;\n }", "public Object call(Context cx, Scriptable scope, Scriptable thisObj,\n Object[] args);", "@Override\n\tpublic void onRestart() {\n\t\tsuper.onRestart();\n\n\t\tSystem.out.println(\"!!!!!!!!!!!!!!!onRestart\");\n\t\tLanguageConvertPreferenceClass.loadLocale(getApplicationContext());\n\t}", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor() {\n LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();\n localeChangeInterceptor.setParamName(\"lang\");\n return localeChangeInterceptor;\n }", "public void execute( I18n i18n, Object[] args ) throws Throwable\n {\n scriptObjectMirror.callMember( methodName, args );\n }", "public static void updateLocale(HttpServletRequest request, Locale locale) {\n\t\tupdateLocale(request.getSession(), locale);\n\t}" ]
[ "0.65414536", "0.6347714", "0.51250017", "0.510103", "0.5011903", "0.48966607", "0.48508757", "0.4821831", "0.47762388", "0.46166947", "0.4599705", "0.459467", "0.45884973", "0.4588082", "0.4571506", "0.4533347", "0.45293435", "0.45261025", "0.4525633", "0.45120502", "0.45095116", "0.45012194", "0.44997898", "0.44881272", "0.44777346", "0.44706073", "0.446888", "0.44578633", "0.44552636", "0.44096068", "0.43930814", "0.43775275", "0.43731838", "0.4370669", "0.43693665", "0.43628216", "0.43578383", "0.4335709", "0.4320331", "0.4319254", "0.43187064", "0.4307031", "0.4305863", "0.4301474", "0.42897424", "0.4286426", "0.42818472", "0.42798528", "0.4273861", "0.42610598", "0.42586222", "0.42586222", "0.42586222", "0.42580712", "0.4250448", "0.42369217", "0.42336652", "0.42267174", "0.42256224", "0.4219317", "0.4212139", "0.42082044", "0.42060554", "0.42021248", "0.41921538", "0.41900295", "0.41780192", "0.41736722", "0.41421777", "0.41390845", "0.4137523", "0.4137523", "0.4135523", "0.41276544", "0.41276285", "0.41265535", "0.41233614", "0.41079098", "0.40953535", "0.40937173", "0.40849772", "0.40723982", "0.40710127", "0.40641156", "0.40610635", "0.40439585", "0.40411553", "0.40386504", "0.40321943", "0.4027234", "0.40259522", "0.40225962", "0.40196425", "0.40156984", "0.4014451", "0.40100762", "0.40087846", "0.4007932", "0.4006365", "0.40041775" ]
0.67292476
0
IndexedDataSource; IndexedDataSource is the interface around which much of Zorbage is organized. Many algorithms take IndexedDataSources as an input and calculate results from their data. An IndexedDataSource can be thought of as an array indexed by longs. In reality an IndexedDataSource might be an actual array, or a JDBC database table or a virtual file backed array or many other possibilities. Zorbage's algorithms do not have to worry about how the data is stored. Any structure can be walked using the interface. In fact in the future Zorbage may provide clustered data access through an IndexedDataSource interface.
void example1() { IndexedDataSource<Float64Member> data = nom.bdezonia.zorbage.storage.Storage.allocate(G.DBL.construct(), 100); Float64Member value = G.DBL.construct(); GetV.fifth(data, value); value.setV(10101); SetV.eighteenth(data, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IndexedDataSet<T> getDataSet();", "public interface DataSource<T> {\n\t/**\n\t * open data source.\n\t */\n\tpublic void open();\n\t/**\n\t * Get the next data object.\n\t * @return data object.\n\t */\n\tpublic T next();\n\t/**\n\t * move vernier to head.\n\t * @return\n\t */\n\tpublic void head();\n\t/**\n\t * close data source.\n\t */\n\tpublic void close();\n\t/**\n\t * get attributes. \n\t * @return\n\t */\n\tpublic Map<String, Object> attributes();\n}", "public interface DataSourceWrapper<D> {\r\n\r\n public void openDataSource() throws Exception;\r\n \r\n public void preValidate() throws Exception;\r\n \r\n public void closeDataSource() throws Exception;\r\n \r\n public void setDataSource(D dataSource);\r\n \r\n public D getDataSource();\r\n \r\n public Iterator<Row> getRowIterator();\r\n \r\n}", "public EODataSource queryDataSource();", "public IterableDataSource(final DataSourceImpl anotherDataSource) {\n super(anotherDataSource);\n }", "public interface IExchangeDataIndexer {\n\t/**\n\t * Get the exchange indexed by this indexer.\n\t * \n\t * @return {@link Exchange}\n\t */\n\tpublic Exchange getExchange();\n\t\n\t/**\n\t * Get the list of indexes managed by this indexer.\n\t * \n\t * @return The list of names of indexes managed by this indexer.\n\t */\n\tpublic List<String> getExchangeIndexes();\n\t\n\t/**\n\t * Updates the list of stocks in this index, by fetching latest data from the source. \n\t * \n\t * @return Updated list of the stocks.\n\t */\n\tList<MarketData> getMarketDataItems(String index);\n\t\n\t/**\n\t * Synchronizes the recently fetched stock data(of a single index) to the data store.\n\t * \n\t * @param exchangeCode Code for this exchange.\n\t * @param items Recently fetched stock data.\n\t */\n\tpublic void syncToDataStore(String exchangeCode, Collection<MarketData> items);\n}", "public interface IDataSource<T, E> {\n void update(T data);\n int getItemCount();\n E getItemForPosition(int index);\n}", "public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}", "public interface CompanyIndexed {\n\n String getCompanyName();\n\n long getCIK();\n\n}", "static DataSource[] _getDataSources () throws Exception {\n SearchOptions opts = new SearchOptions (null, 1, 0, 1000); \n TextIndexer.SearchResult results = _textIndexer.search(opts, null);\n Set<String> labels = new TreeSet<String>();\n for (TextIndexer.Facet f : results.getFacets()) {\n if (f.getName().equals(SOURCE)) {\n for (TextIndexer.FV fv : f.getValues())\n labels.add(fv.getLabel());\n }\n }\n\n Class[] entities = new Class[]{\n Disease.class, Target.class, Ligand.class\n };\n\n List<DataSource> sources = new ArrayList<DataSource>();\n for (String la : labels ) {\n DataSource ds = new DataSource (la);\n for (Class cls : entities) {\n opts = new SearchOptions (cls, 1, 0, 100);\n results = _textIndexer.search(opts, null);\n for (TextIndexer.Facet f : results.getFacets()) {\n if (f.getName().equals(SOURCE)) {\n for (TextIndexer.FV fv : f.getValues())\n if (la.equals(fv.getLabel())) {\n if (cls == Target.class)\n ds.targets = fv.getCount();\n else if (cls == Disease.class)\n ds.diseases = fv.getCount();\n else\n ds.ligands = fv.getCount();\n }\n }\n }\n }\n Logger.debug(\"DataSource: \"+la);\n Logger.debug(\" + targets: \"+ds.targets);\n Logger.debug(\" + ligands: \"+ds.ligands);\n Logger.debug(\" + diseases: \"+ds.diseases);\n \n sources.add(ds);\n }\n\n return sources.toArray(new DataSource[0]);\n }", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "public interface DataSourceFromParallelCollection extends DataSource{\n\n public static final String SPLITABLE_ITERATOR = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_SPLIT_ITERATOR;\n\n public static final String CLASS = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_CLASS;\n\n\n}", "public interface DataSourceIterator extends Iterator<Data> {\n\n}", "EDataSourceType getDataSource();", "@Override\n\tpublic DataSource getDataSource() {\t\t\n\t\treturn dataSource;\n\t}", "public interface TrackDatasource {\n\n}", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public static JRDataSource getDataSource() {\n\t\treturn new CustomDataSource(1000);\n\t}", "public interface IDataSource {\r\n\t\r\n\t/**\r\n\t * Method to check if there are any stored credential in the data store for the user.\r\n\t * @param userId\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public boolean checkAuth(String userId) throws IOException;\r\n\t\r\n\t/**\r\n\t * Method to build the Uri used to redirect the user to the service provider site to give authorization.\r\n\t * @param userId\r\n\t * @param authCallback callback URL used when the app was registered on the service provider site. Some providers require\r\n\t * to specify it with every request.\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public String buildAuthRequest(String userId, String authCallback) throws IOException;\r\n\t\r\n\t/**\r\n\t * Once the user has authorized the application, the provider redirect it on the app using the callback URL. This method \r\n\t * saves the credentials sent back with the request in the data store.\r\n\t * @param userId\r\n\t * @param params HashMap containing all the parameters of the request\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public void saveAuthResponse(String userId, HashMap<String, String> params) throws IOException;\r\n\t\r\n\t/**\r\n\t * Updates data of a single resource\r\n\t * @param userId\r\n\t * @param name resource name as in the XML config file\r\n\t * @param lastUpdate\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public String updateData(String userId, String resourceName, long lastUpdate) throws IOException;\r\n\t\r\n\t/**\r\n\t * Updates data of all resources\r\n\t * @param userId\r\n\t * @param lastUpdate\r\n\t * @return\r\n\t * @throws IOException\r\n\t */\r\n\tabstract public String[] updateAllData(String userId, long lastUpdate) throws IOException;\r\n\t\r\n}", "public org.landxml.schema.landXML11.SourceDataDocument.SourceData getSourceDataArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData target = null;\r\n target = (org.landxml.schema.landXML11.SourceDataDocument.SourceData)get_store().find_element_user(SOURCEDATA$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "String getDataSource();", "public DatasetIndex(Dataset data){\n\t\tthis();\n\t\tfor(Iterator<Example> i=data.iterator();i.hasNext();){\n\t\t\taddExample(i.next());\n\t\t}\n\t}", "@Override\n public String getDataSource()\n {\n return dataSource;\n }", "public interface IITDIndexDAO {\n\n /**\n * Inserts a list of itdIndices into the persistent storage.\n *\n * @param itdIndices A list of {@link ScripITD} instances.\n *\n * @return The number of successful inserts.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n int insert( final List<ScripITD> itdIndices )\n throws DataAccessException ;\n\n /**\n * Inserts an instance of ScripITD into the persistent storage.\n *\n * @param itdIndices A list of {@link ScripITD} instances.\n *\n * @return The number of successful inserts.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n int insert( final ScripITD itdIndex )\n throws DataAccessException ;\n\n /**\n * Returns a list of the latest Scrip ITD instances for all the symbols\n * for whom the intra day data is available.\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getLatestScripITD() throws DataAccessException ;\n\n /**\n * Returns a list of all the intra day ITD markers for the specified symbol\n * for the specified date.\n *\n * @param symbol The NSE symbol for which the ITD data has to be fetched\n * @param date The date for which the data has to be fetched.\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getScripITD( final String symbol, final Date date )\n throws DataAccessException ;\n\n /**\n * Returns a list of all the intra day ITD markers for the specified symbol\n * and the date range specified.\n *\n * @param symbol The NSE symbol for which the ITD data has to be fetched\n * @param start The start date of the date range\n * @param end The end date of the date range\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getScripITD( final String symbol, final Date start,\n final Date end )\n throws DataAccessException ;\n\n /**\n * Moves all records in the SCRIP_ITD_DATA table which have a date attribute\n * which is in the past, relative to the boundary date passed as parameter.\n * Please note that this operation does not delete the data from the live\n * table. If you want to delete the live data which has been archived, you\n * need to call on the deleteLiveRecords operation within the same transaction\n * boundary.\n *\n * @param boundary The date which implies that any record with date in the\n * past as compared to the boundary will be archived.\n *\n * @throws DataAccessException If an exception is encountered during the\n * archival process.\n */\n void archiveLiveRecords( final Date boundary )\n throws DataAccessException ;\n\n /**\n * Deletes all records in the SCRIP_ITD_DATA table which have a date attribute\n * which is in the past, relative to the boundary date passed as parameter.\n * Please note that this operation does not copy the data from the live\n * table to the archive table. If you want to copy the live data which is\n * about to be deleted, you need to call on the archiveLiveRecords\n * before this call, within the same transaction boundary.\n *\n * @param boundary The date which implies that any record with date in the\n * past as compared to the boundary will be deleted.\n *\n * @throws DataAccessException If an exception is encountered during the\n * archival process.\n */\n void deleteLiveRecords( final Date boundary )\n throws DataAccessException ;\n}", "@Override\n\tprotected void initDataSource() {\n\t}", "public DataSource getDataSource() {\n return datasource;\n }", "public List<Index> getIndexes();", "public interface StreamDataSource extends DataSource {\n /**\n * @return a string identifier\n */\n @NotNull String getStreamName();\n\n /**\n * Access named stream for reading.\n * Caller is responsible to close the stream once done.\n * @return stream to read from, never <code>null</code>\n * @throws IOException if failed to open given named stream\n */\n @NotNull InputStream openInputStream() throws IOException;\n\n /**\n * Access named stream for writing. Caller is responsible to close the stream once done.\n * @return stream to write to, never <code>null</code>\n * @throws IOException if failed to open given named stream\n */\n @NotNull OutputStream openOutputStream() throws IOException;\n\n /**\n * @return true if success\n */\n boolean delete();\n\n /**\n * if rv == false, then {@link #openInputStream()} will throw IOException\n * so check it before reading\n */\n boolean exists();\n}", "public DataSource getDataSource() {\n return dataSource;\n }", "public interface DataSourceNotifyController<Adapter, DataSource> extends DataSourceController<DataSource> {\n\n\tDataSourceNotifyController<Adapter, DataSource> notifyDataSetChanged();\n\n\t@NonNull\n\tAdapter getDataSourceAdapter();\n}", "public void setSourceDataArray(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData sourceData)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData target = null;\r\n target = (org.landxml.schema.landXML11.SourceDataDocument.SourceData)get_store().find_element_user(SOURCEDATA$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(sourceData);\r\n }\r\n }", "public DataSourceListType invokeQueryDatasources() throws TsResponseException {\n checkSignedIn();\n final String url = getUriBuilder().path(QUERY_DATA_SOURCES).build(m_siteId).toString();\n final TsResponse response = get(url);\n return response.getDatasources();\n }", "@Override\n\tpublic void setDataSource(DataSource dataSource) {\n\t}", "public interface IndexRegistry\n{\n void registerIndex(Index index);\n void unregisterIndex(Index index);\n\n Index getIndex(IndexMetadata indexMetadata);\n Collection<Index> listIndexes();\n}", "public int getDatasource() throws java.rmi.RemoteException;", "public DataSource getDataSource() {\n return _dataSource;\n }", "public DataSourceId(DataverseName dataverseName, String datasourceName) {\n this(dataverseName, datasourceName, null);\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "public int getDataIndex() {\n\t\treturn dataIndex;\n\t}", "public int getDatasource() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((Integer) __getCache(\"datasource\")).intValue());\n }", "public interface IDataset extends Serializable{\n\t\n\t/**\n\t * Retrieve the data of the data set.\n\t * \n\t * @return an iterator over all data set items in the data set.\n\t */\n\tpublic Iterator<IDatasetItem> iterateOverDatasetItems();\n\t\n\t/**\n\t * Gets a normalizer for the data set.\n\t * \n\t * @return the corresponding normalizer.\n\t */\n\tpublic INormalizer getNormalizer();\n\t\n\t/**\n\t * Gets a immutable map that indicates for each attribute (-tag) if it should be used for clustering.\n\t * @return map of attribute-tags to boolean values \n\t */\n\tpublic ImmutableMap<String, Boolean> getAttributeClusteringConfig();\n\t\n\t/**\n\t * Scales the passed value to the range defined in the data set property files.\n\t * @param value a normalized value\n\t * @param attributeTag the identifier of the attribute\n\t * @return the attribute value in the original scale\n\t */\n\tpublic double denormalize(double value, String attributeTag);\n\t\n}", "public TemporaryDataSource(DataSource dataSource){\n\t\tthis.ds = dataSource;\n\t}", "public DataSource getDataSource() {\r\n return dataSource;\r\n }", "public String createDSIndex(String dsID, String dschemaID, String attriName);", "public void setDatasource(DataSource source) {\n datasource = source;\n }", "public ArrayList getDataSources() {\n return dataSources;\n }", "public void setDataSource(BasicDataSource dataSource) {\n this.dataSource = dataSource;\n }", "Source updateDatasourceOAI(Source ds) throws RepoxException;", "public void setDataSources(ArrayList dataSources) {\n this.dataSources = dataSources;\n }", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "public String getDataSource() {\n return dataSource;\n }", "public String getDatasource()\r\n\t{\r\n\t\treturn _dataSource;\r\n\t}", "public DataSource getDataSource() {\n return dataSource;\n }", "public DataSource getDataSource() {\n return dataSource;\n }", "public void setDatasource(DataSource datasource) {\n this.datasource = datasource;\n }", "static public DataSource getDataSource(Context appContext) {\n // As per\n // http://goo.gl/clVKsG\n // we can rely on the application context never changing, so appContext is only\n // used once (during initialization).\n if (ds == null) {\n //ds = new InMemoryDataSource();\n //ds = new GeneratedDataSource();\n ds = new CacheDataSource(appContext, 20000);\n }\n \n return ds;\n }", "public String getDataSource() {\n return dataSource;\n }", "Source createDatasourceOAI(Source ds, Provider prov) throws RepoxException;", "public interface GroupsDataSource extends DbDataSource<Group> {\n}", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "indexSet createindexSet();", "void example2() {\n\t\t\n\t\tIndexedDataSource<HighPrecisionMember> list = ArrayDataSource.construct(G.HP, 1234);\n\t\t\n\t\t// fill the list with values\n\t\t\n\t\tFill.compute(G.HP, G.HP.unity(), list);\n\t\t\n\t\t// then calculate a result\n\n\t\tHighPrecisionMember result = G.HP.construct();\n\t\t\n\t\tSum.compute(G.HP, list, result); // result should equal 1234\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public DataSource getDataSource() {\n\t\treturn dataSource;\n\t}", "public DataSource getDataSource() {\n\t\treturn this.dataSource;\n\t}", "public DataSource getDatasource() {\n return datasource;\n }", "public Object getContent(DataSource ds) throws IOException;", "protected DataSource getDataSource() {\n\t\treturn dataSource;\n\t}", "DataStore getDataStore ();", "E getData(int index);", "public static DataSource getDataSource() throws SQLException {\n return getDataSource(FxContext.get().getDivisionId(), true);\n }", "public DataSourceId(DataverseName dataverseName, String datasourceName, String[] parameters) {\n this.dataverseName = dataverseName;\n this.datasourceName = datasourceName;\n this.parameters = parameters;\n }", "boolean isIndexed();", "boolean isIndexed();", "public interface ExternalArrayData\n{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public interface LocalDataSource {\n\n void saveUserName(String userName);\n\n void saveWxId(String wxId);\n\n void saveHead(String head);\n\n void saveBalance(String balance);\n\n void saveBankCard(BankCard bankCard);\n\n void saveDai(boolean dai);\n\n void saveLoan(Loan loan);\n\n String getUserName();\n\n String getWxId();\n\n String getHead();\n\n String getBalance();\n\n List<BankCard> getAllBankCard();\n\n boolean getDai();\n\n Loan getLoan();\n}", "StorableIndexInfo getIndexInfo();", "public DataSource(Type type)\n {\n super();\n _type = type;\n }", "DoubleDataSource apply(DoubleDataSource input, String param);", "public IData getStoreddata();", "public interface ILuceneIndexDAO extends IStatefulIndexerSession {\n // ===================================================================\n // The domain of indexing creates a separation between\n // readers and writers. In lucene, these are searchers\n // and writers. This DAO creates the more familiar DAO-ish interface\n // for developers to use and attempts to hide the details of\n // the searcher and write.\n // Calls are stateless meaning calling a find after a save does\n // not guarantee data will be reflected for the instance of the DAO\n // ===================================================================\n\n /**\n * Updates a document by first deleting the document(s) containing a term and then adding the new document. A Term is created by termFieldName, termFieldValue.\n *\n * @param termFieldName - Field name of the index.\n * @param termFieldValue - Field value of the index.\n * @param document - Lucene document to be updated.\n * @return - True for successful addition.\n */\n boolean saveDocument(String termFieldName, String termFieldValue, Document document);\n\n /**\n * Generates a BooleanQuery from the given fields Map and uses it to delete the documents matching in the IndexWriter.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @return - True for successful deletion.\n */\n boolean deleteDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields.\n *\n * @param fields - A Map data structure contains the field(Key) and text(value).\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields. Offset is the starting position for the search and numberOfResults\n * is the length from offset position.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @param offset - Starting position of the search.\n * @param numberOfResults - Number of documents to be searched from an offset position.\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields, int offset, int numberOfResults);\n\n /**\n * Return the count of the documents present in the IndexSearcher.\n *\n * @return - Integer representing the count of documents.\n */\n int getDocumentCount();\n\n}", "public static void main(String[] args)\n\t{\n\t\tsqlindexer si=new sqlindexer();\n\t\tsi.indexAll();\n\t\t\n\t\t\n\t}", "public abstract int getSourceIndex(int index);", "public interface BaseLocalDataSource {\n void openTransaction();\n\n void closeTransaction();\n}", "public interface DataLocator<E> {\n\n E getData(int readLocation);\n\n void setData(int writeLocation1, E value);\n\n void writeAll(E[] newData, int length);\n\n int getCapacity();\n}", "Coverage getSource( int sourceDataIndex )\n throws IndexOutOfBoundsException;", "public static DataSource getDs() {\n return ds;\n }", "public interface ILocalDataSource {\n\n Flowable<List<CategoryDBO>> loadCategoriesFromLocal();\n\n void saveCategoriesToLocal(CategoryDBO categoryDBO);\n}", "void example4() {\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list1 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 100);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list2 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 1000);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> joinedList =\n\t\t\t\tnew ConcatenatedDataSource<>(list1, list2);\n\t\t\n\t\tFill.compute(G.UINT1, G.UINT1.random(), joinedList);\n\t}", "public interface ICostIndexDao<CostIndex> extends IDao<CostIndex> {\n}" ]
[ "0.6625566", "0.64317733", "0.60943717", "0.6091882", "0.60173", "0.5911021", "0.591073", "0.56194824", "0.55566376", "0.5550128", "0.55494374", "0.55388075", "0.546665", "0.5466594", "0.5450034", "0.543006", "0.5371842", "0.5371842", "0.5371842", "0.5371842", "0.5371842", "0.5371842", "0.53677905", "0.5347318", "0.53309083", "0.5309608", "0.5286625", "0.5263075", "0.5250697", "0.52205193", "0.5216007", "0.52135044", "0.5212001", "0.5197883", "0.5197624", "0.5195246", "0.5195241", "0.5191574", "0.5188972", "0.518262", "0.51817113", "0.51781994", "0.51736945", "0.51736945", "0.51736945", "0.51519203", "0.51342815", "0.51316386", "0.5125285", "0.5119375", "0.51154876", "0.5109135", "0.5108563", "0.5103336", "0.5102959", "0.51010036", "0.5096352", "0.5090166", "0.50620365", "0.5060974", "0.50496745", "0.50496745", "0.50462335", "0.50379306", "0.50347316", "0.5017617", "0.50154245", "0.50129557", "0.5006336", "0.5006336", "0.5006336", "0.4999864", "0.4999371", "0.49935994", "0.49839914", "0.49792662", "0.49648523", "0.49630368", "0.49608415", "0.49602956", "0.49597132", "0.49596682", "0.4953127", "0.49315774", "0.49315774", "0.4929978", "0.49245545", "0.49222866", "0.4920938", "0.49190873", "0.49185494", "0.4912874", "0.49027866", "0.48945642", "0.4891735", "0.4890765", "0.48906496", "0.48774773", "0.48759225", "0.4874557", "0.48688284" ]
0.0
-1
ArrayDataSource The regular Storage allocator requires that the type of data that will be stored implements certain primitive coder interfaces. Sometimes this is too restrictive. If someone defines a type that can't easily be stored to disk (like for instance when its primitive data does not have a fixed size) you can use this data source to wrap plain object array data so that it can be used with all of Zorbage's algorithms. Note that this code is type safe. It also is completely resident in ram and cannot be indexed beyond the range of a 32 bit integer so one is limited as to how much data can be allocated and processed. It can be useful for interfacing with other libraries that return arrays of objects.
void example2() { IndexedDataSource<HighPrecisionMember> list = ArrayDataSource.construct(G.HP, 1234); // fill the list with values Fill.compute(G.HP, G.HP.unity(), list); // then calculate a result HighPrecisionMember result = G.HP.construct(); Sum.compute(G.HP, list, result); // result should equal 1234 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public interface ExternalArrayData\n{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public interface IPrimitiveArray extends IArray {\n /**\n * Primitive signatures.\n */\n public static final byte[] SIGNATURES = {\n -1, -1, -1, -1, (byte) 'Z', (byte) 'C', (byte) 'F', (byte) 'D', (byte) 'B', (byte) 'S',\n (byte) 'I', (byte) 'J'\n };\n\n /**\n * Element sizes inside the array.\n */\n public static final int[] ELEMENT_SIZE = { -1, -1, -1, -1, 1, 2, 4, 8, 1, 2, 4, 8 };\n\n /**\n * Display string of the type.\n */\n @SuppressWarnings(\"nls\") public static final String[] TYPE = {\n null, null, null, null, \"boolean[]\", \"char[]\", \"float[]\", \"double[]\", \"byte[]\", \"short[]\",\n \"int[]\", \"long[]\"\n };\n\n /**\n * Java component type of the primitive array.\n */\n public static final Class<?>[] COMPONENT_TYPE = {\n null, null, null, null, boolean.class, char.class, float.class, double.class, byte.class,\n short.class, int.class, long.class\n };\n\n /**\n * Returns the {@link Type} of the primitive array.\n */\n public int getType();\n\n /**\n * Returns the component type of the array.\n */\n public Class<?> getComponentType();\n\n /**\n * Returns the Object at a given index.\n */\n public Object getValueAt(int index);\n\n /**\n * Get the primitive Java array. The return value can be casted into the\n * correct component type, e.g.\n *\n * <pre>\n * if (char.class == array.getComponentType())\n * {\n * char[] content = (char[]) array.getValueArray();\n * System.out.println(content.length);\n * }\n * </pre>\n *\n * The return value must not be modified because it is cached by the heap\n * dump adapter. This method does not return a copy of the array for\n * performance reasons.\n */\n public Object getValueArray();\n\n /**\n * Get the primitive Java array, beginning at <code>offset</code> and\n * <code>length</code> number of elements.\n * <p>\n * The return value must not be modified because it is cached by the heap\n * dump adapter. This method does not return a copy of the array for\n * performance reasons.\n */\n public Object getValueArray(int offset, int length);\n}", "protected abstract Object[] getData();", "void setArrayGeneric(int paramInt)\n/* */ {\n/* 1062 */ this.length = paramInt;\n/* 1063 */ this.datums = new Datum[paramInt];\n/* 1064 */ this.pickled = null;\n/* 1065 */ this.pickledCorrect = false;\n/* */ }", "public NativeIntegerObjectArrayImpl()\n {\n }", "ArrayProxyValue createArrayProxyValue();", "public MutableArray(int paramInt, Object[] paramArrayOfObject, ORADataFactory paramORADataFactory)\n/* */ {\n/* 100 */ this.sqlType = paramInt;\n/* 101 */ this.factory = paramORADataFactory;\n/* 102 */ this.isNChar = false;\n/* */ \n/* 104 */ setObjectArray(paramArrayOfObject);\n/* */ }", "public Object[] getOracleArray(long paramLong, int paramInt)\n/* */ throws SQLException\n/* */ {\n/* 283 */ int i = sliceLength(paramLong, paramInt);\n/* */ \n/* 285 */ if (i < 0) {\n/* 286 */ return null;\n/* */ }\n/* 288 */ Object localObject = null;\n/* */ \n/* 290 */ switch (this.sqlType)\n/* */ {\n/* */ \n/* */ case -13: \n/* 294 */ localObject = new BFILE[i];\n/* */ \n/* 296 */ break;\n/* */ \n/* */ case 2004: \n/* 299 */ localObject = new BLOB[i];\n/* */ \n/* 301 */ break;\n/* */ \n/* */ \n/* */ case 1: \n/* */ case 12: \n/* 306 */ localObject = new CHAR[i];\n/* */ \n/* 308 */ break;\n/* */ \n/* */ case 2005: \n/* 311 */ localObject = new CLOB[i];\n/* */ \n/* 313 */ break;\n/* */ \n/* */ case 91: \n/* 316 */ localObject = new DATE[i];\n/* */ \n/* 318 */ break;\n/* */ \n/* */ case 93: \n/* 321 */ localObject = new TIMESTAMP[i];\n/* */ \n/* 323 */ break;\n/* */ \n/* */ case -101: \n/* 326 */ localObject = new TIMESTAMPTZ[i];\n/* */ \n/* 328 */ break;\n/* */ \n/* */ case -102: \n/* 331 */ localObject = new TIMESTAMPLTZ[i];\n/* */ \n/* 333 */ break;\n/* */ \n/* */ case -104: \n/* 336 */ localObject = new INTERVALDS[i];\n/* */ \n/* 338 */ break;\n/* */ \n/* */ case -103: \n/* 341 */ localObject = new INTERVALYM[i];\n/* */ \n/* 343 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 2: \n/* */ case 3: \n/* */ case 4: \n/* */ case 5: \n/* */ case 6: \n/* */ case 7: \n/* */ case 8: \n/* 358 */ localObject = new NUMBER[i];\n/* */ \n/* 360 */ break;\n/* */ \n/* */ case -2: \n/* 363 */ localObject = new RAW[i];\n/* */ \n/* 365 */ break;\n/* */ \n/* */ case 100: \n/* 368 */ localObject = new BINARY_FLOAT[i];\n/* */ \n/* 370 */ break;\n/* */ \n/* */ case 101: \n/* 373 */ localObject = new BINARY_DOUBLE[i];\n/* */ \n/* 375 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 0: \n/* */ case 2002: \n/* */ case 2003: \n/* */ case 2006: \n/* */ case 2007: \n/* 386 */ if (this.old_factory == null)\n/* */ {\n/* 388 */ localObject = new ORAData[i];\n/* */ }\n/* */ else\n/* */ {\n/* 392 */ localObject = new CustomDatum[i];\n/* */ }\n/* */ \n/* 395 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case -15: \n/* */ case -9: \n/* 402 */ setNChar();\n/* 403 */ localObject = new CHAR[i];\n/* 404 */ break;\n/* */ \n/* */ case 2011: \n/* 407 */ localObject = new NCLOB[i];\n/* 408 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default: \n/* 414 */ SQLException localSQLException = DatabaseError.createSqlException(getConnectionDuringExceptionHandling(), 48);\n/* 415 */ localSQLException.fillInStackTrace();\n/* 416 */ throw localSQLException;\n/* */ }\n/* */ \n/* */ \n/* 420 */ return getOracleArray(paramLong, (Object[])localObject);\n/* */ }", "public interface ArrayAllocator {\n\n /**\n * Allocate array of given capacity\n **/\n Object createArray(int capacity);\n\n /**\n * can store value?\n **/\n boolean acceptsValue(Object value);\n}", "public MutableArray(Object[] paramArrayOfObject, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 180 */ this.sqlType = paramInt;\n/* 181 */ this.old_factory = paramCustomDatumFactory;\n/* 182 */ this.isNChar = false;\n/* */ \n/* 184 */ setObjectArray(paramArrayOfObject);\n/* */ }", "Object createArray(int capacity);", "public MutableArray(int paramInt, double[] paramArrayOfDouble, ORADataFactory paramORADataFactory)\n/* */ {\n/* 111 */ this.sqlType = paramInt;\n/* 112 */ this.factory = paramORADataFactory;\n/* 113 */ this.isNChar = false;\n/* */ \n/* 115 */ setArray(paramArrayOfDouble);\n/* */ }", "public MutableArray(ARRAY paramARRAY, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 155 */ this.length = -1;\n/* 156 */ this.elements = null;\n/* 157 */ this.datums = null;\n/* 158 */ this.pickled = paramARRAY;\n/* 159 */ this.pickledCorrect = true;\n/* 160 */ this.sqlType = paramInt;\n/* 161 */ this.old_factory = paramCustomDatumFactory;\n/* 162 */ this.isNChar = false;\n/* */ }", "public Object[] toRawArray();", "public MutableArray(int paramInt, short[] paramArrayOfShort, ORADataFactory paramORADataFactory)\n/* */ {\n/* 144 */ this.sqlType = paramInt;\n/* 145 */ this.factory = paramORADataFactory;\n/* 146 */ this.isNChar = false;\n/* */ \n/* 148 */ setArray(paramArrayOfShort);\n/* */ }", "public Object getData() {\n return dataArray;\n }", "ArrayADT() {\n this.size = 10;\n this.base = createArrayInstance(this.size);\n this.length = 0;\n }", "Array createArray();", "@jdk.Exported\npublic interface ArrayType extends ReferenceType {\n\n /**\n * Creates a new instance of this array class in the target VM.\n * The array is created with the given length and each component\n * is initialized to is standard default value.\n *\n * @param length the number of components in the new array\n * @return the newly created {@link ArrayReference} mirroring\n * the new object in the target VM.\n *\n * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.\n */\n ArrayReference newInstance(int length);\n\n /**\n * Gets the JNI signature of the components of this\n * array class. The signature\n * describes the declared type of the components. If the components\n * are objects, their actual type in a particular run-time context\n * may be a subclass of the declared class.\n *\n * @return a string containing the JNI signature of array components.\n */\n String componentSignature();\n\n /**\n * Returns a text representation of the component\n * type of this array.\n *\n * @return a text representation of the component type.\n */\n String componentTypeName();\n\n /**\n * Returns the component type of this array,\n * as specified in the array declaration.\n * <P>\n * Note: The component type of a array will always be\n * created or loaded before the array - see\n * <cite>The Java&trade; Virtual Machine Specification</cite>,\n * section 5.3.3 - Creating Array Classes.\n * However, although the component type will be loaded it may\n * not yet be prepared, in which case the type will be returned\n * but attempts to perform some operations on the returned type\n * (e.g. {@link ReferenceType#fields() fields()}) will throw\n * a {@link ClassNotPreparedException}.\n * Use {@link ReferenceType#isPrepared()} to determine if\n * a reference type is prepared.\n *\n * @see Type\n * @see Field#type() Field.type() - for usage examples\n * @return the {@link Type} of this array's components.\n */\n Type componentType() throws ClassNotLoadedException;\n}", "@Test\r\n\tvoid testDataSourceConversions() {\r\n\t\tDeconstructor underTest = sampleDataSource.deconstructor();\r\n\t\r\n\t\tassertArrayEquals(stringData.getBytes(StandardCharsets.UTF_8), underTest.getByteArrayByName(STRING_DS_NAME).get());\r\n\t\tassertEquals(byteArrayDataStr, underTest.getStringByName(BYTE_ARRAY_DS_NAME).get());\r\n\t}", "public MutableArray(int[] paramArrayOfInt, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 202 */ this.sqlType = paramInt;\n/* 203 */ this.old_factory = paramCustomDatumFactory;\n/* 204 */ this.isNChar = false;\n/* */ \n/* 206 */ setArray(paramArrayOfInt);\n/* */ }", "public Object getDataElements(int x, int y, Object obj, DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n\n int type = getTransferType();\n int numDataElems = getNumDataElements();\n int pixelOffset = y * scanlineStride + x * pixelStride;\n\n switch (type) {\n\n case DataBuffer.TYPE_BYTE:\n\n byte[] bdata;\n\n if (obj == null)\n bdata = new byte[numDataElems];\n else\n bdata = (byte[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n bdata[i] = (byte) data.getElem(bankIndices[i], pixelOffset + bandOffsets[i]);\n }\n\n obj = (Object) bdata;\n break;\n\n case DataBuffer.TYPE_USHORT:\n case DataBuffer.TYPE_SHORT:\n\n short[] sdata;\n\n if (obj == null)\n sdata = new short[numDataElems];\n else\n sdata = (short[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n sdata[i] = (short) data.getElem(bankIndices[i], pixelOffset + bandOffsets[i]);\n }\n\n obj = (Object) sdata;\n break;\n\n case DataBuffer.TYPE_INT:\n\n int[] idata;\n\n if (obj == null)\n idata = new int[numDataElems];\n else\n idata = (int[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n idata[i] = data.getElem(bankIndices[i], pixelOffset + bandOffsets[i]);\n }\n\n obj = (Object) idata;\n break;\n\n case DataBuffer.TYPE_FLOAT:\n\n float[] fdata;\n\n if (obj == null)\n fdata = new float[numDataElems];\n else\n fdata = (float[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n fdata[i] = data.getElemFloat(bankIndices[i], pixelOffset + bandOffsets[i]);\n }\n\n obj = (Object) fdata;\n break;\n\n case DataBuffer.TYPE_DOUBLE:\n\n double[] ddata;\n\n if (obj == null)\n ddata = new double[numDataElems];\n else\n ddata = (double[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n ddata[i] = data.getElemDouble(bankIndices[i], pixelOffset + bandOffsets[i]);\n }\n\n obj = (Object) ddata;\n break;\n }\n\n return obj;\n }", "public interface DataSource<T> {\n\t/**\n\t * open data source.\n\t */\n\tpublic void open();\n\t/**\n\t * Get the next data object.\n\t * @return data object.\n\t */\n\tpublic T next();\n\t/**\n\t * move vernier to head.\n\t * @return\n\t */\n\tpublic void head();\n\t/**\n\t * close data source.\n\t */\n\tpublic void close();\n\t/**\n\t * get attributes. \n\t * @return\n\t */\n\tpublic Map<String, Object> attributes();\n}", "public interface DataObject {\n\n /**\n * Returns the length of the contained resource.\n *\n * @return resource length of the resource.\n * @throws IOException when an error occurs while reading the length.\n */\n long getContentLength() throws IOException;\n\n /**\n * Returns an {@link InputStream} representing the contents of the resource.\n *\n * @return contents of the resource as stream.\n * @throws IOException when an error occurs while reading the resource.\n */\n InputStream getInputStream() throws IOException;\n\n /**\n * Returns {@link DataObject} containing the resource. The contents are ranged\n * from the start to the end indexes.\n *\n * @param start index at which data will be read from.\n * @param end index at which dat will be read to.\n * @return ranged resource object.\n * @throws IOException when an error occurs while reading the resource.\n */\n DataObject withRange(int start, int end) throws IOException;\n}", "HRESULT SafeArrayAccessData(SAFEARRAY psa, PointerByReference ppvData);", "public MutableArray(int paramInt, Datum[] paramArrayOfDatum, ORADataFactory paramORADataFactory)\n/* */ {\n/* 89 */ this.sqlType = paramInt;\n/* 90 */ this.factory = paramORADataFactory;\n/* 91 */ this.isNChar = false;\n/* */ \n/* 93 */ setDatumArray(paramArrayOfDatum);\n/* */ }", "public ArrayValue( Object array )\n\t{\n\t\tthis( array, (byte) 0, null, 0 );\n\t}", "public interface JCGLArrayObjectUsableType\n extends JCGLResourceUsableType, JCGLNamedType, JCGLReferenceContainerType\n{\n /**\n * @param index The attribute index in the range {@code [0,\n * getMaximumVertexAttributes() - 1]}\n *\n * @return The attribute at the given index, if any\n */\n\n Optional<JCGLArrayVertexAttributeType> attributeAt(int index);\n\n /**\n * @return The supported maximum number of vertex attributes. Must be {@code\n * >= 16}.\n */\n\n int attributeMaximumSupported();\n\n /**\n * @return The index buffer that is currently bound to this array object, if\n * any\n */\n\n Optional<JCGLIndexBufferUsableType> indexBufferBound();\n}", "ArrayProxyEntry createArrayProxyEntry();", "public MutableArray(int paramInt, int[] paramArrayOfInt, ORADataFactory paramORADataFactory)\n/* */ {\n/* 122 */ this.sqlType = paramInt;\n/* 123 */ this.factory = paramORADataFactory;\n/* 124 */ this.isNChar = false;\n/* */ \n/* 126 */ setArray(paramArrayOfInt);\n/* */ }", "public interface VShortArray extends VNumberArray {\n\n @Override\n ListShort getData();\n \n\n /**\n * Creates a new VShortArray.\n *\n * @param data the value\n * @param alarm the alarm\n * @param time the time\n * @param display the display\n * @return the new value\n */\n public static VShortArray create(final ListShort data, final Alarm alarm, final Time time, final Display display) {\n return new IVShortArray(data, null, alarm, time, display);\n }\n}", "public MutableArray(short[] paramArrayOfShort, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 224 */ this.sqlType = paramInt;\n/* 225 */ this.old_factory = paramCustomDatumFactory;\n/* 226 */ this.isNChar = false;\n/* */ \n/* 228 */ setArray(paramArrayOfShort);\n/* */ }", "ArrayValue createArrayValue();", "public Object[] getOracleArray()\n/* */ throws SQLException\n/* */ {\n/* 272 */ return getOracleArray(0L, Integer.MAX_VALUE);\n/* */ }", "public interface DataSourceWrapper<D> {\r\n\r\n public void openDataSource() throws Exception;\r\n \r\n public void preValidate() throws Exception;\r\n \r\n public void closeDataSource() throws Exception;\r\n \r\n public void setDataSource(D dataSource);\r\n \r\n public D getDataSource();\r\n \r\n public Iterator<Row> getRowIterator();\r\n \r\n}", "public MutableArray(double[] paramArrayOfDouble, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 191 */ this.sqlType = paramInt;\n/* 192 */ this.old_factory = paramCustomDatumFactory;\n/* 193 */ this.isNChar = false;\n/* */ \n/* 195 */ setArray(paramArrayOfDouble);\n/* */ }", "public MutableArray(Datum[] paramArrayOfDatum, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 169 */ this.sqlType = paramInt;\n/* 170 */ this.old_factory = paramCustomDatumFactory;\n/* 171 */ this.isNChar = false;\n/* */ \n/* 173 */ setDatumArray(paramArrayOfDatum);\n/* */ }", "public MutableArray(int paramInt, float[] paramArrayOfFloat, ORADataFactory paramORADataFactory)\n/* */ {\n/* 133 */ this.sqlType = paramInt;\n/* 134 */ this.factory = paramORADataFactory;\n/* 135 */ this.isNChar = false;\n/* */ \n/* 137 */ setArray(paramArrayOfFloat);\n/* */ }", "public <Q> Q[] asDataArray(Q[] a);", "Object getRawData();", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "protected ValueReader arrayReader(Class<?> contextType, Class<?> arrayType) {\n // TODO: maybe allow custom array readers?\n Class<?> elemType = arrayType.getComponentType();\n if (!elemType.isPrimitive()) {\n return new ArrayReader(arrayType, elemType,\n createReader(contextType, elemType, elemType));\n }\n int typeId = _findSimpleType(arrayType, false);\n if (typeId > 0) {\n return new SimpleValueReader(arrayType, typeId);\n }\n throw new IllegalArgumentException(\"Deserialization of \"+arrayType.getName()+\" not (yet) supported\");\n }", "private RubyArray(Ruby runtime, boolean objectSpace) {\n super(runtime, runtime.getArray(), objectSpace);\n }", "public DynArrayList() {\n data =(E[]) new Object[CAPACITY];\n }", "public abstract Object getData();", "public IData getStoreddata();", "public ArrayAccessor() {\r\n super(\"<array>\");\r\n }", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "@Test\r\n public void testPrimitiveArray()\r\n {\r\n test(int[].class);\r\n }", "@Override\n\tpublic Integer[] getData() {\n\t\treturn data;\n\t}", "public Object getData();", "OfPrimitiveArray(Object value, int operand) {\n this.value = value;\n this.operand = operand;\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default long[] asLongArray() {\n \n return notSupportedCast(\"long[]\");\n }", "public int readArray(Object o) throws IOException {\n\t\tprimitiveArrayCount = 0;\n\t\treturn primitiveArrayRecurse(o);\n\t}", "@Test public void getBaseTypeShouldReturnCorrectType() throws SQLException {\n\t\tList<Object> list = new ArrayList<>();\n\t\tArray array;\n\t\tfor (int type : Array.TYPES_SUPPORTED) {\n\t\t\tarray = new ListArray(list, type);\n\t\t\tassertEquals(type, array.getBaseType());\n\t\t}\n\t}", "public Object getValueArray(int offset, int length);", "protected XTypedArraySuperClass(Resources resources, int[] data, int[] indices, int len) {\n\t\tsuper(null, null, null, 0);\n\t\tthrow new UnsupportedOperationException();\n\t}", "private synchronized byte[] toBytes(DataSource dataSource) {\n Kryo kryo = new Kryo();\n byte[] bytes;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n Output output = new Output(baos);\n kryo.writeClassAndObject(output, dataSource);\n output.close();\n bytes = baos.toByteArray();\n return bytes;\n }", "public void setObjectdata(byte[] objectdata)\n {\n\n }", "public Array getDataArray() {\n return dataArray;\n }", "private RubyArray(Ruby runtime, long length) {\n super(runtime, runtime.getArray());\n checkLength(length);\n values = new IRubyObject[(int)length];\n }", "public Array()\n {\n assert DEFAULT_CAPACITY > 0;\n\n array = new Object[DEFAULT_CAPACITY];\n }", "protected OfNonPrimitiveArray(Object value, Class<?> componentType) {\n this.value = value;\n this.componentType = componentType;\n }", "public Array(int capacity)\n {\n array = new Object[capacity];\n }", "public void setOracleArray(Object[] paramArrayOfObject)\n/* */ {\n/* 672 */ if ((this.factory == null) && (this.old_factory == null)) {\n/* 673 */ setDatumArray((Datum[])paramArrayOfObject);\n/* */ } else {\n/* 675 */ setObjectArray(paramArrayOfObject);\n/* */ }\n/* */ }", "public ArrayContainer() {\n this(DEFAULT_CAPACITY);\n }", "ArrayMixedObject getArray() {\n\t\treturn array;\n\t}", "public interface IDataSource<T, E> {\n void update(T data);\n int getItemCount();\n E getItemForPosition(int index);\n}", "public MutableArray(float[] paramArrayOfFloat, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 213 */ this.sqlType = paramInt;\n/* 214 */ this.old_factory = paramCustomDatumFactory;\n/* 215 */ this.isNChar = false;\n/* */ \n/* 217 */ setArray(paramArrayOfFloat);\n/* */ }", "public static ObjectInstance getBasicTypeArraysObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 1);\n properties.put(\"theLabel\", getBasicTypeArraysMBean().getTheLabel());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'BasicTypeArrays' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new BasicTypeArrays().getClass().getName());\n }", "public interface IData {\n byte[] getData();\n}", "public interface DataLocator<E> {\n\n E getData(int readLocation);\n\n void setData(int writeLocation1, E value);\n\n void writeAll(E[] newData, int length);\n\n int getCapacity();\n}", "public interface IntegerArray {\n\t\n\tInteger[] convertIntToIntegerArray(int[] array);\t\n\t\n\t/**\n\t * Concatenates array1 and array2\n\t * @param array1 Array of Integers\n\t * @param array2 Array of Integers\n\t * @return Integer[] New array of Integers containing the elements of array1 plus the elements of array2\n\t */\n\tInteger[] concatArrays(Integer[] array1, Integer[] array2);\n\t\n\t/**\n\t * Returns a new array with no null elements\n\t * @param array Array of Integers with null values\n\t * @return Integer[] New array of Integers with no null values. If the original array contains x\n\t * null values, the new array dimension is reference.length-x. If the original array does not contain\n\t * null values, the new array returned contains the same values as the original one.\n\t */\n\tInteger[] removeNullElements(Integer[] array);\n\n}", "public ArraySpliterator(Object[] param1ArrayOfObject, int param1Int1, int param1Int2, int param1Int3) {\n/* 926 */ this.array = param1ArrayOfObject;\n/* 927 */ this.index = param1Int1;\n/* 928 */ this.fence = param1Int2;\n/* 929 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }", "Datatype[] internalize(Datatype[] args) throws CCAException;", "@Parameters\n public static Iterable<Object[]> data() {\n return Arrays.asList(new Object[][] {\n // MAX_VALUE / 2 is important because the signs are generally the same for past and future\n // deadlines.\n {Long.MAX_VALUE / 2}, {0}, {Long.MAX_VALUE}, {Long.MIN_VALUE}\n });\n }", "public FormatableArrayHolder(Object[] array)\n\t{\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\tSanityManager.ASSERT(array != null, \n\t\t\t\t\t\"array input to constructor is null, code can't handle this.\");\n\t\t}\n\n\t\tsetArray( array );\n\t}", "@Override\r\n\tpublic Object[] toArray()\r\n\t{\n\t\tthrow new UnsupportedOperationException(\"Series collection doesn't support this operation.\");\r\n\t}", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "public ObjectArrayTemplateElement()\n {\n super(Object[].class, obj -> {\n if (obj instanceof Collection)\n {\n return ((Collection) obj).toArray();\n }\n throw new UnsupportedOperationException(\"Can't convert object (\" + obj.getClass().getName() + \") to Object[]: \" + obj);\n }, Collection.class::isAssignableFrom);\n }", "private RubyArray(Ruby runtime, RubyClass klass, int length) {\n super(runtime, klass);\n values = new IRubyObject[length];\n }", "Object getData();", "Object getData();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default int[] asIntArray() {\n \n return notSupportedCast(\"int[]\");\n }", "@DataProvider()\n\tpublic Object[][] getData() {\n\t\t\n\t\treturn ConstantsArray.getArrayData();\n\t}", "public interface Serial\r\n{\r\n// use string constants to enforce consistency\r\n// between readers and writers\r\npublic static final String OBJECT = \"object\";\r\npublic static final String FIELD = \"field\";\r\npublic static final String NAME = \"name\";\r\npublic static final String TYPE = \"type\";\r\npublic static final String VALUE = \"value\";\r\npublic static final String ARRAY = \"array\";\r\npublic static final String LENGTH = \"length\";\r\npublic static final String ID = \"id\";\r\npublic static final String IDREF = \"idref\";\r\n\r\n// next is used to disambiguate shadowed fields\r\npublic static final String DECLARED = \"declaredClass\";\r\n\r\n\r\npublic static final Class[] primitiveArrays =\r\n new Class[]{\r\n int[].class,\r\n boolean[].class,\r\n byte[].class,\r\n short[].class,\r\n long[].class,\r\n char[].class,\r\n float[].class,\r\n double[].class\r\n };\r\n\r\n// now declare the wrapper classes for each primitive object type\r\n// note that this order must correspond to the order in primitiveArrays\r\n\r\n// there may be a better way of doing this that does not involve\r\n// wrapper objects (e.g. Integer is the wrapper of int), but I've\r\n// yet to find it\r\n// note that the creation of wrapper objects is a significant\r\n// overhead\r\n// example: reading an array of 1 million int (all zeros) takes\r\n// about 900ms using reflection, versus 350ms hard-coded\r\npublic static final Class[] primitiveWrappers =\r\n new Class[]{\r\n Integer.class,\r\n Boolean.class,\r\n Byte.class,\r\n Short.class,\r\n Long.class,\r\n Character.class,\r\n Float.class,\r\n Double.class\r\n };\r\n\r\npublic static final Class[] primitives =\r\n new Class[]{\r\n int.class,\r\n boolean.class,\r\n byte.class,\r\n short.class,\r\n long.class,\r\n char.class,\r\n float.class,\r\n double.class\r\n };\r\n}", "public Object[] getObjectArray(Object[] paramArrayOfObject)\n/* */ throws SQLException\n/* */ {\n/* 586 */ return getObjectArray(0L, paramArrayOfObject);\n/* */ }", "public MyArrayList(int length) {\n data = new Object[length];\n }", "public Object convertToCatalyst (Object a, org.apache.spark.sql.catalyst.types.DataType dataType) ;", "public DataView(Object data) {\n\t\tthis.data = data;\n\t}", "public interface RdaSource<T> extends AutoCloseable {\n /**\n * Retrieve some number of objects from the source and pass them to the sink for processing.\n *\n * @param maxToProcess maximum number of objects to retrieve from the source\n * @param maxPerBatch maximum number of objects to collect into a batch before calling the sink\n * @param maxRunTime maximum amount of time to run before returning\n * @param sink to receive batches of objects\n * @return total number of objects processed (sum of results from calls to sink)\n */\n int retrieveAndProcessObjects(\n int maxToProcess, int maxPerBatch, Duration maxRunTime, RdaSink<T> sink)\n throws ProcessingException;\n}", "@SuppressWarnings(\"unchecked\")\n public static void main(String[] args) {\n gia = (Generic<Integer>[])new Generic[SIZE];\n System.out.println(gia.getClass().getSimpleName());\n gia[0] = new Generic<Integer>();\n //! gia[1] = new Object(); // Compile-time error\n // Discovers type mismatch at compile time:\n //! gia[2] = new Generic<Double>();\n }", "public interface MarshalBuffer\n{\n /**\n * @param key\n * key\n * @return DBRowColumnTypeReader\n * @see java.util.Map#containsKey(java.lang.Object)\n */\n boolean containsKey(Object key);\n\n /**\n * @return value\n */\n byte get();\n\n /**\n * @param dst\n * dst\n * @return value\n */\n ByteBuffer get(byte[] dst);\n\n /**\n * @param key\n * key\n * @return map\n * @see java.util.Map#get(java.lang.Object)\n */\n DBRowMapPair get(Object key);\n\n /**\n * @return value\n */\n boolean getBoolean(); // NOPMD\n\n /**\n * @return value\n */\n double getDouble();\n\n /**\n * @return value\n */\n int getInt();\n\n /**\n * @return value\n */\n long getLong();\n\n /**\n * @return value\n */\n int getNextSharedIndex();\n\n /**\n * @param index\n * index\n * @return value\n */\n PyBase getShared(int index);\n\n /**\n * @return value\n */\n short getShort(); // NOPMD\n\n /**\n * @throws IllegalOpCodeException\n * on wrong stream format\n */\n void initialize() throws IllegalOpCodeException;\n\n /**\n * @return value\n */\n int parentPosition();\n\n /**\n * @return value\n */\n byte peekByte();\n\n /**\n * @return value\n */\n int position();\n\n /**\n * @return value\n */\n boolean processed();\n\n /**\n * @param key\n * key\n * @param value\n * value\n * @return value\n * @see java.util.Map#put(java.lang.Object, java.lang.Object)\n */\n DBRowMapPair put(PyDBRowDescriptor key, DBRowMapPair value);\n\n /**\n * @param size\n * size\n * @return value\n */\n byte[] readBytes(int size);\n\n /**\n * @param index\n * index\n * @param pyBase\n * pyBase\n * @return value\n */\n PyBase setShared(int index, PyBase pyBase);\n}", "@Override\r\n\tpublic <T> T[] toArray(T[] a)\r\n\t{\n\t\tthrow new UnsupportedOperationException(\"Series collection doesn't support this operation.\");\r\n\t}", "public interface IDataCollection<T> extends Serializable {\n int getPageSize ();\n int getPageNo ();\n int getTotalRows ();\n int getTotalPages ();\n void setData (Collection<T> data);\n List<T> getData ();\n}", "public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }", "public int readPrimitiveArray(Object o) throws IOException {\n\n\t\t// Note that we assume that only a single thread is\n\t\t// doing a primitive Array read at any given time. Otherwise\n\t\t// primitiveArrayCount can be wrong and also the\n\t\t// input data can be mixed up.\n\n\t\tprimitiveArrayCount = 0;\n\t\treturn primitiveArrayRecurse(o);\n\t}", "public DataSource(Type type)\n {\n super();\n _type = type;\n }", "HRESULT SafeArrayGetVartype(SAFEARRAY psa, VARTYPEByReference pvt);", "public DynamicArray(){\n\t \n\t array = (E[]) new Object[dim];\n }" ]
[ "0.63290286", "0.62810993", "0.6149048", "0.6056712", "0.60083205", "0.5681957", "0.56649953", "0.55530757", "0.5519517", "0.5509229", "0.5447674", "0.54131913", "0.5351434", "0.5340058", "0.5314657", "0.5311809", "0.5287671", "0.5281421", "0.5252185", "0.5242847", "0.5225696", "0.5220063", "0.5211189", "0.52103484", "0.52058864", "0.5204717", "0.5200218", "0.5173579", "0.5170901", "0.51682657", "0.51510686", "0.51437557", "0.51420116", "0.51390654", "0.51308334", "0.5110701", "0.5095486", "0.50887007", "0.5084432", "0.50804085", "0.507851", "0.5062958", "0.50543606", "0.50334406", "0.5031491", "0.5019829", "0.50127786", "0.50012636", "0.4997147", "0.496691", "0.49569458", "0.49489334", "0.49261865", "0.4923949", "0.49152073", "0.49133646", "0.49117464", "0.49055275", "0.48974478", "0.48946685", "0.4887824", "0.48684615", "0.48673335", "0.48672014", "0.48657355", "0.48617357", "0.48563963", "0.48510832", "0.4849281", "0.48412138", "0.48368052", "0.4834317", "0.48321843", "0.48159036", "0.48135176", "0.48078415", "0.48058993", "0.48018843", "0.4798501", "0.4796866", "0.4794337", "0.47891045", "0.47844428", "0.47844428", "0.47734585", "0.47693786", "0.4768276", "0.4761464", "0.47593057", "0.47575998", "0.47529367", "0.4750927", "0.47482085", "0.47393048", "0.4736207", "0.47330758", "0.4732111", "0.47300997", "0.47274044", "0.47242084", "0.47230035" ]
0.0
-1
BigListDataSource In java arrays are limited to the number of elements that can be represented by a 32bit integer. That is the max size and also the most amount of ram a primitive data source can use. However in Zorbage the BigListDataSource allows very large lists to be contained in ram and to be indexed with 64bit integers. The JVM can be tweaked to allocate lots of ram and the BigListDataSource class can take advantage of it. Internally it stores a list of lists.
void example3() { IndexedDataSource<SignedInt16Member> list = new BigListDataSource<SignedInt16Algebra, SignedInt16Member>(G.INT16, 100000); // elsewhere fill the list with values // then calculate a result SignedInt16Member result = G.INT16.construct(); Median.compute(G.INT16, list, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public long[] getBlockListAsLongs();", "public void setDataList(ArrayList<Integer> dataList, int maxSize){\n this.dataList = dataList;\n this.mMaxSize = maxSize;\n }", "public boolean isListLengthFixed();", "@Override\n public int getMaxCapacity() {\n return 156250000;\n }", "public TLongArray(int size) {\n\t\tarray = new long[size];\n\t}", "public void setListSize(int value) {\n this.listSize = value;\n }", "public int getMaxListLength();", "@Override\n public int getMaxRowSize() {\n return 1048576;\n }", "public int getMaxSize(){\n\t\treturn ds.length;\n\t}", "private void getLargeOrderList(){\n sendPacket(CustomerTableAccess.getConnection().getLargeOrderList());\n \n }", "java.util.List<com.google.protobuf.ByteString> getDataList();", "java.util.List<com.google.protobuf.ByteString> getDataList();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default long[] asLongArray() {\n \n return notSupportedCast(\"long[]\");\n }", "void setArrayGeneric(int paramInt)\n/* */ {\n/* 1062 */ this.length = paramInt;\n/* 1063 */ this.datums = new Datum[paramInt];\n/* 1064 */ this.pickled = null;\n/* 1065 */ this.pickledCorrect = false;\n/* */ }", "public abstract long getCompleteListSize();", "public abstract long[] toLongArray();", "public Object[] getOracleArray(long paramLong, int paramInt)\n/* */ throws SQLException\n/* */ {\n/* 283 */ int i = sliceLength(paramLong, paramInt);\n/* */ \n/* 285 */ if (i < 0) {\n/* 286 */ return null;\n/* */ }\n/* 288 */ Object localObject = null;\n/* */ \n/* 290 */ switch (this.sqlType)\n/* */ {\n/* */ \n/* */ case -13: \n/* 294 */ localObject = new BFILE[i];\n/* */ \n/* 296 */ break;\n/* */ \n/* */ case 2004: \n/* 299 */ localObject = new BLOB[i];\n/* */ \n/* 301 */ break;\n/* */ \n/* */ \n/* */ case 1: \n/* */ case 12: \n/* 306 */ localObject = new CHAR[i];\n/* */ \n/* 308 */ break;\n/* */ \n/* */ case 2005: \n/* 311 */ localObject = new CLOB[i];\n/* */ \n/* 313 */ break;\n/* */ \n/* */ case 91: \n/* 316 */ localObject = new DATE[i];\n/* */ \n/* 318 */ break;\n/* */ \n/* */ case 93: \n/* 321 */ localObject = new TIMESTAMP[i];\n/* */ \n/* 323 */ break;\n/* */ \n/* */ case -101: \n/* 326 */ localObject = new TIMESTAMPTZ[i];\n/* */ \n/* 328 */ break;\n/* */ \n/* */ case -102: \n/* 331 */ localObject = new TIMESTAMPLTZ[i];\n/* */ \n/* 333 */ break;\n/* */ \n/* */ case -104: \n/* 336 */ localObject = new INTERVALDS[i];\n/* */ \n/* 338 */ break;\n/* */ \n/* */ case -103: \n/* 341 */ localObject = new INTERVALYM[i];\n/* */ \n/* 343 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 2: \n/* */ case 3: \n/* */ case 4: \n/* */ case 5: \n/* */ case 6: \n/* */ case 7: \n/* */ case 8: \n/* 358 */ localObject = new NUMBER[i];\n/* */ \n/* 360 */ break;\n/* */ \n/* */ case -2: \n/* 363 */ localObject = new RAW[i];\n/* */ \n/* 365 */ break;\n/* */ \n/* */ case 100: \n/* 368 */ localObject = new BINARY_FLOAT[i];\n/* */ \n/* 370 */ break;\n/* */ \n/* */ case 101: \n/* 373 */ localObject = new BINARY_DOUBLE[i];\n/* */ \n/* 375 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case 0: \n/* */ case 2002: \n/* */ case 2003: \n/* */ case 2006: \n/* */ case 2007: \n/* 386 */ if (this.old_factory == null)\n/* */ {\n/* 388 */ localObject = new ORAData[i];\n/* */ }\n/* */ else\n/* */ {\n/* 392 */ localObject = new CustomDatum[i];\n/* */ }\n/* */ \n/* 395 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ case -15: \n/* */ case -9: \n/* 402 */ setNChar();\n/* 403 */ localObject = new CHAR[i];\n/* 404 */ break;\n/* */ \n/* */ case 2011: \n/* 407 */ localObject = new NCLOB[i];\n/* 408 */ break;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default: \n/* 414 */ SQLException localSQLException = DatabaseError.createSqlException(getConnectionDuringExceptionHandling(), 48);\n/* 415 */ localSQLException.fillInStackTrace();\n/* 416 */ throw localSQLException;\n/* */ }\n/* */ \n/* */ \n/* 420 */ return getOracleArray(paramLong, (Object[])localObject);\n/* */ }", "void example10() {\n\t\t\n\t\t// allocate a regular list\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT4.construct(), 1000);\n\t\t\n\t\t// fill it with data\n\t\t\n\t\tFill.compute(G.UINT4, G.UINT4.random(), list);\n\t\t\n\t\t// protect it from writes\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> readonlyList = new ReadOnlyDataSource<>(list);\n\t\t\n\t\t// now play with list\n\t\t\n\t\tUnsignedInt4Member value = G.UINT4.construct();\n\t\t\n\t\t// success\n\t\t\n\t\treadonlyList.get(44, value);\n\n\t\t// prepare to write\n\t\t\n\t\tvalue.setV(100);\n\t\t\n\t\t// failure: throws exception. writing not allowed\n\t\t\n\t\treadonlyList.set(22, value);\n\t}", "int getListSize(int list) {\n\t\treturn m_lists.getField(list, 4);\n\t}", "public static List<Integer> getIntegerList(){\n List<Integer> nums = new ArrayList<>();//ArrayList<Integer> list = new ArrayList<>();\n for(int i=0;i<=1_000_000;i++) {\n nums.add(i);\n }\n return nums;\n }", "@Parameters\n public static Iterable<Object[]> data() {\n return Arrays.asList(new Object[][] {\n // MAX_VALUE / 2 is important because the signs are generally the same for past and future\n // deadlines.\n {Long.MAX_VALUE / 2}, {0}, {Long.MAX_VALUE}, {Long.MIN_VALUE}\n });\n }", "public DArray (int max)\n // constructor\n {\n theArray = new long[max];\n // create array\n nElems = 0;\n }", "public int getListSize() {\n return listSize;\n }", "public FixedSizeList(int capacity) {\n // YOUR CODE HERE\n }", "BigONotation(int size) {\n\t\tarraySize = size;\n\t\ttheArray = new int[size];\n\t}", "public TLongArray() {\n\t}", "private List<Integer> createData() {\r\n\t\tList<Integer> data = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "public IntegerList(int size)\n {\n list = new int[size];\n }", "public abstract long getMaxSize();", "public Object[] getOracleArray()\n/* */ throws SQLException\n/* */ {\n/* 272 */ return getOracleArray(0L, Integer.MAX_VALUE);\n/* */ }", "public long [] getData(Long index);", "public DynArrayList() {\n data =(E[]) new Object[CAPACITY];\n }", "public static native int Capacity(long lpjFbxArrayVector2);", "@Generated\n @Selector(\"fetchBatchSize\")\n @NUInt\n public native long fetchBatchSize();", "public abstract void read_long_array(int[] value, int offset, int\nlength);", "public OpenHashSet(float upperLoadFactor, float lowerLoadFactor) {\n super(upperLoadFactor, lowerLoadFactor);\n openHashSetArray = new OpenHashSetList[INITIAL_CAPACITY];\n\n for (int i=0 ; i<this.capacity() ; i++)\n openHashSetArray[i]=new OpenHashSetList();\n }", "public native long[] __longArrayMethod( long __swiftObject, long[] arg );", "public List()\n {\n list = new Object [10];\n }", "protected abstract List<Long> readIds(ResultSet resultSet, int loadSize) throws SQLException;", "abstract protected Object newList( int capacity );", "public int DataMemorySize() { return DATA_MEMORY_SIZE; }", "public ArrayJList(int initialCapacity) {\n if (initialCapacity > 0) {\n this.elementData = new Object[initialCapacity];\n } else {\n throw new IllegalArgumentException(\"Illegal Capacity: \" +\n initialCapacity);\n }\n }", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "protected long[] _getInternalLongArray() {\n\t\treturn _value;\n\t}", "@Override\n\tpublic boolean canfitLarge() {\n\t\treturn true;\n\t}", "List<Object> getCountExtent();", "public ArrayList61B() {\n\t\tthis.size = 1;\n\t\tthis.arrayList = (E[]) new Object[this.size];\n\t}", "public interface ExternalArrayData\n{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public void disabled_testLargeCollectionSerialization() {\n int count = 1400000;\n List<CollectionEntry> list = new ArrayList<CollectionEntry>(count);\n for (int i = 0; i < count; ++i) {\n list.add(new CollectionEntry(\"name\"+i,\"value\"+i));\n } \n gson.toJson(list);\n }", "public MyArrayList() {\n data = new Object[10];\n }", "public IntegerList(int size)\n {\n list = new int[size];\n }", "void example4() {\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list1 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 100);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list2 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 1000);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> joinedList =\n\t\t\t\tnew ConcatenatedDataSource<>(list1, list2);\n\t\t\n\t\tFill.compute(G.UINT1, G.UINT1.random(), joinedList);\n\t}", "public static void main(String[] args) {\n\n Set<Long> ids = LongStream.range(0, 1_000_000).boxed().collect(Collectors.toSet());\n // HashSet\n // ArrayList\n // Long[]\n // long[]\n // int[]\n // LinkedList\n System.out.println(\"Allocated!\");\n\n System.out.println(PerformanceUtil.getUsedHeap());\n }", "protected abstract int getNextBufferSize(E[] paramArrayOfE);", "public java.util.List<java.lang.Integer>\n getDataList() {\n return data_;\n }", "public void setPriceList(long value) {\r\n this.priceList = value;\r\n }", "native void nativeSetBatchSize(int batch_size);", "private List<Integer> loadTestNumbers(ArrayList<Integer> arrayList) {\n for (int i = 1; i <= timetablepro.TimetablePro.MAX_TIMETABLE; i++) {\n arrayList.add(i);\n }\n return arrayList;\n }", "public ArrayList61B(int initialCapacity) { \n\t\tif (initialCapacity < 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse {\n\t\t\tthis.size = initialCapacity;\n\t\t\tthis.arrayList = (E[]) new Object[this.size];\n\t\t\tthis.numberOfElements = 0;\n\t\t}\n\t}", "public abstract void read_longlong_array(long[] value, int offset, int\nlength);", "public MyArrayList(int length) {\n data = new Object[length];\n }", "@SuppressWarnings(\"unused\")\n\tvoid example15() {\n\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// the trimmed list has length 2,000 and is indexed from 0 to 1,999 returning data from\n\t\t// locations 1,000 - 2,999 in the original list.\n\t\t\n\t}", "@Override\n\tpublic long maxSize() {\n\t\treturn Main.chunkStoreAllocationSize;\n\t}", "public BigDataLinkedList(final Class<T> baseClass, final Collection<T> c) {\r\n\t\tfinal ConfigFactory f = (new ConfigFactory()).withDefaults();\r\n\t\tfinal OHSConfig config = f.build();\r\n\t\t// try to avoid out of bounds exceptions\r\n\t\tif (config.getSizeType() == SizeType.ELEMENTS && config.getSize() < c.size()) {\r\n\t\t\tf.withSize(c.size());\r\n\t\t}\r\n\t\tthis.baseClass = baseClass;\r\n\t\tserializer = new OffHeapSerializer<>(baseClass, config, METADATA_BYTES);\r\n\t\tif (c != null) {\r\n\t\t\tthis.addAll(c);\r\n\t\t}\r\n\t}", "public void disabled_testLargeCollectionDeserialization() {\n StringBuilder sb = new StringBuilder();\n int count = 87000;\n boolean first = true;\n sb.append('[');\n for (int i = 0; i < count; ++i) {\n if (first) {\n first = false;\n } else {\n sb.append(',');\n }\n sb.append(\"{name:'name\").append(i).append(\"',value:'value\").append(i).append(\"'}\");\n } \n sb.append(']');\n String json = sb.toString();\n Type collectionType = new TypeToken<ArrayList<CollectionEntry>>(){}.getType(); \n List<CollectionEntry> list = gson.fromJson(json, collectionType); \n assertEquals(count, list.size());\n }", "public ArraySetLong(int n) {\n\t\tnumElements = 0;\n\t\ttheElements = new long[n];\n\t}", "java.util.List<java.lang.Integer> getBlockNumbersList();", "public ArrayList(int initialCapacity, int growthFactor) {\n\t\tthis.storedObjects = new Object[initialCapacity];\n\t\tthis.growthFactor = growthFactor;\n\t}", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "public MyArrayList() {\r\n\t\tthis.list=new Object[this.capacity];\r\n\t}", "public DynArrayList(int capacity) {\n data = (E[]) new Object[capacity];\n }", "long arrayLength();", "public int getCompleteListSize() { return size; }", "public void setMemory(ArrayList<Integer> oldList) {\n\t\tthis.memory = oldList;\n\t}", "@Test\r\n public void teamListTooLargeTest(){\r\n int tooBigListSize = 15;\r\n\r\n int expectedResult = extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size();\r\n\r\n assertEquals(\"expected results = \" + expectedResult, expectedResult, extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size());\r\n System.out.println(\"\");\r\n }", "public long[] getAsLongs() {\n return (long[])data;\n }", "public List<Long> readMemory(int startIndex, int lastIndex){\n\t\tList<Long> data = new ArrayList<Long>();\n\t\tfor(int i=startIndex; i < lastIndex; ++i){\n\t\t\tdata.add(memory[i]);\n\t\t}\n\t\treturn data;\n\t}", "public ArrayList() {\n _size = 0;\n _store = (E[]) new Object[32];\n }", "@Generated\n @Selector(\"setFetchBatchSize:\")\n public native void setFetchBatchSize(@NUInt long value);", "public ArrayJList() {\n this(DEFAULT_CAPACITY);\n }", "public OrderedArray(int max) {\n arr = new long[max];\n nElms = 0;\n }", "public static int numElements_data() {\n return 60;\n }", "public ListDA() {\n elements = new Object[CAPACITY];\n }", "@Test public void getArrayShouldReturnCorrectArray() throws SQLException {\n\t\tList<String> list = new ArrayList<>();\n\t\tArray array = new ListArray(list, Types.VARCHAR);\n\t\tassertTrue(array.getArray() instanceof String[]);\n\t\tlist.add(\"test\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test\", ((String[])array.getArray())[0]);\n\t\tlist.add(\"test2\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test2\", ((String[])array.getArray())[1]);\n\t}", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "static int getCapacity(List al) throws Exception {\n Field field = ArrayList.class.getDeclaredField(\"elementData\");\n field.setAccessible(true);\n return ((Object[]) field.get(al)).length;\n }", "@Override\n public int getSize() {\n return 64;\n }", "public PageList(){\n count = 0;\n capacity = 4;\n itemArray = new int[capacity];\n }", "private int getResourceListSize() {\n return dataList.getResourceEndIndex();\n }", "public int getBatchSize();", "void mo9148a(int i, ArrayList<C0889x> arrayList);", "public TLongArray(long[] array) {\n\t\tthis.array = array;\n\t}", "java.util.List<java.lang.Integer> getBloomFilterSizeInBytesList();", "HRESULT SafeArrayGetLBound(SAFEARRAY psa, UINT nDim, WinDef.LONGByReference bound);", "public ArrayIns(int max) // constructor\r\n {\r\n a = new long[max]; // create the array\r\n nElems = 0; // no items yet\r\n }", "@Test\n public void testContinguosStorageOriginalSize() {\n list.addToFront(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.addToFront(\"Filler0\");\n list.addAtIndex(0, \"Filler#\");\n list.addAtIndex(2, \"Filler!\");\n list.addAtIndex(6, \"Filler$\");\n list.removeFromFront();\n list.removeFromBack();\n list.removeAtIndex(4);\n list.removeAtIndex(0);\n list.removeAtIndex(2);\n\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n for (int i = 0; i < list.size(); i++) {\n Assert.assertNotNull(((Object[]) (list.getBackingArray()))[i]);\n }\n for (int i = list.size(); i < actualCapacity; i++) {\n Assert.assertNull(((Object[]) (list.getBackingArray()))[i]);\n }\n }", "@SuppressWarnings(\"unused\")\n\tvoid example17() {\n\t\t\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// then create a new memory copy of those 2000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> theCopy = DeepCopy.compute(G.FLT, trimmed);\n\t}", "public BaseArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }", "java.util.List<db.fennec.proto.FDataEntryProto> \n getDataList();", "public static final int getListFileIndexedListSize(final ListFile varCode) {\n return getListFileStringChoices(varCode).length;\n }", "int maxRowSize();" ]
[ "0.65589976", "0.58471036", "0.56882936", "0.5687692", "0.56692666", "0.55711097", "0.5505372", "0.5466134", "0.544295", "0.5413373", "0.53960806", "0.53960806", "0.5335276", "0.5324467", "0.53242016", "0.5295004", "0.52790433", "0.5278366", "0.5262275", "0.5258838", "0.5233902", "0.5232067", "0.5184627", "0.51836365", "0.5177824", "0.5175172", "0.5170557", "0.51583254", "0.5144157", "0.5139947", "0.5123109", "0.5121119", "0.51125216", "0.5109505", "0.5097073", "0.50939125", "0.5089968", "0.5083611", "0.50777996", "0.507769", "0.50702184", "0.5064541", "0.5054162", "0.50385195", "0.503107", "0.50298285", "0.5021273", "0.50188076", "0.5003066", "0.49961004", "0.4991438", "0.49837226", "0.4980097", "0.49686554", "0.49642962", "0.49579334", "0.49476552", "0.49395034", "0.49318388", "0.49318132", "0.4929302", "0.4916031", "0.49136776", "0.49133667", "0.490176", "0.4884113", "0.48840365", "0.487584", "0.48733148", "0.48724306", "0.4866558", "0.4863984", "0.48631167", "0.4862115", "0.48576334", "0.4857172", "0.48535842", "0.48396054", "0.48259032", "0.48196265", "0.48190293", "0.48180196", "0.48169568", "0.4814178", "0.48127797", "0.48053378", "0.48046774", "0.48026407", "0.47999117", "0.4796241", "0.47878113", "0.4780726", "0.47797176", "0.47796512", "0.477688", "0.4772101", "0.47583696", "0.475618", "0.47553357", "0.47527665", "0.47452703" ]
0.0
-1
ConcatenatedDataSource A ConcatenatedDataSource glues two other lists together so they can be treated as one. The concatenated lists can be passed to other algorithms.
void example4() { IndexedDataSource<UnsignedInt1Member> list1 = nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 100); IndexedDataSource<UnsignedInt1Member> list2 = nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 1000); IndexedDataSource<UnsignedInt1Member> joinedList = new ConcatenatedDataSource<>(list1, list2); Fill.compute(G.UINT1, G.UINT1.random(), joinedList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Concat createConcat();", "private void addCombinedOccurence(List<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList,\n\t\t\tExampleSetBuilder builder, Example leftExample, Example rightExample) {\n\t\tdouble[] unionDataRow = new double[unionAttributeList.size()];\n\t\tint attributeIndex = 0;\n\t\tfor (AttributeSource attributeSource : originalAttributeSources) {\n\t\t\tif (attributeSource.getSource() == AttributeSource.FIRST_SOURCE) {\n\t\t\t\tunionDataRow[attributeIndex] = leftExample.getValue(attributeSource.getAttribute());\n\t\t\t} else if (attributeSource.getSource() == AttributeSource.SECOND_SOURCE) {\n\t\t\t\tunionDataRow[attributeIndex] = rightExample.getValue(attributeSource.getAttribute());\n\t\t\t}\n\t\t\tattributeIndex++;\n\t\t}\n\t\tbuilder.addRow(unionDataRow);\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<T> concat(\r\n\t\t\t@Nonnull Observable<? extends T> first,\r\n\t\t\t@Nonnull Observable<? extends T> second) {\r\n\t\tList<Observable<? extends T>> list = new ArrayList<Observable<? extends T>>();\r\n\t\tlist.add(first);\r\n\t\tlist.add(second);\r\n\t\treturn concat(list);\r\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<T> concat(\r\n\t\t\t@Nonnull final Iterable<? extends Observable<? extends T>> sources) {\r\n\t\treturn new Concat.FromIterable.Selector<Observable<? extends T>, T>(\r\n\t\t\t\tsources, Functions.<Observable<? extends T>>identity());\r\n\t}", "public void addPreferredDataSources(Collection<DataSource> sources) {\n if (containsDataSource(sources)) { // there are duplicates so trim the collection\n removeIdenticalDataSources(sources);\n } \n datasources.addAll(0,sources);\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "@Test\n public void testConcat() {\n// System.out.println(\"---concat---\");\n// //Test1: concatenating two empty lists returns an empty list\n// ADTList instance = ADTList.create();\n// ADTList list = ADTList.create();\n// ADTList expResult = ADTList.create();\n// ADTList result = instance.concat(list);\n// assertEquals(expResult, result);\n// System.out.println(\"Test1 OK\");\n// \n// //Test2.1: concatenating an empty list with a non-empty list returns the non-empty list\n// ADTList instance2 = ADTList.create();\n// ADTList list2 = createTestADTListIns(6);\n// ADTList expResult2 = list2;\n// ADTList result2 = instance2.concat(list2);\n// assertEquals(expResult2, result2);\n// System.out.println(\"Test2.1 OK\");\n// \n// //Test2.2: concatenating a non-empty list with an empty list returns the non-empty list\n// ADTList instance3 = createTestADTListIns(6);\n// ADTList list3 = ADTList.create();\n// ADTList expResult3 = instance3;\n// ADTList result3 = instance3.concat(list3);\n// assertEquals(expResult3, result3);\n// System.out.println(\"Test2.2 OK\");\n// \n// //Test3: concatenating two non-empty lists returns a new list in the form [list1 list2].\n// ADTList instance4 = createTestADTList(1,1,2,2,3,3);\n// ADTList list4 = createTestADTList(4,1,5,2,6,3);\n// ADTList expResult4 = createTestADTListIns(6);\n// ADTList result4 = instance4.concat(list4);\n// assertEquals(expResult4, result4);\n// System.out.println(\"Test3 OK\");\n \n }", "@Nonnull \r\n\tpublic static <T, U> Observable<U> concat(\r\n\t\t\t@Nonnull final Observable<? extends Observable<? extends T>> sources,\r\n\t\t\t@Nonnull Func2<? super Observable<? extends T>, ? super Integer, ? extends Observable<? extends U>> resultSelector\r\n\t) {\r\n\t\treturn new Concat.FromObservable.IndexedSelector<T, U>(sources, resultSelector);\r\n\t}", "@Override\n\tpublic void concatenate(SetLinkedList<T> otherSet) {\n\t\tthrow new UnsupportedOperationException(\"Not implemented yet!\");\n\t}", "@Nonnull \r\n\tpublic static <T, U> Observable<U> concat(\r\n\t\t\t@Nonnull final Observable<? extends Observable<? extends T>> sources,\r\n\t\t\t@Nonnull Func1<? super Observable<? extends T>, ? extends Observable<? extends U>> resultSelector\r\n\t) {\r\n\t\treturn new Concat.FromObservable.Selector<T, U>(sources, resultSelector);\r\n\t}", "private static DataSources toDataSources(OutputGenerator outputGenerator, List<DataSource> sharedDataSources) {\n final List<DataSource> dataSources = outputGenerator.getDataSources();\n final SeedType seedType = outputGenerator.getSeedType();\n\n if (seedType == SeedType.TEMPLATE) {\n return new DataSources(ListUtils.concatenate(dataSources, sharedDataSources));\n } else if (seedType == SeedType.DATASOURCE) {\n // Since every data source shall generate an output there can be only 1 datasource supplied.\n Validate.isTrue(dataSources.size() == 1, \"One data source expected for generation driven by data sources\");\n return new DataSources(dataSources);\n } else {\n throw new IllegalArgumentException(\"Don't know how to handle the seed type: \" + seedType);\n }\n }", "public void addDataSources(Collection<DataSource> sources) {\n if (containsDataSource(sources)) { // there are duplicates so trim the collection\n removeIdenticalDataSources(sources);\n }\n datasources.addAll(sources);\n }", "@Nonnull \r\n\tpublic static <T> Observable<T> concat(\r\n\t\t\t@Nonnull final Observable<? extends Observable<? extends T>> sources\r\n\t) {\r\n\t\treturn new Concat.FromObservable.Selector<T, T>(sources, Functions.<Observable<? extends T>>identity());\r\n\t}", "@Nonnull\r\n\tpublic static <T, U> Observable<U> concat(\r\n\t\t\t@Nonnull final Func1<? super T, ? extends Observable<? extends U>> resultSelector,\r\n\t\t\t\t@Nonnull final T... source\r\n\t\t\t\t\t) {\r\n\t\treturn new Concat.FromIterable.Selector<T, U>(Arrays.asList(source), resultSelector);\r\n\t}", "private static <Item extends Comparable> List<Item> catenate(List<Item> q1, List<Item> q2) {\n List<Item> catenated = new ArrayList<>();\n for (Item item : q1) {\n catenated.add(item);\n }\n for (Item item: q2) {\n catenated.add(item);\n }\n return catenated;\n }", "@Nonnull\r\n\tpublic static <T, U> Observable<U> concat(\r\n\t\t\t@Nonnull final Iterable<? extends T> source, \r\n\t\t\t@Nonnull final Func1<? super T, ? extends Observable<? extends U>> resultSelector) {\r\n\t\treturn new Concat.FromIterable.Selector<T, U>(source, resultSelector);\r\n\t}", "public IterableDataSource(final DataSourceImpl anotherDataSource) {\n super(anotherDataSource);\n }", "public static void combineLatest() {\n\n System.out.println(\"# 1\");\n\n /*\n Emits item every second\n */\n Observable sourceInterval = Observable.interval(1L, TimeUnit.MILLISECONDS).take(10);\n\n /*\n Emits string items\n */\n Observable sourceString = Observable.fromIterable(sData);\n\n Observable<?> combined = Observable.combineLatest((objects) -> {\n StringBuilder stringBuilder = new StringBuilder();\n Stream.of(objects).forEach(stringBuilder::append);\n return stringBuilder.toString();\n }, 1, sourceInterval, sourceString);\n\n combined.subscribe(new MyObserver<>());\n\n System.out.println(\"# 2\");\n\n /*\n Because empty observable immediately terminates hence whole sequence terminates.\n */\n combined = Observable.combineLatest((objects) -> {\n StringBuilder stringBuilder = new StringBuilder();\n Stream.of(objects).forEach(stringBuilder::append);\n return stringBuilder.toString();\n }, 1, sourceInterval, sourceString, Observable.empty());\n combined.subscribe(new MyObserver<>());\n\n System.out.println(\"# 3\");\n /*\n Same as above but instead collection of sources are used.\n */\n List<Observable<?>> collection = new ArrayList<>();\n collection.add(sourceInterval);\n collection.add(sourceString.repeat(1));\n combined = Observable.combineLatest(collection, (objects) -> {\n StringBuilder stringBuilder = new StringBuilder();\n Stream.of(objects).forEach(stringBuilder::append);\n return stringBuilder.toString();\n });\n combined.subscribe(new MyObserver<>());\n\n System.out.println(\"# 4\");\n /*\n Explicitly combine 2 sources, similarly it can be done up to 10 sources\n */\n combined = Observable.combineLatest(sourceInterval, sourceString.repeat(1),\n (first, second) -> first + \"-\" + second);\n combined.subscribe(new MyObserver<>());\n }", "public LinkedList concatenate(LinkedList anotherList) {\n\t\tLinkedList newString = stringList;\n\t\t\n\t\treturn newString;\n\t}", "@Nonnull\r\n\tpublic static <T, U> Observable<U> concat(\r\n\t\t\t@Nonnull final Func2<? super T, ? super Integer, ? extends Observable<? extends U>> resultSelector,\r\n\t\t\t@Nonnull T... source) {\r\n\t\treturn new Concat.FromIterable.IndexedSelector<T, U>(Arrays.asList(source), resultSelector);\r\n\t}", "@Override\n\tpublic void visit(Concat arg0) {\n\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<T> concat(\r\n\t\t\t@Nonnull final Observable<? extends T>... sources) {\r\n\t\treturn new Concat.FromIterable.Selector<Observable<? extends T>, T>(\r\n\t\t\t\tArrays.asList(sources), Functions.<Observable<? extends T>>identity());\r\n\t}", "@Override\n\tpublic void visit(Concat arg0) {\n\t\t\n\t}", "public void testMergeOfParameterLists() throws SQLException {\n SimpleParameterList o1SPL = new SimpleParameterList(8, Boolean.TRUE);\n o1SPL.setIntParameter(1, 1);\n o1SPL.setIntParameter(2, 2);\n o1SPL.setIntParameter(3, 3);\n o1SPL.setIntParameter(4, 4);\n\n SimpleParameterList s2SPL = new SimpleParameterList(4, Boolean.TRUE);\n s2SPL.setIntParameter(1, 5);\n s2SPL.setIntParameter(2, 6);\n s2SPL.setIntParameter(3, 7);\n s2SPL.setIntParameter(4, 8);\n\n o1SPL.appendAll(s2SPL);\n\n assertEquals(\n \"Expected string representation of parameter list does not match product.\",\n \"<[1 ,2 ,3 ,4 ,5 ,6 ,7 ,8]>\", o1SPL.toString());\n }", "@Nonnull\r\n\tpublic static <T, U> Observable<U> concat(\r\n\t\t\t@Nonnull final Iterable<? extends T> source, \r\n\t\t\t@Nonnull final Func2<? super T, ? super Integer, ? extends Observable<? extends U>> resultSelector) {\r\n\t\treturn new Concat.FromIterable.IndexedSelector<T, U>(source, resultSelector);\r\n\t}", "private Cell[] concatArray(Cell[] arr1, Cell[] arr2) {\r\n\t\tCell[] concat = new Cell[arr1.length + arr2.length];\r\n\t\tfor (int k = 0; k < concat.length; k++) {\r\n\t\t\tif (k < arr1.length) {\r\n\t\t\t\tconcat[k] = arr1[k];\r\n\t\t\t} else {\r\n\t\t\t\tconcat[k] = arr2[k - arr1.length];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn concat;\r\n\t}", "@Override\r\n\t\tpublic final boolean combinePropertyLists()\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}", "@Nonnull \r\n\tpublic static <T> Observable<List<T>> combine(\r\n\t\t\t@Nonnull final Func0<? extends T> supplier, \r\n\t\t\t@Nonnull Observable<? extends T> src) {\r\n\t\treturn select(src, new Func1<T, List<T>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic List<T> invoke(T param1) {\r\n\t\t\t\tList<T> result = new ArrayList<T>();\r\n\t\t\t\tresult.add(supplier.invoke());\r\n\t\t\t\tresult.add(param1);\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static <T> T[] concat(T[] first, T[] second) {\r\n\t\tT[] result = Arrays.copyOf(first, first.length + second.length);\r\n\t\tSystem.arraycopy(second, 0, result, first.length, second.length);\r\n\t\treturn result;\r\n\t}", "public void setDataSources(ArrayList dataSources) {\n this.dataSources = dataSources;\n }", "private String[] combine(String array1[], String array2[]) {\n\t\tint length = array1.length + array2.length;\r\n\t\tString result[] = new String[length];\r\n\t\tSystem.arraycopy(array1, 0, result, 0, array1.length);\r\n\t\tSystem.arraycopy(array2, 0, result, array1.length, array2.length);\r\n\t\treturn result;\r\n\t}", "Nda<V> concatAt( int axis, Nda<V> other );", "public void addSources(String[] sources) {\n if ( ! this.correlatedSources.isEmpty()) {\n throw new IllegalArgumentException(\"CORE: correlated sources have already been declared in this clause\");\n }\n this.correlatedSources.addAll(Arrays.asList(sources));\n }", "int[] concat(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n st[0] = s1;\r\n\t\tst[1] = t2;\r\n\t\t\r\n\t\taddEdge(t1, epssymbol, s2);\r\n\t\t\r\n\t\treturn st;\r\n\t}", "@Override\n public BinaryOperator<TradeAccumulator> combiner() {\n return (accum1, accum2) -> {return accum1.addAll(accum2);};\n }", "public void addPreferredDataSource(DataSource source) { \n if (!containsDataSource(source)) datasources.add(0,source);\n }", "public static Object[] arrayConcatenate(Object[] input, Object[] a1, Object[] a2) {\r\n\t\tint i = 0;\r\n\t\tfor(int j = 0; j < a1.length; j++) {\r\n\t\t\tinput[i] = a1[j];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tfor(int j = 0; j < a2.length; j++) {\r\n\t\t\tinput[i] = a2[j];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn input;\r\n\t}", "public String devolver_campos_concatenados(){\n String dato_concatenado=\"\";\n campos_concaenados=\" \";\n for (int j=0;j<numero_campos;j++){\n if(j==numero_campos-1){\n dato_concatenado=campos[j];\n }else{\n dato_concatenado=campos[j]+\", \";\n }\n campos_concaenados=campos_concaenados+dato_concatenado;\n }\n \n return campos_concaenados;\n }", "private Position[] concatArrays(Position[] first, Position[] second)\r\n {\r\n int size = first.length + second.length;\r\n Position[] a = new Position[size];\r\n int pt = 0;\r\n\r\n for (Position tmpPos : first)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n for (Position tmpPos : second)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n return a;\r\n }", "DataSource clone();", "@Override\n\tpublic void visit(MySQLGroupConcat arg0) {\n\t\t\n\t}", "public static void main(String[] args) {\n List<Integer> list1 = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n list1.add(2);\n list1.add(3);\n list1.add(4);\n list2.add(1);\n list2.add(5);\n list2.add(6);\n merge(list1, list2).forEach(item -> System.out.print(item + \" \"));\n }", "public String concate(String x, String y)\n\t{\n\t\treturn x.concat(y);\n\t}", "public void addDataSource(DataSource source) {\n if (!containsDataSource(source)) datasources.add(source);\n }", "public /*@ non_null @*/\n JMLListEqualsNode<E> concat(/*@ non_null @*/ JMLListEqualsNode<E> ls2)\n {\n return (next == null\n ? new JMLListEqualsNode<E>(val, ls2)\n : new JMLListEqualsNode<E>(val, next.concat(ls2))\n );\n }", "public String concatenate() {\n\t\t// loop over each node in the list and \n\t\t// concatenate into a single string\n\t\tString concatenate = \"\";\n\t\tNode nodref = head;\n\t\twhile (nodref != null){\n\t\t\tString temp = nodref.data;\n\t\t\tconcatenate += temp;\n\t\t\tnodref = nodref.next;\n\t\t}\n\t\treturn concatenate;\n\t}", "Nda<V> concatAt( int axis, Nda<V> other, Nda<V>... ndArrays );", "@NonNull\n @SafeVarargs\n static DoubleConsList<Double> concat(@NonNull DoubleConsList<Double> first, @NonNull DoubleConsList<Double>... rest) {\n Objects.requireNonNull(first, \"Null concat argument at position 0\");\n Objects.requireNonNull(rest, ConsUtil.MSG_ARG_ARRAY_REST_IS_NULL);\n if (rest.length == 0) {\n return first;\n }\n DoubleConsList<Double> result = rest[rest.length - 1];\n if (result == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + rest.length);\n }\n for (int i = rest.length - 2; i >= -1; i--) {\n DoubleConsList<Double> cons;\n if (i == -1) {\n cons = first;\n } else {\n if (rest[i] == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + (i + 1));\n }\n cons = rest[i].doubleReverse();\n }\n while (cons != Nil.INSTANCE) {\n result = new DoubleConsListImpl(cons.doubleHead(), result);\n cons = cons.doubleTail();\n }\n }\n return result;\n }", "public void concat2Strings(String s1, String s2)\r\n {\r\n // s1.concat(s2);\r\n ///sau\r\n s1=s1+s2;\r\n System.out.println(\"Stringurile concatenate sunt \"+s1);\r\n }", "public void joinTwoArrayList(ArrayList<E> array1 , ArrayList<E> array2){\n\t\tint length2 = array2.size();\n\t\tfor(int i=0 ; i<length2 ; i++){\n\t\t\tarray1.add(array2.getElement(i));\n\t\t}\n\t}", "private void merge(DefaultSingleGraphDataUnit source) throws LpException {\n try {\n execute((connection) -> {\n final Update update = connection.prepareUpdate(\n QueryLanguage.SPARQL, QUERY_COPY);\n final SimpleDataset dataset = new SimpleDataset();\n dataset.addDefaultGraph(source.getReadGraph());\n dataset.setDefaultInsertGraph(graph);\n update.setDataset(dataset);\n update.execute();\n });\n } catch (LpException ex) {\n throw new LpException(\"Can't merge with: {}\",\n source.getIri(), ex);\n }\n }", "public String[] concatArrays(String[] input1, String[] input2){\n String[] result = new String[input1.length + input2.length];\n System.arraycopy(input1, 0, result, 0, input1.length);\n System.arraycopy(input2, 0, result, input1.length, result.length - input1.length);\n return result;\n }", "@SuppressWarnings(\"unchecked\")\n public static <T> T[] concat(T[] left, T[] right) {\n T[] res;\n\n if (ArrayUtils.isEmpty(left)) {\n res = right;\n } else if (ArrayUtils.isEmpty(right)) {\n res = left;\n } else {\n res = (T[]) Array.newInstance(left[0].getClass(), left.length + right.length);\n System.arraycopy(left, 0, res, 0, left.length);\n System.arraycopy(right, 0, res, left.length, right.length);\n }\n\n return res;\n }", "@NonNull\n @SafeVarargs\n static <V> ConsList<V> concat(@NonNull ConsList<V> first, @NonNull ConsList<V>... rest) {\n Objects.requireNonNull(first, \"Null concat argument at position 0\");\n Objects.requireNonNull(rest, ConsUtil.MSG_ARG_ARRAY_REST_IS_NULL);\n if (rest.length == 0) {\n return first;\n }\n ConsList<V> result = rest[rest.length - 1];\n if (result == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + rest.length);\n }\n for (int i = rest.length - 2; i >= -1; i--) {\n ConsList<V> cons;\n if (i == -1) {\n cons = first;\n } else {\n if (rest[i] == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + (i + 1));\n }\n cons = rest[i].reverse();\n }\n while (cons != Nil.INSTANCE) {\n result = new ConsListImpl<>(cons.head(), result);\n cons = cons.tail();\n }\n }\n return result;\n }", "@Test\n void stringListCombine() {\n PartialResultSet a =\n PartialResultSet.newBuilder()\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"a\"))\n .addValues(Value.newBuilder().setStringValue(\"b\"))))\n .setChunkedValue(true)\n .build();\n PartialResultSet b =\n PartialResultSet.newBuilder()\n .addValues(\n Value.newBuilder()\n .setListValue(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"c\"))\n .addValues(Value.newBuilder().setStringValue(\"d\"))))\n .setChunkedValue(false)\n .build();\n ResultSet r = PartialResultSetCombiner.combine(Arrays.asList(a, b));\n assertEquals(\n ListValue.newBuilder()\n .addValues(Value.newBuilder().setStringValue(\"a\"))\n .addValues(Value.newBuilder().setStringValue(\"bc\"))\n .addValues(Value.newBuilder().setStringValue(\"d\"))\n .build(),\n r.getRows(0).getValues(0).getListValue());\n }", "public TDropListItem combineStrategies(TDropListItem selectedItem1, TDropListItem selectedItem2);", "@Nonnull\r\n\tpublic static <T> Observable<T> merge(\r\n\t\t\t@Nonnull Observable<? extends T> first,\r\n\t\t\t@Nonnull Observable<? extends T> second) {\r\n\t\tList<Observable<? extends T>> list = new ArrayList<Observable<? extends T>>();\r\n\t\tlist.add(first);\r\n\t\tlist.add(second);\r\n\t\treturn merge(list);\r\n\t}", "@Override\n public void combineCons(ArrayList<Note> list) {\n }", "public GridCollector merge(GridCollector other) {\n\t\t// cell-wise merge\n\t\tIntStream.range(0, cells.size())\n\t\t .forEach(i -> cells.get(i).addAll(other.cells.get(i)));\n\t\treturn this;\n\t}", "@Override\n public BinaryOperator<List<Integer>> combiner() {\n return (resultList1, resultList2) -> {\n Integer currentTotal1 = resultList1.get(0);\n Integer currentTotal2 = resultList2.get(0);\n currentTotal1 += currentTotal2;\n resultList1.set(0, currentTotal1);\n return resultList1;\n };\n }", "public static StringList createFrom(String list1[], String list2[]) {\n StringList list = new StringList(list1);\n list.merge(list2);\n return list;\n }", "@SafeVarargs\n public static <T> Iterable<T> join(Iterable<? extends T>... collections) {\n return new ConcatenationIterable<T>(collections);\n }", "public static void main(String[] args) {\n\t\t\t\n\t\tLinkedList<Integer> l1 = new LinkedList<Integer>();\n\t\tLinkedList<Integer> l2 = new LinkedList<Integer>();\n\t\tl1.add(34);\n\t\tl1.add(67);\n\t\tl2.add(89);\n\t\tl2.add(45);\n\t\tl1.addAll(l2);\n\t\tSystem.out.println(l1);\n\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @BackpressureSupport(BackpressureKind.FULL)\n @SchedulerSupport(SchedulerKind.NONE)\n public static <T> Observable<T> concatArray(Publisher<? extends T>... sources) {\n if (sources.length == 0) {\n return empty();\n } else\n if (sources.length == 1) {\n return fromPublisher(sources[0]);\n }\n return fromArray(sources).concatMap((Function)Functions.identity());\n }", "private static byte[] concatenateByteArrays(byte[] first, byte[] second) {\n int firstLength = first.length;\n int secondLength = second.length;\n\n byte[] ret = new byte[first.length + second.length];\n System.arraycopy(first, 0, ret, 0, first.length);\n System.arraycopy(second, 0, ret, first.length, second.length);\n\n return ret;\n }", "public ArrayList<String> combineDataOpsAndIntents(String p1, String p2) {\n\t\tArrayList<String> logics1 = QueryStream.getLogic(p1);\n\t\tArrayList<String> terms1 = QueryStream.getTerms(p1);\n\t\t//Get logic statements from p2\n\t\tArrayList<String> logics2 = QueryStream.getLogic(p2);\n\t\tArrayList<String> terms2 = QueryStream.getTerms(p2);\n\t\t\n\t\tArrayList<String> result_logics = new ArrayList<String>();\n\t\tArrayList<String> result_terms = new ArrayList<String>();\n\t\t\n\t\t//Iterate through logic for p1. If it matches anything in p2,\n\t\t// we add the terms from p1 and p2 together.\n\t\tfor(int i = 0; i < logics1.size(); ++i) {\n\t\t\t\n\t\t\tString result_term = \"\";\n\t\t\t//If any logic matches, we combine the corresponding terms together\n\t\t\tif(logics2.contains(logics1.get(i))) {\n\t\t\t\tresult_term = terms1.get(i) + \" \" + terms2.get(i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult_term = terms1.get(i);\n\t\t\t}\n\t\t\tresult_logics.add(logics1.get(i));\n\t\t\tresult_terms.add(result_term);\n\t\t}\n\t\t//Iterate through the logic for p2. If it includes any logic not\n\t\t// in the results, then add it in.\n\t\tfor(int i = 0; i < logics2.size(); ++i) {\n\t\t\t\n\t\t\tString result_term = \"\";\n\t\t\t//If any logic matches, we combine the corresponding terms together\n\t\t\tif(!result_logics.contains(logics2.get(i))) {\n\t\t\t\tresult_logics.add(logics2.get(i));\n\t\t\t\tresult_term = terms2.get(i);\n\t\t\t\tresult_terms.add(result_term);\n\t\t\t}\n\t\t}\n\t\t\n//\t\tfor(String l : result_logics) {\n//\t\t\tSystem.out.println(l);\n//\t\t}\n\t\t\n\t\t//Now we can create a new policy given the two strings\n\t\treturn produceDataOpsIntentsPolicy(result_logics, result_terms);\n\t}", "public ConcatFilter() {\n super();\n }", "public static String concat(Object s1, Object s2) {\n return String.valueOf(s1) + String.valueOf(s2);\n }", "@Override\r\n\tpublic void merge(List<EObject> sources, List<EObject> targets) {\n\t\tcontext = targets.get(0).eResource().getResourceSet();\r\n\r\n\t\tsuper.merge(sources, targets);\r\n\t}", "public void removeIdenticalDataSources(DataSource source) {\n Iterator<DataSource> iter=datasources.iterator();\n while (iter.hasNext()) {\n DataSource s=iter.next();\n if (s.equals(source)) iter.remove();\n } \n }", "public static DataSet mergeDatasets(DataSet first, DataSet second, List<String> forbiddenAttributes) throws Exception {\n Logger logger = LoggerFactory.getLogger(GSHelper.class);\n Graph mergedGraph = createGraphFromDataSet(first);\n logger.debug(\"creating merged internal graph...\");\n for (CoriaEdge edge : second.getEdges()) {\n try {\n logger.trace(\"Edge: \" + edge);\n /*\n * Since we're using the same edge naming schema here as everywhere else in coria (start_node->destination_node)\n * we cen create a combined graph containing edges from both graphs. This works because GraphStream\n * will only add edges which don't exists already.\n */\n Edge e = mergedGraph.addEdge(edge.getSourceNode() + \"->\" + edge.getDestinationNode(), edge.getSourceNode(), edge.getDestinationNode());\n } catch (Exception ex) {\n logger.error(\"failed creating edge for CoriaEdge {}\", edge);\n logger.error(ex.getMessage());\n return null;\n }\n }\n logger.debug(\"graph successfully created, building merged dataset...\");\n DataSet merged = new DataSet();\n\n logger.debug(\"merging nodes...\");\n\n for(Node node : mergedGraph.getEachNode()){\n CoriaNode cn = new CoriaNode();\n Optional<CoriaNode> optFirstNode = first.getNodes().stream().filter(coriaNode -> coriaNode.getAsid().equals(node.getId())).findFirst();\n CoriaNode fromFirst = null;\n if(optFirstNode.isPresent()){\n fromFirst = optFirstNode.get();\n }\n CoriaNode fromSecond = null;\n Optional<CoriaNode> optSecondNode = second.getNodes().stream().filter(coriaNode -> coriaNode.getAsid().equals(node.getId())).findFirst();\n if(optSecondNode.isPresent()){\n fromSecond = optSecondNode.get();\n }\n\n if(fromFirst != null && fromSecond == null){\n //1. Node is only in first -> take all information from first\n cn.setName(fromFirst.getName());\n cn.setAsid(fromFirst.getAsid());\n// cn.setRiscScore(fromFirst.getRiscScore()); //this value is not valid after merging\n cn.setAttributes(filterAttributes(fromFirst.getAttributes(), forbiddenAttributes));\n }else if(fromSecond != null && fromFirst == null){\n //2. Node is only in second -> take all information from second\n cn.setName(fromSecond.getName());\n cn.setAsid(fromSecond.getAsid());\n// cn.setRiscScore(fromSecond.getRiscScore()); //this value is not valid after merging\n cn.setAttributes(filterAttributes(fromSecond.getAttributes(), forbiddenAttributes));\n }else if(fromFirst != null && fromSecond != null){\n //3. Node is found in both DataSets -> try merging\n cn.setAsid(fromFirst.getAsid()); //this one is the same on both sets\n\n if(fromFirst.getName().equals(fromFirst.getAsid())){\n //first dataset has no name for as -> check the second\n if(fromSecond.getName().equals(fromSecond.getAsid())){\n //the second has also no name for as -> use asid as name\n cn.setName(fromFirst.getAsid());\n }else{\n //the second has a separate name for as -> use this\n cn.setName(fromSecond.getName());\n }\n }else{\n //first has name for as -> use it\n cn.setName(fromFirst.getName());\n }\n\n cn.setAttributes(\n syncAttributes(\n filterAttributes(fromFirst.getAttributes(), forbiddenAttributes),\n filterAttributes(fromSecond.getAttributes(), forbiddenAttributes)));\n\n }else{\n //something is wrong here!\n logger.warn(\"ooops ¯\\\\_(ツ)_/¯\");\n }\n merged.getNodes().add(cn);\n }\n\n logger.debug(\"merging edges...\");\n\n for(Edge edge : mergedGraph.getEachEdge()){\n CoriaEdge ce = new CoriaEdge();\n try {\n CoriaEdge fromFirst = first.getEdges().stream().filter(coriaEdge -> coriaEdge.getName().equals(edge.getId())).findFirst().get();\n CoriaEdge fromSecond = second.getEdges().stream().filter(coriaEdge -> coriaEdge.getName().equals(edge.getId())).findFirst().get();\n\n if(fromFirst != null && fromSecond == null){\n //1. Edge is only in first -> take all information from first\n ce.setName(fromFirst.getName());\n ce.setAttributes(filterAttributes(fromFirst.getAttributes(), forbiddenAttributes));\n }else if(fromSecond != null && fromFirst == null){\n //2. Edge is only in first -> take all information from first\n ce.setName(fromSecond.getName());\n ce.setAttributes(filterAttributes(fromSecond.getAttributes(), forbiddenAttributes));\n }else if(fromFirst != null && fromSecond != null){\n //3. Edge is found in both DataSets -> try merging\n ce.setName(fromSecond.getName());\n\n ce.setAttributes(\n syncAttributes(\n filterAttributes(fromFirst.getAttributes(), forbiddenAttributes),\n filterAttributes(fromSecond.getAttributes(), forbiddenAttributes)));\n }else{\n //something is wrong here!\n }\n }catch(Exception ex){\n String origMessage = ex.getMessage();\n ex = new Exception(\"Error while merging edge \" + edge.getId() + \" because \" + origMessage);\n logger.error(ex.getMessage());\n throw ex;\n }\n merged.getEdges().add(ce);\n }\n logger.debug(\"finished merging\");\n\n return merged;\n }", "static List<StateRef> append(List<StateRef> l1, List<StateRef> l2) {\n l1.addAll(l2);\n return l1;\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> startWith(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\t@Nonnull Iterable<? extends T> values,\r\n\t\t\t@Nonnull Scheduler pool) {\r\n\t\treturn concat(toObservable(values, pool), source);\r\n\t}", "public List<String> merge(List<String> list1, List<String> list2){\n List<String> res = new ArrayList<>();\n for (String l1 : list1){\n for (String l2 : list2){\n res.add(l1+l2);\n }\n }\n return res;\n }", "private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }", "public ConcatReader(Reader in1, Reader in2){\r\n\t\taddReader(in1);\r\n\t\taddReader(in2);\r\n\t\tlastReaderAdded();\r\n\t}", "private Combined() {}", "private static void mergingSync() {\n Observable.merge(getDataSync(1), getDataSync(2)).blockingForEach(System.out::println);\n }", "public void concatMap() {\r\n\t\tList<Integer> list1 = Arrays.asList(1, 2, 3, 7, 8, 9, 10);\r\n\t\tList<Integer> list2 = Arrays.asList(4, 5, 6);\r\n\t\tObservable.just(list1, list2).concatMap(x -> Observable.from(x)).map(x -> x * 10).subscribe(integerSubscribe());\r\n\t}", "@Override\n\tpublic Video concat(List<Video> videos) {\n\t\treturn null;\n\t}", "public void concatenateList (linkedList<E> M) {\n\r\n if(this.head == null){\r\n head = M.head;\r\n tail = M.tail;\r\n } else {\r\n tail.setNext(M.head);\r\n tail = M.tail;\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> array1 = new ArrayList<Integer>();\n\t\tarray1.add(1);\n\t\tarray1.add(2);\n\t\tarray1.add(3);\n\t\tarray1.add(4);\n\t\tSystem.out.println(array1);\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tarray2.add(5);\n\t\tarray2.add(6);\n\t\tarray2.add(7);\n\t\tarray2.add(8);\n\t\tSystem.out.println(array2);\n\t\tarray1.addAll(array2);\n\t\tSystem.out.println(array1);\n\t\t\n\t}", "public static String myConcatenator(String str1, String str2)\r\n {\r\n str1 += str2;\r\n return str1;\r\n }", "public static JSONArray concatArrays(JSONArray first, JSONArray second) {\n JSONArray concatenatedArray = new JSONArray();\n if (first == null && second == null) {\n return concatenatedArray;\n } else {\n if (first == null) return second;\n if (second == null) return first;\n\n first.forEach(concatenatedArray::put);\n second.forEach(concatenatedArray::put);\n return concatenatedArray;\n }\n }", "public StringUnionFunc() {\n\t super.addLinkableParameter(\"str1\"); \n\t\t super.addLinkableParameter(\"str2\"); \n }", "public static String[] concatenateArray(String[] a, String[] b) {\n String[] r = new String[a.length + b.length];\n\n for (int i = 0; i < a.length; i++) {\n r[i] = a[i];\n }\n\n for (int i = 0; i < b.length; i++) {\n r[a.length + i] = b[i];\n }\n\n return r;\n }", "private ByteBuffer concatBuffers(List<Object> buffers) throws Exception {\n\t/*\n var length = 0;\n for (var i = 0, l = buffers.length; i < l; ++i) length += buffers[i].length;\n var mergedBuffer = new Buffer(length);\n bufferUtil.merge(mergedBuffer, buffers);\n return mergedBuffer;*/\n\treturn Util.concatByteBuffer(buffers, 0);\n}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tInteger[] arr1 = {1,2,3,4,5};\r\n\t\tInteger[] arr2 = {10,20,30,40,50};\r\n\t\t\r\n\t\t\r\n//\t}\r\n\t\r\n//\tpublic static (ArrayList<Integer> list1, ArrayList<Integer> list2) {\r\n//\t\tInteger[] combine = new Integer[list1.size()+list2.size()];\r\n//\t\tfor(Integer i=0; i<list1.size(); i++) {\r\n//\t\t\tcombine[i] = list1<Integer>;\r\n//\t\t\t\r\n//\t\t}\r\n//\t\t\t\r\n\t\t\t\r\n\t//\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public ArrayList getDataSources() {\n return dataSources;\n }", "public void refreshDataSource(ArrayList<Restroom> newSource){\n\t\tRestroomList = newSource;\n\t\tnotifyDataSetChanged();\n\t}", "@RequiresIdFrom(type = Governor.class)\n\t@Override\n\tpublic String dataRow()\n\t{\n\t\treturn String.format(\"%d,%s\", first, second.getSqlId());\n\t}", "String afficherDataSource();", "public void replaceDataSource(DataSource oldsource, DataSource newsource) {\n int i=datasources.indexOf(oldsource);\n if (i>=0) datasources.set(i, newsource);\n else datasources.add(newsource);\n }", "private void addLeftOnlyOccurence(List<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList,\n\t\t\tExampleSetBuilder builder, Example leftExample) {\n\t\tdouble[] unionDataRow = new double[unionAttributeList.size()];\n\t\tint attributeIndex = 0;\n\t\tfor (AttributeSource attributeSource : originalAttributeSources) {\n\t\t\tif (attributeSource.getSource() == AttributeSource.FIRST_SOURCE) {\n\t\t\t\tunionDataRow[attributeIndex] = leftExample.getValue(attributeSource.getAttribute());\n\t\t\t} else if (attributeSource.getSource() == AttributeSource.SECOND_SOURCE) {\n\t\t\t\tunionDataRow[attributeIndex] = Double.NaN;\n\t\t\t}\n\t\t\tattributeIndex++;\n\t\t}\n\t\tbuilder.addRow(unionDataRow);\n\t}", "public static void seqconcat(ArrayList<String> x, ArrayList<String> y, ArrayList<String> z, JTextArea ta) {\n\t\tfor (int i=0; i<x.size(); i++)\n\t\t{\n\t\t\tz.add(x.get(i));\n\t\t}\n\t\t\n\t\tfor (int i=0; i<y.size(); i++)\n\t\t{\n\t\t\tz.add(y.get(i));\n\t\t}\n\t\t//<1,2,3,4>\n\t\t//<2,3,4,5>\n\t\t\n\t\t//This is the loop to print all the items of the z variable\n\t\tta.setText(\"< \");\n\t\tfor (int i=0; i<z.size(); i++)\n\t\t{\n\t\t\tta.append(z.get(i)+\" \");\n\t\t}\n\t\tta.append(\">\");\n\t}", "@Override\n\tpublic void merge(MutableAggregationBuffer buffer1, Row buffer2) {\n\t\tif (buffer1.getString(0) == null) {\n\t\t\tbuffer1.update(0, buffer2.getString(0));\n\t\t} else\n\t\t\tbuffer1.update(0, buffer1.getString(0) + \",\" + buffer2.getString(0));\n\n\t\tbuffer1.update(1, buffer1.getLong(1) + buffer2.getLong(1));\n\t\tbuffer1.update(2, buffer1.getLong(2) + buffer2.getLong(2));\n\n\t}", "public static void concatMap() {\n List<String> data = Utils.getData();\n Observable.fromIterable(data)\n .concatMap((item) -> Observable.just(item + \" concat mapped\").repeat(2)\n ).subscribe(new MyObserver<>());\n }", "public boolean containsDataSource(DataSource source) {\n for (DataSource s:datasources) {\n // if (s.equals(source)) System.err.println(s.toString()+\" <= EQUALS => \"+source.toString());\n // else if (s.hasSameOrigin(source)) System.err.println(s.toString()+\" <= SAME SOURCE => \"+source.toString()+ \". Diff=\"+s.reportFirstDifference(source));\n if (s.equals(source)) return true;\n }\n return false;\n }", "public void removeIdenticalDataSources(Collection<DataSource> sources) {\n for (DataSource source:sources) {\n removeIdenticalDataSources(source); \n } \n }" ]
[ "0.6393722", "0.5695441", "0.55697167", "0.5495186", "0.54383236", "0.53979486", "0.53979486", "0.53948975", "0.53801024", "0.53788936", "0.53703743", "0.5352087", "0.5330472", "0.5304463", "0.5301104", "0.5288582", "0.52829885", "0.52784044", "0.52782774", "0.52590805", "0.52439576", "0.5237353", "0.52359617", "0.5224465", "0.51704586", "0.5144609", "0.5083402", "0.5069094", "0.5046157", "0.5027826", "0.49862915", "0.497184", "0.49574324", "0.49471515", "0.4917671", "0.48959336", "0.4894253", "0.4894023", "0.48909476", "0.48890224", "0.48718154", "0.48481175", "0.4841711", "0.4837916", "0.48167995", "0.47986233", "0.4786895", "0.4782114", "0.4780845", "0.47739002", "0.4754308", "0.4751434", "0.47469774", "0.47193888", "0.47181198", "0.47174102", "0.47080773", "0.47012407", "0.4688716", "0.46866265", "0.46853998", "0.46784997", "0.4666949", "0.4660524", "0.46574473", "0.46563813", "0.4642596", "0.46400276", "0.46397296", "0.46346837", "0.46345142", "0.4629167", "0.4625468", "0.46244514", "0.46238214", "0.46235162", "0.4596433", "0.45855543", "0.45782104", "0.45611897", "0.4560868", "0.45542765", "0.45466483", "0.4544227", "0.45418003", "0.45379668", "0.4534811", "0.4517821", "0.45153788", "0.4510603", "0.4505568", "0.45042533", "0.44980422", "0.44918808", "0.44839516", "0.44803545", "0.44776443", "0.44728234", "0.447151", "0.44481945" ]
0.5830138
1
ConditionalDataSource A ConditionalDataSource creates a list that only contains values from an underlying list that satisfy a condition. One of the design constraints on Zorbage is that for the most part all IndexedDataSources have a fixed size. Because of this ConditionalDataSources must also follow this contract. To do so you make sure that all list data writes only succeed with values that satisfy the original condition upon which the data source was built.
@SuppressWarnings("unused") void example5() { // allocate a list IndexedDataSource<UnsignedInt10Member> list = nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT10.construct(), 100000); // fill it with something Fill.compute(G.UINT10, G.UINT10.random(), list); // then make the condition "value is less than 44" Function1<Boolean,UnsignedInt10Member> lessThan44 = new Function1<Boolean,UnsignedInt10Member>() { @Override public Boolean call(UnsignedInt10Member value) { return value.v() < 44; } }; // get a view of all values that satisfy this IndexedDataSource<UnsignedInt10Member> conditionalList = new ConditionalDataSource<UnsignedInt10Algebra, UnsignedInt10Member>( G.UINT10, list, lessThan44); // count how many values satisfy this constraint long count = conditionalList.size(); // now get soem values that satisy the condition UnsignedInt10Member value = G.UINT10.construct(); GetV.first(conditionalList, value); // try to set the values to something else value.setV(22); // this succeeds since 22 < 44 and satisfies the condition SetV.first(conditionalList, value); value.setV(99); // this fails since 99 >= 44 and does not satisfy the condition // an exception will be thrown SetV.first(conditionalList, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public QueryFilter(List<ConditionalExpression> list) {\r\n\t\tthis.list = list;\r\n\t}", "@Override\n\tpublic List<DeviceData> getList(DeviceData condition) {\n\t\treturn null;\n\t}", "boolean getConditionListNull();", "public int[] getConditions() { return conditional; }", "public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}", "boolean hasConditionList();", "public io.dstore.values.StringValue getConditionList() {\n return conditionList_ == null ? io.dstore.values.StringValue.getDefaultInstance() : conditionList_;\n }", "io.dstore.values.StringValueOrBuilder getConditionListOrBuilder();", "@Override\n\tpublic boolean hasDataSource() {\n\t\treturn _dataSource.size() > 0;\n\t}", "public Builder setConditionListNull(boolean value) {\n \n conditionListNull_ = value;\n onChanged();\n return this;\n }", "public io.dstore.values.StringValue getConditionList() {\n if (conditionListBuilder_ == null) {\n return conditionList_ == null ? io.dstore.values.StringValue.getDefaultInstance() : conditionList_;\n } else {\n return conditionListBuilder_.getMessage();\n }\n }", "Conditional createConditional();", "private com.google.protobuf.SingleFieldBuilderV3<\n io.dstore.values.StringValue, io.dstore.values.StringValue.Builder, io.dstore.values.StringValueOrBuilder> \n getConditionListFieldBuilder() {\n if (conditionListBuilder_ == null) {\n conditionListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.dstore.values.StringValue, io.dstore.values.StringValue.Builder, io.dstore.values.StringValueOrBuilder>(\n getConditionList(),\n getParentForChildren(),\n isClean());\n conditionList_ = null;\n }\n return conditionListBuilder_;\n }", "public java.util.List<IdDt> getCondition() { \n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\treturn myCondition;\n\t}", "io.dstore.values.StringValue getConditionList();", "public io.dstore.values.StringValueOrBuilder getConditionListOrBuilder() {\n return getConditionList();\n }", "CollectIteratorEvaluator(BooleanValue condition) {\n this.condition = condition;\n }", "public List<EvaluetingListDO> findWithCondition(EvaluetingListDO evaluetingList, long limitStart, long pageSize) throws DataAccessException;", "public static interface ReffererConditionBookList {\r\n /**\r\n * Set up refferer condition.\r\n * \r\n * @param cb Condition-bean for refferer. (NotNull)\r\n */\r\n public void setup(LdBookCB cb);\r\n }", "public boolean hasConditionList() {\n return conditionListBuilder_ != null || conditionList_ != null;\n }", "public io.dstore.values.StringValueOrBuilder getConditionListOrBuilder() {\n if (conditionListBuilder_ != null) {\n return conditionListBuilder_.getMessageOrBuilder();\n } else {\n return conditionList_ == null ?\n io.dstore.values.StringValue.getDefaultInstance() : conditionList_;\n }\n }", "void example8() {\n\n\t\t// setup some data\n\t\t\n\t\tIndexedDataSource<Float64Member> list = ArrayStorage.allocate(G.DBL.construct(), 9);\n\t\t\n\t\t// fill it with random values\n\t\t\n\t\tFill.compute(G.DBL, G.DBL.random(), list);\n\t\t\n\t\t// build a mask\n\t\t\n\t\tIndexedDataSource<BooleanMember> mask =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(\n\t\t\t\t\t\tG.BOOL.construct(), \n\t\t\t\t\t\tnew boolean[] {true, false, false, true, false, false, true, true, true});\n\t\t\n\t\t// make the filter\n\t\t\n\t\tIndexedDataSource<Float64Member> maskedData = new MaskedDataSource<>(list, mask);\n\t\t\n\t\t// do some computations\n\t\t\n\t\tmaskedData.size(); // equals 5\n\t\t\n\t\t// 3rd value in the masked data = the 7th value of the original list\n\t\t\n\t\tFloat64Member value = G.DBL.construct();\n\t\t\n\t\tmaskedData.get(3, value);\n\t\t\n\t\t// compute a value on data only where the mask is true in the original dataset\n\t\t\n\t\tMean.compute(G.DBL, maskedData, value);\n\t}", "java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases> \n getConditionalCasesList();", "public boolean getConditionListNull() {\n return conditionListNull_;\n }", "public void setConditionalOperator(String conditionalOperator) {\n this.conditionalOperator = conditionalOperator;\n }", "public List<DomainObject> getListByCondition(String condition) {\r\n Session session = getSession();\r\n List<DomainObject> lst = null;\r\n try {\r\n if (condition == null || \"null\".equals(condition)) {\r\n condition = \" \";\r\n }\r\n lst = session.createQuery(\"from \" + getPersistentClass().getName() + \" \" + condition).list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByCondition Method:\" + e, e);\r\n } finally {\r\n if (session.isOpen()) {\r\n session.close();\r\n }\r\n }\r\n return lst;\r\n }", "public void setDataSources(ArrayList dataSources) {\n this.dataSources = dataSources;\n }", "public boolean getConditionListNull() {\n return conditionListNull_;\n }", "public interface ConditionalDmsWriter extends DmsWriter {\n\n\t/** Returns the list of export-archives files a ConditionalDmsWriter has created during export. */\n\tpublic List<File> getFiles();\n\n}", "public boolean hasConditionList() {\n return conditionList_ != null;\n }", "ConditionalExpression createConditionalExpression();", "public Builder setConditionList(io.dstore.values.StringValue value) {\n if (conditionListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n conditionList_ = value;\n onChanged();\n } else {\n conditionListBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setConditionalOperator(ConditionalOperator conditionalOperator) {\n setConditionalOperator(conditionalOperator.toString());\n }", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "@Override\n public boolean addDataSourceInfo(DataSource ds) {\n return false;\n }", "public Builder mergeConditionList(io.dstore.values.StringValue value) {\n if (conditionListBuilder_ == null) {\n if (conditionList_ != null) {\n conditionList_ =\n io.dstore.values.StringValue.newBuilder(conditionList_).mergeFrom(value).buildPartial();\n } else {\n conditionList_ = value;\n }\n onChanged();\n } else {\n conditionListBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public io.dstore.values.StringValue.Builder getConditionListBuilder() {\n \n onChanged();\n return getConditionListFieldBuilder().getBuilder();\n }", "public ConditionalStatement(IExpression condition, IStatement s0, IStatement s1)\n {\n super(\"Conditional\", null);\n // TODO - anything else you need\n }", "public List<ConditionalRequirement> getConditions() {\r\n return conditions;\r\n }", "@VTID(29)\n void setSortUsingCustomLists(\n boolean rhs);", "@Override\n\tprotected void initDataSource() {\n\t}", "public IterableDataSource(final DataSourceImpl anotherDataSource) {\n super(anotherDataSource);\n }", "private void addConditionalResponses(\n int index, com.google.search.now.wire.feed.mockserver.MockServerProto.ConditionalResponse value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureConditionalResponsesIsMutable();\n conditionalResponses_.add(index, value);\n }", "@Override\r\n protected boolean isUseDataSource() {\r\n return true;\r\n }", "java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCasesOrBuilder> \n getConditionalCasesOrBuilderList();", "void example4() {\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list1 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 100);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list2 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 1000);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> joinedList =\n\t\t\t\tnew ConcatenatedDataSource<>(list1, list2);\n\t\t\n\t\tFill.compute(G.UINT1, G.UINT1.random(), joinedList);\n\t}", "public interface CustomerSubsetFilterStrategy {\r\n Set<Customer> applyFilter(List<Customer> customers);\r\n}", "private void fillStudyConditionsData() {\n for (Condition condition : workbookStudy.getStudyConditions()) {\n if (condition.getDataType().equals(DATA_TYPE_CHAR)) {\n //LevelC levelCFilter = new LevelC(false);\n //levelCFilter.setFactorid(Integer.SIZE);\n //GCP NEW SCHEMA\n List<LevelC> levelCList = condition.getFactor().getLevelsC();\n if (levelCList != null && levelCList.size() > 0) { //study conditions will only have 1 level\n condition.setValue(levelCList.get(0).getLvalue());\n }\n } else {\n List<LevelN> levelNList = condition.getFactor().getLevelsN();\n if (levelNList != null && levelNList.size() > 0) {\n condition.setValue(levelNList.get(0).getLvalue());\n }\n }\n }\n }", "public List getAnnotationIdsBasedOnCondition(List dynEntitiesList, List cpIdList)\r\n\t\t\tthrows BizLogicException\r\n\t{\r\n\t\tfinal List dynEntitiesIdList = new ArrayList();\r\n\t\tif (dynEntitiesList != null && !dynEntitiesList.isEmpty())\r\n\t\t{\r\n\t\t\tfinal Iterator dynEntitiesIterator = dynEntitiesList.iterator();\r\n\t\t\twhile (dynEntitiesIterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tNameValueBean nvBean = (NameValueBean) dynEntitiesIterator.next();\r\n\t\t\t\tString containerId = nvBean.getValue();\r\n\r\n\t\t\t\tStudyFormContext studyFormContext = getStudyFormContext(Long.valueOf(containerId));\r\n\t\t\t\tif(studyFormContext != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!studyFormContext.getHideForm())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//dynEntitiesIdList.add(Long.valueOf(containerId));\r\n\t\t\t\t\t\tCollection<CollectionProtocol> coll = studyFormContext\r\n\t\t\t\t\t\t\t\t.getCollectionProtocolCollection();\r\n\t\t\t\t\t\tif(coll != null && !coll.isEmpty())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfor(CollectionProtocol cp : coll)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(cpIdList.contains(cp.getId()))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tdynEntitiesIdList.add(Long.valueOf(containerId));\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}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdynEntitiesIdList.add(Long.valueOf(containerId));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*else if(\"NONE\".equals(studyFormContext.getEntityMapCondition()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCollection coll = studyFormContext.getCollectionProtocolCollection();\r\n\t\t\t\t\t\tif(coll != null && !coll.isEmpty())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdynEntitiesIdList.add(Long.valueOf(containerId));\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\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tdynEntitiesIdList.add(Long.valueOf(containerId));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn dynEntitiesIdList;\r\n\t}", "public java.util.List<com.google.search.now.wire.feed.mockserver.MockServerProto.ConditionalResponse> getConditionalResponsesList() {\n return conditionalResponses_;\n }", "private void addConditionalResponses(com.google.search.now.wire.feed.mockserver.MockServerProto.ConditionalResponse value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureConditionalResponsesIsMutable();\n conditionalResponses_.add(value);\n }", "public void createDataSourceReturnsCorrectDefinition() {\n SoftDeleteColumnDeletionDetectionPolicy deletionDetectionPolicy =\n new SoftDeleteColumnDeletionDetectionPolicy()\n .setSoftDeleteColumnName(\"isDeleted\")\n .setSoftDeleteMarkerValue(\"1\");\n\n HighWaterMarkChangeDetectionPolicy changeDetectionPolicy =\n new HighWaterMarkChangeDetectionPolicy(\"fakecolumn\");\n\n // AzureSql\n createAndValidateDataSource(createTestSqlDataSourceObject(null, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(null, new SqlIntegratedChangeTrackingPolicy()));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy,\n changeDetectionPolicy));\n\n // Cosmos\n createAndValidateDataSource(createTestCosmosDataSource(null, false));\n createAndValidateDataSource(createTestCosmosDataSource(null, true));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n\n // Azure Blob Storage\n createAndValidateDataSource(createTestBlobDataSource(null));\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n\n // Azure Table Storage\n createAndValidateDataSource(createTestTableStorageDataSource());\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n }", "public void createDataSourceReturnsCorrectDefinition() {\n SoftDeleteColumnDeletionDetectionPolicy deletionDetectionPolicy =\n new SoftDeleteColumnDeletionDetectionPolicy()\n .setSoftDeleteColumnName(\"isDeleted\")\n .setSoftDeleteMarkerValue(\"1\");\n\n HighWaterMarkChangeDetectionPolicy changeDetectionPolicy =\n new HighWaterMarkChangeDetectionPolicy(\"fakecolumn\");\n\n // AzureSql\n createAndValidateDataSource(createTestSqlDataSourceObject(null, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(null, new SqlIntegratedChangeTrackingPolicy()));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy,\n changeDetectionPolicy));\n\n // Cosmos\n createAndValidateDataSource(createTestCosmosDataSource(null, false));\n createAndValidateDataSource(createTestCosmosDataSource(null, true));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n\n // Azure Blob Storage\n createAndValidateDataSource(createTestBlobDataSource(null));\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n\n // Azure Table Storage\n createAndValidateDataSource(createTestTableStorageDataSource());\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n }", "@Override\r\n\tpublic List<Criterion> getCriterions(ParamCondition paramCondition) {\n\t\tList<Criterion> criterions = new ArrayList<Criterion>();\r\n\t\treturn criterions;\r\n\t}", "public List getMainDataLst(ElementConditionDto elementConditionDto, RequestMeta requestMeta) {\n return jdDocAuditMapper.getMainDataLst(elementConditionDto);\r\n }", "@Override\n\tpublic List<ShopCategory> queryList(ShopCategory shopCategoryCondition) {\n\t\treturn shopCategoryMapper.queryShopCategory(shopCategoryCondition);\n\t}", "public DDataFilter() {\n filters = new ArrayList<>();\n operator = null;\n value = null;\n externalData = false;\n valueTo = null;\n attribute = ROOT_FILTER;\n }", "public List<Course> getByCondition(List<SimpleExpression> list) {\n\t\treturn null;\n\t}", "public DDataFilter(DDataAttribute column, DDataFilterOperator operator, Object value, Object valueTo) throws DDataException {\n if (column == null || column.getPropertyName() == null)\n throw new DDataException(\"can't create filter for NULL\");\n\n this.attribute = column;\n if (attribute.isMappedBean()) {\n filters = new ArrayList<>();\n this.externalData = attribute.getBeanInterface().isAnnotationPresent(DDataPrototypeRealization.class);\n this.operator = operator;\n this.value = value;\n this.valueTo = valueTo;\n } else {\n filters = null;\n this.externalData = false;\n this.operator = operator;\n this.value = value;\n this.valueTo = valueTo;\n }\n }", "public DynamoDBSaveExpression withConditionalOperator(String conditionalOperator) {\n setConditionalOperator(conditionalOperator);\n return this;\n }", "@SuppressWarnings(\"unused\")\n\tvoid example17() {\n\t\t\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// then create a new memory copy of those 2000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> theCopy = DeepCopy.compute(G.FLT, trimmed);\n\t}", "boolean accepts( DataSourceMetadata dataSourceMetadata );", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a statefulset's current state.\")\n\n public List<V1StatefulSetCondition> getConditions() {\n return conditions;\n }", "void example10() {\n\t\t\n\t\t// allocate a regular list\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT4.construct(), 1000);\n\t\t\n\t\t// fill it with data\n\t\t\n\t\tFill.compute(G.UINT4, G.UINT4.random(), list);\n\t\t\n\t\t// protect it from writes\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> readonlyList = new ReadOnlyDataSource<>(list);\n\t\t\n\t\t// now play with list\n\t\t\n\t\tUnsignedInt4Member value = G.UINT4.construct();\n\t\t\n\t\t// success\n\t\t\n\t\treadonlyList.get(44, value);\n\n\t\t// prepare to write\n\t\t\n\t\tvalue.setV(100);\n\t\t\n\t\t// failure: throws exception. writing not allowed\n\t\t\n\t\treadonlyList.set(22, value);\n\t}", "@Override\n\tpublic void setUpdateData(Collection<FinanceData> updateDataList, \n\t\t\tMap<String,Boolean> notifyList, String currentUser) {\n\t\tthis.notifyList.clear();\n\t\t\n\t\tif (list_fr.isEmpty()) {\n\t\t\tscrollpanel.remove(panel);\n\t\t\tscrollpanel.add(cellTable);\n\t\t}\n\t\t\n\t\tfor (FinanceData data : updateDataList) {\n\t\t\tboolean isexist = false;\n\t\t\tLong id = data.getRequest_id();\n\t\t\tFinanceData notifydata = null;\n\t\t\tif (data.getStatus().equals(\"PENDING\")\n\t\t\t\t\t|| data.getStatus().equals(\"APPROVED\")\n\t\t\t\t\t|| data.getStatus().equals(\"DENIED\")) {\n\t\t\t\tfor (FinanceData olddata : list_fr)\n\t\t\t\t\tif (olddata.getRequest_id().equals(id)) {\n\t\t\t\t\t\tisexist = true;\n\t\t\t\t\t\tif(data.getVersion() != olddata.getVersion()) {\n\t\t\t\t\t\t\tlist_fr.remove(olddata);\n\t\t\t\t\t\t\tlist_fr.add(0, data);\n\t\t\t\t\t\t\tnotifydata = data;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnotifydata = olddata;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif(!isexist) {\n\t\t\t\t\tlist_fr.add(0, data);\n\t\t\t\t\tnotifydata = data;\n\t\t\t\t}\n\t\t\t\tString notifyid = String.valueOf(notifydata.getRequest_id());\n\t\t\t\tif(notifyList.containsKey(String.valueOf(notifyid))) {\n\t\t\t\t\tif(notifyList.get(String.valueOf(notifyid)))\n\t\t\t\t\t\tthis.notifyList.add(notifydata);\n\t\t\t\t\telse\n\t\t\t\t\t\tlistener.flushData(notifydata);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (data.getStatus().equals(\"DRAFT\")) {\n\t\t\t\tfor (FinanceData oldfr : list_fr)\n\t\t\t\t\tif (oldfr.getRequest_id().equals(id))\n\t\t\t\t\t\tlist_fr.remove(oldfr);\n\t\t\t\tif(!data.getReporter().equals(currentUser))\n\t\t\t\t\tlistener.flushData(data);\n\t\t\t}\n\t\t\tif(data.getStatus().equals(\"DELETED\")) {\n\t\t\t\tfor (FinanceData oldfr : list_fr)\n\t\t\t\t\tif (oldfr.getRequest_id().equals(id))\n\t\t\t\t\t\tlist_fr.remove(oldfr);\n\t\t\t\tlistener.flushData(data);\n\t\t\t}\n\t\t}\n\t\t\n\t\tredrawTable();\n\t\tlistener.onRefreshComplete();\n\t}", "private List<DataSource> getProcessedResults (List<DataSource> listOfDataSource, Page pageDetail) {\n List<DataSource> dataSourceList = listOfDataSource;\n List<PageSearch> searchList = pageDetail.getSearchList();\n if (ExecueCoreUtil.isCollectionNotEmpty(searchList)) {\n // TODO: -JM- Currently there will be only one search object, change later if there are multiple searches\n PageSearch search = searchList.get(0);\n // check for the search info\n if (PageSearchType.STARTS_WITH == search.getType()) {\n dataSourceList = new ArrayList<DataSource>();\n for (DataSource dataSource : dataSourceList) {\n // TODO: -JM- use the field from the search object\n String cDispName = dataSource.getName();\n if (cDispName.toLowerCase().startsWith(search.getString().toLowerCase())) {\n dataSourceList.add(dataSource);\n }\n }\n } else if (PageSearchType.CONTAINS == search.getType()) {\n dataSourceList = new ArrayList<DataSource>();\n for (DataSource dataSource : dataSourceList) {\n String cDispName = dataSource.getName();\n if (cDispName.toLowerCase().startsWith(search.getString().toLowerCase())) {\n dataSourceList.add(dataSource);\n }\n }\n }\n }\n // modify the page object with the new record count which will modify the page count as well\n pageDetail.setRecordCount(Long.valueOf(dataSourceList.size()));\n List<DataSource> pageDataSources = new ArrayList<DataSource>();\n // manipulate the list to return the set of concepts belonging to the page requested\n int start = (pageDetail.getRequestedPage().intValue() - 1) * pageDetail.getPageSize().intValue();\n int end = start + pageDetail.getPageSize().intValue();\n if (end > pageDetail.getRecordCount().intValue()) {\n end = (pageDetail.getRecordCount().intValue());\n }\n for (int i = start; i < end; i++) {\n pageDataSources.add(dataSourceList.get(i));\n }\n return pageDataSources;\n }", "ConditionsDTO createConditionsDTO(final Rule source) {\n\t\tfinal ConditionsDTO conditionsDto = new ConditionsDTO();\n\n\t\tfinal List<RuleCondition> conditions = new ArrayList<RuleCondition>(source.getConditions());\n\t\tfinal BooleanComponentDTO limitedConditionDTO = retrieveLimitedUsageCondition(conditions);\n\t\tfinal BooleanComponentDTO couponCodeDTO = retrieveCouponCodeCondition(conditions);\n\n\t\tif (!conditions.isEmpty()) {\n\t\t\tfinal BooleanComponentDTO eligibilitiesAndConditionsDTO = new AndDTO();\n\t\t\teligibilitiesAndConditionsDTO.setComponents(Arrays.asList(createConditionComposition(conditions, source.getConditionOperator())));\n\t\t\tconditionsDto.setConditionsComponent(eligibilitiesAndConditionsDTO);\n\t\t}\n\n\t\taddCouponCondition(conditionsDto, couponCodeDTO);\n\t\taddLimitedCondition(conditionsDto, limitedConditionDTO);\n\n\t\treturn conditionsDto;\n\t}", "private Boolean AreConditionListsSubset(List<ProgramCondition> ipList, List<ProgramCondition> tempList) {\n long c = ipList.stream().filter(p -> (tempList.stream().anyMatch(q -> q.condition.equals(p.condition)\n && q.pred == p.pred))).count();\n if(c == ipList.size())\n return true;\n return false;\n }", "public PredicatesBuilder<T> add(Predicate predicate, boolean condition) {\n return condition ? add(predicate) : this;\n }", "public int getConditionCount()\n {\n return m_listCondition.size();\n }", "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "BooleanComponentDTO retrieveLimitedUsageCondition(final List<RuleCondition> conditions) {\n\t\tfor (RuleCondition condition : conditions) {\n\t\t\tif (RuleElementType.LIMITED_USAGE_PROMOTION_CONDITION.equals(condition.getElementType())) {\n\t\t\t\tfinal ConditionDTO conditionDto = new ConditionDTO();\n\t\t\t\tconditionAdapter.populateDTO(condition, conditionDto);\n\t\t\t\tconditions.remove(condition);\n\t\t\t\treturn conditionDto;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public List<Object> getBatteryLogDetailList(Map<String, Object> condition,\n boolean isCount) {\n return null;\n }", "public void makeDataSourceCloneable(){\n\t\tsetMainDataSource(Manager.createCloneableDataSource(getMainDataSource()));\n\t\t/*\n\t\tif(processor==null || processor.getDataOutput()==null){\n\t\t\tsetMainDataSource(Manager.createCloneableDataSource(getMainDataSource()));\n\t\t}else{\n\t\t\tsetMainDataSource(Manager.createCloneableDataSource(processor.getDataOutput()));\n\t\t}\n\t\t*/\n\t}", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public COSArrayList( List<E> actualList, COSArray cosArray )\n {\n actual = actualList;\n array = cosArray;\n\n // if the number of entries differs this may come from a filter being\n // applied at the PDModel level \n if (actual.size() != array.size()) {\n isFiltered = true;\n }\n }", "public String getConditionalClause() {\r\n\t\treturn conditionalClause;\r\n\t}", "public final EObject ruleConditionalExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_ConditionalOrExpression_0 = null;\n\n EObject lv_trueStatement_3_0 = null;\n\n EObject lv_falseStatement_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:148:28: ( (this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )? ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:149:1: (this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )? )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:149:1: (this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )? )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:150:5: this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )?\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getConditionalExpressionAccess().getConditionalOrExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleConditionalOrExpression_in_ruleConditionalExpression313);\n this_ConditionalOrExpression_0=ruleConditionalOrExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_ConditionalOrExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:1: ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )?\n int alt2=2;\n int LA2_0 = input.LA(1);\n\n if ( (LA2_0==26) ) {\n int LA2_1 = input.LA(2);\n\n if ( (synpred1_InternalJavaJRExpression()) ) {\n alt2=1;\n }\n }\n switch (alt2) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:2: ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:2: ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:3: ( ( () '?' ) )=> ( () otherlv_2= '?' )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:160:5: ( () otherlv_2= '?' )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:160:6: () otherlv_2= '?'\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:160:6: ()\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:161:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElementAndSet(\n grammarAccess.getConditionalExpressionAccess().getTestExpressionConditionAction_1_0_0_0(),\n current);\n \n }\n\n }\n\n otherlv_2=(Token)match(input,26,FOLLOW_26_in_ruleConditionalExpression348); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getConditionalExpressionAccess().getQuestionMarkKeyword_1_0_0_1());\n \n }\n\n }\n\n\n }\n\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:170:3: ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:171:1: (lv_trueStatement_3_0= ruleJasperReportsExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:171:1: (lv_trueStatement_3_0= ruleJasperReportsExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:172:3: lv_trueStatement_3_0= ruleJasperReportsExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getConditionalExpressionAccess().getTrueStatementJasperReportsExpressionParserRuleCall_1_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleJasperReportsExpression_in_ruleConditionalExpression371);\n lv_trueStatement_3_0=ruleJasperReportsExpression();\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.getConditionalExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"trueStatement\",\n \t\tlv_trueStatement_3_0, \n \t\t\"JasperReportsExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,27,FOLLOW_27_in_ruleConditionalExpression383); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_4, grammarAccess.getConditionalExpressionAccess().getColonKeyword_1_2());\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:192:1: ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:193:1: (lv_falseStatement_5_0= ruleJasperReportsExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:193:1: (lv_falseStatement_5_0= ruleJasperReportsExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:194:3: lv_falseStatement_5_0= ruleJasperReportsExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getConditionalExpressionAccess().getFalseStatementJasperReportsExpressionParserRuleCall_1_3_0()); \n \t \n }\n pushFollow(FOLLOW_ruleJasperReportsExpression_in_ruleConditionalExpression404);\n lv_falseStatement_5_0=ruleJasperReportsExpression();\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.getConditionalExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"falseStatement\",\n \t\tlv_falseStatement_5_0, \n \t\t\"JasperReportsExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\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 catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "java.util.List<com.google.search.now.wire.feed.mockserver.MockServerProto.ConditionalResponse> \n getConditionalResponsesList();", "public List getMainDataLst(ElementConditionDto elementConditionDto) {\n elementConditionDto.setNumLimitStr(NumLimUtil.getInstance().getNumLimCondByCoType(elementConditionDto.getWfcompoId(), NumLimConstants.FWATCH));\r\n\r\n return getSqlMapClientTemplate().queryForList(\"com.ufgov.zc.server.sf.dao.SfMaterialsTransferMapper.selectMainDataLst\", elementConditionDto);\r\n }", "public java.util.List<? extends com.google.search.now.wire.feed.mockserver.MockServerProto.ConditionalResponseOrBuilder> \n getConditionalResponsesOrBuilderList() {\n return conditionalResponses_;\n }", "BooleanComponentDTO retrieveCouponCodeCondition(final List<RuleCondition> conditions) {\n\t\tfor (RuleCondition condition : conditions) {\n\t\t\tif (RuleElementType.LIMITED_USE_COUPON_CODE_CONDITION.equals(condition.getElementType())) {\n\t\t\t\tfinal ConditionDTO conditionDto = new ConditionDTO();\n\t\t\t\tconditionAdapter.populateDTO(condition, conditionDto);\n\t\t\t\tconditions.remove(condition);\n\t\t\t\treturn conditionDto;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "com.google.search.now.wire.feed.mockserver.MockServerProto.ConditionalResponse getConditionalResponses(int index);", "default DiscreteSet2D pointsSatisfying(DoublePredicate condition) {\r\n\t\treturn (x, y) -> condition.test(getValueAt(x, y));\r\n\t}", "@Override\n public List<Object> getMiniChartCommStatusByLocation(\n Map<String, Object> condition) {\n return null;\n }", "@Override\n\tpublic BlackList findByPlateAndColor(BlackList condition) {\n\t\treturn blackListDao.findByPlateAndColor(condition);\n\t}", "@FXML\r\n\tprivate void initialize() {\r\n\t\t// 0. Initialize the columns.\r\n\t\tnhsNumberColumn.setCellValueFactory(cellData -> cellData.getValue()\r\n\t\t\t\t.nhsNumberProperty());\r\n\t\tfirstNameColumn.setCellValueFactory(cellData -> cellData.getValue()\r\n\t\t\t\t.firstNameProperty());\r\n\t\tlastNameColumn.setCellValueFactory(cellData -> cellData.getValue()\r\n\t\t\t\t.lastNameProperty());\r\n\t\taddressColumn.setCellValueFactory(cellData -> cellData.getValue()\r\n\t\t\t\t.addressProperty());\r\n\t\tcontactNumberColumn.setCellValueFactory(cellData -> cellData.getValue()\r\n\t\t\t\t.contactNumberProperty());\r\n\r\n\t\tbloodGroupColumn.setCellValueFactory(cellData -> cellData.getValue()\r\n\t\t\t\t.bloodGroupProperty());\r\n\r\n\t\t// 1. Wrap the ObservableList in a FilteredList (initially display all\r\n\t\t// data).\r\n\t\tFilteredList<PatientForSearch> filteredData = new FilteredList<>(\r\n\t\t\t\tmasterData, p -> true);\r\n\r\n\t\t// 2. Set the filter Predicate whenever the filter changes.\r\n\t\tfilterField.textProperty().addListener(\r\n\t\t\t\t(observable, oldValue, newValue) -> {\r\n\t\t\t\t\tfilteredData.setPredicate(Patient -> {\r\n\t\t\t\t\t\t// If filter text is empty, display all Patients.\r\n\t\t\t\t\t\t\tif (newValue == null || newValue.isEmpty()) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Compare first name and last name of every Patient\r\n\t\t\t\t\t\t\t// with filter text.\r\n\t\t\t\t\t\t\tString lowerCaseFilter = newValue.toLowerCase();\r\n\r\n\t\t\t\t\t\t\tif (Patient.getFirstName().toLowerCase()\r\n\t\t\t\t\t\t\t\t\t.indexOf(lowerCaseFilter) != -1) {\r\n\t\t\t\t\t\t\t\treturn true; // Filter matches first name.\r\n\t\t\t\t\t\t\t} else if (Patient.getLastName().toLowerCase()\r\n\t\t\t\t\t\t\t\t\t.indexOf(lowerCaseFilter) != -1) {\r\n\t\t\t\t\t\t\t\treturn true; // Filter matches last name.\r\n\t\t\t\t\t\t\t} else if (Patient.getNhsNumber().toLowerCase().indexOf(lowerCaseFilter) != -1){\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}else if (Patient.getAddress().toLowerCase().indexOf(lowerCaseFilter) != -1){\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} else if (Patient.getBloodGroup().toLowerCase().indexOf(lowerCaseFilter) != -1){\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn false; // Does not match.\r\n\t\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t// 3. Wrap the FilteredList in a SortedList.\r\n\t\tSortedList<PatientForSearch> sortedData = new SortedList<>(filteredData);\r\n\r\n\t\t// 4. Bind the SortedList comparator to the TableView comparator.\r\n\t\t// Otherwise, sorting the TableView would have no effect.\r\n\t\tsortedData.comparatorProperty().bind(patientTable.comparatorProperty());\r\n\r\n\t\t// 5. Add sorted (and filtered) data to the table.\r\n\t\tpatientTable.setItems(sortedData);\r\n\t}", "public DynamoDBSaveExpression withConditionalOperator(ConditionalOperator conditionalOperator) {\n return withConditionalOperator(conditionalOperator.toString());\n }", "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<T> where(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func2<? super T, ? super Integer, Boolean> clause) {\r\n\t\treturn new Where.Indexed<T>(source, clause);\r\n\t}", "@Override\n public List<Object> getMiniChartLocationByCommStatus(\n Map<String, Object> condition) {\n return null;\n }", "public List<CustomersListSearchConditionsDTO> getListSearchConditions(Long customerListId);", "public Builder<T> If(BooleanSupplier condition) {\n this.ifCond = condition.getAsBoolean();\n return this;\n }", "public List<StatementSource> sourceWiseRankingAndSkipping(StatementPattern sp, List<StatementSource> capableDatasources) {\n if (!sp.getPredicateVar().hasValue()) {\n //System.out.println(\"unbounded predicate\");\n return capableDatasources;\n }\n String predicate = sp.getPredicateVar().getValue().stringValue();\n StatementSource selectedSource = getMaxSizeSource(capableDatasources, sp);\n //System.out.println(\"selectedSource: \"+selectedSource);\n if (selectedSource == null) { // the index does not have information about the capable sources\n //System.out.println(\"index without information about capable source for predicate \"+predicate);\n return capableDatasources;\n }\n EndpointSummary e = summaries.get(endpoints.get(selectedSource.getEndpointID()));\n List<StatementSource> rankedSources = new ArrayList<StatementSource>();\n Capability c = e.getCapability(predicate);\n double unionMIPsSetSize = c.getTotal();\n Vector<Long> unionMIPs = c.getMIPVector();\n rankedSources.add(selectedSource);\n capableDatasources.remove(selectedSource);\n while (!capableDatasources.isEmpty()) {\n selectedSource = null;\n double maxNewTriples = 0;\n \n for (StatementSource ss : capableDatasources) {\n e = summaries.get(endpoints.get(ss.getEndpointID()));\n //System.out.println(\"endpoint: \"+ss.getEndpointID());\n //System.out.println(\"predicate: \"+predicate);\n //System.out.println(\"e: \"+e);\n c = e.getCapability(predicate);\n Vector<Long> MIPs = c.getMIPVector();\n double MIPsSetSize = c.getTotal();\n \n if (sp.getSubjectVar().hasValue()) {\n MIPsSetSize = MIPsSetSize * c.getAverageSubSel();\n } else if (sp.getObjectVar().hasValue()) {\n MIPsSetSize = MIPsSetSize * c.getAverageObjSel();\n }\n //System.out.println(\"unionMIPsSetSize: \"+unionMIPsSetSize+\". MIPsSetSize: \"+MIPsSetSize);\n double overlapSize = getOverlap(unionMIPs,MIPs, unionMIPsSetSize, MIPsSetSize);\n // how many of the triples accessibles through ss are new ? \n double newTriples = MIPsSetSize - overlapSize; \n if (newTriples > maxNewTriples) {\n selectedSource = ss;\n maxNewTriples = newTriples;\n }\n }\n double curThresholdVal = maxNewTriples / unionMIPsSetSize;\n //System.out.println(\"maxNewTriples: \"+maxNewTriples+\". curThresholdVal: \"+curThresholdVal);\n if (curThresholdVal > this.threshold) {\n rankedSources.add(selectedSource);\n e = summaries.get(endpoints.get(selectedSource.getEndpointID()));\n c = e.getCapability(predicate);\n Vector<Long> selectedMIPs = c.getMIPVector();\n double selectedMIPsSize = c.getTotal();\n unionMIPs = makeUnion(unionMIPs, selectedMIPs);\n double r = getResemblance(unionMIPs, selectedMIPs);\n unionMIPsSetSize = Math.ceil((unionMIPsSetSize + selectedMIPsSize) / (r + 1));\n } else { \n break;\n } \n capableDatasources.remove(selectedSource);\n }\n return rankedSources;\n }", "private static DataSources toDataSources(OutputGenerator outputGenerator, List<DataSource> sharedDataSources) {\n final List<DataSource> dataSources = outputGenerator.getDataSources();\n final SeedType seedType = outputGenerator.getSeedType();\n\n if (seedType == SeedType.TEMPLATE) {\n return new DataSources(ListUtils.concatenate(dataSources, sharedDataSources));\n } else if (seedType == SeedType.DATASOURCE) {\n // Since every data source shall generate an output there can be only 1 datasource supplied.\n Validate.isTrue(dataSources.size() == 1, \"One data source expected for generation driven by data sources\");\n return new DataSources(dataSources);\n } else {\n throw new IllegalArgumentException(\"Don't know how to handle the seed type: \" + seedType);\n }\n }", "static boolean test(List<Condition> conditions) {\n return true; // REPLACE WITH SOLUTION \n }", "LogicCondition createLogicCondition();", "@Override\n public List<Map<String, Object>> getMcuConnectedDeviceList(\n Map<String, Object> conditionMap, boolean isCount) {\n return null;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a deployment's current state.\")\n\n public List<V1DeploymentCondition> getConditions() {\n return conditions;\n }", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }" ]
[ "0.54438543", "0.541265", "0.48975074", "0.47967526", "0.47841385", "0.46876", "0.46809167", "0.46001709", "0.45958042", "0.4594104", "0.4548609", "0.45293897", "0.45207548", "0.44876516", "0.4471437", "0.44707355", "0.44616666", "0.44571984", "0.44428188", "0.4436056", "0.4435406", "0.44179332", "0.43934515", "0.4390726", "0.4382568", "0.43628424", "0.43626162", "0.43583485", "0.43370008", "0.4332877", "0.43287876", "0.43098196", "0.42935646", "0.42817086", "0.4272108", "0.42703483", "0.42645708", "0.42572176", "0.42338672", "0.42246994", "0.42233104", "0.42180586", "0.42129713", "0.4212735", "0.42019993", "0.4198147", "0.41948503", "0.41892403", "0.4188261", "0.4172236", "0.4155368", "0.4148919", "0.4148919", "0.41387892", "0.41379735", "0.4122146", "0.41171077", "0.41127682", "0.41010815", "0.4091765", "0.40914515", "0.40876782", "0.40821618", "0.40668732", "0.4064605", "0.40533423", "0.40405527", "0.40318134", "0.4030099", "0.40282238", "0.4027544", "0.40267155", "0.40240234", "0.4019428", "0.40193677", "0.40191883", "0.40182525", "0.4016386", "0.40075475", "0.40063202", "0.40042254", "0.40026212", "0.39954197", "0.398973", "0.39870116", "0.3985672", "0.39737797", "0.39688173", "0.39600572", "0.3958117", "0.3956374", "0.39534405", "0.39504725", "0.39500776", "0.3946441", "0.3946206", "0.39447668", "0.39446405", "0.39415324", "0.39347962" ]
0.49656063
2
FixedSizeDataSource Sometimes you have a requirement that an algorithm is expecting a certain size list and the one you have does not match. You can cap the size of a list using a FixedSizeDataSource. The FFT algorithm commonly needs to do this.
void example6() { // allocate some data IndexedDataSource<ComplexFloat32Member> data = nom.bdezonia.zorbage.storage.Storage.allocate(G.CFLT.construct(), 1234); // elsewhere fill it with something // then define an out of bounds padding that is all zero Procedure2<Long,ComplexFloat32Member> proc = new Procedure2<Long, ComplexFloat32Member>() { @Override public void call(Long a, ComplexFloat32Member b) { b.setR(0); b.setI(0); } }; // tie the padding and the zero proc together. reads beyond data's length will return 0 IndexedDataSource<ComplexFloat32Member> padded = new ProcedurePaddedDataSource<>(G.CFLT, data, proc); // compute an ideal power of two size that the FFT algorithm will want to use long idealSize = FFT.enclosingPowerOf2(data.size()); // make the FixedsizeDataSource here that satisfies the FFT algorithm's requirements IndexedDataSource<ComplexFloat32Member> fixedSize = new FixedSizeDataSource<>(idealSize, padded); // allocate the same amount of space for the results IndexedDataSource<ComplexFloat32Member> outList = nom.bdezonia.zorbage.storage.Storage.allocate(G.CFLT.construct(), idealSize); // and compute the FFT FFT.compute(G.CFLT, G.FLT, fixedSize, outList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isListLengthFixed();", "public void setDataList(ArrayList<Integer> dataList, int maxSize){\n this.dataList = dataList;\n this.mMaxSize = maxSize;\n }", "public void setListSize(int value) {\n this.listSize = value;\n }", "@SuppressWarnings(\"unused\")\n\tvoid example15() {\n\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// the trimmed list has length 2,000 and is indexed from 0 to 1,999 returning data from\n\t\t// locations 1,000 - 2,999 in the original list.\n\t\t\n\t}", "public FixedSizeList(int capacity) {\n // YOUR CODE HERE\n }", "public int getMaxListLength();", "@Override\n public void init(int blockLength, SourceDataLine sourceDataLine)\n { this.fftWindowLength = blockLength; // fftWindowLength = 8192\n this.fftSampleRate = sourceDataLine.getFormat().getFrameRate(); // fftSampleRate = 44100\n this.maxFreq = fftSampleRate / 2.0f; // maxFreq = 22050 Hz\n this.audioChannels = new float[2][blockLength];\n this.channelSamples = new float[blockLength];\n\n this.fft = new FloatFFT_1D(fftWindowLength);\n calculateWindowCoefficients(fftWindowLength);\n setBinCount( fftWindowLength / 2 ); // 8192 / 2 = 4096\n setBandCount(octaveCount*notesPerOctave*bandsPerNote + bandsPerNote); // covers 8 octaves plus 1 note\n // 8*12*1 + 1 = 97 bands or 8*12*5 + 5 = 485 bands or 8*12*9 + 9 = 873\n computeBandTables(); \n }", "private void compatibilityDataSizeChanged(int size) {\n final int dataSize = mData == null ? 0 : mData.size();\n if (dataSize == size) {\n notifyDataSetChanged();\n }\n }", "@Override\n public void setBufferSize(int arg0) {\n\n }", "public int getMaxSize(){\n\t\treturn ds.length;\n\t}", "@Override\n\tpublic void setBufferSize(int size) {\n\t}", "protected abstract int getNextBufferSize(E[] paramArrayOfE);", "protected abstract int getMaxDesiredSize();", "public DataStreamObject(int newLimit) {\n\t\tlimit = newLimit;\n\t\tdata = new double[limit];\n\t}", "void example13() {\n\t\t\n\t\t// create a list of zeroes\n\t\t\n\t\tIndexedDataSource<Float64Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.DBL.construct(), 1000);\n\n\t\t// now setup a view that will increment by 3 starting at the list[4] and steps\n\t\t// up to 100 times.\n\t\t\n\t\tIndexedDataSource<Float64Member> seqData =\n\t\t\t\tnew SequencedDataSource<Float64Member>(list, 4, 3, 100);\n\n\t\tseqData.size(); // size == 100\n\t\t\n\t\t// now set a bunch of values\n\t\t\n\t\tFloat64Member value = G.DBL.construct();\n\t\t\n\t\tfor (long i = 0; i < seqData.size(); i++) {\n\t\t\tvalue.setV(i);\n\t\t\tseqData.set(i, value);\n\t\t}\n\t\t\n\t\t// data = [0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, ...]\n\t}", "@Override\n\tpublic int getDataCount() {\n\t\treturn list_fr.size();\n\t}", "@Test\n public void testMemoryFixedSizeFrameNoDiskNoDiscardFastConsumer() {\n try {\n int numRounds = 10;\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // No spill, No discard\n FeedPolicyAccessor fpa = createFeedPolicyAccessor(false, false, 0L, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestFrameWriter writer =\n FrameWriterTestUtils.create(Collections.emptyList(), Collections.emptyList(), false);\n // FramePool\n ConcurrentFramePool framePool = new ConcurrentFramePool(NODE_ID, FEED_MEM_BUDGET, DEFAULT_FRAME_SIZE);\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n VSizeFrame frame = new VSizeFrame(ctx);\n // add NUM_FRAMES times\n for (int i = 0; i < NUM_FRAMES * numRounds; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n // Check that no records were discarded\n Assert.assertEquals(handler.getNumDiscarded(), 0);\n // Check that no records were spilled\n Assert.assertEquals(handler.getNumSpilled(), 0);\n writer.validate(false);\n handler.close();\n // Check that nextFrame was called\n Assert.assertEquals(NUM_FRAMES * numRounds, writer.nextFrameCount());\n writer.validate(true);\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "@Test\r\n\tpublic void testSize() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\tassertEquals(0, testArray.size());\r\n\t\ttestArray.add(\"hi\");\r\n\t\ttestArray.add(\"hey\");\r\n\t\ttestArray.add(\"hello\");\r\n\t\tassertEquals(3, testArray.size());\r\n\t}", "int getSampleSize();", "public abstract long getMaxSize();", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }", "void setBufferSize(int bufferSize);", "@SuppressWarnings(\"unused\")\n\tvoid example17() {\n\t\t\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// then create a new memory copy of those 2000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> theCopy = DeepCopy.compute(G.FLT, trimmed);\n\t}", "int sizeOfTrafficVolumeArray();", "public int getNumberOfDataSources(){\n \n return listOfDataSources.size();\n }", "private static void validateDataTypesSize(ValidationError error, List<DataTypeWithTimestampDTO> dataType) {\n String fieldName = \"dataTypesSize\";\n int size = dataType.size();\n if (size == 0) {\n logger.error(\"FinaceCube must contain at least one datatype\");\n error.addFieldError(fieldName, \"FinaceCube must contain at least one datatype\");\n }\n }", "private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }", "@Test\n public void testMemoryFixedSizeFrameNoDiskNoDiscardSlowConsumer() {\n try {\n int numRounds = 10;\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // No spill, No discard\n FeedPolicyAccessor fpa = createFeedPolicyAccessor(false, false, 0L, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestFrameWriter writer =\n FrameWriterTestUtils.create(Collections.emptyList(), Collections.emptyList(), false);\n // FramePool\n ConcurrentFramePool framePool = new ConcurrentFramePool(NODE_ID, FEED_MEM_BUDGET, DEFAULT_FRAME_SIZE);\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n VSizeFrame frame = new VSizeFrame(ctx);\n writer.setNextDuration(1);\n // add NUM_FRAMES times\n for (int i = 0; i < NUM_FRAMES * numRounds; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n // Check that no records were discarded\n Assert.assertEquals(handler.getNumDiscarded(), 0);\n // Check that no records were spilled\n Assert.assertEquals(handler.getNumSpilled(), 0);\n // Check that nextFrame was called\n writer.validate(false);\n handler.close();\n Assert.assertEquals(writer.nextFrameCount(), (NUM_FRAMES * numRounds));\n writer.validate(true);\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }", "private static void checkListSize(List<Map<String, Object>> dataFromDaoList) {\r\n\t\tif (dataFromDaoList == null || dataFromDaoList.size() == 0) {\r\n\t\t\tthrow new ZeroRecordsFoundException(\r\n\t\t\t\t\tReportsConstantsAndUtilityMethods.RECORDS_NOT_FOUND_FOR_YOUR_SEARCH_FILTERS);\r\n\t\t}\r\n\t}", "public ListDataSetResultHandler(IDataSet dataSet, DataSetQuery query, int initSize) {\n \tsuper(dataSet, query);\n items = new ArrayList<IDataSetItem>(initSize);\n }", "public abstract long getCompleteListSize();", "void example4() {\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list1 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 100);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list2 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 1000);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> joinedList =\n\t\t\t\tnew ConcatenatedDataSource<>(list1, list2);\n\t\t\n\t\tFill.compute(G.UINT1, G.UINT1.random(), joinedList);\n\t}", "@Test\n public void testContinguosStorageOriginalSize() {\n list.addToFront(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.addToFront(\"Filler0\");\n list.addAtIndex(0, \"Filler#\");\n list.addAtIndex(2, \"Filler!\");\n list.addAtIndex(6, \"Filler$\");\n list.removeFromFront();\n list.removeFromBack();\n list.removeAtIndex(4);\n list.removeAtIndex(0);\n list.removeAtIndex(2);\n\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n for (int i = 0; i < list.size(); i++) {\n Assert.assertNotNull(((Object[]) (list.getBackingArray()))[i]);\n }\n for (int i = list.size(); i < actualCapacity; i++) {\n Assert.assertNull(((Object[]) (list.getBackingArray()))[i]);\n }\n }", "@SuppressWarnings(\"unchecked\")\n private void resize() {\n int newCap = Math.max(capacity*2, DEFAULT_CAP);\n if(size < list.length) return;\n \n Object[] temp = new Object[newCap];\n for(int i = 0; i < list.length; i++) {\n temp[i] = list[i];\n }\n list = (E[])temp;\n capacity = newCap;\n }", "public abstract String get_size(DataRequest source) throws ConnectorOperationException;", "public void beforeExecute() {\r\n double[] tempData;\r\n\r\n ndim = srcImage.getNDims();\r\n dimLengths = srcImage.getExtents();\r\n newDimLengths = new int[dimLengths.length];\r\n\r\n zeroPad = false;\r\n\r\n arrayLength = 1;\r\n\r\n for (int i = 0; i < ndim; i++) {\r\n arrayLength *= dimLengths[i];\r\n newDimLengths[i] = dimLengths[i];\r\n }\r\n\r\n for (int i = 0; i < ndim; i++) {\r\n if (i >= 2 && image25D) {\r\n break;\r\n }\r\n newDimLengths[i] = MipavMath.findMinimumPowerOfTwo(newDimLengths[i]);\r\n }\r\n\r\n /**\r\n * different dimensions are allowed\r\n */\r\n if ( !unequalDim) {\r\n int newLength = 0;\r\n for (int i = 0; i < ndim; i++) {\r\n if (i >= 2 && image25D) {\r\n break;\r\n }\r\n if (newDimLengths[i] > newLength) {\r\n newLength = newDimLengths[i];\r\n }\r\n }\r\n for (int i = 0; i < ndim; i++) {\r\n if (i >= 2 && image25D) {\r\n break;\r\n }\r\n if (newDimLengths[i] < newLength) {\r\n newDimLengths[i] = newLength;\r\n }\r\n }\r\n }\r\n newArrayLength = 1;\r\n\r\n for (int i = 0; i < ndim; i++) {\r\n newArrayLength *= newDimLengths[i];\r\n }\r\n\r\n if (newArrayLength > arrayLength) {\r\n zeroPad = true;\r\n }\r\n\r\n try {\r\n realData = new double[arrayLength];\r\n imagData = new double[arrayLength];\r\n } catch (final OutOfMemoryError e) {\r\n realData = null;\r\n displayError(\"AlgorithmFFT2: Out of memory creating realData\");\r\n\r\n setCompleted(false);\r\n\r\n return;\r\n }\r\n\r\n try {\r\n\r\n if (!srcImage.isComplexImage()) {\r\n srcImage.exportData(0, arrayLength, realData); // locks and releases and lock\r\n\r\n // If the data is all real, then create an equal size imagData array and\r\n // fill it with zeros.\r\n Arrays.fill(imagData, 0.0f);\r\n } else {\r\n srcImage.exportDComplexData(0, arrayLength, realData, imagData);\r\n }\r\n } catch (final IOException error) {\r\n displayError(\"AlgorithmFFT2: Source image is locked\");\r\n\r\n setCompleted(false);\r\n\r\n return;\r\n } catch (final OutOfMemoryError e) {\r\n realData = null;\r\n imagData = null;\r\n displayError(\"AlgorithmFFT2: Out of memory\");\r\n\r\n setCompleted(false);\r\n\r\n return;\r\n }\r\n\r\n if (zeroPad) {\r\n\r\n // zero pad the data so that all dimensions are powers of 2\r\n fireProgressStateChanged( -1, null, \"Zero padding source data ...\");\r\n\r\n try {\r\n tempData = new double[newArrayLength];\r\n } catch (final OutOfMemoryError e) {\r\n tempData = null;\r\n System.gc();\r\n displayError(\"AlgorithmFFT2: Out of memory creating tempData for zero padding\");\r\n\r\n setCompleted(false);\r\n\r\n return;\r\n }\r\n\r\n if (ndim == 1) {\r\n System.arraycopy(realData, 0, tempData, 0, dimLengths[0]);\r\n } else if (ndim == 2) {\r\n ArrayUtil.copy2D(realData, 0, dimLengths[0], dimLengths[1], tempData, 0, newDimLengths[0],\r\n newDimLengths[1], true);\r\n } else if (ndim == 3) {\r\n ArrayUtil.copy3D(realData, 0, dimLengths[0], dimLengths[1], dimLengths[2], tempData, 0,\r\n newDimLengths[0], newDimLengths[1], newDimLengths[2], true);\r\n } else if (ndim == 4) {\r\n ArrayUtil.copy4D(realData, dimLengths[0], dimLengths[1], dimLengths[2], dimLengths[3], tempData,\r\n newDimLengths[0], newDimLengths[1], newDimLengths[2], newDimLengths[3], true);\r\n }\r\n realData = tempData;\r\n\r\n try {\r\n tempData = new double[newArrayLength];\r\n } catch (final OutOfMemoryError e) {\r\n tempData = null;\r\n displayError(\"AlgorithmFFT2: Out of memory creating imagData in zero padding routine\");\r\n\r\n setCompleted(false);\r\n\r\n return;\r\n }\r\n if (ndim == 1) {\r\n System.arraycopy(imagData, 0, tempData, 0, dimLengths[0]);\r\n } else if (ndim == 2) {\r\n ArrayUtil.copy2D(imagData, 0, dimLengths[0], dimLengths[1], tempData, 0, newDimLengths[0],\r\n newDimLengths[1], true);\r\n } else if (ndim == 3) {\r\n ArrayUtil.copy3D(imagData, 0, dimLengths[0], dimLengths[1], dimLengths[2], tempData, 0,\r\n newDimLengths[0], newDimLengths[1], newDimLengths[2], true);\r\n } else if (ndim == 4) {\r\n ArrayUtil.copy4D(imagData, dimLengths[0], dimLengths[1], dimLengths[2], dimLengths[3], tempData,\r\n newDimLengths[0], newDimLengths[1], newDimLengths[2], newDimLengths[3], true);\r\n }\r\n imagData = tempData;\r\n }\r\n }", "@Override\n\tpublic int getMaxSizeX()\n\t{\n\t\treturn 200;\n\t}", "public static int[] readScalingList(BitReader src, int sizeOfScalingList) {\r\n\r\n int[] scalingList = new int[sizeOfScalingList];\r\n int lastScale = 8;\r\n int nextScale = 8;\r\n for (int j = 0; j < sizeOfScalingList; j++) {\r\n if (nextScale != 0) {\r\n int deltaScale = readSE(src, \"deltaScale\");\r\n nextScale = (lastScale + deltaScale + 256) % 256;\r\n if (j == 0 && nextScale == 0)\r\n return null;\r\n }\r\n scalingList[j] = nextScale == 0 ? lastScale : nextScale;\r\n lastScale = scalingList[j];\r\n }\r\n return scalingList;\r\n }", "@Override\n public int getItemCount() {\n // 12. Returning 0 here will tell our Adapter not to make any Items. Let's fix that.\n return listOfData.size();\n }", "void example10() {\n\t\t\n\t\t// allocate a regular list\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT4.construct(), 1000);\n\t\t\n\t\t// fill it with data\n\t\t\n\t\tFill.compute(G.UINT4, G.UINT4.random(), list);\n\t\t\n\t\t// protect it from writes\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> readonlyList = new ReadOnlyDataSource<>(list);\n\t\t\n\t\t// now play with list\n\t\t\n\t\tUnsignedInt4Member value = G.UINT4.construct();\n\t\t\n\t\t// success\n\t\t\n\t\treadonlyList.get(44, value);\n\n\t\t// prepare to write\n\t\t\n\t\tvalue.setV(100);\n\t\t\n\t\t// failure: throws exception. writing not allowed\n\t\t\n\t\treadonlyList.set(22, value);\n\t}", "@Test\n public void testCreateScalableQuantizedRecorderSource() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorderSource\");\n Object forWhat = \"bla\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n int lowerMagnitude = 0;\n int higherMagnitude = 3;\n int quantasPerMagnitude = 10;\n MeasurementRecorderSource result = RecorderFactory.createScalableQuantizedRecorderSource(\n forWhat, unitOfMeasurement, sampleTime, factor, lowerMagnitude, higherMagnitude, quantasPerMagnitude);\n for (int i=0; i<5000; i++) {\n result.getRecorder(\"X\"+ i%2).record(i);\n Thread.sleep(1);\n }\n long endTime = System.currentTimeMillis();\n System.out.println(RecorderFactory.RRD_DATABASE.generateCharts(startTime, endTime, 1200, 600));\n System.out.println(RecorderFactory.RRD_DATABASE.getMeasurements());\n ((Closeable)result).close();\n }", "@Test\n\tpublic void createListWithInitialCapacity() {\n\t\tList<String> list1 = new ArrayList<>();\n\n\t\t// You can set capacity using constructor of ArrayList\n\t\tList<String> list2 = new ArrayList<>(20);\n\n\t\tassertTrue(list1.isEmpty());\n\t\tassertTrue(list2.isEmpty());\n\t\tassertTrue(list1.equals(list2));\n\t}", "private void testSize() {\n init();\n assertTrue(\"FListInteger.size(l0)\", FListInteger.size(l0) == 0);\n assertTrue(\"FListInteger.size(l1)\", FListInteger.size(l1) == 1);\n assertTrue(\"FListInteger.size(l2)\", FListInteger.size(l2) == 2);\n assertTrue(\"FListInteger.size(l3)\", FListInteger.size(l3) == 3);\n }", "private void resize() {\n int listSize = numItemInList();\n //debug\n //System.out.println(\"resize: \" + nextindex + \"/\" + list.length + \" items:\" + listSize);\n if (listSize <= list.length / 2) {\n for (int i = 0; i < listSize; i++) {\n list[i] = list[startIndex + i];\n }\n } else {\n Object[] newList = new Object[this.list.length * 2];\n\n// System.arraycopy(this.list, startIndex, newList, 0, this.list.length-startIndex);\n for (int i = 0; i < listSize; i++) {\n newList[i] = list[i + startIndex];\n }\n this.list = newList;\n //debug\n //System.out.println(\"After resize:\" + nextindex + \" / \" + list.length + \" items:\" + numItemInList());\n }\n nextindex = nextindex - startIndex;\n startIndex = 0;\n }", "@Override\n public int getBufferSize() {\n return 0;\n }", "int getMaxSize();", "static int noValueSize() {\r\n return itemSize(false) * 2;\r\n }", "private int getResourceListSize() {\n return dataList.getResourceEndIndex();\n }", "@Test\r\n\tpublic void testSize() {\r\n\t\tAssert.assertEquals(15, list.size());\r\n\t}", "private void trimListsToSize() {\n\t\tif (geneNames instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneNames).trimToSize();\n\t\t}\n\t\tif (geneNameOffsets instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneNameOffsets).trimToSize();\n\t\t}\n\t\tif (geneStrands instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneStrands).trimToSize();\n\t\t}\n\t\tif (geneStarts instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneStarts).trimToSize();\n\t\t}\n\t\tif (geneStops instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneStops).trimToSize();\n\t\t}\n\t\tif (geneUTR5Bounds instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneUTR5Bounds).trimToSize();\n\t\t}\n\t\tif (geneUTR3Bounds instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneUTR3Bounds).trimToSize();\n\t\t}\n\t\tif (exonOffsets instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) exonOffsets).trimToSize();\n\t\t}\n\t\tif (geneScores instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneScores).trimToSize();\n\t\t}\n\t}", "public abstract int getMaxIntermediateSize();", "@Override\n\tpublic int getSize() {\n\t\treturn datas.size();\n\t}", "static public int defaultHeadSize () { throw new RuntimeException(); }", "private void resize(int newCapacity) {\n\n E[] temp = (E[]) new Object[newCapacity];\n for(int i = 0; i < size(); i++)\n temp[i] = data[calculate(i)];\n data = temp;\n head = 0;\n tail = size()-1;\n\n\n }", "public BlockingDataSet(int maxSize)\n {\n \t// create an empty queue \n queArray = new ArrayBlockingQueue<Object[]>(maxSize, false);\n \n timeoutGet = Const.toInt(System.getProperty(Const.DATASET_GET_TIMEOUT), Const.TIMEOUT_GET_MILLIS);\n timeoutPut = Const.toInt(System.getProperty(Const.DATASET_PUT_TIMEOUT), Const.TIMEOUT_PUT_MILLIS);\n }", "public List<DynamicElement> newFixedSizeElementList(final By locator, String listName, int size) {\n\t\treturn DynamicUtil.newFixedSizeElementList(driver, locator, listName, size);\n\t}", "@Override\n public int getMaxCapacity() {\n return 156250000;\n }", "@Override\n public int getItemCount() {\n return dummyDataList.size();\n }", "int fixedSize();", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn listAdapterSize;\n\t\t}", "public void setSampleSize(int value) {\n this.sampleSize = value;\n }", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "@Test\n public void testMemoryFixedSizeFrameNoDiskNoDiscard() {\n try {\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // No spill, No discard\n FeedPolicyAccessor fpa = createFeedPolicyAccessor(false, false, 0L, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestControlledFrameWriter writer = FrameWriterTestUtils.create(DEFAULT_FRAME_SIZE, false);\n writer.freeze();\n // FramePool\n ConcurrentFramePool framePool = new ConcurrentFramePool(NODE_ID, FEED_MEM_BUDGET, DEFAULT_FRAME_SIZE);\n\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n VSizeFrame frame = new VSizeFrame(ctx);\n // add NUM_FRAMES times\n for (int i = 0; i < NUM_FRAMES; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n // Next call should block we will do it in a different thread\n Future<?> result = EXECUTOR.submit(new Pusher(frame.getBuffer(), handler));\n // Check that the nextFrame didn't return\n if (result.isDone()) {\n Assert.fail();\n } else {\n // Check that no records were discarded\n Assert.assertEquals(handler.getNumDiscarded(), 0);\n // Check that no records were spilled\n Assert.assertEquals(handler.getNumSpilled(), 0);\n // Check that no records were discarded\n // Check that the inputHandler subscribed to the framePool\n // Check that number of stalled is not greater than 1\n Assert.assertTrue(handler.getNumStalled() <= 1);\n writer.kick();\n }\n result.get();\n writer.unfreeze();\n handler.close();\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "@Test\n public void testEnsureBufferSizeExpandsToMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(false);\n }", "@Test\n public void testContinguosStorageReSize() {\n for (int i = 9; i >= 0; i--) {\n String input = String.format(\"b0%d\", i);\n list.addToFront(input);\n }\n\n list.addToFront(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.addToFront(\"Filler0\");\n list.addAtIndex(0, \"Filler#\");\n list.addAtIndex(2, \"Filler!\");\n list.addAtIndex(6, \"Filler$\");\n list.removeFromFront();\n list.removeFromBack();\n list.removeAtIndex(4);\n list.removeAtIndex(0);\n list.removeAtIndex(2);\n\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n for (int i = 0; i < list.size(); i++) {\n Assert.assertNotNull(((Object[]) (list.getBackingArray()))[i]);\n }\n for (int i = list.size(); i < actualCapacity; i++) {\n Assert.assertNull(((Object[]) (list.getBackingArray()))[i]);\n }\n }", "int getBufferSize();", "@Override\n public int getSize() {\n return 1;\n }", "public void setTicksCount(int size) {\n\t\t\n\t}", "private List<List<Integer>> allPartitions(Set<Integer> layoutSizes, int target, int sizeLimit) {\n List<List<Integer>> result = new ArrayList<>();\n layoutSizes = layoutSizes.stream().filter(x -> x > 0).collect(toSet());\n if (sizeLimit < 1) {\n sizeLimit = target;\n }\n Integer[] arr = new Integer[sizeLimit];\n generatePartialList(result, arr, 0, 0, layoutSizes, target, sizeLimit);\n return result;\n }", "@Override public long getSimulatedSize() {\n return 1;\n }", "public int[] chunkSize(ArrayList<ArrayList<String>> listOfFIDList, int size){\n\t\tint[] chunkInfo = new int[2];\n\t\tint minLength = listOfFIDList.get(0).size();\n\t\tboolean isChunk = false;\n\t\tint numberOfChunks = 0;\n\t\tint chunkSize = 0;\t\n\t\tfor(int i = 0; i < listOfFIDList.size(); i++){ //determine minLength\n\t\t\tif(listOfFIDList.get(i).size() < minLength){\n\t\t\t\tminLength = listOfFIDList.get(i).size();\n\t\t\t}\n\t\t}\t\n\t\tfor(int i = 0; i < listOfFIDList.size(); i++){ //determine individual chunksizes and number of chunks\n\t\t\tint currentSize = listOfFIDList.get(i).size();\n\t\t\tif(currentSize == minLength){\n\t\t\t\tif(!isChunk){\n\t\t\t\t\tnumberOfChunks++;\n\t\t\t\t}\n\t\t\t\tisChunk = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tisChunk = false;\n\t\t\t}\n\t\t\tif(isChunk){\n\t\t\t\tchunkSize++;\n\t\t\t}\n\t\t}\n\t\tchunkInfo[0] = chunkSize;\n\t\tchunkInfo[1] = numberOfChunks;\n\t\t\n\t\treturn chunkInfo;\n\t}", "@Override\n public int getSize() {\n return numItems;\n }", "@Override\n\tpublic boolean canfitLarge() {\n\t\treturn true;\n\t}", "public ArrayList61B(int initialCapacity) { \n\t\tif (initialCapacity < 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse {\n\t\t\tthis.size = initialCapacity;\n\t\t\tthis.arrayList = (E[]) new Object[this.size];\n\t\t\tthis.numberOfElements = 0;\n\t\t}\n\t}", "public void setSampleSize(int size){\r\n\t\tSampleSize = size;\r\n\t}", "@Test\n public void testEnsureBufferSizeExpandsToBeyondMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(true);\n }", "public void setMaxBufferSize(int value) {\n this.maxBufferSize = value;\n }", "@Test\n public void testMemoryFixedSizeFrameWithSpillNoDiscard() {\n try {\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // Spill budget = Memory budget, No discard\n FeedPolicyAccessor fpa =\n createFeedPolicyAccessor(true, false, DEFAULT_FRAME_SIZE * NUM_FRAMES, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestControlledFrameWriter writer = FrameWriterTestUtils.create(DEFAULT_FRAME_SIZE, false);\n writer.freeze();\n // FramePool\n ConcurrentFramePool framePool = new ConcurrentFramePool(NODE_ID, FEED_MEM_BUDGET, DEFAULT_FRAME_SIZE);\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n VSizeFrame frame = new VSizeFrame(ctx);\n // add NUM_FRAMES times\n for (int i = 0; i < NUM_FRAMES; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n // Next call should NOT block. we will do it in a different thread\n Future<?> result = EXECUTOR.submit(new Pusher(frame.getBuffer(), handler));\n result.get();\n // Check that no records were discarded\n Assert.assertEquals(handler.getNumDiscarded(), 0);\n // Check that one frame is spilled\n Assert.assertEquals(handler.getNumSpilled(), 1);\n // consume memory frames\n writer.unfreeze();\n handler.close();\n Assert.assertEquals(handler.framesOnDisk(), 0);\n // exit\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "public int getSampleSize(){\n\t\treturn sampleSize;\n\t}", "public int getShortestDataset() {\n\t\tint minimalLength = 1000000000;\t\t\t\t\t\t// Update 2021: now the length of the recording is saved in the raw data and can be read from there\n\t\tfor (int i = 0; i < SubjectsList.size(); i ++) {\n\t\t\tint testLength = SubjectsList.get(i).getDatasetLength();\n\t\t\tif (testLength < minimalLength) {\n\t\t\t\tminimalLength = testLength;\n\t\t\t}\n\t\t}\n\t\t//return minimalLength;\n\t\treturn (int) datasetLength-1;\t\t\t\t\t\t\t// new! length is now in the RAW data (2021)\n\t}", "public void setMaximumPatternLength(int length) {\n\t\tthis.maxItemsetSize = length;\n\t}", "@Override\n public List<UnboundedAmqpSource> split(int desiredNumSplits, PipelineOptions pipelineOptions) {\n List<UnboundedAmqpSource> sources = new ArrayList<>();\n for (int i = 0; i < Math.max(1, desiredNumSplits); ++i) {\n sources.add(new UnboundedAmqpSource(spec));\n }\n return sources;\n }", "private void ensureCapacity(int minCapacity) {\r\n int oldCapacity = elementData.length;\r\n if (minCapacity > oldCapacity) {\r\n float[] oldData = elementData;\r\n int newCapacity = (oldCapacity * 3)/2 + 1;\r\n if (newCapacity < minCapacity)\r\n newCapacity = minCapacity;\r\n elementData = new float[newCapacity];\r\n System.arraycopy(oldData, 0, elementData, 0, size);\r\n }\r\n }", "@Override\n public int getItemCount() {\n return dataList.size();\n }", "private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }", "@Test\n public void testMemoryFixedSizeFrameWithSpillWithDiscard() {\n try {\n int numberOfMemoryFrames = 50;\n int numberOfSpillFrames = 50;\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // Spill budget = Memory budget, No discard\n FeedPolicyAccessor fpa =\n createFeedPolicyAccessor(true, true, DEFAULT_FRAME_SIZE * numberOfSpillFrames, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestControlledFrameWriter writer = FrameWriterTestUtils.create(DEFAULT_FRAME_SIZE, false);\n writer.freeze();\n // FramePool\n ConcurrentFramePool framePool =\n new ConcurrentFramePool(NODE_ID, numberOfMemoryFrames * DEFAULT_FRAME_SIZE, DEFAULT_FRAME_SIZE);\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n VSizeFrame frame = new VSizeFrame(ctx);\n for (int i = 0; i < numberOfMemoryFrames; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n // Now we need to verify that the frame pool memory has been consumed!\n Assert.assertEquals(0, framePool.remaining());\n Assert.assertEquals(numberOfMemoryFrames, handler.getTotal());\n Assert.assertEquals(0, handler.getNumSpilled());\n Assert.assertEquals(0, handler.getNumStalled());\n Assert.assertEquals(0, handler.getNumDiscarded());\n for (int i = 0; i < numberOfSpillFrames; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n Assert.assertEquals(0, framePool.remaining());\n Assert.assertEquals(numberOfMemoryFrames + numberOfSpillFrames, handler.getTotal());\n Assert.assertEquals(numberOfSpillFrames, handler.getNumSpilled());\n Assert.assertEquals(0, handler.getNumStalled());\n Assert.assertEquals(0, handler.getNumDiscarded());\n // We can only discard one frame\n double numDiscarded = 0;\n boolean nextShouldDiscard =\n ((numDiscarded + 1.0) / (handler.getTotal() + 1.0)) <= fpa.getMaxFractionDiscard();\n while (nextShouldDiscard) {\n handler.nextFrame(frame.getBuffer());\n numDiscarded++;\n nextShouldDiscard = (numDiscarded + 1.0) / (handler.getTotal() + 1.0) <= fpa.getMaxFractionDiscard();\n }\n Assert.assertEquals(0, framePool.remaining());\n Assert.assertEquals((int) (numberOfMemoryFrames + numberOfSpillFrames + numDiscarded), handler.getTotal());\n Assert.assertEquals(numberOfSpillFrames, handler.getNumSpilled());\n Assert.assertEquals(0, handler.getNumStalled());\n Assert.assertEquals((int) numDiscarded, handler.getNumDiscarded());\n // Next Call should block since we're exceeding the discard allowance\n Future<?> result = EXECUTOR.submit(new Pusher(frame.getBuffer(), handler));\n if (result.isDone()) {\n Assert.fail(\"The producer should switch to stall mode since it is exceeding the discard allowance\");\n } else {\n Assert.assertEquals((int) numDiscarded, handler.getNumDiscarded());\n }\n // consume memory frames\n writer.unfreeze();\n result.get();\n handler.close();\n Assert.assertTrue(result.isDone());\n Assert.assertEquals(writer.nextFrameCount(), numberOfMemoryFrames + numberOfSpillFrames + 1);\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "public int getSampleSize() {\n return sampleSize;\n }", "@Override\n public int getCount() {\n return dataList.size();\n }", "public static int numElements_data() {\n return 60;\n }", "public IntegerList(int size)\n {\n list = new int[size];\n }", "@Override\n public int getItemCount() {\n //list.length to return\n return mDataset.size();\n }", "public Http2ClientBuilder maxHeaderListSize(long maxHeaderListSize){\n this.maxHeaderListSize = maxHeaderListSize;\n return this;\n }", "java.util.List<java.lang.Integer> getBloomFilterSizeInBytesList();", "public FullWaveformData() {\n\t\tchannelSampleArrayList = new ArrayList<>();\n\t\tdataSetArray = new DataSet[34];\n\t\tfor (int i = 0; i < 34; i++) {\n\t\t\tchannelSampleArrayList.add(new ArrayList<>());\n\t\t}\n\t\tfor (int i = 0; i < 34; i++) {\n\t\t\ttry {\n\t\t\t\tdataSetArray[i] = new DataSet(DataSetType.XYXY, WavePlot.getColumnNames());\n\t\t\t} catch (DataSetException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void setSliceSize(int newSize) {\n ArrayList<Integer> newSlice = new ArrayList<>(slice);\n if (newSize > slice.size()) {\n if (slice.size() == 0) {\n newSlice = new ArrayList<>(Collections.nCopies(newSize, 0));\n patternSpecific = new ArrayList<>(Collections.nCopies(newSize, 0));\n } else {\n // If the new size is larger, then add a few extra values\n newSlice.addAll(new ArrayList<>(Collections.nCopies(newSize - newSlice.size(), newSlice.get(newSlice.size() - 1))));\n patternSpecific.addAll(new ArrayList<>(Collections.nCopies(newSize - patternSpecific.size(), patternSpecific.get(patternSpecific.size() - 1)))); // Also modify the patternSpecific array\n }\n } else if (newSize < newSlice.size()) {\n // If the new size is smaller, then remove the extra values\n newSlice.subList(newSize, newSlice.size()).clear(); // Remove the extra elements\n patternSpecific.subList(newSize, patternSpecific.size()).clear(); // Remove the extra elements (Also modify the patternSpecific array)\n } else {\n return;\n }\n\n // Assign the new slice value\n setSlice(newSlice);\n }", "@Test\n public void orgApacheFelixEventadminThreadPoolSizeTest() {\n // TODO: test orgApacheFelixEventadminThreadPoolSize\n }", "public int getSize() {\r\n return list.getItemCount();\r\n }", "@Override\n public void setVisibleLength(int length) {}" ]
[ "0.6209295", "0.59062344", "0.5568588", "0.5511654", "0.54712695", "0.5412114", "0.53616154", "0.53486246", "0.52610135", "0.5229733", "0.521493", "0.51669616", "0.51355237", "0.50766724", "0.5063147", "0.5036715", "0.5027032", "0.5018286", "0.5005568", "0.4997808", "0.49836448", "0.49746844", "0.49740788", "0.49443442", "0.4940063", "0.49370074", "0.49270737", "0.49211392", "0.4896489", "0.48830092", "0.488199", "0.48681954", "0.4866362", "0.4840925", "0.48312858", "0.48311418", "0.48261574", "0.48243538", "0.4819411", "0.48103118", "0.4796277", "0.47930098", "0.4788295", "0.478158", "0.47770584", "0.47754714", "0.47716662", "0.4769418", "0.47577667", "0.4752581", "0.47524747", "0.47509345", "0.4749035", "0.47471505", "0.4746829", "0.4732518", "0.4732447", "0.47222045", "0.47193864", "0.47179022", "0.47147495", "0.47106215", "0.47084257", "0.47054443", "0.4701466", "0.46848837", "0.46669585", "0.46666363", "0.46648368", "0.46614856", "0.46608353", "0.46513903", "0.4644023", "0.46418405", "0.46373823", "0.46370056", "0.46331987", "0.4631492", "0.4626625", "0.46255788", "0.46229655", "0.46213374", "0.46137556", "0.46126977", "0.4609102", "0.46076366", "0.4603084", "0.4602627", "0.46023282", "0.45996493", "0.45994848", "0.45957565", "0.4595523", "0.45844474", "0.4581616", "0.4581492", "0.4574997", "0.45704404", "0.4569258", "0.45674282" ]
0.6109079
1
ListDataSource The regular Storage allocator requires that the type of data that will be stored implements certain primitive coder interfaces. Sometimes this is too restrictive. If someone defines a type that can't easily be stored to disk (like for instance when its primitive data does not have a fixed size) you can use this data source to wrap plain object list data so that it can be used with all of Zorbage's algorithms. Note that this code is type safe. It also is completely resident in ram and cannot be indexed beyond the range of a 32 bit integer so one is limited as to how much data can be allocated and processed. It can be useful for interfacing with other libraries that return lists of objects.
void example7() { // allocate the data IndexedDataSource<HighPrecisionMember> data = ListDataSource.construct(G.HP, 1234); // fill the list with values HighPrecisionMember value = G.HP.construct(); for (long i = 0; i < data.size(); i++) { value.setV(BigDecimal.valueOf(i)); data.set(i, value); } // then calculate a result HighPrecisionMember result = G.HP.construct(); StdDev.compute(G.HP, data, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void example10() {\n\t\t\n\t\t// allocate a regular list\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT4.construct(), 1000);\n\t\t\n\t\t// fill it with data\n\t\t\n\t\tFill.compute(G.UINT4, G.UINT4.random(), list);\n\t\t\n\t\t// protect it from writes\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> readonlyList = new ReadOnlyDataSource<>(list);\n\t\t\n\t\t// now play with list\n\t\t\n\t\tUnsignedInt4Member value = G.UINT4.construct();\n\t\t\n\t\t// success\n\t\t\n\t\treadonlyList.get(44, value);\n\n\t\t// prepare to write\n\t\t\n\t\tvalue.setV(100);\n\t\t\n\t\t// failure: throws exception. writing not allowed\n\t\t\n\t\treadonlyList.set(22, value);\n\t}", "public Data(ArrayList<Object> list) {\n try {\n int n = list.size();\n if (n == 0) throw new Exception(\"Specified argument for Data constructor is an empty ArrayList\");\n this.data = new ArrayList<Byte>();\n\n for (int i = 0; i < n; i++) {\n Object o = list.get(i);\n if (o instanceof Byte) {\n byte b = (byte) o;\n this.data.add(b);\n } else if (o instanceof Integer) {\n int v = (int) o;\n for (int j = 0; j < 4; j++) {\n int b = 0;\n for (int k = 0; k < 8; k++) {\n b = b << 1;\n int x = (3 - j) * 8 + (7 - k);\n int c = (v >> x) & 1;\n b = b | c;\n }\n byte d = (byte) b;\n this.data.add(d);\n }\n } else // support for other formats (eg. Double) may be added\n {\n throw new Exception(\"Specified argument for Data constructor contains Objects that are not supported yet\");\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "public interface ListDataOverflowInterface {\n public void update(Object object);\n public void delete(Object object);\n public void detail(Object object);\n}", "DataList createDataList();", "public interface DataSource<T> {\n\t/**\n\t * open data source.\n\t */\n\tpublic void open();\n\t/**\n\t * Get the next data object.\n\t * @return data object.\n\t */\n\tpublic T next();\n\t/**\n\t * move vernier to head.\n\t * @return\n\t */\n\tpublic void head();\n\t/**\n\t * close data source.\n\t */\n\tpublic void close();\n\t/**\n\t * get attributes. \n\t * @return\n\t */\n\tpublic Map<String, Object> attributes();\n}", "abstract protected Object newList( int capacity );", "public interface SearchableList extends ListDataSource {\n Observable<List> queryList(String queryText, boolean barcodeSearch, Map<String, Object> searchParameters, AuthenticationInfo authenticationInfo, Parameters params);\n\n default Observable<ListItem> fetchItem(String id, AuthenticationInfo authenticationInfo, Parameters parameters) {\n throw new RuntimeException(\"This source does not support fetching a single item\");\n }\n}", "public interface DataSourceWrapper<D> {\r\n\r\n public void openDataSource() throws Exception;\r\n \r\n public void preValidate() throws Exception;\r\n \r\n public void closeDataSource() throws Exception;\r\n \r\n public void setDataSource(D dataSource);\r\n \r\n public D getDataSource();\r\n \r\n public Iterator<Row> getRowIterator();\r\n \r\n}", "public interface QList<D extends QData> extends QData, Iterable<D> {\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model dataType=\"org.smeup.sys.il.data.DataArray\" required=\"true\"\n\t * @generated\n\t */\n\tD[] asArray();\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model indexRequired=\"true\"\n\t * @generated\n\t */\n\tD get(Number index);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model indexRequired=\"true\"\n\t * @generated\n\t */\n\tD get(QNumeric index);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model required=\"true\"\n\t * @generated\n\t */\n\tint capacity();\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model required=\"true\"\n\t * @generated\n\t */\n\tint count();\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model valueRequired=\"true\"\n\t * @generated\n\t */\n\tvoid eval(QList<D> value);\n\n}", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();", "public interface LocalDataSource {\n\n void saveUserName(String userName);\n\n void saveWxId(String wxId);\n\n void saveHead(String head);\n\n void saveBalance(String balance);\n\n void saveBankCard(BankCard bankCard);\n\n void saveDai(boolean dai);\n\n void saveLoan(Loan loan);\n\n String getUserName();\n\n String getWxId();\n\n String getHead();\n\n String getBalance();\n\n List<BankCard> getAllBankCard();\n\n boolean getDai();\n\n Loan getLoan();\n}", "@VTID(41)\n com.exceljava.com4j.excel.ListObject getListObject();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default List<IData> asList() {\n \n return notSupportedCast(\"IData[]\");\n }", "List<T> read();", "@ZenCodeType.Method\n static IData listOf(IData... members) {\n \n if(members == null) {\n return new ListData();\n }\n \n int type = 0;\n final int byteIndex = 1;\n final int intIndex = 2;\n final int longIndex = 4;\n final int otherIndex = 8;\n \n for(IData member : members) {\n if(member instanceof ByteData) {\n type |= byteIndex;\n } else if(member instanceof IntData || member instanceof ShortData) {\n type |= intIndex;\n } else if(member instanceof LongData) {\n type |= longIndex;\n } else {\n type |= otherIndex;\n }\n }\n \n if((type & otherIndex) != 0) {\n return new ListData(members);\n } else if((type & longIndex) != 0) {\n long[] result = new long[members.length];\n for(int i = 0; i < members.length; i++) {\n result[i] = members[i].asLong();\n }\n return new LongArrayData(result);\n } else if((type & intIndex) != 0) {\n int[] result = new int[members.length];\n for(int i = 0; i < members.length; i++) {\n result[i] = members[i].asInt();\n }\n return new IntArrayData(result);\n } else if((type & byteIndex) != 0) {\n byte[] result = new byte[members.length];\n for(int i = 0; i < members.length; i++) {\n result[i] = members[i].asByte();\n }\n return new ByteArrayData(result);\n }\n \n return new ListData();\n }", "public interface DataObject {\n\n /**\n * Returns the length of the contained resource.\n *\n * @return resource length of the resource.\n * @throws IOException when an error occurs while reading the length.\n */\n long getContentLength() throws IOException;\n\n /**\n * Returns an {@link InputStream} representing the contents of the resource.\n *\n * @return contents of the resource as stream.\n * @throws IOException when an error occurs while reading the resource.\n */\n InputStream getInputStream() throws IOException;\n\n /**\n * Returns {@link DataObject} containing the resource. The contents are ranged\n * from the start to the end indexes.\n *\n * @param start index at which data will be read from.\n * @param end index at which dat will be read to.\n * @return ranged resource object.\n * @throws IOException when an error occurs while reading the resource.\n */\n DataObject withRange(int start, int end) throws IOException;\n}", "public ListPopulator(Supplier<? extends DataType> objectCreator) {\n\t\tthis.objectCreator = objectCreator;\n\t}", "public CapsuleAdapter(List<T> data) {\n if (data != null) mList = data;\n }", "List<T> readList();", "public abstract ArrayList<STTPoint> getWrappedData();", "public interface Column extends List, TetradSerializable {\n static final long serialVersionUID = 23L;\n\n /**\n * Returns the raw data array for this columns. Must be cast to the type of\n * array which supports the particular column implementation being used. The\n * array will typically contain more elements than are actually being used;\n * to obtain the true number of data points, use the size() method. This\n * method should be used by algorithms to retrieve data in columns without\n * incurring the cost of unnecessarruy object creations (e.g. array\n * allocations and generation of primitive data wrappers). </p> Example of\n * proper casting for ContinuousColumn:\n * <pre> double[] data = (double[])column.getRawData(); </pre>\n *\n * @return the raw data array.\n */\n Object getRawData();\n\n /**\n * Returns the variable which governs the type of data stored in this\n * column.\n *\n * @return the variable specification.\n * @see edu.cmu.tetrad.data.Variable\n */\n Node getVariable();\n}", "public interface IDataSource<T, E> {\n void update(T data);\n int getItemCount();\n E getItemForPosition(int index);\n}", "public interface IDataCollection<T> extends Serializable {\n int getPageSize ();\n int getPageNo ();\n int getTotalRows ();\n int getTotalPages ();\n void setData (Collection<T> data);\n List<T> getData ();\n}", "public ObjectList(final int initialCapacity) {\n super(initialCapacity);\n }", "public NumericObjectArrayList() {\r\n list = new Copiable[10];\r\n count = 0;\r\n }", "public interface DataSourceFromParallelCollection extends DataSource{\n\n public static final String SPLITABLE_ITERATOR = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_SPLIT_ITERATOR;\n\n public static final String CLASS = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_CLASS;\n\n\n}", "public DynArrayList() {\n data =(E[]) new Object[CAPACITY];\n }", "public interface CertificateOfBirthDataListView extends LoadDataView {\n\n /**\n * Render a certificate of birth list in the UI.\n *\n * @param dataModels The collection of {@link CertificateOfBirthDataModel} that will be shown.\n */\n void renderCertificateOfBirthList(Collection<CertificateOfBirthDataModel> dataModels);\n\n /**\n * View a {@link CertificateOfBirthDataModel} profile/details.\n *\n * @param model The user that will be shown.\n */\n void viewCertificateOfBirth(CertificateOfBirthDataModel model);\n\n}", "public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }", "public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }", "public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "public interface ListSettable<T> {\n\n void setData(List<T> data);\n}", "@Override\n protected List<FieldInfo> getListData()\n {\n // if is an array (we potentially will compress the array if it is\n // large)\n if (obj.isArray()) {\n return compressArrayList(obj);\n }\n else {\n List<DebuggerField> fields = obj.getFields();\n List<FieldInfo> fieldInfos = new ArrayList<FieldInfo>(fields.size());\n for (DebuggerField field : fields) {\n if (! Modifier.isStatic(field.getModifiers())) {\n String desc = Inspector.fieldToString(field);\n String value = field.getValueString();\n fieldInfos.add(new FieldInfo(desc, value));\n }\n }\n return fieldInfos;\n }\n }", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public java.util.List<java.lang.Integer>\n getDataList() {\n return data_;\n }", "public java.util.List<java.lang.Integer>\n getDataList() {\n return java.util.Collections.unmodifiableList(data_);\n }", "public interface ILocalDataSource {\n\n Flowable<List<CategoryDBO>> loadCategoriesFromLocal();\n\n void saveCategoriesToLocal(CategoryDBO categoryDBO);\n}", "public interface DList {\n}", "@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject = 0;\r\n \t}", "void setListData(int list, int data) {\n\t\tm_lists.setField(list, 5, data);\n\t}", "public List()\n {\n list = new Object [10];\n }", "public interface DataItemSource {\n\tpublic String getDataItemSourceName();\n\n\t/**\n\t * \n\t * @return A new object of the same class as the caller. All fields are reinitialized\n\t * to default state except for the disabled field, which will have the same value as the caller\n\t */\n\tpublic DataItemSource createInstanceOfSameType();\n\n\tpublic boolean isDisabled();\n\n\tpublic void setDisabled(boolean b);\n\n\tpublic ImageIcon getProfileIcon();\n\n}", "public interface SpLocalFeatureList <T extends SpLocalFeature<?, ?>> extends SpRandomisableList<T>, Writeable {\n\n /** The header used when writing LocalFeatureLists to streams and files */\n public static final byte[] BINARY_HEADER = \"KPT\".getBytes();\n\n /**\n * Get the feature-vector data of the list as a two-dimensional array of\n * data. The number of rows will equal the number of features in the list,\n * and the type &lt;Q&gt;must be compatible with the data type of the features\n * themselves.\n *\n * @param <Q>\n * the data type\n * @param a\n * the array to fill\n * @return the array, filled with the feature-vector data.\n */\n public <Q> Q[] asDataArray(Q[] a);\n\n /**\n * Get the length of the feature-vectors of each local feature if they are\n * constant.\n *\n * This value is used as instantiate new local features in the case that the\n * local feature has a constructor that takes a single integer.\n *\n * @return the feature-vector length\n */\n public int vecLength();\n\n @Override\n public SpLocalFeatureList<T> subList(int fromIndex, int toIndex);\n\n}", "public void setData(java.util.List data) {\r\n this.data = data;\r\n }", "private Object deserializeList(Object datum, Schema fileSchema, Schema recordSchema,\n ListTypeInfo columnType) throws AvroSerdeException {\n if(recordSchema.getType().equals(Schema.Type.FIXED)) {\n // We're faking out Hive to work through a type system impedance mismatch.\n // Pull out the backing array and convert to a list.\n GenericData.Fixed fixed = (GenericData.Fixed) datum;\n List<Byte> asList = new ArrayList<Byte>(fixed.bytes().length);\n for(int j = 0; j < fixed.bytes().length; j++) {\n asList.add(fixed.bytes()[j]);\n }\n return asList;\n } else if(recordSchema.getType().equals(Schema.Type.BYTES)) {\n // This is going to be slow... hold on.\n ByteBuffer bb = (ByteBuffer)datum;\n List<Byte> asList = new ArrayList<Byte>(bb.capacity());\n byte[] array = bb.array();\n for(int j = 0; j < array.length; j++) {\n asList.add(array[j]);\n }\n return asList;\n } else { // An actual list, deser its values\n List listData = (List) datum;\n Schema listSchema = recordSchema.getElementType();\n List<Object> listContents = new ArrayList<Object>(listData.size());\n for(Object obj : listData) {\n listContents.add(worker(obj, fileSchema == null ? null : fileSchema.getElementType(), listSchema,\n columnType.getListElementTypeInfo()));\n }\n return listContents;\n }\n }", "public FixedSizeList(int capacity) {\n // YOUR CODE HERE\n }", "ListType createListType();", "public interface ListModel {\n\n /** \n * Returns the length of the list.\n * @return the length of the list\n */\n int getSize();\n\n /**\n * Returns the value at the specified index. \n * @param index the requested index\n * @return the value at <code>index</code>\n */\n Object getElementAt(int index);\n\n /**\n * Adds a listener to the list that's notified each time a change\n * to the data model occurs.\n * @param listener the <code>ListDataListener</code> to be added\n */ \n void addListDataListener(ListDataListener listener);\n\n /**\n * Removes a listener from the list that's notified each time a \n * change to the data model occurs.\n * @param listener the <code>ListDataListener</code> to be removed\n */ \n void removeListDataListener(ListDataListener listener);\n}", "public TiraList() {\n this.list = new Object[8];\n this.nextindex = 0;\n this.startIndex = 0;\n }", "public MyArrayList(int length) {\n data = new Object[length];\n }", "public interface IDataStorage<TKey extends ISizable, TValue extends ISizable> {\n WrappedKeyValue<TKey, TValue> Get(TKey key) throws IOException;\n\n //TODO: replace with iterator\n List<WrappedKeyValue<TKey, TValue>> GetElements() throws IOException;\n\n void AddOrUpdate(TKey key, TValue value) throws IOException;\n\n void AddOrUpdate(List<WrappedKeyValue<TKey, TValue>> values) throws IOException;\n\n void Delete(TKey key) throws IOException;\n\n void Clear();\n\n void Close() throws IOException;\n}", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "public interface List<T> extends Collection<T> {\n\t\n\t/**\n\t * Returns the object that is stored in the list at position <code>index</code>.\n\t * @param index position from which the object will be returned\n\t * @return the object that is stored at position <code>index</code>\n\t * @throws IndexOutOfBoundsException index must be between 0 and size-1\n\t */\n\tT get(int index);\n\t\n\t/**\n\t * Inserts the object at the specified position. It does not overwrite the given value at the given position, \n\t * it shifts the elements at greater positions one place toward the end.\n\t * @param value object to be inserted\n\t * @param position index where the object should be inserted\n\t * @throws NullPointerException <code>null</code> object will not be inserted into the list\n\t * @throws IndexOutOfBoundsException index must be between 0 and size\n\t */\n\tvoid insert(T value, int position);\n\t\n\t/**\n\t * Searches the collection and returns the index of the first occurrence of the given value\n\t * or -1 if the value is not found.\n\t * @param value object that will be searched\n\t * @return index of the first occurrence of the given object or -1 if the value is not found\n\t */\n\tint indexOf(Object value);\n\t\n\t/**\n\t * Removes element at specified index from collection. \n\t * Element that was previously at location index+1 after this operation is on location index , etc.\n\t * @param index index at which the element should be removed\n\t * @throws IndexOutOfBoundsException index must be between 0 and size-1\n\t */\n\tvoid remove(int index);\n}", "public ListingData() {\r\n\t\tsuper();\r\n\t}", "public SimpleList(int capacity) {\n this.values = new Object[capacity];\n }", "public SmartList() {\n size = 0;\n storage = null;\n }", "public interface ISimpleList<Type> extends Iterable<Type> {\n /**\n * Add a value to the end of this list.\n * \n * @param t is the value added to this list\n */\n public void add(Type t);\n\n /**\n * Add a value at a specified index in the list, shifting other values to\n * make room.\n * \n * @param index is the index at which new value added\n * @param t the new value added\n * @throws IndexOutOfBoundsException\n * if index is greater than size of list or less than zero\n */\n public void add(int index, Type t);\n\n /**\n * Returns an iterator over this list's values, the iterator supports\n * remove.\n * \n * @return iterator (supporting remove))\n */\n public Iterator<Type> iterator();\n\n /**\n * Remove and return the value at the specified index, shifting other values\n * \n * @param index of value to remove\n * @return the removed value\n * @throws IndexOutOfBoundsException\n * if index < 0 or >= size()\n */\n public Type remove(int index);\n\n /**\n * Remove first occurrence of a value, and return true iff removal succeeds.\n * \n * @param t is value removed\n * @return true if a value is removed, false otherwise\n */\n public boolean remove(Type t);\n\n /**\n * Return the value at the specified index.\n * \n * @param index of value to return\n * @return value at specified index\n * @throws IndexOutOfBoundsException\n * if index < 0 or >= size()\n */\n public Type get(int index);\n\n /**\n * Return index of first occurrence of a value, or -1 if not found.\n * \n * @param t is valuel searched for\n * @return index of first occurrence of t, or -1 if t not found\n */\n public int indexOf(Type t);\n\n /**\n * Returns number of elements in this list.\n * \n * @return number of elements in list\n */\n public int size();\n}", "public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public interface List<E> {\n\n /**\n * Return number of elements in the list\n * @return Number of elements\n */\n int size();\n\n /**\n * Returns whether the list is empty\n * @return True if the list is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Returns the element at index i\n * @param i Index\n * @return Element at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E get(int i) throws IndexOutOfBoundsException;\n\n /**\n * Replaces the element at index i with e, and returns the replaced element\n * @param i Index\n * @param e New element\n * @return Element replaced by e\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E set(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Inserts element e to be at index i, shifting all subsequent elements later\n * @param i Index\n * @param e New element\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n void add(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Removes and returns the element at index i, shifting subsequent elements\n * earlier\n * @param i Index\n * @return Element previously at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E remove(int i) throws IndexOutOfBoundsException;\n\n /**\n * Empty the list\n */\n public void clear();\n\n /**\n * Construct a clone (copy) of the object.\n * @return New list object with the same structure. This copy should be\n * shallow, i.e., the individual elements are not cloned.\n */\n public List<E> clone();\n}", "public DataWrapProxy(int data, boolean isLong) {\n this.data = (long) data;\n }", "public static Object read(Object obj) {\n if (obj instanceof byte[] byteArray) {\n return SafeEncoder.encode(byteArray);\n }\n if (obj instanceof List) {\n return ((List<?>) obj).stream().map(Jupiter::read).toList();\n }\n\n return obj;\n }", "@Override\n public void setListData() {}", "Plist()\n {\n m_dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n m_dateFormat.setTimeZone(TimeZone.getTimeZone(\"Z\"));\n m_simpleTypes = new HashMap<Class<?>, ElementType>();\n m_simpleTypes.put(Integer.class, ElementType.INTEGER);\n m_simpleTypes.put(Byte.class, ElementType.INTEGER);\n m_simpleTypes.put(Short.class, ElementType.INTEGER);\n m_simpleTypes.put(Short.class, ElementType.INTEGER);\n m_simpleTypes.put(Long.class, ElementType.INTEGER);\n m_simpleTypes.put(String.class, ElementType.STRING);\n m_simpleTypes.put(Float.class, ElementType.REAL);\n m_simpleTypes.put(Double.class, ElementType.REAL);\n m_simpleTypes.put(byte[].class, ElementType.DATA);\n m_simpleTypes.put(Boolean.class, ElementType.TRUE);\n m_simpleTypes.put(Date.class, ElementType.DATE);\n }", "public DataWrapProxy(int data) {\n this.data = data;\n }", "public KWArrayList(){\n capacity = INITIAL_CAPACITY;\n theData = (E[]) new Object[capacity];\n }", "public MyArrayList() {\n data = new Object[10];\n }", "public interface ExternalArrayData\n{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}", "public interface List extends Collection{\r\n\t/**\r\n\t * Returns the object that is stored in backing \r\n\t * list at position index.\r\n\t * @param index position of the element\r\n\t * @return element\r\n\t */\r\n\tObject get(int index);\r\n\t/**\r\n\t * Inserts (does not overwrite) the given value \r\n\t * at the given position in list.\r\n\t * @param value\r\n\t * @param position\r\n\t */\r\n\tvoid insert(Object value, int position);\r\n\t/**\r\n\t * Searches the collection and returns the index \r\n\t * of the first occurrence of the given value or -1 \r\n\t * if the value is not found.\r\n\t * @param value list element\r\n\t * @return index\r\n\t */\r\n\tint indexOf(Object value);\r\n\t/**\r\n\t * Removes element at specified \r\n\t * index from collection.\r\n\t * @param index specified position\r\n\t */\r\n\tvoid remove(int index);\r\n\r\n}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic <T> List<T> getRecordList(String sqlID, Object object, int offset,\r\n\t\t\tint limit) throws DataAccessException {\n\t\treturn (List<T>) queryForList(sqlID, object, offset, limit);\r\n\t}", "public static void clientFunc(){\n List list = new ArrayList(); //rawtype list\n list.add(10);\n list.add(\"jenkins\");\n list.add(new Object());\n\n //unsafe classcast exception at runtime\n //rawtypes are unsafe\n List<String> stringList = list;\n\n ListIterator listIterator = list.listIterator();\n while(listIterator.hasNext()){\n System.out.println(listIterator.next());\n }\n }", "public interface DataSourceIterator extends Iterator<Data> {\n\n}", "List<T> getStoredData() { return null; }", "public interface MarshalBuffer\n{\n /**\n * @param key\n * key\n * @return DBRowColumnTypeReader\n * @see java.util.Map#containsKey(java.lang.Object)\n */\n boolean containsKey(Object key);\n\n /**\n * @return value\n */\n byte get();\n\n /**\n * @param dst\n * dst\n * @return value\n */\n ByteBuffer get(byte[] dst);\n\n /**\n * @param key\n * key\n * @return map\n * @see java.util.Map#get(java.lang.Object)\n */\n DBRowMapPair get(Object key);\n\n /**\n * @return value\n */\n boolean getBoolean(); // NOPMD\n\n /**\n * @return value\n */\n double getDouble();\n\n /**\n * @return value\n */\n int getInt();\n\n /**\n * @return value\n */\n long getLong();\n\n /**\n * @return value\n */\n int getNextSharedIndex();\n\n /**\n * @param index\n * index\n * @return value\n */\n PyBase getShared(int index);\n\n /**\n * @return value\n */\n short getShort(); // NOPMD\n\n /**\n * @throws IllegalOpCodeException\n * on wrong stream format\n */\n void initialize() throws IllegalOpCodeException;\n\n /**\n * @return value\n */\n int parentPosition();\n\n /**\n * @return value\n */\n byte peekByte();\n\n /**\n * @return value\n */\n int position();\n\n /**\n * @return value\n */\n boolean processed();\n\n /**\n * @param key\n * key\n * @param value\n * value\n * @return value\n * @see java.util.Map#put(java.lang.Object, java.lang.Object)\n */\n DBRowMapPair put(PyDBRowDescriptor key, DBRowMapPair value);\n\n /**\n * @param size\n * size\n * @return value\n */\n byte[] readBytes(int size);\n\n /**\n * @param index\n * index\n * @param pyBase\n * pyBase\n * @return value\n */\n PyBase setShared(int index, PyBase pyBase);\n}", "java.util.List<com.google.protobuf.ByteString> getDataList();", "java.util.List<com.google.protobuf.ByteString> getDataList();", "java.util.List<com.sanqing.sca.message.ProtocolDecode.SimpleData> \n getSimpleDataList();", "public PlanFormulateListAdapter(List<PlanListBean> data, Context context) {\n super(data);\n addItemType(PlanListBean.START, R.layout.cdqj_patrol_plan_my_start_item);\n addItemType(PlanListBean.OTHER, R.layout.cdqj_patrol_plan_my_other_item);\n this.context = context;\n }", "public ListNode(Object object, Class<?> componentType) {\n\t\t\tthis.converter = ConverterRegistry.getConverter();\n\t\t\tthis.list = (List<Object>) object;\n\t\t\tthis.componentType = componentType;\n\t\t}", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "public interface Data {\n\n int DATA_TYPE_HEADER = 1;\n int DATA_TYPE_ITEM = 2;\n\n String getData();\n void setData(String data);\n int getDataType();\n long getTime();\n}", "public DynArrayList(int capacity) {\n data = (E[]) new Object[capacity];\n }", "List<E> read();", "public ArrayList() {\n _size = 0;\n _store = (E[]) new Object[32];\n }", "@Override\r\n public ListDataProvider<QualityDataSetDTO> getListDataProvider() {\r\n return listDataProvider;\r\n }", "public ArrayList(int initialCapacity, int growthFactor) {\n\t\tthis.storedObjects = new Object[initialCapacity];\n\t\tthis.growthFactor = growthFactor;\n\t}", "abstract public long[] getBlockListAsLongs();", "public boolean isListLengthFixed();", "public List(ObjectProvider ownerOP, AbstractMemberMetaData mmd)\r\n {\r\n super(ownerOP, mmd);\r\n }", "protected abstract IList _listValue(IScope scope, IType contentsType, boolean cast);", "public interface DataLocator<E> {\n\n E getData(int readLocation);\n\n void setData(int writeLocation1, E value);\n\n void writeAll(E[] newData, int length);\n\n int getCapacity();\n}", "public abstract ArrayList<? extends Domain> read();", "int getListData(int list) {\n\t\treturn m_lists.getField(list, 5);\n\t}", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public java.util.List getData() {\r\n return data;\r\n }", "public interface DataAPI {\n\t// Query\n\tDataTree getDataHierarchy(); // Tree List of Data and Datatypes\n\t\n\tDataTree getDatatypeHierarchy(); // Tree List of Datatypes\n\n\tDataTree getMetricsHierarchy(); // Tree List of Metrics and Metric\n\t\t\t\t\t\t\t\t\t\t\t// types\n\n\tArrayList<String> getAllDatatypeIds();\n\n\tMetadataProperty getMetadataProperty(String propid);\n\n\tArrayList<MetadataProperty> getMetadataProperties(String dtypeid, boolean direct);\n\n\tArrayList<MetadataProperty> getAllMetadataProperties();\n\n\tDataItem getDatatypeForData(String dataid);\n\n\tArrayList<DataItem> getDataForDatatype(String dtypeid, boolean direct);\n\n\tString getTypeNameFormat(String dtypeid);\n\n\tString getDataLocation(String dataid);\n\n\tArrayList<MetadataValue> getMetadataValues(String dataid, ArrayList<String> propids);\n\n\t// Write\n\tboolean addDatatype(String dtypeid, String parentid);\n\n\tboolean removeDatatype(String dtypeid);\n\n\tboolean renameDatatype(String newtypeid, String oldtypeid);\n\n\tboolean moveDatatypeParent(String dtypeid, String fromtypeid, String totypeid);\n\n\tboolean addData(String dataid, String dtypeid);\n\n\tboolean renameData(String newdataid, String olddataid);\n\n\tboolean removeData(String dataid);\n\n\tboolean setDataLocation(String dataid, String locuri);\n\n\tboolean setTypeNameFormat(String dtypeid, String format);\n\n\tboolean addObjectPropertyValue(String dataid, String propid, String valid);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, Object val);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, String val, String xsdtype);\n\n\tboolean removePropertyValue(String dataid, String propid, Object val);\n\n\tboolean removeAllPropertyValues(String dataid, ArrayList<String> propids);\n\n\tboolean addMetadataProperty(String propid, String domain, String range);\n\t\n\tboolean addMetadataPropertyDomain(String propid, String domain);\n\n\tboolean removeMetadataProperty(String propid);\n\t\n\tboolean removeMetadataPropertyDomain(String propid, String domain);\n\n\tboolean renameMetadataProperty(String oldid, String newid);\n\n\t// Sync/Save\n\tboolean save();\n\t\n\tvoid end();\n\t\n\tvoid delete();\n}", "public interface ListReadOnly<T> {\n /**\n * Returns the number of elements in this list.\n *\n * @return The number of elements in this list.\n */\n\n public int size();\n\n\n /**\n * Returns the element at the specified position in this list.\n *\n * @param index Index of the element to return\n * @return The element at the specified position in this list.\n * @throws IndexOutOfBoundsException If the index is out of range\n * (<code>index &lt; 0 || index &gt;= size()</code>)\n */\n public T get(int index);\n}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic <T> List<T> getRecordList(String sqlID, Object object)\r\n\t\t\tthrows DataAccessException {\n\t\treturn (List<T>) queryForList(sqlID, object);\r\n\t}", "public XSListSimpleType asList() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: idiv \n // 1: laload \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- ------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/ListSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }" ]
[ "0.5966579", "0.5564986", "0.55541056", "0.5543258", "0.5518179", "0.5504835", "0.54486513", "0.5447147", "0.5418742", "0.54023093", "0.5390741", "0.53894204", "0.53614885", "0.5357563", "0.5347518", "0.5341324", "0.5331647", "0.5313442", "0.5276321", "0.5276061", "0.52727574", "0.52537394", "0.5240421", "0.5239302", "0.52289796", "0.5225492", "0.5199586", "0.5190923", "0.51908964", "0.517419", "0.51718444", "0.51449114", "0.514438", "0.51326215", "0.5132478", "0.51214856", "0.51192915", "0.5085086", "0.5076388", "0.5075491", "0.50741374", "0.5058202", "0.50488997", "0.5046552", "0.501811", "0.5008295", "0.500557", "0.5002337", "0.4994122", "0.49936834", "0.4993386", "0.49904442", "0.49893835", "0.49845022", "0.49761754", "0.4975295", "0.49739608", "0.4963617", "0.49578756", "0.49385926", "0.4937075", "0.4932529", "0.49254188", "0.49215588", "0.49196845", "0.49165663", "0.49141783", "0.48980618", "0.48922765", "0.48821044", "0.48819676", "0.4877266", "0.48694152", "0.48663777", "0.48602158", "0.48532748", "0.48532748", "0.4847705", "0.48429534", "0.48415923", "0.48415294", "0.48395962", "0.4837391", "0.48361388", "0.48335245", "0.48331028", "0.48249778", "0.48176658", "0.481557", "0.480856", "0.48080003", "0.47995764", "0.4797712", "0.47924203", "0.47656447", "0.47656447", "0.47590098", "0.47587225", "0.475797", "0.47567028", "0.47545785" ]
0.0
-1
MaskedDataSource Sometimes you want to compute on values from a data source that have a logical classification. If you build a boolean mask that is true where you are interested in the value you can build a MaskedDataSource and do you computations upon only that data. An example mask might be booleans describing which values in the original list are contained within a threshold value.
void example8() { // setup some data IndexedDataSource<Float64Member> list = ArrayStorage.allocate(G.DBL.construct(), 9); // fill it with random values Fill.compute(G.DBL, G.DBL.random(), list); // build a mask IndexedDataSource<BooleanMember> mask = nom.bdezonia.zorbage.storage.Storage.allocate( G.BOOL.construct(), new boolean[] {true, false, false, true, false, false, true, true, true}); // make the filter IndexedDataSource<Float64Member> maskedData = new MaskedDataSource<>(list, mask); // do some computations maskedData.size(); // equals 5 // 3rd value in the masked data = the 7th value of the original list Float64Member value = G.DBL.construct(); maskedData.get(3, value); // compute a value on data only where the mask is true in the original dataset Mean.compute(G.DBL, maskedData, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean isDataEnabled() {\n return (mask / 4) > 0;\n }", "private boolean preconditionsMaskBasedBf(String name, List<BooleanVariable> domain,\n boolean masksAreMinterms, List<Mask> masks, List<Mask> dontCareMasks) {\n return name != null && domain != null && masks != null && dontCareMasks != null;\n }", "public long getSourceMask()\r\n { return srcmask; }", "public void setContactFilter(short categoryBits, short groupIndex, short maskBits);", "void createUserCampaignMask(CampaignMask mask) throws DataAccessException;", "public InputFilter getPhoneMask() {\r\n\t\treturn new InputFilter() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {\r\n\t\t\t\tSystem.out.println(\"source = \" + source + \", start = \" + start + \", end = \" + end + \", dest = \" + dest + \", dstart = \" + dstart + \", dend = \" + dend);\r\n\r\n\t\t\t\tif (source.length() > 0) {\r\n\r\n\t\t\t\t\tif (!Character.isDigit(source.charAt(0)))\r\n\t\t\t\t\t\treturn \"\";\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tif ((dstart == 3) || (dstart == 7))\r\n\t\t\t\t\t\t\treturn \"-\" + source;\r\n\t\t\t\t\t\telse if (dstart >= 12)\r\n\t\t\t\t\t\t\treturn \"\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\t}", "public Mask(byte[] values, Set<Integer> indexes, boolean dontCare) {\r\n\r\n\t\tif (values == null || indexes == null) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"'null' value passed as argument.\");\r\n\t\t}\r\n\r\n\t\tthis.dontCare = dontCare;\r\n\t\tthis.indexes = Collections.unmodifiableSet(new TreeSet<>(indexes));\r\n\r\n\t\tthis.values = new byte[values.length];\r\n\t\tfor (int i = 0; i < values.length; i++) {\r\n\t\t\tthis.values[i] = values[i];\r\n\t\t}\r\n\r\n\t\tthis.maskHash = Arrays.hashCode(values);\r\n\t}", "public GeoMaskFilter(List<BoundingBox> suppressedBoundingBoxes) {\n this.suppressedBoundingBoxes = suppressedBoundingBoxes;\n\n Predicate<AisPacket> oredPredicates = null;\n\n for (BoundingBox bbox : suppressedBoundingBoxes) {\n if (oredPredicates == null) {\n oredPredicates = AisPacketFilters.filterOnMessagePositionWithin(bbox);\n } else {\n oredPredicates = oredPredicates.or(AisPacketFilters.filterOnMessagePositionWithin(bbox));\n }\n }\n\n this.blocked = oredPredicates;\n }", "@Override public Bitmap transform(Bitmap source) {\n int width = source.getWidth(); //Width of source\n int height = source.getHeight(); //Height of source\n\n Bitmap result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n\n Drawable mask = getMaskDrawable(mContext, mMaskId); //Init mask from resources\n\n //Using mask\n Canvas canvas = new Canvas(result);\n mask.setBounds(0, 0, width, height);\n mask.draw(canvas);\n canvas.drawBitmap(source, 0, 0, mMaskingPaint);\n\n source.recycle();\n\n //Return bitmap of cropped image\n return result;\n }", "public ShortProcessor distanceMap(ImageProcessor mask) {\n\n\t\t// size of image\n\t\twidth = mask.getWidth();\n\t\theight = mask.getHeight();\n\t\t\n\t\t// update mask\n\t\tthis.maskProc = mask;\n\n\t\t// create new empty image, and fill it with black\n\t\tbuffer = new ShortProcessor(width, height);\n\t\tbuffer.setValue(0);\n\t\tbuffer.fill();\n\t\t\n\t\t// initialize empty image with either 0 (background) or Inf (foreground)\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tint val = mask.get(i, j) & 0x00ff;\n\t\t\t\tbuffer.set(i, j, val == 0 ? 0 : backgroundValue);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Two iterations are enough to compute distance map to boundary\n\t\tforwardIteration();\n\t\tbackwardIteration();\n\n\t\t// Normalize values by the first weight\n\t\tif (this.normalizeMap) {\n\t\t\tfor (int i = 0; i < width; i++) {\n\t\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\t\tif (maskProc.getPixel(i, j) != 0) {\n\t\t\t\t\t\tbuffer.set(i, j, buffer.get(i, j) / weights[0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Compute max value within the mask\n\t\tshort maxVal = 0;\n\t\tfor (int i = 0; i < width; i++)\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tif (maskProc.getPixel(i, j) != 0)\n\t\t\t\t\tmaxVal = (short) Math.max(maxVal, buffer.get(i, j));\n\t\t\t}\n\n\t\t// calibrate min and max values of result imaeg processor\n\t\tbuffer.setMinAndMax(0, maxVal);\n\n\t\t// Forces the display to non-inverted LUT\n\t\tif (buffer.isInvertedLut())\n\t\t\tbuffer.invertLut();\n\t\t\n\t\treturn buffer;\n\t}", "public static Shader createMaskShader( String name,\n final float minMask,\n final float maxMask,\n final boolean sense ) {\n return new BasicShader( name, Color.GRAY ) {\n public void adjustRgba( float[] rgba, float value ) {\n if ( ( value > minMask && value < maxMask ) ^ sense ) {\n rgba[ 3 ] = 0;\n }\n }\n };\n }", "protected boolean[] getMask() {\n\t\treturn this.mask;\n\t}", "public BitSet getMask() {\r\n return mask;\r\n }", "public static ArrayList<String> properSubsetFromMask(ArrayList<String> set, boolean[] mask) {\n\t\tif(set.size() != mask.length) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\t\n\t\tint maskCount = 0;\n\t\t\n\t\t//This makes sure that a mask of all '1' values do not generate a subset equal to the original set\n\t\tfor(int i=0;i<mask.length;i++) {\n\t\t\tif(mask[i]) {\n\t\t\t\tmaskCount += 1;\n\t\t\t}\n\t\t}\n\t\tif(maskCount == mask.length) {\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<mask.length;i++) {\n\t\t\tif(mask[i]) {\n\t\t\t\tresult.add(set.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public List<CampaignMask> getCampaignMasks(\n\t\tCampaignMask.MaskId maskId,\n\t\tDateTime startDate,\n\t\tDateTime endDate,\n\t\tString assignerUserId,\n\t\tString assigneeUserId,\n\t\tString campaignId)\n\t\tthrows DataAccessException;", "IntExpression implicitMask(Expression p) {\n\t\treturn p.join(mask).sum();\n\t}", "int[][] applyMask(\n int[][] mask, int[][] pixelV);", "public List<Mask> getDontCareMasks() {\n return Collections.unmodifiableList(dontCareMasks);\n }", "public static int getWithMask(final int source, final int mask) {\n int target = 0;\n for (int sourcePosition = 0; sourcePosition < BYTE_LENGTH; sourcePosition++) {\n if (bitIsSet(mask, Bits.getBit(sourcePosition))) {\n target = setFlag(target, Bits.getBit(sourcePosition), bitIsSet(source, Bits.getBit(sourcePosition)));\n }\n }\n return target;\n }", "public MlibMinFilterOpImage(RenderedImage source,\n BorderExtender extender,\n Map config,\n ImageLayout layout,\n MinFilterShape maskType,\n int maskSize) {\n\tsuper(source,\n layout,\n config,\n true,\n extender,\n (maskSize-1)/2,\n (maskSize-1)/2,\n (maskSize/2),\n (maskSize/2));\n\t//this.maskType = mapToMlibMaskType(maskType);\n this.maskSize = maskSize;\n }", "public Boolean maskText();", "public Mask(int index, int numberOfVariables, boolean dontCare) {\r\n\r\n\t\tif (numberOfVariables < 1) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Number of variables has to be atleast 1.\");\r\n\t\t}\r\n\r\n\t\tthis.dontCare = dontCare;\r\n\t\tvalues = Util.indexToByteArray(index, numberOfVariables);\r\n\t\tmaskHash = values.hashCode();\r\n\r\n\t\tindexes = new TreeSet<>();\r\n\t\tindexes.add(index);\r\n\t\tindexes = Collections.unmodifiableSet(indexes);\r\n\t}", "public abstract Builder setOutputCategoryMask(boolean value);", "public BooleanStyleableFigureKey(String key, DirtyMask mask, Boolean defaultValue) {\n super(key, Boolean.class, mask, defaultValue);\n\n StyleablePropertyFactory<? extends Styleable> factory = new StyleablePropertyFactory<>(null);\n cssMetaData = factory.createBooleanCssMetaData(\n Figure.JHOTDRAW_CSS_PREFIX + getCssName(), s -> {\n StyleablePropertyBean spb = (StyleablePropertyBean) s;\n return spb.getStyleableProperty(this);\n });\n }", "@Test\n @Ignore\n public void testDTypeSpam() throws Exception {\n Random rnd = new Random();\n for(int i = 0; i < 100; i++) {\n DataTypeUtil.setDTypeForContext(DataBuffer.Type.FLOAT);\n float rand[] = new float[rnd.nextInt(10) + 1];\n for (int x = 0; x < rand.length; x++) {\n rand[x] = rnd.nextFloat();\n }\n Nd4j.getConstantHandler().getConstantBuffer(rand);\n\n int shape[] = new int[rnd.nextInt(3)+2];\n for (int x = 0; x < shape.length; x++) {\n shape[x] = rnd.nextInt(100) + 2;\n }\n\n DataTypeUtil.setDTypeForContext(DataBuffer.Type.DOUBLE);\n INDArray array = Nd4j.rand(shape);\n BooleanIndexing.applyWhere(array, Conditions.lessThan(rnd.nextDouble()), rnd.nextDouble());\n }\n }", "@SuppressWarnings(\"unused\")\n\tvoid example17() {\n\t\t\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// then create a new memory copy of those 2000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> theCopy = DeepCopy.compute(G.FLT, trimmed);\n\t}", "public List<Mask> getMasks() {\n return Collections.unmodifiableList(masks);\n }", "Boolean filterEnabled();", "public void updateOnMaskChange() {\n if(maskList != null) {\n int[] displayMaskData = resolveMasks();\n maskRaster.setDataElements(0, 0, imgWidth, imgHeight, displayMaskData);\n maskImage.setData(maskRaster);\n }\n }", "public static int storeUnderMask(final int template, final int mask, final int source) {\n int sourcePosition = 0;\n int target = template;\n for (int targetPosition = 0; targetPosition < BYTE_LENGTH; targetPosition++) {\n if (bitIsSet(mask, Bits.getBit(targetPosition))) {\n target = setFlag(target, Bits.getBit(targetPosition), bitIsSet(source, Bits.getBit(sourcePosition)));\n sourcePosition++;\n }\n }\n return target;\n }", "public static <T> T maskSpecialField(T target, List<String> fields) {\n if (Objects.isNull(target) /*|| CollectionUtils.isEmpty(fields)*/) {\n return target;\n }\n if (target instanceof Map) {\n return (T) maskForMap((Map) target, fields);\n }\n if (target instanceof List) {\n return (T) maskForList((List) target, fields);\n }\n if (target.getClass().isArray()) {\n return (T) maskForArray((Object[]) target, fields);\n }\n\n return maskForObject(target, fields);\n }", "public Map<String, Collection<CampaignMask>> getCampaignMasksForCampaigns(\n\t\t\tfinal String campaignSelectStmt,\n\t\t\tfinal Collection<Object> campaignSqlParameters,\n\t\t\tfinal MaskId maskId,\n\t\t\tfinal DateTime startDate,\n\t\t\tfinal DateTime endDate,\n\t\t\tfinal String assignerUserId,\n\t\t\tfinal String assigneeUserId)\n\t\t\tthrows DataAccessException;", "byte[] networkMask();", "@SuppressWarnings(\"unused\")\n\tvoid example15() {\n\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// the trimmed list has length 2,000 and is indexed from 0 to 1,999 returning data from\n\t\t// locations 1,000 - 2,999 in the original list.\n\t\t\n\t}", "MaskTree getMetadataProjectionMask();", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "public boolean isShapeMasked() {\n return this.shapeMasked;\n }", "public void setShapeMasked(boolean shapeMasked) {\n boolean oldShapeMasked = this.shapeMasked;\n this.shapeMasked = shapeMasked;\n propertyChangeSupport.firePropertyChange(\"shapeMasked\", oldShapeMasked, shapeMasked);\n }", "void setNetworkMask(byte[] networkMask);", "@Override\n\t\t\t public void getData(final int length) throws Exception {\n\t\t\t if (self.state.masked) {\n\t\t\t /*self.expectHeader(4, function(data) {\n\t\t\t var mask = data;\n\t\t\t self.expectData(length, function(data) {\n\t\t\t opcodes['1'].finish.call(self, mask, data);\n\t\t\t });\n\t\t\t });*/\n\t\t\t \t self.expectHeader(4, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n final byte[] mask = new byte[4]; ///data.array();\n mask[0] = data.get(0);\n mask[1] = data.get(1);\n mask[2] = data.get(2);\n mask[3] = data.get(3);\n \n Log.d(TAG, \"mask: \"+mask[0]+\" \"+mask[1]+\" \"+mask[2]+\" \"+mask[3]);\n\n self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onPacket(ByteBuffer data2) throws Exception {\n finish(mask, data2);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n \t\n });\n\t\t\t\t\t\t}\n\t\t\t \t\t \n\t\t\t \t });\n\t\t\t }\n\t\t\t else {\n\t\t\t /*self.expectData(length, function(data) {\n\t\t\t opcodes['1'].finish.call(self, null, data);\n\t\t\t });*/\n self.expectData(length, new PacketHandler(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onPacket(ByteBuffer data) throws Exception {\n finish(null, data);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n \t \n });\n\t\t\t }\n\t\t\t }", "public interface ScalarFilter extends Filter<Double, Double> {\n\n /**\n * Returns a filtered value of type Double from the specified value of type Double.\n * The method of filtering the specified value depends on\n * the implementation.\n *\n * @param value - specified value to filter\n * @return value filtered as type Double\n * @throws exception.NullValueException - if the input value is null\n * @throws exception.EmptyListException - if any lists under operation are empty\n * @throws exception.IncorrectSizeException - if any variable sizes are out of necessary operating range\n */\n public Double filter(Double value) throws NullValueException, EmptyListException, IncorrectSizeException;\n\n /**\n * Resets the scalar filter implementation with a Double value equivalent to zero.\n */\n public void reset();\n}", "public static void make(int x, int y, int d1, int d2) {\n\t\tmask[x][y] = 5;\n int add1=1, add2=1;\t\n \n//\t\tint row = x, col = y;\n//\t\tint width = d1, height = d2;\n\t\t\n while(add1 <= d1) {\n \tmask[x+add1][y-add1] = 5;\n \tadd1++;\n }\n while(add2 <= d2) {\n \tmask[x+add2][y+add2] = 5;\n \tadd2++;\n }\n \n add1=1;\n add2=1;\n while(add2 <= d2) {\n \tmask[x+d1+add2][y-d1+add2] = 5;\n \tadd2++;\n }\n while(add1 <= d1) {\n \tmask[x+d2+add1][y+d2-add1] = 5;\n \tadd1++;\n }\n \n //경계선과 경계선의 안에 포함되어있는 5번 선거구이다.\n for(int i=1; i<=N; i++) {\n \tint left=1; \n \tint right = N;\n \twhile(left <=N && mask[i][left] != 5)\n \t\tleft++;\n \twhile(right >=1 && mask[i][right] !=5 ) \n \t\tright--;\n \tif(left != right && left-right != N+1) {//left가 오른쪽 끝에 왔으면 n+1, right가 왼쪽끝에왔으면 0\n \t\tfor(int j=left+1; j<right; j++) { // 따라서 양쪽끝에있다면 n+1 - 0 = n+1\n \t\t\tmask[i][j]=5;\n \t\t}\n \t}\n }\n\t}", "public static int getMaskFor(final Target target, final ElementType...minus) {\n \tint m = 0;\n \tfor(ElementType et: target.value()) {\n \t\tm = m | ElementTypeMapping.valueOf(et.name()).mask;\n \t}\n \tfor(ElementType et: minus) {\n \t\tm = m & ~ElementTypeMapping.valueOf(et.name()).mask; \n \t}\n \treturn m;\n }", "private static native void niBlackThreshold_0(long _src_nativeObj, long _dst_nativeObj, double maxValue, int type, int blockSize, double k, int binarizationMethod);", "public static List<Mask> fromIndexes(final int domainSize, final int... indexes) {\n\n final int indexesCount = indexes.length;\n Mask[] masks = new Mask[indexesCount];\n\n for (int index = 0; index < indexesCount; index++) {\n masks[index] = Mask.fromIndex(domainSize, indexes[index]);\n }\n\n return Arrays.asList(masks);\n }", "public long getMask() {\r\n\t\treturn this.mask;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static DataSource createRasterData(DataSource data) {\n\t\tif (data == null) {\n\t\t\tthrow new NullPointerException(\"Cannot convert null data source.\");\n\t\t}\n\n\t\tDataTable coordsValueData =\n\t\t\tnew DataTable(Double.class, Double.class, Double.class);\n\n\t\t// Generate pixel data with (x, y, value)\n\t\tStatistics stats = data.getStatistics();\n\t\tdouble min = stats.get(Statistics.MIN);\n\t\tdouble max = stats.get(Statistics.MAX);\n\t\tdouble range = max - min;\n\t\tint i = 0;\n\t\tfor (Comparable<?> cell : data) {\n\t\t\tint x = i%data.getColumnCount();\n\t\t\tint y = -i/data.getColumnCount();\n\t\t\tdouble v = Double.NaN;\n\t\t\tif (cell instanceof Number) {\n\t\t\t\tNumber numericCell = (Number) cell;\n\t\t\t\tv = (numericCell.doubleValue() - min) / range;\n\t\t\t}\n\t\t\tcoordsValueData.add((double) x, (double) y, v);\n\t\t\ti++;\n\t\t}\n\t\treturn coordsValueData;\n\t}", "public Function<Matcher, String> getApplyMaskFn() {\n return applyMaskFn;\n }", "void setResultMaskBoundary(Long resultMaskBoundary);", "void setClip(Boolean[][] clip)\n {\n this.clip = clip;\n }", "List<Trueorfalse> selectByExample(RowBounds rowBounds);", "public static int mask(int start, int size) {\r\n // Checks that start and size form a valid bit range\r\n checkArgument(start >= 0 && start <= Integer.SIZE && size >= 0\r\n && size <= Integer.SIZE && start + size <= Integer.SIZE);\r\n\r\n // Creating a value whose binary representation has size 1s as its\r\n // LSBs (1L is used instead of 1 to bypass the int\r\n // type's bit shifting limit)\r\n int unshiftedMask = (int) (1L << size) - 1;\r\n\r\n // Shifting those 1s to the correct position\r\n return unshiftedMask << start;\r\n }", "public void setShortMask(short[] mask) {\r\n newShortMask = mask;\r\n }", "public void setMask(BitSet imageMask) {\r\n mask = imageMask;\r\n }", "public boolean[][] fillMask(boolean arr[][]) {\r\n\t\tfor (int i = 0; i < arr.length; i++) {\r\n\t\t\tfor (int j = 0;j < arr[0].length; j++) {\r\n\t\t\t\tarr[i][j] = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}", "public void createThresholdNOptMask(String optThresholdFile, String notUsingThresholdNFile,\n\t\t\tString usingThresholdNFile, String resultFile) throws Exception {\n\t\tHdf5Helper hdf = Hdf5Helper.getInstance();\n\t\tHdf5HelperData hthresholdOpt = hdf.readDataSetAll(optThresholdFile, getEqualisationLocation()\n\t\t\t\t.getLocationForOpen(), THRESHOLD_0OPT, true);\n\t\tHdf5HelperData hthresholdNotUsingThresholdN = hdf.readDataSetAll(notUsingThresholdNFile,\n\t\t\t\tgetEqualisationLocation().getLocationForOpen(), THRESHOLD_DATASET, true);\n\t\tHdf5HelperData hthresholdUsingThresholdN = hdf.readDataSetAll(usingThresholdNFile, getEqualisationLocation()\n\t\t\t\t.getLocationForOpen(), THRESHOLD_DATASET, true);\n\t\tif (hthresholdUsingThresholdN.dims.length != hthresholdNotUsingThresholdN.dims.length)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"hthresholdUsingThresholdN.dims.length!=hthresholdNotUsingThresholdN.dims.length\");\n\n\t\tif (hthresholdOpt.dims.length != 2)\n\t\t\tthrow new IllegalArgumentException(\"hthresholdOpt.dims.length!=2\");\n\t\tlong totalHeight = hthresholdNotUsingThresholdN.dims[0];\n\t\tlong totalWidth = hthresholdNotUsingThresholdN.dims[1];\n\t\tshort[] notUsingThresholdN = (short[]) hthresholdNotUsingThresholdN.data;\n\t\tshort[] usingThresholdN = (short[]) hthresholdUsingThresholdN.data;\n\t\tshort[] mask = new short[(int) (totalHeight * totalWidth)];\n\n\t\tint numChipsRows = (int) hthresholdOpt.dims[0];\n\t\tint numChipsAcross = (int) hthresholdOpt.dims[1];\n\n\t\tChipSet chipset = new ChipSet(numChipsRows, numChipsAcross);\n\n\t\tfor (Chip chip : chipset.getChips()) {\n\t\t\tdouble thresholdOpt = Array.getDouble(hthresholdOpt.data, chip.index);\n\t\t\tIterator<Long> iterator = chip.getPixelIndexIterator();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tlong index = iterator.next();\n\t\t\t\tshort using = usingThresholdN[(int) index];\n\t\t\t\tshort notusing = notUsingThresholdN[(int) index];\n\t\t\t\tshort maskVal = 0;\n\t\t\t\tif (thresholdEdgePosIsValid(using) && thresholdEdgePosIsValid(notusing))\n\t\t\t\t\tmaskVal = (short) (Math.abs(thresholdOpt - using) < Math.abs(thresholdOpt - notusing) ? 16 : 0);\n\t\t\t\telse if (thresholdEdgePosIsValid(using))\n\t\t\t\t\tmaskVal = 16;\n\t\t\t\telse if (thresholdEdgePosIsValid(notusing))\n\t\t\t\t\tmaskVal = 0;\n\t\t\t\tmask[(int) index] = maskVal;\n\t\t\t}\n\n\t\t}\n\n\t\tHdf5HelperData hmask = new Hdf5HelperData(hthresholdNotUsingThresholdN.dims, mask);\n\t\thdf.writeToFileSimple(hmask, resultFile, getEqualisationLocation(), THRESHOLDA);\n\n\t}", "public static WritableImage maskImage(WritableImage image, WritableImage mask) {\n\t\tWritableImage result = new WritableImage((int)image.getWidth(), (int)image.getHeight());\n\t\tPixelWriter writer = result.getPixelWriter();\n\t\tPixelReader imagePixels = image.getPixelReader();\n\t\tPixelReader maskPixels = mask.getPixelReader();\n\t\t\n\t\tfor (int y = 0; y < image.getHeight(); y ++) {\n\t\t\tfor (int x = 0; x < image.getWidth(); x ++) {\n\t\t\t\tColor imageColor = imagePixels.getColor(x, y);\n\t\t\t\tdouble value = Math.min(imageColor.getOpacity(),\n\t\t\t\t\t\tmaskPixels.getColor(x, y).getOpacity());\n\t\t\t\tColor color = new Color(imageColor.getRed(), imageColor.getGreen(),\n\t\t\t\t\t\timageColor.getBlue(), value);\n\t\t\t\twriter.setColor(x, y, color);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public WavelengthMask getMask() {\r\n\t\treturn this.mask;\r\n\t}", "public void setBitSetMask(BitSet mask) {\r\n newMask = mask;\r\n }", "Long getResultMaskBoundary();", "public void setMaskstatus(java.lang.String maskstatus) {\n this.maskstatus = maskstatus;\n }", "void setSampleFiltering(boolean filterFlag, float cutoffFreq) {\n }", "private List<MaskValue> maskAsList(Mask m) {\n List<MaskValue> mList = new ArrayList<>();\n for (int i = 0, maskLen = m.getSize(); i < maskLen; i++) {\n\n mList.add(m.getValue(i));\n }\n\n return mList;\n }", "public String evaluate(final int testedMask, final String src, final String value) {\n String checkedValue = value;\n if (\"\".equals(value) && hasDefaultValue()) {\n checkedValue = defaultValue;\n }\n \n if (hasFlag(testedMask)) {\n return replace(src, checkedValue);\n }\n return src;\n }", "public Grid filterSmallValues(int threshold) {\n\t\n\t\tassert(threshold > 0);\n\t\t\n\t\tint[][] newGrid = new int[width()][height()];\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tif (Math.abs(valueAt(i, j)) < threshold) {\n\t\t\t\t\tnewGrid[i][j] = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewGrid[i][j] = valueAt(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Grid(newGrid);\n\t}", "@Override\n public void setFilterBitmap(boolean filter) {\n patternDrawable.setFilterBitmap(filter);\n super.setFilterBitmap(filter);\n }", "public String maskedValue(PropertyValue value, String val, String result) {\n\t\t\n\t\tBigInteger intValue = parse(value, val);\n\t\tBigInteger resultValue = parse(value, result);\n\t\t\n\t\tintValue = intValue.shiftLeft(value.shift());\n\t\tBigInteger maskedValue = resultValue.and(value.mask().not());\n\t\tmaskedValue = maskedValue.or(intValue);\n\t\tInteger maskedVal = maskedValue.intValue();\n\t\t\n\t\treturn String.format(\"%0\" + value.size() + \"X\", maskedVal);\n\t}", "public interface AvatarMask {\n public void drawMask(Canvas canvas, int bk_color);\n}", "Boolean[][] getClip()\n {\n return clip;\n }", "private void m6550c(Canvas canvas) {\n Bitmap maskBitmap = getMaskBitmap();\n if (maskBitmap != null) {\n canvas.clipRect(this.f5078o, this.f5079p, this.f5078o + maskBitmap.getWidth(), this.f5079p + maskBitmap.getHeight());\n super.dispatchDraw(canvas);\n canvas.drawBitmap(maskBitmap, (float) this.f5078o, (float) this.f5079p, this.f5068e);\n }\n }", "default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }", "static Nda<Boolean> of( boolean... value ) { return Tensor.of( Boolean.class, Shape.of( value.length ), value ); }", "public static int computeViewMaskFromConfig(OwXMLUtil configNode, String nodeName, String showFlagAttribute, int maskBit, boolean defaultShowValue) throws OwException\r\n {\r\n\r\n try\r\n {\r\n OwXMLUtil subUtil = configNode.getSubUtil(nodeName);\r\n\r\n if (subUtil != null)\r\n {\r\n if (subUtil.getSafeBooleanAttributeValue(showFlagAttribute, defaultShowValue))\r\n {\r\n return maskBit;\r\n }\r\n }\r\n\r\n return 0;\r\n }\r\n catch (Exception e)\r\n {\r\n throw new OwConfigurationException(\"Invalid configuration of node \" + nodeName, e);\r\n }\r\n }", "public BitSet getBitSetMask() {\r\n return newMask;\r\n }", "@SuppressWarnings(\"unused\")\n\tvoid example5() {\n\t\t\n\t\t// allocate a list\n\t\t\n\t\tIndexedDataSource<UnsignedInt10Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT10.construct(), 100000);\n\t\t\n\t\t// fill it with something\n\t\t\n\t\tFill.compute(G.UINT10, G.UINT10.random(), list);\n\t\t\n\t\t// then make the condition \"value is less than 44\"\n\t\t\n\t\tFunction1<Boolean,UnsignedInt10Member> lessThan44 = new Function1<Boolean,UnsignedInt10Member>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic Boolean call(UnsignedInt10Member value) {\n\n\t\t\t\treturn value.v() < 44;\n\t\t\t}\n\t\t};\n\t\t\n\t\t// get a view of all values that satisfy this\n\t\t\n\t\tIndexedDataSource<UnsignedInt10Member> conditionalList =\n\t\t\t\tnew ConditionalDataSource<UnsignedInt10Algebra, UnsignedInt10Member>(\n\t\t\t\t\t\tG.UINT10, list, lessThan44);\n\t\t\n\t\t// count how many values satisfy this constraint\n\t\t\n\t\tlong count = conditionalList.size();\n\n\t\t// now get soem values that satisy the condition\n\t\t\n\t\tUnsignedInt10Member value = G.UINT10.construct();\n\t\t\n\t\tGetV.first(conditionalList, value);\n\t\t\n\t\t// try to set the values to something else\n\t\t\n\t\tvalue.setV(22);\n\t\t\n\t\t// this succeeds since 22 < 44 and satisfies the condition\n\t\t\n\t\tSetV.first(conditionalList, value);\n\t\t\n\t\tvalue.setV(99);\n\t\t\n\t\t// this fails since 99 >= 44 and does not satisfy the condition\n\t\t// an exception will be thrown\n\t\t\n\t\tSetV.first(conditionalList, value);\n\t}", "@Test\n public void testMaskPreserveGroup() {\n SSNUSMaskingProviderConfig configuration = new SSNUSMaskingProviderConfig();\n configuration.setMaskPreserveAreaNumber(false);\n MaskingProvider maskingProvider = new SSNUSMaskingProvider(configuration);\n SSNUSIdentifier identifier = new SSNUSIdentifier();\n\n String ssn = \"123-54-9876\";\n String maskedValue = maskingProvider.mask(ssn);\n SSNUS ssnUS = identifier.parseSSNUS(ssn);\n SSNUS maskedUS = identifier.parseSSNUS(maskedValue);\n\n assertFalse(maskedValue.equals(ssn));\n assertTrue(identifier.isOfThisType(maskedValue));\n assertFalse(\"Masked value:\" + maskedValue, maskedValue.startsWith(\"123\"));\n assertTrue(ssnUS.getGroup().equals(maskedUS.getGroup()));\n }", "public boolean getPinValue() {\n boolean ret = false;\n for (Boolean val : sourceBlocks.values())\n ret = ret | val;\n \n return ret;\n }", "public int[] meanMaxMin_thresh(int[] src, int width, int height, int size,\n int con) {\n\n i_w = width;\n i_h = height;\n src_1d = new int[i_w * i_h];\n dest_1d = new int[i_w * i_h];\n int mean = 0;\n int max, min;\n int[] values = new int[size * size];\n src_1d = src;\n int[][] tmp_2d = new int[i_w][i_h];\n\n //First convert input array from 1_d to 2_d for ease of processing\n for (int i = 0; i < i_w; i++) {\n for (int j = 0; j < i_h; j++) {\n tmp_2d[i][j] = src_1d[i + (j * i_w)] & 0x000000ff;\n }\n }\n\n int tmp;\n\n //Now find the max and min of values in the size X size neigbourhood\n for (int j = 0; j < i_h; j++) {\n for (int i = 0; i < i_w; i++) {\n mean = 0;\n max = tmp_2d[i][j];\n min = tmp_2d[i][j];\n //Check the local neighbourhood\n for (int k = 0; k < size; k++) {\n for (int l = 0; l < size; l++) {\n try {\n tmp = tmp_2d[(i - ((int) (size / 2)) + k)]\n [(j - ((int) (size / 2)) + l)];\n if (tmp > max) {\n max = tmp;\n }\n if (tmp < min) {\n min = tmp;\n }\n }\n //If out of bounds then ignore pixel\n catch (ArrayIndexOutOfBoundsException e) {\n // TODO: eliminate this\n }\n }\n }\n //Find the mean value\n\n tmp = max + min;\n tmp = tmp / 2;\n mean = tmp - con;\n\n //Threshold below the mean\n if (tmp_2d[i][j] >= mean) {\n dest_1d[i + (j * i_w)] = 0xffffffff;\n } else {\n dest_1d[i + (j * i_w)] = 0xff000000;\n }\n }\n }\n return dest_1d;\n }", "public LayerMask duplicate(Layer master) {\n BufferedImage maskImageCopy = ImageUtils.copyImage(image);\n\n LayerMask d = new LayerMask(comp, maskImageCopy, master, false);\n d.setTranslation(getTX(), getTY());\n\n return d;\n }", "public static int computeViewMaskFromConfig(OwXMLUtil configNode_p, String strNodeName_p, int iMaskBit_p)\r\n {\r\n // delegate to same method with default value 'false'\r\n return computeViewMaskFromConfig(configNode_p, strNodeName_p, iMaskBit_p, false);\r\n }", "public static List<Mask> fromIndexes(int size, int ... indexes) {\n\t\tif(indexes == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tList<Mask> masks = new ArrayList<Mask>();\n\t\tfor(int index : indexes) {\n\t\t\tif(index >= 1 << size || index < 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"Index must be less than (1 << size) and index must not be negative\");\n\t\t\t}\n\t\t\tMaskValue[] values = new MaskValue[size];\n\t\t\tfor(int j = size - 1; j >= 0; --j) {\n\t\t\t\tif(index % 2 == 0) {\n\t\t\t\t\tvalues[j] = MaskValue.ZERO;\n\t\t\t\t} else {\n\t\t\t\t\tvalues[j] = MaskValue.ONE;\n\t\t\t\t}\n\t\t\t\tindex >>= 1;\n\t\t\t}\n\t\t\tmasks.add(new Mask(values));\n\t\t}\n\t\treturn masks;\n\t}", "public List<com.psygate.minecraft.spigot.sovereignty.banda.db.model.tables.pojos.BandaProtection> fetchByProtectIpRangeBan(Boolean... values) {\n\t\treturn fetch(BandaProtection.BANDA_PROTECTION.PROTECT_IP_RANGE_BAN, values);\n\t}", "MaskTree getProjectionMask();", "public Mat getSkinMask(Mat sourceMat){\n Mat skinMask = new Mat();\n if(!isCalibrated) {\n skinMask = Mat.zeros(sourceMat.rows(), sourceMat.cols(), CvType.CV_8UC1);\n return skinMask;\n }\n Mat hsvInput = new Mat();\n Imgproc.cvtColor(sourceMat,hsvInput,Imgproc.COLOR_RGB2HSV);\n Core.inRange(hsvInput , new Scalar(hLowThreshold, sLowThreshold, vLowThreshold), new Scalar(hHighThreshold, sHighThreshold, vHighThreshold),skinMask);\n performOpening(skinMask, MORPH_ELLIPSE, new Size(3, 3));\n Imgproc.dilate(skinMask, skinMask, new Mat(),new Point(-1, -1), 3);\n return skinMask;\n\n }", "private void decorateBitmap() {\n\n RectF roundedRect = new RectF(2, 2, mBitmap.getWidth() - 2, mBitmap.getHeight() - 2);\n float cornerRadius = mBitmap.getHeight() * CORNER_RADIUS_SIZE;\n\n // Alpha canvas with white rounded rect\n Bitmap maskBitmap = Bitmap.createBitmap(mBitmap.getWidth(), mBitmap.getHeight(),\n Bitmap.Config.ARGB_8888);\n Canvas maskCanvas = new Canvas(maskBitmap);\n maskCanvas.drawColor(Color.TRANSPARENT);\n Paint maskPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n maskPaint.setColor(Color.BLACK);\n maskPaint.setStyle(Paint.Style.FILL);\n maskCanvas.drawRoundRect(roundedRect, cornerRadius, cornerRadius, maskPaint);\n\n Paint paint = new Paint();\n paint.setFilterBitmap(false);\n\n // Draw mask onto mBitmap\n Canvas canvas = new Canvas(mBitmap);\n\n paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));\n canvas.drawBitmap(maskBitmap, 0, 0, paint);\n\n // Now re-use the above bitmap to do a shadow.\n paint.setXfermode(null);\n\n maskBitmap.recycle();\n }", "MaskTree getPagingProjectionMask();", "protected void computeRect(Raster[] sources,\n WritableRaster dest,\n Rectangle destRect) {\n Raster source = sources[0];\n Rectangle srcRect = mapDestRect(destRect, 0);\n \n int formatTag = MediaLibAccessor.findCompatibleTag(sources,dest);\n \n MediaLibAccessor srcAccessor =\n new MediaLibAccessor(source,srcRect,formatTag);\n MediaLibAccessor dstAccessor =\n new MediaLibAccessor(dest,destRect,formatTag);\n int numBands = getSampleModel().getNumBands();\n \n\n int cmask = (1 << numBands) -1; \n mediaLibImage[] srcML = srcAccessor.getMediaLibImages();\n mediaLibImage[] dstML = dstAccessor.getMediaLibImages();\n for (int i = 0; i < dstML.length; i++) {\n switch (dstAccessor.getDataType()) {\n case DataBuffer.TYPE_BYTE:\n case DataBuffer.TYPE_USHORT:\n case DataBuffer.TYPE_SHORT:\n case DataBuffer.TYPE_INT:\n if (maskSize == 3) {\n // Call appropriate Medialib accelerated function\n Image.MinFilter3x3(dstML[i], srcML[i]);\n } else if (maskSize == 5) {\n // Call appropriate Medialib accelerated function\n Image.MinFilter5x5(dstML[i], srcML[i]);\n } else if (maskSize == 7) {\n // Call appropriate Medialib accelerated function\n Image.MinFilter7x7(dstML[i], srcML[i]);\n } \n\n break;\n case DataBuffer.TYPE_FLOAT:\n case DataBuffer.TYPE_DOUBLE:\n if (maskSize == 3) {\n // Call appropriate Medialib accelerated function\n Image.MinFilter3x3_Fp(dstML[i], srcML[i]);\n } else if (maskSize == 5) {\n // Call appropriate Medialib accelerated function\n Image.MinFilter5x5_Fp(dstML[i], srcML[i]);\n } else if (maskSize == 7) {\n // Call appropriate Medialib accelerated function\n Image.MinFilter7x7_Fp(dstML[i], srcML[i]);\n } \n break;\n default:\n String className = this.getClass().getName();\n throw new RuntimeException(JaiI18N.getString(\"Generic2\"));\n }\n }\n \n if (dstAccessor.isDataCopy()) {\n dstAccessor.copyDataToRaster();\n }\n }", "public final native static AlphaMaskFilter create(BaseJso alphaMask) /*-{\r\n\t\treturn new createjs.AlphaMapFilter(alphaMask);\r\n\t}-*/;", "public Hdf5HelperData getThresholdFromScanData(int threshold, int sizeOfSlice, String scanFilename,\n\t\t\tString groupName, short[] threshold0ValsAsInt, String dataSetNameDetector) throws Exception {\n\n\t\tHdf5HelperLazyLoader loader = new Hdf5HelperLazyLoader(scanFilename, groupName, dataSetNameDetector, false);\n\t\tILazyDataset dataset = loader.getLazyDataSet();\n\t\tint[] shape = dataset.getShape();\n\t\tint[] stop = dataset.getShape();\n\t\tint[] start = new int[stop.length];\n\t\tfor (int i = 0; i < shape.length; i++) {\n\t\t\tstart[i] = 0;\n\t\t\tstop[i] = shape[i];\n\t\t}\n\t\tstart[shape.length - 2] = 0;\n\t\tstop[shape.length - 2] = sizeOfSlice;\n\n\t\tshort[] edgeThresholds = new short[shape[1] * shape[2]];\n\t\tint iEdgeThresholdProcessed = 0;\n\t\twhile (start[shape.length - 2] < shape[shape.length - 2]) {\n\t\t\tIDataset slice = dataset.getSlice(null, start, stop, null);\n\t\t\tif (!(slice instanceof ShortDataset))\n\t\t\t\tthrow new Exception(\"data is not of type ShortDataset\");\n\t\t\tShortDataset ds = ((ShortDataset) slice);\n\t\t\tshort[] edgeThresholdsSlice = getThresholdFromSliceofScanData((short[]) ds.getBuffer(), ds.getShape(),\n\t\t\t\t\tnull, threshold, 0, false, threshold0ValsAsInt);\n\t\t\tSystem.arraycopy(edgeThresholdsSlice, 0, edgeThresholds, iEdgeThresholdProcessed,\n\t\t\t\t\tedgeThresholdsSlice.length);\n\t\t\tstart[shape.length - 2] = Math.min(start[shape.length - 2] + sizeOfSlice, shape[shape.length - 2]);\n\t\t\tstop[shape.length - 2] = Math.min(stop[shape.length - 2] + sizeOfSlice, shape[shape.length - 2]);\n\t\t\tiEdgeThresholdProcessed += shape[2] * sizeOfSlice;\n\t\t}\n\t\treturn new Hdf5HelperData(new long[] { shape[1], shape[2] }, edgeThresholds);\n\t}", "public Builder setReadMask(com.google.protobuf.FieldMask value) {\n if (readMaskBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n readMask_ = value;\n } else {\n readMaskBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000100;\n onChanged();\n return this;\n }", "public ModifiedMAGIXExplanationMapper() {\n this(\n (index, ruleExplanationSet) ->\n (!(ruleExplanationSet.getCoverAsBitmap().contains(index))),\n false,\n (r) -> true,\n (ruleExplanationSet) ->\n (ruleExplanationSet.getNumberCoveredInstances() ==\n ruleExplanationSet.getDataset().getNumberRows())\n );\n }", "public String applyMask( String stringToMask ) {\n Pattern p = Pattern.compile( getMatchRegex() );\n Matcher m = p.matcher( stringToMask );\n String maskedResult = applyMaskFn.apply( m );\n return maskedResult == null ? stringToMask : \n stringToMask.substring( 0, m.start( 1 ) )\n + maskedResult\n + stringToMask.substring( m.end() );\n }", "public abstract boolean canClip();", "public static void main (String[] args) throws FitsException, IOException, ClassNotFoundException {\n inFits = FileLoader.loadFits(ImageDataTest.class , fileName);\n frArray = FitsRead.createFitsReadArray(inFits);\n rangeValues = FitsRead.getDefaultRangeValues();\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n BufferedImage bufferedImage = imageData.getImage(frArray);\n File outputfile = new File(FileLoader.getDataPath(ImageDataTest.class)+\"imageDataTest.png\");\n ImageIO.write(bufferedImage, \"png\", outputfile);\n\n\n\n //test ImageData with mask\n imageData = new ImageData(frArray, IMAGE_TYPE,imageMasks,rangeValues, 0,0, 100, 100, true );\n bufferedImage = imageData.getImage(frArray);\n outputfile = new File(FileLoader.getDataPath(ImageDataTest.class)+\"imageDataWithMaskTest.png\");\n ImageIO.write(bufferedImage, \"png\", outputfile);\n\n }", "public BitSet floodFill2DBitSet() {\r\n\r\n int xDim = dims[0];\r\n int yDim = dims[1];\r\n Point pt;\r\n Point tempPt;\r\n Stack<Point> stack = new Stack<Point>();\r\n int indexY;\r\n int x, y;\r\n\r\n if (mask.get((seed2DPt.y * xDim) + seed2DPt.x)) {\r\n stack.push(seed2DPt);\r\n mask.clear((seed2DPt.y * xDim) + seed2DPt.x);\r\n\r\n while (!stack.empty()) {\r\n pt = (Point) stack.pop();\r\n x = pt.x;\r\n y = pt.y;\r\n indexY = y * xDim;\r\n\r\n newMask.set(indexY + x);\r\n\r\n if ((x + 1) < xDim) {\r\n\r\n if (mask.get(indexY + x + 1)) {\r\n tempPt = new Point(x + 1, y);\r\n stack.push(tempPt);\r\n mask.clear(indexY + tempPt.x);\r\n }\r\n }\r\n\r\n if ((x - 1) >= 0) {\r\n\r\n if (mask.get(indexY + x - 1)) {\r\n tempPt = new Point(x - 1, y);\r\n stack.push(tempPt);\r\n mask.clear(indexY + tempPt.x);\r\n }\r\n }\r\n\r\n if ((y + 1) < yDim) {\r\n\r\n if (mask.get(((y + 1) * xDim) + x)) {\r\n tempPt = new Point(x, y + 1);\r\n stack.push(tempPt);\r\n mask.clear((tempPt.y * xDim) + x);\r\n }\r\n }\r\n\r\n if ((y - 1) >= 0) {\r\n\r\n if (mask.get(((y - 1) * xDim) + x)) {\r\n tempPt = new Point(x, y - 1);\r\n stack.push(tempPt);\r\n mask.clear((tempPt.y * xDim) + x);\r\n }\r\n }\r\n }\r\n }\r\n\r\n setCompleted(true);\r\n\r\n return newMask;\r\n }", "default DiscreteSet2D pointsSatisfying(DoublePredicate condition) {\r\n\t\treturn (x, y) -> condition.test(getValueAt(x, y));\r\n\t}", "public abstract Builder setOutputConfidenceMasks(boolean value);", "public java.lang.String getMaskplan() {\n return maskplan;\n }", "public void updateMask(WavelengthMask aMask) {\r\n\t\tif (mask == null) { //Not initialized\r\n\t\t\tmask = (WavelengthMask) aMask.clone();\r\n\t\t} else {\r\n\t\t\tmask.updateMask(aMask);\r\n\t\t}\r\n\t}", "private List<List<MaskValue>> possibleMasks(List<MaskValue> maskList) {\n // End of recursion: last element of mask, be it 'x' or empty.\n if (maskList == null || !maskList.contains(MaskValue.DONT_CARE)) {\n List<List<MaskValue>> ret = new ArrayList<>();\n ret.add(maskList);\n return ret;\n }\n // List to store all possible values.\n List<List<MaskValue>> possible = new ArrayList<>();\n // List for temporary computations.\n List<MaskValue> newMaskValues = new ArrayList<>();\n\n for (int i = 0, maskLen = maskList.size(); i < maskLen; i++) {\n\n // If value is don't care, make a copy of list with that element\n // changed with one and zero values and then enters the recursion\n // searching for other don't cares.\n if (maskList.get(i) == MaskValue.DONT_CARE) {\n\n List<MaskValue> additionalMaskList = copyMaskValueList(newMaskValues);\n additionalMaskList.add(MaskValue.ONE);\n additionalMaskList.addAll(copyMaskValueList(maskList.subList(i + 1, maskLen)));\n\n // Enter the recursion with one as changed element.\n possible.addAll(possibleMasks(additionalMaskList));\n\n additionalMaskList = copyMaskValueList(newMaskValues);\n additionalMaskList.add(MaskValue.ZERO);\n additionalMaskList.addAll(copyMaskValueList(maskList.subList(i + 1, maskLen)));\n\n // Enter the recursion with zero as changed element.\n possible.addAll(possibleMasks(additionalMaskList));\n\n return possible;\n } else {\n newMaskValues.add(maskList.get(i));\n }\n\n }\n return null;\n }" ]
[ "0.50413805", "0.49749509", "0.49614212", "0.49151254", "0.48945603", "0.4833253", "0.48264217", "0.4748134", "0.47379592", "0.47297236", "0.47169283", "0.4712976", "0.4683341", "0.46657154", "0.46538535", "0.4649533", "0.4606284", "0.4605105", "0.46007994", "0.45953873", "0.4593505", "0.45699757", "0.4553188", "0.45318082", "0.45281658", "0.45272398", "0.44868177", "0.4485074", "0.44801953", "0.44383577", "0.4438357", "0.4426322", "0.4417183", "0.439926", "0.43884355", "0.43879265", "0.4359712", "0.43596745", "0.43581173", "0.433666", "0.4309647", "0.4308409", "0.43064845", "0.4303381", "0.4303323", "0.4303081", "0.42978403", "0.42850056", "0.42634207", "0.42575067", "0.42559624", "0.42513934", "0.42503706", "0.42499757", "0.42282668", "0.42261374", "0.4207349", "0.41951844", "0.41723254", "0.41719133", "0.41620696", "0.41593018", "0.41513973", "0.4148216", "0.4140447", "0.41209963", "0.41147482", "0.4107208", "0.41040894", "0.40973425", "0.40879422", "0.40763122", "0.40722132", "0.40629157", "0.4062106", "0.40592575", "0.40555438", "0.40551928", "0.4049675", "0.40364864", "0.40250564", "0.40200806", "0.40114045", "0.4011356", "0.4007347", "0.400295", "0.40029368", "0.40014064", "0.39941418", "0.39873803", "0.39809346", "0.39797488", "0.39792097", "0.39757612", "0.397361", "0.39731923", "0.39730948", "0.39660126", "0.39628875", "0.39606372" ]
0.6386276
0
ProcedureDataSource A ProcedureDataSource can be used to treat a mathematical or tabulated function as a source of data. One could define a Procedure that returns values from a table or from some computation and then wrap it and pass it to all the algorithms Zorbage provides.
void example9() { // an uninteresting procedure we will calculate values from Procedure2<Long,UnsignedInt12Member> proc = new Procedure2<Long, UnsignedInt12Member>() { @Override public void call(Long a, UnsignedInt12Member b) { b.setV((int) (long) a); } }; // the ProcedureDataSource we will query IndexedDataSource<UnsignedInt12Member> list = new ProcedureDataSource<>(proc); // limit how much data to consider since procedures have a nearly unlimited x axis range IndexedDataSource<UnsignedInt12Member> fixedList = new FixedSizeDataSource<>(1000, list); // then calculate some values UnsignedInt12Member value = G.UINT12.construct(); Sum.compute(G.UINT12, fixedList, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected Map<String, List<ProcedureParamSrc>> loadProcedures(String databaseName) throws SQLException {\n\t\t Map<String, List<ProcedureParamSrc>> ret=new HashMap<>();\n\t\t Map<String, StringBuffer> textMap=new HashMap<>();\n\t\tString sql=\"SELECT NAME,TEXT FROM ALL_SOURCE WHERE TYPE='PROCEDURE' \"\n\t\t\t\t+ \"and OWNER='\"+databaseName.toUpperCase()+\"'\"\n\t\t\t\t;\n\t\tsql+=\" order by NAME,LINE asc\";\n try(PreparedStatement preparedStatement= connection.prepareStatement(sql);\n \t\tResultSet resultSet=preparedStatement.executeQuery();){\n\t\twhile(resultSet.next()) {\n\t\t String key=resultSet.getString(1)\n\t\t\t\t ,line=resultSet.getString(2)\n\t\t\t\t ;\n\t\t StringBuffer sbr=textMap.get(key);\n\t\t if(sbr==null) {\n\t\t\t sbr=new StringBuffer(\"\");\n\t\t\t textMap.put(key, sbr);\n\t\t\t \n\t\t }\n\t\t if(line.contains(\"--\")) {\n\t\t\t line=line.substring(0,line.indexOf(\"--\"));\n\t\t\t line.replace(\"\\n\", \"\");\n\t\t }\n\t\t sbr.append(line);\n\t\t}\n }\n \n for(Entry<String, StringBuffer> ent:textMap.entrySet()) {\n \t\n \tList<ProcedureParamSrc> paramSrcs=ret.get(ent.getKey());\n \t\n \tString procName=ent.getKey();\n \tif(paramSrcs==null) {\n \t\tparamSrcs=new ArrayList<>();\n \t\tret.put(procName, paramSrcs);\n \t}\n \t\n \tString text=ent.getValue().toString(),t=text.toLowerCase(),p=\"\";\n \tint s=0,e=0;\n \ts=t.indexOf(procName.toLowerCase())+procName.length();\n \tt=t.substring(s);\n \t\n \t\n \ts=t.indexOf(\"(\");\n \t\n \tif(s>=0&&s<5) {\n \t s++;\n \t \n \t \n \t e=t.indexOf(\")\");\n \t\n \t \n \t \n \t p=t.substring(s,e-1);\n \t}\n \t\n \t\n \t\n \tString[] params=p.split(\",\");\n \tfor(String param: params) {\n \t\t// (is_used OUT number, data_ratio OUT number, clob_rest OUT clob)\n if(param.trim().length()==0)continue;\n \t\tString[] subParams=param.trim().split(\" \");\n \t\t\n \t\tObject[] _params= Stream.of(subParams)\n \t\t\t\t.filter(str->!str.isEmpty()).toArray();\n \t\t\n \t\t//System.out.println(param);\n \t\tString name=_params[0].toString().trim()\n \t\t\t\t,io=\"in\"\n \t\t\t\t,type=\"varchar2\"\n \t\t\t\t;\n \t\tif(_params.length==3) {\n \t\t\tio=_params[1].toString().trim();\n \t\ttype=_params[2].toString().trim();\n \t\t}\n \t\tProcedureParamSrc src=new ProcedureParamSrc();\n \t\tsrc.isOutput=io.toUpperCase().equals(\"out\");\n \t\tsrc.paramName=name;\n \t\tif(\"number\".equals(type)) {\n \t\t\tsrc.sqlType=Types.DOUBLE;\n \t\tsrc.cls=Double.class;\n \t\t}\n \t\telse if(\"date\".equals(type)) {\n \t\t\tsrc.sqlType=Types.DATE;\n \t\tsrc.cls=Date.class;\n \t\t}else {\n \t\t\tsrc.sqlType=Types.VARCHAR;\n \t\tsrc.cls=String.class;\n \t\t}\n \t\t\n \t\tparamSrcs.add(src);\n \t}\n \t\n }\n\t\t\n\t\t\n\t\treturn ret;\n\t}", "public static CallMetaDataProvider createMetaDataProvider(DataSource dataSource, CallMetaDataContext context)\r\n/* 22: */ {\r\n/* 23: */ try\r\n/* 24: */ {\r\n/* 25: 71 */ (CallMetaDataProvider)JdbcUtils.extractDatabaseMetaData(dataSource, new DatabaseMetaDataCallback()\r\n/* 26: */ {\r\n/* 27: */ public Object processMetaData(DatabaseMetaData databaseMetaData)\r\n/* 28: */ throws SQLException, MetaDataAccessException\r\n/* 29: */ {\r\n/* 30: 73 */ String databaseProductName = JdbcUtils.commonDatabaseName(databaseMetaData.getDatabaseProductName());\r\n/* 31: 74 */ boolean accessProcedureColumnMetaData = CallMetaDataProviderFactory.this.isAccessCallParameterMetaData();\r\n/* 32: 75 */ if (CallMetaDataProviderFactory.this.isFunction())\r\n/* 33: */ {\r\n/* 34: 76 */ if (!CallMetaDataProviderFactory.supportedDatabaseProductsForFunctions.contains(databaseProductName))\r\n/* 35: */ {\r\n/* 36: 77 */ if (CallMetaDataProviderFactory.logger.isWarnEnabled()) {\r\n/* 37: 78 */ CallMetaDataProviderFactory.logger.warn(databaseProductName + \" is not one of the databases fully supported for function calls \" + \r\n/* 38: 79 */ \"-- supported are: \" + CallMetaDataProviderFactory.supportedDatabaseProductsForFunctions);\r\n/* 39: */ }\r\n/* 40: 81 */ if (accessProcedureColumnMetaData)\r\n/* 41: */ {\r\n/* 42: 82 */ CallMetaDataProviderFactory.logger.warn(\"Metadata processing disabled - you must specify all parameters explicitly\");\r\n/* 43: 83 */ accessProcedureColumnMetaData = false;\r\n/* 44: */ }\r\n/* 45: */ }\r\n/* 46: */ }\r\n/* 47: 88 */ else if (!CallMetaDataProviderFactory.supportedDatabaseProductsForProcedures.contains(databaseProductName))\r\n/* 48: */ {\r\n/* 49: 89 */ if (CallMetaDataProviderFactory.logger.isWarnEnabled()) {\r\n/* 50: 90 */ CallMetaDataProviderFactory.logger.warn(databaseProductName + \" is not one of the databases fully supported for procedure calls \" + \r\n/* 51: 91 */ \"-- supported are: \" + CallMetaDataProviderFactory.supportedDatabaseProductsForProcedures);\r\n/* 52: */ }\r\n/* 53: 93 */ if (accessProcedureColumnMetaData)\r\n/* 54: */ {\r\n/* 55: 94 */ CallMetaDataProviderFactory.logger.warn(\"Metadata processing disabled - you must specify all parameters explicitly\");\r\n/* 56: 95 */ accessProcedureColumnMetaData = false;\r\n/* 57: */ }\r\n/* 58: */ }\r\n/* 59: */ CallMetaDataProvider provider;\r\n/* 60: */ CallMetaDataProvider provider;\r\n/* 61:101 */ if (\"Oracle\".equals(databaseProductName))\r\n/* 62: */ {\r\n/* 63:102 */ provider = new OracleCallMetaDataProvider(databaseMetaData);\r\n/* 64: */ }\r\n/* 65: */ else\r\n/* 66: */ {\r\n/* 67: */ CallMetaDataProvider provider;\r\n/* 68:104 */ if (\"DB2\".equals(databaseProductName))\r\n/* 69: */ {\r\n/* 70:105 */ provider = new Db2CallMetaDataProvider(databaseMetaData);\r\n/* 71: */ }\r\n/* 72: */ else\r\n/* 73: */ {\r\n/* 74: */ CallMetaDataProvider provider;\r\n/* 75:107 */ if (\"Apache Derby\".equals(databaseProductName))\r\n/* 76: */ {\r\n/* 77:108 */ provider = new DerbyCallMetaDataProvider(databaseMetaData);\r\n/* 78: */ }\r\n/* 79: */ else\r\n/* 80: */ {\r\n/* 81: */ CallMetaDataProvider provider;\r\n/* 82:110 */ if (\"PostgreSQL\".equals(databaseProductName))\r\n/* 83: */ {\r\n/* 84:111 */ provider = new PostgresCallMetaDataProvider(databaseMetaData);\r\n/* 85: */ }\r\n/* 86: */ else\r\n/* 87: */ {\r\n/* 88: */ CallMetaDataProvider provider;\r\n/* 89:113 */ if (\"Sybase\".equals(databaseProductName))\r\n/* 90: */ {\r\n/* 91:114 */ provider = new SybaseCallMetaDataProvider(databaseMetaData);\r\n/* 92: */ }\r\n/* 93: */ else\r\n/* 94: */ {\r\n/* 95: */ CallMetaDataProvider provider;\r\n/* 96:116 */ if (\"Microsoft SQL Server\".equals(databaseProductName)) {\r\n/* 97:117 */ provider = new SqlServerCallMetaDataProvider(databaseMetaData);\r\n/* 98: */ } else {\r\n/* 99:120 */ provider = new GenericCallMetaDataProvider(databaseMetaData);\r\n/* 100: */ }\r\n/* 101: */ }\r\n/* 102: */ }\r\n/* 103: */ }\r\n/* 104: */ }\r\n/* 105: */ }\r\n/* 106:122 */ if (CallMetaDataProviderFactory.logger.isDebugEnabled()) {\r\n/* 107:123 */ CallMetaDataProviderFactory.logger.debug(\"Using \" + provider.getClass().getName());\r\n/* 108: */ }\r\n/* 109:125 */ provider.initializeWithMetaData(databaseMetaData);\r\n/* 110:126 */ if (accessProcedureColumnMetaData) {\r\n/* 111:127 */ provider.initializeWithProcedureColumnMetaData(\r\n/* 112:128 */ databaseMetaData, CallMetaDataProviderFactory.this.getCatalogName(), CallMetaDataProviderFactory.this.getSchemaName(), CallMetaDataProviderFactory.this.getProcedureName());\r\n/* 113: */ }\r\n/* 114:130 */ return provider;\r\n/* 115: */ }\r\n/* 116: */ });\r\n/* 117: */ }\r\n/* 118: */ catch (MetaDataAccessException ex)\r\n/* 119: */ {\r\n/* 120:135 */ throw new DataAccessResourceFailureException(\"Error retreiving database metadata\", ex);\r\n/* 121: */ }\r\n/* 122: */ }", "ProcedureCall createProcedureCall();", "public void tweakProcedure(Procedure proc) {\n }", "public ImagingStudy setProcedure(java.util.List<CodingDt> theValue) {\n\t\tmyProcedure = theValue;\n\t\treturn this;\n\t}", "DoubleDataSource apply(DoubleDataSource input, String param);", "public void setProcedure(String Procedure) {\n this.Procedure = Procedure;\n }", "ProcedureDecl createProcedureDecl();", "public Sql[] generateSql(CreateProcedureStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {\n throw new UnexpectedLiquibaseException(CREATE_PROCEDURE_VALIDATION_ERROR);\n }", "public SelectCXLCQuincenalSP(DataSource dataSource) {\n super(dataSource, SP_GENERA_CXLC_QUINCENAL);\n \n declareParameter(new SqlParameter(\"CICLO_IN\", Types.INTEGER)); // 4\n declareParameter(new SqlParameter(\"HP_QNA_PAGO_IN\", Types.INTEGER)); //8\n declareParameter(new SqlParameter(\"ID_TIPO_NOMINA_IN\", Types.VARCHAR)); // 12\n declareParameter(new SqlParameter(\"HP_NUM_COMPLE_IN\", Types.VARCHAR)); //12\n declareParameter(new SqlParameter(\"USUARIO_IN\", Types.VARCHAR)); //12\n \n declareParameter(new SqlOutParameter(\"RET_VAL_OUT\", Types.INTEGER)); //2\n compile();\n }", "public void visitProcedureNode(DeclNode.ProcedureNode node) {\n beginGen(\"Procedure\");\n // Generate code for the block\n Code code = visitBlockNode(node.getBlock());\n code.generateOp(Operation.RETURN);\n procedures.addProcedure(node.getProcEntry(), code);\n endGen(\"Procedure\");\n }", "protected JdbcProcedure() throws ProcedureException {\n defaults.set(BINDING_DB, Bindings.CONNECTION, \"\",\n \"The JDBC connection identifier.\");\n defaults.set(BINDING_SQL, Bindings.DATA, \"\",\n \"The SQL text, optionally containing arguments with \" +\n \"a ':' prefix.\");\n defaults.set(BINDING_FLAGS, Bindings.DATA, \"\",\n \"Optional execution flags, currently '[no-]metadata', \" +\n \"'[no-]column-names', '[no-]native-types', \" +\n \"'[no-]binary-data' and 'single-row' are supported.\");\n defaults.seal();\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void demo1() {\n\n\t\tConnection con = null;\n\t\t\n\t\ttry {\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"scott\",\"tiger\");\n\n\t\t\tCallableStatement cs = con.prepareCall(\"CALL p1()\");\n\t\t\tcs.execute();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//DbUtils.closeConnection();\n\t\t}\n\n\t}", "public void setDataSource(BasicDataSource dataSource) {\n this.dataSource = dataSource;\n }", "public interface DataSource<T> {\n\t/**\n\t * open data source.\n\t */\n\tpublic void open();\n\t/**\n\t * Get the next data object.\n\t * @return data object.\n\t */\n\tpublic T next();\n\t/**\n\t * move vernier to head.\n\t * @return\n\t */\n\tpublic void head();\n\t/**\n\t * close data source.\n\t */\n\tpublic void close();\n\t/**\n\t * get attributes. \n\t * @return\n\t */\n\tpublic Map<String, Object> attributes();\n}", "public void setDataSource( DataSource dataSource) {\n\t\tthis.dataSource = dataSource;\n\t}", "ParameterSource createParameterSource();", "public void setProcedureName(String procedureName){\n this.procedureName = procedureName;\n }", "public abstract SqlParameterSource getSqlParameterSource();", "public final EObject ruleProcedure() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n Token otherlv_3=null;\n Token otherlv_6=null;\n EObject lv_params_4_0 = null;\n\n EObject lv_ins_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2411:28: ( (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:1: (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:1: (otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure' )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2412:3: otherlv_0= 'procedure' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= 'with' otherlv_3= 'Params' ( (lv_params_4_0= ruleParameters ) ) ( (lv_ins_5_0= ruleInstructions ) )+ otherlv_6= 'endProcedure'\n {\n otherlv_0=(Token)match(input,55,FOLLOW_55_in_ruleProcedure5003); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getProcedureAccess().getProcedureKeyword_0());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2416:1: ( (lv_name_1_0= RULE_ID ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2417:1: (lv_name_1_0= RULE_ID )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2417:1: (lv_name_1_0= RULE_ID )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2418:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleProcedure5020); \n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getProcedureAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getProcedureRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,20,FOLLOW_20_in_ruleProcedure5037); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getProcedureAccess().getWithKeyword_2());\n \n otherlv_3=(Token)match(input,56,FOLLOW_56_in_ruleProcedure5049); \n\n \tnewLeafNode(otherlv_3, grammarAccess.getProcedureAccess().getParamsKeyword_3());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2442:1: ( (lv_params_4_0= ruleParameters ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2443:1: (lv_params_4_0= ruleParameters )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2443:1: (lv_params_4_0= ruleParameters )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2444:3: lv_params_4_0= ruleParameters\n {\n \n \t newCompositeNode(grammarAccess.getProcedureAccess().getParamsParametersParserRuleCall_4_0()); \n \t \n pushFollow(FOLLOW_ruleParameters_in_ruleProcedure5070);\n lv_params_4_0=ruleParameters();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getProcedureRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"params\",\n \t\tlv_params_4_0, \n \t\t\"Parameters\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2460:2: ( (lv_ins_5_0= ruleInstructions ) )+\n int cnt34=0;\n loop34:\n do {\n int alt34=2;\n int LA34_0 = input.LA(1);\n\n if ( ((LA34_0>=16 && LA34_0<=19)||(LA34_0>=21 && LA34_0<=22)||LA34_0==24||LA34_0==35||LA34_0==40||(LA34_0>=48 && LA34_0<=53)||LA34_0==55) ) {\n alt34=1;\n }\n\n\n switch (alt34) {\n \tcase 1 :\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2461:1: (lv_ins_5_0= ruleInstructions )\n \t {\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2461:1: (lv_ins_5_0= ruleInstructions )\n \t // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2462:3: lv_ins_5_0= ruleInstructions\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getProcedureAccess().getInsInstructionsParserRuleCall_5_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleInstructions_in_ruleProcedure5091);\n \t lv_ins_5_0=ruleInstructions();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getProcedureRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"ins\",\n \t \t\tlv_ins_5_0, \n \t \t\t\"Instructions\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt34 >= 1 ) break loop34;\n EarlyExitException eee =\n new EarlyExitException(34, input);\n throw eee;\n }\n cnt34++;\n } while (true);\n\n otherlv_6=(Token)match(input,57,FOLLOW_57_in_ruleProcedure5104); \n\n \tnewLeafNode(otherlv_6, grammarAccess.getProcedureAccess().getEndProcedureKeyword_6());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "@Test\n\tpublic void testProcedure() {\n\t\tString sql =\"{call queryNameAndJobAndSal(?,?,?,?)}\";\n\t\tConnection conn=null;\n\t\tCallableStatement call=null;\n\t\ttry {\n\t\t\tconn=JDBCUtil.getConnect();\n\t\t\tcall=conn.prepareCall(sql);\n\t\t\t\n\t\t\t//给输入参数赋值\n\t\t\tcall.setInt(1, 3333);\n\t\t\t//申明输出参数\n\t\t\tcall.registerOutParameter(2, OracleTypes.VARCHAR);\n\t\t\tcall.registerOutParameter(3, OracleTypes.NUMBER);\n\t\t\tcall.registerOutParameter(4, OracleTypes.VARCHAR);\n\t\t\t\n\t\t\t//执行调用\n\t\t\tcall.execute();\n\t\t\t//取数结果\n\t\t\tString name=call.getString(2);\n\t\t\tString sal=call.getString(3);\n\t\t\tString job=call.getString(4);\n\t\t\tSystem.out.println(name);\n\t\t\tSystem.out.println(sal);\n\t\t\tSystem.out.println(job);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tJDBCUtil.release(conn, call, null);\n\t\t}\n\t}", "@Override\n\tpublic List<Component> caseProcedure(Procedure procedure) {\n\t\tsuper.caseProcedure(procedure);\n\t\treturn componentList;\n\t}", "public interface IResultSetCallback\n{\n\t/**\n\t * Callback method to notify of result set for a provided stored\n\t * procedure name\n\t *\n\t * @param rs\n\t * @param sSQLStatementExecuted\n\t * @return Collection of 2 ArrayLists...see class description for format\n\t * @exception ResultSetCallbackException\n\t */\n public Collection notifyResultSet( ResultSet rs, String sSQLStatementExecuted )\n throws ResultSetCallbackException;\n}", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource dataSource) {\n\t\tthis.dataSource = dataSource;\n\t}", "public EODataSource queryDataSource();", "public interface DataSource {\n\n Report getSalaryReport(String departmentId, LocalDate dateFrom, LocalDate dateTo);\n\n}", "@Override\n\tpublic void setDataSource(DataSource dataSource) {\n\t}", "public TemporaryDataSource(DataSource dataSource){\n\t\tthis.ds = dataSource;\n\t}", "private DataStore getColumns(String catalog, String schema, PGProcName procname)\n throws SQLException\n {\n String sql =\n \"SELECT format_type(p.prorettype, NULL) as formatted_type, \\n\" +\n \" t.typname as pg_type, \\n\" +\n \" coalesce(array_to_string(proallargtypes, ';'), array_to_string(proargtypes, ';')) as argtypes, \\n\" +\n \" array_to_string(p.proargnames, ';') as argnames, \\n\" +\n \" array_to_string(p.proargmodes, ';') as modes, \\n\" +\n \" t.typtype \\n\" +\n \"FROM pg_catalog.pg_proc p \\n\" +\n \" JOIN pg_catalog.pg_namespace n ON p.pronamespace = n.oid \\n\" +\n \" JOIN pg_catalog.pg_type t ON p.prorettype = t.oid \\n\" +\n \"WHERE n.nspname = ? \\n\" +\n \" AND p.proname = ? \\n\";\n\n DataStore result = createProcColsDataStore();\n\n Savepoint sp = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n\n String oids = procname.getInputOIDs();\n\n if (StringUtil.isNonBlank(oids))\n {\n sql += \" AND p.proargtypes = cast('\" + oids + \"' as oidvector)\";\n }\n\n LogMgr.logMetadataSql(new CallerInfo(){}, \"procedure columns\", sql, schema, procname.getName());\n\n try\n {\n sp = connection.setSavepoint();\n\n stmt = this.connection.getSqlConnection().prepareStatement(sql);\n stmt.setString(1, schema);\n stmt.setString(2, procname.getName());\n\n rs = stmt.executeQuery();\n if (rs.next())\n {\n String typeName = rs.getString(\"formatted_type\");\n String pgType = rs.getString(\"pg_type\");\n String types = rs.getString(\"argtypes\");\n String names = rs.getString(\"argnames\");\n String modes = rs.getString(\"modes\");\n String returnTypeType = rs.getString(\"typtype\");\n\n // pgAdmin II distinguishes functions from procedures using only the \"modes\" information\n // the driver uses the returnTypeType as well\n boolean isFunction = (returnTypeType.equals(\"b\") || returnTypeType.equals(\"d\") || (returnTypeType.equals(\"p\") && modes == null));\n\n if (isFunction)\n {\n int row = result.addRow();\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_COL_NAME, \"returnValue\");\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_RESULT_TYPE, \"RETURN\");\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_JDBC_DATA_TYPE, getJavaType(pgType));\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_DATA_TYPE, StringUtil.trimQuotes(typeName));\n }\n\n List<String> argNames = StringUtil.stringToList(names, \";\", true, true);\n List<String> argTypes = StringUtil.stringToList(types, \";\", true, true);\n if (modes == null)\n {\n modes = types.replaceAll(\"[0-9]+\", \"i\");\n }\n List<String> argModes = StringUtil.stringToList(modes, \";\", true, true);\n\n List<ColumnIdentifier> columns = convertToColumns(argNames, argTypes, argModes);\n\n for (ColumnIdentifier col : columns)\n {\n int row = result.addRow();\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_RESULT_TYPE, col.getArgumentMode());\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_JDBC_DATA_TYPE, col.getDataType());\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_DATA_TYPE, col.getDbmsType());\n result.setValue(row, ProcedureReader.COLUMN_IDX_PROC_COLUMNS_COL_NAME, col.getColumnName());\n }\n }\n else\n {\n LogMgr.logWarning(new CallerInfo(){}, \"No columns returned for procedure: \" + procname.getName(), null);\n return super.getProcedureColumns(catalog, schema, procname.getName(), null);\n }\n\n connection.releaseSavepoint(sp);\n }\n catch (Exception e)\n {\n connection.rollback(sp);\n LogMgr.logMetadataError(new CallerInfo(){}, e, \"procedure columns\", sql, schema, procname.getName());\n return super.getProcedureColumns(catalog, schema, procname.getName(), null);\n }\n finally\n {\n SqlUtil.closeAll(rs, stmt);\n }\n return result;\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "public R visit(Procedure n) {\n R _ret=null;\n coming_from_stmt_list=0;\n coming_from_procedure=1;\n String s0 = (String)n.f0.accept(this);\n coming_from_stmt_list=0; \n n.f1.accept(this);\n String s2 = (String)n.f2.accept(this);\n System.out.println(\" [ \"+s2+\" ] \");\n System.out.println(\"BEGIN\");\n n.f3.accept(this);\n String s4 = (String)n.f4.accept(this);\n System.out.println(\"RETURN \"+s4);\n System.out.println(\"END\");\n return _ret;\n }", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "public void setDatasource(DataSource source) {\n datasource = source;\n }", "public void process(String pathname) {\n\t\tFile file = new File( pathname );\n\t\tString filename = file.getName();\n\t\tString source = filename.substring( 5, filename.length()-19 );\n\t\tSQLDataSourceDescriptor dsd = sqlDataSourceHandler.getDataSourceDescriptor(source);\n\t\tif (dsd == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\treturn;\n\t\t}\n\t\tSQLDataSource ds = null;\n\t\tVDXSource vds = null;\n\t\ttry {\n\t\t\tObject ods = dsd.getSQLDataSource();\n\t\t\tif (ods != null) {\n\t\t\t\tds = dsd.getSQLDataSource();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t}\n\t\t\n\t\tint defaultRank = 0;\n\t\tint lineLen1, lineLen2;\n\t\tif ( ds != null ) {\n\t\t\t// This is an SQL DataSource\n\t\t\t\n\t\t\t// Build map of channels\n\t\t\tchannelMap = new HashMap<String, Integer>();\n\t\t\tfor ( Channel ch: ds.defaultGetChannelsList(false) )\n\t\t\t\tchannelMap.put( ch.getCode(), ch.getCID() );\n\t\t\tlogger.info( \"Channels mapped: \" + channelMap.size() );\n\t\t\t\n\t\t\t// Build map of columns\n\t\t\tcolumnMap = new HashMap<String, Integer>();\n\t\t\tfor ( Column col: ds.defaultGetColumns(true,ds.getMenuColumnsFlag()) )\n\t\t\t\tcolumnMap.put( col.name, col.idx );\n\t\t\tlogger.info( \"Columns mapped: \" + columnMap.size() );\n\t\t\t\n\t\t\t// Build map of ranks\n\t\t\trankMap = new HashMap<String, Integer>();\n\t\t\tfor ( String rk: ds.defaultGetRanks() ) {\n\t\t\t\tString rkBits[] = rk.split(\":\");\n\t\t\t\tint id = Integer.parseInt(rkBits[0]);\n\t\t\t\trankMap.put( rkBits[1], id );\n\t\t\t\tif ( rkBits[3].equals(\"1\") )\n\t\t\t\t\tdefaultRank = id;\n\t\t\t}\n\t\t\tlogger.info( \"Ranks mapped: \" + rankMap.size() );\n\t\t\t\n\t\t\t// Set limits on # args per input line\n\t\t\tlineLen1 = 7;\n\t\t\tlineLen2 = 9;\n\t\t\t\n\t\t\t// Build map of supp data types\n\t\t\tsdtypeMap = new HashMap<String, Integer>();\n\t\t\tfor ( SuppDatum sdt: ds.getSuppDataTypes() )\n\t\t\t\tsdtypeMap.put( sdt.typeName, sdt.tid );\n\t\t\tlogger.info( \"Suppdata types mapped: \" + sdtypeMap.size() );\n\t\t\t\n\t\t} else {\n\t\t\t// It isn't a SQL datasource; try it as a Winston datasource\n\t\t\tDataSourceDescriptor vdsd = dataSourceHandler.getDataSourceDescriptor(source);\n\t\t\ttry {\n\t\t\t\tvds = (VDXSource)vdsd.getDataSource();\n\t\t\t\tif ( vds == null ) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (Exception e2) {\n\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Build map of channels\n\t\t\tchannelMap = new HashMap<String, Integer>();\n\t\t\tfor ( gov.usgs.winston.Channel ch: vds.getChannels().getChannels() )\n\t\t\t\tchannelMap.put( ch.getCode(), ch.getSID() );\n\t\t\tlogger.info( \"Channels mapped: \" + channelMap.size() );\n\t\t\t\n\t\t\t// Set limits on # args per input line\n\t\t\tlineLen1 = lineLen2 = 7;\n\n\t\t\t// Build map of supp data types\n\t\t\tsdtypeMap = new HashMap<String, Integer>();\n\t\t\ttry {\n\t\t\t\tfor ( SuppDatum sdt: vds.getSuppDataTypes() )\n\t\t\t\t\tsdtypeMap.put( sdt.typeName, sdt.tid );\n\t\t\t\tlogger.info( \"Suppdata types mapped: \" + sdtypeMap.size() );\n\t\t\t} catch (Exception e3) {\n\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (problem reading supplemental data types)\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Access the input file\n\t\tResourceReader rr = ResourceReader.getResourceReader(pathname);\n\t\tif (rr == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (resource is invalid)\");\n\t\t\treturn;\n\t\t}\n\t\t// move to the first line in the file\n\t\tString line\t\t= rr.nextLine();\n\t\tint lineNumber\t= 0;\n\n\t\t// check that the file has data\n\t\tif (line == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (resource is empty)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tlogger.info(\"importing: \" + filename);\n\t\t\n\t\tSuppDatum sd = new SuppDatum();\n\t\tint success = 0;\n\t\t\n\t\t// we are now at the first row of data. time to import!\n\t\tString[] valueArray = new String[lineLen2];\n\t\twhile (line != null) {\n\t\t\tlineNumber++;\n\t\t\t// Build up array of values in this line\n\t\t\t// First, we split it by quotes\n\t\t\tString[] quoteParts = line.split(\"'\", -1);\n\t\t\tif ( quoteParts.length % 2 != 1 ) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", mismatched quotes\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Next, walk through those parts, splitting those outside of matching quotes by comma\n\t\t\tint valueArrayLength = 0;\n\t\t\tboolean ok = true;\n\t\t\tfor ( int j=0; ok && j<quoteParts.length; j+=2 ) {\n\t\t\t\tString[] parts = quoteParts[j].split(\",\", -1);\n\t\t\t\tint k, k1 = 1, k2 = parts.length-1;\n\t\t\t\tboolean middle = true;\n\t\t\t\tif ( j==0 ) { // section before first quote\n\t\t\t\t\tmiddle = false;\n\t\t\t\t\tif ( parts.length > 1 && parts[0].trim().length() == 0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", leading comma\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tk1 --;\n\t\t\t\t} \n\t\t\t\tif ( j==quoteParts.length-1 ) { // section after last quote\n\t\t\t\t\tmiddle = false;\n\t\t\t\t\tif ( parts.length > 1 && parts[parts.length-1].trim().length() == 0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", trailing comma\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tk2++;\n\t\t\t\t}\n\t\t\t\tif ( middle ) {\n\t\t\t\t\tif ( parts.length == 1 ){\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma between quotes\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( parts[0].trim().length()!=0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma after a quote\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( parts[parts.length-1].trim().length()!=0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma before a quote\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor ( k=k1; ok && k<k2; k++ ) {\n\t\t\t\t\tif ( valueArrayLength == lineLen2 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too many elements\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalueArray[valueArrayLength++] = parts[k];\n\t\t\t\t}\n\t\t\t\tif ( j+1 < quoteParts.length ) {\n\t\t\t\t\tif ( valueArrayLength == lineLen2 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too many elements\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalueArray[valueArrayLength++] = quoteParts[j+1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Line has been parsed; get next one\n\t\t\tline\t= rr.nextLine();\n\t\t\tif ( !ok )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// Validate & unmap arguments\n\t\t\tif ( valueArrayLength < lineLen1 ) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too few elements (\" + valueArrayLength + \")\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.cid = channelMap.get( valueArray[3].trim() );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", unknown channel: '\" + valueArray[3] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.st = Double.parseDouble( valueArray[1].trim() );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", invalid start time: '\" + valueArray[1] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tString et = valueArray[2].trim();\n\t\t\t\tif ( et.length() == 0 )\n\t\t\t\t\tsd.et = Double.MAX_VALUE;\n\t\t\t\telse\n\t\t\t\t\tsd.et = Double.parseDouble( et );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", invalid end time: '\" + valueArray[2] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.typeName = valueArray[4].trim();\n\t\t\t\tInteger tid = sdtypeMap.get( sd.typeName );\n\t\t\t\tif ( tid == null ) {\n\t\t\t\t\tsd.color = \"000000\";\n\t\t\t\t\tsd.dl = 1;\n\t\t\t\t\tsd.tid = -1;\n\t\t\t\t} else\n\t\t\t\t\tsd.tid = tid;\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", couldn't create type: '\" + valueArray[4] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( ds != null ) {\n\t\t\t\tif ( valueArrayLength > lineLen1 ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsd.colid = columnMap.get( valueArray[7].trim() );\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", unknown column: '\" + valueArray[7] + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ( valueArrayLength < lineLen2 ) {\n\t\t\t\t\t\tsd.rid = defaultRank;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsd.rid = rankMap.get( valueArray[8].trim() );\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", unknown rank: '\" + valueArray[8] + \"'\");\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsd.colid = -1;\n\t\t\t\t\tsd.rid = -1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsd.colid = -1;\n\t\t\t\tsd.rid = -1;\n\t\t\t}\n\t\t\tsd.name = valueArray[5].trim();\n\t\t\tsd.value = valueArray[6].trim();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsd.sdid = Integer.parseInt( valueArray[0] );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", unknown id: '\" + valueArray[0] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Finally, insert/update the data\n\t\t\ttry {\n\t\t\t\tif ( ds != null ) {\n\t\t\t\t\tif ( sd.tid == -1 ) {\n\t\t\t\t\t\tsd.tid = ds.insertSuppDataType( sd );\n\t\t\t\t\t\tif ( sd.tid == 0 ) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", problem inserting datatype\" );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsdtypeMap.put( sd.typeName, sd.tid );\n\t\t\t\t\t\tlogger.info(\"Added supplemental datatype \" + sd.typeName );\n\t\t\t\t\t}\n\t\t\t\t\tint read_sdid = sd.sdid;\n\t\t\t\t\tif ( sd.sdid == 0 ) {\n\t\t\t\t\t\tsd.sdid = ds.insertSuppDatum( sd );\n\t\t\t\t\t} else\n\t\t\t\t\t\tsd.sdid = ds.updateSuppDatum( sd );\n\t\t\t\t\tif ( sd.sdid < 0 ) {\n\t\t\t\t\t\tsd.sdid = -sd.sdid;\n\t\t\t\t\t\tlogger.info(\"For import of line \" + lineNumber + \n\t\t\t\t\t\t\", supp data record already exists as SDID \" + sd.sdid +\n\t\t\t\t\t\t\"; will create xref record\");\n\t\t\t\t\t} else if ( sd.sdid==0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", problem \" + (read_sdid==0 ? \"insert\" : \"updat\") + \"ing supp data\" );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ( read_sdid == 0 )\n\t\t\t\t\t\tlogger.info(\"Added supp data record SDID \" + sd.sdid);\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info(\"Updated supp data record SDID \" + sd.sdid);\n\t\t\t\t\tif ( !ds.insertSuppDatumXref( sd ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info( \"Added xref for SDID \" + sd.sdid );\n\t\t\t\t} else {\n\t\t\t\t\tif ( sd.tid == -1 ) {\n\t\t\t\t\t\tsd.tid = vds.insertSuppDataType( sd );\n\t\t\t\t\t\tif ( sd.tid == 0 ) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", problem inserting datatype\" );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsdtypeMap.put( sd.typeName, sd.tid );\n\t\t\t\t\t\tlogger.info(\"Added supplemental datatype \" + sd.typeName );\n\t\t\t\t\t}\n\t\t\t\t\tint read_sdid = sd.sdid;\n\t\t\t\t\tif ( sd.sdid == 0 )\n\t\t\t\t\t\tsd.sdid = vds.insertSuppDatum( sd );\n\t\t\t\t\telse\n\t\t\t\t\t\tsd.sdid = vds.updateSuppDatum( sd );\n\t\t\t\t\tif ( sd.sdid < 0 ) {\n\t\t\t\t\t\tsd.sdid = -sd.sdid;\n\t\t\t\t\t\tlogger.info(\"For import of line \" + lineNumber + \n\t\t\t\t\t\t\", supp data record already exists as SDID \" + sd.sdid +\n\t\t\t\t\t\t\"; will create xref record\");\n\t\t\t\t\t} else if ( sd.sdid==0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", problem \" + (read_sdid==0 ? \"insert\" : \"updat\") + \"ing supp data\" );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ( read_sdid == 0 )\n\t\t\t\t\t\tlogger.info(\"Added supp data record SDID \" + sd.sdid);\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info(\"Updated supp data record SDID \" + sd.sdid);\n\t\t\t\t\tif ( !vds.insertSuppDatumXref( sd ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info( \"Added xref for SDID \" + sd.sdid );\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Failed import of line \" + lineNumber + \", db failure: \" + e);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsuccess++;\n\t\t}\n\t\tlogger.info(\"\" + success + \" of \" + lineNumber + \" lines successfully processed\");\n\t}", "@Override\r\n\tprotected void preFilter(Procedure procedure) {\r\n\t\tsuper.preFilter(procedure);\r\n\t}", "public void setDatasource(DataSource datasource) {\n this.datasource = datasource;\n }", "public String executeStoredProc(TestStepRunner testStepRunner,\n\t\t\tString returnVariable, String parameterList) throws AFTException {\n\n\t\tString connIdentifier = null;\n\t\tString storedProcName = null;\n\t\tString parameters = null;\n\t\tString dbInstanceIdentifier = null;\n\t\tboolean connIdentifierPassed = true;\n\n\t\tLOGGER.trace(\"Executing [executeStoredProc] for parameters [\"\n\t\t\t\t+ parameterList + \"]\");\n\n\t\t// if user has not passed any parameter\n\t\tif (parameterList == null || parameterList.isEmpty()) {\n\t\t\terrorMessage = \"No parameters passed. Please refer to wiki on how to use [executeStoredProc]\";\n\t\t\tLOGGER.error(errorMessage);\n\t\t\tthrow new AFTException(errorMessage);\n\t\t}\n\n\t\t// if user has not provided stored procedure\n\t\tif (!parameterList.toLowerCase().contains(\n\t\t\t\tConstants.EXECUTEDBPROCEDUREPARAMPROCEDURENAME)) {\n\t\t\terrorMessage = \"Parameters does not include Stored procedure name. \"\n\t\t\t\t\t+ \"Please refer to wiki on how to use [executeStoredProc]\";\n\t\t\tLOGGER.error(errorMessage);\n\t\t\tthrow new AFTException(errorMessage);\n\t\t}\n\n\t\tString[] connIdentifierArray = null;\n\t\tString[] storedProcArray = null;\n\t\tString[] paramsArray = null;\n\t\tString strEqualSign = \"=\";\n\t\tString callStr = null;\n\t\tString strParam = \"\";\n\t\tString[] parametersArray = null;\n\t\tint inputParamCount = 0;\n\t\tCallableStatement objCallable = null;\n\t\tResultSet objResultSet = null;\n\t\tString returnValue = null;\n\t\tboolean executeResult = false;\n\n\t\ttry {\n\n\t\t\tString[] paramArray = parameterList\n\t\t\t\t\t.split(Constants.DBFIXTUREPARAMDELIMITER);\n\n\t\t\tfor (String param : paramArray) {\n\t\t\t\tif (param\n\t\t\t\t\t\t.contains(Constants.EXECUTEDBPROCEDUREPARAMCONNECTIONIDENTIFIER)) {\n\t\t\t\t\tconnIdentifierArray = param.split(strEqualSign);\n\t\t\t\t} else if (param\n\t\t\t\t\t\t.contains(Constants.EXECUTEDBPROCEDUREPARAMPROCEDURENAME)) {\n\t\t\t\t\tstoredProcArray = param.split(strEqualSign);\n\t\t\t\t} else if (param\n\t\t\t\t\t\t.contains(Constants.EXECUTEDBPROCEDUREPARAMPARAMETERS)) {\n\t\t\t\t\tparamsArray = param.split(strEqualSign);\n\t\t\t\t} else {\n\t\t\t\t\t// throwing error message if there is no proper inputs\n\t\t\t\t\terrorMessage = \"Provided stored procedure information is not correct. Please see the wiki how the data script to be provided.\";\n\t\t\t\t\tLOGGER.error(errorMessage);\n\t\t\t\t\tthrow new AFTException(errorMessage);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// get connection identifier\n\t\t\tif (connIdentifierArray != null) {\n\t\t\t\tconnIdentifier = connIdentifierArray[1];\n\t\t\t} else {\n\t\t\t\tconnIdentifierPassed = false;\n\t\t\t}\n\n\t\t\t// get stored procedure name\n\t\t\tstoredProcName = storedProcArray[1];\n\n\t\t\t// get input parameter list\n\t\t\tif (paramsArray != null && paramsArray.length > 0) {\n\t\t\t\tparameters = paramsArray[1];\n\t\t\t}\n\n\t\t\tLOGGER.debug(\"Identifer = [\" + connIdentifier + \"], storedProc = [\"\n\t\t\t\t\t+ storedProcName + \"], Params = [\" + parameters + \"]\");\n\n\t\t\t// if user has not passed an identifier\n\t\t\tif (!connIdentifierPassed) {\n\t\t\t\tLOGGER.info(\"No connection identifier passed. \"\n\t\t\t\t\t\t+ \"Getting connection from AFT_LastDBConnection\");\n\t\t\t\tconnIdentifier = Variable.getInstance().generateSysVarName(\n\t\t\t\t\t\tSystemVariables.AFT_LASTDBCONNECTION);\n\t\t\t} else {\n\t\t\t\tLOGGER.info(\"User passed identifier [\" + connIdentifier\n\t\t\t\t\t\t+ \"] will be used to execute Stored procedure\");\n\t\t\t}\n\n\t\t\t// get the stored value of identifier\n\t\t\tdbInstanceIdentifier = Helper.getInstance().getActionValue(\n\t\t\t\t\ttestStepRunner.getTestSuiteRunner(), connIdentifier);\n\n\t\t\t// if identifier does not exists\n\t\t\tif (dbInstanceIdentifier == null\n\t\t\t\t\t|| dbInstanceIdentifier.isEmpty()\n\t\t\t\t\t|| !DatabaseInstanceManager.getInstance()\n\t\t\t\t\t\t\t.checkDBInstanceExists(dbInstanceIdentifier)) {\n\t\t\t\terrorMessage = \"No open DB connection is available\";\n\t\t\t\t// log the error message and throw the exception.\n\t\t\t\tlogException(testStepRunner);\n\t\t\t}\n\n\t\t\t// get the database instance\n\t\t\tDatabaseInstance dbInstance = DatabaseInstanceManager.getInstance()\n\t\t\t\t\t.getDBInstance(dbInstanceIdentifier);\n\n\t\t\t// split the input parameters\n\t\t\tif (parameters != null && !parameters.isEmpty()) {\n\t\t\t\t// if more than one parameter passed\n\t\t\t\tif (parameters != null && !parameters.isEmpty()) {\n\t\t\t\t\tif (parameters\n\t\t\t\t\t\t\t.contains(Constants.DBFIXTURESTOREDPROCINPUTPARAMLISTDELIMITER)) {\n\t\t\t\t\t\tparametersArray = parameters\n\t\t\t\t\t\t\t\t.split(\"\\\\\"\n\t\t\t\t\t\t\t\t\t\t+ Constants.DBFIXTURESTOREDPROCINPUTPARAMLISTDELIMITER);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparametersArray = new String[1];\n\t\t\t\t\t\tparametersArray[0] = parameters;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (parametersArray != null) {\n\t\t\t\t\tinputParamCount = parametersArray.length;\n\t\t\t\t}\n\t\t\t\t// Setting parameters\n\t\t\t\tfor (int i = 0; i < (inputParamCount); i++) {\n\t\t\t\t\tstrParam = strParam + \"?\";\n\t\t\t\t\tif (i != (inputParamCount) - 1) {\n\t\t\t\t\t\tstrParam = strParam + \",\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// construct the call string\n\t\t\tif (strParam != null && !strParam.isEmpty()) {\n\t\t\t\tcallStr = \"{call \" + storedProcName + \"(\" + strParam + \")}\";\n\t\t\t} else {\n\t\t\t\tcallStr = \"{call \" + storedProcName + \"()}\";\n\t\t\t}\n\n\t\t\tLOGGER.debug(\"Call string [\" + callStr + \"]\");\n\n\t\t\tif (dbInstance.getConnectionObject().isClosed()) {\n\t\t\t\terrorMessage = \"Cannot execute the stored procedure as DB connection is closed. \"\n\t\t\t\t\t\t+ \"Please open a new connection and execute the procedure\";\n\t\t\t\t// log the error message and throw the exception.\n\t\t\t\tlogException(testStepRunner);\n\t\t\t}\n\n\t\t\tobjCallable = dbInstance.getConnectionObject().prepareCall(callStr);\n\t\t\tint parameterIndex = 0;\n\n\t\t\t// passing input(in) parameters\n\t\t\tif (inputParamCount > 0) {\n\n\t\t\t\tString currInputParam = null;\n\t\t\t\tString[] currParamArray = null;\n\t\t\t\tString currDataType = null;\n\t\t\t\tString currDataValue = null;\n\t\t\t\tString currParamType = null;\n\n\t\t\t\tfor (int loopCounter = 0; loopCounter < inputParamCount; loopCounter++) {\n\t\t\t\t\tcurrInputParam = parametersArray[loopCounter];\n\t\t\t\t\tcurrParamArray = currInputParam\n\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t.split(\"\\\\\"\n\t\t\t\t\t\t\t\t\t+ Constants.DBFIXTURESTOREDPROCDATATYPENVALUEDELIMITER);\n\n\t\t\t\t\tif (currParamArray.length == 3) {\n\t\t\t\t\t\tcurrDataType = currParamArray[0];\n\t\t\t\t\t\tcurrDataValue = currParamArray[1];\n\t\t\t\t\t\tcurrParamType = currParamArray[2];\n\t\t\t\t\t} else if (currParamArray.length == 2) {\n\t\t\t\t\t\tcurrDataType = currParamArray[0];\n\t\t\t\t\t\tcurrParamType = currParamArray[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Throwing exception in case parameter data type and\n\t\t\t\t\t\t// parameter type not passed\n\t\t\t\t\t\terrorMessage = \"Paramater data type and parameter type (in, out and inout) are mandatory\";\n\t\t\t\t\t\tLOGGER.error(errorMessage);\n\t\t\t\t\t\tthrow new AFTException(errorMessage);\n\t\t\t\t\t}\n\n\t\t\t\t\t// get the stored value of identifier\n\t\t\t\t\tcurrDataType = Helper.getInstance().getActionValue(\n\t\t\t\t\t\t\ttestStepRunner.getTestSuiteRunner(), currDataType);\n\t\t\t\t\tif (currDataValue != null) {\n\t\t\t\t\t\tcurrDataValue = Helper.getInstance().getActionValue(\n\t\t\t\t\t\t\t\ttestStepRunner.getTestSuiteRunner(),\n\t\t\t\t\t\t\t\tcurrDataValue);\n\t\t\t\t\t}\n\t\t\t\t\tcurrParamType = Helper.getInstance().getActionValue(\n\t\t\t\t\t\t\ttestStepRunner.getTestSuiteRunner(), currParamType);\n\n\t\t\t\t\tLOGGER.trace(\"datatype = [\" + currDataType\n\t\t\t\t\t\t\t+ \"], datavalue = [\" + currDataValue\n\t\t\t\t\t\t\t+ \"], paramtype = [\" + currParamType + \"]\");\n\n\t\t\t\t\tparameterIndex++;\n\n\t\t\t\t\t// Get the field value using Reflection\n\t\t\t\t\tClass<?> sqlTypeClass = Class.forName(\"java.sql.Types\");\n\t\t\t\t\tif (currDataType.toLowerCase().startsWith(\"varchar2\")\n\t\t\t\t\t\t\t|| currDataType.toLowerCase().startsWith(\"varchar\")) {\n\t\t\t\t\t\tLOGGER.info(\"User has passed datatype as [\"\n\t\t\t\t\t\t\t\t+ currDataType + \"]\");\n\t\t\t\t\t\tcurrDataType = \"varchar\".toUpperCase();\n\t\t\t\t\t} else if (currDataType.toLowerCase().startsWith(\"int\")\n\t\t\t\t\t\t\t|| currDataType.toLowerCase().startsWith(\"number\")) {\n\t\t\t\t\t\tLOGGER.info(\"User has passed datatype as [\"\n\t\t\t\t\t\t\t\t+ currDataType + \"]\");\n\t\t\t\t\t\tcurrDataType = \"integer\".toUpperCase();\n\t\t\t\t\t} else if (currDataType.toLowerCase().startsWith(\"short\")\n\t\t\t\t\t\t\t|| currDataType.toLowerCase().startsWith(\"byte\")) {\n\t\t\t\t\t\tLOGGER.info(\"User has passed datatype as [\"\n\t\t\t\t\t\t\t\t+ currDataType + \"]\");\n\t\t\t\t\t\tcurrDataType = \"smallint\".toUpperCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLOGGER.error(\"Error::Datatype [\"\n\t\t\t\t\t\t\t\t+ currDataType\n\t\t\t\t\t\t\t\t+ \"] is currently not supported by executeStoredProc.\");\n\t\t\t\t\t\tthrow new AFTException(\n\t\t\t\t\t\t\t\t\"Datatype [\"\n\t\t\t\t\t\t\t\t\t\t+ currDataType\n\t\t\t\t\t\t\t\t\t\t+ \"] is currently not supported by executeStoredProc.\");\n\t\t\t\t\t}\n\t\t\t\t\tint priFieldType = Integer.parseInt(sqlTypeClass\n\t\t\t\t\t\t\t.getDeclaredField(currDataType).get(currDataType)\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t\tsetParameterToStatement(objCallable, parameterIndex,\n\t\t\t\t\t\t\tcurrDataValue, priFieldType, currParamType);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// execute callable statement\n\t\t\texecuteResult = objCallable.execute();\n\n\t\t\tLOGGER.info(\"Stored procedure [\" + storedProcName\n\t\t\t\t\t+ \"] has been executed successfully\");\n\n\t\t\tif (executeResult) {\n\t\t\t\tobjResultSet = objCallable.getResultSet();\n\t\t\t\t// If cursor is before first row\n\t\t\t\tif (objResultSet.isBeforeFirst()) {\n\t\t\t\t\tobjResultSet.next();\n\t\t\t\t}\n\t\t\t\treturnValue = objResultSet.getString(1);\n\n\t\t\t} else {\n\t\t\t\treturnValue = Integer.toString(objCallable.getUpdateCount());\n\t\t\t}\n\n\t\t\tif (returnVariable != null && !returnVariable.isEmpty()) {\n\t\t\t\tLOGGER.debug(\"Storing execution result [\" + returnValue\n\t\t\t\t\t\t+ \"] in user passed return variable [\" + returnVariable\n\t\t\t\t\t\t+ \"]\");\n\t\t\t\tVariable.getInstance()\n\t\t\t\t\t\t.setVariableValue(testStepRunner.getTestSuiteRunner(),\n\t\t\t\t\t\t\t\t\"executeStoredProc\", returnVariable, false,\n\t\t\t\t\t\t\t\treturnValue);\n\t\t\t} else {\n\t\t\t\tLOGGER.info(\"No return variable passed by user\");\n\t\t\t}\n\n\t\t\t// store the result in AFT_LastDBResult by default\n\t\t\tLOGGER.info(\"Storing exection result [\" + returnValue\n\t\t\t\t\t+ \"] in system variable [AFT_LastDBResult] by default\");\n\t\t\tVariable.getInstance().setVariableValue(\n\t\t\t\t\tVariable.getInstance().generateSysVarName(\n\t\t\t\t\t\t\tSystemVariables.AFT_LASTDBRESULT), true,\n\t\t\t\t\treturnValue);\n\t\t} catch (DataTruncation d) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.warn(\"Data Truncation Exception::\", d);\n\t\t\tthrow new AFTException(d);\n\t\t} catch (SQLWarning sw) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.warn(\"Sql Warnings Exception::\", sw);\n\t\t\tthrow new AFTException(sw);\n\t\t} catch (SQLException s) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.error(\"SQL Exception::\", s);\n\t\t\tthrow new AFTException(s);\n\t\t} catch (Exception e) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.error(\"Exception::\", e);\n\t\t\tthrow new AFTException(e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (objResultSet != null) {\n\t\t\t\t\tobjResultSet.close();\n\t\t\t\t}\n\t\t\t\tif (objCallable != null) {\n\t\t\t\t\tobjCallable.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// set onDbErrorValue\n\t\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\t\tLOGGER.warn(\"Exception while closing Callable/ResultSet object\");\n\t\t\t\tthrow new AFTException(e);\n\t\t\t}\n\t\t}\n\n\t\treturn returnValue;\n\t}", "Source createDatasourceFtp(Source ds, Provider prov) throws RepoxException;", "@Override\n public void visit(ProcedureCallNode procedureCallNode) {\n }", "public final void rule__AstProcedure__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9514:1: ( ( 'procedure' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9515:1: ( 'procedure' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9515:1: ( 'procedure' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9516:1: 'procedure'\n {\n before(grammarAccess.getAstProcedureAccess().getProcedureKeyword_1()); \n match(input,72,FOLLOW_72_in_rule__AstProcedure__Group__1__Impl19489); \n after(grammarAccess.getAstProcedureAccess().getProcedureKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setDataSourceFactory(Factory<DataSource> dataSourceFactory) {\n this.dataSourceFactory = dataSourceFactory;\n }", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "public java.util.List<CodingDt> getProcedure() { \n\t\tif (myProcedure == null) {\n\t\t\tmyProcedure = new java.util.ArrayList<CodingDt>();\n\t\t}\n\t\treturn myProcedure;\n\t}", "public void setDataSource(DataSource dataSource) {\n\t\tthis.dataSource = dataSource; // Sets the current object this of the class's attribute dataSource eqal to the object of datasource\n\t\tthis.jdbcTemplateObject = new JdbcTemplate(dataSource); // Instantiation of the JDBCTemplateObject class which takes in the object of datasource to set up data synchronization\n\t\t\n\t}", "List<Procdef> selectByExample(ProcdefExample example);", "public String getProcedure() {\n return this.Procedure;\n }", "public interface IsspolStoreProcedureSvc {\n\n <K, V>Map<K, V> executeStoreProcedure(String sql, SqlParameter[] sqlParameters, Map values);\n <K, V>Map<K, V> executeStoreProcedure(String sql, SqlParameter[] sqlParameters, Boolean function, Map values);\n\n}", "void example14() {\n\t\t\n\t\t// original data: a bunch of ints\n\t\t\n\t\tIndexedDataSource<SignedInt32Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.INT32.construct(), 100);\n\t\t\n\t\t// a procedure to transforms ints to doubles\n\t\t\n\t\tProcedure2<SignedInt32Member,Float64Member> intToDblProc =\n\t\t\t\tnew Procedure2<SignedInt32Member, Float64Member>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void call(SignedInt32Member a, Float64Member b) {\n\t\t\t\tb.setV(a.v());\n\t\t\t}\n\t\t};\n\t\t\t\t\n\t\t// a procedure to transforms doubles to ints\n\t\t\n\t\tProcedure2<Float64Member,SignedInt32Member> dblToIntProc =\n\t\t\t\tnew Procedure2<Float64Member,SignedInt32Member>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void call(Float64Member a, SignedInt32Member b) {\n\t\t\t\tb.setV((int) a.v());\n\t\t\t}\n\t\t};\n\t\t\n\t\t// the definition of the transformed data source\n\t\t\n\t\tIndexedDataSource<Float64Member> xformer = \n\t\t\t\tnew TransformedDataSource<>(G.INT32, list, intToDblProc, dblToIntProc);\n\n\t\t// now calculate some results. Notice that Mean can't normally be used on\n\t\t// integer data\n\t\t\n\t\t// not possible: Integers do not have the correct type of division operator\n\t\t\n\t\t// SignedInt32Member resI = G.INT32.construct();\n\t\t\n\t\t// Mean.compute(G.INT32, list, resI);\n\t\t\n\t\t// with the transformer we can calc mean\n\n\t\tFloat64Member result = G.DBL.construct();\n\t\t\n\t\tMean.compute(G.DBL, xformer, result);\n\t}", "@Override\n\tpublic void scheduleProcedure(String procedureId, String condition, IProgressMonitor monitor) throws LoadFailed\n\t{\n\t\tLogger.info(\"Scheduling procedure \" + procedureId, Level.PROC, this);\n\t\t// Will hold the model\n\t\tIProcedure model = null;\n\t\t// Will hold the instance identifier\n\t\tString instanceId = null;\n\n\t\t// Start the task in the monitor\n\t\tmonitor.beginTask(\"Opening procedure\", 6);\n\n\t\t// Check cancellation\n\t\tif (monitor.isCanceled())\n\t\t\treturn;\n\n\t\ttry\n\t\t{\n\t\t\t// Create the model, Notify about the progress\n\t\t\tmonitor.subTask(\"Creating model\");\n\t\t\tmodel = m_models.createLocalProcedureModel(procedureId, monitor);\n\t\t\tinstanceId = model.getProcId();\n\t\t\tmonitor.worked(1);\n\t\t}\n\t\tcatch (LoadFailed ex)\n\t\t{\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.PROC, this);\n\t\t\tmonitor.subTask(\"ERROR: cannot open the procedure: \" + ex);\n\t\t\tthrow ex;\n\t\t}\n\n\t\t// Check cancellation\n\t\tif (monitor.isCanceled())\n\t\t{\n\t\t\tm_models.deleteLocalProcedureModel(instanceId);\n\t\t\treturn;\n\t\t}\n\n\t\t// Now ask the context to start the procedure process\n\t\t// Ask the context to launch or attach to the proc. It will return the\n\t\t// executor information,\n\t\t// which is the procedure data known at core level.\n\t\ttry\n\t\t{\n\t\t\t// Report progress\n\t\t\tmonitor.subTask(\"Launching process\");\n\n\t\t\t// Create a load monitor\n\t\t\taddLoadMonitor(instanceId);\n\n\t\t\t// Request context to load the procedure\n\t\t\tLogger.debug(\"Requesting context to schedule procedure \" + instanceId, Level.PROC, this);\n\t\t\ts_ctx.openExecutor(instanceId, condition, null, false);\n\n\t\t\t// Report progress\n\t\t\tmonitor.worked(1);\n\n\t\t\t// Report progress\n\t\t\tmonitor.subTask(\"Waiting for procedure to be ready\");\n\n\t\t\t// Wait until the procedure is actually loaded on server side and\n\t\t\t// ready, then\n\t\t\t// update the configuration. This is given by the LOADED\n\t\t\t// notification coming\n\t\t\t// from the procedure.\n\t\t\twaitLoaded(instanceId);\n\n\t\t\t// Report progress\n\t\t\tmonitor.worked(1);\n\t\t}\n\t\tcatch (LoadFailed ex)\n\t\t{\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.PROC, this);\n\t\t\t// Remove the model\n\t\t\tm_models.deleteLocalProcedureModel(instanceId);\n\t\t\t// Kill the process\n\t\t\tLogger.debug(\"Requesting context to kill procedure \" + instanceId, Level.PROC, this);\n\t\t\ts_ctx.killExecutor(instanceId);\n\t\t\t// Rethrow\n\t\t\tthrow ex;\n\t\t}\n\t\tcatch (ContextError ex)\n\t\t{\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.PROC, this);\n\t\t\t// Remove the model\n\t\t\tm_models.deleteLocalProcedureModel(instanceId);\n\t\t\t// The procedure could not be loaded due to an error in the context\n\t\t\t// processing\n\t\t\tthrow new LoadFailed(\"Could not load the procedure '\" + instanceId + \"'.\\n\\n\" + ex.getLocalizedMessage());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tremoveLoadMonitor(instanceId);\n\t\t}\n\n\t\t// Check cancellation\n\t\tif (monitor.isCanceled())\n\t\t{\n\t\t\tLogger.debug(\"Requesting context to kill procedure \" + instanceId, Level.PROC, this);\n\t\t\ts_ctx.killExecutor(instanceId);\n\t\t\tm_models.deleteLocalProcedureModel(instanceId);\n\t\t\treturn;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t// Once the model is loaded and the process is up and running,\n\t\t\t// update the model with the information\n\t\t\tmonitor.subTask(\"Updating procedure status\");\n\t\t\tm_models.updateLocalProcedureModel(instanceId, null, ClientMode.CONTROL, null, monitor);\n\t\t\t// Report progress\n\t\t\tmonitor.worked(1);\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.PROC, this);\n\t\t\tm_models.deleteLocalProcedureModel(instanceId);\n\t\t\t// The procedure could not be loaded due to an error in the context\n\t\t\t// processing\n\t\t\tthrow new LoadFailed(\"Could not load the procedure '\" + instanceId + \"'.\\n\\n\" + ex.getLocalizedMessage());\n\t\t}\n\n\t\t// Check cancellation\n\t\tif (monitor.isCanceled())\n\t\t{\n\t\t\tLogger.debug(\"Requesting context to kill procedure \" + instanceId, Level.PROC, this);\n\t\t\ts_ctx.killExecutor(instanceId);\n\t\t\tm_models.deleteLocalProcedureModel(instanceId);\n\t\t\treturn;\n\t\t}\n\n\t\t// Report progress\n\t\tmonitor.subTask(\"Ending load process\");\n\t\tnotifyExtensionsProcedureReady(model);\n\t\t// Report progress\n\t\tmonitor.done();\n\t}", "public static DataSource getPoolDataSource(String connectURI, String user, String password) {\n // First, we'll need a ObjectPool that serves as the\r\n // actual pool of connections.\r\n //\r\n // We'll use a GenericObjectPool instance, although\r\n // any ObjectPool implementation will suffice.\r\n //\r\n ObjectPool connectionPool = new GenericObjectPool(null,20);\r\n /*\r\n \t\t\t\tInteger.parseInt( props.getProperty(Environment.DBCP_MAXACTIVE) ), \r\n Byte.parseByte( props.getProperty(Environment.DBCP_WHENEXHAUSTED) ),\r\n Long.parseLong( props.getProperty(Environment.DBCP_MAXWAIT) ),\r\n Integer.parseInt( props.getProperty(Environment.DBCP_MAXIDLE) )\r\n\t\t*/\r\n //\r\n // Next, we'll create a ConnectionFactory that the\r\n // pool will use to create Connections.\r\n // We'll use the DriverManagerConnectionFactory,\r\n // using the connect string passed in the command line\r\n // arguments.\r\n //\r\n Properties properties=new Properties();\r\n properties.put(\"user\", user);\r\n properties.put(\"password\", password);\r\n \r\n ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t properties);\r\n // ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,\r\n //\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t userName,\r\n //\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t password,\r\n\t\t//\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnull);\r\n\r\n //\r\n // Now we'll create the PoolableConnectionFactory, which wraps\r\n // the \"real\" Connections created by the ConnectionFactory with\r\n // the classes that implement the pooling functionality.\r\n //\r\n PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t connectionPool,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t false,// readOnly\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t true// autocommit\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\r\n\r\n //\r\n // Finally, we create the PoolingDriver itself,\r\n // passing in the object pool we created.\r\n //\r\n PoolingDataSource dataSource = new PoolingDataSource(connectionPool);\r\n\r\n // For close/shutdown driver\r\n try{\r\n PoolingDriver driver = (PoolingDriver) DriverManager.getDriver(\"org.firebirdsql.jdbc.FBDriver\");\r\n driver.registerPool(\"\",connectionPool);\r\n }catch(Exception ex){\r\n };\r\n return dataSource;\r\n }", "@Bean(name = \"dataSource\")\n\tpublic DataSource dataSource() {\n\t\tEmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();\n\t\tEmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.HSQL).addScript(\"db/create-db.sql\").addScript(\"db/insert-data.sql\").build();\n\t\treturn db;\n\t}", "@Bean\r\n public DataSource dataSource() {\r\n String message = messageSource.getMessage(\"begin\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.source\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n DriverManagerDataSource dataSource = new DriverManagerDataSource();\r\n dataSource.setDriverClassName(propDatabaseDriver);\r\n dataSource.setUrl(propDatabaseUrl);\r\n dataSource.setUsername(propDatabaseUserName);\r\n dataSource.setPassword(propDatabasePassword);\r\n\r\n message = messageSource.getMessage(\"end\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.source\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n return dataSource;\r\n }", "public synchronized void setDataSource(String dataSource){\n\t\tthis.dataSource=dataSource;\n\t}", "public interface ChangePasswordDataSource {\r\n Flowable<BaseResult> changePassword(String oldPassword, String newPassword);\r\n}", "public BinFinder(CSVDataSource dataSource, PreferenceDomain inDomain, PreferenceDomain outDomain) {\n this.dataSource = dataSource;\n this.inDomain = inDomain;\n this.outDomain = outDomain;\n }", "private void demoPlsqlProcedureNoParams(Connection conn) throws SQLException {\n final String PROC_NAME = \"ProcNoParams\";\n String sql = \"CREATE OR REPLACE PROCEDURE \"+PROC_NAME+\" IS \"\n + \"BEGIN \"\n + \"INSERT INTO \"+TABLE_NAME+\" VALUES (5, 'FIVE', '\"+PROC_NAME+\"'); \"\n + \"INSERT INTO \"+TABLE_NAME+\" VALUES (6, 'SIX', '\"+PROC_NAME+\"'); \"\n + \"INSERT INTO \"+TABLE_NAME+\" VALUES (7, 'SEVEN', '\"+PROC_NAME+\"'); \"\n + \"INSERT INTO \"+TABLE_NAME+\" VALUES (8, 'EIGHT', '\"+PROC_NAME+\"'); \"\n + \"END; \";\n Util.show(sql);\n Util.doSql(conn, sql);\n \n // Invoke the stored procedure.\n sql = \"CALL \"+PROC_NAME+\"()\";\n try (CallableStatement callStmt = conn.prepareCall(sql)) {\n callStmt.execute();\n \n // Display rows inserted by the above stored procedure call.\n Util.show(\"Rows inserted by the stored procedure '\"+PROC_NAME+\"' are: \");\n displayRows(conn, PROC_NAME);\n } catch (SQLException sqlEx) {\n Util.showError(\"demoPlsqlProcedureNoArgs\", sqlEx);\n } finally {\n // Drop the procedure when done with it.\n Util.doSql(conn, \"DROP PROCEDURE \"+PROC_NAME);\n }\n }", "public final void mPROCEDURE() throws RecognitionException {\n try {\n int _type = PROCEDURE;\n // /Users/benjamincoe/HackWars/C.g:14:11: ( 'procedure' )\n // /Users/benjamincoe/HackWars/C.g:14:13: 'procedure'\n {\n match(\"procedure\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public DataSource getDataSource() {\n return dataSource;\n }", "List<CodeBuildProcedure> selectByExample(CodeBuildProcedureExample example);", "public void processProtocolFunction(Sink sink, ArgumentList arguments,\n FactContext context);", "@Override\n public String getDataSource()\n {\n return dataSource;\n }", "public String getProcedureName(){\n return this.procedureName;\n }", "public interface GenreDataSource {\n interface LoadGenresCallback {\n void onGenresLoaded(List<Genre> genres);\n\n void onDataNotAvailable();\n }\n\n interface RemoteDataSource {\n void loadGenres(LoadGenresCallback callback);\n }\n}", "@Bean\n public DataSource dataSource() {\n PGSimpleDataSource dataSource = new PGSimpleDataSource();\n dataSource.setServerName(hostName);\n dataSource.setDatabaseName(databaseName);\n dataSource.setUser(databaseUser);\n dataSource.setPassword(databasePassword);\n return dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n\t\tthis.dataSource = dataSource;\n\t\tthis.jdbcTemplate = new JdbcTemplate(dataSource);\n\t}", "public void loadData (IRSession session, InputStream dataSource, String source) throws RulesException {\n Reader dataSrc = new InputStreamReader(dataSource);\n loadData(session, dataSrc, source);\n }", "public DataSource getDataSource() {\n return _dataSource;\n }", "String getDataSource();", "private String getSQLScript() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer javaSb = new StringBuffer();\n\t\tsb.append(\"CREATE\").append(\" PROCEDURE \");\n\t\tString procedureName = procNameText.getText();\n\t\tif (procedureName == null) {\n\t\t\tprocedureName = \"\";\n\t\t}\n\t\tsb.append(QuerySyntax.escapeKeyword(procedureName)).append(\"(\");\n\t\tfor (Map<String, String> map : procParamsListData) {\n\t\t\t// \"PARAMS_INDEX\", \"PARAM_NAME\", \"PARAM_TYPE\", \"JAVA_PARAM_TYPE\"\n\t\t\tString name = map.get(\"0\");\n\t\t\tString type = map.get(\"1\");\n\t\t\tString javaType = map.get(\"2\");\n\t\t\tString paramModel = map.get(\"3\");\n\t\t\tString description = map.get(\"4\");\n\t\t\tsb.append(QuerySyntax.escapeKeyword(name)).append(\" \");\n\t\t\tif (!paramModel.equalsIgnoreCase(SPArgsType.IN.toString())) {\n\t\t\t\tsb.append(paramModel).append(\" \");\n\t\t\t}\n\t\t\tsb.append(type);\n\t\t\tif (isCommentSupport && StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t\tsb.append(\",\");\n\t\t\tjavaSb.append(javaType).append(\",\");\n\t\t}\n\t\tif (!procParamsListData.isEmpty()) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\tsb.deleteCharAt(sb.length() - 1);\n\t\t\t}\n\t\t\tif (javaSb.length() > 0) {\n\t\t\t\tjavaSb.deleteCharAt(javaSb.length() - 1);\n\t\t\t}\n\t\t}\n\t\tsb.append(\")\");\n\n\t\tsb.append(StringUtil.NEWLINE).append(\"AS LANGUAGE JAVA \").append(StringUtil.NEWLINE);\n\t\tString javaFuncName = javaNameText.getText();\n\t\tif (javaFuncName == null) {\n\t\t\tjavaFuncName = \"\";\n\t\t}\n\t\tsb.append(\"NAME '\").append(javaFuncName).append(\"(\").append(javaSb).append(\")\").append(\"'\");\n\t\tif (isCommentSupport) {\n\t\t\tString description = procDescriptionText.getText();\n\t\t\tif (StringUtil.isNotEmpty(description)) {\n\t\t\t\tdescription = String.format(\"'%s'\", description);\n\t\t\t\tsb.append(String.format(\" COMMENT %s\", StringUtil.escapeQuotes(description)));\n\t\t\t}\n\t\t}\n\t\treturn formatSql(sb.toString());\n\t}", "@Pointcut(\"@annotation(com.pearadmin.plugin.framework.datasource.annotation.DataSource)\"\n + \"|| @within(com.pearadmin.plugin.framework.datasource.annotation.DataSource)\")\n public void dsPointCut() {\n }", "public final void rule__AstExternalProcedure__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:10176:1: ( ( 'procedure' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:10177:1: ( 'procedure' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:10177:1: ( 'procedure' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:10178:1: 'procedure'\n {\n before(grammarAccess.getAstExternalProcedureAccess().getProcedureKeyword_3()); \n match(input,72,FOLLOW_72_in_rule__AstExternalProcedure__Group__3__Impl20797); \n after(grammarAccess.getAstExternalProcedureAccess().getProcedureKeyword_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public ConnectionPoolDataSource createPoolDataSource(CConnection connection);", "public ConnectionPoolDataSource createPoolDataSource(CConnection connection);", "Source createDatasourceOAI(Source ds, Provider prov) throws RepoxException;", "@Override\n\tpublic StoredProcedureQuery createStoredProcedureQuery(String procedureName) {\n\t\treturn null;\n\t}", "public void setPoolDataSource(ConnectionPoolDataSource poolDataSource)\n throws SQLException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n driver = createDriver();\n \n driver.setPoolDataSource(poolDataSource);\n }", "@Override\n\tpublic StoredProcedureQuery createStoredProcedureQuery(String procedureName, String... resultSetMappings) {\n\t\treturn null;\n\t}", "protected PreDefinedProcedure() {\n super(new ParameterList(), new Block());\n this.name = null;\n }", "@Override\n\tprotected void initDataSource() {\n\t}", "@Override\n\tpublic DataSource getDataSource() {\t\t\n\t\treturn dataSource;\n\t}", "@Override\n\t@Transactional\n\tpublic List callProcR(String proc, List<String> paras) {\n\t\tSession session = getHibernateTemplate().getSessionFactory().openSession();\n\t\t// Transaction tx = session.beginTransaction();\n\t\tSQLQuery q = session.createSQLQuery(\"{call \" + proc + \"(?) }\");\n\t\tif (paras != null) {\n\t\t\tint i = 0;\n\t\t\tfor (String para : paras) {\n\t\t\t\tq.setString(i++, para);\n\t\t\t}\n\t\t}\n\t\treturn q.list();\n\n\t}", "public DataSource getDataSource() {\n return datasource;\n }", "private void createFPdataProc(Code32 code, int opCode, int cond, int Vd, int Vm, boolean single) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | opCode;\r\n\t\tif (single) code.instructions[code.iCount] |= (((Vd>>1)&0xf) << 12) | ((Vd&1) << 22) | ((Vm>>1)&0xf) | ((Vm&1) << 5);\r\n\t\telse code.instructions[code.iCount] |= (1 << 8) | ((Vd&0xf) << 12) | ((Vd>>4) << 22) | (Vm&0xf) | ((Vm>>4) << 5);\r\n\t\tcode.incInstructionNum();\r\n\t}", "private void demoPlsqlProcedureINParams(Connection conn) throws SQLException {\n final String PROC_NAME = \"ProcINParams\";\n String sql = \"CREATE OR REPLACE PROCEDURE \"+PROC_NAME+\"(num IN NUMBER, name IN VARCHAR2, insertedBy IN VARCHAR2) IS \"\n + \"BEGIN \"\n + \"INSERT INTO \"+TABLE_NAME+\" VALUES (num, name, insertedBy); \"\n + \"END; \";\n Util.show(sql);\n Util.doSql(conn, sql);\n \n // Invoke the stored procedure.\n sql = \"CALL \"+PROC_NAME+\"(?,?,?)\";\n try (CallableStatement callStmt = conn.prepareCall(sql)) {\n callStmt.setInt(1, 9);\n callStmt.setString(2, \"NINE\");\n callStmt.setString(3, PROC_NAME);\n callStmt.addBatch();\n \n callStmt.setInt(1, 10);\n callStmt.setString(2, \"TEN\");\n callStmt.setString(3, PROC_NAME);\n callStmt.addBatch();\n \n callStmt.setInt(1, 11);\n callStmt.setString(2, \"ELEVEN\");\n callStmt.setString(3, PROC_NAME);\n callStmt.addBatch();\n \n callStmt.setInt(1, 12);\n callStmt.setString(2, \"TWELVE\");\n callStmt.setString(3, PROC_NAME);\n callStmt.addBatch();\n \n callStmt.executeBatch();\n \n // Display rows inserted by the above stored procedure call.\n Util.show(\"Rows inserted by the stored procedure '\"+PROC_NAME+\"' are: \");\n displayRows(conn, PROC_NAME);\n } catch (SQLException sqlEx) {\n Util.showError(\"demoPlsqlProcedureINParams\", sqlEx);\n } finally {\n // Drop the procedure when done with it.\n Util.doSql(conn, \"DROP PROCEDURE \"+PROC_NAME);\n }\n }", "public interface AnswerLocalSource extends DBBaseDataSource<CarMessage.AnswerMsg> {\n interface LoadAnswersCallBack extends LoadDBDataCallBack<CarMessage.AnswerMsg> {\n\n }\n\n interface GetAnswesCallBack extends GetDBDataCallBack<CarMessage.AnswerMsg> {\n\n }\n\n void getAnswersByMsgId(int msgId, LoadAnswersCallBack callBack);\n\n void setAnswersByMsgId(int msgId, CarMessage.AnswerMsg... answerMsgs);\n\n void getgetAnswerByMsgIdAndAnswerId(int msgId, int answerId, GetAnswesCallBack callBack);\n}", "public interface DataSourceWrapper<D> {\r\n\r\n public void openDataSource() throws Exception;\r\n \r\n public void preValidate() throws Exception;\r\n \r\n public void closeDataSource() throws Exception;\r\n \r\n public void setDataSource(D dataSource);\r\n \r\n public D getDataSource();\r\n \r\n public Iterator<Row> getRowIterator();\r\n \r\n}", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "@Override\n public void visit(final OpProcedure opProc) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpProc\");\n }\n if (opProc.getProcId() != null) {\n addOp(new OpProcedure(opProc.getProcId(), opProc.getArgs(), rewriteOp1(opProc)));\n } else {\n addOp(new OpProcedure(opProc.getURI(), opProc.getArgs(), rewriteOp1(opProc)));\n }\n }", "public String getDataSource() {\n return dataSource;\n }" ]
[ "0.60104984", "0.55117726", "0.52755374", "0.5263973", "0.51249397", "0.50869656", "0.5079555", "0.504398", "0.5041712", "0.5035503", "0.49379608", "0.49361083", "0.48983002", "0.48983002", "0.48983002", "0.48839974", "0.4872515", "0.48528674", "0.48453245", "0.48392868", "0.483473", "0.48045304", "0.47967827", "0.47749358", "0.47710487", "0.4769566", "0.47453636", "0.47453636", "0.47453636", "0.47453636", "0.47453636", "0.47453636", "0.47450337", "0.47424597", "0.47366503", "0.4730869", "0.47261366", "0.47250995", "0.4707562", "0.4707562", "0.4707562", "0.46694875", "0.46436873", "0.46392775", "0.4628197", "0.462587", "0.4598827", "0.45965523", "0.45824257", "0.45734462", "0.45609352", "0.45376763", "0.4535551", "0.45325938", "0.4518071", "0.45039895", "0.45021498", "0.44768718", "0.4469298", "0.44530043", "0.44455343", "0.444375", "0.44429547", "0.44424057", "0.44394442", "0.44386774", "0.44357246", "0.44308466", "0.4429915", "0.4428757", "0.44223872", "0.44209674", "0.44075927", "0.44044232", "0.43943563", "0.43934166", "0.4390791", "0.43898416", "0.43860045", "0.43808484", "0.43762255", "0.43738392", "0.4369693", "0.4369693", "0.4361554", "0.43605876", "0.4359378", "0.43532062", "0.43525645", "0.43441504", "0.43412852", "0.43393606", "0.433878", "0.43383038", "0.43355358", "0.43344986", "0.4333134", "0.43226105", "0.43222022", "0.43165767" ]
0.51040626
5
ReadOnlyDataSource Sometimes you want to make sure that users of your list cannot modify its contents. Wrapping a data source in this read only wrapper can be just what you need.
void example10() { // allocate a regular list IndexedDataSource<UnsignedInt4Member> list = nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT4.construct(), 1000); // fill it with data Fill.compute(G.UINT4, G.UINT4.random(), list); // protect it from writes IndexedDataSource<UnsignedInt4Member> readonlyList = new ReadOnlyDataSource<>(list); // now play with list UnsignedInt4Member value = G.UINT4.construct(); // success readonlyList.get(44, value); // prepare to write value.setV(100); // failure: throws exception. writing not allowed readonlyList.set(22, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ObservableList<T> getReadOnlyList();", "public interface ReadOnlyListManager<T> {\n /**\n * Returns an unmodifiable view of the list.\n * This list will not contain any duplicate elements.\n */\n\n ObservableList<T> getReadOnlyList();\n}", "public void makeReadOnly();", "public boolean isReadOnly();", "public boolean isReadOnly();", "public boolean isReadOnly();", "@Override\n\tpublic boolean isReadOnly() {\n\t\treturn false;\n\t}", "protected boolean isReadOnly()\n {\n return true;\n }", "@Override\r\n\t\tpublic boolean isReadOnly() throws SQLException {\n\t\t\treturn false;\r\n\t\t}", "@Override\n\tpublic void setReadOnly(boolean readonly) {\n\t\t\n\t}", "public boolean isReadOnly() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void setReadOnly(boolean readOnly) {\n\t}", "@Override\n public void setReadOnly(boolean readonly) {\n // do nothing\n }", "@Override\n\tpublic boolean isReadOnly(int arg0) throws SQLException {\n\t\treturn false;\n\t}", "public abstract boolean isReadOnly();", "public interface DataItemSource {\n\tpublic String getDataItemSourceName();\n\n\t/**\n\t * \n\t * @return A new object of the same class as the caller. All fields are reinitialized\n\t * to default state except for the disabled field, which will have the same value as the caller\n\t */\n\tpublic DataItemSource createInstanceOfSameType();\n\n\tpublic boolean isDisabled();\n\n\tpublic void setDisabled(boolean b);\n\n\tpublic ImageIcon getProfileIcon();\n\n}", "public void setReadOnly(boolean isReadOnly);", "public void makeReadOnly()\n {\n m_readOnly = true;\n }", "public void makeReadOnly()\n {\n m_readOnly = true;\n }", "boolean isReadOnly();", "boolean isReadOnly();", "public void setReadOnly(Boolean readOnly) {\n this.readOnly = readOnly;\n }", "public interface ReadOnlyTaskList {\n\n\tUniqueTaskList getUniqueTaskList();\n\n\t/**\n\t * Returns an unmodifiable view of tasks list\n\t */\n\tList<ReadOnlyTask> getTaskList();\n}", "@Override\r\n\t\tpublic void setReadOnly(boolean readOnly) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setReadOnly(boolean readOnly) {\n this.readOnly = readOnly;\n }", "public void setReadOnly(boolean readOnly) {\n this.readOnly = readOnly;\n }", "public boolean isReadOnly() {\n return readOnly;\n }", "public boolean isReadOnly() {\r\n\t\treturn readOnly;\r\n\t}", "public interface SearchableList extends ListDataSource {\n Observable<List> queryList(String queryText, boolean barcodeSearch, Map<String, Object> searchParameters, AuthenticationInfo authenticationInfo, Parameters params);\n\n default Observable<ListItem> fetchItem(String id, AuthenticationInfo authenticationInfo, Parameters parameters) {\n throw new RuntimeException(\"This source does not support fetching a single item\");\n }\n}", "public interface ReadOnlyWhatNow {\n\n UniqueTagList getUniqueTagList();\n\n UniqueTaskList getUniqueTaskList();\n\n /**\n * Returns an unmodifiable view of tasks list\n */\n List<ReadOnlyTask> getTaskList();\n\n /**\n * Returns an unmodifiable view of tags list\n */\n List<Tag> getTagList();\n\n}", "public boolean getReadOnly() {\n return readOnly;\n }", "public interface ListReadOnly<T> {\n /**\n * Returns the number of elements in this list.\n *\n * @return The number of elements in this list.\n */\n\n public int size();\n\n\n /**\n * Returns the element at the specified position in this list.\n *\n * @param index Index of the element to return\n * @return The element at the specified position in this list.\n * @throws IndexOutOfBoundsException If the index is out of range\n * (<code>index &lt; 0 || index &gt;= size()</code>)\n */\n public T get(int index);\n}", "public boolean isReadOnly() {\n return type == TransactionType.READ_ONLY;\n }", "protected final boolean isReadOnly()\n {\n return m_readOnly;\n }", "private DataSource getDataSource() throws PermissionException {\n if (dataSource != null) {\n return dataSource;\n }\n\n if (dataSourceService == null) {\n throw new PermissionException(\"Datasource service is null. Cannot retrieve datasource \" +\n permissionConfig.getDatasourceName());\n }\n\n try {\n dataSource = (DataSource) dataSourceService.getDataSource(permissionConfig.getDatasourceName());\n } catch (DataSourceException e) {\n throw new PermissionException(\"Unable to retrieve the datasource: \" +\n permissionConfig.getDatasourceName(), e);\n }\n return dataSource;\n }", "public boolean isReadOnly() {\r\n return this.readOnly;\r\n }", "public boolean isReadOnlyWork(FieldContext fieldContext) {\n\t\treturn false;\n\t}", "@JSProperty\n boolean isReadOnly();", "public void setReadOnly(boolean value) {\n this.readOnly = value;\n\n for (TauSession s : sessionsList) {\n s.setReadOnly(value);\n }\n }", "public interface ReadOnlyAttractionList {\n\n /**\n * Returns an unmodifiable view of the attraction list.\n * This list will not contain any duplicate attractions.\n */\n ObservableList<Attraction> getAttractionList();\n\n}", "boolean readOnly();", "boolean readOnly();", "public interface ReadOnlyListenableValue<T> extends Listenable<T> {\n\tvoid listenAndFire(Consumer<? super T> listener);\n\t\n\tT get();\n\t\n\tdefault Subscription subscribeAndFire(Consumer<? super T> listener) {\n\t\tlistenAndFire(listener);\n\t\treturn () -> unlisten(listener);\n\t}\n}", "@Override\n\tpublic DataSource getDataSource() {\t\t\n\t\treturn dataSource;\n\t}", "public void setReadOnly(boolean readOnly) {\n _readOnly = (readOnly) ? Boolean.TRUE : Boolean.FALSE;\n }", "@Override\n public String getDataSource()\n {\n return dataSource;\n }", "public boolean isReadOnly(String label)\n {\n return true;\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "public final boolean isReadOnly() {\n\t\treturn m_info.isReadOnly();\n\t}", "protected DataSource getDataSource() {\n\t\treturn dataSource;\n\t}", "public interface DynamicReadOnly {\n\n default ReadOnly getReadOnly(final String fieldName) {\n return ReadOnly.NOT_SET;\n }\n\n void setAllowOnlyVisualChange(final boolean allowOnlyVisualChange);\n\n boolean isAllowOnlyVisualChange();\n\n enum ReadOnly {\n /**\n * isAllowOnlyVisualChange() is false.\n */\n NOT_SET,\n\n /**\n * isAllowOnlyVisualChange() is true and the property is readonly.\n */\n TRUE,\n\n /**\n * isAllowOnlyVisualChange() is true and the property is NOT readonly.\n */\n FALSE\n }\n}", "@Override\r\n protected boolean isUseDataSource() {\r\n return true;\r\n }", "public DataSource getDataSource() {\n return dataSource;\n }", "@Override\n\tpublic void setDataSource(DataSource dataSource) {\n\t}", "public DataSource getDataSource() {\n return datasource;\n }", "public boolean isReadOnly() {\n return _readOnly != null && _readOnly;\n }", "public DataSource getDataSource() {\n return _dataSource;\n }", "public interface DataSourceWrapper<D> {\r\n\r\n public void openDataSource() throws Exception;\r\n \r\n public void preValidate() throws Exception;\r\n \r\n public void closeDataSource() throws Exception;\r\n \r\n public void setDataSource(D dataSource);\r\n \r\n public D getDataSource();\r\n \r\n public Iterator<Row> getRowIterator();\r\n \r\n}", "public DataSource getDataSource() {\r\n return dataSource;\r\n }", "protected void addReadOnlyPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Widget_readOnly_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Widget_readOnly_feature\", \"_UI_Widget_type\"),\n\t\t\t\t WavePackage.Literals.WIDGET__READ_ONLY,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "public DBMaker readonly() {\n readonly = true;\n return this;\n }", "public void setReadonly(String readonly) {\n this.readonly = readonly;\n }", "public void setDatasource(DataSource source) {\n datasource = source;\n }", "public DataSource getDataSource() {\n return dataSource;\n }", "public DataSource getDataSource() {\n return dataSource;\n }", "@JsonProperty(\"readOnly\")\n public Boolean getReadOnly() {\n return readOnly;\n }", "public boolean isReadOnly() {\n return this.getUpdateCount() == 0;\n }", "public boolean isReadonly() {\n\t\treturn readonly;\n\t}", "@Override\n\tprotected JRDataSource getDataSource() throws Exception {\n\t\treturn new JREmptyDataSource();\n\t}", "public final String getReadOnlyAttribute() {\n return getAttributeValue(\"readonly\");\n }", "public interface ReadOnlyEndTimes {\n\n /**\n * Returns an unmodifiable view of the endTimes list.\n * This list will not contain any duplicate endTimes.\n */\n ObservableList<EndTime> getEndTimeList();\n\n}", "public DataSource getDatasource() {\n return datasource;\n }", "public boolean isReadOnly()\n {\n return SystemProps.IsReadOnlyProperty(this.getPropertyID());\n }", "public String getDataSource() {\n return dataSource;\n }", "public boolean isReadOnlyActualWork(FieldContext fieldContext) {\n\t\treturn false;\n\t}", "public interface RecipeDataSource {\n\n /**\n * Gets the recipes from the data source.\n *\n * @return the recipes from the data source.\n */\n Observable<List<Recipe>> getRecipes();\n}", "public Object getReadOnlyObjectProperty() {\r\n return readOnlyObjectProperty;\r\n }", "public String getDataSource() {\n return dataSource;\n }", "public void setReadonly(boolean readonly) {\n\t\tthis.readonly = readonly;\n\t}", "DataSource clone();", "public PoolReadOnlyException(StoragePool pool)\n {\n super( \"Storagepool \" + pool.getName() + \" is readonly\" );\n }", "public void testisReadOnly() {\n assertTrue(\"Failed to return the value correctly.\", loopReadOnly.isReadOnly());\n }", "void setRepositoryPermissionsToReadOnly(URL repositoryUrl, String projectKey, String username) throws Exception;", "public interface ReadOnlyOrganizer {\n\n /**\n * Returns an unmodifiable view of the tasks list.\n * This list will not contain any duplicate tasks.\n */\n ObservableList<Task> getTaskList();\n\n /**\n * Returns an unmodifiable view of the current user's task list.\n * This list will not contain any duplicate tasks.\n */\n ObservableList<Task> getCurrentUserTaskList();\n\n /**\n * Returns an unmodifiable view of the tags list.\n * This list will not contain any duplicate tags.\n */\n ObservableList<Tag> getTagList();\n\n /**\n * Returns an unmodifiable view of the users list.\n * This list will not contain any duplicate users.\n */\n ObservableList<User> getUserList();\n\n /**\n * Returns the currently logged in user\n */\n User getCurrentLoggedInUser();\n\n}", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public interface DataSource<T> {\n\t/**\n\t * open data source.\n\t */\n\tpublic void open();\n\t/**\n\t * Get the next data object.\n\t * @return data object.\n\t */\n\tpublic T next();\n\t/**\n\t * move vernier to head.\n\t * @return\n\t */\n\tpublic void head();\n\t/**\n\t * close data source.\n\t */\n\tpublic void close();\n\t/**\n\t * get attributes. \n\t * @return\n\t */\n\tpublic Map<String, Object> attributes();\n}", "public interface ReadOnlyAddressBook {\n\n /**\n * Returns an unmodifiable view of the tags list.\n * This list will not contain any duplicate tags.\n */\n ObservableList<Tag> getTagList();\n\n /**\n * Returns an unmodifiable view of the cards list.\n * This list will not contain any duplicate cards.\n */\n ObservableList<Card> getCardList();\n\n CardTag getCardTag();\n}", "public PersonInfo readOnly(final Boolean readOnly) {\n this.readOnly = readOnly;\n return this;\n }", "public static JRDataSource getDataSource() {\n\t\treturn new CustomDataSource(1000);\n\t}", "public synchronized String getDataSource(){\n\t\treturn dataSource;\n\t}", "public static DataSource getNonTXDataSource() throws SQLException {\n return getDataSource(FxContext.get().getDivisionId(), false);\n }", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "static List<SubstantiveParametersParameterItem> handleReadonlyList(List<SubstantiveParametersParameterItem> readOnlyList) {\n List<SubstantiveParametersParameterItem> readableList = new ArrayList<>();\n for(SubstantiveParametersParameterItem item : readOnlyList) {\n readableList.add(item);\n }\n return readableList;\n }", "public interface StreamDataSource extends DataSource {\n /**\n * @return a string identifier\n */\n @NotNull String getStreamName();\n\n /**\n * Access named stream for reading.\n * Caller is responsible to close the stream once done.\n * @return stream to read from, never <code>null</code>\n * @throws IOException if failed to open given named stream\n */\n @NotNull InputStream openInputStream() throws IOException;\n\n /**\n * Access named stream for writing. Caller is responsible to close the stream once done.\n * @return stream to write to, never <code>null</code>\n * @throws IOException if failed to open given named stream\n */\n @NotNull OutputStream openOutputStream() throws IOException;\n\n /**\n * @return true if success\n */\n boolean delete();\n\n /**\n * if rv == false, then {@link #openInputStream()} will throw IOException\n * so check it before reading\n */\n boolean exists();\n}", "@ApiStatus.Internal\n default boolean isListable() {\n \n return false;\n }", "@Override\n\tpublic boolean isSearchable(int arg0) throws SQLException {\n\t\tboolean flag =isReadOnly(arg0);\n\t\treturn !flag;\n\t}", "public void setDatasource(DataSource datasource) {\n this.datasource = datasource;\n }" ]
[ "0.64538336", "0.63873947", "0.6245544", "0.6180773", "0.6180773", "0.6180773", "0.6093454", "0.6054911", "0.6038782", "0.6022515", "0.6007717", "0.59962195", "0.591554", "0.5915516", "0.5906544", "0.58966833", "0.5881072", "0.5836811", "0.5836811", "0.58357364", "0.58357364", "0.5823306", "0.5812373", "0.58014846", "0.5789474", "0.5789474", "0.5780011", "0.5775977", "0.5770157", "0.5760973", "0.5747206", "0.5745496", "0.5627892", "0.5614485", "0.56025225", "0.5549273", "0.5527016", "0.5498856", "0.5480662", "0.5459429", "0.5456096", "0.5456096", "0.54424834", "0.54415715", "0.53554326", "0.5342817", "0.53313917", "0.53198516", "0.53198516", "0.53198516", "0.53175795", "0.5315486", "0.5308863", "0.5300375", "0.5291446", "0.5281559", "0.52679425", "0.52626544", "0.52581763", "0.5255472", "0.5249651", "0.5236484", "0.52277607", "0.5204973", "0.5198538", "0.5195822", "0.5195822", "0.518829", "0.5183122", "0.51764584", "0.51728565", "0.5130708", "0.5127392", "0.5119595", "0.5118617", "0.5117288", "0.5101253", "0.5095408", "0.50863546", "0.50841594", "0.50829273", "0.5076269", "0.50558245", "0.505276", "0.5043736", "0.5026527", "0.5025294", "0.5025294", "0.5025294", "0.50237554", "0.50230825", "0.50176436", "0.50160474", "0.5015605", "0.50007975", "0.49956906", "0.49662542", "0.496367", "0.49572608", "0.49567467", "0.49548236" ]
0.0
-1
ReadOnlyHighPrecisionDataSource Use this data source to pull data out of an underlying data source as high precision numbers so you can do highly accurate calculations. This approach only uses minimal amounts of additional ram. The calculations are a bit slower than raw data access. Each single number of the underlying data source is translated to a high precision representation upon reads to the filter. Only one number is translated at a time as they are requested.
void example11() { // allocate a regular list IndexedDataSource<UnsignedInt4Member> list = nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT4.construct(), 1000); // fill it with data Fill.compute(G.UINT4, G.UINT4.random(), list); // wrap it IndexedDataSource<HighPrecisionMember> highPrecData = new ReadOnlyHighPrecisionDataSource<>(G.UINT4, list); // do a high precision calculation HighPrecisionMember result = G.HP.construct(); Mean.compute(G.HP, highPrecData, result); // one thing to notice is that a sum/mean of a 1000 UINT4's would certainly // overflow the range of an output UINT4. This is a good example of where the // high precision approach makes sense even if perfect accuracy is not required. // the high prec output cannot overflow. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void example2() {\n\t\t\n\t\tIndexedDataSource<HighPrecisionMember> list = ArrayDataSource.construct(G.HP, 1234);\n\t\t\n\t\t// fill the list with values\n\t\t\n\t\tFill.compute(G.HP, G.HP.unity(), list);\n\t\t\n\t\t// then calculate a result\n\n\t\tHighPrecisionMember result = G.HP.construct();\n\t\t\n\t\tSum.compute(G.HP, list, result); // result should equal 1234\n\t}", "public HighDatasource() {\n super(generateStacks(calculateStackCount(5, 2 * 60, 2000), 15, 40,\n new double[]{30, 27, 25, 20, 17, 15, 10, 7, 5, 2, 1}, 1));\n }", "void example7() {\n\t\t\n\t\t// allocate the data\n\t\t\n\t\tIndexedDataSource<HighPrecisionMember> data = ListDataSource.construct(G.HP, 1234);\n\t\t\n\t\t// fill the list with values\n\t\t\n\t\tHighPrecisionMember value = G.HP.construct();\n\t\t\n\t\tfor (long i = 0; i < data.size(); i++) {\n\t\t\t\n\t\t\tvalue.setV(BigDecimal.valueOf(i));\n\n\t\t\tdata.set(i, value);\n\t\t}\n\n\t\t// then calculate a result\n\n\t\tHighPrecisionMember result = G.HP.construct();\n\t\t\n\t\tStdDev.compute(G.HP, data, result);\n\t}", "void example8() {\n\n\t\t// setup some data\n\t\t\n\t\tIndexedDataSource<Float64Member> list = ArrayStorage.allocate(G.DBL.construct(), 9);\n\t\t\n\t\t// fill it with random values\n\t\t\n\t\tFill.compute(G.DBL, G.DBL.random(), list);\n\t\t\n\t\t// build a mask\n\t\t\n\t\tIndexedDataSource<BooleanMember> mask =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(\n\t\t\t\t\t\tG.BOOL.construct(), \n\t\t\t\t\t\tnew boolean[] {true, false, false, true, false, false, true, true, true});\n\t\t\n\t\t// make the filter\n\t\t\n\t\tIndexedDataSource<Float64Member> maskedData = new MaskedDataSource<>(list, mask);\n\t\t\n\t\t// do some computations\n\t\t\n\t\tmaskedData.size(); // equals 5\n\t\t\n\t\t// 3rd value in the masked data = the 7th value of the original list\n\t\t\n\t\tFloat64Member value = G.DBL.construct();\n\t\t\n\t\tmaskedData.get(3, value);\n\t\t\n\t\t// compute a value on data only where the mask is true in the original dataset\n\t\t\n\t\tMean.compute(G.DBL, maskedData, value);\n\t}", "public static JRDataSource getDataSource() {\n\t\treturn new CustomDataSource(1000);\n\t}", "public interface DataReader extends DataAccessor, IntermittentlyAvailableResource {\n /**\n * \n * Resets this accessor to focus on the first message in the specified \n * TSF at or after the specified timestamp.\n * \n * @param timeSlice The time slice to focus on.\n * @param timestamp Fast forward to specified timestamp.\n * Pass Long.MIN_VALUE (or any timestamp prior \n * to TSF) to process all messages.\n * @param movePastTSFEnd If true, the reader will move to next \n * time slice, as normal. If false, the reader\n * will return false from {@link #readNext(deltix.qsrv.dtb.store.pub.TSMessageConsumer) }\n * at the end of the current time slice.\n * @param filter The entity filter. Pass null to read all data.\n */\n public void open (\n TSRef timeSlice,\n long timestamp,\n boolean movePastTSFEnd,\n EntityFilter filter\n ); \n \n /**\n * Resets this accessor to focus on\n * the first message at or after the specified timestamp.\n * \n * @param timestamp The timestamp (all times are in nanoseconds) to seek.\n * @param forward Whether to read forward in time.\n * @param filter The entity filter. Pass null to read all data.\n */\n public void open (\n long timestamp,\n boolean forward,\n EntityFilter filter\n );\n\n /**\n * Reset current filter and change subscription.\n * @param filter EntityFilter to apply for the current slice\n */\n public void setFilter(EntityFilter filter);\n \n /**\n * Sets limit timestamp to read.\n *\n * @param timestamp The timestamp (all times are in nanoseconds) to limit reader.\n */\n public void setLimitTimestamp (long timestamp);\n\n /**\n * Returns start time of the current time slice.\n */\n public long getStartTimestamp();\n\n /**\n * Returns end time of the current time slice.\n */\n public long getEndTimestamp();\n \n /**\n * Read a message at the current location.\n * \n * @param processor The MemoryDataInput instance to configure\n * \n * @return false if the current message was the last one.\n */\n public boolean readNext (TSMessageConsumer processor);\n\n /*\n Reopens reader to the given timestamp in nanoseconds.\n */\n public void reopen(long timestamp);\n\n /**\n * Closed all allocated and opened slices. Data reading can be resumed again calling reopen() method.\n */\n public void park();\n}", "DoubleDataSource apply(DoubleDataSource input, String param);", "public abstract Double getDataValue();", "protected double getDataRate() {\n\t\treturn (double) getThroughput() / (double) getElapsedTime();\n\t}", "public void setHighPerformanceNeeded(boolean highPerformanceNeeded) { this.highPerformanceNeeded = highPerformanceNeeded; }", "public LowDataSource() {\n super(generateStacks(calculateStackCount(5, 60, 10), 15, 30,\n new double[]{100, 50, 45, 40, 35, 30, 15, 10, 5}, 5));\n }", "@Test\n public void testCreateScalableQuantizedRecorderSource() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorderSource\");\n Object forWhat = \"bla\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n int lowerMagnitude = 0;\n int higherMagnitude = 3;\n int quantasPerMagnitude = 10;\n MeasurementRecorderSource result = RecorderFactory.createScalableQuantizedRecorderSource(\n forWhat, unitOfMeasurement, sampleTime, factor, lowerMagnitude, higherMagnitude, quantasPerMagnitude);\n for (int i=0; i<5000; i++) {\n result.getRecorder(\"X\"+ i%2).record(i);\n Thread.sleep(1);\n }\n long endTime = System.currentTimeMillis();\n System.out.println(RecorderFactory.RRD_DATABASE.generateCharts(startTime, endTime, 1200, 600));\n System.out.println(RecorderFactory.RRD_DATABASE.getMeasurements());\n ((Closeable)result).close();\n }", "Source createDatasourceZ3950Timestamp(Source ds, Provider prov) throws RepoxException;", "private List<GeneralResultRow> getData(FeatureSource<?, ?> featureSource)\n\t\t\tthrows Exception {\n\t\tif (featureSource == null) {\n\t\t\tException mple = new Exception(\"featureSource is null\");\n\t\t\tmple.printStackTrace();\n\t\t\tthrow mple;\n\t\t}\n\t\tthis.crs=featureSource.getSchema()\n\t\t\t\t.getCoordinateReferenceSystem();\n\t\tString crs = org.geotools.gml2.bindings.GML2EncodingUtils\n\t\t\t\t.epsgCode(this.crs);\n\t\tif (crs == null) {\n\t\t\tcrs = \"\" + Config.EPSG_CODE + \"\";\n\t\t}else{\n\t\t\ttry {\n\t\t\t\tint code=CRS.lookupEpsgCode(featureSource.getSchema().getCoordinateReferenceSystem(), true);\n\t\t\t\t//System.out.println(\"the code is: \"+code);\n\t\t\t\tcrs = String.valueOf(code);\n\t\t\t} catch (FactoryException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//e1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tthis.crsstring=crs;\n\t\t\n\t\tFeatureCollection<?, ?> collection = featureSource.getFeatures();\n\t\tFeatureIterator<?> iterator = collection.features();\n\t\tList<GeneralResultRow> resultlist = new ArrayList<GeneralResultRow>();\n\t\ttry {\n\t\t\tdouble total_thematic_duration=0.0;\n\t\t\tdouble total_duration_geom=0.0;\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\n\t\t\t\tlong startTime = System.nanoTime();\n\t\t\t\tFeature feature = iterator.next();\n\t\t\t\tGeneralResultRow newrow = new GeneralResultRow(); // new row\n\t\t\t\tfor (Property p : feature.getProperties()) {\n\t\t\t\t\tnewrow.addPair(p.getName().getLocalPart(), p.getValue());\n\t\t\t\t}\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tdouble duration = (endTime - startTime) / 1000000; // divide by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1000000 to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// milliseconds.\n\t\t\t\ttotal_thematic_duration += duration;\n\t\t\t\tPrintTimeStats.printTime(\"Read Thematic from file\", duration);\n\t\t\t\t\n\t\t\t\tnewrow.addPair(primarykey, KeyGenerator.Generate()); // Add\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// primary\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// key\n\t\t\t\tstartTime = System.nanoTime();\n\t\t\t\tGeometryAttribute sourceGeometryAttribute = feature\n\t\t\t\t\t\t.getDefaultGeometryProperty();\n\t\t\t\tendTime = System.nanoTime();\n\t\t\t\tduration = (endTime - startTime) ; // divide by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1000000 to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// milliseconds.\n\t\t\t\ttotal_duration_geom+= duration;\n\t\t\t\tPrintTimeStats.printTime(\"Read Geometry from file\", duration);\n\t\t\t\t\n\n\t\t\t\t//RowHandler.handleGeometry(newrow, (Geometry)sourceGeometryAttribute.getValue(), crs);\n\t\t\t\tresultlist.add(newrow);\n\t\t\t}\n\t\t\tPrintTimeStats.printTime(\"Read Thematic data (total) from file\", total_thematic_duration);\n\t\t\tPrintTimeStats.printTime(\"Read Geometries (total) from file\", total_duration_geom);\n\t\t} finally {\n\t\t\titerator.close();\n\t\t}\n\n\t\treturn resultlist;\n\t}", "@DataProvider(name = \"test1\")\n\tpublic Object [][] createData1() {\n\t\treturn new Object [][] {\n\t\t\tnew Object [] { 0, 0 },\n\t\t\tnew Object [] { 9, 2 },\n\t\t\tnew Object [] { 15, 0 },\n\t\t\tnew Object [] { 32, 0 },\n\t\t\tnew Object [] { 529, 4 },\n\t\t\tnew Object [] { 1041, 5 },\n\t\t\tnew Object [] { 65536, 0 },\n\t\t\tnew Object [] { 65537, 15 },\n\t\t\tnew Object [] { 100000, 4 }, \n\t\t\tnew Object [] { 2147483, 5 },\n\t\t\tnew Object [] { 2147483637, 1 }, //max - 10\n\t\t\tnew Object [] { 2147483646, 0 }, //max - 1\n\t\t\tnew Object [] { 2147483647, 0 } //max\n\t\t};\n\t}", "public double getHigh() { return high;}", "protected synchronized MemoryCache getExtremesLookupCache()\n {\n // Note that the extremes lookup cache does not belong to the WorldWind memory cache set, therefore it will not\n // be automatically cleared and disposed when World Wind is shutdown. However, since the extremes lookup cache\n // is a local reference to this elevation model, it will be reclaimed by the JVM garbage collector when this\n // elevation model is reclaimed by the GC.\n\n if (this.extremesLookupCache == null)\n {\n // Default cache size holds 1250 min/max pairs. This size was experimentally determined to hold enough\n // value lookups to prevent cache thrashing.\n long size = Configuration.getLongValue(AVKey.ELEVATION_EXTREMES_LOOKUP_CACHE_SIZE, 20000L);\n this.extremesLookupCache = new BasicMemoryCache((long) (0.85 * size), size);\n }\n\n return this.extremesLookupCache;\n }", "public HistoricalDataSource getUnderlying() {\n return _underlying;\n }", "protected void readAllData() {\n \n String query = buildDataQuery();\n \n try {\n ResultSet rs = executeQuery(query);\n ResultSetMetaData md = rs.getMetaData();\n \n //Construct the internal data containers\n _dataMap = new LinkedHashMap<String,double[]>();\n _textDataMap = new LinkedHashMap<String,String[]>();\n \n //Make containers to collect data as we get it from the ResultSet\n int ncol = md.getColumnCount();\n ResizableDoubleArray[] dataArrays = new ResizableDoubleArray[ncol]; //tmp holder for numeric data\n List<String>[] textDataLists = new List[ncol]; //tmp holder for text data\n for (int i=0; i<ncol; i++) {\n dataArrays[i] = new ResizableDoubleArray();\n textDataLists[i] = new ArrayList<String>();\n }\n\n //Define a Calendar so we get our times in the GMT time zone.\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n \n //Read data from the result set into the ResizableDoubleArray-s which are already in the _dataArrayMap.\n while (rs.next()) { \n for (int i=0; i<ncol; i++) {\n double d = Double.NaN;\n //Check type and read as appropriate\n //TODO: check for other variation of time and text types\n int typeID = md.getColumnType(i+1); \n \n if (typeID == java.sql.Types.TIMESTAMP) { //TODO: test for DATE and TIME types?\n //We need to convert timestamps to numerical values.\n Timestamp ts = rs.getTimestamp(i+1, cal);\n d = ts.getTime();\n } else if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) {\n //Text column. Save strings apart from other data.\n //They will appear as NaNs in the numeric data values.\n String s = rs.getString(i+1);\n textDataLists[i].add(s);\n } else d = rs.getDouble(i+1);\n \n dataArrays[i].addElement(d);\n }\n }\n \n //Extract the primitive arrays from the ResizableDoubleArray-s and put in data map.\n //Segregate the text data. Don't bother to save \"data\" (NaNs) for String types.\n for (int i=0; i<ncol; i++) {\n String name = md.getColumnName(i+1);\n int typeID = md.getColumnType(i+1);\n if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) { \n String[] text = new String[1];\n text = (String[]) textDataLists[i].toArray(text);\n _textDataMap.put(name, text);\n } else {\n double[] data = dataArrays[i].getElements();\n _dataMap.put(name, data);\n }\n }\n \n } catch (SQLException e) {\n String msg = \"Unable to process database query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n }", "void example1() {\n\t\t\n\t\tIndexedDataSource<Float64Member> data =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.DBL.construct(), 100);\n\n\t\tFloat64Member value = G.DBL.construct();\n\t\t\n\t\tGetV.fifth(data, value);\n\t\t\n\t\tvalue.setV(10101);\n\t\t\n\t\tSetV.eighteenth(data, value);\n\t}", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "public Long getAIntegerDataSourceValue() {\r\n return aIntegerDataSourceValue;\r\n }", "public double getHighPrice() {\n return this.highPrice;\n }", "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 EODataSource queryDataSource();", "protected double[] toArrayIncludingNoDataValues() {\r\n boolean handleOutOfMemoryError = false;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double[] array;\r\n if (((long) nrows * (long) ncols) > Integer.MAX_VALUE) {\r\n //throw new PrecisionExcpetion\r\n System.out.println(\r\n \"PrecisionException in \" + getClass().getName()\r\n + \".toArray()!\");\r\n System.out.println(\r\n \"Warning! The returned array size is only \"\r\n + Integer.MAX_VALUE + \" instead of \"\r\n + ((long) nrows * (long) ncols));\r\n }\r\n array = new double[nrows * ncols];\r\n int row;\r\n int col;\r\n int count = 0;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n array[count] = getCell( row, col);\r\n count++;\r\n }\r\n }\r\n return array;\r\n }", "Source updateDatasourceZ3950Timestamp(Source ds) throws RepoxException;", "BigDecimal getHighPrice();", "public DatasetPerformance getDatasetPerformance() {\n return this.datasetPerformance;\n }", "public Texture getTexture(ImageData dataSource, int filter) throws IOException {\n/* 387 */ int target = 3553;\n/* */ \n/* */ \n/* 390 */ ByteBuffer textureBuffer = dataSource.getImageBufferData();\n/* */ \n/* */ \n/* 393 */ int textureID = createTextureID();\n/* 394 */ TextureImpl texture = new TextureImpl(\"generated:\" + dataSource, target, textureID);\n/* */ \n/* 396 */ int minFilter = filter;\n/* 397 */ int magFilter = filter;\n/* 398 */ boolean flipped = false;\n/* */ \n/* */ \n/* 401 */ GL.glBindTexture(target, textureID);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 410 */ int width = dataSource.getWidth();\n/* 411 */ int height = dataSource.getHeight();\n/* 412 */ boolean hasAlpha = (dataSource.getDepth() == 32);\n/* */ \n/* 414 */ texture.setTextureWidth(dataSource.getTexWidth());\n/* 415 */ texture.setTextureHeight(dataSource.getTexHeight());\n/* */ \n/* 417 */ int texWidth = texture.getTextureWidth();\n/* 418 */ int texHeight = texture.getTextureHeight();\n/* */ \n/* 420 */ int srcPixelFormat = hasAlpha ? 6408 : 6407;\n/* 421 */ int componentCount = hasAlpha ? 4 : 3;\n/* */ \n/* 423 */ texture.setWidth(width);\n/* 424 */ texture.setHeight(height);\n/* 425 */ texture.setAlpha(hasAlpha);\n/* */ \n/* 427 */ IntBuffer temp = BufferUtils.createIntBuffer(16);\n/* 428 */ GL.glGetInteger(3379, temp);\n/* 429 */ int max = temp.get(0);\n/* 430 */ if (texWidth > max || texHeight > max) {\n/* 431 */ throw new IOException(\"Attempt to allocate a texture to big for the current hardware\");\n/* */ }\n/* */ \n/* 434 */ if (this.holdTextureData) {\n/* 435 */ texture.setTextureData(srcPixelFormat, componentCount, minFilter, magFilter, textureBuffer);\n/* */ }\n/* */ \n/* 438 */ GL.glTexParameteri(target, 10241, minFilter);\n/* 439 */ GL.glTexParameteri(target, 10240, magFilter);\n/* */ \n/* */ \n/* 442 */ GL.glTexImage2D(target, \n/* 443 */ 0, \n/* 444 */ this.dstPixelFormat, \n/* 445 */ get2Fold(width), \n/* 446 */ get2Fold(height), \n/* 447 */ 0, \n/* 448 */ srcPixelFormat, \n/* 449 */ 5121, \n/* 450 */ textureBuffer);\n/* */ \n/* 452 */ return texture;\n/* */ }", "@Test\n public void testFilterGoodData() throws Exception {\n assertEquals(300.0, maxFilter.filter(300.0), .01);\n assertEquals(2342342.213, maxFilter.filter(2342342.213), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(840958239423.123213123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(0.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-123210.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-0.00087868761232123), .01);\n }", "void example4() {\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list1 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 100);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list2 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 1000);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> joinedList =\n\t\t\t\tnew ConcatenatedDataSource<>(list1, list2);\n\t\t\n\t\tFill.compute(G.UINT1, G.UINT1.random(), joinedList);\n\t}", "void example14() {\n\t\t\n\t\t// original data: a bunch of ints\n\t\t\n\t\tIndexedDataSource<SignedInt32Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.INT32.construct(), 100);\n\t\t\n\t\t// a procedure to transforms ints to doubles\n\t\t\n\t\tProcedure2<SignedInt32Member,Float64Member> intToDblProc =\n\t\t\t\tnew Procedure2<SignedInt32Member, Float64Member>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void call(SignedInt32Member a, Float64Member b) {\n\t\t\t\tb.setV(a.v());\n\t\t\t}\n\t\t};\n\t\t\t\t\n\t\t// a procedure to transforms doubles to ints\n\t\t\n\t\tProcedure2<Float64Member,SignedInt32Member> dblToIntProc =\n\t\t\t\tnew Procedure2<Float64Member,SignedInt32Member>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void call(Float64Member a, SignedInt32Member b) {\n\t\t\t\tb.setV((int) a.v());\n\t\t\t}\n\t\t};\n\t\t\n\t\t// the definition of the transformed data source\n\t\t\n\t\tIndexedDataSource<Float64Member> xformer = \n\t\t\t\tnew TransformedDataSource<>(G.INT32, list, intToDblProc, dblToIntProc);\n\n\t\t// now calculate some results. Notice that Mean can't normally be used on\n\t\t// integer data\n\t\t\n\t\t// not possible: Integers do not have the correct type of division operator\n\t\t\n\t\t// SignedInt32Member resI = G.INT32.construct();\n\t\t\n\t\t// Mean.compute(G.INT32, list, resI);\n\t\t\n\t\t// with the transformer we can calc mean\n\n\t\tFloat64Member result = G.DBL.construct();\n\t\t\n\t\tMean.compute(G.DBL, xformer, result);\n\t}", "public DataImpl getData() {\n RealTupleType domain = overlay.getDomainType();\n TupleType range = overlay.getRangeType();\n \n float[][] setSamples = nodes;\n float r = color.getRed() / 255f;\n float g = color.getGreen() / 255f;\n float b = color.getBlue() / 255f;\n float[][] rangeSamples = new float[3][setSamples[0].length];\n Arrays.fill(rangeSamples[0], r);\n Arrays.fill(rangeSamples[1], g);\n Arrays.fill(rangeSamples[2], b);\n \n FlatField field = null;\n try {\n GriddedSet fieldSet = new Gridded2DSet(domain,\n setSamples, setSamples[0].length, null, null, null, false);\n FunctionType fieldType = new FunctionType(domain, range);\n field = new FlatField(fieldType, fieldSet);\n field.setSamples(rangeSamples);\n }\n catch (VisADException exc) { exc.printStackTrace(); }\n catch (RemoteException exc) { exc.printStackTrace(); }\n return field;\n }", "public float getMicGainDb();", "private DownSamplingLevels(int samplingSeconds, byte valueInRowKey, int maxReturnEventsForQuery) {\n this.samplingSeconds = samplingSeconds;\n this.valueInRowKey = valueInRowKey;\n this.maxReturnEventsForQuery = maxReturnEventsForQuery;\n this.maxPeriodInOneRow = samplingSeconds * maxReturnEventsForQuery; \n }", "public abstract LocalDateDoubleTimeSeries getTimeSeries(ObservableKey key);", "int maxSecondsForRawSampleRow();", "public interface TimeSeriesQuerier {\n /**\n * Initialize method. Any one time initialization is done here.\n *\n * @param conf Configuration for implementation of TopologyMetrics.\n * @throws ConfigException throw when instance can't be initialized with this configuration (misconfigured).\n */\n void init (Map<String, String> conf) throws ConfigException;\n\n /**\n * Query metrics to time-series DB. The result should aggregate all components metrics to one (meaning topology level).\n *\n * @param topologyName topology name (not ID)\n * @param metricName metric name\n * @param aggrFunction function to apply while aggregating task level series\n * @param from beginning of the time period: timestamp (in milliseconds)\n * @param to end of the time period: timestamp (in milliseconds)\n * @return Map of data points which are paired to (timestamp, value)\n */\n Map<Long, Double> getTopologyLevelMetrics(String topologyName, String metricName, AggregateFunction aggrFunction, long from, long to);\n\n /**\n * Query metrics to time-series DB.\n *\n * @param topologyName topology name (not ID)\n * @param componentId component id\n * @param metricName metric name\n * @param aggrFunction function to apply while aggregating task level series\n * @param from beginning of the time period: timestamp (in milliseconds)\n * @param to end of the time period: timestamp (in milliseconds)\n * @return Map of data points which are paired to (timestamp, value)\n */\n Map<Long, Double> getMetrics(String topologyName, String componentId, String metricName, AggregateFunction aggrFunction, long from, long to);\n\n /**\n * Query metrics without modification (raw) to time-series DB.\n *\n * @param metricName metric name\n * @param parameters parameters separated by ',', and represented as 'key=value'\n * @param from beginning of the time period: timestamp (in milliseconds)\n * @param to end of the time period: timestamp (in milliseconds)\n * @return Map of metric name and Map of data points which are paired to (timestamp, value)\n */\n Map<String, Map<Long, Double>> getRawMetrics(String metricName, String parameters, long from, long to);\n\n /**\n * Function to apply while aggregating multiple series\n */\n enum AggregateFunction {\n SUM, AVG, MIN, MAX\n }\n}", "public long getHighWaterMark() {\n return this.highWaterMark;\n }", "Stream<DataPoint> getHistoryData(Symbol symbol, LocalDateTime startTime, LocalDateTime endTime, int numberOfPoints);", "public abstract void load(LongDoublesCol col, DataInputStream output) throws IOException;", "@Override\n\tpublic Plot2DDataSet getValues(float xmin, float xmax) throws UnsupportedOperationException {\n\t\tfinal JSONArray arr = new JSONArray();\n\t\tfinal Iterator<Object> it = data.getJSONArray(\"data\").iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tfinal JSONObject point = (JSONObject) it.next();\n\t\t\tfinal long x = point.getLong(\"x\");\n\t\t\t// TODO more efficient way to find first relevant timestamp\n\t\t\tif (x >= xmin && x <= xmax)\n\t\t\t\tarr.put(point);\n\t\t\telse if (x > xmax)\n\t\t\t\tbreak;\n\t\t}\n\t\tfinal JSONObject json = new JSONObject();\n\t\tjson.put(\"label\", id);\n\t\tjson.put(\"data\", arr);\n\t\treturn new ChartjsDataSet(id, json);\n\t}", "private XYMultipleSeriesDataset getdemodataset() {\n\t\t\tdataset1 = new XYMultipleSeriesDataset();// xy轴数据源\n\t\t\tseries = new XYSeries(\"温度 \");// 这个事是显示多条用的,显不显示在上面render设置\n\t\t\t// 这里相当于初始化,初始化中无需添加数据,因为如果这里添加第一个数据的话,\n\t\t\t// 很容易使第一个数据和定时器中更新的第二个数据的时间间隔不为两秒,所以下面语句屏蔽\n\t\t\t// 这里可以一次更新五个数据,这样的话相当于开始的时候就把五个数据全部加进去了,但是数据的时间是不准确或者间隔不为二的\n\t\t\t// for(int i=0;i<5;i++)\n\t\t\t// series.add(1, Math.random()*10);//横坐标date数据类型,纵坐标随即数等待更新\n\n\t\t\tdataset1.addSeries(series);\n\t\t\treturn dataset1;\n\t\t}", "public String getOriginalPriceHigh() {\n return this.OriginalPriceHigh;\n }", "@DataProvider()\n\tpublic Object[][] getData() {\n\t\t\n\t\treturn ConstantsArray.getArrayData();\n\t}", "public void setHigh(java.math.BigDecimal high) {\n this.high = high;\n }", "public DataStreamObject(int newLimit) {\n\t\tlimit = newLimit;\n\t\tdata = new double[limit];\n\t}", "private double getOEEPerformance(Batch batch) {\n return 1;\n }", "int cacheRowsWhenScan();", "void example6() {\n\t\n\t\t// allocate some data\n\t\t\n\t\tIndexedDataSource<ComplexFloat32Member> data =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.CFLT.construct(), 1234);\n\t\t\n\t\t// elsewhere fill it with something\n\t\t\n\t\t// then define an out of bounds padding that is all zero\n\t\t\n\t\tProcedure2<Long,ComplexFloat32Member> proc = new Procedure2<Long, ComplexFloat32Member>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void call(Long a, ComplexFloat32Member b) {\n\t\t\t\tb.setR(0);\n\t\t\t\tb.setI(0);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// tie the padding and the zero proc together. reads beyond data's length will return 0\n\t\t\n\t\tIndexedDataSource<ComplexFloat32Member> padded =\n\t\t\t\tnew ProcedurePaddedDataSource<>(G.CFLT, data, proc);\n\t\t\n\t\t// compute an ideal power of two size that the FFT algorithm will want to use\n\t\t\n\t\tlong idealSize = FFT.enclosingPowerOf2(data.size());\n\t\t\n\t\t// make the FixedsizeDataSource here that satisfies the FFT algorithm's requirements\n\t\t\n\t\tIndexedDataSource<ComplexFloat32Member> fixedSize =\n\t\t\t\tnew FixedSizeDataSource<>(idealSize, padded);\n\t\t\n\t\t// allocate the same amount of space for the results\n\t\t\n\t\tIndexedDataSource<ComplexFloat32Member> outList =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.CFLT.construct(), idealSize);\n\n\t\t// and compute the FFT\n\t\t\n\t\tFFT.compute(G.CFLT, G.FLT, fixedSize, outList);\n\t}", "public abstract double readAsDbl(int offset);", "public boolean isHighPerformanceNeeded() { return highPerformanceNeeded; }", "public double getHighPrice() {\r\n\t\treturn highPrice;\r\n\t}", "public abstract double GetRaw();", "@Override\r\n protected boolean isUseDataSource() {\r\n return true;\r\n }", "@Test\n\tpublic void testResourcesForChainedOperators() throws Exception {\n\t\tResourceSpec resource1 = new ResourceSpec(0.1, 100);\n\t\tResourceSpec resource2 = new ResourceSpec(0.2, 200);\n\t\tResourceSpec resource3 = new ResourceSpec(0.3, 300);\n\t\tResourceSpec resource4 = new ResourceSpec(0.4, 400);\n\t\tResourceSpec resource5 = new ResourceSpec(0.5, 500);\n\t\tResourceSpec resource6 = new ResourceSpec(0.6, 600);\n\t\tResourceSpec resource7 = new ResourceSpec(0.7, 700);\n\n\t\tMethod opMethod = Operator.class.getDeclaredMethod(\"setResources\", ResourceSpec.class);\n\t\topMethod.setAccessible(true);\n\n\t\tMethod sinkMethod = DataSink.class.getDeclaredMethod(\"setResources\", ResourceSpec.class);\n\t\tsinkMethod.setAccessible(true);\n\n\t\tMapFunction<Long, Long> mapFunction = new MapFunction<Long, Long>() {\n\t\t\t@Override\n\t\t\tpublic Long map(Long value) throws Exception {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t};\n\n\t\tFilterFunction<Long> filterFunction = new FilterFunction<Long>() {\n\t\t\t@Override\n\t\t\tpublic boolean filter(Long value) throws Exception {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\n\t\tExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n\t\tDataSet<Long> input = env.fromElements(1L, 2L, 3L);\n\t\topMethod.invoke(input, resource1);\n\n\t\tDataSet<Long> map1 = input.map(mapFunction);\n\t\topMethod.invoke(map1, resource2);\n\n\t\t// CHAIN(Source -> Map -> Filter)\n\t\tDataSet<Long> filter1 = map1.filter(filterFunction);\n\t\topMethod.invoke(filter1, resource3);\n\n\t\tIterativeDataSet<Long> startOfIteration = filter1.iterate(10);\n\t\topMethod.invoke(startOfIteration, resource4);\n\n\t\tDataSet<Long> map2 = startOfIteration.map(mapFunction);\n\t\topMethod.invoke(map2, resource5);\n\n\t\t// CHAIN(Map -> Filter)\n\t\tDataSet<Long> feedback = map2.filter(filterFunction);\n\t\topMethod.invoke(feedback, resource6);\n\n\t\tDataSink<Long> sink = startOfIteration.closeWith(feedback).output(new DiscardingOutputFormat<Long>());\n\t\tsinkMethod.invoke(sink, resource7);\n\n\t\tPlan plan = env.createProgramPlan();\n\t\tOptimizer pc = new Optimizer(new Configuration());\n\t\tOptimizedPlan op = pc.compile(plan);\n\n\t\tJobGraphGenerator jgg = new JobGraphGenerator();\n\t\tJobGraph jobGraph = jgg.compileJobGraph(op);\n\n\t\tJobVertex sourceMapFilterVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(0);\n\t\tJobVertex iterationHeadVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(1);\n\t\tJobVertex feedbackVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(2);\n\t\tJobVertex sinkVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(3);\n\t\tJobVertex iterationSyncVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(4);\n\n\t\tassertTrue(sourceMapFilterVertex.getMinResources().equals(resource1.merge(resource2).merge(resource3)));\n\t\tassertTrue(iterationHeadVertex.getPreferredResources().equals(resource4));\n\t\tassertTrue(feedbackVertex.getMinResources().equals(resource5.merge(resource6)));\n\t\tassertTrue(sinkVertex.getPreferredResources().equals(resource7));\n\t\tassertTrue(iterationSyncVertex.getMinResources().equals(resource4));\n\t}", "public List<Number> getData() {\n return data;\n }", "@Override\r\n\tpublic FPGAResource getHardwareResourceUsage() {\r\n\t\tint lutCount = 0;\r\n\r\n\t\tValue inputValue = getDataPort().getValue();\r\n\t\tfor (int i = 0; i < inputValue.getSize(); i++) {\r\n\t\t\tBit inputBit = inputValue.getBit(i);\r\n\t\t\tif (!inputBit.isConstant() && inputBit.isCare()) {\r\n\t\t\t\tlutCount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFPGAResource hwResource = new FPGAResource();\r\n\t\thwResource.addLUT(lutCount);\r\n\r\n\t\treturn hwResource;\r\n\t}", "public interface DataSourceFromParallelCollection extends DataSource{\n\n public static final String SPLITABLE_ITERATOR = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_SPLIT_ITERATOR;\n\n public static final String CLASS = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_CLASS;\n\n\n}", "@Override\n public DataSource getDataSource() {\n\n // PostgreSQL does not provide connection pool (as of version 42.1.3) so make one using Apache Commons DBCP \n ds = new BasicDataSource();\n\n // max number of active connections\n Integer maxTotal = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxTotal\");\n if (maxTotal == null) {\n maxTotal = 8;\n } else {\n log.info(\"Max number of active connections is \"\n + maxTotal);\n }\n ds.setMaxTotal(maxTotal);\n\n // wait time for new connection\n Integer maxWaitMillis = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxWaitMillis\");\n if (maxWaitMillis == null) {\n maxWaitMillis = 60 * 1000;\n } else {\n log.info(\"Connection creation wait is \"\n + maxWaitMillis\n + \" msec\");\n }\n ds.setMaxWaitMillis(maxWaitMillis);\n\n String logAbandoned = System.getProperty(\"dbcp.logAbandoned\");\n if (logAbandoned != null && (\"true\".equalsIgnoreCase(logAbandoned))\n || \"1\".equalsIgnoreCase(logAbandoned)) {\n String removeAbandonedTimeoutString = System.getProperty(\"dbcp.removeAbandonedTimeout\");\n int removeAbandonedTimeout = (int) ds.getMaxWaitMillis() / (2 * 1000);\n if (!StringUtils.isNullOrEmpty(removeAbandonedTimeoutString)) {\n removeAbandonedTimeout = Integer.parseInt(removeAbandonedTimeoutString);\n }\n log.info(\n \"Will log and remove abandoned connections if not cleaned in \"\n + removeAbandonedTimeout\n + \" sec\");\n // log not closed connections\n ds.setLogAbandoned(true); // issue stack trace of not closed connection\n ds.setAbandonedUsageTracking(true);\n ds.setLogExpiredConnections(true);\n ds.setRemoveAbandonedTimeout(removeAbandonedTimeout);\n ds.setRemoveAbandonedOnBorrow(true);\n ds.setRemoveAbandonedOnMaintenance(true);\n ds.setAbandonedLogWriter(new PrintWriter(System.err));\n }\n ds.setValidationQuery(\"SELECT 1\");\n ds.setDriverClassName(getDriverClass().getName());\n ds.setUsername(user);\n ds.setPassword(password);\n ds.setUrl(getURL());\n return ds;\n }", "@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}", "@Override\n protected IDeserializationConverter createInternalConverter(LogicalType type) {\n switch (type.getTypeRoot()) {\n case CHAR:\n case VARCHAR:\n // reuse bytes\n return (IDeserializationConverter<byte[], StringData>) StringData::fromBytes;\n case BOOLEAN:\n return (IDeserializationConverter<byte[], Boolean>) Bytes::toBoolean;\n case BINARY:\n case VARBINARY:\n return value -> value;\n case DECIMAL:\n DecimalType decimalType = (DecimalType) type;\n final int precision = decimalType.getPrecision();\n final int scale = decimalType.getScale();\n return (IDeserializationConverter<byte[], DecimalData>)\n value -> {\n BigDecimal decimal = Bytes.toBigDecimal(value);\n return DecimalData.fromBigDecimal(decimal, precision, scale);\n };\n case TINYINT:\n return (IDeserializationConverter<byte[], Byte>) value -> value[0];\n case SMALLINT:\n return (IDeserializationConverter<byte[], Short>) Bytes::toShort;\n case INTEGER:\n case DATE:\n case INTERVAL_YEAR_MONTH:\n return (IDeserializationConverter<byte[], Integer>) Bytes::toInt;\n case TIME_WITHOUT_TIME_ZONE:\n final int timePrecision = getPrecision(type);\n if (timePrecision < MIN_TIME_PRECISION || timePrecision > MAX_TIME_PRECISION) {\n throw new UnsupportedOperationException(\n String.format(\n \"The precision %s of TIME type is out of the range [%s, %s] supported by \"\n + \"HBase connector\",\n timePrecision, MIN_TIME_PRECISION, MAX_TIME_PRECISION));\n }\n return (IDeserializationConverter<byte[], Integer>) Bytes::toInt;\n case BIGINT:\n case INTERVAL_DAY_TIME:\n return (IDeserializationConverter<byte[], Long>) Bytes::toLong;\n case FLOAT:\n return (IDeserializationConverter<byte[], Float>) Bytes::toFloat;\n case DOUBLE:\n return (IDeserializationConverter<byte[], Double>) Bytes::toDouble;\n case TIMESTAMP_WITHOUT_TIME_ZONE:\n case TIMESTAMP_WITH_LOCAL_TIME_ZONE:\n final int timestampPrecision = getPrecision(type);\n if (timestampPrecision < MIN_TIMESTAMP_PRECISION\n || timestampPrecision > MAX_TIMESTAMP_PRECISION) {\n throw new UnsupportedOperationException(\n String.format(\n \"The precision %s of TIMESTAMP type is out of the range [%s, %s] supported by \"\n + \"HBase connector\",\n timestampPrecision,\n MIN_TIMESTAMP_PRECISION,\n MAX_TIMESTAMP_PRECISION));\n }\n return (IDeserializationConverter<byte[], TimestampData>)\n value -> {\n // TODO: support higher precision\n long milliseconds = Bytes.toLong(value);\n return TimestampData.fromEpochMillis(milliseconds);\n };\n default:\n throw new UnsupportedOperationException(\"Unsupported type: \" + type);\n }\n }", "public synchronized TimeSeriesIterator read() {\n //TODO: The read object returns the values at a point instead of returning all values when\n // called. Change it.\n return new CachingVarBitTimeSeriesIterator(size, timestamps.read(), values.read());\n }", "public double getHigh() {\n return high;\n }", "public void setHigh(double value){high = value;}", "ReadOnlyDoubleProperty displayMaximumProperty();", "private void addOrReplaceDataSeries() {\n int chartMode;\n try {\n m_pLock.lock();\n chartMode = mChartMode;\n } finally {\n m_pLock.unlock();\n }\n\n if (m_pLineChart.getData().size() > 0) {\n m_pLineChart.getData().clear();\n }\n\n switch (chartMode) {\n case CHART_MODE_2_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_2SEC);\n m_pLineChart.getData().add(m_pDataSeries2_2SEC);\n m_pLineChart.getData().add(m_pDataSeries3_2SEC);\n break;\n case CHART_MODE_10_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_10SEC);\n m_pLineChart.getData().add(m_pDataSeries2_10SEC);\n m_pLineChart.getData().add(m_pDataSeries3_10SEC);\n break;\n case CHART_MODE_30_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_30SEC);\n m_pLineChart.getData().add(m_pDataSeries2_30SEC);\n m_pLineChart.getData().add(m_pDataSeries3_30SEC);\n break;\n case CHART_MODE_5_MINUTES:\n m_pLineChart.getData().add(m_pDataSeries1_5MIN);\n m_pLineChart.getData().add(m_pDataSeries2_5MIN);\n m_pLineChart.getData().add(m_pDataSeries3_5MIN);\n break;\n default:\n break;\n }\n\n m_pXAxis.setDisable(true);\n int chartRange;\n int tickUnit;\n ObservableList<XYChart.Data<Number, Number>> observableList1, observableList2, observableList3;\n switch (mChartMode) {\n case CHART_MODE_2_SECONDS:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n case CHART_MODE_10_SECONDS:\n observableList1 = m_pDataSerieObservableList1_10SEC;\n observableList2 = m_pDataSerieObservableList2_10SEC;\n observableList3 = m_pDataSerieObservableList3_10SEC;\n chartRange = X_AXIS_RANGE_10_SECOND_MODE;\n tickUnit = X_AXIS_TICK_10_SECOND_MODE;\n break;\n case CHART_MODE_30_SECONDS:\n observableList1 = m_pDataSerieObservableList1_30SEC;\n observableList2 = m_pDataSerieObservableList2_30SEC;\n observableList3 = m_pDataSerieObservableList3_30SEC;\n chartRange = X_AXIS_RANGE_30_SECOND_MODE;\n tickUnit = X_AXIS_TICK_30_SECOND_MODE;\n break;\n case CHART_MODE_5_MINUTES:\n observableList1 = m_pDataSerieObservableList1_5MIN;\n observableList2 = m_pDataSerieObservableList2_5MIN;\n observableList3 = m_pDataSerieObservableList3_5MIN;\n chartRange = X_AXIS_RANGE_5_MINUTE_MODE;\n tickUnit = X_AXIS_TICK_5_MINUTE_MODE;\n break;\n default:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n }\n\n if (observableList1.isEmpty() == false && observableList2.isEmpty() == false && observableList3.isEmpty() == false) {\n double maxValue = Math.max(Math.max(observableList1.get(observableList1.size() - 1).getXValue().doubleValue(),\n observableList2.get(observableList1.size() - 1).getXValue().doubleValue()),\n observableList3.get(observableList1.size() - 1).getXValue().doubleValue());\n double newLowerBound = maxValue - chartRange;\n double newUpperBound = maxValue;\n m_pXAxis.setLowerBound(newLowerBound);\n m_pXAxis.setUpperBound(newUpperBound);\n m_pXAxis.setTickUnit(tickUnit);\n m_pXAxis.setDisable(false);\n }\n \n // Update if there is some data series which is not to be plotted\n boolean toPlotDataSeries1 = mToPlotDataSeries1;\n boolean toPlotDataSeries2 = mToPlotDataSeries2;\n boolean toPlotDataSeries3 = mToPlotDataSeries3;\n mToPlotDataSeries1 = true;\n mToPlotDataSeries2 = true;\n mToPlotDataSeries3 = true; \n switchDataSeriesStatus(1, toPlotDataSeries1);\n switchDataSeriesStatus(2, toPlotDataSeries2);\n switchDataSeriesStatus(3, toPlotDataSeries3);\n \n\n }", "public static RawStore wrap(final double... data) {\n return new RawStore(new double[][] { data }, data.length);\n }", "@SuppressWarnings(\"unused\")\n\tvoid example17() {\n\t\t\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// then create a new memory copy of those 2000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> theCopy = DeepCopy.compute(G.FLT, trimmed);\n\t}", "public static DataSource getNonTXDataSource() throws SQLException {\n return getDataSource(FxContext.get().getDivisionId(), false);\n }", "Object getRawData();", "public int getHighSpeed() {\r\n return this.highSpeed;\r\n }", "@Bean\r\n\tpublic DataSource getDataSource() {\r\n\t\tfinal HikariDataSource dataSource = new HikariDataSource();\r\n\t\t/*\r\n\t\t * The Following is the Oracle Database Configuration With Hikari Datasource\r\n\t\t */\r\n\t\tdataSource.setMaximumPoolSize(maxPoolSize);\r\n\t\tdataSource.setMinimumIdle(minIdleTime);\r\n\t\tdataSource.setDriverClassName(driver);\r\n\t\tdataSource.setJdbcUrl(url);\r\n\t\tdataSource.addDataSourceProperty(\"user\", userName);\r\n\t\tdataSource.addDataSourceProperty(\"password\", password);\r\n\t\tdataSource.addDataSourceProperty(\"cachePrepStmts\", cachePrepareStmt);\r\n\t\tdataSource.addDataSourceProperty(\"prepStmtCacheSize\", prepareStmtCacheSize);\r\n\t\tdataSource.addDataSourceProperty(\"prepStmtCacheSqlLimit\", prepareStmtCacheSqlLimit);\r\n\t\tdataSource.addDataSourceProperty(\"useServerPrepStmts\", useServerPrepareStmt);\r\n\t\treturn dataSource;\r\n\t}", "@RequiresIdFrom(type = Governor.class)\n\t@Override\n\tpublic String dataRow()\n\t{\n\t\treturn String.format(\"%d,%s\", first, second.getSqlId());\n\t}", "@Override\r\n public List<RelationalValueSource> relationalValueSources() {\n List<RelationalValueSource> valueSources = new ArrayList<RelationalValueSource>();\r\n valueSources.add(new ColumnSourceImpl(fieldMeta));\r\n return valueSources;\r\n }", "public List<Double> getData() {\n return data;\n }", "DataStreamApi getDataStreamApi();", "public List<Double> getData( ) {\r\n return data;\r\n }", "@SuppressWarnings(\"unused\")\n\tvoid example15() {\n\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// the trimmed list has length 2,000 and is indexed from 0 to 1,999 returning data from\n\t\t// locations 1,000 - 2,999 in the original list.\n\t\t\n\t}", "public abstract Float getGeonorCapacity(int stationId) throws DataAccessException;", "public DefaultPieDataset getMaxDataRateLBL(){\n\t\treturn maxDataRateLBL;\n\t}", "public interface RdaSource<T> extends AutoCloseable {\n /**\n * Retrieve some number of objects from the source and pass them to the sink for processing.\n *\n * @param maxToProcess maximum number of objects to retrieve from the source\n * @param maxPerBatch maximum number of objects to collect into a batch before calling the sink\n * @param maxRunTime maximum amount of time to run before returning\n * @param sink to receive batches of objects\n * @return total number of objects processed (sum of results from calls to sink)\n */\n int retrieveAndProcessObjects(\n int maxToProcess, int maxPerBatch, Duration maxRunTime, RdaSink<T> sink)\n throws ProcessingException;\n}", "@Override\n\tprotected void initDataSource() {\n\t}", "String FormatDataType(int dataType, int scale, int precision);", "public interface C2007e {\n C3224j getData();\n\n float getMaxHighlightDistance();\n\n int getMaxVisibleCount();\n\n float getYChartMax();\n\n float getYChartMin();\n}", "public abstract SqlParameterSource getSqlParameterSource();", "public static DataSource getDataSource() throws SQLException {\n return getDataSource(FxContext.get().getDivisionId(), true);\n }", "public java.math.BigDecimal getANumberDataSourceValue() {\r\n return aNumberDataSourceValue;\r\n }", "void example12() {\n\t\t\n\t\t// an example of passing data to algorithms in reverse order\n\t\t\n\t\t// make some data\n\t\t\n\t\tIndexedDataSource<SignedInt32Member> nums =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.INT32.construct(), \n\t\t\t\tnew int[] {-1, 345, 1, -3044, 0, 0, 1066, -12});\n\t\t\n\t\t// sort it\n\t\t\n\t\tSort.compute(G.INT32, nums);\n\t\t\n\t\t// this is how the results look\n\t\t// nums = [-3044, -12, -1, 0, 0, 1, 345, 1066]\n\t\t\n\t\t// now wrap a reverse filter around the data\n\t\t\n\t\tIndexedDataSource<SignedInt32Member> revNums = new ReversedDataSource<>(nums);\n\n\t\t// sort using the filter\n\t\t\n\t\tSort.compute(G.INT32, revNums);\n\t\t\n\t\t// this is how the results look\n\t\t// revNums = [-3044, -12, -1, 0, 0, 1, 345, 1066]\n\t\t// nums = [1066, 345, 1, 0, 0, -1, -12, -3044]\n\t\t\n\t\t// now here is a some code showing some another way to use the filter\n\t\t\n\t\tSignedInt32Member value = G.INT32.construct();\n\t\t\n\t\tGetV.second(revNums, value);\n\t\t\n\t\t// gets the second value in the reverse list. so it gets the second to last\n\t\t// value in the original list.\n\t\t// value = -12\n\t}", "public abstract Statement queryToRetrieveData();", "Source createDatasourceOAI(Source ds, Provider prov) throws RepoxException;", "public double getNextRawSample();", "public double toNumber() {\n\t\treturn high * 4.294967296E9 + (this.low & 0x00000000FFFFFFFFL);\n\t}", "protected AbstractDoubleSpliterator(long param1Long, int param1Int) {\n/* 1617 */ this.est = param1Long;\n/* 1618 */ this.characteristics = ((param1Int & 0x40) != 0) ? (param1Int | 0x4000) : param1Int;\n/* */ }", "private void resample(){\n\n\t\tint iRow;\n\t\t\n\t\t//saving copies\n\t\tif(rgdX0==null){\n\t\t\trgdX0=rgdX;\n\t\t\trgdY0=rgdY;\n\t\t}\n\t\t\n\t\t//initializing resamples\n\t\trgdX = new double[rgdX0.length][rgdX0[0].length];\n\t\trgdY = new double[rgdY0.length];\n\t\t\n\t\t//resampling\n\t\tfor(int i=0;i<rgdX.length;i++){\n\t\t\tiRow = rnd1.nextInt(rgdX.length);\n\t\t\tfor(int j=0;j<rgdX[0].length;j++){\n\t\t\t\trgdX[i][j]=rgdX0[iRow][j];\n\t\t\t}\n\t\t\trgdY[i]=rgdY0[iRow];\n\t\t}\n\t\tloadData(rgdX,rgdY);\n\t\tthis.mapCoefficients=null;\n\t}", "T getRowData(int rowNumber);", "private String externalConversion() {\n int reading = ((record[19] & 255) + ((record[21] & 0x03) << 8));\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = externalConversion.eval(variables);\n\n String x = result + \"\";\n\n if(this.counter){\n x = Integer.parseInt(x) * (60/rate) + \"\";\n }\n\n return x;\n }", "public MetricValuesReader(Date startTime, Date endTime, CassandraConnectionInfo connectionInfo) {\n super(startTime, endTime, connectionInfo);\n timeSeriesReader = new MetricTimeSeriesReader(startTime, endTime, connectionInfo);\n }", "private void readData () throws SQLException {\n int currentFetchSize = getFetchSize();\n setFetchSize(0);\n close();\n setFetchSize(currentFetchSize);\n moveToInsertRow();\n\n CSVRecord record;\n\n for (int i = 1; i <= getFetchSize(); i++) {\n lineNumber++;\n try {\n\n if (this.records.iterator().hasNext()) {\n record = this.records.iterator().next();\n\n for (int j = 0; j <= this.columnsTypes.length - 1; j++) {\n\n switch (this.columnsTypes[j]) {\n case \"VARCHAR\":\n case \"CHAR\":\n case \"LONGVARCHAR\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n case \"INTEGER\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateInt(j + 1, Integer.parseInt(record.get(j)));\n break;\n case \"TINYINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateByte(j + 1, Byte.parseByte(record.get(j)));\n break;\n case \"SMALLINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateShort(j + 1, Short.parseShort(record.get(j)));\n break;\n case \"BIGINT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateLong(j + 1, Long.parseLong(record.get(j)));\n break;\n case \"NUMERIC\":\n case \"DECIMAL\":\n /*\n * \"0\" [0,0]\n * \"0.00\" [0,2]\n * \"123\" [123,0]\n * \"-123\" [-123,0]\n * \"1.23E3\" [123,-1]\n * \"1.23E+3\" [123,-1]\n * \"12.3E+7\" [123,-6]\n * \"12.0\" [120,1]\n * \"12.3\" [123,1]\n * \"0.00123\" [123,5]\n * \"-1.23E-12\" [-123,14]\n * \"1234.5E-4\" [12345,5]\n * \"0E+7\" [0,-7]\n * \"-0\" [0,0]\n */\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBigDecimal(j + 1, new BigDecimal(record.get(j)));\n break;\n case \"DOUBLE\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDouble(j + 1, Double.parseDouble(record.get(j)));\n break;\n case \"FLOAT\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateFloat(j + 1, Float.parseFloat(record.get(j)));\n break;\n case \"DATE\":\n // yyyy-[m]m-[d]d\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateDate(j + 1, Date.valueOf(record.get(j)));\n break;\n case \"TIMESTAMP\":\n // yyyy-[m]m-[d]d hh:mm:ss[.f...]\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTimestamp(j + 1, Timestamp.valueOf(record.get(j)));\n break;\n case \"TIME\":\n // hh:mm:ss\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateTime(j + 1, Time.valueOf(record.get(j)));\n break;\n case \"BOOLEAN\":\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateBoolean(j + 1, convertToBoolean(record.get(j)));\n break;\n default:\n if (getStringOrNull(record.get(j)) == null) updateNull(j + 1);\n else updateString(j + 1, record.get(j));\n break;\n }\n }\n\n insertRow();\n incrementRowCount();\n }\n } catch (Exception e) {\n LOG.error(\"An error has occurred reading line number {} of the CSV file\", lineNumber, e);\n throw e;\n }\n }\n\n moveToCurrentRow();\n beforeFirst(); \n }" ]
[ "0.54160184", "0.48494434", "0.4815403", "0.45366895", "0.45184293", "0.4506705", "0.44943598", "0.44226918", "0.43941543", "0.43889076", "0.43852603", "0.43579665", "0.43473658", "0.4290796", "0.42374077", "0.41883942", "0.41792166", "0.41557842", "0.41535515", "0.41192457", "0.41084918", "0.40931773", "0.40920687", "0.4082989", "0.40810388", "0.40567473", "0.40312964", "0.40162167", "0.39937377", "0.3981365", "0.3980785", "0.39735323", "0.39730704", "0.39693552", "0.3964981", "0.39636645", "0.39606962", "0.39568678", "0.39504606", "0.39496192", "0.39404643", "0.3937966", "0.3931272", "0.39243367", "0.39233953", "0.39175153", "0.39137608", "0.3911872", "0.39106026", "0.39051446", "0.3897082", "0.38937837", "0.3891449", "0.3890198", "0.38848674", "0.3879547", "0.3878692", "0.3861185", "0.3859425", "0.38566256", "0.3850961", "0.38501737", "0.38455924", "0.38449684", "0.3843533", "0.38411862", "0.38396475", "0.38393036", "0.3839192", "0.38318145", "0.38287452", "0.38212648", "0.38151544", "0.38148943", "0.38127849", "0.37926778", "0.37926134", "0.37903744", "0.37889645", "0.3785644", "0.37854603", "0.37753144", "0.37741503", "0.37718663", "0.37717637", "0.37715027", "0.37697425", "0.37686402", "0.3763083", "0.37591293", "0.3758689", "0.37554574", "0.3752505", "0.3748519", "0.37347016", "0.37344462", "0.37288934", "0.37244743", "0.3722455", "0.37193415" ]
0.46540937
3
ReversedDataSource Sometimes you want to be able to pull values out of a list in reverse order. If you want you can write a for loop from max to min. But Zorbage does provide a ReversedDataSource filter in case you want to pass data in reverse order to algorithms or if you want to write straightforward for loops and just concentrate on the writing of your algorithm.
void example12() { // an example of passing data to algorithms in reverse order // make some data IndexedDataSource<SignedInt32Member> nums = nom.bdezonia.zorbage.storage.Storage.allocate(G.INT32.construct(), new int[] {-1, 345, 1, -3044, 0, 0, 1066, -12}); // sort it Sort.compute(G.INT32, nums); // this is how the results look // nums = [-3044, -12, -1, 0, 0, 1, 345, 1066] // now wrap a reverse filter around the data IndexedDataSource<SignedInt32Member> revNums = new ReversedDataSource<>(nums); // sort using the filter Sort.compute(G.INT32, revNums); // this is how the results look // revNums = [-3044, -12, -1, 0, 0, 1, 345, 1066] // nums = [1066, 345, 1, 0, 0, -1, -12, -3044] // now here is a some code showing some another way to use the filter SignedInt32Member value = G.INT32.construct(); GetV.second(revNums, value); // gets the second value in the reverse list. so it gets the second to last // value in the original list. // value = -12 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void reverseRange(int index, int count, int stride);", "public void reverse(boolean ascending) {\n\t\tif (!ascending)\n\t\t\tCollections.reverse(FlightData.ITEMS);\n\t}", "public static void reverseIterative(int[] data) {\n int low = 0, high = data.length - 1;\n while (low < high) { // swap data[low] and data[high]\n int temp = data[low];\n data[low++] = data[high]; // post-increment of low\n data[high--] = temp; // post-decrement of high\n }\n }", "@JSProperty(\"reversed\")\n boolean getReversed();", "public void reverse() {\n\n\t\tif (head == null) {\n\t\t\tSystem.out.println(\"List is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tint nodes = nodeCounter();\n\t\tDLNode t = tail.prev;\n\t\thead = tail;\n\t\tfor (int i = 0; i < nodes - 1; i++) {\n\n\t\t\tif (t.list == null && t.val != Integer.MIN_VALUE) {\n\t\t\t\tthis.reverseHelperVal(t.val);\n\t\t\t\tt = t.prev;\n\t\t\t} else {\n\t\t\t\tthis.reverseHelperList(t.list);\n\t\t\t\tt = t.prev;\n\t\t\t}\n\t\t}\n\t\ttail.next = null;\n\t\thead.prev = null;\n\n\t}", "public static void main(String[] args) {\n Integer arr[] = {10, 20, 30, 40, 50}; \n \n System.out.println(\"Original Array : \" + \n Arrays.toString(arr)); \n \n // Please refer below post for details of asList() \n \n Collections.reverse(Arrays.asList(arr)); \n \n System.out.println(\"Modified Array : \" + \n Arrays.toString(arr)); \n\t\t\n\t\t\n\t\t\n\t}", "public static <V> Stream<V> reverseStream(List<V> values) {\n\t\tint size = values.size();\n\t\treturn IntStream.rangeClosed(1, size)\n\t\t\t\t.mapToObj(i -> values.get(size - i));\n\t}", "@NonNull\n ConsList<E> reverse();", "public static void main(String[] args) {\n \n LinkedList<Integer> l = new LinkedList<Integer>();\n l.add(1);\n l.add(2);\n l.add(3);\n l.add(4);\n ReverseCollection rev = new ReverseCollection();\n rev.reverse(l);\n System.out.println(Arrays.toString(l.toArray()));\n\n }", "public Iterable<Integer> reverseOrder() {\r\n\t\treturn reverseOrder;\r\n\t}", "public void reverseList(List<Integer> list) {\n for (int i = list.size() - 1; i >= 0; i--) {\n System.out.println(list.get(i));\n }\n }", "public DoubleLinkedSeq reverse(){\r\n\t DoubleLinkedSeq rev = new DoubleLinkedSeq();\r\n\t for(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\t rev.addBefore(this.getCurrent());\r\n\t }\r\n\t \r\n\t return rev; \r\n }", "public List<E> reverseList(List<E> toReverse) {\n\t\tfor (int i = 0; i < toReverse.size() / 2; i++) {\n\t\t\tE temp = toReverse.get(i);\n\t\t\ttoReverse.set(i, toReverse.get(toReverse.size() - 1 - i));\n\t\t\ttoReverse.set(toReverse.size() - 1 - i, temp);\n\t\t}\n\t\treturn toReverse;\n\t}", "public void _reverse() {\n\n var prev = first;\n var current = first.next;\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = prev;\n prev = current;\n current = next;\n\n }\n first = prev;\n\n }", "public static void main(String[] args) {\n List list = new ArrayList<>();\n list.add(10);\n list.add(50);\n list.add(30);\n list.add(60);\n list.add(20);\n list.add(90);\n list.add(20);\n \n// Iterator i = list.iterator();\n System.out.println(\"Printing Given Array..\");\n// while(i.hasNext())\n// {\n// \t System.out.println(i.next());\n// }\n for(int j=0;j<list.size();j++)\n {\n \t System.out.println(list.get(j));\n }\n \n Comparator cmp = Collections.reverseOrder();\n Collections.sort(list, cmp);\n System.out.println(\"printing list in descending order..\");\n Iterator i2 = list.iterator();\n while(i2.hasNext())\n {\n \t System.out.println(i2.next());\n }\n\t}", "public static void main(String args[]) {\n LinkedList ll = new LinkedList();\n ll.add(new Integer(-8));\n ll.add(new Integer(20));\n ll.add(new Integer(-20));\n ll.add(new Integer(8));\n\n // Create a reverse order comparator\n Comparator r = Collections.reverseOrder();\n\n // Sort list by using the comparato\n Collections.sort(ll, r);\n\n // Get iterator\n Iterator li = ll.iterator();\n System.out.print(\"List soreted in reverse: \");\n\n while(li.hasNext()) {\n System.out.print(li.next() + \" \");\n }\n System.out.println();\n Collections.shuffle(ll);\n\n // display randomized list\n li = ll.iterator();\n System.out.print(\"List shffled: \");\n\n while(li.hasNext()) {\n System.out.print(li.next() + \" \");\n }\n \n System.out.println();\n System.out.println(\"Minimum: \" + Collections.min(ll));\n System.out.println(\"Maximum: \" + Collections.max(ll));\n }", "@Override\n public Iterator<E> reverseIterator() {\n return collection.iterator();\n }", "private static Node reverseList(Node start) {\n Node runner = start;\n // initialize the return value\n Node rev = null;\n // set the runner to the last item in the list\n while (runner != null) {\n Node next = new Node(runner.value);\n next.next = rev;\n rev = next;\n runner = runner.next;\n }\n return rev;\n }", "@Test\n public void testReverseRow(){\n ROW.getReverseRow(ROW.getIndex());\n }", "@JSProperty(\"reversed\")\n void setReversed(boolean value);", "public void setReverse(boolean reverse) {\n\t\tif (isReverse != reverse) {\n\t\t\tisReverse = reverse;\n\t\t\tpauseMusic();\n\t\t\tint position;\n\t\t\tif (isReverse) {\n\t\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(musicSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(reverseSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(wahDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revWahDistortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah) {\n\t\t\t\t\tposition = alGetSourcei(wahSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revWahSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(distortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(revDistortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(reverseSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(musicSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah && isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(revWahDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(wahDistortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isWah) {\n\t\t\t\t\tposition = alGetSourcei(revWahSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(wahSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t\telse if (isDistorted) {\n\t\t\t\t\tposition = alGetSourcei(revDistortSourceIndex, AL_BYTE_OFFSET);\n\t\t\t\t\talSourcei(distortSourceIndex, AL_BYTE_OFFSET, musicSize - position);\n\t\t\t\t}\n\t\t\t}\n\t\t\tplayMusic();\n\t\t}\n\t}", "public static List<Object> reverseObjectList(List<Object> toReverse) {\n\t\tfor (int i = 0; i < toReverse.size() / 2; i++) {\n\t\t\tObject temp = toReverse.get(i);\n\t\t\ttoReverse.set(i, toReverse.get(toReverse.size() - 1 - i));\n\t\t\ttoReverse.set(toReverse.size() - 1 - i, temp);\n\t\t}\n\t\treturn toReverse;\n\t}", "public void reverse() {\n var previous = first;\n var current = first.next;\n\n last = first;\n last.next = null;\n while (current != null) {\n var next = current.next;\n current.next = previous;\n previous = current;\n current = next;\n\n }\n first = previous;\n\n }", "public static void main (String[] args)\r\n {\r\n List<String> list = Arrays.asList(\"C\", \"C++\", \"Java\");\r\n \r\n // use ListIterator to iterate List in reverse order\r\n ListIterator<String> itr = list.listIterator(list.size());\r\n \r\n // hasPrevious() returns true if the list has previous element\r\n while (itr.hasPrevious()) {\r\n System.out.println(itr.previous());\r\n }\r\n }", "public List reverseTopologicalSort( ){\r\n return this.topologicalsorting.reverseTraverse();\r\n }", "@Property\n @Report(Reporting.GENERATED)\n public boolean reverse_of_reversed_is_equal_to_original(@ForAll List<?> original) {\n return Lists.reverse(Lists.reverse(original)).equals(original);\n }", "public boolean supportsReverseComparison() {\n return true;\n }", "private Code genArgsInReverse(ExpNode.ArgumentsNode args) {\n beginGen(\"ArgsInReverse\");\n List<ExpNode> argList = args.getArgs();\n Code code = new Code();\n for(int i = argList.size()-1; 0 <= i; i--) {\n code.append(argList.get(i).genCode(this));\n }\n endGen(\"ArgsInReverse\");\n return code;\n }", "public static void main(String[] args) {\n\t\tList<Integer> integerList=new ArrayList<Integer>();\n\t\tintegerList.add(1);\n\t\tintegerList.add(2);\n\t\tintegerList.add(3);\n\t\tSystem.out.println(integerList);\n\t\tSystem.out.println(reverseElements(integerList));\n\t}", "public void reverse_Iteratively_Data() throws Exception {\r\n\t\tint left = 0, right = this.size() - 1;\r\n\r\n\t\twhile (left <= right) {\r\n\t\t\tNode leftNode = this.getNodeAt(left);\r\n\t\t\tNode rightNode = this.getNodeAt(right);\r\n\r\n\t\t\tT temp = leftNode.data;\r\n\t\t\tleftNode.data = rightNode.data;\r\n\t\t\trightNode.data = temp;\r\n\r\n\t\t\tleft++;\r\n\t\t\tright--;\r\n\t\t}\r\n\t}", "public ListNode reverse(ListNode prev, ListNode start, ListNode end) {\n\t\tListNode current = start.next;\n\t\tListNode preCurrent = start;\n\t\twhile(current != end){\n\t\t\tListNode temp = current.next;\n\t\t\tcurrent.next = preCurrent;\n\t\t\tpreCurrent = current;\n\t\t\tcurrent = temp;\n\t\t}\n\t\tstart.next = end.next;\n\t\tend.next = preCurrent;\n\t\tprev.next = end;\n\t\treturn start;\n\t}", "public static void reverse(java.util.List arg0)\n { return; }", "public static void reverse(ArrayList<City> routine, int index1 , int index2){\n ArrayList <City> temp = new ArrayList <>(routine.subList(index1, index2));\n Collections.reverse(temp);\n int j = 0;\n for(int i = index1; i < index2; i++){\n routine.set(i, temp.get(j));\n j++;\n }\n }", "private static ArrayList<Long> reverse(ArrayList<Long> arrayList) {\n\t\tArrayList<Long> result = new ArrayList<Long>();\n\t\tfor(int i=arrayList.size()-1; i>=0; i--)\n\t\t result.add(arrayList.get(i));\n\t\treturn result;\n\t }", "public Set<String> zrevrange(String key, int start, int end){\n Jedis jedis = null;\n try{\n jedis = getJedis();\n return jedis.zrevrange(key,start,end);\n }catch (Exception e){\n logger.error(\"发生异常:\"+e.getMessage());\n }finally {\n if(jedis!=null)\n jedis.close();\n }\n return null;\n }", "public static void reverse(double[] p, int from, int to) {\n\t\tdouble tmp;\n\t\tint l = to-1;\n\t\tint k = from;\n\t\tfor (; k<l; k++, l--) {\n\t\t\ttmp = p[k];\n\t\t\tp[k] = p[l];\n\t\t\tp[l] = tmp;\n\t\t}\n\t}", "@Test\n public void testReverse() {\n System.out.println(\"reverse\");\n al.add(1);\n al.add(2);\n al.add(3);\n ArrayList<Integer> rl = new ArrayList<>();\n rl.add(3);\n rl.add(2);\n rl.add(1);\n al.reverse();\n assertEquals(rl.get(0), al.get(0));\n assertEquals(rl.get(1), al.get(1));\n assertEquals(rl.get(2), al.get(2));\n }", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public boolean getReverse() {\r\n return Reverse;\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static List reverse(List list)\r\n\t{\r\n\t\tList newList = new ArrayList();\r\n\t\t\r\n\t\tfor(int x = list.size()-1; x>=0; x--)\r\n\t\t{\r\n\t\t\tnewList.add(list.get(x));\r\n\t\t}\r\n\t\t\r\n\t\treturn newList;\r\n\t\t\r\n\t\t\r\n\t}", "public static IntArrayList reverse(IntArrayList list) {\n final int[] buffer = list.buffer;\n int tmp;\n for (int start = 0, end = list.size() - 1; start < end; start++, end--) {\n // swap the values\n tmp = buffer[start];\n buffer[start] = buffer[end];\n buffer[end] = tmp;\n }\n return list;\n }", "@Test\n void descendingSetLowerReturnsCorrectValue() {\n assertEquals(Integer.valueOf(1), reverseSet.lower(0));\n assertEquals(Integer.valueOf(2), reverseSet.lower(1));\n assertEquals(Integer.valueOf(4), reverseSet.lower(2));\n assertEquals(Integer.valueOf(4), reverseSet.lower(3));\n assertEquals(Integer.valueOf(6), reverseSet.lower(4));\n assertEquals(Integer.valueOf(6), reverseSet.lower(5));\n assertEquals(Integer.valueOf(9), reverseSet.lower(6));\n assertEquals(Integer.valueOf(9), reverseSet.lower(7));\n assertEquals(Integer.valueOf(9), reverseSet.lower(8));\n assertNull(reverseSet.lower(9));\n assertNull(reverseSet.lower(10));\n }", "public String getReverse() {\r\n return reverse;\r\n }", "public E[] reverseList(E[] toReverse) {\n\t\tfor (int i = 0; i < toReverse.length / 2; i++) {\n\t\t\tE temp = toReverse[i];\n\t\t\ttoReverse[i] = toReverse[toReverse.length - 1 - i];\n\t\t\ttoReverse[toReverse.length - 1 - i] = temp;\n\t\t}\n\t\treturn toReverse;\n\t}", "private ArrayList<Double> reverseInputBranch(ArrayList<Double> inputBranchArray)\r\n\t{\r\n\t\tArrayList<Double> reversedArray = new ArrayList<Double>();\r\n\r\n\t\tfor (int i = 0; i < inputBranchArray.size(); i++) {\r\n\t\t\treversedArray.add(inputBranchArray.get(inputBranchArray.size() - 1 - i));\r\n\t\t}\r\n\r\n\t\tinputIsFlipped = true;\r\n\t\treturn reversedArray;\r\n\t}", "LinkedListDemo reverse() {\n\t\tListNode rev = null; // rev will be the reversed list.\n\t\tListNode current = getHead(); // For running through the nodes of list.\n\t\twhile (current != null) {\n\t\t\t// construct a new node\n\t\t\tListNode newNode = new ListNode();\n\t\t\t// copy the data to new node from runner\n\t\t\tnewNode.data = current.data;\n\t\t\t// \"Push\" the next node of list onto the front of rev.\n\t\t\tnewNode.next = rev;\n\t\t\trev = newNode;\n\t\t\t// Move on to the next node in the list.\n\t\t\tcurrent = current.next;\n\t\t}\n\t\treturn new LinkedListDemo(rev);\n\t}", "void reverse();", "void reverse();", "public static void main(String[] args) {\n\n\t\tint arr[]= {1,2,3,4,5};\n\t\treverse(arr, arr.length);\n\t\t\n\t\tfor(int i: arr) System.out.println(i);\n\t\t\n\t}", "public void sortDescending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items, Collections.reverseOrder());\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}", "public static <T> void reverse(T[] p, int from, int to) {\n\t\tT tmp;\n\t\tint l = to-1;\n\t\tint k = from;\n\t\tfor (; k<l; k++, l--) {\n\t\t\ttmp = p[k];\n\t\t\tp[k] = p[l];\n\t\t\tp[l] = tmp;\n\t\t}\n\t}", "private void reverse(ListNode startNode, ListNode endNode) {\n endNode.next = null;\n ListNode pre = startNode, cur = startNode.next, newEnd = pre;\n while (cur != null) {\n ListNode nextNode = cur.next;\n cur.next = pre;\n pre = cur;\n cur = nextNode;\n }\n }", "private static void iterateLinkedListInReverseOrder() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\t\tCollections.reverse(list);\n\t\tSystem.out.println(\"Reverse the LinkedList is : \" + list);\n\t}", "private <T> Collection<T> reverse(Collection<T> col) {\n List<T> list = new ArrayList<>();\n col.forEach(list::add);\n Collections.reverse(list);\n return list;\n }", "public void setReverse(boolean reverse) {\n\t\t_reverse = reverse;\n\t}", "public Set<String> zrevrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrevrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "private void reverse(int[] nums, int start, int end) {\n\t\twhile(start<end)\n\t\t{\n\t\t\tswap(nums,start++,end--);\n\t\t}\n\t}", "public static LinkedList<Integer> Reverse2(LinkedList<Integer> list) {\n\t\tLinkedList<Integer> listReverse = new LinkedList<Integer>();\n\t\tIterator<Integer> re = list.descendingIterator();\n\t\twhile (re.hasNext()) {\n\t\t\tlistReverse.add(re.next());\n\t\t}\n\n\t\treturn listReverse;\n\t}", "void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}", "public static void main(String[] args) {\n int[] array = {1,2,3,4,5,6,7,8,9,10};\n System.out.println(\"The original array is:\"+Arrays.toString(array));\n reverse(array);\n }", "public Iterator<Vertex> reverseIterator() {\n \t\n \treturn new ReverseIterator<Vertex>(vertices, vertices.length-1);\n }", "public List reverseTopologicalSort( Vertex startat ){\r\n return this.topologicalsorting.reverseTraverse( startat );\r\n }", "public static void main(String[] args) {\n\n Path path = Paths.get(\"reversed-lines\");\n List<String> list = new ArrayList<>();\n List<String> reversedList = new ArrayList<>();\n\n try {\n list = Files.readAllLines(path);\n\n } catch (Exception e) {\n System.err.println(e);\n }\n\n for (String string : list) {\n StringBuffer stringBuffer = new StringBuffer(string);\n stringBuffer.reverse();\n reversedList.add(stringBuffer.toString());\n }\n\n for (String string : reversedList) {\n System.out.println(string);\n }\n }", "void reverseList(){\n\n Node prev = null;\n Node next = null;\n Node iter = this.head;\n\n while(iter != null)\n {\n next = iter.next;\n iter.next = prev;\n prev = iter;\n iter = next;\n\n }\n\n //prev is the link to the head of the new list\n this.head = prev;\n\n }", "@GetMapping(\"/sort-desc\")\n public List<TeacherDTO> getSortedRevertTeachers() {\n return teacherService.getSortedRevertTeachers().stream()\n .map(this::convertToDto)\n .collect(Collectors.toList());\n }", "public DATATYPE reverse() {\n\t\tString[] lines = mLines;\n\t\t\n\t\tmLines = new String[lines.length];\n\t\t\n\t\tfor (int i=lines.length-1, x=0; i >= 0; i--, x++) {\n\t\t\tmLines[x] = lines[i];\n\t\t}\n\t\t\n\t\treturn (DATATYPE) this;\n\t}", "public static void reverse(float[] p, int from, int to) {\n\t\tfloat tmp;\n\t\tint l = to-1;\n\t\tint k = from;\n\t\tfor (; k<l; k++, l--) {\n\t\t\ttmp = p[k];\n\t\t\tp[k] = p[l];\n\t\t\tp[l] = tmp;\n\t\t}\n\t}", "public static <T> ReverseListIterator<T> reversed(List<T> original)\r\n\t{\r\n\t\treturn new ReverseListIterator<T>(original);\r\n\t}", "@Property\n @Report(Reporting.GENERATED)\n public boolean broken_reverse_property(@ForAll List<?> original) {\n return Lists.reverse(original).equals(original);\n }", "public void setReverseDirection(boolean reverseDirection)\n {\n mDirection = reverseDirection ? -1 : 1;\n }", "public IDnaStrand reverse();", "static void reverseArray(int arr[], int start, int end) \n { \n int temp; \n while (start < end) \n { \n temp = arr[start]; \n arr[start] = arr[end]; \n arr[end] = temp; \n start++; \n end--; \n } \n }", "public static void reverse(int[] p, int from, int to) {\n\t\tint tmp;\n\t\tint l = to-1;\n\t\tint k = from;\n\t\tfor (; k<l; k++, l--) {\n\t\t\ttmp = p[k];\n\t\t\tp[k] = p[l];\n\t\t\tp[l] = tmp;\n\t\t}\n\t}", "default @NotNull Iterator<E> reverseIterator() {\n final int ks = this.knownSize();\n if (ks == 0) {\n return Iterators.empty();\n }\n Iterator<E> it = this.iterator();\n if (!it.hasNext()) {\n return it;\n }\n ArrayBuffer<E> buffer = ks > 0\n ? new ArrayBuffer<>(ks)\n : new ArrayBuffer<>();\n while (it.hasNext()) {\n buffer.append(it.next());\n }\n\n @SuppressWarnings(\"unchecked\")\n Iterator<E> res = (Iterator<E>) GenericArrays.reverseIterator(buffer.toArray());\n return res;\n }", "void reverseDirection();", "@Override\n public CloseableIterator<KVPair> getRange(byte[] minKey, byte[] maxKey, boolean reverse) {\n Preconditions.checkState(!this.closed.get(), \"transaction closed\");\n return new XodusIter(this.store.openCursor(this.tx), minKey, maxKey, reverse);\n }", "public List<? extends O> applyAndReturnReverse(T target) throws OperationException;", "public static void displayReverse(ArrayList<String> list){\r\n //Loop through the list\r\n for(int i = list.size()-1; i >= 0; i--){\r\n System.out.print(list.get(i) + \" \"); \r\n }\r\n System.out.println();\r\n }", "@Test\n void descendingSetDescendingIteratorNextReturnsCorrectValue() {\n var it = reverseSet.descendingIterator();\n assertEquals(Integer.valueOf(1), it.next());\n assertEquals(Integer.valueOf(2), it.next());\n assertEquals(Integer.valueOf(4), it.next());\n assertEquals(Integer.valueOf(6), it.next());\n assertEquals(Integer.valueOf(9), it.next());\n }", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "public static void main(String[] args) {\n\t\tint [] a= {1,2,3,4,5,6,7};\n\t\trev(a,0,a.length-1);\t\n\t}", "@Test\n public void correctnessReverse() {\n final Iterator<Partition<Integer>> it = Partitions.lexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final Iterator<Partition<Integer>> itr = Partitions.reverseLexicographicEnumeration(Helper.newHashSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), new int[]{3, 5}, ImmutablePartition::new);\n final List<Partition<Integer>> partitions = new ArrayList<>();\n final List<Partition<Integer>> partitionsReverse = new ArrayList<>();\n while (it.hasNext() && itr.hasNext()) {\n final Partition<Integer> p = it.next();\n final Partition<Integer> pr = itr.next();\n partitions.add(p);\n partitionsReverse.add(pr);\n }\n Assert.assertTrue(!it.hasNext() && !itr.hasNext());\n Collections.reverse(partitionsReverse);\n Assert.assertEquals(partitions, partitionsReverse);\n }", "public void reverse() {\n\t\tNode previous = first;\n\t\tNode current = first.next;\n\n\t\twhile (current != null) {\n\t\t\tNode next = current.next;\n\t\t\tcurrent.next = previous;\n\n\t\t\tprevious = current;\n\t\t\tcurrent = next;\n\t\t}\n\t\tlast = first;\n\t\tlast.next = null;\n\t\tfirst = previous;\n\t}", "public void reverse() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n newSeq.add(seq.get(seq.size() - 1 - i));\n }\n seq = newSeq;\n }", "@Override\n public List<Message> findAllReverseOrder() {\n List<Message> messages = repository.findAll();\n\n // Reverse the list\n Collections.reverse(messages);\n\n return messages;\n }", "private static int[] reverseArray(int[] inputs) {\n for(int i =0; i < inputs.length/2; i++) {\n int tmp = inputs[i];\n int nextPosition = (inputs.length - i) -1;\n inputs[nextPosition] = tmp;\n }\n return inputs;\n }", "public Set<String> zrevrangeByScore(final String key, final double min, final double max) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrevrangeByScore(key, max, min);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public static void main(String args[]) {\n LinkedList linkedList = new LinkedList(5);\n linkedList.next = new LinkedList(4);\n linkedList.next.next = new LinkedList(3);\n linkedList.next.next.next = new LinkedList(2);\n linkedList.next.next.next.next = new LinkedList(1);\n\n System.out.println(\"Original Linked List: \" + linkedList.toString());\n\n // recursively reverse and print\n linkedList = recursiveReverse(linkedList);\n System.out.println(\"Recursively Reversed List: \" + linkedList.toString());\n\n // iteratively reverse and print\n linkedList = iterativeReverse(linkedList);\n System.out.println(\"Iteratively Recursed to Original: \" + linkedList.toString());\n }", "static void reverse(Linkedlists list){\r\n\t\tNode current=list.head;\r\n\r\n\t\tNode nextNode=null;\r\n\t\tNode previous=null;\r\n\t\twhile(current != null){\r\n\t\t\tnextNode=current.next;\r\n\t\t\t//System.out.println(\"current.next:\"+current.data);\r\n\t\t\tcurrent.next=previous;\r\n\t\t\tprevious=current;\r\n\t\t\tcurrent=nextNode;\r\n\r\n\t\t}\r\n\t\t//current.next=previous;\r\n\t\tlist.head=previous;\r\n\r\n\t}", "void reverse()\n\t{\n\t\tint a;\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\telse\n\t\t{\t\n\t\t\ta = dequeue();\n\t\t\treverse(); \n\t\t\tenqueue(a);\n\t\t}\n\t}", "@Test\n public void testReverseOrderSort() {\n BubbleSort<Integer> testing = new BubbleSort<>();\n\n testing.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return i2.compareTo(i1);\n }\n });\n\n checkReverseOrder(\"Bubble sort doesn't work with other comparator!\", array);\n }", "public Graphe reverse()\t{\r\n \tfor(Liaison route : this.routes)\r\n \t\tif(route.isSensUnique())\r\n \t\t\troute.reverse();\t//TODO check si reverse marche bien\r\n \treturn this;\r\n }", "@Test\n public void testIterator_Backward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n instance.next();\n }\n\n i = baseList.size() - 1;\n while (instance.hasPrevious()) {\n assertEquals(baseList.get(i--), instance.previous());\n }\n\n }", "public NodeRandom reverse(NodeRandom start)\n\t{\n\t\tNodeRandom curr=start;\n\t\t\n\t\tNodeRandom temp;\n\t\tNodeRandom prev2=null;\n\t\twhile(curr!=null)\n\t\t{\t\t\t\n\t\t\ttemp=curr.next;\t\t\t\n\t\t\tcurr.next=prev2;\n\t\t\tprev2=curr;\n\t\t\tcurr=temp;\n\t\t}\t\t\n\t\tNodeRandom newstart=prev2;\t\t\t\t\n\t\tSystem.out.println(\"reverse a list\");\n\t\tdisplay(newstart);\n\t\treturn newstart;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(reverse(\"foo\"));\n\t\tSystem.out.println(reverse(\"student\"));\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t System.out.println(Sample.name);\n\n\t\t\n\t\t\n\t\tint num=153,rev=0, value;\n\t\t\t\twhile(num!=0)\n\t\t\t\t{\n\t\t\t\t\tvalue=num%10;\n\t\t\t\t\trev=rev*10+value;\n\t\t\t\t\tnum=num/10;\n\t\t\t\t\tSystem.out.println(\"reverse value is \"+ rev);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tString string = \"sushma\";\n\t\t\t String reverse = new StringBuffer(string).reverse().toString();\n\t\t\t System.out.println(\"\\nString before reverse: \"+string);\n\t\t\t System.out.println(\"String after reverse: \"+reverse);\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t String name=\"siva\";\n\t\t\t int size=name.length();\n\t\t\t System.out.println(size);\n\t\t\t for(int i=size;i>0;--i)\n\t\t\t \t \n\t\t\t {\n\t\t\t \t System.out.print(name.charAt(i-1)); \n\t\t\t \t \n\n\t\t\t }\n\t\t\t \n\t\t\n\t\t\n\t}", "@SortingMethod\n public static int[] getReversedSortedArray(int length) {\n int[] array = new int[length];\n int value = length - 1;\n for (int i = 0; i < length - 1; i++) {\n array[i] = value--;\n }\n return array;\n }", "@Test\n void descendingSetDescendingSetReturnsOriginalSet() {\n assertArrayEquals(filledSet.toArray(), reverseSet.descendingSet().toArray());\n }", "private static int[] reverse(int[] original) {\n int size = original.length;\n int[] reversed = new int[size];\n for(int i=0; i<size; i++) {\n reversed[i]= original[size - i-1];\n }\n return reversed;\n }", "public <T> List<T> zrevrange(String key, long start, long end, Class<T> clazz) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n Set<byte[]> tempSet = jedis.zrevrange(key.getBytes(), start, end);\n if (tempSet != null && tempSet.size() > 0) {\n List<T> result = new ArrayList<T>();\n for (byte[] value : tempSet) {\n // result.add((T) HessianSerializer.deserialize(value));\n result.add(fromJsonByteArray(value, clazz));\n }\n return result;\n }\n return null;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }" ]
[ "0.6117988", "0.59237957", "0.568189", "0.56490505", "0.5577209", "0.55616575", "0.5557538", "0.5549322", "0.5491814", "0.5489024", "0.54004043", "0.5384293", "0.5377213", "0.5360394", "0.53326344", "0.53185195", "0.531835", "0.53130394", "0.53108996", "0.52884734", "0.5286661", "0.52861094", "0.5284643", "0.5267547", "0.52665883", "0.5254351", "0.5253807", "0.5252188", "0.5224571", "0.5195334", "0.51940686", "0.51935923", "0.5183663", "0.5182921", "0.5158197", "0.5158003", "0.5151255", "0.511404", "0.511404", "0.5113736", "0.5111677", "0.5081102", "0.507964", "0.50767374", "0.5073546", "0.50707036", "0.50524473", "0.50524473", "0.5052015", "0.50437194", "0.5032119", "0.5029902", "0.5029574", "0.5029333", "0.5024828", "0.5020164", "0.5016097", "0.50032157", "0.49974293", "0.49942684", "0.49706137", "0.49702454", "0.4965058", "0.49574724", "0.49506804", "0.49505612", "0.49505436", "0.4948327", "0.49374494", "0.49311182", "0.49280417", "0.49161023", "0.4907627", "0.48955685", "0.4890621", "0.4880573", "0.48704618", "0.48568505", "0.485638", "0.4854719", "0.48547187", "0.4839964", "0.48310745", "0.48223376", "0.4820699", "0.48080537", "0.480123", "0.4799256", "0.4797789", "0.47951332", "0.47687918", "0.47646582", "0.47609785", "0.4758957", "0.4758739", "0.47492862", "0.47438404", "0.47429973", "0.47402516", "0.473872" ]
0.62409014
0
SequencedDataSource Sometimes you want to access a datasource in a strided fashion. Zorbage provides multidimensional iteration code for many use cases. But sometimes you know you just want to fill a column or a plane or a volume etc. You can use a strided accessor (a SequencedDataSource) if you want to accomplish things quickly and simply.
void example13() { // create a list of zeroes IndexedDataSource<Float64Member> list = nom.bdezonia.zorbage.storage.Storage.allocate(G.DBL.construct(), 1000); // now setup a view that will increment by 3 starting at the list[4] and steps // up to 100 times. IndexedDataSource<Float64Member> seqData = new SequencedDataSource<Float64Member>(list, 4, 3, 100); seqData.size(); // size == 100 // now set a bunch of values Float64Member value = G.DBL.construct(); for (long i = 0; i < seqData.size(); i++) { value.setV(i); seqData.set(i, value); } // data = [0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, ...] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface DataSourceIterator extends Iterator<Data> {\n\n}", "public Iterator<IDatasetItem> iterateOverDatasetItems();", "public interface DataSourceWrapper<D> {\r\n\r\n public void openDataSource() throws Exception;\r\n \r\n public void preValidate() throws Exception;\r\n \r\n public void closeDataSource() throws Exception;\r\n \r\n public void setDataSource(D dataSource);\r\n \r\n public D getDataSource();\r\n \r\n public Iterator<Row> getRowIterator();\r\n \r\n}", "void example4() {\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list1 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 100);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> list2 = \n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT1.construct(), 1000);\n\t\t\n\t\tIndexedDataSource<UnsignedInt1Member> joinedList =\n\t\t\t\tnew ConcatenatedDataSource<>(list1, list2);\n\t\t\n\t\tFill.compute(G.UINT1, G.UINT1.random(), joinedList);\n\t}", "public interface PointsGenerator {\r\n\t/**\r\n\t * Creates a <code>Series</code> object, which supplies the points.\r\n\t * \r\n\t * @param dimension dimension of the unit cube from which the points are selected\r\n\t * @return <code>Series</code> iterator\r\n\t * @see de.torstennahm.series.Series\r\n\t */\r\n\tSeries<double[]> makeSeries(int dimension);\r\n}", "public interface DataSource<T> {\n\t/**\n\t * open data source.\n\t */\n\tpublic void open();\n\t/**\n\t * Get the next data object.\n\t * @return data object.\n\t */\n\tpublic T next();\n\t/**\n\t * move vernier to head.\n\t * @return\n\t */\n\tpublic void head();\n\t/**\n\t * close data source.\n\t */\n\tpublic void close();\n\t/**\n\t * get attributes. \n\t * @return\n\t */\n\tpublic Map<String, Object> attributes();\n}", "public interface DataSourceFromParallelCollection extends DataSource{\n\n public static final String SPLITABLE_ITERATOR = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_SPLIT_ITERATOR;\n\n public static final String CLASS = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_CLASS;\n\n\n}", "public IndexedDataSet<T> getDataSet();", "public IterableDataSource(final DataSourceImpl anotherDataSource) {\n super(anotherDataSource);\n }", "Source updateDatasourceZ3950IdSequence(Source ds) throws RepoxException;", "Iterator<TabularData> dataIterator();", "public interface IDataSource {\n\n Mat getX();\n\n Mat getY();\n\n List<Mat> getThetas();\n\n}", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public interface IDataSource<T, E> {\n void update(T data);\n int getItemCount();\n E getItemForPosition(int index);\n}", "@Override\n public Iterator<Row> iterator() {\n\n return new Iterator<Row>() {\n\n private final Row row = new Row(TableSlice.this);\n\n @Override\n public Row next() {\n return row.next();\n }\n\n @Override\n public boolean hasNext() {\n return row.hasNext();\n }\n };\n }", "public interface ISliceIterator extends IModelObject {\r\n\r\n\t/**\r\n\t * Check if there is next slice.\r\n\t * \r\n\t * @return Boolean type Created on 10/11/2008\r\n\t */\r\n\tboolean hasNext();\r\n\r\n\t/**\r\n\t * Jump to the next slice.\r\n\t * \r\n\t * Created on 10/11/2008\r\n\t */\r\n\tvoid next();\r\n\r\n\t/**\r\n\t * Get the next slice of Array.\r\n\t * \r\n\t * @return GDM Array\r\n\t * @throws InvalidRangeException\r\n\t * Created on 10/11/2008\r\n\t */\r\n\tIArray getArrayNext() throws InvalidRangeException;\r\n\r\n\t/**\r\n\t * Get the current slice of Array.\r\n\t * \r\n\t * @return GDM Array\r\n\t * @throws InvalidRangeException\r\n\t * Created on 10/11/2008\r\n\t */\r\n\tIArray getArrayCurrent() throws InvalidRangeException;\r\n\r\n\t/**\r\n\t * Get the shape of any slice that is returned. This could be used when a\r\n\t * temporary array of the right shape needs to be created.\r\n\t * \r\n\t * @return dimensions of a single slice from the iterator\r\n\t * @throws InvalidRangeException\r\n\t * invalid range\r\n\t */\r\n\tint[] getSliceShape() throws InvalidRangeException;\r\n\t\r\n\t/**\r\n\t * Get the slice position in the whole array from which this slice iterator\r\n\t * was created.\r\n\t * @return <code>int</code> array of the current position of the slice\r\n\t * @note rank of the returned position is the same as the IArray shape we are slicing \r\n\t */\r\n\tpublic int[] getSlicePosition();\r\n}", "public DataIterator getData(boolean forward);", "Source updateDatasourceOAI(Source ds) throws RepoxException;", "@Parameters\n // Método public static que devuelve un elemento iterable de array de objetos\n public static Iterable<Object[]> getData() {\n return Arrays.asList(new Object[][] {\n // Indicamos todas las pruebas {a, b, esperado}\n { 3, 1, 4 }, { 2, 3, 5 }, { 3, 3, 6 } });\n }", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "E getData(int index);", "public DataIterator getCompositeData(AddressSetView addrSet, boolean forward);", "public interface IterableSeries<M extends Moment> {\n\n SeriesIterator<? extends IterableSeries<M>,M> begin ();\n\n SeriesIterator<? extends IterableSeries<M>,M> beginFrom (int index);\n\n M getMoment (int index);\n\n int getMomentCount ();\n\n TimeSeries unwrapSeries ();\n\n}", "interface SingleRowSet extends RowSet {\n SingleRowSet toIndirect();\n SingleRowSet toIndirect(Set<Integer> skipIndices);\n SelectionVector2 getSv2();\n }", "public DataIterator getCompositeData(Address start, boolean forward);", "public DataIterator getCompositeData(boolean forward);", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "Series<double[]> makeSeries(int dimension);", "public DatasetIndex(Dataset data){\n\t\tthis();\n\t\tfor(Iterator<Example> i=data.iterator();i.hasNext();){\n\t\t\taddExample(i.next());\n\t\t}\n\t}", "@DataProvider\r\npublic Object[][] getData()\r\n{\n\tObject[][] data=new Object[3][3];\r\n\tdata[0][0]=\"1abcd\";\r\n\tdata[0][1]=\"1xyz\";\r\n\tdata[0][2]=\"1dsaf\";\r\n\t\r\n\t\r\n\tdata[1][0]=\"2abcd\";\r\n\tdata[1][1]=\"2xyz\";\r\n\tdata[1][2]=\"2dsaf\";\r\n\t\r\n\tdata[2][0]=\"3abcd\";\r\n\tdata[2][1]=\"3xyz\";\r\n\tdata[2][2]=\"3dsaf\";\r\n\t\r\n\t\r\n\t\r\n\t\r\n\treturn data;\r\n\t\r\n\t\r\n}", "public interface Array2D {\n}", "Object[] getDataRow(final int index);", "public org.landxml.schema.landXML11.SourceDataDocument.SourceData getSourceDataArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData target = null;\r\n target = (org.landxml.schema.landXML11.SourceDataDocument.SourceData)get_store().find_element_user(SOURCEDATA$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }", "Source createDatasourceZ3950IdSequence(Source ds, Provider prov) throws RepoxException;", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "void example2() {\n\t\t\n\t\tIndexedDataSource<HighPrecisionMember> list = ArrayDataSource.construct(G.HP, 1234);\n\t\t\n\t\t// fill the list with values\n\t\t\n\t\tFill.compute(G.HP, G.HP.unity(), list);\n\t\t\n\t\t// then calculate a result\n\n\t\tHighPrecisionMember result = G.HP.construct();\n\t\t\n\t\tSum.compute(G.HP, list, result); // result should equal 1234\n\t}", "DataFrame<R,C> sequential();", "public DataIterator getData(Address addr, boolean forward);", "@Override\n\tpublic DataSource getDataSource() {\t\t\n\t\treturn dataSource;\n\t}", "public interface RdaSource<T> extends AutoCloseable {\n /**\n * Retrieve some number of objects from the source and pass them to the sink for processing.\n *\n * @param maxToProcess maximum number of objects to retrieve from the source\n * @param maxPerBatch maximum number of objects to collect into a batch before calling the sink\n * @param maxRunTime maximum amount of time to run before returning\n * @param sink to receive batches of objects\n * @return total number of objects processed (sum of results from calls to sink)\n */\n int retrieveAndProcessObjects(\n int maxToProcess, int maxPerBatch, Duration maxRunTime, RdaSink<T> sink)\n throws ProcessingException;\n}", "public void setSourceDataArray(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData sourceData)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData target = null;\r\n target = (org.landxml.schema.landXML11.SourceDataDocument.SourceData)get_store().find_element_user(SOURCEDATA$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(sourceData);\r\n }\r\n }", "@Override\n\tprotected void initDataSource() {\n\t}", "public abstract DynamicDataRow makeUIRowData();", "public List<Dataset> getDatasets();", "@Override\n public Iterator<Iterable<T>> iterator() {\n return new TableIterator();\n }", "public DataSource getDataSource() {\n return dataSource;\n }", "public DataSource getDataSource() {\n return datasource;\n }", "public Iterator<T> iterator(){\r\n\t\treturn new ChainedArraysIterator();\r\n\t}", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "public EODataSource queryDataSource();", "public DataSource getDataSource() {\n return _dataSource;\n }", "public interface IMultiImageSource extends IImageSource {\n\n\n public IMultiImageSource next();\n\n public IMultiImageSource previous();\n\n public IImageData load(int index, ProgressListener plistener) throws BrainFlowException;\n\n public IImageData load(int index) throws BrainFlowException;\n\n public IImageSource getDataSource(int index);\n\n public int size();\n\n \n\n\n\n\n}", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "int[][] getData()\n {\n return block;\n }", "public XYDataset getDataset() {\n\n // Initialize some variables\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series[][][] = new XYSeries[rois.length][images.length][stats.length];\n String seriesname[][][] = new String[rois.length][images.length][stats.length];\n int currentSlice = ui.getOpenMassImages()[0].getCurrentSlice();\n ArrayList<String> seriesNames = new ArrayList<String>();\n String tempName = \"\";\n double stat;\n\n // Image loop\n for (int j = 0; j < images.length; j++) {\n MimsPlus image;\n if (images[j].getMimsType() == MimsPlus.HSI_IMAGE || images[j].getMimsType() == MimsPlus.RATIO_IMAGE) {\n image = images[j].internalRatio;\n } else {\n image = images[j];\n }\n\n // Plane loop\n for (int ii = 0; ii < planes.size(); ii++) {\n int plane = (Integer) planes.get(ii);\n if (image.getMimsType() == MimsPlus.MASS_IMAGE) {\n ui.getOpenMassImages()[0].setSlice(plane, false);\n } else if (image.getMimsType() == MimsPlus.RATIO_IMAGE) {\n ui.getOpenMassImages()[0].setSlice(plane, image);\n }\n\n // Roi loop\n for (int i = 0; i < rois.length; i++) {\n\n // Set the Roi to the image.\n Integer[] xy = ui.getRoiManager().getRoiLocation(rois[i].getName(), plane);\n rois[i].setLocation(xy[0], xy[1]);\n image.setRoi(rois[i]);\n\n // Stat loop\n for (int k = 0; k < stats.length; k++) {\n\n // Generate a name for the dataset.\n String prefix = \"\";\n if (image.getType() == MimsPlus.MASS_IMAGE || image.getType() == MimsPlus.RATIO_IMAGE) {\n prefix = \"_m\";\n }\n if (seriesname[i][j][k] == null) {\n tempName = stats[k] + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName();\n int dup = 1;\n while (seriesNames.contains(tempName)) {\n tempName = stats[k] + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName() + \" (\" + dup + \")\";\n dup++;\n }\n seriesNames.add(tempName);\n seriesname[i][j][k] = tempName;\n }\n\n // Add data to the series.\n if (series[i][j][k] == null) {\n series[i][j][k] = new XYSeries(seriesname[i][j][k]);\n }\n\n // Get the statistic.\n stat = getSingleStat(image, stats[k], ui);\n if (stat > Double.MAX_VALUE || stat < (-1.0) * Double.MAX_VALUE) {\n stat = Double.NaN;\n }\n series[i][j][k].add(((Integer) planes.get(ii)).intValue(), stat);\n\n } // End of Stat\n } // End of Roi\n } // End of Plane\n } // End of Image\n\n // Populate the final data structure.\n for (int i = 0; i < rois.length; i++) {\n for (int j = 0; j < images.length; j++) {\n for (int k = 0; k < stats.length; k++) {\n dataset.addSeries(series[i][j][k]);\n }\n }\n }\n\n ui.getOpenMassImages()[0].setSlice(currentSlice);\n\n return dataset;\n }", "public void setDataSource2(StarObjectClass self,StarObjectClass fd, int offset, int length){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tStarObjectClass assertfileclass = Service._GetObject(\"AssetFileDescriptorClass\");\r\n \t\tif( assertfileclass._IsInst(fd) == true ){\r\n \t\t\tStarCLEAssetFileDescriptor starfd = (StarCLEAssetFileDescriptor)WrapAndroidClass.GetAndroidObject(fd,\"AndroidObject\");\r\n \t\t\tif( starfd.assetfiledescriptor == null ){\r\n \t\t\t\tSrvGroup._Print(\"input fd is not init\");\r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \t\t\ttry{\r\n \t\t\t\tmediaplayer.setDataSource(starfd.assetfiledescriptor.getFileDescriptor(),offset,length);\r\n \t\t\t}catch(IOException e){\r\n \t\t\t\tSrvGroup._Print(e.toString());\r\n \t\t\t}\r\n \t\t}else\r\n \t\t\tSrvGroup._Print(\"input fd is invalid\");\r\n \t}", "public ChainedArraysIterator(){\r\n\t\t\tcurrentNode = beginMarker.next;\r\n\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\tidx = 0;\r\n\t\t\texpectedModCount=modCount;\r\n\t\t}", "public interface DataFrame<R,C> extends DataFrameOperations<R,C,DataFrame<R,C>>, DataFrameIterators<R,C>, DataFrameAlgebra<R,C> {\n /**\n * Checks if this DataFrame is empty, according to its number of rows.\n * @return true if the DataFrame is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Returns the row count for <code>DataFrame</code>\n * @return the row count\n */\n int rowCount();\n\n /**\n * Returns the column count for <code>DataFrame</code>\n * @return the column count\n */\n int colCount();\n\n /**\n * Returns true if this frame operates in parallel mode\n * @return true if parallel mode is enabled\n */\n boolean isParallel();\n\n /**\n * Returns a parallel implementation of the DataFrame\n * @return a parallel implementation of the DataFrame\n */\n DataFrame<R,C> parallel();\n\n /**\n * Returns a sequential implementation of the DataFrame\n * @return a sequential implementation of the DataFrame\n */\n DataFrame<R,C> sequential();\n\n /**\n * Returns a deep copy of this <code>DataFrame</code>\n * @return deep copy of this <code>DataFrame</code>\n */\n DataFrame<R,C> copy();\n\n /**\n * Returns a reference to the output interface for this <code>DataFrame</code>\n * @return the output interface for this <code>DataFrame</code>\n */\n DataFrameOutput<R,C> out();\n\n /**\n * Returns a reference to the content of this DataFrame\n * @return the data access interface for this frame\n */\n DataFrameContent<R,C> data();\n\n /**\n * Returns the row operator for this DataFrame\n * @return the row operator for this DataFrame\n */\n DataFrameRows<R,C> rows();\n\n /**\n * Returns the column operator for this DataFrame\n * @return the column operator for this DataFrame\n */\n DataFrameColumns<R,C> cols();\n\n /**\n * Returns a newly created cursor for random access to elements of this frame\n * @return the newly created cursor for element random access\n */\n DataFrameCursor<R,C> cursor();\n\n /**\n * Returns a reference to the row for the key specified\n * @param rowKey the row key to match\n * @return the matching row\n */\n DataFrameRow<R,C> row(R rowKey);\n\n /**\n * Returns a reference to the column for the key specified\n * @param colKey the column key to match\n * @return the matching column\n */\n DataFrameColumn<R,C> col(C colKey);\n\n /**\n * Returns a reference to a row for the ordinal specified\n * @param rowOrdinal the row ordinal\n * @return the matching row\n */\n DataFrameRow<R,C> rowAt(int rowOrdinal);\n\n /**\n * Returns a reference to a column for the ordinal specified\n * @param colIOrdinal the column ordinal\n * @return the matching column\n */\n DataFrameColumn<R,C> colAt(int colIOrdinal);\n\n /**\n * Returns a stream of values over this DataFrame\n * @return the stream of values over this DataFrame\n */\n Stream<DataFrameValue<R,C>> values();\n\n /**\n * Returns a reference to the fill interface for copy values\n * @return the fill interface for this <code>DataFrame</code>\n */\n DataFrameFill fill();\n\n /**\n * Returns the sign DataFrame of -1, 0, 1 for negative, zero and positive elements\n * @return a DataFrame of -1, 0, 1 for negative, zero and positive elements\n * @see <a href=\"http://en.wikipedia.org/wiki/Signum_function\">Wikiepdia Reference</a>\n */\n DataFrame<R,C> sign();\n\n /**\n * Returns the stats for this <code>DataFrame</code>\n * @return the stats for frame\n */\n Stats<Double> stats();\n\n /**\n * Returns the transpose of this DataFrame\n * @return the transpose of this frame\n */\n DataFrame<C,R> transpose();\n\n /**\n * Returns the rank interface for this <code>DataFrame</code>\n * @return the rank interface for the <code>DataFrame</code>\n */\n DataFrameRank<R,C> rank();\n\n /**\n * Returns the event notification interface for this DataFrame\n * @return the event notification interface\n */\n DataFrameEvents events();\n\n /**\n * Returns the write interface which provides a mechanism to write frames to a data store\n * @return the DataFrame write interface\n */\n DataFrameWrite<R,C> write();\n\n /**\n * Returns an interface that enables this frame to be exported as other types\n * @return the <code>DataFrame</code> export interface\n */\n DataFrameExport export();\n\n /**\n * Returns an interface that can be used to efficiently cap values in the frame\n * @param inPlace true if capping should be applied in place, otherwise cap & copy.\n * @return the DataFrame capping interface\n */\n DataFrameCap<R,C> cap(boolean inPlace);\n\n /**\n * Returns a DataFrame containing the first N rows where N=min(count, frame.rowCount())\n * @param count the max number of rows to capture\n * @return the DataFrame containing first N rows where N=min(count, frame.rowCount())\n */\n DataFrame<R,C> head(int count);\n\n /**\n * Returns a DataFrame containing the last N rows where N=min(count, frame.rowCount())\n * @param count the max number of rows to capture\n * @return the DataFrame containing last N rows where N=min(count, frame.rowCount())\n */\n DataFrame<R,C> tail(int count);\n\n /**\n * Returns a DataFrame containing the first N columns where N=min(count, frame.colCount())\n * @param count the max number of left most columns to include\n * @return the DataFrame containing the first B columns where N=min(count, frame.colCount())\n */\n DataFrame<R,C> left(int count);\n\n /**\n * Returns a DataFrame containing the last N columns where N=min(count, frame.colCount())\n * @param count the max number of right most columns to include\n * @return the DataFrame containing the last N columns where N=min(count frame.colCount())\n */\n DataFrame<R,C> right(int count);\n\n /**\n * Returns the calculation interface for this <code>DataFrame</code>\n * @return the calculation interface for the <code>DataFrame</code>\n */\n DataFrameCalculate<R,C> calc();\n\n /**\n * Returns the Principal Component Analysis interface for this DataFrame\n * @return the PCA interface for this DataFrame\n */\n DataFramePCA<R,C> pca();\n\n /**\n * Returns the DataFrame smoothing interface to apply SMA or an EWMA filter to the data\n * @param inPlace if true, smoothing will be applied to this frame, otherwise copy & smooth.\n * @return the DataFrame smoothing data smoothing interface\n */\n DataFrameSmooth<R,C> smooth(boolean inPlace);\n\n /**\n * Returns a reference to the regression interface for this DataFrame\n * @return the regression interface for this DataFrame\n */\n DataFrameRegression<R,C> regress();\n\n /**\n * Adds all rows & columns from the argument that do not exist in this frame, and applies data for added coordinates\n * @param other the other frame from which to add rows, columns & data that do not exist in this frame\n * @return the resulting frame with additional rows and columns\n */\n DataFrame<R,C> addAll(DataFrame<R,C> other);\n\n /**\n * Updates data in this frame based on update frame provided\n * @param update the DataFrame with updates to apply to this frame\n * @param addRows if true, add any missing row keys from the update\n * @param addColumns if true, add any missing column keys from the update\n * @return the updated DataFrame\n */\n DataFrame<R,C> update(DataFrame<R,C> update, boolean addRows, boolean addColumns);\n\n /**\n * Returns a <code>DataFrame</code> filter that includes a subset of rows and columns\n * @param rowKeys the row key selection\n * @param colKeys the column key selection\n * @return the <code>DataFrame</code> filter containing selected rows & columns\n */\n DataFrame<R,C> select(Iterable<R> rowKeys, Iterable<C> colKeys);\n\n /**\n * Returns a <code>DataFrame</code> selection that includes a subset of rows and columns\n * @param rowPredicate the predicate to select rows\n * @param colPredicate the predicate to select columns\n * @return the <code>DataFrame</code> containing selected rows & columns\n */\n DataFrame<R,C> select(Predicate<DataFrameRow<R,C>> rowPredicate, Predicate<DataFrameColumn<R,C>> colPredicate);\n\n /**\n * Returns a newly created DataFrame with all elements of this frame mapped to booleans\n * @param mapper the mapper function to apply\n * @return the newly created frame\n */\n DataFrame<R,C> mapToBooleans(ToBooleanFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a newly created DataFrame with all elements of this frame mapped to ints\n * @param mapper the mapper function to apply\n * @return the newly created frame\n */\n DataFrame<R,C> mapToInts(ToIntFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a newly created DataFrame with all elements of this frame mapped to longs\n * @param mapper the mapper function to apply\n * @return the newly created frame\n */\n DataFrame<R,C> mapToLongs(ToLongFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a newly created DataFrame with all elements of this frame mapped to doubles\n * @param mapper the mapper function to apply\n * @return the newly created frame\n */\n DataFrame<R,C> mapToDoubles(ToDoubleFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a newly created DataFrame with all elements of this frame mapped to objects\n * @param type the type for mapper function\n * @param mapper the mapper function to apply\n * @return the newly created frame\n */\n <T> DataFrame<R,C> mapToObjects(Class<T> type, Function<DataFrameValue<R,C>,T> mapper);\n\n /**\n * Returns a shallow copy of the DataFrame with the specified column mapped to booleans\n * @param colKey the column key to apply mapping function\n * @param mapper the mapper function to apply\n * @return the new frame\n * @throws DataFrameException if frame is transposed, or column does not exist\n */\n DataFrame<R,C> mapToBooleans(C colKey, ToBooleanFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a shallow copy of the DataFrame with the specified column mapped to ints\n * @param colKey the column key to apply mapping function\n * @param mapper the mapper function to apply\n * @return the new frame\n * @throws DataFrameException if frame is transposed, or column does not exist\n */\n DataFrame<R,C> mapToInts(C colKey, ToIntFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a shallow copy of the DataFrame with the specified column mapped to longs\n * @param colKey the column key to apply mapping function\n * @param mapper the mapper function to apply\n * @return the new frame\n * @throws DataFrameException if frame is transposed, or column does not exist\n */\n DataFrame<R,C> mapToLongs(C colKey, ToLongFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a shallow copy of the DataFrame with the specified column mapped to doubles\n * @param colKey the column key to apply mapping function\n * @param mapper the mapper function to apply\n * @return the new frame\n * @throws DataFrameException if frame is transposed, or column does not exist\n */\n DataFrame<R,C> mapToDoubles(C colKey, ToDoubleFunction<DataFrameValue<R,C>> mapper);\n\n /**\n * Returns a shallow copy of the DataFrame with the specified column mapped to objects\n * @param colKey the column key to apply mapping function\n * @param type the data type for mapped column\n * @param mapper the mapper function to apply\n * @return the new frame\n * @throws DataFrameException if frame is transposed, or column does not exist\n */\n <T> DataFrame<R,C> mapToObjects(C colKey, Class<T> type, Function<DataFrameValue<R,C>,T> mapper);\n\n /**\n * Returns a reference to the factory that creates new DataFrames\n * @return the DataFrame factory\n */\n static DataFrameFactory factory() {\n return DataFrameFactory.getInstance();\n }\n\n /**\n * Returns a reference to the DataFrame read interfavce\n * @return the DataFrame read interface\n */\n static DataFrameRead read() {\n return DataFrameFactory.getInstance().read();\n }\n\n /**\n * Returns an empty DataFrame with zero length rows and columns\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the empty DataFrame\n */\n static <R,C> DataFrame<R,C> empty() {\n return DataFrame.factory().empty();\n }\n\n /**\n * Returns an empty DataFrame with zero length rows and columns\n * @param rowAxisType the row axis key type\n * @param colAxisType the column axis key type\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the empty DataFrame\n */\n static <R,C> DataFrame<R,C> empty(Class<R> rowAxisType, Class<C> colAxisType) {\n return DataFrame.factory().empty(rowAxisType, colAxisType);\n }\n\n /**\n * Returns a DataFrame result by concatenating a selection of frames\n * @param frames the iterable of frames to concatenate\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the concatenated DataFrame\n */\n @SafeVarargs\n static <R,C> DataFrame<R,C> combineFirst(DataFrame<R,C>... frames) {\n return DataFrame.factory().combineFirst(Arrays.asList(frames).iterator());\n }\n\n /**\n * Returns a DataFrame result by concatenating a selection of frames\n * @param frames the iterable of frames to concatenate\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the concatenated DataFrame\n */\n static <R,C> DataFrame<R,C> combineFirst(Iterable<DataFrame<R,C>> frames) {\n return DataFrame.factory().combineFirst(frames.iterator());\n }\n\n /**\n * Returns a DataFrame result by combining multiple frames into one while applying only the first non-null element value\n * If there are intersecting coordinates across the frames, that first non-null value will apply in the resulting frame\n * @param frames the stream of frames to apply\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the concatenated DataFrame\n */\n static <R,C> DataFrame<R,C> combineFirst(Stream<DataFrame<R,C>> frames) {\n return DataFrame.factory().combineFirst(frames.iterator());\n }\n\n /**\n * Returns a newly created DataFrame by concatenating rows from the input frames\n * If there are overlapping row keys, the row values from the first frame will apply\n * @param frames the iterable of frames from which to concatenate rows\n * @param <R> the row key type for frames\n * @param <C> the column key type for frames\n * @return the resulting DataFrame\n */\n @SafeVarargs\n static <R,C> DataFrame<R,C> concatRows(DataFrame<R,C>... frames) {\n return DataFrame.factory().concatRows(Arrays.asList(frames).iterator());\n }\n\n /**\n * Returns a newly created DataFrame by concatenating rows from the input frames\n * If there are overlapping row keys, the row values from the first frame will apply\n * @param frames the iterable of frames from which to concatenate rows\n * @param <R> the row key type for frames\n * @param <C> the column key type for frames\n * @return the resulting DataFrame\n */\n static <R,C> DataFrame<R,C> concatRows(Iterable<DataFrame<R,C>> frames) {\n return DataFrame.factory().concatRows(frames.iterator());\n }\n\n /**\n * Returns a newly created DataFrame by concatenating rows from the input frames\n * If there are overlapping row keys, the row values from the first frame will apply\n * @param frames the iterable of frames from which to concatenate rows\n * @param <R> the row key type for frames\n * @param <C> the column key type for frames\n * @return the resulting DataFrame\n */\n static <R,C> DataFrame<R,C> concatRows(Stream<DataFrame<R,C>> frames) {\n return DataFrame.factory().concatRows(frames.iterator());\n }\n\n /**\n * Returns a newly created DataFrame by concatenating columns from the input frames\n * If there are overlapping column keys, the row values from the first frame will apply\n * @param frames the iterable of frames from which to concatenate columns\n * @param <R> the row key type for frames\n * @param <C> the column key type for frames\n * @return the resulting DataFrame\n */\n @SafeVarargs\n static <R,C> DataFrame<R,C> concatColumns(DataFrame<R,C>... frames) {\n return DataFrame.factory().concatColumns(Arrays.asList(frames).iterator());\n }\n\n /**\n * Returns a newly created DataFrame by concatenating columns from the input frames\n * If there are overlapping column keys, the row values from the first frame will apply\n * @param frames the iterable of frames from which to concatenate columns\n * @param <R> the row key type for frames\n * @param <C> the column key type for frames\n * @return the resulting DataFrame\n */\n static <R,C> DataFrame<R,C> concatColumns(Iterable<DataFrame<R,C>> frames) {\n return DataFrame.factory().concatColumns(frames.iterator());\n }\n\n /**\n * Returns a newly created DataFrame by concatenating columns from the input frames\n * If there are overlapping column keys, the row values from the first frame will apply\n * @param frames the iterable of frames from which to concatenate columns\n * @param <R> the row key type for frames\n * @param <C> the column key type for frames\n * @return the resulting DataFrame\n */\n static <R,C> DataFrame<R,C> concatColumns(Stream<DataFrame<R,C>> frames) {\n return DataFrame.factory().concatColumns(frames.iterator());\n }\n\n /**\n * Returns an empty DataFrame with the row and column types specified\n * @param rowType the row key type\n * @param colType the column key type\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> of(Class<R> rowType, Class<C> colType) {\n return DataFrame.factory().from(Index.of(rowType, 1000), Index.of(colType, 20), Object.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized for columns with the type specified\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param type the data type for columns\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> of(Iterable<R> rowKeys, Iterable<C> colKeys, Class<?> type) {\n return DataFrame.factory().from(rowKeys, colKeys, type);\n }\n\n /**\n * Returns a newly created DataFrame with 1 row and N columns all with the data type specified\n * @param rowKey the row key for frame\n * @param colKeys the column keys for frame\n * @param dataType the data type for columns\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> of(R rowKey, Iterable<C> colKeys, Class<?> dataType) {\n return DataFrame.factory().from(Index.singleton(rowKey), colKeys, dataType);\n }\n\n /**\n * Returns a newly created DataFrame with N rows and 1 column with the data type specified\n * @param rowKeys the row keys for frame\n * @param colKey the column key for frame\n * @param type the data type for columns\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> of(Iterable<R> rowKeys, C colKey, Class<?> type) {\n return DataFrame.factory().from(rowKeys, Index.singleton(colKey), type);\n }\n\n /**\n * Returns a newly created DataFrame initialized with rows and any state added by the consumer\n * @param rowKeys the row keys for frame\n * @param colType the column key type\n * @param columns the consumer which can be used to add columns\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created <code>DataFrame</code>\n */\n static <R,C> DataFrame<R,C> of(Iterable<R> rowKeys, Class<C> colType, Consumer<DataFrameColumns<R,C>> columns) {\n return DataFrame.factory().from(rowKeys, colType, columns);\n }\n\n /**\n * Returns a newly created DataFrame with 1 row optimized to hold primitive booleans\n * @param rowKey the row key for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofBooleans(R rowKey, Iterable<C> colKeys) {\n return DataFrame.factory().from(Index.singleton(rowKey), colKeys, Boolean.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 row optimized to hold primitive integers\n * @param rowKey the row key for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofInts(R rowKey, Iterable<C> colKeys) {\n return DataFrame.factory().from(Index.singleton(rowKey), colKeys, Integer.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 row optimized to hold primitive longs\n * @param rowKey the row key for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofLongs(R rowKey, Iterable<C> colKeys) {\n return DataFrame.factory().from(Index.singleton(rowKey), colKeys, Long.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 row optimized to hold primitive doubles\n * @param rowKey the row key for frame\n * @param colKeys the column index for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofDoubles(R rowKey, Iterable<C> colKeys) {\n return DataFrame.factory().from(Index.singleton(rowKey), colKeys, Double.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 row optimized to hold any object\n * @param rowKey the row key for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofObjects(R rowKey, Iterable<C> colKeys) {\n return DataFrame.factory().from(Index.singleton(rowKey), colKeys, Object.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 column optimized to hold primitive booleans\n * @param rowKeys the row keys for frame\n * @param colKey the column key for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofBooleans(Iterable<R> rowKeys, C colKey) {\n return DataFrame.factory().from(rowKeys, Index.singleton(colKey), Boolean.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 column optimized to hold primitive integers\n * @param rowKeys the row keys for frame\n * @param colKey the column key for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofInts(Iterable<R> rowKeys, C colKey) {\n return DataFrame.factory().from(rowKeys, Index.singleton(colKey), Integer.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 column optimized to hold primitive longs\n * @param rowKeys the row keys for frame\n * @param colKey the column key for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofLongs(Iterable<R> rowKeys, C colKey) {\n return DataFrame.factory().from(rowKeys, Index.singleton(colKey), Long.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 column optimized to hold primitive doubles\n * @param rowKeys the row keys for frame\n * @param colKey the column key for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofDoubles(Iterable<R> rowKeys, C colKey) {\n return DataFrame.factory().from(rowKeys, Index.singleton(colKey), Double.class);\n }\n\n /**\n * Returns a newly created DataFrame with 1 column optimized to hold any object\n * @param rowKeys the row keys for frame\n * @param colKey the column key for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofObjects(Iterable<R> rowKeys, C colKey) {\n return DataFrame.factory().from(rowKeys, Index.singleton(colKey), Object.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive booleans\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofBooleans(Iterable<R> rowKeys, Iterable<C> colKeys) {\n return DataFrame.factory().from(rowKeys, colKeys, Boolean.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive integers\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofInts(Iterable<R> rowKeys, Iterable<C> colKeys) {\n return DataFrame.factory().from(rowKeys, colKeys, Integer.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive longs\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofLongs(Iterable<R> rowKeys, Iterable<C> colKeys) {\n return DataFrame.factory().from(rowKeys, colKeys, Long.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive doubles\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofDoubles(Iterable<R> rowKeys, Iterable<C> colKeys) {\n return DataFrame.factory().from(rowKeys, colKeys, Double.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold Strings\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofStrings(Iterable<R> rowKeys, Iterable<C> colKeys) {\n return DataFrame.factory().from(rowKeys, colKeys, String.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold any objects\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofObjects(Iterable<R> rowKeys, Iterable<C> colKeys) {\n return DataFrame.factory().from(rowKeys, colKeys, Object.class);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive booleans\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param initials a function to provide initial values\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofBooleans(Iterable<R> rowKeys, Iterable<C> colKeys, ToBooleanFunction<DataFrameValue<R,C>> initials) {\n return DataFrame.factory().from(rowKeys, colKeys, Boolean.class).applyBooleans(initials);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive integers\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param initials a function to provide initial values\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofInts(Iterable<R> rowKeys, Iterable<C> colKeys, ToIntFunction<DataFrameValue<R,C>> initials) {\n return DataFrame.factory().from(rowKeys, colKeys, Integer.class).applyInts(initials);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive longs\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param initials a function to provide initial values\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofLongs(Iterable<R> rowKeys, Iterable<C> colKeys, ToLongFunction<DataFrameValue<R,C>> initials) {\n return DataFrame.factory().from(rowKeys, colKeys, Long.class).applyLongs(initials);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold primitive doubles\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param initials a function to provide initial values\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofDoubles(Iterable<R> rowKeys, Iterable<C> colKeys, ToDoubleFunction<DataFrameValue<R,C>> initials) {\n return DataFrame.factory().from(rowKeys, colKeys, Double.class).applyDoubles(initials);\n }\n\n /**\n * Returns a newly created DataFrame optimized to hold any objects\n * @param rowKeys the row keys for frame\n * @param colKeys the column keys for frame\n * @param initials a function to provide initial values\n * @param <R> the row key type\n * @param <C> the column key type\n * @return the newly created DataFrame\n */\n static <R,C> DataFrame<R,C> ofObjects(Iterable<R> rowKeys, Iterable<C> colKeys, Function<DataFrameValue<R, C>, ?> initials) {\n return DataFrame.factory().from(rowKeys, colKeys, Object.class).applyValues(initials);\n }\n\n /**\n * Returns a DataFrame of doubles initialized with ARGB values for each pixel in the image\n * @param file the file to load the image from\n * @return the DataFrame of ARGB values extracted from java.awt.image.BufferedImage\n * @link java.awt.image.BufferedImage#getRGB\n */\n static DataFrame<Integer,Integer> ofImage(File file) {\n try {\n final BufferedImage image = ImageIO.read(file);\n final Range<Integer> rowKeys = Range.of(0, image.getHeight());\n final Range<Integer> colKeys = Range.of(0, image.getWidth());\n return DataFrame.ofInts(rowKeys, colKeys, v -> image.getRGB(v.colOrdinal(), v.rowOrdinal()));\n } catch (Exception ex) {\n throw new DataFrameException(\"Failed to initialize DataFrame from image file: \" + file.getAbsolutePath(), ex);\n }\n }\n\n /**\n * Returns a DataFrame of doubles initialized with ARGB values for each pixel in the image\n * @param url the url to load the image from\n * @return the DataFrame of ARGB values extracted from java.awt.image.BufferedImage\n * @see java.awt.image.BufferedImage#getRGB\n */\n static DataFrame<Integer,Integer> ofImage(URL url) {\n try {\n final BufferedImage image = ImageIO.read(url);\n final Range<Integer> rowKeys = Range.of(0, image.getHeight());\n final Range<Integer> colKeys = Range.of(0, image.getWidth());\n return DataFrame.ofInts(rowKeys, colKeys, v -> image.getRGB(v.colOrdinal(), v.rowOrdinal()));\n } catch (Exception ex) {\n throw new DataFrameException(\"Failed to initialize DataFrame from image url: \" + url, ex);\n }\n }\n\n\n /**\n * Returns a DataFrame of doubles initialized with ARGB values for each pixel in the image\n * @param inputStream the input stream to load the image from\n * @return the DataFrame of ARGB values extracted from java.awt.image.BufferedImage\n * @see java.awt.image.BufferedImage#getRGB\n */\n static DataFrame<Integer,Integer> ofImage(InputStream inputStream) {\n try {\n final BufferedImage image = ImageIO.read(inputStream);\n final Range<Integer> rowKeys = Range.of(0, image.getHeight());\n final Range<Integer> colKeys = Range.of(0, image.getWidth());\n return DataFrame.ofInts(rowKeys, colKeys, v -> image.getRGB(v.colOrdinal(), v.rowOrdinal()));\n } catch (Exception ex) {\n throw new DataFrameException(\"Failed to initialize DataFrame from image input stream\", ex);\n }\n }\n}", "public static void main( String[] args ) {\n\n\t\tString S = C + \": Main(): \";\n\t\tSystem.out.println( S + \"Starting\" );\n\n\t\tint xsize = 5;\n\t\tint ysize = 10;\n\n\t\tContainer2DImpl<String> con = new Container2DImpl<String>( xsize, ysize );\n\t\tfor ( int x = 0; x < xsize; x++ ) {\n\t\t\tfor ( int y = 0; y < ysize; y++ ) {\n\t\t\t\tcon.set( x, y, \"\" + x + \", \" + y );\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println( S + \"(1,1) = \" + con.get( 1, 1 ) );\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getRowIterator\" );\n\n\t\tListIterator<String> it = con.getRowIterator( 2 );\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getColumnIterator\" );\n\n\t\tit = con.getColumnIterator( 2 );\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getAllByColumnsIterator\" );\n\n\t\tit = con.getAllByColumnsIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"getAllByRowsIterator\" );\n\n\t\tit = con.getAllByRowsIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\n\t\t}\n\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S );\n\t\tSystem.out.println( S + \"List Iterator\" );\n\n\t\tit = con.listIterator();\n\t\twhile ( it.hasNext() ) {\n\n\t\t\tString obj = it.next();\n\t\t\tSystem.out.println( S + obj.toString() );\n\t\t}\n\n\t\tSystem.out.println( S + \"Ending\" );\n\n\t}", "public interface DataSourceNotifyController<Adapter, DataSource> extends DataSourceController<DataSource> {\n\n\tDataSourceNotifyController<Adapter, DataSource> notifyDataSetChanged();\n\n\t@NonNull\n\tAdapter getDataSourceAdapter();\n}", "private XYMultipleSeriesDataset getdemodataset() {\n\t\t\tdataset1 = new XYMultipleSeriesDataset();// xy轴数据源\n\t\t\tseries = new XYSeries(\"温度 \");// 这个事是显示多条用的,显不显示在上面render设置\n\t\t\t// 这里相当于初始化,初始化中无需添加数据,因为如果这里添加第一个数据的话,\n\t\t\t// 很容易使第一个数据和定时器中更新的第二个数据的时间间隔不为两秒,所以下面语句屏蔽\n\t\t\t// 这里可以一次更新五个数据,这样的话相当于开始的时候就把五个数据全部加进去了,但是数据的时间是不准确或者间隔不为二的\n\t\t\t// for(int i=0;i<5;i++)\n\t\t\t// series.add(1, Math.random()*10);//横坐标date数据类型,纵坐标随即数等待更新\n\n\t\t\tdataset1.addSeries(series);\n\t\t\treturn dataset1;\n\t\t}", "public interface DataAccessor {\n}", "@Override\n\tpublic void setDataSet(IDataSet ds) {\n\t\t\n\t}", "public interface ExprMatrix extends ExprCellIterator{\n public int getColumnsDimension();\n\n public int getRowsDimension();\n\n public Expr apply(int row, int column);\n\n public Expr get(int row, int column);\n\n public void set(Expr exp, int row, int col);\n\n\n /**\n * create a preloaded sequence (all element are pre evaluated)\n * @return\n */\n public ExprMatrix preload();\n\n /**\n * same as index, provided for scala compatibility\n *\n * @param index index\n * @return get(index)\n */\n /**\n * create a cached instance of this expression sequence\n * @return\n */\n public ExprMatrix withCache();\n\n /**\n * create a sequence of simplified elements\n * @return\n */\n public ExprMatrix simplify() ;\n}", "public DataImpl getData() {\n RealTupleType domain = overlay.getDomainType();\n TupleType range = overlay.getRangeType();\n \n float[][] setSamples = nodes;\n float r = color.getRed() / 255f;\n float g = color.getGreen() / 255f;\n float b = color.getBlue() / 255f;\n float[][] rangeSamples = new float[3][setSamples[0].length];\n Arrays.fill(rangeSamples[0], r);\n Arrays.fill(rangeSamples[1], g);\n Arrays.fill(rangeSamples[2], b);\n \n FlatField field = null;\n try {\n GriddedSet fieldSet = new Gridded2DSet(domain,\n setSamples, setSamples[0].length, null, null, null, false);\n FunctionType fieldType = new FunctionType(domain, range);\n field = new FlatField(fieldType, fieldSet);\n field.setSamples(rangeSamples);\n }\n catch (VisADException exc) { exc.printStackTrace(); }\n catch (RemoteException exc) { exc.printStackTrace(); }\n return field;\n }", "public interface IWilayaDatasource {\n\n Flowable<Wilaya> getWilayaById(int wilayaID);\n\n Flowable<List<Wilaya>> getAllWilaya();\n\n void insertWilaya(Wilaya... wilayas);\n\n void updateWilaya(Wilaya... wilayas);\n\n void deleteWilaya(Wilaya wilaya);\n\n void deleteAllWilaya();\n}", "public static DataSource getDs() {\n return ds;\n }", "public Table<Integer, Integer, String> getData();", "public abstract Collection<T> getSecondDimension();", "public interface DataLocator<E> {\n\n E getData(int readLocation);\n\n void setData(int writeLocation1, E value);\n\n void writeAll(E[] newData, int length);\n\n int getCapacity();\n}", "public static JRDataSource getDataSource() {\n\t\treturn new CustomDataSource(1000);\n\t}", "@Override\n\tpublic void setDataSource(DataSource dataSource) {\n\t}", "public JaggedArrayIterator(int[][] array) {\n this.array = array;\n }", "@Override\n public String getDataSource()\n {\n return dataSource;\n }", "@DataProvider()\n\tpublic Object[][] getData() {\n\t\t\n\t\treturn ConstantsArray.getArrayData();\n\t}", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "@Override\n public void setDataSource(DataSource dataSource) {\n }", "public Object getContent(DataSource ds) throws IOException;", "protected void sequence_Slice(ISerializationContext context, Slice semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public int getDataIndexAndIncrement() {\n\t\tint x = dataIndex;\n\t\tnext();\n\t\treturn x;\n\t}", "DataFrameFill fill();", "@Test\n public void testDoubleNestedArray() {\n TupleMetadata schema = new SchemaBuilder()\n .add(\"a\", MinorType.INT)\n .addMapArray(\"m1\")\n .add(\"b\", MinorType.INT)\n .addMapArray(\"m2\")\n .add(\"c\", MinorType.INT)\n .addArray(\"d\", MinorType.VARCHAR)\n .resumeMap()\n .resumeSchema()\n .buildSchema();\n ResultSetLoaderImpl.ResultSetOptions options = new ResultSetOptionBuilder()\n .readerSchema(schema)\n .build();\n ResultSetLoader rsLoader = new ResultSetLoaderImpl(fixture.allocator(), options);\n RowSetLoader rootWriter = rsLoader.writer();\n rsLoader.startBatch();\n\n ScalarWriter aWriter = rootWriter.scalar(\"a\");\n ArrayWriter a1Writer = rootWriter.array(\"m1\");\n TupleWriter m1Writer = a1Writer.tuple();\n ScalarWriter bWriter = m1Writer.scalar(\"b\");\n ArrayWriter a2Writer = m1Writer.array(\"m2\");\n TupleWriter m2Writer = a2Writer.tuple();\n ScalarWriter cWriter = m2Writer.scalar(\"c\");\n ScalarWriter dWriter = m2Writer.array(\"d\").scalar();\n\n for (int i = 0; i < 5; i++) {\n rootWriter.start();\n aWriter.setInt(i);\n for (int j = 0; j < 4; j++) {\n int a1Key = i + 10 + j;\n bWriter.setInt(a1Key);\n for (int k = 0; k < 3; k++) {\n int a2Key = a1Key * 10 + k;\n cWriter.setInt(a2Key);\n for (int l = 0; l < 2; l++) {\n dWriter.setString(\"d-\" + (a2Key * 10 + l));\n }\n a2Writer.save();\n }\n a1Writer.save();\n }\n rootWriter.save();\n }\n\n RowSet results = fixture.wrap(rsLoader.harvest());\n RowSetReader reader = results.reader();\n\n ScalarReader aReader = reader.scalar(\"a\");\n ArrayReader a1Reader = reader.array(\"m1\");\n TupleReader m1Reader = a1Reader.tuple();\n ScalarReader bReader = m1Reader.scalar(\"b\");\n ArrayReader a2Reader = m1Reader.array(\"m2\");\n TupleReader m2Reader = a2Reader.tuple();\n ScalarReader cReader = m2Reader.scalar(\"c\");\n ArrayReader dArray = m2Reader.array(\"d\");\n ScalarReader dReader = dArray.scalar();\n\n for (int i = 0; i < 5; i++) {\n assertTrue(reader.next());\n assertEquals(i, aReader.getInt());\n for (int j = 0; j < 4; j++) {\n assertTrue(a1Reader.next());\n int a1Key = i + 10 + j;\n assertEquals(a1Key, bReader.getInt());\n for (int k = 0; k < 3; k++) {\n assertTrue(a2Reader.next());\n int a2Key = a1Key * 10 + k;\n assertEquals(a2Key, cReader.getInt());\n for (int l = 0; l < 2; l++) {\n assertTrue(dArray.next());\n assertEquals(\"d-\" + (a2Key * 10 + l), dReader.getString());\n }\n }\n }\n }\n rsLoader.close();\n }", "public IDataSet loadMaterializedDataSet(Set<FieldDescriptor> columns) throws DataSourceException;", "void example10() {\n\t\t\n\t\t// allocate a regular list\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> list =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.UINT4.construct(), 1000);\n\t\t\n\t\t// fill it with data\n\t\t\n\t\tFill.compute(G.UINT4, G.UINT4.random(), list);\n\t\t\n\t\t// protect it from writes\n\t\t\n\t\tIndexedDataSource<UnsignedInt4Member> readonlyList = new ReadOnlyDataSource<>(list);\n\t\t\n\t\t// now play with list\n\t\t\n\t\tUnsignedInt4Member value = G.UINT4.construct();\n\t\t\n\t\t// success\n\t\t\n\t\treadonlyList.get(44, value);\n\n\t\t// prepare to write\n\t\t\n\t\tvalue.setV(100);\n\t\t\n\t\t// failure: throws exception. writing not allowed\n\t\t\n\t\treadonlyList.set(22, value);\n\t}", "public interface Tabular {\n\t\n\t/**\n\t * Get an array-based representation of the elements in a list\n\t * \n\t * @return A 2-dimensional array representation of list elements,\n\t * where each element of the list is represented as a \n\t * \"row\" and each field in an element is a \"column\" in \n\t * the returned array.\n\t */\n\tpublic Object[][] get2DArray();\n\n}", "public Iterable<Integer> cycle(){\n return cycle;\n }", "public abstract int rows();", "Object getDataValue(final int row, final int column);", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "Source updateDatasourceHttp(Source ds) throws RepoxException;", "public interface IDataset extends Serializable{\n\t\n\t/**\n\t * Retrieve the data of the data set.\n\t * \n\t * @return an iterator over all data set items in the data set.\n\t */\n\tpublic Iterator<IDatasetItem> iterateOverDatasetItems();\n\t\n\t/**\n\t * Gets a normalizer for the data set.\n\t * \n\t * @return the corresponding normalizer.\n\t */\n\tpublic INormalizer getNormalizer();\n\t\n\t/**\n\t * Gets a immutable map that indicates for each attribute (-tag) if it should be used for clustering.\n\t * @return map of attribute-tags to boolean values \n\t */\n\tpublic ImmutableMap<String, Boolean> getAttributeClusteringConfig();\n\t\n\t/**\n\t * Scales the passed value to the range defined in the data set property files.\n\t * @param value a normalized value\n\t * @param attributeTag the identifier of the attribute\n\t * @return the attribute value in the original scale\n\t */\n\tpublic double denormalize(double value, String attributeTag);\n\t\n}", "public DataSource getDatasource() {\n return datasource;\n }" ]
[ "0.5809885", "0.5752191", "0.57139146", "0.5689727", "0.5599463", "0.5577594", "0.54600894", "0.53315306", "0.53141767", "0.5283649", "0.5224459", "0.5170235", "0.51485234", "0.5078082", "0.5059715", "0.50492877", "0.504045", "0.504036", "0.4988249", "0.49873894", "0.49785784", "0.49785784", "0.49785784", "0.49785784", "0.49785784", "0.49785784", "0.49448973", "0.49389026", "0.49292165", "0.4912682", "0.48969993", "0.48541266", "0.48483706", "0.48438057", "0.48221213", "0.48211008", "0.48120895", "0.48092827", "0.47837973", "0.47759515", "0.47676367", "0.4760548", "0.47506556", "0.47485515", "0.47384176", "0.47372755", "0.47234264", "0.47035286", "0.4700169", "0.4698901", "0.46947512", "0.46910155", "0.4683778", "0.4676634", "0.46754605", "0.46572822", "0.46544784", "0.4650527", "0.46489197", "0.46482393", "0.46460563", "0.46354952", "0.46312994", "0.46167126", "0.46145168", "0.46125007", "0.45993376", "0.45836973", "0.45792452", "0.45726198", "0.45613548", "0.45585078", "0.45480603", "0.4545364", "0.45448908", "0.45416215", "0.45178047", "0.45162624", "0.4515635", "0.45134518", "0.4512447", "0.45112112", "0.4502743", "0.4502743", "0.4502743", "0.45026925", "0.4501841", "0.44997483", "0.44866958", "0.44855282", "0.44796598", "0.4479365", "0.4476215", "0.44750753", "0.4471656", "0.44704643", "0.4470023", "0.44663423", "0.44657898", "0.44616687" ]
0.5701361
3